/* =====================================================================
   Colophon — global.css
   Letterpress design system: Literata + IBM Plex Mono, warm paper
   neutrals, single vermilion accent. Values sourced from
   colophon-pdf-editor-design/project/Colophon Design System.dc.html.
   ===================================================================== */

/* ---------- 0. @font-face --------------------------------------------- */

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-italic-300-800-latin-ext.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-italic-300-800-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-normal-300-800-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-normal-300-800-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-normal-400-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-normal-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-normal-500-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-normal-500-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-normal-600-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-normal-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Tokens --------------------------------------------------- */

:root,
[data-theme="light"] {
  --paper: #FBFAF8;
  --card: #FFFFFF;
  --sidebar: #F1EEE7;
  --desk: #D7D1C5;
  --ink: #1A1A1A;
  --ink2: #4A4640;
  --gray: #8A847A;
  --faint: #B4AFA4;
  --rule: #E5E1D8;
  --rule2: #EFECE4;
  --red: #C8322B;
  --redDk: #A8281F;
  --redTint: rgba(200, 50, 43, 0.12);
  --onAccent: #FFFFFF;
  --scrim: rgba(20, 18, 16, 0.46);

  --font-serif: "Literata", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --container: 1120px;
  --pad: 40px;
  --header-h: 70px;
}

[data-theme="dark"] {
  --paper: #16130F;
  --card: #211C16;
  --sidebar: #1B1712;
  --desk: #0F0D0A;
  --ink: #F2ECE0;
  --ink2: #C6BEAF;
  --gray: #948B7C;
  --faint: #6C655A;
  --rule: #342F28;
  --rule2: #2A251F;
  --red: #E3574D;
  --redDk: #C8322B;
  --redTint: rgba(227, 87, 77, 0.16);
  --onAccent: #FFF6F4;
  --scrim: rgba(0, 0, 0, 0.60);
}

/* No-JS fallback: global.js always sets data-theme immediately, so this
   block only serves visitors with script disabled. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #16130F;
    --card: #211C16;
    --sidebar: #1B1712;
    --desk: #0F0D0A;
    --ink: #F2ECE0;
    --ink2: #C6BEAF;
    --gray: #948B7C;
    --faint: #6C655A;
    --rule: #342F28;
    --rule2: #2A251F;
    --red: #E3574D;
    --redDk: #C8322B;
    --redTint: rgba(227, 87, 77, 0.16);
    --onAccent: #FFF6F4;
    --scrim: rgba(0, 0, 0, 0.60);
  }
}

/* Literata has no CJK glyphs — swap the serif token for a native system
   serif on the three CJK locales so body text renders as intended rather
   than falling back to the browser's arbitrary default substitute. */
:root:lang(ja) { --font-serif: "Hiragino Mincho ProN", "YuMincho", serif; }
:root:lang(zh-Hans) { --font-serif: "PingFang SC", "Songti SC", serif; }
:root:lang(zh-Hant) { --font-serif: "PingFang TC", "Songti TC", serif; }

/* ---------- 2. Base & typography --------------------------------------- */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--redTint); }

a {
  color: var(--red);
  text-decoration: none;
}
a:hover { color: var(--redDk); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, p { margin: 0; }

.text-display {
  font-size: 88px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.text-title {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.text-heading {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
}
.text-body {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink2);
}
.text-small {
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray);
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.footnote {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
}

.section-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}
.section-mark-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--red);
}
.section-mark-rule {
  width: 44px;
  height: 2px;
  background: var(--red);
}
.section-mark-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---------- 3. Layout ---------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.band {
  padding: 80px 0;
  background: var(--paper);
}
.band--sidebar {
  background: var(--sidebar);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.band--tight { padding: 48px 0; }

/* ---------- 4. Components ------------------------------------------------ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--red); color: var(--onAccent); }
.btn--primary:hover { background: var(--redDk); color: var(--onAccent); }
.btn--secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn--secondary:hover { border-color: var(--gray); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--red); padding: 12px 14px; }
.btn--ghost:hover { background: var(--redTint); color: var(--red); }
.btn--store {
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 12px;
}
.btn--store:hover { background: var(--ink); color: var(--paper); opacity: 0.88; }
.btn--sm { font-size: 13px; padding: 8px 16px; border-radius: 8px; }

/* A store button before the app is on the store. The listing doesn't exist yet, so these are
   deliberately NOT links — a button that 404s is worse than one that plainly isn't live. Keeps the
   button's shape so the page doesn't reflow on launch day; just stops it pretending to be clickable. */
.is-unavailable {
  cursor: default;
  opacity: 0.72;
}
.is-unavailable:hover { opacity: 0.72; }

/* The Apple Intelligence requirement, stated in the hero footnote. Same size as the footnote it sits in
   — deliberately not smaller: a disclosure a buyer needs BEFORE paying must not be set in fine print. */
.hero-footnote-req { display: block; margin-top: 4px; }
.btn svg { flex: none; }

/* Badges & pills */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 5px;
}
.badge--solid { background: var(--red); color: var(--onAccent); }
.badge--neutral { background: var(--rule2); color: var(--ink2); }
.badge--tint { background: var(--redTint); color: var(--red); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--redTint);
  padding: 6px 12px;
  border-radius: 20px;
}

/* Search */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 18px;
  position: relative;
}
.search:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--redTint);
}
.search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  width: 100%;
}
.search input::placeholder { color: var(--gray); }
.search svg { flex: none; color: var(--gray); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.14);
  z-index: 40;
  overflow: hidden;
  display: none;
}
.search-results.is-open { display: block; }
.search-result {
  display: block;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.search-result:last-child { border-bottom: none; }
.search-result-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.search-result-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); margin-top: 3px; }
.search-result.is-active,
.search-result:hover { background: var(--redTint); }
.search-empty { padding: 18px; font-size: 14px; color: var(--gray); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.card--callout {
  background: var(--redTint);
  border: 1px solid var(--red);
}
.metric-value {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--red);
  margin: 8px 0 4px;
}

/* Note callout (article warnings) */
.note {
  margin: 26px 0;
  padding: 20px 24px;
  background: var(--redTint);
  border-left: 3px solid var(--red);
  border-radius: 0 8px 8px 0;
}
.note-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.note-body { font-size: 16px; line-height: 1.55; color: var(--ink2); }

/* Drop cap */
.drop-cap::first-letter {
  float: left;
  font-size: 62px;
  line-height: 0.82;
  font-weight: 700;
  color: var(--red);
  margin: 6px 12px 0 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand svg { flex: none; }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: -0.005em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-link { font-size: 15px; color: var(--ink2); }
.nav-link:hover { color: var(--red); }
.nav-link.is-active { color: var(--red); font-weight: 600; }
body[data-section="support"] .nav-link[data-nav="documentation"],
body[data-section="support"] .nav-link[data-nav="support"] { color: var(--red); font-weight: 600; }
body[data-section="privacy"] .nav-link[data-nav="privacy"] { color: var(--red); font-weight: 600; }

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

.theme-toggle {
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink2);
  flex: none;
}
.theme-toggle:hover { border-color: var(--gray); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Footer */
.site-footer {
  background: var(--sidebar);
  border-top: 1px solid var(--rule);
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 56px 0 0;
}
.footer-brand { max-width: 38ch; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
}
.footer-col a { font-size: 15px; color: var(--ink2); }
.footer-col a:hover { color: var(--red); }
.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 44px;
  padding: 24px 0 56px;
  border-top: 1px solid var(--rule);
}
.footer-legal-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.lang-switcher {
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lang-switcher a { color: var(--faint); }
.lang-switcher a:hover { color: var(--red); }
.lang-switcher .is-current { color: var(--gray); }

/* Marketing: hero — centered copy is the sole focus; the screenshot below
   is a smaller, clearly secondary supporting illustration. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-title { font-size: 60px; line-height: 1.03; font-weight: 700; letter-spacing: -0.025em; margin: 22px 0 0; max-width: 18ch; }
.hero-sub { font-size: 20px; line-height: 1.55; color: var(--ink2); max-width: 44ch; margin: 22px 0 0; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-footnote { margin-top: 20px; }

.device-frame {
  width: 190px;
  flex: none;
  margin-top: 48px;
  background: #0c0c0e;
  border-radius: 30px;
  padding: 9px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.24);
}
.device-frame-screen {
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
}
.device-frame-screen img { width: 100%; height: auto; display: block; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}
.stat { background: var(--card); padding: 34px 30px; }
.stat-value { font-size: 56px; font-weight: 700; letter-spacing: -0.02em; color: var(--red); }
.stat-title { font-size: 18px; font-weight: 600; margin-top: 6px; }
.stat-desc { font-size: 15px; color: var(--gray); margin-top: 6px; line-height: 1.45; }

/* Feature grid */
.features-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 44px;
}
.features-title { margin: 12px 0 34px; font-size: 38px; font-weight: 700; letter-spacing: -0.02em; max-width: 20ch; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 40px;
}
.tick-rule { width: 38px; height: 2px; background: var(--red); margin-bottom: 16px; }
.feature-title { font-size: 19px; font-weight: 600; }
.feature-desc { font-size: 15.5px; color: var(--gray); line-height: 1.55; margin-top: 8px; }

/* Trust callout — fixed vermilion, identical in both themes */
.trust-callout {
  background: #C8322B;
  border-radius: 16px;
  padding: 56px;
  color: #fff;
}
.trust-callout .mono-label { color: rgba(255,255,255,0.75); }
.trust-callout h3 { margin: 16px 0 0; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; max-width: 22ch; line-height: 1.15; }
.trust-callout p { margin: 18px 0 0; font-size: 19px; line-height: 1.55; max-width: 56ch; color: rgba(255,255,255,0.9); }

/* Download block */
.download-block {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.download-copy { max-width: 52ch; }
.download-copy h3 { margin: 12px 0 0; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.download-copy p { margin: 16px 0 26px; font-size: 18px; color: var(--ink2); line-height: 1.55; }
.qr-placeholder {
  width: 132px;
  height: 132px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: repeating-linear-gradient(45deg, var(--ink) 0 6px, transparent 6px 12px);
  opacity: 0.85;
}
.qr-caption { text-align: center; margin-top: 12px; }

/* Support: hero + categories */
.support-hero { text-align: center; }
.support-hero .search { max-width: 560px; margin: 22px auto 0; text-align: left; }
.support-hero-title { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.category-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px;
}
.category-card:hover { border-color: var(--gray); }
.category-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.category-desc { font-size: 14px; color: var(--gray); margin-top: 6px; }

.contact-block {
  margin-top: 24px;
  text-align: center;
  font-size: 15px;
  color: var(--ink2);
}
.contact-block a { font-weight: 600; }

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 24px;
}
.breadcrumbs a { color: var(--gray); }
.breadcrumbs a:hover { color: var(--red); }

/* Article lists */
.article-list { border-top: 1px solid var(--rule); }
.article-list-item {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.article-list-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.article-list-item:hover .article-list-title { color: var(--red); }
.article-list-desc { font-size: 15px; color: var(--gray); margin-top: 4px; }

/* Article layout */
.doc-layout {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
}
.doc-toc {
  border-right: 1px solid var(--rule);
  padding: 32px 26px;
  background: var(--sidebar);
}
.doc-toc-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 16px;
}
.doc-toc-list { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.doc-toc-list a { color: var(--ink2); }
.doc-toc-list a.is-active { color: var(--red); font-weight: 600; }
.doc-article { padding: 44px 52px; max-width: 70ch; }
.doc-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.doc-title { margin: 12px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.doc-article p { margin: 18px 0 0; font-size: 18px; line-height: 1.65; color: var(--ink2); }
.doc-article p:first-of-type { margin-top: 20px; }
.doc-article h2 { margin: 40px 0 0; font-size: 24px; font-weight: 600; color: var(--ink); scroll-margin-top: 90px; }
.doc-article h2 + p { margin-top: 14px; }
.doc-article strong { color: var(--ink); }
.doc-article ul, .doc-article ol { margin: 18px 0 0; padding-left: 22px; color: var(--ink2); font-size: 18px; line-height: 1.65; }
.doc-article li + li { margin-top: 8px; }

/* ---------- 5. Responsive ------------------------------------------------ */

@media (max-width: 900px) {
  :root { --pad: 24px; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav .nav-link { padding: 12px 0; width: 100%; }
  .site-nav .btn { margin-top: 8px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .hero-title { font-size: 44px; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }

  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .doc-toc-list { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
  .doc-article { padding: 32px 28px; max-width: none; }

  .footer-cols { gap: 40px; }
}

@media (max-width: 600px) {
  :root { --pad: 20px; --header-h: 60px; }

  .text-display { font-size: 44px; }
  .hero-title { font-size: 38px; }
  .text-title { font-size: 32px; }
  .doc-title { font-size: 28px; }
  .features-title { font-size: 28px; }
  .trust-callout h3 { font-size: 28px; }
  .download-copy h3 { font-size: 28px; }

  .stats { grid-template-columns: 1fr; }
  .stats .stat:last-child { grid-column: auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }

  .download-block { flex-direction: column; align-items: stretch; text-align: center; }
  .download-block .download-copy { max-width: none; }

  .brand-name { font-size: 17px; }
}

/* ---------- 6. Motion & print -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .theme-toggle,
  .search, .doc-toc, .support-hero .search { display: none !important; }
  body { background: #fff; color: #1A1A1A; }
  .doc-layout { border: none; grid-template-columns: 1fr; }
  .doc-article { padding: 0; max-width: none; color: #1A1A1A; }
  .doc-article p { color: #2E2E2E; }
  a { color: #1A1A1A; text-decoration: underline; }
}
