/* BRIIX workspace — self-contained demo, local fonts, no external assets. */
[hidden] { display: none !important; }
@font-face { font-family: Inter; font-style: normal; font-display: swap; font-weight: 100 900; src: url('site/assets/fonts/inter-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-display: swap; font-weight: 100 900; src: url('site/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 200 800; src: url('site/assets/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 200 800; src: url('site/assets/fonts/manrope-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  color-scheme: light;
  --bg: #fbfaf7; --sidebar: #f1f0ec; --surface: #ffffff; --surface-2: #f5f4f0; --surface-3: #eae8e2;
  --ink: #292b27; --muted: #6b6e66; --faint: #686c62; --line: #e5e4dd; --line-strong: #d4d5cb;
  --accent: #5a6550; --accent-hover: #46513d; --accent-soft: #e8eddf; --accent-ink: #46543a; --on-accent: #ffffff;
  --violet: #6f59a2; --violet-soft: #eee9f7; --rose: #99545f; --rose-soft: #f7e9ec;
  --blue: #4b6e93; --blue-soft: #e7eff7; --green: #527354; --green-soft: #e8f0e5;
  --amber: #87652e; --amber-soft: #f6eedc; --teal: #3e7470; --teal-soft: #e3f0ed;
  --danger: #b45147; --danger-soft: #f9eae7; --warning: #805b20; --warning-soft: #f7f0df;
  --code-bg: #282d29; --code-ink: #e5eade; --overlay: rgba(30, 34, 28, .32);
  --shadow-sm: 0 2px 5px rgba(37, 42, 31, .03), 0 8px 24px rgba(37, 42, 31, .035);
  --shadow-md: 0 8px 30px rgba(37, 42, 31, .08), 0 2px 6px rgba(37, 42, 31, .04);
  --shadow-lg: 0 24px 90px rgba(25, 30, 22, .18);
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: Manrope, Inter, sans-serif; --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sidebar-w: 264px; --radius: 14px; --reader-size: 14px;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --motion-fast: .16s; --motion-base: .24s; --motion-reveal: .4s;
  --code-line: rgba(255, 255, 255, .1); --code-hover: rgba(255, 255, 255, .1); --switch-shadow: rgba(0, 0, 0, .12);
}
[data-theme='dark'] {
  color-scheme: dark;
  /* Премиальный матовый чёрный: 3 нейтральные ступени (near-black, Geist/Linear-паттерн),
     без hue в фоне/карточках/линиях. Глубину дают rgba-бордеры, не светлые заливки. */
  --bg: #0d0e10; --sidebar: #0a0b0c; --surface: #141619; --surface-2: #1a1d21; --surface-3: #23262b;
  --ink: #eceef2; --muted: #a6aab3; --faint: #89909a; --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .14);
  --accent: #b3c49c; --accent-hover: #c2d2ac; --accent-soft: rgba(182, 199, 161, .10); --accent-ink: #cfddbb; --on-accent: #161a11;
  --violet: #c3b2e8; --violet-soft: rgba(195, 178, 232, .10); --rose: #e8b0bc; --rose-soft: rgba(232, 176, 188, .10);
  --blue: #a9c6e6; --blue-soft: rgba(169, 198, 230, .10); --green: #b3cdab; --green-soft: rgba(179, 205, 171, .10);
  --amber: #e3c68b; --amber-soft: rgba(227, 198, 139, .10); --teal: #a4d0c9; --teal-soft: rgba(164, 208, 201, .10);
  --danger: #efaaa0; --danger-soft: rgba(239, 170, 160, .10); --warning: #e4c98f; --warning-soft: rgba(228, 201, 143, .10);
  --code-bg: #08090b; --code-ink: #e3e6ea; --overlay: rgba(0, 0, 0, .66);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .32); --shadow-md: 0 8px 30px rgba(0, 0, 0, .48); --shadow-lg: 0 24px 90px rgba(0, 0, 0, .62);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button { border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; }
button, a, input, textarea, select { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
svg.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 200; padding: 12px 20px; border-radius: 10px; background: var(--accent); color: var(--on-accent); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); flex: 0 0 auto; transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.active { color: var(--accent-ink); background: var(--accent-soft); }
.icon-btn.small { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.small .icon { width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 13px; font-weight: 550; background: var(--surface); transition: background var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-standard); min-height: 40px; }
.btn:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; color: var(--accent-ink); padding: 5px 0; }
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-btn .icon { width: 15px; height: 15px; }
kbd { font-family: var(--font); font-size: 10px; font-weight: 450; color: var(--faint); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; line-height: 1.6; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 2px 7px; font-size: 10px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.tone-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.tone-rose { --tone: var(--rose); --tone-soft: var(--rose-soft); }
.tone-blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.tone-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.tone-teal { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: var(--tone-soft, var(--accent-soft)); color: var(--tone, var(--accent-ink)); flex: 0 0 auto; }
.avatar .icon { width: 19px; height: 19px; }
.avatar.large { width: 48px; height: 48px; border-radius: 14px; }
.avatar.large .icon { width: 25px; height: 25px; }
.avatar.small { width: 28px; height: 28px; border-radius: 8px; }
.avatar.small .icon { width: 15px; height: 15px; }
/* Shell */
.workspace { display: flex; height: 100dvh; min-height: 420px; overflow: hidden; }
.sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 27px 17px 14px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 11px; width: fit-content; }
.brand-mark { width: 28px; height: 28px; color: var(--accent-ink); }
.brand-name { font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: -.9px; line-height: 1; }
.brand .badge { margin-left: 1px; font-size: 8px; padding: 2px 5px; letter-spacing: .07em; background: transparent; color: var(--faint); }
.new-chat { margin: 29px 0 17px; justify-content: flex-start; background: var(--surface); min-height: 43px; border-color: var(--line-strong); box-shadow: var(--shadow-sm); padding-left: 13px; }
.new-chat .icon { width: 17px; height: 17px; }
.new-chat kbd { margin-left: auto; font-size: 9px; }
.nav-list { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 450; width: 100%; text-align: left; transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard); }
.nav-item .icon { width: 17px; height: 17px; }
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-item .nav-count { margin-left: auto; font-size: 10px; color: var(--faint); }
.nav-item kbd { margin-left: auto; font-size: 9px; }
.sidebar-divider { height: 1px; background: var(--line); margin: 19px 11px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; margin: 0 0 10px; }
.history-heading .eyebrow { font-size: 9px; letter-spacing: .1em; }
.history-list { overflow-y: auto; min-height: 70px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.history-group { margin: 14px 12px 6px; font-size: 10px; color: var(--faint); }
.history-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; margin-bottom: 3px; border-radius: 8px; color: var(--muted); font-size: 12px; min-height: 36px; }
.history-item > .icon { width: 14px; height: 14px; color: var(--faint); }
.history-item:hover { background: var(--surface-3); color: var(--ink); }
.history-item.active { background: var(--surface-3); color: var(--ink); }
.history-item .history-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.history-item .favorite-mini { width: 11px; height: 11px; color: var(--amber); fill: var(--amber); }
.history-empty { font-size: 11px; color: var(--faint); padding: 10px 12px; }
.local-card { margin: 18px 5px 15px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: linear-gradient(130deg, var(--accent-soft), transparent); }
.local-card-head { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--accent-ink); }
.local-card-head .icon { width: 15px; height: 15px; }
.local-card p { font-size: 10px; line-height: 1.7; color: var(--muted); margin: 6px 0 7px; }
.local-card .text-btn { font-size: 10px; padding: 0; }
.profile { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.profile-avatar { width: 31px; height: 31px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 11px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-caption { font-size: 9px; color: var(--faint); }
.main-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar { height: 69px; flex: 0 0 69px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 33px; border-bottom: 1px solid var(--line); background: var(--bg); z-index: 10; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 12px; min-width: 0; color: var(--muted); }
.breadcrumb > .icon { width: 15px; height: 15px; color: var(--faint); }
.breadcrumb .slash { color: var(--line-strong); margin: 0 3px; }
.breadcrumb-current { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.topbar-actions { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.topbar-actions .badge { background: transparent; font-size: 9px; }
.topbar-separator { width: 1px; height: 18px; background: var(--line); }
.mobile-menu { display: none; }
.main-content { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; scroll-behavior: smooth; position: relative; outline: none; }
.page { max-width: 1100px; margin: 0 auto; padding: 42px 48px 50px; animation: enter var(--motion-base) var(--ease-out) both; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.page-header h1 { font-size: 29px; letter-spacing: -.9px; font-weight: 650; line-height: 1.3; margin: 7px 0 9px; }
.page-header p { color: var(--muted); font-size: 13px; margin: 0; max-width: 570px; line-height: 1.8; }
.page-header .btn { margin-top: 17px; flex-shrink: 0; }
/* Welcome */
.home { max-width: 850px; margin: 0 auto; padding: clamp(30px, 6vh, 65px) 35px 28px; animation: enter var(--motion-reveal) var(--ease-out) both; }
.home-intro { text-align: center; margin-bottom: 27px; }
.greeting-mark { width: 43px; height: 43px; margin: 0 auto 16px; color: var(--accent); display: grid; place-items: center; }
.greeting-mark svg { width: 40px; height: 40px; }
.home h1 { font-family: var(--display); font-size: clamp(28px, 3vw, 37px); line-height: 1.3; letter-spacing: -1.3px; font-weight: 550; margin: 0 0 10px; }
.home-intro p { color: var(--muted); font-size: 13px; margin: 0; }
.assistant-strip { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin: 0 0 19px; }
.assistant-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; font-size: 11px; color: var(--muted); transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-out); }
.assistant-chip .icon { width: 14px; height: 14px; color: var(--tone); }
.assistant-chip:hover { border-color: var(--tone); transform: translateY(-1px); }
.assistant-chip.selected { background: var(--tone-soft); border-color: var(--tone); color: var(--ink); }
.assistant-chip.more { padding: 8px; background: transparent; border-color: transparent; }
.composer { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 17px; box-shadow: var(--shadow-md); padding: 17px 17px 11px; transition: border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard); position: relative; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md); }
.composer.dragging { border: 2px dashed var(--accent); background: var(--accent-soft); }
.composer textarea { display: block; width: 100%; min-height: 63px; max-height: 180px; resize: none; border: 0; background: transparent; padding: 1px 3px 10px; font-size: 14px; line-height: 1.75; outline: none; overflow-y: auto; scrollbar-width: thin; }
.composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: var(--faint); }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-left { display: flex; align-items: center; gap: 5px; min-width: 0; }
.composer-toolbar .icon-btn { width: 30px; height: 30px; }
.composer-toolbar .icon-btn .icon { width: 17px; height: 17px; }
.composer-divider { height: 16px; width: 1px; background: var(--line); margin: 0 5px; }
.assistant-select { display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; padding: 5px 7px; font-size: 10px; color: var(--muted); max-width: 210px; }
.assistant-select:hover { background: var(--surface-2); }
.assistant-select .icon { width: 13px; height: 13px; }
.assistant-select .assistant-dot { width: 6px; height: 6px; background: var(--tone); border-radius: 50%; }
.assistant-select .select-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-btn { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--on-accent); transition: background var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-out); flex-shrink: 0; }
.send-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.send-btn:disabled { background: var(--surface-3); color: var(--faint); opacity: 1; }
.send-btn .icon { width: 17px; height: 17px; stroke-width: 2; }
.composer-context { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9px; color: var(--faint); padding: 10px 5px 0; }
.composer-context span { display: inline-flex; align-items: center; gap: 5px; }
.composer-context .icon { width: 12px; height: 12px; }
.composer-context .char-limit.near { color: var(--warning); }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.attachment-list:empty { display: none; }
.attachment-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; max-width: 220px; font-size: 10px; }
.attachment-chip > .icon { width: 15px; height: 15px; color: var(--accent); }
.attachment-chip .attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip .icon-btn { width: 19px; height: 19px; }
.attachment-chip .icon-btn .icon { width: 12px; height: 12px; }
.attachment-note { font-size: 10px; color: var(--muted); margin: -2px 0 10px; }
.quick-heading { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 12px; }
.quick-heading h2 { font-family: var(--font); font-size: 11px; font-weight: 550; margin: 0; color: var(--muted); }
.quick-heading .text-btn { font-size: 10px; color: var(--faint); font-weight: 450; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.quick-card { text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 121px; display: flex; flex-direction: column; align-items: flex-start; transition: border-color var(--motion-base) var(--ease-standard), transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-standard); }
.quick-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-card > .icon { width: 18px; height: 18px; color: var(--tone); margin-bottom: 13px; }
.quick-card strong { font-size: 12px; font-weight: 550; margin-bottom: 5px; }
.quick-card span { font-size: 11px; color: var(--faint); line-height: 1.65; }
.studio-links { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 22px; }
.studio-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard); }
.studio-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.studio-link-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.studio-link-text strong { font-size: 12px; font-weight: 550; }
.studio-link-text small { font-size: 10px; color: var(--faint); }
.studio-link > .icon { width: 16px; height: 16px; color: var(--muted); }
.home-bottom { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 27px; font-size: 9px; color: var(--faint); }
.home-bottom .icon { width: 12px; height: 12px; }
.home-bottom button { font-size: 9px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 0; }
/* Assistant and prompt catalogs */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 7px 12px; border-radius: 8px; font-size: 11px; color: var(--muted); border: 1px solid transparent; }
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.inline-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 11px; min-width: 200px; }
.inline-search .icon { width: 15px; height: 15px; color: var(--faint); }
.inline-search input { border: 0; outline: none; background: transparent; width: 100%; font-size: 11px; }
.inline-search:focus-within { border-color: var(--accent); }
.assistant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.assistant-card { border: 1px solid var(--line); border-radius: 15px; padding: 22px; background: var(--surface); display: flex; flex-direction: column; transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard); position: relative; }
.assistant-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--tone); }
.assistant-card.selected { border-color: var(--accent); }
.assistant-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.assistant-card .card-label { font-size: 9px; color: var(--faint); }
.assistant-card h2 { font-size: 17px; letter-spacing: -.4px; font-weight: 650; margin-bottom: 8px; }
.assistant-card p { font-size: 12px; line-height: 1.85; color: var(--muted); margin-bottom: 17px; flex: 1; }
.skill-list { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 20px; }
.skill { font-size: 9px; color: var(--tone); background: var(--tone-soft); padding: 3px 7px; border-radius: 5px; }
.assistant-card-actions { display: flex; gap: 8px; align-items: center; }
.assistant-card-actions .btn { flex: 1; font-size: 10px; min-height: 34px; padding: 7px 9px; }
.assistant-card-actions .icon-btn { border: 1px solid var(--line); }
.catalog-note { display: flex; align-items: flex-start; gap: 9px; padding: 15px 17px; margin-top: 23px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: 10px; line-height: 1.8; background: var(--surface-2); }
.catalog-note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.prompt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.prompt-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 18px; display: flex; flex-direction: column; transition: box-shadow var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard); }
.prompt-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.prompt-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.prompt-card-top .eyebrow { font-size: 8px; letter-spacing: .08em; }
.prompt-card h2 { font-size: 13px; font-weight: 650; letter-spacing: -.2px; margin-bottom: 8px; }
.prompt-card p { font-size: 11px; line-height: 1.8; color: var(--muted); flex: 1; margin-bottom: 16px; }
.prompt-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prompt-author { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--faint); }
.prompt-card-bottom .text-btn { font-size: 10px; }
/* Conversation */
.chat-page { max-width: 850px; margin: 0 auto; padding: 24px 35px 22px; min-height: 100%; display: flex; flex-direction: column; }
.chat-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 27px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.chat-meta-left { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); }
.chat-meta-actions { display: flex; align-items: center; gap: 3px; }
.chat-meta .badge { font-size: 8px; }
.messages { display: flex; flex-direction: column; gap: 28px; padding-bottom: 28px; }
.message { display: flex; gap: 12px; align-items: flex-start; animation: enter var(--motion-base) var(--ease-out) both; }
.message.user { justify-content: flex-end; padding-left: 55px; }
.user-bubble { background: var(--surface-3); border-radius: 15px 15px 4px 15px; padding: 12px 17px; max-width: 640px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.assistant { padding-right: 15px; }
.message-body { flex: 1; min-width: 0; }
.message-heading { display: flex; align-items: center; gap: 8px; min-height: 28px; margin-bottom: 10px; }
.message-heading strong { font-size: 11px; font-weight: 600; }
.message-heading .badge { font-size: 8px; padding: 1px 5px; background: transparent; }
.message-heading time { font-size: 9px; color: var(--faint); margin-left: auto; }
.message-actions { display: flex; align-items: center; gap: 2px; margin-top: 13px; }
.message-actions .icon-btn { width: 28px; height: 28px; }
.message-actions .icon { width: 14px; height: 14px; }
.message-actions .action-divider { height: 13px; width: 1px; background: var(--line); margin: 0 6px; }
.message-actions .text-btn { font-size: 10px; color: var(--muted); margin-left: 6px; }
.message-actions .feedback-note { font-size: 9px; color: var(--faint); margin-left: 6px; }
.message-error { border: 1px solid var(--danger); background: var(--danger-soft); border-radius: 11px; padding: 15px; font-size: 12px; }
.message-error strong { display: flex; align-items: center; gap: 7px; color: var(--danger); margin-bottom: 6px; }
.message-error p { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.stopped-note { font-size: 10px; color: var(--warning); display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.stopped-note .icon { width: 13px; height: 13px; }
.typing { display: flex; align-items: center; gap: 5px; height: 30px; color: var(--muted); font-size: 11px; }
.typing-dots { display: inline-flex; gap: 3px; margin-right: 6px; }
.typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; } .typing-dots i:nth-child(3) { animation-delay: .3s; }
.streaming-caret { display: inline-block; width: 5px; height: 13px; background: var(--accent); margin-left: 3px; vertical-align: middle; animation: pulse .8s infinite; }
.chat-composer-wrap { margin-top: auto; position: sticky; bottom: 0; padding: 15px 0 0; background: linear-gradient(transparent, var(--bg) 15px); z-index: 5; }
.chat-composer-wrap .composer { border-radius: 14px; box-shadow: var(--shadow-sm); padding-top: 13px; }
.chat-composer-wrap textarea { min-height: 43px; max-height: 130px; font-size: 12px; }
.chat-disclaimer { text-align: center; color: var(--faint); font-size: 9px; padding-top: 9px; }
.followups { display: flex; flex-wrap: wrap; gap: 6px; margin: -9px 0 20px 40px; }
.followup { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; background: var(--surface); }
.followup:hover { border-color: var(--accent); color: var(--accent-ink); }
/* Safe markdown renderer */
.prose { font-size: var(--reader-size); line-height: 1.85; overflow-wrap: anywhere; }
.prose h2 { font-size: 18px; line-height: 1.45; letter-spacing: -.45px; font-weight: 650; margin: 20px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 14px; line-height: 1.6; font-weight: 650; margin: 19px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 22px; margin: 8px 0 15px; }
.prose li { padding-left: 3px; margin: 5px 0; }
.prose li::marker { color: var(--muted); }
.prose blockquote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; margin: 16px 0; border-radius: 0 8px 8px 0; color: var(--accent-ink); }
.prose code { font-family: var(--mono); font-size: .87em; background: var(--surface-3); padding: 2px 5px; border-radius: 4px; }
.prose .table-scroll { overflow-x: auto; margin: 15px 0; border: 1px solid var(--line); border-radius: 9px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 11px; line-height: 1.75; }
.prose th { background: var(--surface-2); font-weight: 600; text-align: left; }
.prose td, .prose th { padding: 9px 12px; border-bottom: 1px solid var(--line); min-width: 85px; }
.prose tr:last-child td { border-bottom: 0; }
.code-block { margin: 15px 0; border-radius: 10px; overflow: hidden; background: var(--code-bg); color: var(--code-ink); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 13px; border-bottom: 1px solid var(--code-line); font-family: var(--mono); font-size: 10px; color: var(--code-ink); }
.code-head button { color: var(--code-ink); display: flex; align-items: center; gap: 5px; font-family: var(--font); font-size: 9px; padding: 3px 5px; border-radius: 4px; }
.code-head button:hover { background: var(--code-hover); }
.code-head .icon { width: 12px; height: 12px; }
.prose pre { margin: 0; padding: 15px; overflow-x: auto; font-size: 11px; line-height: 1.8; scrollbar-width: thin; }
.prose pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
/* Favorites and empty states */
.empty-state { text-align: center; padding: 65px 25px; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--surface-2); }
.empty-state .empty-icon { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--accent-soft); color: var(--accent); border-radius: 17px; }
.empty-state .empty-icon .icon { width: 25px; height: 25px; }
.empty-state h2 { font-size: 19px; font-weight: 600; letter-spacing: -.4px; margin-bottom: 8px; }
.empty-state p { font-size: 12px; color: var(--muted); max-width: 380px; margin: 0 auto 20px; line-height: 1.8; }
.saved-list { display: grid; gap: 12px; }
.saved-card { display: flex; gap: 15px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.saved-card-body { flex: 1; min-width: 0; }
.saved-card h2 { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.saved-card p { font-size: 11px; color: var(--muted); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.saved-card-meta { display: flex; align-items: center; gap: 8px; font-size: 9px; color: var(--faint); }
.saved-card-actions { display: flex; gap: 4px; }
/* Settings */
.settings-layout { display: grid; grid-template-columns: 175px 1fr; gap: 35px; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; align-self: start; position: sticky; top: 25px; }
.settings-nav a { padding: 9px 12px; font-size: 11px; color: var(--muted); border-radius: 8px; }
.settings-nav a:hover { background: var(--surface-3); }
.settings-section { margin-bottom: 30px; scroll-margin-top: 25px; }
.settings-section h2 { font-size: 16px; font-weight: 650; letter-spacing: -.3px; margin-bottom: 6px; }
.settings-section > p { font-size: 11px; color: var(--muted); margin-bottom: 17px; }
.settings-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 0 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-label { font-size: 12px; font-weight: 550; }
.setting-help { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.7; max-width: 380px; }
.setting-row select, .setting-row input[type='text'] { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); padding: 7px 10px; font-size: 11px; max-width: 175px; min-width: 135px; }
.theme-options { display: flex; gap: 6px; }
.theme-option { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); min-width: 59px; }
.theme-option .icon { width: 16px; height: 16px; }
.theme-option.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.switch { position: relative; display: inline-flex; width: 35px; height: 21px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { width: 35px; height: 21px; border-radius: 20px; background: var(--line-strong); transition: background var(--motion-base) var(--ease-standard); pointer-events: none; }
.switch-track::after { content: ''; display: block; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); margin: 3px; box-shadow: 0 1px 3px var(--switch-shadow); transition: transform var(--motion-base) var(--ease-out); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--accent); outline-offset: 3px; }
.data-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.data-actions .btn { font-size: 10px; }
.storage-meter { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin: 13px 0 7px; }
.storage-meter span { display: block; height: 100%; background: var(--accent); min-width: 2px; }
.storage-caption { display: flex; justify-content: space-between; font-size: 9px; color: var(--faint); }
.settings-footer { font-size: 10px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; gap: 15px; }
/* Dialogs and search */
dialog { color: var(--ink); }
.modal, .search-modal { border: 1px solid var(--line); background: var(--surface); padding: 0; border-radius: 18px; box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); max-height: min(85dvh, 760px); overflow: auto; }
.modal::backdrop, .search-modal::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
.modal[open], .search-modal[open] { animation: modal-in var(--motion-base) var(--ease-out) both; }
.modal.wide { width: min(660px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 24px 25px 0; }
.modal-head h2 { font-size: 20px; letter-spacing: -.5px; font-weight: 650; margin: 4px 0 0; }
.modal-head .icon-btn { margin: -4px -6px 0 0; }
.modal-body { padding: 18px 25px 25px; }
.modal-body > p { font-size: 12px; color: var(--muted); line-height: 1.85; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 17px 25px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-actions .btn { font-size: 11px; }
.modal-field { display: block; font-size: 11px; font-weight: 550; margin-bottom: 7px; }
.modal-input { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); padding: 10px 12px; font-size: 12px; }
.modal textarea.modal-input { min-height: 130px; resize: vertical; line-height: 1.8; }
.modal-detail-top { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.modal-detail-top h3 { font-size: 17px; margin: 0 0 3px; }
.modal-detail-top p { font-size: 11px; color: var(--muted); margin: 0; }
.detail-prompts { display: grid; gap: 8px; margin-top: 12px; }
.detail-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; font-size: 11px; background: var(--surface-2); }
.detail-prompt:hover { border-color: var(--accent); }
.detail-prompt .icon { width: 15px; height: 15px; color: var(--accent); }
.assistant-option { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px; border-radius: 10px; text-align: left; margin-bottom: 4px; }
.assistant-option:hover { background: var(--surface-2); }
.assistant-option.selected { background: var(--tone-soft); }
.assistant-option-text { flex: 1; }
.assistant-option strong { display: block; font-size: 12px; font-weight: 550; }
.assistant-option span:not(.avatar) { font-size: 10px; color: var(--muted); }
.assistant-option > .icon { width: 16px; height: 16px; color: var(--accent); }
.about-grid { display: grid; gap: 12px; margin: 18px 0; }
.about-item { display: flex; gap: 11px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.about-item > .icon { color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.about-item strong { font-size: 11px; display: block; margin-bottom: 4px; }
.about-item p { font-size: 10px; color: var(--muted); margin: 0; line-height: 1.8; }
.shortcut-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.shortcut-row:last-child { border-bottom: 0; }
.search-modal { width: min(610px, calc(100vw - 32px)); margin-top: min(15vh, 130px); }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.search-input-row > .icon { color: var(--accent); width: 20px; height: 20px; }
.search-input-row input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 14px; }
.search-input-row input:focus-visible { outline: none; }
.search-results { padding: 10px; max-height: 390px; overflow-y: auto; }
.search-group-label { padding: 8px 10px 5px; font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.search-result { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 10px; border-radius: 9px; }
.search-result:hover, .search-result:focus { background: var(--accent-soft); outline: none; }
.search-result > .icon { width: 17px; height: 17px; color: var(--muted); }
.search-result-text { flex: 1; min-width: 0; }
.search-result strong { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { display: block; font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-footer { display: flex; justify-content: space-between; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 9px; color: var(--faint); background: var(--surface-2); }
.search-empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.toast-region { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(450px, calc(100vw - 30px)); }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 16px; background: var(--ink); color: var(--bg); border-radius: 11px; box-shadow: var(--shadow-md); font-size: 11px; animation: toast-in var(--motion-base) var(--ease-out) both; max-width: 100%; }
.toast .icon { width: 16px; height: 16px; }
.toast.error { background: var(--danger); color: var(--surface); }
.sidebar-scrim { display: none; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; padding: 40px; background: var(--bg); z-index: 300; text-align: center; }
.storage-banner { padding: 10px 15px; background: var(--warning-soft); color: var(--warning); font-size: 11px; border-radius: 9px; margin-bottom: 15px; }
.density-compact .message { gap: 10px; } .density-compact .messages { gap: 19px; } .density-compact .user-bubble { padding: 9px 14px; }
.font-large { --reader-size: 16px; } .font-large .user-bubble { font-size: 15px; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
@media (hover: none) {
  .assistant-card:hover, .quick-card:hover, .assistant-chip:hover, .btn:active, .send-btn:active { transform: none; }
}
@media (min-width: 1500px) { .home { padding-top: 9vh; } .page { padding-top: 55px; } }
@media (max-width: 1150px) {
  :root { --sidebar-w: 238px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .page { padding: 32px 28px; } .topbar { padding: 0 25px; }
  .assistant-grid { grid-template-columns: repeat(2, 1fr); }
  .prompt-grid { grid-template-columns: repeat(2, 1fr); }
  .home { padding-left: 28px; padding-right: 28px; }
  .assistant-chip { padding: 7px 9px; font-size: 9px; }
  .assistant-strip { gap: 5px; }
  .settings-layout { grid-template-columns: 140px 1fr; gap: 22px; }
  .setting-row { gap: 15px; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform var(--motion-base) var(--ease-out); padding-top: 25px; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(2px); z-index: 35; }
  .mobile-menu { display: inline-flex; }
  .topbar { height: 59px; flex-basis: 59px; padding: 0 17px; gap: 10px; }
  .breadcrumb { flex: 1; gap: 6px; } .breadcrumb > .icon, .breadcrumb .workspace-crumb, .breadcrumb .slash { display: none; }
  .breadcrumb-current { max-width: 260px; font-size: 11px; }
  .topbar-actions { gap: 5px; } .topbar-separator { margin: 0 3px; }
  .home { padding-top: 40px; max-width: 740px; }
  .home h1 { font-size: 34px; }
  .assistant-chip { font-size: 10px; padding: 8px 10px; }
  .page { max-width: 760px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; position: static; flex-wrap: wrap; margin-top: -10px; }
  .settings-nav a { font-size: 10px; padding: 6px 9px; background: var(--surface-2); }
  .chat-page { max-width: 760px; }
  body.sidebar-open { overflow: hidden; }
}
@media (max-width: 540px) {
  .studio-links { grid-template-columns: 1fr; }
  .topbar { padding: 0 11px; }
  .topbar-actions .badge { font-size: 8px; padding: 2px 5px; }
  .topbar-actions .help-top { display: none; }
  .breadcrumb-current { max-width: 160px; }
  .home { padding: 29px 17px 22px; }
  .greeting-mark { margin-bottom: 12px; width: 35px; height: 35px; }
  .greeting-mark svg { width: 33px; height: 33px; }
  .home h1 { font-size: 28px; letter-spacing: -.9px; }
  .home-intro { margin-bottom: 22px; } .home-intro p { font-size: 11px; }
  .assistant-strip { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 2px 1px 7px; margin-bottom: 11px; scrollbar-width: none; }
  .assistant-strip::-webkit-scrollbar { display: none; }
  .assistant-chip { flex-shrink: 0; font-size: 10px; }
  .composer { padding: 14px 12px 10px; border-radius: 14px; }
  .composer textarea { font-size: 16px; min-height: 77px; line-height: 1.6; }
  .composer textarea::placeholder { font-size: 12px; }
  .assistant-select { max-width: 155px; font-size: 9px; padding-left: 3px; padding-right: 3px; }
  .composer-divider { margin: 0 2px; }
  .composer-context { font-size: 8px; padding-top: 9px; }
  .composer-context .keyboard-hint { display: none; }
  .quick-heading { margin-top: 24px; }
  .quick-grid { grid-template-columns: 1fr; gap: 8px; }
  .quick-card { min-height: 74px; padding: 13px 14px 13px 47px; position: relative; }
  .quick-card > .icon { position: absolute; left: 15px; top: 17px; width: 17px; height: 17px; margin: 0; }
  .quick-card strong { font-size: 12px; margin-bottom: 3px; }
  .quick-card span { font-size: 11px; }
  .home-bottom { margin-top: 20px; font-size: 8px; flex-wrap: wrap; }
  .page { padding: 27px 17px 35px; }
  .page-header { margin-bottom: 22px; gap: 10px; }
  .page-header h1 { font-size: 25px; }
  .page-header p { font-size: 11px; }
  .page-header .btn { padding: 7px 9px; font-size: 10px; }
  .page-header .btn .icon { width: 14px; height: 14px; }
  .assistant-grid, .prompt-grid { grid-template-columns: 1fr; }
  .assistant-card { padding: 20px; }
  .assistant-card-top { margin-bottom: 14px; }
  .assistant-card p { font-size: 12px; }
  .filter-bar { gap: 12px; } .tabs { gap: 2px; }
  .tab { padding: 6px 9px; font-size: 10px; }
  .inline-search { width: 100%; }
  .chat-page { padding: 17px 13px 12px; }
  .chat-meta { margin-bottom: 21px; padding-bottom: 12px; }
  .chat-meta-left { font-size: 9px; gap: 6px; }
  .chat-meta-actions .icon-btn { width: 29px; height: 29px; }
  .chat-meta-actions .icon { width: 15px; height: 15px; }
  .message.user { padding-left: 25px; }
  .user-bubble { font-size: 12px; padding: 10px 13px; }
  .message.assistant { gap: 8px; padding-right: 0; }
  .message.assistant > .avatar { width: 25px; height: 25px; border-radius: 8px; }
  .message.assistant > .avatar .icon { width: 14px; height: 14px; }
  .message-heading { min-height: 25px; margin-bottom: 9px; }
  .message-heading time { display: none; }
  .prose { font-size: 13px; } .prose h2 { font-size: 16px; } .prose h3 { font-size: 13px; }
  .prose td, .prose th { padding: 8px; min-width: 80px; }
  .prose table { font-size: 10px; }
  .prose pre { font-size: 10px; padding: 12px; }
  .followups { margin-left: 33px; }
  .followup { font-size: 9px; }
  .chat-composer-wrap textarea { min-height: 43px; }
  .chat-disclaimer { font-size: 8px; }
  .settings-card { padding: 0 14px; }
  .setting-row { gap: 12px; padding: 15px 0; }
  .setting-label { font-size: 11px; } .setting-help { font-size: 9px; }
  .setting-row select, .setting-row input[type='text'] { min-width: 105px; max-width: 125px; font-size: 10px; }
  .theme-options { gap: 4px; } .theme-option { min-width: 42px; padding: 6px; font-size: 8px; }
  .settings-footer { flex-direction: column; gap: 5px; }
  .saved-card { padding: 14px; gap: 10px; }
  .saved-card-actions { flex-direction: column; }
  .modal-head { padding: 20px 20px 0; } .modal-body { padding: 16px 20px 20px; } .modal-actions { padding: 15px 20px; }
  .modal-head h2 { font-size: 18px; }
  .search-modal { margin-top: 8vh; }
  .search-footer { font-size: 8px; padding: 10px 14px; }
  .toast-region { bottom: 17px; }
  .font-large .prose { font-size: 15px; }
}
/* Patterns reused from site/: sticky header shadow, reveal, FAQ accordion, settings spy */
.topbar { transition: box-shadow var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard); }
.topbar.scrolled { border-bottom-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.reveal { transition: opacity var(--motion-reveal) var(--ease-out), translate var(--motion-reveal) var(--ease-out); }
.js .reveal:not(.in) { opacity: 0; translate: 0 10px; }
.reveal.in { opacity: 1; translate: 0 0; }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.faq-list { display: grid; gap: 9px; margin-top: 12px; }
.faq-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink); }
.faq-q .pm { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-size: 16px; font-weight: 500; transition: transform var(--motion-base) var(--ease-out), background var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard); }
.faq-item.open .faq-q .pm { transform: rotate(45deg); background: var(--accent); color: var(--on-accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--motion-base) var(--ease-standard); }
.faq-a .inner { padding: 0 15px 14px; font-size: 11px; color: var(--muted); line-height: 1.8; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .js .reveal:not(.in) { opacity: 1; transform: none; translate: none; }
}
@media print {
  :root, [data-theme='dark'] { color-scheme: light; --bg: #ffffff; --surface: #ffffff; --surface-2: #f5f5f5; --surface-3: #eeeeee; --ink: #111111; --muted: #444444; --faint: #666666; --line: #dddddd; --line-strong: #bbbbbb; --accent: #445533; --accent-soft: #eef2e9; --accent-ink: #334422; --on-accent: #ffffff; --code-bg: #f5f5f5; --code-ink: #111111; --code-line: #dddddd; --code-hover: #eeeeee; --overlay: transparent; --shadow-sm: none; --shadow-md: none; --shadow-lg: none; }
  body, .workspace, .main-shell, .main-content { height: auto; overflow: visible; display: block; }
  .sidebar, .topbar, .chat-composer-wrap, .message-actions, .chat-meta-actions, .followups, .toast-region, .sidebar-scrim { display: none !important; }
  .chat-page { max-width: none; padding: 0; } .message { break-inside: avoid; } .code-head button { display: none; }
}
