:root {
  color-scheme: dark;
  --bg: #090a0d;
  --panel: #111319;
  --panel-raised: #151821;
  --panel-hover: #1a1d28;
  --text: #f5f5f7;
  --muted: #9296a8;
  --line: rgba(255, 255, 255, .1);
  --violet: #8e7dff;
  --cyan: #55e4d2;
  --coral: #ff8d76;
  --sans: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 22px 24px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(142, 125, 255, .1), transparent 46%), var(--bg);
}
.login-screen::before, .welcome-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.login-brand, .activity-brand { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: -.7px; }
.login-brand { position: absolute; top: 28px; left: 34px; }
.login-brand > span:last-child > span { color: var(--muted); }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.login-brand i, .site-brand i { color: var(--violet); font-size: .75em; font-style: normal; letter-spacing: -.2px; }
.login-card { position: relative; z-index: 1; width: min(100%, 456px); padding: 48px 46px 28px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.045), transparent 40%), var(--panel); box-shadow: 0 28px 100px rgba(0,0,0,.34); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--cyan); font: 500 10px var(--mono); letter-spacing: 1.5px; }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(85,228,210,.6); }
.login-card h1, .welcome-screen h1, .projects-empty h2 { margin: 22px 0 14px; font-size: clamp(38px, 7vw, 52px); line-height: 1.08; letter-spacing: -2.7px; font-weight: 700; }
.login-card h1 em, .welcome-screen h1 em, .projects-empty h2 em { color: var(--violet); font-style: normal; }
.login-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.google-button { margin-top: 30px; width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; background: #f7f7f8; color: #16171b; border-radius: 8px; font-size: 13px; font-weight: 700; text-decoration: none; transition: transform .18s, background .18s; }
.google-button:hover { transform: translateY(-2px); background: white; }
.google-button svg { width: 18px; height: 18px; }
.google-button > span { position: absolute; right: 62px; font-size: 18px; }
.login-error { margin-top: 14px !important; color: var(--coral) !important; }
.login-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 34px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); letter-spacing: .7px; }
.login-foot span:first-child { color: var(--cyan); }
.login-caption { margin: 22px 0 0; color: var(--muted); font-size: 11px; }
.login-caption a { color: var(--text); text-decoration: none; }
.login-caption span { margin: 0 7px; color: var(--violet); }

.workspace { height: 100vh; min-height: 470px; display: grid; grid-template-columns: 54px 250px minmax(0, 1fr); overflow: hidden; }
.activity-bar { z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 15px 0 11px; background: #0c0d11; border-right: 1px solid var(--line); }
.activity-brand { justify-content: center; width: 36px; height: 36px; margin-bottom: 14px; border: 1px solid transparent; }
.activity-brand img { width: 31px; height: 31px; object-fit: contain; }
.activity-button { position: relative; width: 42px; height: 42px; border: 0; border-radius: 8px; color: #777b8c; background: transparent; font: 22px var(--sans); cursor: pointer; }
.activity-button:hover, .activity-button.active { color: var(--text); background: rgba(255,255,255,.06); }
.activity-button.active::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--violet); }
.activity-spacer { flex: 1; }
.account-button { overflow: hidden; border: 1px solid var(--line); font: 600 13px var(--sans); color: var(--cyan); }
.account-button img { width: 100%; height: 100%; object-fit: cover; }
.sidebar { min-width: 0; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.sidebar-header { height: 46px; padding: 0 13px 0 18px; display: flex; justify-content: space-between; align-items: center; color: #a6a9b6; font: 500 10px var(--mono); letter-spacing: 1.1px; }
.projects-link { display: grid; place-items: center; color: var(--muted); text-decoration: none; }
.icon-button, .mini-button { display: grid; place-items: center; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button { width: 27px; height: 27px; font-size: 19px; }
.icon-button:hover, .mini-button:hover { color: var(--text); background: var(--panel-hover); }
.project-switcher { position: relative; padding: 2px 10px 12px; }
.project-picker { width: 100%; height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: #0e1015; color: var(--text); text-align: left; cursor: pointer; font-size: 11px; }
.project-picker:hover { border-color: rgba(142,125,255,.55); }
.project-icon { color: var(--violet); font-size: 16px; }
.project-picker #project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.picker-chevron { color: var(--muted); }
.project-menu { position: absolute; z-index: 4; top: 43px; left: 10px; right: 10px; padding: 5px; background: #1a1c24; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 14px 34px rgba(0,0,0,.45); max-height: 250px; overflow-y: auto; }
.project-menu button { display: block; width: 100%; padding: 9px 10px; overflow: hidden; border: 0; border-radius: 4px; background: transparent; color: #c6c8d0; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; cursor: pointer; }
.project-menu button:hover, .project-menu button.selected { background: rgba(142,125,255,.14); color: white; }
.project-menu .menu-create { margin-top: 5px; border-top: 1px solid var(--line); border-radius: 0; color: var(--cyan); }
.project-menu .menu-action { margin-top: 0; border-top: 0; color: #c6c8d0; }
.project-menu .menu-action:hover { background: rgba(255,255,255,.07); color: white; }
.project-menu .menu-danger { margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--coral); }
.explorer-toolbar { min-height: 35px; padding: 0 9px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #a6a9b6; font: 500 9px var(--mono); letter-spacing: .8px; }
.explorer-toolbar > div { display: flex; align-items: center; gap: 1px; }
.mini-button { width: 23px; height: 24px; border-radius: 4px; font-size: 14px; }
.file-search-wrap { padding: 4px 11px 7px; }
.file-search-wrap input { width: 100%; height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #0c0e12; color: var(--text); outline: none; font-size: 11px; }
.file-search-wrap input:focus { border-color: var(--violet); }
.file-tree { min-height: 0; flex: 1; overflow: auto; padding: 3px 6px 12px; scrollbar-color: #343743 transparent; scrollbar-width: thin; }
.tree-row { position: relative; display: flex; align-items: center; height: 29px; gap: 7px; padding-right: 3px; border-radius: 4px; color: #bfc1cb; cursor: pointer; font-size: 11px; user-select: none; }
.tree-row:hover, .tree-row.selected { background: rgba(255,255,255,.065); color: #fff; }
.tree-row.drag-over { outline: 1px solid var(--cyan); background: rgba(85,228,210,.08); }
.tree-arrow { width: 10px; color: #747888; text-align: center; font-size: 10px; }
.tree-icon { width: 15px; color: var(--cyan); text-align: center; font: 12px var(--mono); }
.tree-name { min-width: 0; overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.tree-actions { position: absolute; top: 3px; right: 0; z-index: 1; display: none; gap: 0; background: var(--panel); }
.tree-row:hover .tree-actions, .tree-row:focus-within .tree-actions { display: flex; }
.tree-actions button { width: 20px; height: 23px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.tree-actions button:hover { background: rgba(255,255,255,.1); color: white; }
.tree-empty { padding: 18px 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sidebar-empty { flex: 1; padding: 30px 22px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.sidebar-empty > span { color: var(--violet); font-size: 26px; }
.sidebar-empty strong { margin-top: 10px; font-size: 13px; }
.sidebar-empty p { color: var(--muted); font-size: 11px; line-height: 1.7; }
.small-primary { padding: 8px 10px; border: 0; border-radius: 5px; background: var(--violet); color: white; font-size: 10px; cursor: pointer; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-top: 1px solid var(--line); color: #a4a7b4; font: 9px var(--mono); }
.sidebar-version { margin-left: auto; color: var(--muted); font-size: 8px; letter-spacing: .4px; }
.online-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px rgba(85,228,210,.52); }

.editor-shell { min-width: 0; display: flex; flex-direction: column; background: #0d0f14; }
.topbar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #101217; }
.breadcrumb { min-width: 0; display: flex; gap: 9px; align-items: center; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; }
.breadcrumb b { color: #515563; font-weight: 400; }
#breadcrumb-project { overflow: hidden; color: #d5d6dd; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.save-indicator { display: inline-flex; align-items: center; gap: 6px; margin-right: 5px; color: #858999; font-size: 9px; white-space: nowrap; }
.save-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.save-indicator.saving i { background: var(--violet); animation: pulse 1s infinite; }
.save-indicator.error i { background: var(--coral); }
@keyframes pulse { 50% { opacity: .35; } }
.top-action, .primary-action { height: 29px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: #b7bac5; font-size: 10px; cursor: pointer; white-space: nowrap; }
.top-action:hover { background: rgba(255,255,255,.05); color: white; }
.danger-action:hover { color: var(--coral); border-color: rgba(255,141,118,.35); }
.primary-action { border-color: transparent; background: var(--violet); color: white; font-weight: 700; }
.primary-action:hover, .welcome-button:hover, .small-primary:hover { filter: brightness(1.12); }
.welcome-screen, .projects-empty { position: relative; min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; overflow: hidden; padding: 50px 8.5%; }
.welcome-screen > *, .projects-empty > * { position: relative; z-index: 1; }
.welcome-screen h1 { margin-top: 25px; font-size: clamp(48px, 7vw, 76px); letter-spacing: -5px; }
.welcome-screen > p, .projects-empty > p { max-width: 370px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.welcome-button { display: inline-flex; align-items: center; gap: 26px; height: 42px; margin-top: 13px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--violet); color: white; font-size: 11px; font-weight: 700; cursor: pointer; }
.welcome-button span { font-size: 15px; }
.welcome-shortcuts { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 44px; color: #737786; font: 9px var(--mono); }
kbd { padding: 3px 5px; border: 1px solid rgba(255,255,255,.12); border-radius: 3px; color: #bec0ca; font: inherit; }
.welcome-watermark { position: absolute !important; z-index: 0 !important; right: 8%; bottom: 8%; width: clamp(140px, 29vw, 360px); height: clamp(140px, 29vw, 360px); object-fit: contain; opacity: .04; pointer-events: none; }
.projects-empty { justify-content: center; align-items: center; text-align: center; }
.projects-empty h2 { font-size: 48px; }
.projects-empty > p { margin: 0 auto; }
.editor-area { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.tabs { min-height: 36px; display: flex; overflow-x: auto; background: #111319; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tab { position: relative; height: 36px; min-width: 105px; max-width: 210px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-right: 1px solid rgba(255,255,255,.045); color: #999dab; font-size: 10px; cursor: pointer; }
.tab:hover { color: #d9dae0; }
.tab.active { background: #0d0f14; color: var(--text); }
.tab.active::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--violet); }
.tab-name { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.tab-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.tab.dirty .tab-dot { display: block; }
.tab-close { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 3px; color: #828594; font-size: 14px; }
.tab-close:hover { background: rgba(255,255,255,.1); color: white; }
.editor-container { min-height: 0; flex: 1; position: relative; }
.auxiliary-panel { min-height: 180px; height: 240px; flex: 0 0 auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: #0c0e13; }
.auxiliary-header { min-height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 13px; border-bottom: 1px solid rgba(255,255,255,.06); }
.auxiliary-tabs { display: flex; height: 100%; gap: 18px; }
.auxiliary-tab { position: relative; padding: 0; border: 0; background: transparent; color: var(--muted); font: 10px var(--mono); letter-spacing: .6px; cursor: pointer; }
.auxiliary-tab.active { color: var(--text); }
.auxiliary-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: var(--violet); content: ""; }
.terminal-view, .ai-view { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.terminal-output { min-height: 0; flex: 1; overflow-y: auto; padding: 8px 14px; color: #c5c7d0; font: 11px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-line { min-height: 18px; }
.terminal-line.command { color: var(--cyan); }
.terminal-line.error { color: var(--coral); }
.terminal-form { min-height: 34px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-top: 1px solid rgba(255,255,255,.06); }
.terminal-prompt { color: var(--cyan); font: 15px var(--mono); }
.terminal-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: 11px var(--mono); }
.terminal-run, .ai-form button { width: 25px; height: 25px; border: 0; border-radius: 5px; background: var(--violet); color: white; cursor: pointer; }
.ai-heading { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 5px 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.ai-heading > img { width: 28px; height: 28px; object-fit: contain; }
.ai-heading > div { display: flex; flex-direction: column; gap: 2px; }
.ai-heading strong { font-size: 11px; }
.ai-heading > div > span { color: var(--muted); font-size: 9px; }
.ai-status { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font: 9px var(--mono); }
.ai-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.ai-status.online i { background: var(--cyan); }
.ai-status.offline i { background: var(--coral); }
.ai-messages { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding: 10px 13px; }
.ai-message { max-width: min(90%, 720px); padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: #d8d9df; font-size: 10px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-message.user { align-self: flex-end; border-color: rgba(142,125,255,.26); background: rgba(142,125,255,.1); }
.ai-message.assistant { align-self: flex-start; background: #14161d; }
.ai-message.pending { color: var(--muted); }
.ai-form { display: flex; align-items: flex-end; gap: 9px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.06); }
.ai-form textarea { min-height: 34px; max-height: 90px; flex: 1; resize: vertical; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #12141a; color: var(--text); font: 10px/1.5 var(--sans); }
.ai-form textarea:focus { border-color: var(--violet); }
.ai-context-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; font-size: 9px; }
.ai-context-toggle input { accent-color: var(--violet); }
.ai-message.attachment-note { align-self: flex-end; margin-top: -6px; padding: 3px 7px; border: 0; background: transparent; color: var(--cyan); font-size: 8px; }
.ai-message.ai-error { border-color: rgba(255,141,118,.25); color: var(--coral); }
.ai-form button { height: 31px; width: 32px; }
.ai-form button:disabled { opacity: .5; cursor: wait; }
.editor-fallback { width: 100%; height: 100%; resize: none; padding: 18px 24px; border: 0; outline: none; background: #0d0f14; color: #e0e1e8; font: 13px/1.65 var(--mono); tab-size: 2; }
.statusbar { min-height: 24px; display: flex; align-items: center; gap: 18px; padding: 0 11px; background: #171923; color: #bbbcca; font: 9px var(--mono); }
.statusbar > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.statusbar .online-dot { width: 5px; height: 5px; }
.status-spacer { flex: 1; }
.toast-region { position: fixed; z-index: 10; right: 18px; bottom: 40px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { max-width: min(380px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid var(--line); border-left: 2px solid var(--cyan); border-radius: 6px; background: #191b23; color: #e3e4e9; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 11px; animation: toast-in .18s ease-out; }
.toast.error { border-left-color: var(--coral); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(4,5,8,.72); backdrop-filter: blur(5px); }
.dialog-card { width: min(100%, 400px); padding: 27px; border: 1px solid var(--line); border-radius: 12px; background: #151720; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.dialog-card h2 { margin: 14px 0 6px; font-size: 21px; letter-spacing: -.8px; }
.dialog-card > p { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.dialog-card label { display: block; margin: 0 0 7px; color: #c1c3cc; font-size: 10px; }
.dialog-card input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid rgba(142,125,255,.6); border-radius: 5px; background: #0c0e13; color: var(--text); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; }
.dialog-actions button { height: 34px; padding: 0 12px; }
.account-menu { position: fixed; z-index: 5; left: 59px; bottom: 42px; width: 230px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #191b23; box-shadow: 0 12px 35px rgba(0,0,0,.4); }
.account-menu strong, .account-menu span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu strong { font-size: 11px; }
.account-menu span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-menu button { width: 100%; margin-top: 12px; padding: 8px 0 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--coral); text-align: left; font-size: 10px; cursor: pointer; }

.site-page, .projects-page { background: var(--bg); }
.site-shell, .projects-shell { width: min(1180px, calc(100% - 72px)); margin: 0 auto; }
.site-header, .projects-header { position: relative; z-index: 1; min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.site-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap; }
.site-brand img { width: 30px; height: 30px; object-fit: contain; }
.site-nav, .site-actions { display: flex; align-items: center; gap: 25px; }
.site-nav a, .site-login-link { color: #b2b5c1; text-decoration: none; font-size: 10px; transition: color .18s; }
.site-nav a:hover, .site-login-link:hover { color: white; }
.site-start-link { display: inline-flex; align-items: center; gap: 15px; padding: 10px 12px; border: 1px solid rgba(142,125,255,.45); border-radius: 5px; color: white; text-decoration: none; font-size: 10px; font-weight: 700; }
.site-start-link:hover { background: rgba(142,125,255,.12); }
.site-start-link span { color: var(--cyan); font-size: 14px; }
.site-hero { position: relative; min-height: 535px; display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 35px; padding: 69px 0 57px; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { margin: 23px 0 17px; font-size: clamp(52px, 6.5vw, 79px); line-height: .99; letter-spacing: -5px; font-weight: 700; }
.hero-copy h1 em, .section-heading h2 em, .site-cta h2 em, .projects-title-row h1 em { color: var(--violet); font-style: normal; }
.hero-copy > p { max-width: 460px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 27px; }
.hero-primary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 0 13px; border: 0; border-radius: 5px; background: var(--violet); color: white; text-decoration: none; font-size: 10px; font-weight: 700; cursor: pointer; }
.hero-primary:hover { filter: brightness(1.12); }
.hero-primary span { font-size: 14px; }
.hero-secondary { color: #c0c2cc; text-decoration: none; font-size: 10px; }
.hero-secondary span { margin-left: 6px; color: var(--cyan); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 15px; margin-top: 48px; color: #75798a; font: 8px var(--mono); letter-spacing: .5px; }
.hero-trust span:first-child { color: var(--cyan); }
.hero-trust i, .projects-overview i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.hero-preview { position: relative; z-index: 1; min-width: 0; padding: 0 0 33px 8px; }
.preview-window { overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: #0d0f14; box-shadow: 0 35px 80px rgba(0,0,0,.44), 0 0 80px rgba(142,125,255,.07); transform: perspective(1400px) rotateY(-4deg) rotateX(1deg); }
.preview-topbar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); background: #111319; color: #bfc1ca; font: 9px var(--mono); }
.preview-topbar > div { display: flex; gap: 5px; }
.preview-topbar > div span { width: 7px; height: 7px; border-radius: 50%; background: #ff796f; }
.preview-topbar > div span:nth-child(2) { background: #f6c56d; }
.preview-topbar > div span:nth-child(3) { background: #64d89c; }
.preview-topbar small { color: #737786; font-size: 8px; }
.preview-body { min-height: 238px; display: grid; grid-template-columns: 35px 135px minmax(0,1fr); }
.preview-activity { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 11px; border-right: 1px solid rgba(255,255,255,.06); color: #a2a5b2; font-size: 12px; }
.preview-activity img { width: 19px; height: 19px; object-fit: contain; }
.preview-files { display: flex; flex-direction: column; gap: 11px; padding: 15px 7px; color: #aeb1be; font-size: 8px; }
.preview-files small { margin-bottom: 5px; color: #8f93a3; font: 8px var(--mono); }
.preview-active { color: var(--cyan); }
.preview-code { min-width: 0; position: relative; color: #d6d7de; font: 9px/1.9 var(--mono); }
.preview-tab { height: 32px; padding: 8px; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--cyan); font-size: 8px; }
.preview-code pre { overflow: hidden; margin: 11px 0; padding: 0 10px; }
.preview-code pre i { color: #c792ea; font-style: normal; }
.preview-code pre b { color: #82aaff; font-weight: 400; }
.preview-code pre em { color: #c3e88d; font-style: normal; }
.code-muted { color: #606575; }
.preview-status { position: absolute; right: 0; bottom: 0; left: 0; min-height: 20px; display: flex; justify-content: space-between; padding: 4px 7px; background: #171923; color: #a6a8b3; font-size: 7px; }
.preview-status span:first-child { color: var(--cyan); }
.preview-note { position: absolute; right: -9px; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: #171923; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.preview-note-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; background: rgba(142,125,255,.17); color: var(--violet); }
.preview-note > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.preview-note strong { color: #e1e1e7; font-size: 9px; }
.preview-note small { color: var(--muted); font-size: 8px; }
.preview-note-arrow { margin-left: 12px; color: var(--cyan); }
.hero-glow { position: absolute; top: 5%; right: 3%; width: 46%; height: 90%; border-radius: 50%; background: rgba(142,125,255,.09); filter: blur(90px); pointer-events: none; }
.site-ribbon { min-height: 46px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #9296a5; font: 9px var(--mono); letter-spacing: .6px; }
.site-ribbon i { color: var(--violet); font-style: normal; }
.site-features { padding: 93px 0 88px; }
.section-heading { max-width: 620px; }
.section-heading h2 { margin: 17px 0 12px; font-size: clamp(35px, 5vw, 51px); line-height: 1.1; letter-spacing: -2.8px; }
.section-heading > p, .site-cta p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-top: 33px; }
.feature-card { position: relative; min-height: 223px; padding: 22px 19px 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(140deg, rgba(255,255,255,.025), transparent 60%), var(--panel); }
.feature-card:hover { border-color: rgba(142,125,255,.38); }
.feature-number { position: absolute; top: 18px; right: 19px; color: #777b89; font: 9px var(--mono); }
.feature-symbol { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: rgba(85,228,210,.1); color: var(--cyan); font: 16px var(--mono); }
.violet-symbol { background: rgba(142,125,255,.12); color: var(--violet); }
.coral-symbol { background: rgba(255,141,118,.1); color: var(--coral); }
.feature-card h3 { margin: 20px 0 8px; font-size: 14px; letter-spacing: -.4px; }
.feature-card p { max-width: 290px; min-height: 51px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.feature-meta { color: #777b8c; font: 8px var(--mono); letter-spacing: .35px; }
.site-cta { position: relative; min-height: 250px; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; padding: 32px 38px; border: 1px solid var(--line); border-radius: 11px; background: radial-gradient(ellipse at 16% 100%, rgba(85,228,210,.09), transparent 35%), radial-gradient(ellipse at 76% 0%, rgba(142,125,255,.13), transparent 42%), var(--panel); }
.site-cta > img { width: 76px; height: 76px; object-fit: contain; }
.site-cta h2 { margin: 12px 0 7px; font-size: 36px; line-height: 1.04; letter-spacing: -2px; }
.site-cta p { max-width: 350px; margin-bottom: 0; }
.site-footer { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #7d8190; font-size: 9px; }
.footer-brand { display: inline-flex; align-items: center; gap: 7px; color: #d7d8de; text-decoration: none; font-size: 10px; font-weight: 700; }
.footer-brand img { width: 22px; height: 22px; object-fit: contain; }

.projects-shell { min-height: 100vh; display: flex; flex-direction: column; }
.projects-header { min-height: 70px; }
.projects-account { display: flex; align-items: center; gap: 9px; }
.projects-account > img, #account-initial { width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #1c1e29; color: var(--cyan); font-size: 12px; object-fit: cover; }
.projects-account > div { display: flex; flex-direction: column; gap: 3px; margin-right: 12px; }
.projects-account strong { font-size: 10px; }
.projects-account > div span { color: var(--muted); font-size: 9px; }
.projects-main { flex: 1; padding: 57px 0 45px; }
.projects-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.projects-title-row h1 { margin: 16px 0 10px; font-size: clamp(39px, 5vw, 57px); line-height: 1.07; letter-spacing: -3.2px; }
.projects-title-row p { color: var(--muted); font-size: 11px; }
.projects-title-row > button { margin-bottom: 9px; }
.projects-overview { display: flex; gap: 18px; margin: 35px 0 13px; color: var(--muted); font: 9px var(--mono); letter-spacing: .6px; }
.projects-overview b { margin-right: 5px; color: var(--text); }
.projects-overview span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.project-card { position: relative; min-height: 173px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.project-card:hover { border-color: rgba(142,125,255,.4); transform: translateY(-2px); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; }
.project-card-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: rgba(142,125,255,.12); color: var(--violet); }
.project-card-menu { width: 27px; height: 27px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.project-card-menu:hover { background: var(--panel-hover); color: white; }
.project-card h2 { margin: 15px 0 4px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-date { margin: 0; color: var(--muted); font-size: 9px; }
.project-open { position: absolute; right: 15px; bottom: 14px; left: 15px; display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.07); color: #c8cad3; text-decoration: none; font-size: 9px; }
.project-open span { color: var(--cyan); }
.project-card-actions { position: absolute; z-index: 2; top: 44px; right: 12px; width: 130px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #1b1d26; box-shadow: 0 10px 24px #0008; }
.project-card-actions button { width: 100%; padding: 8px; border: 0; background: transparent; color: #d0d1d8; text-align: left; font-size: 9px; cursor: pointer; }
.project-card-actions button:hover { background: #ffffff10; }
.project-card-actions .project-delete-action { color: var(--coral); }
.projects-empty { min-height: 290px; }
.projects-empty .empty-orbit { color: var(--violet); font-size: 28px; }
.projects-empty .hero-primary { margin-top: 12px; }
.projects-footer { margin-top: auto; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .site-shell, .projects-shell { width: min(100% - 44px, 1180px); }
  .site-nav { gap: 14px; }
  .site-hero { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero-copy h1 { font-size: clamp(49px, 6.3vw, 67px); }
  .preview-body { grid-template-columns: 30px 110px minmax(0,1fr); }
  .feature-grid, .project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .site-shell, .projects-shell { width: calc(100% - 32px); }
  .site-header { min-height: 62px; }
  .site-nav { display: none; }
  .site-actions { gap: 11px; }
  .site-login-link { font-size: 9px; }
  .site-start-link { gap: 8px; padding: 8px; font-size: 9px; }
  .site-hero { min-height: auto; grid-template-columns: 1fr; gap: 24px; padding: 58px 0 46px; }
  .hero-copy h1 { margin-top: 18px; font-size: clamp(52px, 12vw, 72px); letter-spacing: -4px; }
  .hero-copy > p { max-width: 530px; }
  .hero-trust { margin-top: 28px; }
  .hero-preview { width: min(100%, 520px); margin: auto; }
  .preview-window { transform: none; }
  .preview-note { right: -3px; }
  .site-ribbon { min-height: 55px; gap: 8px 11px; font-size: 8px; }
  .site-features { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 196px; }
  .feature-card p { min-height: 0; }
  .site-cta { min-height: 225px; flex-wrap: wrap; padding: 23px; }
  .site-cta > img { width: 48px; height: 48px; }
  .site-cta h2 { font-size: 31px; }
  .site-cta > div { flex: 1; }
  .site-cta > .hero-primary { margin-left: 59px; }
  .site-footer { flex-wrap: wrap; padding: 15px 0; }
  .site-footer > span:nth-child(2) { display: none; }
  .projects-main { padding-top: 39px; }
  .projects-title-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .projects-title-row > button { margin: 4px 0 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 160px; }
  .projects-account > div { display: none; }
  .projects-account .top-action { display: block; }
  .auxiliary-panel { height: 220px; min-height: 160px; }
  .ai-context-toggle { max-width: 92px; white-space: normal; line-height: 1.25; }
  .ai-form { gap: 5px; padding-inline: 7px; }
  .terminal-form { padding-inline: 8px; }
}
@media (max-width: 430px) {
  .site-shell, .projects-shell { width: calc(100% - 24px); }
  .site-brand { gap: 6px; font-size: 11px; }
  .site-brand img { width: 25px; height: 25px; }
  .site-actions { gap: 8px; }
  .site-start-link { font-size: 8px; }
  .site-hero { padding-top: 44px; }
  .hero-copy h1 { font-size: 49px; }
  .hero-trust { gap: 8px; font-size: 7px; }
  .preview-body { grid-template-columns: 27px 89px minmax(0,1fr); min-height: 210px; }
  .preview-files { font-size: 7px; }
  .preview-code { font-size: 8px; }
  .preview-topbar small { display: none; }
  .preview-note { right: 0; }
  .projects-title-row h1 { font-size: 39px; letter-spacing: -2px; }
  .projects-header .site-brand i { display: none; }
  .projects-account .top-action { padding: 0 7px; font-size: 8px; }
  .login-brand { gap: 7px; font-size: 13px; }
  .login-brand .brand-logo { width: 29px; height: 29px; }
  .welcome-screen { padding-right: 6%; padding-left: 6%; }
  .statusbar { gap: 7px; }
}

@media (max-width: 850px) {
  .workspace { grid-template-columns: 48px minmax(190px, 220px) minmax(0, 1fr); }
  .topbar { padding: 0 10px; }
  .top-action:not(.primary-action), .save-indicator { display: none; }
  .welcome-screen { padding-left: 7%; }
  .welcome-screen h1 { font-size: 56px; }
}
@media (max-width: 620px) {
  .workspace { grid-template-columns: 43px minmax(0, 1fr); }
  .activity-bar { grid-column: 1; grid-row: 1; }
  .sidebar { grid-column: 2; grid-row: 1; border-right: 0; }
  .editor-shell { grid-column: 1 / -1; grid-row: 2; }
  .workspace { grid-template-rows: minmax(150px, 31vh) minmax(0, 1fr); }
  .activity-bar { grid-row: 1; }
  .sidebar { grid-row: 1; }
  .editor-shell { grid-row: 2; }
  .activity-brand { margin-bottom: 2px; }
  .activity-button { width: 35px; height: 34px; }
  .activity-button.active::before { left: -4px; top: 8px; bottom: 8px; }
  .sidebar-header { height: 35px; }
  .project-switcher { padding-bottom: 5px; }
  .explorer-toolbar { min-height: 30px; }
  .sidebar-footer { min-height: 26px; }
  .sidebar-empty { padding: 10px 16px; }
  .sidebar-empty > span { font-size: 18px; }
  .sidebar-empty strong { margin-top: 4px; font-size: 11px; }
  .sidebar-empty p { margin: 4px 0; font-size: 9px; }
  .small-primary { padding: 6px 8px; }
  .topbar { min-height: 38px; }
  .topbar-actions { gap: 5px; }
  .primary-action { height: 27px; padding: 0 8px; font-size: 9px; }
  .welcome-screen { padding: 25px 8%; }
  .welcome-screen h1 { margin: 17px 0 10px; font-size: clamp(40px, 11vw, 60px); letter-spacing: -3px; }
  .welcome-screen > p { max-width: 280px; font-size: 10px; }
  .welcome-button { height: 36px; margin-top: 6px; font-size: 10px; }
  .welcome-shortcuts { margin-top: 23px; gap: 8px; font-size: 8px; }
  .projects-empty h2 { font-size: 40px; }
  .statusbar { gap: 10px; min-height: 22px; font-size: 8px; }
  .statusbar > span:nth-of-type(2), .statusbar > span:last-child { display: none; }
  .login-brand { top: 20px; left: 20px; }
  .login-card { padding: 35px 25px 23px; }
  .login-card h1 { font-size: 42px; }
  .login-foot { font-size: 8px; }
}
@media (max-width: 390px) {
  .sidebar { min-width: 0; }
  .mini-button { width: 20px; }
  .explorer-toolbar { padding-left: 11px; }
  .topbar { padding: 0 7px; }
  .breadcrumb { gap: 5px; font-size: 9px; }
  .primary-action { padding: 0 6px; }
}
