/* My Thought Safe — site styles. Fonts (Fraunces, Inter, JetBrains Mono) load from Google Fonts
   in includes/layout.php; every stack below falls back to system faces if they don't arrive. */

:root {
  --bg: #09090a;
  --bg-raised: #0f0f11;
  --panel: #141417;
  --panel-2: #1a1a1e;
  --line: #25252a;
  --line-strong: #34343a;
  --line-gold: #3a2f12;
  --text: #ebe9e4;
  --text-soft: #c9c7c1;
  --muted: #9a99a0;
  --dim: #6e6e74;
  --gold: #ebc66a;
  --gold-2: #c9a24b;
  --gold-3: #8c6b22;
  --gold-wash: rgba(235, 198, 106, 0.08);
  --ok: #86c99d;
  --warn: #e8ae5a;
  --danger: #e87d6f;

  /* Context-meter colors, matching the app's own key. */
  --m-system: #9e9e9e;
  --m-pinned: #f0a030;
  --m-summary: #a371f7;
  --m-memory: #2f81f7;
  --m-live: #3fb950;
  --m-free: #2a2a2f;
  --m-gpu: #3fb950;
  --m-cpu: #9e9e9e;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --maxw: 1180px;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Ubuntu, "Noto Sans", Arial, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SFMono-Regular", "DejaVu Sans Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f6dc97; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; color: #f4f1ea; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.55rem); }
h3 { font-size: 1.14rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.38em; color: #efe6cf; }
kbd { background: var(--panel-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0.05em 0.45em; font-size: 0.82em; color: var(--text); }
pre { background: #0c0c0e; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-toggle svg { width: 22px; height: 22px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 10, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-family: var(--font-display); font-size: 1.18rem; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-soft); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover { color: #fff; background: var(--panel); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav .btn { margin-left: 8px; }
/* .nav a outranks .btn-gold, which left the header's Download button pale-on-gold (and dark on hover). */
.nav a.btn-gold, .nav a.btn-gold[aria-current="page"] { color: #1a1406; }
.nav a.btn-gold:hover { color: #120d02; background: linear-gradient(180deg, #f7dc92, #deb65c); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: 7px 10px; font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; background: #0c0c0e; border-bottom: 1px solid var(--line); padding: 10px 16px 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; text-align: center; justify-content: center; }
  .js-off .nav { display: flex; position: static; flex-direction: row; flex-wrap: wrap; background: none; border: 0; padding: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 0.97rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, #f2d27f, #d6ad52); color: #1a1406; box-shadow: 0 8px 26px -10px rgba(235, 198, 106, 0.55), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-gold:hover { color: #120d02; background: linear-gradient(180deg, #f7dc92, #deb65c); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { color: #fff; border-color: var(--gold-3); background: var(--gold-wash); }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Generic sections ---------- */
section { padding-block: 96px; }
@media (max-width: 700px) { section { padding-block: 64px; } }
.section-alt { background: var(--bg-raised); border-block: 1px solid var(--line); }
.eyebrow { display: inline-block; font: 650 0.78rem/1 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 14px; }
.lede { font-size: 1.16rem; color: var(--text-soft); max-width: 720px; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .lede { margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: 84px 72px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 900px; height: 900px;
  background: radial-gradient(closest-side, rgba(235, 198, 106, 0.13), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { font-size: 1.2rem; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: 0.85rem; color: var(--text-soft); background: var(--panel); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; }
.chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(235,198,106,0.8); }

/* Window frame around screenshots */
.shot { margin: 0; }
.frame {
  border-radius: 12px; overflow: hidden; background: #1b1b1f;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,0.4);
}
.frame-bar { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; background: #202025; border-bottom: 1px solid #2c2c32; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a40; }
.frame-bar b { margin-left: 8px; font: 500 0.75rem/1 var(--font-sans); color: var(--muted); }
.frame img { width: 100%; }
.frame a { display: block; cursor: zoom-in; }
.hero .frame { transform: perspective(1800px) rotateY(-4deg) rotateX(1deg); transform-origin: left center; }
@media (max-width: 980px) { .hero .frame { transform: none; } }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }
.shot-placeholder { aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--dim); background: repeating-linear-gradient(135deg, #141417 0 12px, #17171a 12px 24px); font-size: 0.9rem; }

/* ---------- Quick start ---------- */
.quickstart { padding-block: 0 0; position: relative; z-index: 2; }
.qs-card { background: linear-gradient(180deg, #16150f, #111113); border: 1px solid var(--line-gold); border-radius: 18px; padding: 34px 34px 30px; box-shadow: var(--shadow); }
.qs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 24px; }
.qs-head h2 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.qs-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 1060px) { .qs-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .qs-steps { grid-template-columns: 1fr; } .qs-card { padding: 24px 18px; } }
.qs-steps li { counter-increment: step; background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px 16px; }
.qs-steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-bottom: 12px; font: 700 0.9rem/1 var(--font-sans); color: #1a1406; background: linear-gradient(180deg, #f2d27f, #c9a24b); }
.qs-steps h3 { font-size: 1rem; margin-bottom: 6px; }
.qs-steps p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 36px; position: relative; overflow: hidden; }
.pillar::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); opacity: 0.7; }
.pillar .icon { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-wash); border: 1px solid var(--line-gold); color: var(--gold); margin-bottom: 20px; }
.pillar .icon svg { width: 26px; height: 26px; }
.pillar h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.pillar ul { margin: 18px 0 0; padding: 0; list-style: none; }
.pillar li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text-soft); }
.pillar li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 12px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg) translateY(-3px); }

/* ---------- Context diagram ---------- */
.ctx { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .ctx { grid-template-columns: 1fr; gap: 36px; } }
.meter { background: #0c0c0e; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.meter-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.meter-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; background: var(--m-free); border: 1px solid #33333a; }
.meter-bar span { display: block; height: 100%; }
.meter-bar span + span { box-shadow: inset 1px 0 0 rgba(0,0,0,0.5); }
.legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.legend li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; font-size: 0.93rem; color: var(--text-soft); }
.legend li i { width: 14px; height: 14px; border-radius: 4px; margin-top: 4px; }
.legend b { color: var(--text); font-weight: 650; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.swatch-outline { border: 1px solid var(--line-strong); background: transparent; }
.archive { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-strong); }
.archive-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.archive-row span { width: 18px; height: 12px; border-radius: 3px; background: #1f1f24; border: 1px solid #2c2c33; }
.archive-row span.hit { background: var(--m-memory); border-color: var(--m-memory); box-shadow: 0 0 10px rgba(47,129,247,0.55); }
.steps-num { counter-reset: n; list-style: none; padding: 0; margin: 26px 0 0; }
.steps-num li { counter-increment: n; position: relative; padding-left: 44px; margin-bottom: 18px; color: var(--text-soft); }
.steps-num li::before { content: counter(n); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold-3); color: var(--gold); display: grid; place-items: center; font: 700 0.82rem/1 var(--font-sans); }
.steps-num b { color: var(--text); }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; transition: border-color 0.2s ease, transform 0.2s ease; }
.feature:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--gold); background: var(--gold-wash); border: 1px solid var(--line-gold); margin-bottom: 16px; }
.feature .icon svg { width: 21px; height: 21px; }
.feature p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.feature a.more { display: inline-block; margin-top: 12px; font-size: 0.88rem; text-decoration: none; }
.feature a.more::after { content: " →"; }
.feature-group { margin-top: 56px; }
.feature-group:first-of-type { margin-top: 0; }
.feature-group > h3 { font: 650 0.8rem/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.feature-group > h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr; } }
.gallery .shot figcaption b { color: var(--text); display: block; font-weight: 600; margin-bottom: 2px; }

/* ---------- Split / requirements ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-bottom: 14px; }
.card h3 svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 4px; color: var(--warn); }
.spec { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec th, .spec td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 500; width: 36%; padding-right: 16px; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font: 650 0.72rem/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; vertical-align: 2px; margin-left: 6px; }
.badge-ok { color: #0e2616; background: var(--ok); }
.badge-warn { color: #2b1a02; background: var(--warn); }
.badge-dim { color: var(--text-soft); background: var(--panel-2); border: 1px solid var(--line-strong); }

/* ---------- Callouts ---------- */
.callout { display: grid; grid-template-columns: 22px 1fr; gap: 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold-2); background: var(--panel); border-radius: 10px; padding: 16px 18px; margin: 1.4em 0; }
.callout svg { width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn); }
.callout.warn svg { color: var(--warn); }
.callout.danger { border-left-color: var(--danger); background: #1a1212; }
.callout.danger svg { color: var(--danger); }
.callout strong { color: var(--text); }
.habits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 1.4em 0; }
.habits .callout { margin: 0; }
@media (max-width: 700px) { .habits { grid-template-columns: 1fr; } }

/* ---------- Honesty band ---------- */
.honest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
@media (max-width: 900px) { .honest { grid-template-columns: 1fr; } }
.honest .card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Final CTA ---------- */
.final { text-align: center; padding-block: 110px; background: radial-gradient(ellipse at center, rgba(235,198,106,0.1), transparent 60%); }
.final img { width: 88px; margin: 0 auto 26px; border-radius: 18px; box-shadow: 0 16px 50px -12px rgba(235,198,106,0.35); }
.final .cta-row { justify-content: center; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding-block: 64px 40px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #0f0e0b, var(--bg)); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-hero .lede { margin: 0; }
.crumbs { font-size: 0.86rem; color: var(--dim); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* ---------- Downloads ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .dl-grid { grid-template-columns: 1fr; } }
.dl { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.dl.recommended { border-color: var(--line-gold); background: linear-gradient(180deg, #17150e, var(--panel)); }
.dl .os { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dl .os svg { width: 30px; height: 30px; color: var(--gold); }
.dl h2 { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 650; margin: 0; }
.dl p { color: var(--muted); font-size: 0.94rem; }
.dl .meta { font-size: 0.85rem; color: var(--dim); margin: 6px 0 18px; }
.dl .btn { justify-content: center; margin-top: auto; }
.hash { margin-top: 16px; font-size: 0.78rem; }
.hash-label { color: var(--dim); display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hash code { display: block; word-break: break-all; line-height: 1.5; padding: 8px 10px; color: var(--text-soft); background: #0c0c0e; }
.copy { background: none; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 6px; font: 600 0.72rem/1 var(--font-sans); padding: 5px 8px; cursor: pointer; }
.copy:hover { color: var(--gold); border-color: var(--gold-3); }

/* ---------- Manual layout ---------- */
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-block: 48px 96px; }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; gap: 24px; padding-block: 28px 72px; } }
.doc-nav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 0.93rem; }
@media (max-width: 900px) { .doc-nav { position: static; max-height: none; } }
.doc-nav details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.doc-nav summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--text-soft); list-style: none; }
.doc-nav summary::-webkit-details-marker { display: none; }
.doc-nav summary::after { content: "▾"; float: right; color: var(--dim); }
@media (min-width: 901px) {
  .doc-nav details { background: none; border: 0; }
  .doc-nav summary { display: none; }
}
.doc-nav ol { list-style: none; margin: 0; padding: 4px 8px 12px; }
@media (min-width: 901px) { .doc-nav ol { padding: 0; } }
.doc-nav .group { font: 650 0.72rem/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding: 18px 12px 8px; }
.doc-nav .group:first-child { padding-top: 4px; }
.doc-nav a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.doc-nav a:hover { color: var(--text); background: var(--panel); }
.doc-nav a[aria-current="page"] { color: var(--gold); background: var(--gold-wash); border-left-color: var(--gold); border-radius: 0 8px 8px 0; }

.prose { max-width: 780px; }
.prose h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); margin-bottom: 0.4em; }
.prose > .lede { margin-bottom: 2rem; }
.prose h2 { font-size: 1.65rem; margin-top: 2.6em; padding-top: 0.2em; }
.prose h3 { margin-top: 2em; font-size: 1.15rem; }
.prose p, .prose li { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--gold-2); }
.prose dl { margin: 1.2em 0 1.6em; }
.prose dt { color: var(--text); font-weight: 600; margin-top: 1.1em; }
.prose dt .badge { margin-left: 0; margin-right: 4px; }
.prose dd { color: var(--text-soft); margin: 0.35em 0 0; padding-left: 1em; border-left: 2px solid var(--line-strong); }
.prose .shot { margin: 1.8em 0 2.2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; margin: 1.2em 0 1.8em; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; background: var(--panel); }
.prose td { color: var(--text-soft); }
.table-scroll { overflow-x: auto; }
.prose .anchor { color: var(--dim); text-decoration: none; margin-left: 8px; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.ui { font-weight: 600; color: var(--text); }
.ui::before { content: "“"; color: var(--dim); font-weight: 400; }
.ui::after { content: "”"; color: var(--dim); font-weight: 400; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; text-decoration: none; color: var(--text); }
.pager a:hover { border-color: var(--line-gold); }
.pager small { display: block; color: var(--dim); font-size: 0.8rem; margin-bottom: 2px; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: auto; } }

.toc-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 1.5em; }
@media (max-width: 640px) { .toc-cards { grid-template-columns: 1fr; } }
.toc-cards a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; text-decoration: none; }
.toc-cards a:hover { border-color: var(--line-gold); }
.toc-cards b { display: block; color: var(--text); margin-bottom: 3px; }
.toc-cards span { color: var(--muted); font-size: 0.92rem; }

/* FAQ */
.faq h2:first-child { margin-top: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 600; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-2); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--gold); }
.faq details > div { padding-bottom: 8px; }
.faq .callout { margin-top: 2.6em; }

/* License text */
.license-text { white-space: pre-wrap; font: 0.92rem/1.7 var(--font-mono); color: var(--text-soft); background: #0c0c0e; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #070708; padding-block: 56px 40px; color: var(--muted); font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font: 650 0.76rem/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.85rem; color: var(--dim); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(4, 4, 5, 0.92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 90px); width: auto; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox p { color: var(--text-soft); margin: 14px 0 0; text-align: center; font-size: 0.95rem; }
.lightbox button { position: absolute; top: 16px; right: 18px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
