/* RPGCortex Help — shared stylesheet. Dark, violet-accented, Fraunces + Manrope. */

:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111115;
  --surface-2: #18181b;
  --surface-3: #1f1f24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --dim: #94a3b8;
  --faint: #7b8794;
  --accent: #8b5cf6;
  --accent-dark: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-line: rgba(139, 92, 246, 0.38);
  --link: #b39dfb;
  --teal: #2bb3a3;
  --teal-soft: rgba(43, 179, 163, 0.12);
  --amber: #e8a34a;
  --amber-soft: rgba(232, 163, 74, 0.12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --header-h: 68px;
  --sidebar-w: 272px;
  --measure: 70ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #d4c7fe; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--dim);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent-dark); color: #fff; padding: 8px 14px; border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font: 700 0.9rem/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-dark); color: #fff; box-shadow: 0 6px 24px -10px rgba(124, 58, 237, .8); }
.btn-primary:hover { background: #6d28d9; color: #fff; }
.btn-primary svg { fill: currentColor; }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1440px; margin: 0 auto; padding: 0 24px; min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand img { border-radius: 9px; }
.brand:hover { color: var(--text); }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.01em; }
.wordmark em { font-style: normal; color: #c4b5fd; }
.header-search { flex: 1; max-width: 520px; margin-left: auto; }
.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.menu-toggle { display: none; }

/* ------------------------------------------------------------------ search */
.search { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); display: grid; pointer-events: none; }
.search-icon svg { width: 18px; height: 18px; }
.search input {
  width: 100%; font: 500 0.95rem var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 10px 44px 10px 42px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface-2); }
.search-kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input:focus ~ .search-kbd, .search input:not(:placeholder-shown) ~ .search-kbd { display: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(139, 92, 246, .08);
  max-height: min(70vh, 540px); overflow-y: auto; padding: 6px;
}
.search-results[hidden] { display: none; }
.sr-item {
  display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text);
  cursor: pointer;
}
.sr-item[aria-selected="true"], .sr-item:hover { background: var(--accent-soft); color: var(--text); }
.sr-meta { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sr-title { display: block; font-weight: 700; line-height: 1.35; }
.sr-heading { color: var(--dim); font-weight: 600; }
.sr-snippet { display: block; font-size: 0.86rem; color: var(--dim); line-height: 1.5; margin-top: 2px; }
.sr-item mark { background: rgba(139, 92, 246, .3); color: var(--text); border-radius: 3px; padding: 0 1px; }
.sr-empty { padding: 14px; color: var(--dim); font-size: 0.92rem; }

/* ------------------------------------------------------------------ home */
.hero { position: relative; text-align: center; padding: 88px 24px 56px; }
.hero-search { z-index: 5; }
.hero-glow {
  position: absolute; top: -220px; left: 10%; right: 10%; height: 520px; pointer-events: none; max-width: 100%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .22), transparent 70%),
              radial-gradient(closest-side at 70% 60%, rgba(43, 179, 163, .10), transparent 70%);
  filter: blur(8px);
}
.eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: #d4c7fe; font-size: 0.8rem; font-weight: 700; letter-spacing: .04em;
}
.eyebrow svg { width: 15px; height: 15px; }
.hero h1 {
  position: relative; font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 auto 14px; max-width: 18ch;
}
.hero-sub { position: relative; color: var(--dim); font-size: 1.1rem; max-width: 56ch; margin: 0 auto 30px; }
.hero-search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.search-hero input { padding: 17px 22px 17px 52px; font-size: 1.05rem; border-radius: var(--r-lg); background: var(--surface-2); }
.search-hero .search-icon { left: 20px; }
.search-hero .search-icon svg { width: 20px; height: 20px; }
.hero-hint { position: relative; color: var(--faint); font-size: 0.85rem; margin: 14px 0 0; }

.start-here, .sections, .support-band { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.start-here h2, .sections h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.55rem; letter-spacing: -0.01em; margin: 0 0 18px;
}
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 64px; }
.pick {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--r-lg); text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, rgba(139, 92, 246, .12), rgba(17, 17, 21, .9) 55%);
  border: 1px solid var(--border); transition: border-color .15s ease, transform .15s ease;
}
.pick:hover { border-color: var(--accent-line); color: var(--text); transform: translateY(-2px); }
.pick-num { font-family: var(--serif); font-weight: 600; color: #c4b5fd; font-size: 1.1rem; line-height: 1.4; }
.pick-title { display: block; font-weight: 800; line-height: 1.35; margin-bottom: 4px; }
.pick-desc { display: block; color: var(--dim); font-size: 0.88rem; line-height: 1.5; }

.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 64px; }
.section-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px; transition: border-color .15s ease;
}
.section-card:hover { border-color: var(--border-strong); }
.sc-head { display: flex; gap: 14px; text-decoration: none; color: var(--text); margin-bottom: 14px; }
.sc-head:hover { color: var(--text); }
.sc-head:hover .sc-title { color: #d4c7fe; }
.section-badge {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: #c4b5fd;
}
.section-badge svg { width: 22px; height: 22px; }
.sc-title { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.3; }
.sc-desc { display: block; color: var(--dim); font-size: 0.88rem; line-height: 1.5; margin-top: 3px; }
.section-card ul { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--border); }
.section-card li a {
  display: block; padding: 8px 2px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.94rem;
  border-bottom: 1px solid var(--border);
}
.section-card li a:hover { color: #d4c7fe; }
.sc-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.sc-more svg { width: 16px; height: 16px; }

.support-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 72px !important; padding: 28px 32px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(139, 92, 246, .16), rgba(43, 179, 163, .08));
  border: 1px solid var(--accent-line);
  max-width: 1132px;
}
.support-band h2 { font-family: var(--serif); font-weight: 600; margin: 0 0 4px; font-size: 1.4rem; }
.support-band p { margin: 0; color: var(--dim); max-width: 62ch; }
.support-band .btn svg { fill: none; }

/* ------------------------------------------------------------------ article layout */
.layout {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  max-width: 1440px; margin: 0 auto; min-height: calc(100vh - var(--header-h));
}
.sidebar {
  position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h));
  overflow-y: auto; padding: 24px 12px 40px 24px; border-right: 1px solid var(--border);
  scrollbar-width: thin; scrollbar-color: #2a2a31 transparent;
}
.sidebar-head { display: none; }
.nav-group { margin-bottom: 14px; }
.nav-group summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 6px 8px; border-radius: 10px; font-weight: 800; font-size: 0.8rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim);
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; opacity: .7;
}
.nav-group:not([open]) summary::after { transform: rotate(-45deg); }
.nav-group summary:hover { color: var(--text); }
.nav-icon { display: grid; color: #a78bfa; }
.nav-icon svg { width: 17px; height: 17px; }
.nav-group ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 18px; border-left: 1px solid var(--border); margin-left: 16px; }
.nav-group li a {
  display: block; padding: 6px 10px; margin: 1px 0; border-radius: 9px; color: var(--dim); text-decoration: none;
  font-size: 0.92rem; font-weight: 500; line-height: 1.4;
}
.nav-group li a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-group li a[aria-current="page"] { color: #ede9fe; background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); font-weight: 700; }

.content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 40px 40px 80px; }
@media (min-width: 1240px) {
  .content { grid-template-columns: minmax(0, 1fr) 220px; }
}
.article { max-width: calc(var(--measure) + 2px); width: 100%; min-width: 0; }
.breadcrumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; font-weight: 600; color: var(--faint); margin-bottom: 18px; }
.breadcrumbs a { color: var(--dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.article-head { margin-bottom: 34px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.article-head .section-badge { margin-bottom: 14px; }
.article-head h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12;
  font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px;
}
.lede { margin: 0; color: var(--dim); font-size: 1.12rem; line-height: 1.6; }

.toc { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; font-size: 0.88rem; display: none; }
@media (min-width: 1240px) { .toc { display: block; } }
.toc-title { margin: 0 0 10px; font-weight: 800; font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; color: var(--dim); text-decoration: none; border-left: 1px solid transparent; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: #ede9fe; border-left-color: var(--accent); }

/* ------------------------------------------------------------------ prose */
.prose { font-size: 1.04rem; }
.prose > * { max-width: var(--measure); }
.prose p { margin: 0 0 1.15em; }
.prose h2, .prose h3, .prose h4 { position: relative; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.01em; line-height: 1.25; margin: 2.1em 0 .6em; }
.prose h3 { font-weight: 800; font-size: 1.14rem; line-height: 1.35; margin: 1.8em 0 .5em; }
.prose h4 { font-weight: 800; font-size: 1rem; margin: 1.5em 0 .4em; color: var(--dim); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.anchor { margin-left: 10px; color: var(--faint); text-decoration: none; opacity: 0; font-family: var(--sans); font-weight: 600; transition: opacity .15s ease; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: #a78bfa; }
.prose strong { color: #fff; font-weight: 700; }
.prose code {
  font-family: var(--mono); font-size: .86em; padding: .15em .45em; border-radius: 7px;
  background: var(--accent-soft); border: 1px solid rgba(139, 92, 246, .22); color: #ddd6fe;
  overflow-wrap: anywhere;
}
.prose pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px;
  overflow-x: auto; font-size: .9rem; line-height: 1.55; margin: 0 0 1.3em;
}
.prose pre code { background: none; border: 0; padding: 0; color: #e2e8f0; overflow-wrap: normal; }
.prose blockquote { margin: 0 0 1.2em; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent-line); color: var(--dim); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose img { border-radius: var(--r); }
.ext { font-size: .75em; margin-left: 2px; opacity: .7; }

.table-wrap {
  overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface);
}
.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th {
  background: var(--surface-2); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim);
  font-weight: 800; white-space: nowrap;
}
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.prose td:first-child { font-weight: 700; color: var(--text); }

.callout {
  margin: 0 0 1.4em; padding: 14px 18px 4px; border-radius: var(--r); border: 1px solid; max-width: var(--measure);
}
.callout-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px !important; font-weight: 800; font-size: .92rem; }
.callout-title svg { width: 18px; height: 18px; flex: none; }
.callout p { margin-bottom: .8em; }
.callout ul { margin-bottom: .8em; }
.callout-tip { background: var(--teal-soft); border-color: rgba(43, 179, 163, .35); }
.callout-tip .callout-title { color: #5fd4c5; }
.callout-note { background: var(--accent-soft); border-color: var(--accent-line); }
.callout-note .callout-title { color: #c4b5fd; }
.callout-warning { background: var(--amber-soft); border-color: rgba(232, 163, 74, .38); }
.callout-warning .callout-title { color: #f2bf7a; }

/* ------------------------------------------------------------------ prev / next */
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.pn {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.pn:hover { border-color: var(--accent-line); background: var(--surface-2); color: var(--text); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.pn-label svg { width: 14px; height: 14px; }
.pn-title { font-weight: 700; line-height: 1.35; }

/* ------------------------------------------------------------------ section index */
.article-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.article-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center;
  padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: border-color .15s ease, background .15s ease;
}
.article-row:hover { border-color: var(--accent-line); background: var(--surface-2); color: var(--text); }
.ar-title { font-weight: 800; }
.ar-desc { grid-column: 1; color: var(--dim); font-size: .92rem; line-height: 1.5; }
.ar-arrow { grid-column: 2; grid-row: 1 / span 2; color: #a78bfa; display: grid; }
.ar-arrow svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ 404 */
.not-found { max-width: 640px; margin: 0 auto; padding: 96px 24px; text-align: center; }
.not-found h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px; }
.not-found > p { color: var(--dim); }
.not-found .hero-search { margin: 28px auto; }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 40px 24px 32px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px 40px;
}
.footer-brand p { color: var(--dim); margin: 10px 0 0; font-size: .92rem; }
.footer-links { display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; }
.footer-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.footer-links a:hover { color: #d4c7fe; text-decoration: underline; }
.footer-support {
  grid-column: 1 / -1; margin: 6px 0 0; padding: 14px 16px; border-radius: var(--r);
  background: var(--accent-soft); border: 1px solid rgba(139, 92, 246, .25); color: var(--dim); font-size: .9rem;
}
.footer-support strong { color: var(--text); }
.footer-copy { grid-column: 1 / -1; margin: 0; color: var(--faint); font-size: .82rem; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-toggle { display: inline-grid; }
  .sidebar {
    position: fixed; z-index: 80; top: 0; left: 0; bottom: 0; height: auto;
    width: min(340px, 88vw); background: var(--surface); border-right: 1px solid var(--border-strong);
    transform: translateX(-102%); transition: transform .22s ease; padding: 0 12px 40px 16px; visibility: hidden;
  }
  .nav-open .sidebar { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .sidebar-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
    padding: 14px 0; margin-bottom: 10px; background: var(--surface); border-bottom: 1px solid var(--border);
    font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  }
  .scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); }
  .scrim[hidden] { display: none; }
  .content { padding: 32px 28px 72px; }
  .header-actions .btn-ghost { display: none; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .is-home .header-search { display: none; }
  .search-kbd { display: none; }
  .header-actions { margin-left: auto; }
  :root { --header-h: 114px; }
  .is-home { --header-h: 62px; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wordmark { font-size: 1.08rem; }
  .brand img { width: 30px; height: 30px; }
  .hero { padding: 56px 16px 40px; }
  .hero-sub { font-size: 1rem; }
  .hero-hint { display: none; }
  .start-here, .sections, .support-band { padding: 0 16px; }
  .support-band { margin: 0 16px 56px !important; padding: 22px 20px; }
  .picks, .section-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 48px; }
  .content { padding: 24px 16px 64px; }
  .prose { font-size: 1rem; }
  .prose h2 { font-size: 1.4rem; }
  .prev-next { grid-template-columns: minmax(0, 1fr); }
  .pn-next { text-align: left; align-items: flex-start; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); padding: 32px 16px 28px; }
  .footer-links { justify-content: flex-start; }
  .btn { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
