/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #faf8f4;
  --bg-alt: #f2eee8;
  --surface: #ffffff;
  --ink: #1b1727;
  --ink-2: #4d4860;
  --ink-3: #6f6a82;
  --line: #e3ddd3;
  --accent: #7a1fa8;
  --accent-ink: #ffffff;
  --accent-soft: #f1e4f8;
  --good: #0f7a4d;
  --bad: #b3261e;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --fn: #b0246f;
  --fp: #9aa3b5;
  --cm-ok: #e6f0fb;
  --cm-ok-ink: #17406f;
  --cm-err: #fbe3ee;
  --cm-err-ink: #8a1553;
  --shadow: 0 1px 2px rgba(27, 23, 39, .05), 0 8px 24px rgba(27, 23, 39, .06);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #13101c; --bg-alt: #181424; --surface: #1e1a2b;
    --ink: #f1eef7; --ink-2: #c5bfd6; --ink-3: #9c95b1; --line: #302a42;
    --accent: #c98bf0; --accent-ink: #1b1027; --accent-soft: #2c2140;
    --good: #4ccb93; --bad: #ff8a80;
    --series-1: #3987e5; --series-2: #d95926;
    --fn: #e0569c; --fp: #6c7488;
    --cm-ok: #223a5c; --cm-ok-ink: #b9d6f7; --cm-err: #43203a; --cm-err-ink: #ffc4e0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13101c; --bg-alt: #181424; --surface: #1e1a2b;
  --ink: #f1eef7; --ink-2: #c5bfd6; --ink-3: #9c95b1; --line: #302a42;
  --accent: #c98bf0; --accent-ink: #1b1027; --accent-soft: #2c2140;
  --good: #4ccb93; --bad: #ff8a80;
  --series-1: #3987e5; --series-2: #d95926;
  --fn: #e0569c; --fp: #6c7488;
  --cm-ok: #223a5c; --cm-ok-ink: #b9d6f7; --cm-err: #43203a; --cm-err-ink: #ffc4e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); max-width: 22ch; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; text-decoration: none; line-height: 1.2;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-small { padding: 8px 14px; font-size: .85rem; background: var(--ink); color: var(--bg); white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
:root[data-theme="dark"] .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-moon { display: block; }
  :root:not([data-theme="light"]) .i-sun { display: none; }
}

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 68% 34%, #7a1fa8 0 24%, #cdb7ee 26%); flex: none; }
.nav-links { display: flex; gap: 4px; margin-inline: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { padding: 6px 12px; border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a.is-active { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.progress { height: 2px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }
@media (max-width: 860px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding-block: 10px 0; row-gap: 6px; }
  .nav-actions { margin-left: auto; }
  .nav-links { order: 3; width: 100%; margin: 0 -20px; padding: 0 16px 8px; width: calc(100% + 40px); }
  html { scroll-padding-top: 110px; }
}

/* ---------- Hero (always dark, like a microscope field) ---------- */
.hero { background: radial-gradient(1200px 600px at 85% 30%, #2a1840 0%, #0f0c18 60%); color: #f4f0fa; padding: clamp(48px, 8vw, 104px) 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #d2b5f0; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 3.8vw, 4rem); line-height: 1.05; letter-spacing: -.02em; }
.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); color: #cfc8de; max-width: 56ch; margin: 22px 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-primary { background: #c98bf0; color: #1b1027; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .35); color: #f4f0fa; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 36px; margin: 44px 0 0; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-stats dt { font-size: .78rem; color: #a79fbb; order: 2; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dd { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.1; font-weight: 500; }
.hero-stats small { font-family: var(--font-body); font-size: .8rem; color: #a79fbb; font-weight: 400; }
.hero-art { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hero-art img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .5); animation: drift 9s ease-in-out infinite alternate; }
.hero-art img:nth-child(odd) { animation-duration: 11s; animation-direction: alternate-reverse; }
.hero-art img:nth-child(3n) { animation-duration: 13s; }
@keyframes drift { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { grid-template-columns: repeat(8, 1fr); gap: 8px; order: -1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--bg-alt); }
.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.section-lede { color: var(--ink-2); max-width: 68ch; margin-top: 16px; font-size: 1.05rem; }
.sub { margin-top: 56px; font-size: 1.45rem; }
.note { font-size: .88rem; color: var(--ink-3); margin: 14px 0 0; max-width: 75ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 28px; align-items: start; }
.two-col.even { grid-template-columns: 1fr 1fr; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 26px; border-left: 4px solid var(--accent); }
.callout h3 { margin-bottom: 10px; }
.callout p { color: var(--ink-2); font-size: .98rem; }
.callout-strong { color: var(--ink) !important; font-weight: 500; margin: 0; }
.goal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.goal-grid li { border-top: 2px solid var(--ink); padding-top: 16px; }
.goal-grid .num { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.goal-grid h3 { font-size: 1.1rem; margin: 6px 0 8px; }
.goal-grid p { font-size: .93rem; color: var(--ink-2); margin: 0; }
@media (max-width: 860px) {
  .two-col, .two-col.even { grid-template-columns: 1fr; }
  .goal-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Data ---------- */
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.split-row { margin-bottom: 18px; }
.split-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.split-head b { font-weight: 600; }
.split-head span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.split-bar { display: flex; gap: 2px; height: 30px; }
.split-bar div { display: flex; align-items: center; padding: 0 10px; font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.split-bar .p { background: var(--fn); color: #fff; border-radius: 4px 0 0 4px; }
.split-bar .u { background: var(--cm-ok); color: var(--cm-ok-ink); border-radius: 0 4px 4px 0; justify-content: flex-end; }
.split-key { display: flex; gap: 18px; font-size: .82rem; color: var(--ink-2); }
.split-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.steps li { position: relative; padding: 0 0 12px 22px; color: var(--ink-2); font-size: .96rem; }
.steps li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.steps strong { color: var(--ink); }
.filter-row { display: flex; gap: 8px; margin: 20px 0 16px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.cell { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #000; }
.cell img { width: 100%; aspect-ratio: 1; }
.cell figcaption { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 600; background: rgba(15, 12, 24, .78); color: #fff; }
.cell.P figcaption::before, .cell.U figcaption::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.cell.P figcaption::before { background: #f06bb0; }
.cell.U figcaption::before { background: #8fc2f5; }
.cell[hidden] { display: none; }

.quiz { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; margin-top: 56px; padding: clamp(24px, 4vw, 40px); border-radius: 20px; background: #0f0c18; color: #f4f0fa; }
.quiz .kicker { color: #d2b5f0; }
.quiz h3 { font-size: 1.7rem; margin-bottom: 10px; }
.quiz-copy p { color: #cfc8de; max-width: 46ch; }
.quiz-score { font-family: var(--font-mono); font-size: .85rem; color: #f4f0fa !important; margin: 0; }
.quiz-stage { display: grid; justify-items: center; gap: 16px; min-width: 260px; }
.quiz-img { width: 176px; height: 176px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px rgba(255, 255, 255, .1); transition: box-shadow .2s; }
.quiz-img img { width: 100%; height: 100%; object-fit: cover; }
.quiz-img.right { box-shadow: 0 0 0 4px #4ccb93; }
.quiz-img.wrong { box-shadow: 0 0 0 4px #ff8a80; }
.quiz-actions { display: flex; gap: 10px; }
.quiz .btn-primary { background: #c98bf0; color: #1b1027; }
.quiz .btn-ghost { border-color: rgba(255, 255, 255, .35); }
.quiz-actions button:disabled { opacity: .45; cursor: default; transform: none; }
.quiz-feedback { margin: 0; min-height: 1.6em; font-weight: 500; font-size: .95rem; }
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.explore figure { margin: 0; padding: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair img { border-radius: 8px; width: 100%; }
.pair span { display: block; text-align: center; font-size: .76rem; color: var(--ink-3); margin-top: 6px; }
.explore figcaption { font-size: .92rem; color: var(--ink-2); margin-top: 14px; }
.explore figcaption strong { color: var(--ink); }
@media (max-width: 860px) {
  .data-grid, .explore { grid-template-columns: 1fr; }
  .quiz { grid-template-columns: 1fr; }
  .quiz-stage { min-width: 0; }
}

/* ---------- Model explorer ---------- */
.explorer { margin-top: 32px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab { flex: 1 0 auto; text-align: left; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 150px; }
.tab small { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); letter-spacing: .04em; }
.tab b { display: block; font-weight: 600; font-size: .95rem; margin-top: 2px; }
.tab span { display: block; font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tab[aria-selected="true"] small { color: var(--accent); }
.panel { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin-bottom: 8px; }
.panel-head h3 { font-size: 1.6rem; }
.badge { font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); letter-spacing: .03em; }
.panel-desc { color: var(--ink-2); max-width: 78ch; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 22px 0; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi dt { font-size: .76rem; color: var(--ink-3); }
.kpi dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.panel-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.panel-grid h4 { font: 600 .78rem/1.3 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 12px; }
.layers li { font-family: var(--font-mono); font-size: .78rem; padding: 7px 10px; border-radius: 6px; margin-bottom: 4px; background: var(--bg-alt); border-left: 3px solid var(--ink-3); }
.layers li.conv { border-left-color: var(--series-1); }
.layers li.dense { border-left-color: var(--accent); }
.layers li.reg { border-left-color: var(--series-2); }
.layers li.pre { border-left-color: var(--good); }
.takeaway { margin: 22px 0 0; padding: 14px 16px; border-radius: 10px; background: var(--bg-alt); font-size: .96rem; color: var(--ink-2); }
.takeaway b { color: var(--ink); }

.cm { display: grid; grid-template-columns: auto 1fr 1fr; gap: 4px; font-size: .8rem; }
.cm .h { color: var(--ink-3); font-size: .72rem; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding: 2px 4px 4px; }
.cm .r { color: var(--ink-3); font-size: .72rem; display: flex; align-items: center; justify-content: flex-end; text-align: right; padding-right: 6px; max-width: 76px; }
.cm .c { border-radius: 8px; padding: 14px 8px; text-align: center; background: var(--cm-ok); color: var(--cm-ok-ink); }
.cm .c.err { background: var(--cm-err); color: var(--cm-err-ink); }
.cm .c b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; }
.cm .c span { font-size: .72rem; }

.curve { position: relative; }
.curve svg { width: 100%; height: auto; display: block; overflow: visible; }
.curve .grid { stroke: var(--line); stroke-width: 1; }
.curve .axis-t { fill: var(--ink-3); font: 11px var(--font-body); }
.curve .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.curve .lbl { font: 600 11px var(--font-body); fill: var(--ink-2); }
.curve .xhair { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.curve .dot { stroke: var(--surface); stroke-width: 2; }
.curve-legend { display: flex; gap: 16px; font-size: .8rem; color: var(--ink-2); margin-bottom: 6px; }
.curve-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
@media (max-width: 960px) {
  .panel-grid { grid-template-columns: 1fr 1fr; }
  .panel-grid > :last-child { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .panel-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* ---------- Results ---------- */
.chart-card { margin-top: 32px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .85rem; color: var(--ink-2); margin-bottom: 18px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.sw-fn { background: var(--fn); }
.sw-fp { background: var(--fp); }
.bar-row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.bar-row:first-child { border-top: 0; }
.bar-name b { display: block; font-weight: 600; font-size: .95rem; }
.bar-name span { font-size: .8rem; color: var(--ink-3); }
.bar-name .badge { display: inline-block; margin-top: 4px; color: var(--accent-ink); font-size: .72rem; }
.bar-pair { display: grid; gap: 2px; }
.bar-line { display: flex; align-items: center; gap: 8px; height: 18px; }
.bar { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.bar.fn { background: var(--fn); }
.bar.fp { background: var(--fp); }
.bar-val { font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar-line:hover .bar { filter: brightness(1.1); }
.table-wrap { margin-top: 20px; padding: 0; overflow-x: auto; }
table.results { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 760px; }
.results th, .results td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.results thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; vertical-align: bottom; }
.th-sub { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; }
.results .num { text-align: right; font-variant-numeric: tabular-nums; }
.results tbody tr:last-child td, .results tbody tr:last-child th { border-bottom: 0; }
.results tbody th { font-weight: 600; }
.results tbody th span { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-3); }
.results tr.win { background: var(--accent-soft); }
.results td.best { font-weight: 700; color: var(--accent); }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Final model ---------- */
.final-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 32px; align-items: start; }
.arch li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 14px; border-radius: 10px; background: var(--bg-alt); position: relative; margin-bottom: 14px; border-left: 3px solid var(--ink-3); }
.arch li:not(:last-child)::after { content: ""; position: absolute; left: 24px; bottom: -14px; width: 2px; height: 14px; background: var(--line); }
.arch li.conv { border-left-color: var(--series-1); }
.arch li.dense { border-left-color: var(--accent); }
.arch li.reg { border-left-color: var(--series-2); }
.arch b { font-weight: 600; font-size: .95rem; }
.arch code { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-3); align-self: center; }
.arch span { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-2); }
.aug-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 6px 0 18px; }
.aug-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.aug-list span { color: var(--ink-2); }
.aug-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.aug-gallery img { border-radius: 6px; width: 100%; aspect-ratio: 1; }
details.code { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
details.code summary { padding: 16px 22px; font-weight: 600; cursor: pointer; }
details.code pre { margin: 0; padding: 4px 22px 22px; overflow-x: auto; }
details.code code { font: 400 .82rem/1.6 var(--font-mono); color: var(--ink-2); }
@media (max-width: 860px) { .final-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .aug-list { grid-template-columns: 1fr; } }

/* ---------- Experiments ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; align-items: start; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.exp-grid p { font-size: .95rem; color: var(--ink-2); }
.exp-result { margin: 16px 0 6px; color: var(--ink) !important; }
.exp-result b { font-family: var(--font-display); font-size: 2rem; font-weight: 500; margin-right: 6px; }
.verdict { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem !important; }
.mini-table li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .86rem; align-items: baseline; }
.mini-table span { color: var(--ink-2); }
.mini-table b { font-variant-numeric: tabular-nums; }
.mini-table em { font-style: normal; color: var(--ink-3); font-size: .8rem; min-width: 68px; text-align: right; }
@media (max-width: 960px) { .exp-grid { grid-template-columns: 1fr; } }

/* ---------- Takeaways ---------- */
.list-title { font-size: 1.3rem; margin-bottom: 16px; }
.checks li, .arrows li { position: relative; padding: 0 0 16px 30px; color: var(--ink-2); font-size: .98rem; }
.checks strong, .arrows strong { color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.arrows li::before { content: "\2192"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 600; }
.cta-band { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-top: 48px; padding: clamp(24px, 4vw, 40px); border-radius: 20px; background: #0f0c18; color: #f4f0fa; }
.cta-band h3 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-band p { margin: 0; color: #cfc8de; max-width: 52ch; }
.cta-band .btn-primary { background: #c98bf0; color: #1b1027; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: .92rem; color: var(--ink-2); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-title { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; }
.footer p { margin: 0 0 4px; max-width: 56ch; }
.footer-small { font-size: .82rem; color: var(--ink-3); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--ink); font-weight: 500; }

/* ---------- Tooltip + motion ---------- */
.tooltip { position: fixed; z-index: 80; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; font-size: .8rem; line-height: 1.45; box-shadow: var(--shadow); max-width: 240px; }
.tooltip b { font-variant-numeric: tabular-nums; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .nav, .quiz, .hero-art, .tooltip { display: none !important; }
  .reveal { opacity: 1; transform: none; }
}
