/* MIT License — Copyright (c) 2026 Decentralized Science Labs
   GL1F Crypto platform design system.
   Type: Inter (optical sizes) for text and display, Instrument Serif italic for accents, JetBrains Mono for data. */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..800&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400..600&display=swap");

:root {
  color-scheme: light;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-display: clamp(2.5rem, 4.6vw - 0.4rem, 5.5rem);
  --t-h1: clamp(2.4rem, 1.4rem + 2.8vw, 4.4rem);
  --t-h2: clamp(1.95rem, 1.35rem + 1.7vw, 3.1rem);
  --t-h3: clamp(1.2rem, 1.08rem + .35vw, 1.4rem);
  --t-lead: clamp(1.1rem, 1rem + .4vw, 1.32rem);
  --t-body: 1.0625rem;
  --t-small: .9rem;
  --t-micro: .75rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px; --s10: 64px; --s11: 80px; --s12: 112px; --s13: 144px;
  --rail: 256px; --topbar: 68px; --max: 1680px; --gutter: clamp(18px, 2.4vw, 44px);
  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;

  --bg: #ffffff; --bg-2: #f6f6f7; --bg-3: #efeff1; --surface: #ffffff; --surface-2: #fafafb;
  --ink: #09090b; --ink-2: #3f3f46; --muted: #6e6e78; --faint: #a1a1aa;
  --line: #ececee; --line-2: #e0e0e5;
  --accent: #2f5bff; --accent-hover: #1e46e8; --accent-ink: #ffffff; --accent-soft: #eef2ff; --accent-line: #cdd7ff;
  --violet: #7c4dff; --pink: #ff2e7e; --amber: #ffab1a; --red: #e0142f;
  --good: #0c8f4f; --good-soft: #e8f6ee; --bad: #d92d3a; --bad-soft: #fdecee; --warn: #9a5b00; --warn-soft: #fff5e1;
  --hype: linear-gradient(100deg, #2f5bff 0%, #7c4dff 45%, #ff2e7e 100%);
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, .05);
  --shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 12px 32px -12px rgba(9, 9, 11, .12);
  --shadow-lg: 0 40px 100px -30px rgba(9, 9, 11, .28);
  --grid: rgba(9, 9, 11, .045);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --bg-2: #111113; --bg-3: #18181b; --surface: #0e0e11; --surface-2: #141418;
  --ink: #fafafa; --ink-2: #d4d4d8; --muted: #a1a1aa; --faint: #6f6f78;
  --line: #1c1c21; --line-2: #2a2a31;
  --accent: #6d8bff; --accent-hover: #8aa2ff; --accent-ink: #ffffff; --accent-soft: #151b33; --accent-line: #2b3a74;
  --good: #34d17b; --good-soft: #0e2819; --bad: #ff5d68; --bad-soft: #2b1115; --warn: #ffb44a; --warn-soft: #2a1f0e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .8);
  --grid: rgba(255, 255, 255, .04);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/1.65 var(--font-sans); letter-spacing: -0.006em;
  font-optical-sizing: auto; font-kerning: normal; font-variant-ligatures: common-ligatures contextual;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a, li a, .legal a, .fineprint a { color: var(--accent); }
p a:hover, li a:hover { color: var(--accent-hover); }
img, svg, canvas { max-width: 100%; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 650; text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1.02; letter-spacing: -0.042em; }
h2 { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -0.034em; }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -0.02em; font-weight: 620; }
h4 { font-size: 1rem; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.display { font-size: var(--t-display); line-height: 1; letter-spacing: -0.048em; font-weight: 680; text-wrap: initial; }
.display .line { display: block; white-space: nowrap; }
.display .line.serif { font-size: 1.12em; line-height: 1.06; letter-spacing: -0.012em; font-weight: 400; margin-top: .02em; padding: 0 .06em .08em 0; }
.lead { font-size: var(--t-lead); line-height: 1.6; color: var(--ink-2); letter-spacing: -0.011em; max-width: 58ch; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.012em; }
h1 .serif, h2 .serif { font-size: 1.06em; line-height: inherit; letter-spacing: -0.012em; }
.hype-text { background: var(--hype); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--t-small); }
.xsmall { font-size: var(--t-micro); }
.tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Eyebrow, meta, pills ---------- */
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s6); font: 500 var(--t-micro)/1.4 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow b { color: var(--ink); font-weight: 600; }
.eyebrow.rule::after { content: ""; flex: 1; height: 1px; background: var(--line-2); margin-left: var(--s2); }
.meta { font: 500 .8rem/1.7 var(--font-mono); letter-spacing: .01em; color: var(--muted); }
.meta span + span::before { content: "·"; margin: 0 .65em; color: var(--faint); }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 var(--t-micro)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 18%, transparent); }
.status.pending::before { background: var(--amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 22%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 500 .76rem/1.3 var(--font-mono); max-width: 100%; overflow-wrap: anywhere; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.pill.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-soft); }
.pill.ok::before { background: var(--good); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.pill.warn::before { background: var(--warn); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); }
.pill.bad::before { background: var(--bad); }
.pill.busy { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill.busy::before { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font: 500 .72rem/1.4 var(--font-mono); white-space: nowrap; }
.tag.blue { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); background: var(--good-soft); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); }

/* ---------- Buttons ---------- */
.btn, .btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 600 .94rem/1 var(--font-sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, color .15s ease;
}
.btn:hover, .btn2:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.dark:hover { opacity: .9; }
.btn.hype { background: var(--hype); color: #fff; border: 0; box-shadow: 0 12px 32px -12px rgba(124, 77, 255, .7); }
.btn.hype:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.btn.small, .btn2 { min-height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 10px; }
.btn2 { background: var(--bg-2); border-color: var(--line); }
.btn:disabled, .btn2:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 18px; height: 18px; pointer-events: none; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: none; }

/* ---------- Platform shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s5) var(--s4) var(--s4); border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; scrollbar-width: none; z-index: 30; }
.rail::-webkit-scrollbar { display: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.025em; white-space: nowrap; }
.brand .word b { font-weight: 750; }
.brand .word span { font-weight: 500; color: var(--muted); margin-left: .28em; }
.brand .mark img { display: block; height: 15px; width: auto; }
.brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.brand .powered { font: 500 .62rem/1 var(--font-mono); letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.footer .tagline { margin: var(--s5) 0 var(--s2); font-family: var(--font-serif); font-style: italic; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.brand .chip { font: 600 .6rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.rail .brand { padding: 6px 10px var(--s6); }
.rail-cta { margin: 0 4px var(--s5); }
.rail-cta .btn { width: 100%; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a, .rail-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--ink-2); font-weight: 520; font-size: .95rem; letter-spacing: -0.012em; text-decoration: none; white-space: nowrap; }
.rail-nav a:hover { background: var(--bg-2); color: var(--ink); }
.rail-nav a[aria-current="page"] { background: var(--bg-2); color: var(--ink); font-weight: 600; }
.rail-nav svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.rail-nav a[aria-current="page"] svg { color: var(--ink); }
.rail-label { margin: var(--s6) 12px var(--s2); font: 500 .68rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.rail-foot { margin-top: auto; padding-top: var(--s5); display: flex; flex-direction: column; gap: var(--s3); border-top: 1px solid var(--line); }
.rail-foot .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px; }
.rail-foot .net { font: 500 .72rem/1.4 var(--font-mono); color: var(--muted); }
.rail-foot .social { display: flex; gap: 14px; padding: 0 6px; font-size: .82rem; }
.rail-foot .social a { color: var(--muted); text-decoration: none; }
.rail-foot .social a:hover { color: var(--ink); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 25; height: var(--topbar); display: flex; align-items: center; gap: var(--s4); padding: 0 var(--gutter); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.topbar .brand { display: none; }
.search { flex: 1; max-width: 620px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--muted); }
.search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 .95rem var(--font-sans); padding: 0; box-shadow: none; }
.search kbd { font: 500 .7rem var(--font-mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.page { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar)); }
.page > .footer { margin-top: auto; }
.bottom-nav { display: none; }
@media (max-width: 1180px) {
  .shell { grid-template-columns: 80px minmax(0, 1fr); }
  .rail { padding: var(--s5) 12px; align-items: center; }
  .rail .brand .brand-text, .rail-label, .rail-nav a span, .rail-cta .cta-text, .rail-foot .net, .rail-foot .social { display: none; }
  .rail .brand { padding: 6px 0 var(--s6); }
  .rail-cta { margin: 0 0 var(--s5); }
  .rail-cta .btn { width: 48px; padding: 0; }
  .rail-nav a { justify-content: center; padding: 12px; }
  .rail-foot .row { justify-content: center; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { gap: 10px; }
  .topbar .brand { display: inline-flex; }
  .search { display: none; }
  .topbar .actions .hide-sm { display: none; }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 10px; color: var(--muted); text-decoration: none; font: 600 .68rem/1 var(--font-sans); }
  .bottom-nav a[aria-current="page"] { color: var(--ink); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .page { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body { font-size: 1rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 128px) 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s6); align-items: end; margin-bottom: var(--s9); }
.section-head h2 { max-width: 22ch; }
.section-head .eyebrow { margin-bottom: var(--s5); }
.section-head .lead { margin: var(--s5) 0 0; }
.section-head .side-link { font-weight: 600; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.section-head .side-link:hover { color: var(--accent); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; margin-bottom: var(--s7); } }
.grid { display: grid; gap: var(--s4); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s7); }
.card.soft { background: var(--bg-2); border-color: transparent; }
.card.dashed { border-style: dashed; border-color: var(--line-2); }
.card h3 { margin-bottom: var(--s3); }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
/* Cards are columns so every card's buttons sit on the same bottom line across a row. */
.card { display: flex; flex-direction: column; }
.card > :is(.btn, .btn2, button, a.btn) { align-self: flex-start; }
.card > :last-child:is(.row, .card-actions, .btn, .btn2, .go) { margin-top: auto; }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: var(--s3); }
.card .num { display: block; margin-bottom: var(--s8); font: 500 var(--t-micro)/1 var(--font-mono); letter-spacing: .14em; color: var(--faint); }
.lift { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.bg-grid { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px; }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 64px); align-items: end; padding: clamp(40px, 5.5vw, 88px) 0 var(--s7); }
.hero > :last-child { display: flex; flex-direction: column; justify-content: flex-end; }
.hero .display { margin: 0 0 var(--s6); }
.hero .lead { margin: 0 0 var(--s8); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s7); }
.fineprint { display: flex; gap: 12px; align-items: flex-start; max-width: 60ch; margin: var(--s6) 0 0; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); font-size: .86rem; line-height: 1.55; color: var(--muted); }
.fineprint strong { color: var(--ink); font-weight: 600; }
@media (max-width: 1060px) { .hero { grid-template-columns: 1fr; align-items: start; } .hero .display { font-size: clamp(2.2rem, 10.4vw, 5rem); } }
.car-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; }
.car-stage::before { content: ""; position: absolute; inset: 12% 6% 4%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 22%, transparent), transparent); filter: blur(24px); opacity: .55; pointer-events: none; }
.car-poster, .car3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.car-poster { object-fit: contain; transition: opacity .7s ease; pointer-events: none; user-select: none; }
.car-poster.dark { display: none; }
[data-theme="dark"] .car-poster.light { display: none; }
[data-theme="dark"] .car-poster.dark { display: block; }
.car3d { opacity: 0; transition: opacity .7s ease; outline: none; }
.car-stage.ready .car3d { opacity: 1; }
.car-stage.ready .car-poster { opacity: 0; }
.car3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.car3d.dragging .car3d-canvas { cursor: grabbing; }
.car3d:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 18px; }
.car3d-hotspots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hs { position: absolute; left: 0; top: 0; will-change: transform, opacity; transition: opacity .25s linear; }
.hs .inner { display: flex; align-items: center; gap: 8px; transform: translate(-6px, -6px); }
.hs.left .inner { flex-direction: row-reverse; transform: translate(calc(-100% + 6px), -6px); }
.hs .dot { opacity: 0; transition: opacity .25s ease; width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent); }
.hs .tag { opacity: 0; transform: translateX(-4px); transition: opacity .25s ease, transform .25s ease; display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.hs .tag b { font: 600 10.5px/1.2 var(--font-mono); letter-spacing: .12em; color: var(--ink); }
.hs .tag small { font: 500 11px/1.2 var(--font-mono); color: var(--muted); }
.car3d:hover .hs .tag, .car3d:focus-visible .hs .tag, .car3d:hover .hs .dot, .car3d:focus-visible .hs .dot { opacity: 1; transform: none; }
.car3d.compact .hs .tag small { display: none; }
@media (hover: none) { .car3d-hotspots { display: none; } }
.car3d-hint { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); margin: 0; display: flex; gap: 18px; font: 500 .68rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); pointer-events: none; white-space: nowrap; transition: color .2s ease; }
.car3d.revving .car3d-hint { color: var(--accent); }
.car-note { margin: var(--s2) 0 0; text-align: center; font: 500 .72rem/1.5 var(--font-mono); color: var(--faint); }

/* ---------- Market ticker ---------- */
.ticker { position: relative; overflow: hidden; margin: var(--s4) 0 0; padding: var(--s3) 0; border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; gap: var(--s2); width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); text-decoration: none; font: 600 .82rem/1 var(--font-sans); white-space: nowrap; }
.ticker a:hover { border-color: var(--accent); color: var(--accent); }
.ticker a span { font: 500 .7rem/1 var(--font-mono); color: var(--faint); letter-spacing: .06em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Home cards ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: var(--s7); }
.tabs button { border: 0; background: transparent; color: var(--muted); font: 600 .9rem/1 var(--font-sans); letter-spacing: -0.01em; padding: 11px 18px; border-radius: 10px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.q-card { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6); text-decoration: none; color: inherit; }
.q-card .top { display: flex; align-items: center; gap: var(--s3); }
.q-card .avatar { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--bg-2); font-size: 1.35rem; }
.q-card .venue { font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.q-card .venue b { display: block; color: var(--ink); font: 650 .95rem/1.25 var(--font-sans); letter-spacing: -0.01em; }
.q-card .q { margin: 0; color: var(--ink); font-size: 1.06rem; line-height: 1.45; font-weight: 560; letter-spacing: -0.015em; }
.q-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.q-card .chips span { font: 500 .72rem/1 var(--font-mono); padding: 6px 8px; border-radius: 7px; background: var(--bg-2); color: var(--ink-2); }
.q-card .go { font-weight: 650; font-size: .9rem; color: var(--accent); }
.model-card { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.model-card .head { display: flex; gap: var(--s3); align-items: center; min-width: 0; }
.model-card img, .model-card .ph { width: 52px; height: 52px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); object-fit: cover; }
.model-card .title { min-width: 0; }
.model-card .title b { display: block; font-weight: 650; letter-spacing: -0.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-card .title span { font: 500 .74rem/1.4 var(--font-mono); color: var(--muted); }
.model-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; }
.model-card .stats div { padding: 10px; border-radius: 10px; background: var(--bg-2); }
.model-card .stats b { display: block; font: 600 .95rem/1.2 var(--font-mono); }
.model-card .stats span { font-size: .72rem; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-lg); min-height: 176px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.stat-band > div { padding: var(--s7); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat-band b { display: block; font-size: clamp(2rem, 1.4rem + 1.6vw, 3.2rem); line-height: 1; letter-spacing: -0.045em; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-band span { display: block; margin-top: var(--s3); font: 500 var(--t-micro)/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.steps-line { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 1180px) { .steps-line { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); } }
.steps-line .card { padding: var(--s6); }
.steps-line .card::before { content: ""; position: absolute; left: var(--s6); right: var(--s6); top: -1px; height: 2px; border-radius: 2px; background: var(--hype); }
.spec { border-top: 1px solid var(--line); }
.spec-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s6); padding: var(--s5) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.spec-row dt { font: 500 var(--t-micro)/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec-row dd { margin: 0; }
.spec-row .v { font-weight: 620; letter-spacing: -0.015em; }
.spec-row .muted { font-size: .95rem; }
@media (max-width: 760px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }
.faq { max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s4); align-items: center; padding: var(--s5) 0; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--font-sans); color: var(--faint); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); max-width: 70ch; padding-bottom: var(--s3); }
.disclaimer { border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); border-radius: var(--r-xl); padding: var(--s8); color: var(--ink-2); }
.disclaimer h2 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); margin-bottom: var(--s5); }
.disclaimer ul { margin: 0 0 var(--s4); padding-left: 1.2em; columns: 2 360px; column-gap: var(--s9); }
.disclaimer li { margin: 0 0 var(--s3); break-inside: avoid; }
.disclaimer strong { color: var(--ink); }
.footer { margin-top: var(--s12); padding: var(--s9) 0 var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-small); }
.page > :nth-last-child(2) { margin-bottom: var(--s12); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: var(--s8); margin-bottom: var(--s8); }
.footer h4 { margin-bottom: var(--s4); font: 500 .7rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.footer a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.legal { font-size: .78rem; line-height: 1.65; color: var(--faint); border-top: 1px solid var(--line); padding-top: var(--s5); margin: 0; max-width: 120ch; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Modal & help ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(5, 6, 9, .58); backdrop-filter: blur(6px); }
.modal-card { width: min(640px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--s8); }
.modal-card h2 { font-size: 1.9rem; margin-bottom: var(--s5); }
.modal-card ul { padding-left: 1.2em; color: var(--ink-2); }
.modal-card li { margin: 8px 0; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: var(--s6); }
.help { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 700 10.5px/1 var(--font-sans); cursor: help; vertical-align: middle; flex: none; text-transform: none; letter-spacing: 0; }
.help:hover, .help[aria-expanded="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.popover { position: fixed; z-index: 110; width: min(340px, calc(100vw - 24px)); background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 16px 18px; font-size: .88rem; line-height: 1.55; }
.popover h4 { margin: 0 0 6px; }
.popover p { margin: 0 0 8px; }
.popover p:last-child { margin: 0; }
.popover .ex { font: 500 .78rem/1.5 var(--font-mono); color: var(--muted); background: var(--bg-2); border-radius: 8px; padding: 8px 10px; }

/* ---------- Studio ---------- */
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s6); flex-wrap: wrap; padding: var(--s9) 0 var(--s6); }
.app-head h1 { font-size: clamp(2.2rem, 1.5rem + 2vw, 3.6rem); }
.app-head p { margin: var(--s3) 0 0; color: var(--muted); max-width: 64ch; }
.stepper { position: sticky; top: var(--topbar); z-index: 20; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.stepper-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); padding: var(--s3) 0; overflow-x: auto; scrollbar-width: none; }
.stepper-inner::-webkit-scrollbar { display: none; }
@media (max-width: 1100px) { .stepper-inner { display: flex; } }
.create-tab { min-width: 176px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-family: var(--font-sans); }
.create-tab:hover { background: var(--bg-2); color: var(--ink); }
.create-tab.active { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); color: var(--ink); }
.create-tab .step { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 600 .76rem/1 var(--font-mono); background: var(--bg-3); color: var(--muted); }
.create-tab.active .step { background: var(--ink); color: var(--bg); }
.create-tab.done .step { background: var(--good-soft); color: var(--good); }
.create-tab.done .step::before { content: "✓"; }
.create-tab.done .step span { display: none; }
.tab-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tab-title { font-weight: 620; font-size: .94rem; letter-spacing: -0.012em; color: inherit; }
.tab-sub { font: 500 .7rem/1.3 var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-main { padding: var(--s7) 0 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(20px, 2.6vw, 40px); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: var(--s3); }
.panel-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem); margin-bottom: var(--s3); }
.panel-head p { margin: 0; color: var(--muted); max-width: 70ch; }
.panel-head .eyebrow { margin-bottom: var(--s4); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 2.4vw, 40px); align-items: start; }
@media (max-width: 1200px) { .split { grid-template-columns: 1fr; } }
.side { position: sticky; top: calc(var(--topbar) + 96px); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1200px) { .side { position: static; } }
.recipe-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); background: var(--surface-2); }
.recipe-card h3 { margin-bottom: var(--s4); font: 500 var(--t-micro)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.block { padding-top: var(--s7); margin-top: var(--s7); border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; margin-top: var(--s4); padding-top: var(--s2); }
.block > h3 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s5); font-size: 1.1rem; }
.block > h3 .n { font: 500 .7rem/1 var(--font-mono); color: var(--faint); letter-spacing: .12em; }
.fgrid { display: grid; gap: var(--s5) var(--s5); margin-top: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.field { display: flex; flex-direction: column; min-width: 0; }
label, .label { display: flex; align-items: center; margin-bottom: var(--s2); font: 600 .74rem/1.3 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field .hint { margin-top: 7px; color: var(--muted); font-size: .78rem; line-height: 1.45; min-height: 1em; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 .95rem/1.3 var(--font-sans); letter-spacing: -0.01em; transition: border-color .15s ease, box-shadow .15s ease; }
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
input[type="date"], input[type="datetime-local"] { font-family: var(--font-mono); font-size: .88rem; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1 1 auto; width: 0; min-width: 3rem; }
.inline select { flex: 0 0 7.5rem; }
label.check { display: flex; align-items: center; gap: 10px; margin: var(--s4) 0 0; text-transform: none; letter-spacing: -0.005em; font-size: .92rem; font-weight: 500; color: var(--ink-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { appearance: none; border: 1px solid transparent; background: transparent; cursor: pointer; padding: 9px 16px; min-height: 40px; border-radius: 10px; font: 600 .88rem/1 var(--font-sans); letter-spacing: -0.01em; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg .count { font: 500 .74rem var(--font-mono); color: var(--faint); margin-left: 4px; }
.seg.compact { display: flex; }
.seg.compact button { flex: 1; padding: 9px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 500 .74rem/1 var(--font-mono); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.chips button:hover { border-color: var(--accent); color: var(--accent); }
.formula { margin: var(--s4) 0 0; padding: 13px 15px; border-radius: 12px; background: var(--bg-2); font: 500 .8rem/1.6 var(--font-mono); color: var(--ink-2); overflow-wrap: anywhere; }
.chart { margin-top: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); padding: var(--s4); }
.chart svg { display: block; width: 100%; height: auto; }
.fgroups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-height: 460px; overflow: auto; padding-right: 4px; }
.fgroup h4 { margin: 0 0 6px; font-size: .8rem; color: var(--ink-2); display: flex; justify-content: space-between; }
.fitem { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 6px; border-radius: 6px; text-transform: none; letter-spacing: 0; font: 500 .78rem/1.3 var(--font-mono); color: var(--ink-2); }
.fitem:hover { background: var(--bg-2); }
.fitem input { width: 15px; height: 15px; min-height: 15px; }
.fitem.off { color: var(--faint); }
.feature-tools { margin: 4px 0 12px; gap: 8px; }
.feature-tools input { flex: 1 1 220px; min-height: 40px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: var(--s4); }
.actions-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.plan-line { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; color: var(--muted); }
.run { margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--bg-2); }
.run-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.progress { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; margin-top: 12px; }
.progress .bar { height: 100%; width: 0; background: var(--hype); border-radius: 999px; transition: width .25s ease; }
.run p { margin: 10px 0 0; font-size: .84rem; color: var(--muted); }
.alert { margin-top: var(--s4); padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 32%, transparent); color: var(--bad); font-size: .9rem; overflow-wrap: anywhere; }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 32%, transparent); color: var(--warn); }
.alert.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink-2); }
.result { margin-top: var(--s7); padding-top: var(--s7); border-top: 1px solid var(--line); }
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: var(--s5); }
.result-head h3 { margin: 0; font-size: 1.4rem; }
.stat-grid { display: grid; overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stat { padding: 16px 18px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat .v { display: block; font: 600 1.32rem/1.2 var(--font-mono); letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat .v.long { font-size: 1rem; }
.stat .v.good { color: var(--good); }
.stat .v.bad { color: var(--bad); }
.stat .k { display: flex; align-items: center; margin-top: 6px; font-size: .76rem; color: var(--muted); }
#bt-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { #bt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 18px; font-size: .88rem; }
.kv .k { color: var(--muted); display: flex; align-items: center; }
.kv .v { color: var(--ink); font-family: var(--font-mono); font-size: .8rem; overflow-wrap: anywhere; }
.next-grid { display: grid; gap: 14px; margin-top: var(--s6); }
.next-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.next-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.next-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: var(--s6); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.next-card p { margin: 0 0 8px; font-size: .92rem; color: var(--muted); }
.next-card.accent { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-color: var(--accent-line); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; font: 500 .78rem/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { background: var(--bg-2); color: var(--muted); font-weight: 600; position: sticky; top: 0; }
.tbl th:first-child, .tbl td:first-child, .tbl td.name { text-align: left; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.best td { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.live-chart { margin-top: var(--s4); }
.chart-box { margin-top: var(--s5); }
.chart-box > .curve { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); padding: var(--s4); }
.curve svg { display: block; width: 100%; height: auto; overflow: visible; }
.curve text { fill: var(--muted); font: 500 11px/1 var(--font-mono); }
.curve .legend-text { fill: var(--ink-2); font: 600 11.5px/1 var(--font-sans); }
.curve .grid { stroke: var(--line); stroke-width: 1; }
.curve .axis { stroke: var(--line-2); stroke-width: 1; }
.curve .marker { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 4; }
.live-chart .run-top { margin-bottom: var(--s2); flex-wrap: wrap; }
.legend { display: inline-flex; align-items: center; gap: 12px; font: 500 .72rem/1 var(--font-mono); color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.legend .lg-train { background: #94a3b8; } .legend .lg-val { background: #2f5bff; } .legend .lg-best { background: #ff2e7e; }
.source-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--bg-2); }
.source-bar > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.source-bar strong { color: var(--ink); overflow-wrap: anywhere; }
.empty { margin-top: var(--s5); padding: var(--s7); border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: var(--bg-2); }
.empty p { margin: 0 0 14px; }
label.file { position: relative; overflow: hidden; margin: 0; text-transform: none; letter-spacing: 0; }
label.file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: var(--s5); padding: 36px 20px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: var(--bg-2); text-transform: none; letter-spacing: 0; cursor: pointer; text-align: center; font-size: .92rem; }
.drop:hover, .drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.list-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: var(--s4); }
.list-tools label.check { margin: 0; }
.list-tools .btn2 { margin-left: auto; }
.model-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; margin-top: 14px; }
.model-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.model-row.selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.model-row img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); object-fit: cover; }
.model-row .meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-family: var(--font-sans); }
.model-row .meta strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-row .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.listing { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; align-items: start; }
.icon-edit { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.icon-edit img { width: 96px; height: 96px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); }
.listing-fields { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 600px) { .listing { grid-template-columns: 1fr; } .icon-edit { flex-direction: row; } }
.tx-list { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tx-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); font-size: .84rem; }
.tx-list li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); justify-self: center; }
.tx-list li.run::before { background: var(--accent); animation: pulse 1.2s infinite; }
.tx-list li.ok::before { background: var(--good); }
.tx-list li.fail::before { background: var(--bad); }
.tx-list a { font: 500 .76rem var(--font-mono); text-decoration: none; color: var(--accent); }
.locked { display: flex; gap: 14px; align-items: flex-start; margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: var(--bg-2); }
.locked .ic { font-size: 1.3rem; line-height: 1; }
.locked p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.signal { padding: var(--s6); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-2); }
.signal.on { border-color: var(--accent-line); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.signal-main { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.signal-label { font-size: .84rem; font-weight: 600; color: var(--muted); }
.signal-value { font: 600 3rem/1 var(--font-mono); letter-spacing: -0.05em; color: var(--ink); }
.signal-decision { padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--bg-3); color: var(--muted); }
.signal.on .signal-decision { background: var(--hype); color: #fff; }
.prob-track { position: relative; height: 10px; margin-top: 18px; border-radius: 999px; background: var(--bg-3); }
.prob-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: var(--faint); transition: width .4s ease; }
.signal.on .prob-fill { background: var(--hype); }
.prob-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); left: 50%; }
.signal p { margin: 12px 0 0; font-size: .86rem; color: var(--muted); }
.confusion { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px; max-width: 440px; font-size: .82rem; }
.confusion .h { font: 600 .7rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: grid; place-items: center; padding: 4px; }
.confusion .c { border-radius: 10px; padding: 12px; text-align: center; border: 1px solid var(--line); }
.confusion .c b { display: block; font: 600 1.2rem var(--font-mono); color: var(--ink); }
.confusion .c.ok { background: var(--good-soft); }
.confusion .c.no { background: var(--bad-soft); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 100px; gap: 12px; align-items: center; font-size: .86rem; }
.bar-row .track { height: 10px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; background: var(--accent); }
.bar-row .fill.good { background: var(--good); }
.bar-row .fill.bad { background: var(--bad); }
.bar-row .fill.warn { background: var(--amber); }
.bar-row .n { font-family: var(--font-mono); text-align: right; color: var(--ink); }
.detailsCard { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 18px; }
.detailsCard > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 15px 0; font-weight: 620; letter-spacing: -0.012em; }
.detailsCard > summary::-webkit-details-marker { display: none; }
.detailsCard > summary::after { content: "+"; font: 400 1.3rem/1 var(--font-sans); color: var(--faint); }
.detailsCard[open] > summary::after { content: "−"; }
.detailsCard[open] { padding-bottom: 16px; }
.detailsCard > summary .sumHint { margin-left: auto; font: 500 .76rem var(--font-mono); color: var(--muted); }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-axis { stroke: var(--line-2); stroke-width: 1; }
.c-text { fill: var(--muted); font: 500 11px var(--font-mono); }
.c-text-strong { fill: var(--ink-2); font: 600 11.5px var(--font-mono); }
.c-accent { stroke: var(--accent); fill: none; }
.c-violet { stroke: var(--violet); fill: none; }
.c-pink { stroke: var(--pink); fill: none; }
.c-muted { stroke: var(--faint); fill: none; }
.c-ink { stroke: var(--ink); fill: none; }
.c-good { stroke: var(--good); fill: none; }
.c-bad { stroke: var(--bad); fill: none; }
.f-accent { fill: var(--accent); }
.f-good { fill: var(--good); }
.f-bad { fill: var(--bad); }
.f-muted { fill: var(--faint); }
.f-ink { fill: var(--ink); }
.f-violet { fill: var(--violet); }
.f-band { fill: var(--accent); fill-opacity: .07; }

/* ---------- Docs ---------- */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); padding-top: var(--s9); }
.toc { position: sticky; top: calc(var(--topbar) + 24px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.toc a { color: var(--muted); text-decoration: none; font-size: .9rem; padding: 7px 12px; border-radius: 9px; }
.toc a:hover { color: var(--ink); background: var(--bg-2); }
.docs { max-width: 980px; }
.docs section { padding: var(--s8) 0 var(--s9); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--topbar) + 16px); }
.docs section:last-child { border-bottom: 0; }
.docs h1 { margin-bottom: var(--s6); }
.docs h2 { font-size: clamp(1.7rem, 1.25rem + 1.3vw, 2.5rem); margin-bottom: var(--s5); }
.docs h3 { margin: var(--s7) 0 var(--s3); }
.docs p, .docs li { color: var(--ink-2); max-width: 72ch; }
.docs li { margin-bottom: var(--s2); }
.addr { font: 500 .8rem var(--font-mono); overflow-wrap: anywhere; color: var(--accent); }
.bigstat { display: flex; flex-direction: column; gap: 6px; }
.bigstat b { font: 600 clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem)/1.1 var(--font-mono); letter-spacing: -0.035em; color: var(--ink); }
.bigstat span { font-size: .8rem; color: var(--muted); display: flex; align-items: center; }
@media (max-width: 960px) { .docs-layout { grid-template-columns: 1fr; } .toc { position: static; flex-direction: row; flex-wrap: wrap; } }

@media (max-width: 600px) {
  .panel { border-radius: 18px; }
  .signal-value { font-size: 2.3rem; }
  .model-row { grid-template-columns: 36px minmax(0, 1fr); }
  .model-row > .btn2, .model-row > .btn { grid-column: 1 / -1; justify-self: start; }
  .create-tab { min-width: 150px; }
  .hide-xs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Monetization, marketplace, admin ---------- */
.admin-note { margin: 0 0 var(--s4); padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink-2); font-size: .92rem; line-height: 1.55; max-width: 90ch; }
.admin-note strong { color: var(--ink); }
.sub-h { margin: var(--s6) 0 var(--s2); font-size: 1rem; font-weight: 650; letter-spacing: -0.012em; display: flex; align-items: center; }
.plan-list { display: flex; flex-direction: column; gap: 8px; margin: var(--s3) 0; }
.plan-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.plan-row .plan-n { align-self: center; min-width: 52px; font: 600 .74rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan-f { display: flex; flex-direction: column; gap: 6px; margin: 0; text-transform: none; letter-spacing: 0; font: 500 .78rem/1.2 var(--font-sans); color: var(--muted); }
.plan-f input { width: 130px; min-height: 40px; }
.plan-row label.check { margin: 0 0 10px; }
.rules-grid { margin: var(--s2) 0 var(--s8); }
.market-item .card-actions { align-items: center; justify-content: space-between; }
.market-item .price { font: 650 1rem/1 var(--font-mono); letter-spacing: -0.02em; color: var(--ink); }
.detail-card { width: min(820px, 100%); }
.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: var(--s5); }
.detail-head img, .detail-head .ph { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); flex: none; }
.detail-head h2 { font-size: 1.6rem; margin: 0 0 4px; }
.detail-head p { margin: 0; }
.detail-actions { margin-top: var(--s5); }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-card .admin-body { padding-bottom: var(--s3); }

/* ---------- Sharing ---------- */
.share-panel { position: fixed; z-index: 130; width: min(360px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-lg); }
.share-panel strong { font-size: .95rem; letter-spacing: -0.01em; }
.share-url { display: flex; gap: 8px; }
.share-url input, input.share-link { min-height: 38px; padding: 8px 10px; font: 500 .8rem/1.2 var(--font-mono); background: var(--bg-2); }
.share-url input { flex: 1; min-width: 0; }
.share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.share-grid a { display: block; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .88rem; }
.share-grid a:hover { border-color: var(--accent); color: var(--accent); }
input.share-link { width: 100%; margin: 4px 0 0; }
.footer-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 var(--s5); font-size: .85rem; }
.footer-share span { font: 500 .7rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-right: 4px; }
.footer .footer-share a { display: inline; padding: 0; }

/* ---------- Save after training ---------- */
.save-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5) var(--s7); margin: 0 0 var(--s6); padding: var(--s6) var(--s7); border-radius: var(--r-xl); border: 1px solid var(--accent-line); background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, #ff2e7e 7%, var(--surface))); }
.save-card h3 { margin: 0 0 6px; font-size: 1.35rem; }
.save-card p { margin: 0; max-width: 70ch; color: var(--ink-2); font-size: .95rem; }
.save-text { flex: 1 1 420px; min-width: 0; }
.save-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
#tr-save-status.saved { color: var(--good); font-weight: 600; }

/* ---------- Per-model pages ---------- */
.model-hero { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s6); align-items: start; padding: var(--s10) 0 var(--s8); }
.model-icon { width: 72px; height: 72px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); object-fit: cover; }
.model-hero h1 { font-size: clamp(2.2rem, 1.5rem + 2vw, 3.6rem); margin: 0 0 var(--s3); }
.model-question { margin: 0 0 var(--s5); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.7rem); line-height: 1.12; max-width: 30ch; }
.model-spec { max-width: 1100px; }
.model-spec .spec-row { grid-template-columns: 200px minmax(0, 1fr) 0; }
.model-spec dd.v { overflow-wrap: anywhere; }
@media (max-width: 600px) { .model-hero { grid-template-columns: 1fr; } }
/* ---------- Early alpha badge: brand (sidebar, phone header, footer) and top bar (tablet) ---------- */
.alpha { display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 999px; background: var(--hype); color: #fff; font: 650 .56rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 16px -8px rgba(124, 77, 255, .8); }
.brand.stacked { align-items: flex-start; }
.brand.stacked .mark { margin-top: 1px; }
.brand-text > .alpha { align-self: flex-start; margin-top: 3px; }
.brand-top { display: flex; align-items: center; gap: 10px; }
.topbar-alpha { display: none; flex: none; }
@media (max-width: 1180px) and (min-width: 761px) { .topbar-alpha { display: inline-flex; } }
/* ---------- Licenses ---------- */
.license-note { margin-top: var(--s3); padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--t-small); line-height: 1.55; }
.license-note:empty { display: none; }
.license-note b { display: block; font-weight: 650; color: var(--ink); }
.license-note p { margin: 6px 0 0; }
.license-note .lic-meta { display: block; margin-top: 8px; color: var(--muted); font: 500 .72rem/1.45 var(--font-mono); }
.tbl.lic-table { width: 100%; table-layout: auto; }
.tbl.lic-table th, .tbl.lic-table td { text-align: left; vertical-align: top; white-space: normal; }
.tbl.lic-table td:first-child { width: 44px; color: var(--muted); font-family: var(--font-mono); white-space: nowrap; }
.tbl.lic-table td:nth-child(2) { font-family: var(--font-sans); font-weight: 600; white-space: nowrap; }
.tbl.lic-table td:nth-child(3) { white-space: nowrap; }
.tbl.lic-table td:nth-child(3) code { white-space: nowrap; font-size: .78rem; }
.tbl.lic-table td:nth-child(4) { min-width: 260px; font-family: var(--font-sans); font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); }
.lic-table .def { display: none; margin-left: 8px; vertical-align: 1px; }
.lic-table tr.is-default .def { display: inline-flex; }
.lic-table tr.is-off td { opacity: .45; }
.footer a.brand { display: inline-flex; align-items: center; margin: 0; }
/* Small phones: a slightly tighter top bar so the car mark keeps its room next to the actions. */
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .topbar .brand { gap: 8px; }
  .topbar .actions { gap: 6px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .topbar .actions .btn.small { padding-left: 12px; padding-right: 12px; }
}
.brand .mark img { object-fit: contain; }
@media (max-width: 374px) { [data-page="studio"] .topbar .brand .mark { display: none; } }
/* Sidebar brand in one row, as on the cover: car, GL1F Crypto, EARLY ALPHA; "powered by GenesisL1" below. */
@media (min-width: 1181px) {
  :root { --rail: 272px; }
  .rail { padding-left: 12px; padding-right: 12px; }
  .rail .brand { padding: 6px 4px var(--s6); gap: 10px; }
  .rail .brand .mark img { height: 13px; }
  .rail .brand .word { font-size: .96rem; }
  .rail .brand .brand-top { gap: 7px; }
  .rail .brand .alpha { height: 17px; padding: 0 7px; font-size: .5rem; letter-spacing: .12em; }
}
.footer .legal a { display: inline; padding: 0; }
.lic-warn { margin: 10px 0 0 !important; padding: 10px 12px; border-radius: var(--r-xs); background: var(--warn-soft); color: var(--warn); font-weight: 560; }
/* ---------- Legal pages ---------- */
.legal-doc { max-width: 78ch; margin: var(--s9) 0 var(--s10); }
.legal-doc h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 var(--s4); }
.legal-doc h2 { font-size: 1.25rem; letter-spacing: -0.015em; margin: var(--s8) 0 var(--s3); }
.legal-doc p, .legal-doc li { color: var(--ink-2); }
.legal-doc ol, .legal-doc ul { padding-left: 1.4em; }
.legal-doc li + li { margin-top: 6px; }
.legal-doc .legal-meta { margin-top: var(--s8); font-size: var(--t-small); color: var(--muted); }
/* No scroll anchoring: steps that render after a switch must not drag the page down (Safari has none either). */
html { overflow-anchor: none; }
