/* site.css — the whole site's stylesheet, used by layouts/site.njk.
   Built from the homepage mockup (Working/docs/design/website-redesign.md §0):
   the mockup's colours, Fraunces display over Work Sans body, opens light.
   Owner rules: no decorative thread, no highlighted words, no dashed lines,
   no dark bands. Section labels are colour-coded but plain. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --page: #F3ECDA;
  --alt: #FBF6E9;
  --hero: #EADFC2;
  --text: #2B2419;
  --body: #4E4434;
  --muted: #5C5140;
  --line: #D6C59B;
  --outline: #B9A77D;
  --link: #8A5F12;
  --link-hover: #5E400B;
  --gold: #C08A28;
  --on-gold: #1B1815;
  --strip: #2B2419;
  --strip-text: #F4EBDA;
  --strip-accent: #E0A93F;
  --card: #FBF6E9;
  --shot-shadow: 0 24px 56px rgba(60, 45, 20, 0.18);
  --hero-shadow: 0 32px 72px rgba(60, 45, 20, 0.24);
  /* Thread colours: the mark (bars, dots) and a text shade that passes 4.5:1. */
  --plot: #B23A48;  --plot-text: #8E2B37;
  --build: #3B7CA6; --build-text: #2C6189;
  --write: #4A7C6F; --write-text: #36604F;
  --track: #8A6BA8; --track-text: #664C83;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  /* Type scale (16px root). */
  --fs-display: clamp(2.75rem, 1.4rem + 5.4vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
  --fs-statement: clamp(1.625rem, 1.15rem + 1.9vw, 2.75rem);
  --fs-h3: 1.375rem;
  --fs-lead: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.875rem;

  --page-max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 12px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #1F1B17;
  --alt: #242019;
  --hero: #1B1815;
  --text: #EDE3D0;
  --body: #C9BDA9;
  --muted: #AFA38F;
  --line: #3A332A;
  --outline: #5A4F42;
  --link: #E0A93F;
  --link-hover: #F0C46A;
  --strip: #120F0C;
  --strip-text: #EDE3D0;
  --card: #2A251F;
  --shot-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  --hero-shadow: 0 32px 72px rgba(0, 0, 0, 0.5);
  --plot-text: #E68692;
  --build-text: #86B9DB;
  --write-text: #8FCDB0;
  --track-text: #B7A3E3;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--text); }
p { margin: 0; }
ul { margin: 0; padding: 0; }
.icon { width: 1em; height: 1em; flex: none; }
.page { max-width: var(--page-max); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--outline);
  font: inherit; font-size: var(--fs-small); font-weight: 600;
  color: var(--text); background: transparent; text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--text); border-color: var(--text); }
.button-primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.button-primary:hover { color: var(--on-gold); border-color: var(--gold); filter: brightness(1.07); }
.button-large { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.button[disabled] { opacity: 0.6; cursor: progress; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border-radius: 999px; border: 1px solid var(--outline);
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn .tb-icon, .icon-btn .icon { width: 19px; height: 19px; }

/* ---------- Promo strip (js/checkout.js shows it during a sale) ---------- */
.promo-banner { background: var(--strip); text-align: center; padding: 10px 16px; font-size: var(--fs-label); }
.promo-banner[hidden] { display: none; }
.promo-banner a { color: var(--strip-text); text-decoration: none; }
.promo-banner a:hover { color: var(--strip-text); text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: var(--hero); }
.site-header-inner { display: flex; align-items: center; gap: 24px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand span { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.3rem; }
.site-nav-list { display: flex; align-items: center; gap: 4px; list-style: none; }
.site-nav-list > li > a, .nav-menu > summary {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px;
  color: var(--body); font-size: var(--fs-small); font-weight: 500; text-decoration: none; border-radius: 8px; cursor: pointer;
}
.site-nav-list > li > a:hover, .nav-menu > summary:hover { color: var(--text); }
.site-nav-list a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 1.5px; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary .icon { width: 14px; height: 14px; transition: transform 0.15s; }
.nav-menu[open] > summary .icon { transform: rotate(180deg); }
.nav-menu-list {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20;
  min-width: 200px; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}
.nav-menu-list a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: var(--fs-small); }
.nav-menu-list a:hover { background: var(--page); color: var(--text); }
.site-header-actions { display: flex; align-items: center; gap: 12px; }
.mobile-menu { display: none; }
.mobile-menu > summary { padding: 0; width: 44px; justify-content: center; border: 1px solid var(--outline); border-radius: 999px; color: var(--text); }
.mobile-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  width: min(300px, calc(100vw - 32px)); padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.mobile-menu-panel ul { list-style: none; }
.mobile-menu-panel a { display: block; padding: 11px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.mobile-menu-panel a:hover { background: var(--page); color: var(--text); }
.mobile-menu-panel .mobile-menu-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.mobile-menu-panel .mobile-menu-heading { padding: 8px 12px 2px; font-size: var(--fs-label); color: var(--muted); }
@media (max-width: 900px) {
  .site-nav { display: none; }
  .mobile-menu { display: block; }
  .site-header-inner { min-height: 72px; gap: 12px; }
}
@media (max-width: 420px) {
  .site-header-actions .button { display: none; }
}

/* ---------- Hero ---------- */
.hero { background: var(--hero); padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 5vw, 64px); }
/* Two sentences, each on its own line where it fits. */
.display span { display: block; }
.display {
  font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 144;
  font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.025em;
}
.hero-lead { margin-top: 32px; max-width: 34em; font-size: var(--fs-lead); line-height: 1.6; color: var(--body); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.hero-note { margin-top: 18px; font-size: var(--fs-small); color: var(--muted); }
/* The Timeline screenshot sits across the hero's lower edge, inside the
   page's margins (the same space on both sides). */
.hero-shot { background: linear-gradient(var(--hero) 0 58%, var(--page) 58% 100%); }
.hero-shot .shot { box-shadow: var(--hero-shadow); }

/* ---------- Screenshots (light and dark, swapped with the theme) ---------- */
.shot { margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shot-shadow); }
.shot img { width: 100%; }
/* Each screenshot is a button that opens it larger (js/shot-zoom.js). */
.shot-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: inherit; }
.shot-open:focus-visible { outline-offset: -3px; }
.shot-dialog {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: clamp(16px, 4vw, 48px);
  border: 0; background: transparent; display: none; align-items: center; justify-content: center;
}
.shot-dialog[open] { display: flex; }
.shot-dialog::backdrop { background: rgba(20, 16, 12, 0.88); }
.shot-dialog img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5); cursor: zoom-out; }
.shot-dialog-close {
  position: fixed; top: 16px; right: 16px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.4); color: #fff; cursor: pointer;
}
.shot-dialog-close .icon { width: 20px; height: 20px; }
.shot-dark { display: none; }
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }
.shot-caption { margin-top: 12px; font-size: var(--fs-label); color: var(--muted); }

/* ---------- Facts line and statement ---------- */
.intro { padding: clamp(40px, 5vw, 56px) 0 clamp(72px, 9vw, 112px); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 0; list-style: none; font-size: 1.0625rem; font-weight: 500; color: var(--body); text-align: center; }
.facts li { padding: 0 20px; border-left: 1px solid var(--outline); }
.facts li:first-child { border-left: 0; }
@media (max-width: 640px) {
  .facts { flex-direction: column; align-items: center; }
  .facts li { border-left: 0; padding: 0; }
}
.intro-text { margin: clamp(56px, 7vw, 88px) auto 0; max-width: 40em; text-align: center; }
.intro-title {
  font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 120;
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); line-height: 1.1; letter-spacing: -0.015em;
}
.intro-body { margin-top: 20px; font-size: var(--fs-lead); line-height: 1.7; color: var(--body); }

/* ---------- Story sections (Plot / Build / Write / Track) ---------- */
.band { padding: clamp(72px, 9vw, 112px) 0; }
.band-alt { background: var(--alt); }
/* Heading on the left, text on the right (both from the top), then the
   screenshot at the full width of the page. */
.story-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(40px, 5vw, 64px); }
.story-head .section-body { margin-top: 0; }
/* The text starts level with the heading, not the label above it: the
   label's line (14px x 1.6) plus its 20px margin. */
.story-head > :last-child { padding-top: calc(var(--fs-label) * 1.6 + 20px); }
@media (max-width: 860px) {
  .story-head { grid-template-columns: 1fr; }
  .story-head > :last-child { padding-top: 0; }
}
/* The section label: a short bar in the thread's colour, then the word. */
.label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: var(--fs-label); font-weight: 600; color: var(--label-text); }
.label::before { content: ''; width: 28px; height: 3px; border-radius: 2px; background: var(--label-mark); }
.label-plot  { --label-mark: var(--plot);  --label-text: var(--plot-text); }
.label-build { --label-mark: var(--build); --label-text: var(--build-text); }
.label-write { --label-mark: var(--write); --label-text: var(--write-text); }
.label-track { --label-mark: var(--track); --label-text: var(--track-text); }
.section-title {
  font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 120;
  font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.02em;
}
.section-body { margin-top: 24px; max-width: 30em; font-size: 1.125rem; line-height: 1.65; color: var(--body); }
.parts { margin-top: 32px; max-width: 30em; font-size: var(--fs-small); line-height: 1.5; }
.parts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.parts div:last-child { border-bottom: 1px solid var(--line); }
.parts dt { font-weight: 600; color: var(--text); }
.parts dd { margin: 0; color: var(--muted); }

/* ---------- Inner pages (Features…) ---------- */
.page-head { background: var(--hero); padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 5vw, 56px); }
.page-title {
  max-width: 18ch;
  font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 144;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.025em;
}
.page-head .hero-lead { margin-top: 24px; }
.jump { margin-top: clamp(32px, 4vw, 48px); padding-top: 20px; border-top: 1px solid var(--outline); }
.jump ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.jump a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--outline); border-radius: 999px;
  color: var(--text); font-size: var(--fs-small); text-decoration: none;
}
.jump a:hover { border-color: var(--text); color: var(--text); }
[id] { scroll-margin-top: 24px; }
/* A section with no screenshot: heading and text side by side, no gap below. */
.story-head-flush { margin-bottom: 0; }
.feature-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { padding-top: 18px; border-top: 1px solid var(--line); }
.feature h3 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; }
.points { margin-top: 10px; padding-left: 1.1em; font-size: var(--fs-small); line-height: 1.55; color: var(--body); }
.points li { padding-left: 2px; }
.points li + li { margin-top: 6px; }
.points li::marker { color: var(--outline); }
.points-spaced { margin-top: 24px; font-size: 1rem; max-width: 34em; }
ol.points li::marker { color: var(--link); font-weight: 600; }
.points-spaced li + li { margin-top: 10px; }
.section-more { margin-top: 24px; font-size: var(--fs-small); }
.sub-feature { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .sub-feature { grid-template-columns: 1fr; } }
.sub-feature-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.2; }
.sub-feature p { margin-top: 12px; color: var(--body); }
.band-intro-modules { border-top: 1px solid var(--line); }
/* Text beside the Settings, Modules screenshot (a tall popup). */
.modules-intro { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.modules-intro .section-body + .section-body { margin-top: 16px; }
.modules-intro .shot { max-width: 520px; justify-self: end; width: 100%; }
@media (max-width: 860px) {
  .modules-intro { grid-template-columns: 1fr; }
  .modules-intro .shot { justify-self: start; }
}
.closing { border-top: 1px solid var(--line); }
.closing-inner { text-align: center; }
.closing-inner .section-body { margin-left: auto; margin-right: auto; }
.closing-inner .hero-actions { justify-content: center; }

/* ---------- Blog posts (blog/*.html bodies: article.post > .wrap) ---------- */
.post { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 112px); }
.post .wrap { max-width: calc(720px + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.post-eyebrow { font-size: var(--fs-label); font-weight: 600; }
.post-eyebrow a { color: var(--link); text-decoration: none; }
.post-eyebrow a:hover { text-decoration: underline; }
.post h1 {
  margin-top: 14px;
  font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 144;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em;
}
.post-meta { margin: 18px 0 40px; font-size: var(--fs-small); color: var(--muted); }
/* Reading text in Fraunces, at a size for long reading. */
.post p, .post li, .post-verdict { font-family: var(--font-display); font-variation-settings: 'opsz' 14; font-size: 1.1875rem; line-height: 1.7; color: var(--body); }
.post p + p { margin-top: 1em; }
.post h2 { margin: 56px 0 16px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.2; }
.post h3 { margin: 32px 0 10px; font-family: var(--font-body); font-weight: 600; font-size: 1.125rem; }
.post ul, .post ol { margin: 0 0 1em; padding-left: 1.3em; }
.post li + li { margin-top: 6px; }
.post li::marker { color: var(--outline); }
.post strong { color: var(--text); }
.post-verdict { margin-bottom: 8px; padding: 22px 24px; background: var(--alt); border: 1px solid var(--line); border-radius: 12px; }
.post-verdict p { font-size: 1.0625rem; }
.post-table-wrap { margin: 0 0 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.post table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--fs-small); line-height: 1.5; }
.post th, .post td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--body); }
.post tr:last-child td { border-bottom: 0; }
.post th { background: var(--alt); color: var(--text); font-weight: 600; }
.post td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.post-note { font-size: var(--fs-small) !important; color: var(--muted) !important; }
.post-cta { margin-top: 56px; padding: clamp(24px, 4vw, 36px); background: var(--alt); border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.post-cta p { margin-bottom: 18px; font-family: var(--font-body); font-size: 1.0625rem; }

/* ---------- Blog index ---------- */
.post-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(28px, 4vw, 40px); }
@media (max-width: 760px) { .post-list { grid-template-columns: 1fr; } }
.post-list a {
  display: block; height: 100%; padding: 22px 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.post-list a:hover { color: var(--text); border-color: var(--outline); transform: translateY(-1px); }
.post-list strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.375rem; line-height: 1.25; }
.post-list span { display: block; margin-top: 8px; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }

/* ---------- Older page bodies on the new layout ----------
   Legal pages, patch notes, thanks, feedback and requests keep their
   markup (section.legal / section.form-page > .wrap); these rules give it
   the new look. js/requests.js, feedback.js and thanks.js build some of
   these classes in script: keep the names. */
.legal, .form-page { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 112px); }
.legal .wrap, .form-page .wrap { max-width: calc(720px + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.legal-header, .form-header { margin-bottom: clamp(32px, 4vw, 48px); padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.legal-header h1, .form-header h1 {
  font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 144;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em;
}
.legal-updated { margin-top: 14px; font-size: var(--fs-small); color: var(--muted); }
.form-header p { margin-top: 14px; font-size: var(--fs-lead); line-height: 1.6; color: var(--body); }
.legal p, .legal li { font-size: 1.0625rem; line-height: 1.7; color: var(--body); }
.legal p + p { margin-top: 1em; }
.legal h2 { margin: 48px 0 14px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); line-height: 1.25; }
.legal h3 { margin: 28px 0 8px; font-family: var(--font-body); font-weight: 600; font-size: 1.0625rem; }
.legal ul, .legal ol { margin: 12px 0 16px; padding-left: 1.3em; }
.legal li + li { margin-top: 6px; }
.legal li::marker { color: var(--outline); }
.legal strong { color: var(--text); }
.legal code { font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--alt); border: 1px solid var(--line); }
.legal-note { margin: 16px 0; padding: 18px 20px; border-radius: 12px; background: var(--alt); border: 1px solid var(--line); font-size: var(--fs-small) !important; }

/* Patch notes */
.release { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.release:last-of-type { border-bottom: 0; }
.release-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.legal .release-header h2 { margin: 0; }
.release-tag { font-size: var(--fs-label); font-weight: 600; color: var(--link); }
.release-date { margin-left: auto; font-size: var(--fs-label); color: var(--muted); }
.legal .release-group { margin: 22px 0 6px; font-size: var(--fs-small); font-weight: 600; color: var(--text); }
.legal .release ul ul { margin: 6px 0 4px; }
.release-footnote { font-size: var(--fs-small) !important; color: var(--muted) !important; }

/* Buttons the older pages and their scripts use (.btn = .button) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--outline);
  font: inherit; font-size: var(--fs-small); font-weight: 600; color: var(--text);
  background: transparent; text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--text); border-color: var(--text); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn-primary:hover { color: var(--on-gold); border-color: var(--gold); filter: brightness(1.07); }
.btn-large { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Forms (feedback, requests) */
.form-card { padding: clamp(22px, 4vw, 32px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.form-card + .form-card, .form-card + .filter-bar { margin-top: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-small); font-weight: 600; color: var(--text); }
.field input[type="text"], .field select, .field textarea, .comment-form input[type="text"] {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--outline);
  background: var(--page); color: var(--text); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .comment-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
/* .field .radio-option: a radio choice is a <label> inside a .field, so it
   has to outrank ".field label" above. */
.field .radio-option, .radio-option {
  flex: 1 1 140px; display: flex; margin-bottom: 0; font-weight: 500; font-size: 1rem; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--outline); border-radius: 10px; background: var(--page); cursor: pointer;
}
.radio-option:has(input:checked) { border-color: var(--gold); background: var(--alt); }
.radio-option input { accent-color: var(--gold); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: var(--fs-small); }
.form-msg.visible { display: block; }
.form-msg-success { background: var(--alt); border: 1px solid var(--write); color: var(--write-text); }
.form-msg-error { background: var(--alt); border: 1px solid var(--plot); color: var(--plot-text); }

/* Requests board */
.request-form { margin-bottom: 36px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-btn {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--outline);
  background: transparent; color: var(--text); font: inherit; font-size: var(--fs-small); cursor: pointer;
}
.filter-btn:hover { border-color: var(--text); }
.filter-btn.active { background: var(--text); border-color: var(--text); color: var(--page); }
.request-list { display: flex; flex-direction: column; gap: 14px; }
.request-card { display: flex; gap: 16px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.vote-controls { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; width: 44px; }
.vote-btn {
  width: 40px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--outline); background: transparent; color: var(--muted); cursor: pointer;
}
.vote-btn:hover { border-color: var(--text); color: var(--text); }
.vote-btn.active-up { border-color: var(--gold); color: var(--link); background: var(--alt); }
.vote-btn.active-down { border-color: var(--plot); color: var(--plot-text); background: var(--alt); }
.vote-score { padding: 2px 0; font-weight: 600; color: var(--text); }
.request-main { flex: 1; min-width: 0; }
.request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request-title-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.request-title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; line-height: 1.3; }
.request-body { margin-top: 8px; font-size: var(--fs-small); line-height: 1.6; color: var(--body); white-space: pre-wrap; }
.request-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; font-size: var(--fs-label); color: var(--muted); }
.request-meta button { padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.status-badge { display: inline-block; flex-shrink: 0; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--line); }
.status-unreviewed { color: var(--muted); }
.status-planned { color: var(--build-text); border-color: var(--build); }
.status-in_progress { color: var(--link); border-color: var(--gold); }
.status-live { color: var(--write-text); border-color: var(--write); }
.comments-panel { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.comments-panel.visible { display: block; }
.comment-row { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.comment-row:last-child { border-bottom: 0; }
.comment-author { font-weight: 600; color: var(--text); }
.comment-date { font-size: var(--fs-label); color: var(--muted); }
.comment-body { margin-top: 3px; line-height: 1.5; color: var(--body); }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form button { flex-shrink: 0; }
.empty-note { padding: 40px 0; text-align: center; font-size: var(--fs-small); color: var(--muted); }

/* Thanks (licence key after checkout, js/thanks.js) */
.thanks-card { text-align: center; }
.thanks-card [hidden] { display: none !important; }
.thanks-card h2 { margin-bottom: 10px; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; }
.thanks-card p { margin-bottom: 14px; color: var(--body); }
.thanks-card .btn { margin-top: 8px; }
.thanks-ref, .thanks-card .key-keep { font-size: var(--fs-label); color: var(--muted); }
.key-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px; padding: 16px; border-radius: 12px; background: var(--page); border: 1px solid var(--line); }
.key-text { font-family: Consolas, Menlo, monospace; font-size: clamp(14px, 4.4vw, 20px); letter-spacing: 0.04em; color: var(--text); user-select: all; white-space: nowrap; }
.key-waiting { display: inline-flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- About pages ---------- */
.about-nav a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--page); }
/* Running text beside a heading (no label above it). */
.story-head > .prose { padding-top: 6px; }
.prose { max-width: 38em; font-size: 1.125rem; line-height: 1.7; color: var(--body); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1em; }
.prose .points-spaced { margin-top: 0; font-size: 1.0625rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose-fine { font-size: var(--fs-small); color: var(--muted); }
.callout-note { margin-top: 28px !important; padding: 18px 20px; border-radius: 12px; background: var(--alt); border: 1px solid var(--line); font-size: var(--fs-small); line-height: 1.6; }
.band-alt .callout-note { background: var(--page); }

/* ---------- Pricing page ---------- */
.pricing-page { align-items: center; }
.trial .section-body { margin-top: 20px; }
.trial .hero-actions { margin-top: 28px; }
.steps { margin-top: clamp(32px, 4vw, 48px); padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--link); margin-bottom: 14px; }
.steps h3 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; }
.steps p { margin-top: 8px; font-size: var(--fs-small); line-height: 1.6; color: var(--body); }
/* Text beside a heading with no label above it starts level with it. */
.story-head > .never-text { padding-top: 6px; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform 0.15s; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 18px; max-width: 38em; color: var(--body); }

/* ---------- Series ---------- */
.series { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-top: clamp(40px, 5vw, 56px); margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line); }
.series h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.2; }
.series p { color: var(--body); max-width: 34em; }
@media (max-width: 760px) { .series { grid-template-columns: 1fr; } }

/* ---------- Modules ---------- */
.module-list { margin-top: clamp(40px, 5vw, 56px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 64px); list-style: none; }
.module-list li { padding: 20px 0; border-top: 1px solid var(--line); }
.module-list h3 { font-size: 1.0625rem; font-weight: 600; font-family: var(--font-body); }
.module-list p { margin-top: 4px; font-size: var(--fs-small); color: var(--muted); max-width: 32em; }
@media (max-width: 700px) { .module-list { grid-template-columns: 1fr; } }
.module-note { margin-top: 20px; font-size: var(--fs-small); color: var(--muted); }

/* ---------- Promises (light) ---------- */
.promises-title { font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 144; font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 12ch; }
.promise-list { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; list-style: none; }
.promise-list li { padding-top: 20px; border-top: 2px solid var(--text); }
.promise-list h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.25; }
.promise-list p { margin-top: 10px; font-size: var(--fs-small); line-height: 1.6; color: var(--body); }
@media (max-width: 980px) { .promise-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .promise-list { grid-template-columns: 1fr; } }

/* ---------- Pricing (ids filled by js/checkout.js) ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shot-shadow); }
.price-card [hidden] { display: none !important; }
.price-status, .price-promo-label { font-size: var(--fs-label); font-weight: 600; color: var(--link); margin-bottom: 8px; }
.price-amount { display: flex; align-items: baseline; gap: 14px; font-family: var(--font-display); font-size: clamp(3rem, 2.4rem + 2vw, 4rem); line-height: 1; color: var(--text); }
.price-was { font-size: 1.5rem; color: var(--muted); text-decoration: line-through; }
.price-promo-note { margin-top: 10px; font-size: var(--fs-small); font-weight: 600; color: var(--link); }
.price-tax { margin: 12px 0 24px; font-size: var(--fs-small); color: var(--muted); }
.price-error { margin-top: 12px; font-size: var(--fs-small); }
.price-fine { margin-top: 16px; font-size: var(--fs-label); color: var(--muted); }
.price-trial { margin-top: 8px; font-size: var(--fs-small); }
.price-list { list-style: none; margin-top: 28px; }
.price-list li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); color: var(--body); }
.price-list .icon { color: var(--write); position: relative; top: 2px; }

/* ---------- Help shape ---------- */
.help-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .help-grid { grid-template-columns: 1fr; } }
.help-links { list-style: none; display: grid; gap: 14px; }
.help-link {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.help-link:hover { color: var(--text); border-color: var(--outline); transform: translateY(-1px); }
.help-icon { width: 26px; height: 26px; flex: none; color: var(--link); }
.help-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.help-text strong { font-size: 1.0625rem; font-weight: 600; }
.help-text span { font-size: var(--fs-small); color: var(--muted); }
.help-link > .icon { width: 20px; height: 20px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--alt); border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 40px; }
.site-footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 5fr); gap: 40px; }
@media (max-width: 980px) { .site-footer-grid { grid-template-columns: 1fr; } }
.site-footer-brand .brand { margin-right: 0; }
.site-footer-tagline { margin-top: 14px; max-width: 16em; color: var(--muted); font-size: var(--fs-small); line-height: 1.5; }
.site-footer-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 860px) { .site-footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .site-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer-heading { font-family: var(--font-body); font-size: var(--fs-label); font-weight: 600; color: var(--text); margin-bottom: 10px; }
.site-footer-cols ul { list-style: none; }
.site-footer-cols a { display: inline-block; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: var(--fs-small); }
.site-footer-cols a:hover { color: var(--text); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
