/* kainossdr.com — the "Console" style: the Kainos app's own palette (KainosUI.cs). */

/* ---------- Tokens ---------- */
:root {
  --bg: #050b13;
  --bg-2: #07101a;
  --surface: #0a1520;
  --panel: #0e1b29;
  --raised: #142538;
  --line: #1f3346;
  --steel: #465f6f;
  --text: #e9eef3;
  --dim: #94a7b2;
  --faint: #5f7584;
  --accent: #7fb0cc;      /* Ice */
  --accent-hi: #a8d8f0;
  --accent-ink: #050b13;
  --gold: #d4ad6a;
  --gold-hi: #e8c88a;
  --violet: #b5a8e0;
  --tx: #e2574c;
  --glow: rgba(127, 176, 204, .22);
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --display-weight: 800;
  --display-tracking: -0.02em;
  --radius: 10px;
  --radius-lg: 16px;
  --card-bg: var(--panel);
  --card-border: 1px solid var(--line);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --header-bg: rgba(5, 11, 19, .78);
  --shot-frame: var(--line);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--raised); border: 1px solid var(--line); padding: .1em .4em; border-radius: 4px; word-break: break-word; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--dim); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.muted { color: var(--dim); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { font-family: "Manrope", system-ui, sans-serif; font-weight: 500; letter-spacing: .28em; font-size: 1.15rem; }
.brand-tag { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); border: 1px solid var(--line); padding: 2px 7px; border-radius: 99px; letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--dim); text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius);
}
.nav a:hover { color: var(--text); background: var(--raised); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 3px; background: var(--gold); border-radius: 2px; }
.nav a.btn[aria-current="page"]::after { display: none; }
.nav .btn { margin-left: 10px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--accent-ink); }
.nav a.btn-primary:hover { background: var(--accent-hi); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); width: 44px; height: 40px; cursor: pointer; }
.nav-toggle svg { margin: auto; }
@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .brand-tag { display: none; }
  .nav {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 10px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { color: var(--gold); }
  .nav .btn { margin: 14px 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 .98rem/1 var(--font-body);
  padding: 14px 22px; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 30px -8px var(--glow); }
.btn-primary:hover { background: var(--accent-hi); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-gold { background: var(--gold); color: #120d03; }
.btn-gold:hover { background: var(--gold-hi); color: #120d03; }
.btn-sm { padding: 9px 14px; font-size: .88rem; }
.btn small { font-weight: 500; opacity: .75; font-family: var(--font-mono); font-size: .78em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 0 0; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero > .hero-canvas { bottom: auto; }
.hero-canvas { -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
.hero-inner { text-align: center; position: relative; }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero h1 em { font-style: normal; color: var(--accent-hi); }
.hero .lede { margin: 18px auto 34px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 18px; font-family: var(--font-mono); font-size: .8rem; color: var(--faint); }
.hero-meta span + span::before { content: "·"; margin: 0 10px; }
.hero-shot { margin: clamp(48px, 7vw, 80px) auto 0; width: min(1180px, 100% - 32px); position: relative; }
.hero-shot .shot { box-shadow: var(--shadow), 0 0 120px -30px var(--glow); }

.freq-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .82rem; color: var(--dim);
  border: 1px solid var(--line); background: var(--surface);
  padding: 6px 14px 6px 8px; border-radius: 99px; margin-bottom: 26px; text-decoration: none;
}
.freq-badge > span { text-align: left; }
.freq-badge b { background: var(--gold); color: #120d03; padding: 2px 8px; border-radius: 99px; font-weight: 700; font-size: .72rem; letter-spacing: .06em; }
.freq-badge:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Screenshot frame ---------- */
.shot {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--shot-frame);
  background: #050b13;
  position: relative;
}
.shot .bar { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: #0a1520; border-bottom: 1px solid #1f3346; }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: #1f3346; }
.shot .bar span { margin-left: 10px; font: 500 .74rem var(--font-mono); color: #5f7584; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot img { width: 100%; height: auto; cursor: zoom-in; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  transition: border-color .2s ease, transform .2s ease;
}
a.card { color: inherit; text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--dim); margin: 0; font-size: .97rem; }
.card .icon {
  width: 42px; height: 42px; border-radius: calc(var(--radius) - 2px);
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--raised); color: var(--accent-hi); border: 1px solid var(--line);
}
.card .icon svg { width: 22px; height: 22px; }
.card .tag { position: absolute; top: 22px; right: 22px; font: 600 .66rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); border: 1px solid currentColor; border-radius: 99px; padding: 2px 8px; opacity: .85; }

.section-head { margin-bottom: 48px; }
.section-head.center { max-width: 760px; margin-inline: auto; margin-bottom: 52px; }

/* ---------- Feature rows (alternating) ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(64px, 9vw, 110px); }
.feature-row.flip > :first-child { order: 2; }
.feature-row ul { padding: 0; margin: 18px 0 0; list-style: none; }
.feature-row li { padding: 10px 0 10px 30px; border-top: 1px solid var(--line); position: relative; color: var(--dim); font-size: .98rem; }
.feature-row li b { color: var(--text); font-weight: 700; }
.feature-row li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 50%; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.flip > :first-child { order: 0; }
}

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.stat { padding: 26px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: var(--display-weight) clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--font-display); color: var(--text); letter-spacing: var(--display-tracking); }
.stat span { color: var(--dim); font-size: .9rem; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Mode chips (Kainos column-tab look) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 700 .74rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--dim); background: var(--surface);
  padding: 6px 12px; border-radius: 99px;
}
.chip.on { color: var(--gold-hi); border-color: var(--gold); }

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 700 .74rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); background: var(--panel); }
td:first-child { color: var(--dim); font-weight: 600; white-space: nowrap; }
td code { font-size: .82em; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; background: var(--card-bg); border: var(--card-border); border-radius: var(--radius-lg); padding: 20px 22px; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 700 .9rem var(--font-mono); color: var(--accent-ink); background: var(--accent); width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius); }
.steps h3 { margin: 6px 0 4px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--dim); font-size: .96rem; }

/* ---------- Release / changelog ---------- */
.release { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.release:last-child { border-bottom: 1px solid var(--line); }
.release .ver { font: 700 1rem var(--font-mono); color: var(--gold); }
.release .ver small { display: block; color: var(--faint); font-weight: 500; font-size: .74rem; margin-top: 4px; letter-spacing: .04em; }
.release ul { margin: 0; padding-left: 18px; color: var(--dim); }
.release li { margin: 3px 0; }
.release li b { color: var(--text); }
@media (max-width: 600px) { .release { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Download panel ---------- */
.download-panel {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
  border: var(--card-border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card-bg); box-shadow: var(--shadow);
}
.download-panel > div { padding: clamp(26px, 4vw, 44px); }
.download-panel .side { background: var(--surface); border-left: 1px solid var(--line); }
.download-panel .side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; font-size: .95rem; }
.download-panel dt { color: var(--faint); font: 600 .76rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.download-panel dd { margin: 0; color: var(--text); }
.version-big { font: var(--display-weight) clamp(2.4rem, 5vw, 3.4rem)/1 var(--font-display); letter-spacing: var(--display-tracking); margin: 4px 0 6px; }
@media (max-width: 860px) {
  .download-panel { grid-template-columns: 1fr; }
  .download-panel .side { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Callout ---------- */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--surface); border-radius: var(--radius); padding: 18px 22px; color: var(--dim); font-size: .96rem; }
.callout b { color: var(--text); }
.callout.tx { border-left-color: var(--tx); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px) 24px;
  background:
    radial-gradient(60% 120% at 50% 0%, var(--glow), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.cta-band .hero-ctas { margin-top: 26px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.gallery figure { margin: 0; grid-column: span 6; }
.gallery figure.wide { grid-column: span 12; }
.gallery figure.tall { grid-column: span 4; }
.gallery figure.tall + figure { grid-column: span 8; }
.gallery figcaption { padding: 14px 4px 0; color: var(--dim); font-size: .93rem; }
.gallery figcaption b { color: var(--text); display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 2px; }
.gallery .shot { height: 100%; }
.gallery .shot img { height: 100%; object-fit: cover; object-position: top left; }
@media (max-width: 760px) { .gallery figure, .gallery figure.tall, .gallery figure.tall + figure { grid-column: span 12; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(2, 5, 9, .92); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 8px; box-shadow: 0 30px 90px rgba(0, 0, 0, .8); }
.lightbox p { color: #94a7b2; text-align: center; margin: 14px 0 0; font-size: .92rem; }
.lightbox button { position: absolute; top: 16px; right: 16px; background: #142538; color: #e9eef3; border: 1px solid #1f3346; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; }

/* ---------- Credits ---------- */
.credits { columns: 2 320px; column-gap: 40px; padding: 0; margin: 0; list-style: none; }
.credits li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .95rem; }
.credits li b { color: var(--text); display: block; }

/* ---------- Getting started ---------- */
.gs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); padding: clamp(48px, 7vw, 80px) 0; }
.gs-toc { position: sticky; top: 90px; align-self: start; }
.gs-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.gs-toc li { counter-increment: toc; }
.gs-toc li a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--dim); text-decoration: none; font-size: .92rem; }
.gs-toc li a::before { content: counter(toc) ". "; color: var(--faint); font-family: var(--font-mono); font-size: .8em; }
.gs-toc li a:hover, .gs-toc li a.active { color: var(--text); border-left-color: var(--gold); }
.toc.gs-toc-mobile { display: none; }
.gs-section { scroll-margin-top: 90px; }
.gs-section + .gs-section { margin-top: clamp(56px, 8vw, 88px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }
.gs-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.gs-section > p, .gs-section > .muted { max-width: 68ch; }
.gs-section .grid, .gs-section .table-wrap, .gs-section .steps, .gs-section .callout { margin-top: 20px; }
@media (max-width: 960px) {
  .gs-layout { grid-template-columns: minmax(0, 1fr); }
  .gs-toc { display: none; }
  .toc.gs-toc-mobile { display: flex; }
}

.annot { margin: 24px 0 0; }
.annot .shot { overflow: visible; }
.annot .shot img { border-radius: var(--radius-lg); }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #120d03; font: 700 .8rem var(--font-mono);
  box-shadow: 0 0 0 4px rgba(212, 173, 106, .28), 0 4px 14px rgba(0, 0, 0, .6);
  pointer-events: none;
}
@media (max-width: 600px) { .pin { width: 20px; height: 20px; font-size: .66rem; box-shadow: 0 0 0 3px rgba(212, 173, 106, .28); } }
.legend { list-style: none; counter-reset: pin; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 4px 28px; }
.legend li { counter-increment: pin; position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--line); color: var(--dim); font-size: .94rem; }
.legend li::before { content: counter(pin); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--gold); color: var(--gold-hi); font: 700 .76rem var(--font-mono); }
.legend b { color: var(--text); }

.faq { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; margin-top: 20px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 22px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--accent); font: 500 1.3rem var(--font-mono); }
.faq details[open] summary::after { content: "2"; }
.faq summary:hover { background: var(--panel); }
.faq details p { margin: 0; padding: 0 22px 18px; color: var(--dim); font-size: .96rem; }
.faq details b { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-2); font-size: .92rem; color: var(--dim); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font: 700 .74rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--faint); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate; }
.page-hero .hero-canvas { opacity: .55; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 20ch; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.toc a { text-decoration: none; }

/* ---------- Reveal on scroll ---------- */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal-on .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
