:root {
  --bg: #f5f7fc;
  --bg-2: #eef1f9;
  --surface: #ffffff;
  --surface-2: #f6f8fd;
  --glass: rgba(255, 255, 255, .66);
  --text: #0d1426;
  --muted: #5a6580;
  --line: rgba(13, 20, 38, .08);
  --line-2: rgba(13, 20, 38, .14);
  --brand: #4f7cff;
  --brand-2: #19c6c0;
  --warm: #ff8a4c;
  --shadow: 0 1px 2px rgba(13, 20, 38, .04), 0 12px 40px -12px rgba(30, 50, 110, .18);
  --shadow-lg: 0 30px 80px -20px rgba(30, 50, 110, .28);
  --r: 22px;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #060a13;
  --bg-2: #0a1020;
  --surface: #0e1527;
  --surface-2: #121b31;
  --glass: rgba(16, 24, 44, .62);
  --text: #e9edf7;
  --muted: #8f9ab5;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 50px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body);
  overflow-x: hidden; transition: background .35s, color .35s; -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
kbd { font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 16px; }
.wrap { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
[hidden] { display: none !important; }

/* ---------- Atmosphere ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; animation: drift 26s var(--ease) infinite alternate; }
.aurora span:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: -18vw; background: #6b8cff; }
.aurora span:nth-child(2) { width: 42vw; height: 42vw; right: -12vw; top: 4vw; background: #2ee6d6; animation-delay: -8s; opacity: .32; }
.aurora span:nth-child(3) { width: 36vw; height: 36vw; left: 30vw; top: 40vh; background: #ffad7a; animation-delay: -15s; opacity: .22; }
[data-theme='dark'] .aurora span { opacity: .22; }
[data-theme='dark'] .aurora span:nth-child(3) { opacity: .1; }
@keyframes drift { to { transform: translate3d(6vw, 8vh, 0) scale(1.15); } }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 16px; font-weight: 700; font-size: 15px; transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 13px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), #7a5cff 55%, var(--brand-2)); background-size: 200% 200%; box-shadow: 0 10px 30px -8px rgba(79, 124, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .25); animation: sheen 8s linear infinite; }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(79, 124, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .25); }
@keyframes sheen { 50% { background-position: 100% 50%; } }
.btn-ghost { background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line-2)); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(14px); font-size: 17px; transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line-2)); transform: translateY(-1px); }
.icon-btn-sm { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }
.link-btn { color: var(--brand); font-weight: 700; font-size: 14px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.theme-icon { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset -5px -3px 0 0 var(--text); transition: box-shadow .3s; }
[data-theme='dark'] .theme-icon { box-shadow: inset 0 0 0 8px #ffd27a; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 60; height: 74px; display: flex; align-items: center; gap: 24px; padding: 0 max(20px, calc((100vw - 1200px) / 2)); transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.topbar.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(20px) saturate(1.4); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 9px; background: linear-gradient(140deg, var(--brand), #7a5cff 60%, var(--brand-2)); box-shadow: 0 8px 20px -6px rgba(79, 124, 255, .6); }
.brand-mark i { width: 4px; border-radius: 3px; background: #fff; }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 17px; background: #ffc08f; }
.brand-mark i:nth-child(3) { height: 12px; }
.brand-word { font: 800 21px/1 var(--display); letter-spacing: -.03em; }
.brand-word b { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 4px; margin-left: auto; padding: 5px; border-radius: 14px; }
.main-nav a { padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--glass); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(14px); color: var(--muted); font-size: 14px; transition: border-color .2s; }
.search-trigger:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line-2)); }
.avatar-dot { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; background: linear-gradient(135deg, var(--warm), #ff5f8f); }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; min-height: calc(100vh - 74px); min-height: calc(100svh - 74px); padding: 30px 0 60px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); font-size: 13px; font-weight: 600; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.035em; margin: 0; }
.hero h1 { font-size: clamp(54px, 8.4vw, 116px); line-height: .9; font-weight: 800; margin: 22px 0 22px; }
.shine { background: linear-gradient(100deg, var(--brand) 0%, #8b5cf6 35%, var(--brand-2) 65%, var(--brand) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 7s linear infinite; padding-right: .05em; }
@keyframes shine { to { background-position: -220% 0; } }
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 540px; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 36px; margin: 44px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-stats dd { margin: 0; font: 800 38px/1.1 var(--display); letter-spacing: -.03em; }

.hero-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center; display: grid; place-items: center; container-type: inline-size; }
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-2); }
.ring-1 { inset: 4%; }
.ring-2 { inset: 16%; border-style: dashed; animation: spin 60s linear infinite; }
.ring-3 { inset: 28%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 70%); border: 0; filter: blur(10px); }
@keyframes spin { to { transform: rotate(360deg); } }
.orbiters { position: absolute; inset: 4%; animation: spin 48s linear infinite; }
.orbiters span { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; transform: rotate(calc(var(--i) * 45deg)) translateY(-42cqw) rotate(calc(var(--i) * -45deg)); }
.orbiters span b { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 14px; font: 700 18px var(--display); color: var(--hue); background: var(--surface); border: 1px solid color-mix(in srgb, var(--hue) 35%, var(--line)); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--hue) 60%, transparent); animation: spin 48s linear infinite reverse; }
.hero-robot { position: relative; width: 74%; height: auto; filter: drop-shadow(0 40px 50px rgba(20, 60, 120, .28)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
.glass-card { position: absolute; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(18px) saturate(1.4); border-radius: 18px; box-shadow: var(--shadow); }
.hero-chat { left: -6%; bottom: 8%; width: min(300px, 62%); padding: 14px 16px; transition: opacity .26s, transform .26s; }
.hero-chat.swap { opacity: 0; transform: translateY(6px); }
.hero-chat p { margin: 8px 0 6px; font-size: 14px; line-height: 1.45; }
.hc-head { display: flex; align-items: center; gap: 10px; }
.hc-head small, .hero-chip small { display: block; font-size: 11.5px; color: var(--muted); }
.hc-head b, .hero-chip b { font-size: 14px; }
.hc-glyph { --hue: #6d5cff; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--hue); transition: background .3s; }
.hc-typing { display: inline-flex; gap: 4px; }
.hc-typing i, .thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.hc-typing i:nth-child(2), .thinking i:nth-child(2) { animation-delay: .15s; }
.hc-typing i:nth-child(3), .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.hero-chip { right: -2%; top: 14%; display: flex; gap: 10px; align-items: center; padding: 12px 16px; }
.hero-chip > span:first-child { font-size: 20px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 50s linear infinite; }
.marquee-track span { display: flex; align-items: center; gap: 10px; font: 700 18px var(--display); color: var(--muted); white-space: nowrap; }
.marquee-track b { color: var(--hue); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 40px; }
.section-head > p { max-width: 420px; color: var(--muted); margin: 0; }
.section-head.center { justify-content: center; text-align: center; }
.eyebrow { display: inline-block; font: 700 12px/1 var(--mono); letter-spacing: .14em; color: var(--brand); margin-bottom: 14px; }
h2 { font-size: clamp(36px, 5vw, 60px); line-height: .98; font-weight: 800; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Model grid ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.model-card { --mx: 50%; --my: 0%; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 4px; padding: 22px; min-height: 230px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .4s var(--ease), border-color .3s, box-shadow .4s, opacity .8s var(--ease) var(--d, 0ms); }
.model-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(360px circle at var(--mx) var(--my), color-mix(in srgb, var(--hue) 18%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; }
.model-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--hue) 40%, var(--line)); box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--hue) 55%, transparent); }
.model-card:hover::before { opacity: 1; }
.model-card > * { position: relative; }
.mc-glyph { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; margin-bottom: 14px; color: #fff; font: 800 20px var(--display); background: linear-gradient(140deg, var(--hue), color-mix(in srgb, var(--hue) 55%, #fff)); box-shadow: 0 10px 24px -10px var(--hue); }
.mc-name { font: 800 21px/1.15 var(--display); letter-spacing: -.02em; }
.mc-tag { font: 600 11.5px var(--mono); color: var(--hue); letter-spacing: .02em; }
.mc-blurb { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.mc-go { margin-top: auto; padding-top: 14px; font-size: 13.5px; font-weight: 700; display: flex; gap: 6px; opacity: .7; transition: gap .25s, opacity .25s; }
.model-card:hover .mc-go { gap: 10px; opacity: 1; color: var(--hue); }

/* ---------- Subjects ---------- */
.subject-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.segmented { position: relative; display: flex; padding: 4px; border-radius: 15px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); }
.segmented button { position: relative; z-index: 1; height: 38px; padding: 0 18px; border-radius: 11px; font-size: 14px; font-weight: 700; color: var(--muted); transition: color .25s; }
.segmented button[aria-selected='true'] { color: var(--text); }
.seg-indicator { position: absolute; left: 4px; top: 4px; bottom: 4px; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); transition: transform .4s var(--ease), width .4s var(--ease); }
.filter-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 15px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.filter-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.filter-field input { border: 0; outline: 0; background: none; width: 170px; color: var(--text); }
.filter-sm { height: 40px; border-radius: 12px; }
.filter-sm input { width: 100%; font-size: 14px; }
.level-note { margin: -16px 0 22px; color: var(--muted); font-size: 15px; }
.level-note b { color: var(--text); }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.subject-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: rise .5s var(--ease) both; animation-delay: var(--d); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.subject-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--hue) 45%, var(--line)); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--hue) 70%, transparent); }
.sc-glyph { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; font: 800 18px var(--display); color: var(--hue); background: color-mix(in srgb, var(--hue) 13%, transparent); }
.sc-body b { display: block; font-size: 15.5px; }
.sc-body small { color: var(--muted); font-size: 13px; }
.sc-model { grid-column: 2 / 4; font: 600 11px var(--mono); color: var(--hue); margin-top: -6px; }
.sc-arrow { grid-row: 1; grid-column: 3; color: var(--muted); transition: transform .3s, color .3s; }
.subject-card:hover .sc-arrow { transform: translate(3px, -3px); color: var(--hue); }
.empty-note { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- Studio ---------- */
.studio-section { padding-bottom: 20px; }
.studio { --hue: #4f7cff; position: relative; display: grid; grid-template-columns: 290px 1fr; height: min(820px, calc(100vh - 110px)); height: min(820px, calc(100svh - 110px)); min-height: 600px; border-radius: 28px; overflow: hidden; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(24px) saturate(1.3); box-shadow: var(--shadow-lg); }
.studio::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 300px at 80% -10%, color-mix(in srgb, var(--hue) 16%, transparent), transparent 70%); transition: background .5s; }
.studio-side { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 50%, transparent); min-height: 0; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; font: 700 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.side-close { display: none; }
.side-list { list-style: none; margin: 0; padding: 0 2px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 3px; scrollbar-width: thin; }
.side-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 13px; text-align: left; transition: background .2s; }
.side-item:hover { background: color-mix(in srgb, var(--hue) 8%, transparent); }
.side-item.active { background: var(--surface); box-shadow: var(--shadow); }
.si-glyph { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font: 800 15px var(--display); color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, transparent); }
.side-item.active .si-glyph { color: #fff; background: var(--hue); }
.si-text { min-width: 0; flex: 1; }
.si-text b { display: block; font-size: 14px; }
.si-text small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-count { font: 600 11px var(--mono); padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--hue) 16%, transparent); color: var(--hue); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 10px 8px 2px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-dot.ok { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.status-dot.warn { background: #f59e0b; }

.studio-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.studio-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.open-side { display: none; }
.active-model { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.active-model small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-model b { font: 800 18px var(--display); letter-spacing: -.02em; }
.am-glyph { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; font: 800 18px var(--display); background: linear-gradient(140deg, var(--hue), color-mix(in srgb, var(--hue) 55%, #fff)); box-shadow: 0 8px 22px -8px var(--hue); transition: background .4s; }
.is-streaming .am-glyph { animation: glow 1.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--hue) 22%, transparent), 0 8px 22px -8px var(--hue); } }
.studio-actions { display: flex; gap: 6px; }
.mode-bar { display: flex; gap: 6px; padding: 10px 18px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.mode-bar::-webkit-scrollbar { display: none; }
.mode-bar button { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); transition: all .2s; }
.mode-bar button:hover { color: var(--text); }
.mode-bar button[aria-checked='true'] { color: #fff; background: var(--hue); border-color: var(--hue); box-shadow: 0 6px 18px -8px var(--hue); }
.context-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 20px; font-size: 13px; color: var(--muted); background: color-mix(in srgb, var(--hue) 5%, transparent); }
.context-bar b { color: var(--text); }
.context-bar .link-btn { font-size: 13px; color: var(--hue); flex: none; }

.chat-scroll { flex: 1; overflow-y: auto; padding: 24px clamp(16px, 4vw, 48px) 10px; scroll-behavior: smooth; scrollbar-width: thin; }
.chat-messages { display: flex; flex-direction: column; gap: 18px; max-width: 820px; margin: 0 auto; }
.chat-intro { text-align: center; padding: 20px 0 6px; }
.ci-glyph { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; color: #fff; font: 800 28px var(--display); background: linear-gradient(140deg, var(--hue), color-mix(in srgb, var(--hue) 55%, #fff)); box-shadow: 0 16px 40px -14px var(--hue); }
.chat-intro h3 { font-size: 26px; font-weight: 800; }
.chat-intro p { color: var(--muted); max-width: 460px; margin: 8px auto 0; font-size: 15px; }
.msg { display: flex; gap: 12px; animation: rise .4s var(--ease) both; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { max-width: 78%; padding: 12px 16px; border-radius: 20px 20px 6px 20px; color: #fff; background: linear-gradient(135deg, var(--hue), color-mix(in srgb, var(--hue) 70%, #000)); box-shadow: 0 10px 24px -14px var(--hue); }
.msg-user p { margin: 0; overflow-wrap: anywhere; }
.msg-avatar { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font: 800 14px var(--display); color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, transparent); }
.msg-ai .bubble { flex: 1; min-width: 0; }
.msg-name { display: block; font: 700 12px var(--mono); color: var(--hue); margin: 6px 0 4px; }
.md { font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 12px; }
.md h3, .md h4, .md h5, .md h6 { font-size: 18px; margin: 18px 0 8px; letter-spacing: -.02em; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--hue); font-weight: 700; }
.md strong { font-weight: 700; color: var(--text); }
.md code { font: 500 .88em var(--mono); padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--hue) 10%, var(--surface-2)); }
.md blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--hue); background: color-mix(in srgb, var(--hue) 6%, transparent); border-radius: 0 10px 10px 0; }
.md hr { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }
.code-block { margin: 0 0 14px; border-radius: 14px; overflow: hidden; background: #0b1020; border: 1px solid rgba(255, 255, 255, .08); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; font: 600 11.5px var(--mono); color: #8f9ab5; background: rgba(255, 255, 255, .04); }
.copy-code { font-size: 11.5px; color: #c8d1e8; }
.code-block pre { margin: 0; padding: 14px; overflow-x: auto; }
.code-block code { padding: 0; background: none; color: #e6ebf7; font-size: 13.5px; }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -3px; border-radius: 2px; background: var(--hue); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.thinking { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14px; }
.thinking i { background: var(--hue); }
.error-text { color: #e1495f; }
.msg-actions { display: flex; gap: 4px; margin-top: 2px; opacity: 0; transition: opacity .2s; }
.msg-ai:hover .msg-actions, .msg-ai:focus-within .msg-actions, .msg-ai:last-child .msg-actions { opacity: 1; }
.msg-actions button { font-size: 12.5px; color: var(--muted); padding: 5px 9px; border-radius: 8px; transition: background .2s, color .2s; }
.msg-actions button:hover { color: var(--text); background: color-mix(in srgb, var(--hue) 10%, transparent); }
.starter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 820px; margin: 26px auto 0; }
.starter { display: flex; gap: 10px; text-align: left; padding: 14px 16px; border-radius: 16px; font-size: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .25s var(--ease); }
.starter span { color: var(--hue); }
.starter:hover { border-color: color-mix(in srgb, var(--hue) 45%, var(--line)); transform: translateY(-2px); }

.composer { margin: 8px clamp(12px, 3vw, 40px) 0; padding: 12px 12px 10px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--hue) 60%, var(--line-2)); box-shadow: 0 0 0 5px color-mix(in srgb, var(--hue) 14%, transparent), var(--shadow); }
.composer textarea { width: 100%; resize: none; border: 0; outline: 0; background: none; font-size: 15.5px; line-height: 1.5; max-height: 200px; }
.composer-row { display: flex; align-items: center; gap: 10px; }
.composer-hint { font-size: 12px; color: var(--muted); margin-right: auto; }
.composer-hint kbd { font-size: 10px; padding: 2px 5px; }
.char-count { font: 500 11px var(--mono); color: var(--muted); }
.send-btn { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 800; background: var(--hue); box-shadow: 0 8px 20px -8px var(--hue); transition: transform .2s, opacity .2s; }
.send-btn:hover { transform: scale(1.06); }
.send-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.studio-foot { text-align: center; font-size: 11.5px; color: var(--muted); margin: 8px 0 12px; padding: 0 16px; }

/* ---------- How ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps li { padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.step-n { display: inline-block; font: 700 13px var(--mono); color: var(--brand); padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, transparent); margin-bottom: 18px; }
.steps h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; font-size: 15px; }
.cta-band { display: flex; align-items: center; gap: 24px; margin-top: 60px; padding: 24px 32px; border-radius: 28px; background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--brand-2) 14%, var(--surface))); border: 1px solid var(--line-2); }
.cta-band img { width: 110px; height: auto; margin: -40px 0 -24px; filter: drop-shadow(0 16px 20px rgba(20, 60, 120, .25)); }
.cta-band div { flex: 1; }
.cta-band h3 { font-size: 28px; font-weight: 800; }
.cta-band p { margin: 4px 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 50px 0 40px; margin-top: 80px; border-top: 1px solid var(--line); }
.footer p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(5, 9, 20, .5); backdrop-filter: blur(8px); animation: fade .2s ease; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.palette { width: min(620px, 100%); border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 62px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 18px; }
.palette-input input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; color: var(--text); }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 420px; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; cursor: pointer; }
.palette-list li[aria-selected='true'], .palette-list li:hover { background: color-mix(in srgb, var(--hue) 10%, transparent); }
.pl-glyph { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font: 800 15px var(--display); color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, transparent); }
.pl-text { flex: 1; min-width: 0; }
.pl-text b { display: block; font-size: 14.5px; }
.pl-text small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-type { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pl-empty { justify-content: center; color: var(--muted); cursor: default !important; }

.overlay#profileModal { place-items: center; padding-top: 16px; }
.modal { position: relative; width: min(520px, 100%); padding: 34px 30px 26px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop .35s var(--ease); overflow: hidden; }
.modal-progress { position: absolute; inset: 0 0 auto; height: 4px; background: var(--line); }
.modal-progress span { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s var(--ease); }
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal-mascot { width: 72px; height: auto; margin-bottom: 10px; }
.modal h2 { font-size: 32px; }
.modal-sub { color: var(--muted); margin: 8px 0 22px; }
.form-step { display: none; }
.form-step.active { display: block; animation: rise .4s var(--ease); }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--surface-2); transition: all .2s; }
.choice span { font-size: 26px; margin-bottom: 4px; }
.choice b { font-size: 15px; }
.choice small { font-size: 11.5px; color: var(--muted); text-align: center; }
.choice:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line-2)); }
.choice.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.field em { font-weight: 400; font-style: normal; color: var(--muted); }
.field input { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); outline: 0; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.finish { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: color-mix(in srgb, var(--brand-2) 10%, var(--surface-2)); }
.finish > span { font-size: 30px; }
.finish p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.form-error { color: #e1495f; font-size: 13.5px; min-height: 20px; margin: 4px 0 0; }
.modal-actions { display: flex; justify-content: space-between; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 150; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--bg); background: var(--text); box-shadow: var(--shadow-lg); transition: all .35s var(--ease); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .search-label, .search-trigger kbd { display: none; }
  .search-trigger { padding: 0; width: 42px; justify-content: center; }
}
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .main-nav { position: absolute; top: 74px; left: 12px; right: 12px; flex-direction: column; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: all .25s var(--ease); }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { padding: 12px 14px; }
  .top-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 20px; text-align: left; }
  .hero-stage { max-width: 440px; order: -1; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .studio { grid-template-columns: 1fr; height: calc(100svh - 96px); border-radius: 22px; }
  .studio-side { position: absolute; inset: 0 auto 0 0; width: min(300px, 86%); z-index: 5; background: var(--surface); transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
  .studio.side-open .studio-side { transform: none; }
  .side-close, .open-side { display: grid; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .cta-band img { margin: -50px 0 0; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 28px); }
  .hide-sm, .composer-hint, .char-count { display: none; }
  .hero-stats { gap: 24px; }
  .hero-stats dd { font-size: 30px; }
  .hero-chat { left: 0; width: 70%; }
  .hero-chip { display: none; }
  .starter-grid { grid-template-columns: 1fr; }
  .subject-tools, .filter-field, .filter-field input { width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 0 8px; }
  .msg-user .bubble { max-width: 88%; }
  .studio-section .wrap { width: calc(100% - 16px); }
  .modal { padding: 30px 20px 22px; }
  .choice-grid { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================
   UX layer: scroll progress, notebook, focus mode,
   follow-ups, focus timer, progress dashboard
   ===================================================== */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: transform .12s linear; }

/* studio header tools */
.studio-actions { align-items: center; }
.nb-toggle { position: relative; }
.nb-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font: 700 10.5px/1 var(--body); color: #fff; background: var(--hue); box-shadow: 0 0 0 2px var(--surface); }
#focusToggle[aria-pressed='true'] { color: #fff; background: var(--hue); border-color: var(--hue); }
#textSize { font: 800 13px var(--display); }

/* focus mode: single column, no distractions */
.studio { transition: grid-template-columns .4s var(--ease); }
.studio.focus { grid-template-columns: 0 1fr; }
.studio.focus .studio-side { visibility: hidden; border: 0; padding: 0; overflow: hidden; }
.studio.focus .studio-main .chat-scroll { padding-inline: clamp(16px, 12vw, 190px); }
.studio.focus .studio-foot { display: none; }
.studio.focus .open-side { display: none; }

/* chat comfort */
.chat-messages { font-size: calc(1rem * var(--chat-fs, 1)); }
.msg time, .msg-name time { font: 500 11px var(--body); color: var(--muted); opacity: .8; margin-left: 6px; }
.msg-user .bubble time { display: block; text-align: right; color: rgba(255, 255, 255, .75); margin: 4px 0 0; }
.edit-msg { display: block; margin: 4px 0 0 auto; font-size: 12px; color: rgba(255, 255, 255, .8); opacity: 0; transition: opacity .2s; }
.msg-user:hover .edit-msg, .edit-msg:focus-visible { opacity: 1; }
.edit-msg:hover { color: #fff; text-decoration: underline; }
.msg-actions button.is-saved { color: var(--hue); font-weight: 700; }
.followups { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.followups button { height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--hue); border: 1px solid color-mix(in srgb, var(--hue) 35%, var(--line-2)); background: color-mix(in srgb, var(--hue) 6%, transparent); transition: background .2s, transform .2s, color .2s; }
.followups button:hover { background: var(--hue); color: #fff; transform: translateY(-1px); }
.to-bottom { position: absolute; left: 50%; bottom: 128px; z-index: 5; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 18px; color: var(--hue); animation: pop .3s var(--ease); }
.to-bottom:hover { background: var(--hue); color: #fff; }

/* focus timer */
.focus-timer { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 3px 4px 3px 4px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; }
.focus-timer button { width: 26px; height: 26px; border-radius: 50%; font-size: 11px; color: var(--hue); }
.focus-timer button:hover { background: color-mix(in srgb, var(--hue) 12%, transparent); }
.focus-timer output { min-width: 46px; text-align: center; font: 700 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.focus-timer select { border: 0; background: none; font-size: 12px; color: var(--muted); cursor: pointer; padding: 0 2px; }
.focus-timer.running { border-color: var(--hue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hue) 12%, transparent); }
.focus-timer.running output { color: var(--hue); }
.context-bar { flex-wrap: wrap; }
.context-bar > span:first-child { flex: 1 1 200px; }

/* notebook drawer */
.notebook { position: absolute; z-index: 20; top: 0; right: 0; bottom: 0; width: min(380px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2); box-shadow: -30px 0 60px -30px rgba(10, 20, 50, .35); transform: translateX(104%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
.notebook.open { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.nb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.nb-head b { display: block; font: 800 18px var(--display); }
.nb-head small { color: var(--muted); font-size: 12.5px; }
.nb-head-actions { display: flex; gap: 6px; }
.nb-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.note { --hue: var(--brand); padding: 14px 14px 10px; border-radius: 16px; border: 1px solid var(--line); border-left: 3px solid var(--hue); background: var(--surface-2); }
.note header { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.note-model b { color: var(--hue); }
.note-q { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
.note-a { max-height: 150px; overflow: hidden; font-size: 14px; position: relative; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.note:hover .note-a, .note:focus-within .note-a { max-height: 420px; overflow-y: auto; -webkit-mask-image: none; mask-image: none; transition: max-height .4s var(--ease); }
.note footer { display: flex; gap: 4px; margin-top: 6px; }
.note footer button { font-size: 12.5px; color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.note footer button:hover { color: var(--text); background: color-mix(in srgb, var(--hue) 10%, transparent); }
.nb-empty { margin: auto; text-align: center; color: var(--muted); padding: 30px 20px; }
.nb-empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* shortcuts */
.help-modal { width: min(480px, 100%); }
.keys { margin: 0; display: grid; gap: 2px; }
.keys > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.keys > div:last-child { border: 0; }
.keys dt { flex: none; display: flex; gap: 4px; align-items: center; }
.keys dd { margin: 0; color: var(--muted); font-size: 14px; text-align: right; }

/* progress dashboard */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.dash { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-areas: 'goal tiles tiles' 'chart chart models'; gap: 14px; }
.dash-goal { grid-area: goal; display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto; align-items: center; gap: 18px; padding: 24px; position: relative; }
.goal-ring { width: 112px; height: 112px; transform: rotate(-90deg); grid-area: 1 / 1; }
.goal-ring circle { fill: none; stroke-width: 10; }
.goal-ring .ring-bg { stroke: var(--line-2); }
.goal-ring .ring-fg { stroke: url(#none); stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.ring-text { grid-area: 1 / 1; width: 112px; height: 112px; display: grid; place-content: center; text-align: center; }
.ring-text b { font: 800 34px/1 var(--display); }
.ring-text small { color: var(--muted); font-size: 12px; }
	.goal-copy { grid-column: 2; grid-row: 1; }
.goal-copy h3 { font-size: 20px; margin-bottom: 4px; }
.goal-copy p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.goal-pick { display: inline-flex; padding: 3px; gap: 2px; border-radius: 99px; border: 1px solid var(--line-2); }
.goal-pick button { min-width: 36px; height: 28px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); }
.goal-pick button[aria-pressed='true'] { background: var(--brand); color: #fff; }
.dash-tiles { grid-area: tiles; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { padding: 20px; display: flex; flex-direction: column; gap: 2px; }
.tile small { color: var(--muted); font-size: 13px; font-weight: 600; }
.tile b { font: 800 40px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12.5px; }
.dash-chart { grid-area: chart; padding: 22px 24px 16px; }
.dash-models { grid-area: models; padding: 22px 24px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.card-head h3 { font-size: 18px; }
.card-head small { color: var(--muted); font-size: 12.5px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 8px; height: 150px; align-items: end; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--brand) 30%, transparent); transition: height .7s var(--ease), background .2s; }
.bar:hover i { background: var(--brand); }
.bar.today i { background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.bar span { font-size: 11px; color: var(--muted); }
.mu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mu-list li { --hue: var(--brand); }
.mu-list li button { width: 100%; display: grid; grid-template-columns: 28px 1fr 56px 26px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; text-align: left; font-size: 14px; transition: background .2s; }
.mu-list li button:hover { background: color-mix(in srgb, var(--hue) 9%, transparent); }
.mu-glyph { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, transparent); font: 800 13px var(--display); }
.mu-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-bar { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.mu-bar i { display: block; height: 100%; background: var(--hue); border-radius: 9px; }
.mu-list b { text-align: right; font-variant-numeric: tabular-nums; }
.mu-empty { color: var(--muted); font-size: 14px; padding: 8px; }
.dash-foot { text-align: right; margin: 12px 4px 0; }
.dash-foot .link-btn { font-size: 13px; color: var(--muted); }

@media (max-width: 960px) {
  .dash { grid-template-columns: 1fr 1fr; grid-template-areas: 'goal goal' 'tiles tiles' 'chart chart' 'models models'; }
  .dash-tiles { grid-template-columns: repeat(2, 1fr); }
  .studio.focus { grid-template-columns: 1fr; }
  .studio.focus .studio-side { display: none; }
}
@media (max-width: 640px) {
  .dash-goal { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .goal-copy { grid-column: 1; grid-row: 2; }
  .goal-copy { margin-top: 0; }
  .studio-actions { flex-wrap: wrap; justify-content: flex-end; }
  .focus-timer { margin-left: 0; }
  .to-bottom { bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress, .notebook, .studio, .ring-fg, .bar i { transition: none; }
}
