/* ============================================================
   Peaksflare — adaptive AI coaching for endurance athletes
   Theming driven by data-attributes on <html>:
     data-theme      = light | dark
     data-accent     = ink | blue | green | terracotta
     data-headline   = sans | serif
   "Direction" presets in the Tweaks panel just set a coherent
   combination of the above.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=Hanken+Grotesk:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  transition: background-color .4s ease, color .4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Color tokens ---------- */
:root,
[data-theme="light"] {
  --accent-grad: var(--accent); /* solid by default; the violet accent overrides with a gradient */
  --bg:          oklch(0.975 0.003 255);
  --surface:     oklch(0.995 0.002 255);
  --surface-2:   oklch(0.955 0.004 255);
  --border:      oklch(0.905 0.005 255);
  --border-soft: oklch(0.93 0.004 255);
  --text:        oklch(0.245 0.012 260);
  --text-muted:  oklch(0.515 0.012 260);
  --text-faint:  oklch(0.66 0.01 260);
  --shadow-color: 255 30% 20%;
  --grid-line:   oklch(0.90 0.006 255);
}

[data-theme="dark"] {
  --bg:          oklch(0.185 0.008 260);
  --surface:     oklch(0.225 0.010 260);
  --surface-2:   oklch(0.255 0.012 260);
  --border:      oklch(0.32 0.012 260);
  --border-soft: oklch(0.28 0.012 260);
  --text:        oklch(0.945 0.004 260);
  --text-muted:  oklch(0.70 0.010 260);
  --text-faint:  oklch(0.56 0.010 260);
  --shadow-color: 260 40% 2%;
  --grid-line:   oklch(0.30 0.012 260);
}

/* ---------- Accents (shared chroma/lightness, hue varies) ---------- */
[data-accent="ink"] {
  --accent:      oklch(0.30 0.012 260);
  --accent-soft: oklch(0.30 0.012 260 / 0.08);
  --on-accent:   oklch(0.985 0.002 255);
}
[data-accent="ink"][data-theme="dark"] {
  --accent:      oklch(0.92 0.006 260);
  --accent-soft: oklch(0.92 0.006 260 / 0.12);
  --on-accent:   oklch(0.20 0.01 260);
}
[data-accent="blue"] {
  --accent:      oklch(0.57 0.105 248);
  --accent-soft: oklch(0.57 0.105 248 / 0.12);
  --on-accent:   oklch(0.99 0.002 255);
}
[data-accent="green"] {
  --accent:      oklch(0.57 0.085 162);
  --accent-soft: oklch(0.57 0.085 162 / 0.13);
  --on-accent:   oklch(0.99 0.002 255);
}
[data-accent="terracotta"] {
  --accent:      oklch(0.61 0.105 45);
  --accent-soft: oklch(0.61 0.105 45 / 0.13);
  --on-accent:   oklch(0.99 0.002 255);
}
[data-accent="violet"] {
  --accent:      oklch(0.525 0.205 293);
  --accent-soft: oklch(0.525 0.205 293 / 0.12);
  --on-accent:   oklch(0.99 0.004 293);
  --accent-grad: linear-gradient(135deg, oklch(0.56 0.205 297), oklch(0.50 0.185 270));
}
[data-accent="violet"][data-theme="dark"] {
  --accent:      oklch(0.64 0.195 295);
  --accent-soft: oklch(0.64 0.195 295 / 0.17);
  --on-accent:   oklch(0.99 0.004 293);
  --accent-grad: linear-gradient(135deg, oklch(0.66 0.20 298), oklch(0.58 0.185 272));
}

/* ---------- Type scale ---------- */
:root {
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --radius-lg: 24px;
}
[data-headline="serif"] { --font-display: 'Newsreader', Georgia, serif; }

/* headline weight/letterspacing depend on family */
[data-headline="sans"] h1, [data-headline="sans"] h2 { letter-spacing: -0.022em; font-weight: 700; }
[data-headline="serif"] h1, [data-headline="serif"] h2 { letter-spacing: -0.012em; font-weight: 500; }
[data-headline="serif"] .hero-title { font-weight: 500; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}
.section-head { max-width: 640px; }
.section-head .eyebrow { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.04; margin: 0; }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { color: var(--text-muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  padding: 13px 22px; transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-grad); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
[data-headline="serif"] .brand { font-weight: 600; }
.brand-mark { width: 22px; height: 22px; flex: none; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; color: var(--text-muted); transition: color .2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 92px); padding-bottom: 0; position: relative; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 72%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 72%);
  opacity: .5;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 880px; margin-inline: auto; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border-soft);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 28px; white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-title { font-size: clamp(40px, 7vw, 82px); line-height: 1.0; letter-spacing: -0.03em; }
.hero-title .accent { color: var(--accent); }
.hero .lede { margin: 26px auto 0; max-width: 580px; }

/* hero waitlist form */
.hero-form { margin: 34px auto 0; display: flex; gap: 10px; max-width: 460px; }
.hero-form input {
  flex: 1; min-width: 0; font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 13px 20px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hero-form input::placeholder { color: var(--text-faint); }
.hero-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-sub { margin-top: 14px; font-size: 13px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: 0.02em; }

/* hero app shot */
.hero-shot { position: relative; z-index: 1; margin: clamp(48px, 7vw, 84px) auto 0; max-width: 1060px; }
.device-frame {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 1px 0 oklch(1 0 0 / .04) inset,
              0 30px 60px -28px hsl(var(--shadow-color) / .55),
              0 12px 28px -22px hsl(var(--shadow-color) / .5);
}
.device-bar { display: flex; align-items: center; gap: 7px; padding: 4px 6px 12px; }
.device-bar .d { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.device-bar .label { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.04em; }
.shot-slot { width: 100%; border-radius: 14px; overflow: hidden; }

/* logo strip */
.logos { padding-block: clamp(40px, 5vw, 64px); }
.logos .cap { text-align: center; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.logo-row { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(28px, 6vw, 64px); align-items: center; opacity: .72; }
.logo-row span { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 2vw, 21px); letter-spacing: -0.01em; color: var(--text-muted); }

/* ---------- How it works ---------- */
.steps { margin-top: clamp(48px, 6vw, 76px); display: flex; flex-direction: column; gap: clamp(56px, 8vw, 104px); }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.step:nth-child(even) .step-media { order: -1; }
.step-num { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; color: var(--accent); }
.step-copy h3 { font-size: clamp(24px, 3vw, 34px); margin: 14px 0 14px; }
.step-copy p { color: var(--text-muted); font-size: 17px; max-width: 42ch; }
.step-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--text-muted); background: var(--surface-2);
  border: 1px solid var(--border-soft); border-radius: 7px; padding: 5px 10px;
}
.step-media { position: relative; }
.media-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 20px 44px -30px hsl(var(--shadow-color) / .5);
}
.media-slot { width: 100%; border-radius: 10px; overflow: hidden; }
@media (max-width: 820px) {
  .step { grid-template-columns: 1fr; gap: 28px; }
  .step:nth-child(even) .step-media { order: 0; }
}

/* ---------- Features ---------- */
.feature-grid {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border-soft); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); overflow: hidden;
}
.feature {
  background: var(--bg); padding: clamp(26px, 3vw, 38px);
  display: flex; flex-direction: column; gap: 12px; min-height: 196px;
  transition: background-color .25s ease;
}
.feature:hover { background: var(--surface-2); }
.feature .ico {
  width: 30px; height: 30px; color: var(--accent); margin-bottom: 6px;
}
.feature h3 { font-size: 18.5px; }
.feature p { color: var(--text-muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 880px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-inline: auto; }
.faq-list { margin-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--border-soft); }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-q {
  width: 100%; background: none; border: 0; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 4px; color: var(--text); font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 21px); font-weight: 600; letter-spacing: -0.01em;
}
[data-headline="serif"] .faq-q { font-weight: 500; }
.faq-q .pm { flex: none; width: 22px; height: 22px; position: relative; color: var(--accent); }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: currentColor; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.faq-q .pm::before { left: 0; right: 0; top: 10px; height: 2px; }
.faq-q .pm::after { top: 0; bottom: 0; left: 10px; width: 2px; }
.faq-item[open] .pm::after { transform: scaleY(0); opacity: 0; }
.faq-a { overflow: hidden; }
.faq-a p { color: var(--text-muted); font-size: 16px; line-height: 1.62; padding: 0 4px 24px; max-width: 64ch; }

/* ---------- Waitlist CTA ---------- */
.cta-band {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 76px) clamp(28px, 5vw, 64px);
  text-align: center; position: relative; overflow: hidden;
}
.cta-band .glow {
  position: absolute; inset: -40% 20% auto; height: 320px;
  background: radial-gradient(60% 100% at 50% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { position: relative; }
.cta-band .lede { position: relative; margin: 18px auto 0; max-width: 500px; }
.cta-band .hero-form { margin-top: 30px; }
.cta-band .hero-sub { position: relative; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-soft); padding-block: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer .brand { font-size: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer .fine { width: 100%; color: var(--text-faint); font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.02em; }

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

/* ============================================================
   App-screen mockups (placeholders for real screenshots)
   Built from the same tokens, so they follow accent + theme.
   ============================================================ */
.screen {
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  padding: 18px;
  overflow: hidden;
  position: relative;
  font-family: var(--font-body);
}
.screen .ph {
  position: absolute; top: 12px; right: 14px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint); opacity: .65;
}
.s-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.s-top .day { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-faint); text-transform: uppercase; }
.s-top .ttl { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--text); }
[data-headline="serif"] .s-top .ttl { font-weight: 600; }

/* readiness ring gauge */
.gauge { position: relative; width: var(--gs, 132px); height: var(--gs, 132px); margin: 4px auto 2px; }
.gauge .track {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 82) * 1%), var(--border-soft) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 71%, #000 72%);
          mask: radial-gradient(closest-side, transparent 71%, #000 72%);
}
.gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.gauge .num { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.gauge .cap { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* metric row */
.s-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.metric { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 9px; padding: 9px 10px; }
.metric .k { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.metric .v { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); margin-top: 3px; }
.metric .v small { font-weight: 500; font-size: 10px; color: var(--text-muted); }

/* workout card */
.wcard { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 11px; padding: 13px 14px; margin-top: 12px; }
.wcard .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wcard .type { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.wcard .type .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.wcard .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); margin-top: 8px; }
[data-headline="serif"] .wcard .name { font-weight: 600; }
.wcard .meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.adjust { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 4px 8px; }

/* interval bars */
.ivals { display: flex; align-items: flex-end; gap: 4px; height: 46px; margin-top: 12px; }
.ivals i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }

/* sync list */
.s-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.s-row { display: flex; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 11px 12px; }
.s-row .ic { width: 28px; height: 28px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.s-row .ic svg { width: 15px; height: 15px; }
.s-row .nm { font-weight: 600; font-size: 13px; color: var(--text); }
.s-row .st { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--text-faint); margin-top: 1px; }
.s-row .sw { margin-left: auto; width: 30px; height: 18px; border-radius: 999px; background: var(--accent); position: relative; flex: none; }
.s-row .sw::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--on-accent); }
.s-row.off .sw { background: var(--border); }
.s-row.off .sw::after { right: auto; left: 2px; background: var(--surface); }

/* factor bars (recovery breakdown) */
.factors { display: flex; flex-direction: column; gap: 11px; margin-top: 6px; }
.factor .lab { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin-bottom: 5px; }
.factor .lab b { color: var(--text); font-weight: 600; }
.bar { height: 6px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* season trend chart */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 8px; padding-top: 8px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 100%; }
.chart .col i { width: 100%; border-radius: 3px 3px 0 0; background: var(--border); }
.chart .col i.load { background: var(--accent); opacity: .9; }
.chart-x { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; color: var(--text-faint); text-transform: uppercase; }
.chart-flag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-top: 2px; }

/* ============================================================
   Legal / document pages (Terms, Privacy)
   ============================================================ */
.doc-hero { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(28px, 4vw, 44px); }
.doc-hero .eyebrow { color: var(--accent); }
.doc-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.025em; line-height: 1.04; margin: 16px 0 0; }
[data-headline="serif"] .doc-hero h1 { font-weight: 500; letter-spacing: -0.012em; }
[data-headline="sans"] .doc-hero h1 { font-weight: 700; }
.doc-meta { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-faint); }
.doc-intro { margin-top: 20px; max-width: 62ch; color: var(--text-muted); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.62; }

.doc-body { max-width: 760px; padding-bottom: clamp(64px, 9vw, 120px); }
.doc-body section { padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--border-soft); margin-top: clamp(32px, 4vw, 48px); }
.doc-body section:first-of-type { border-top: 0; margin-top: 8px; padding-top: 8px; }
.doc-body h2 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.012em; }
.doc-body h2 .n { font-family: var(--font-mono); font-size: 14px; color: var(--accent); margin-right: 12px; font-weight: 500; letter-spacing: 0; }
.doc-body h3 { font-size: 17px; margin-top: 26px; color: var(--text); }
.doc-body p { color: var(--text-muted); font-size: 16px; line-height: 1.68; margin-top: 16px; max-width: 68ch; }
.doc-body ul { margin: 16px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 68ch; }
.doc-body li { position: relative; padding-left: 22px; color: var(--text-muted); font-size: 16px; line-height: 1.6; }
.doc-body li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc-body li b, .doc-body p b { color: var(--text); font-weight: 600; }
.doc-body a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.doc-body a:not(.btn):hover { text-decoration-color: var(--accent); }

.doc-toc { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 22px 24px; margin-top: 8px; }
.doc-toc .cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.doc-toc ol { margin: 14px 0 0; padding-left: 0; list-style: none; counter-reset: toc; columns: 2; column-gap: 32px; }
.doc-toc li { counter-increment: toc; margin-bottom: 9px; break-inside: avoid; }
.doc-toc a { font-size: 14.5px; color: var(--text-muted); display: inline-flex; gap: 9px; }
.doc-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.doc-toc a:hover { color: var(--text); }
@media (max-width: 560px) { .doc-toc ol { columns: 1; } }

.doc-note { margin-top: 28px; padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent); }
.doc-note p { margin-top: 0; color: var(--text); font-size: 14.5px; }
.doc-note p:first-child { font-weight: 600; }
