/* ============================================================================
   ZPad — "Field Manual" design system (v2, 2026 redesign)
   ----------------------------------------------------------------------------
   Direction: technical-editorial. Warm ivory paper, near-black ink, one
   vermilion signal color. Fraunces display serif + Geist UI + Geist Mono
   labels. Hairline rules, datasheet numbering, ink CTAs. The live product
   demo panel keeps its own dark app chrome (defined per-page, not here).
   Docs: DESIGN.md
   ============================================================================ */

/* ---- 1. Tokens ------------------------------------------------------------ */
:root {
  --paper:      #F7F4ED;
  --paper-2:    #F0ECE2;
  --paper-3:    #E9E4D7;
  --plate:      #FCFAF4;           /* card surface */
  --ink:        #1C1712;
  --ink-2:      #51483F;
  --ink-3:      #6B6154;
  --ink-4:      #736958;
  --line:       rgba(28, 23, 18, 0.15);
  --line-strong:rgba(28, 23, 18, 0.34);
  --accent:     #D9481F;           /* vermilion — large text, fills, marks */
  --accent-ink: #A93A11;           /* accessible accent for small text */
  --accent-soft:rgba(217, 72, 31, 0.09);
  --green:      #1E7A44;
  --green-soft: rgba(30, 122, 68, 0.10);
  --amber:      #92600A;
  --amber-soft: rgba(146, 96, 10, 0.10);
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-1: 0 1px 2px rgba(28,23,18,.05), 0 10px 30px rgba(28,23,18,.07);
  --font-ui: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---- 2. Reset & base ------------------------------------------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { vertical-align: middle; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -48px; left: 16px; z-index: 300;
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---- 3. Type utilities ---------------------------------------------------- */
.mono { font-family: var(--font-mono); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.kicker::before {
  content: ''; width: 22px; height: 1px; background: var(--accent); flex: none;
}

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--plate);
  padding: 6px 13px; border-radius: 999px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Section header — datasheet style: top rule + kicker left, index right */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line-strong);
  padding-top: 18px; margin-bottom: 22px;
}
.sec-head .idx {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--ink-4); letter-spacing: 0.08em;
}

h1, h2.display, h3.display { font-family: var(--font-display); font-optical-sizing: auto; }

/* ---- 4. kbd / code / pre -------------------------------------------------- */
kbd {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; color: var(--ink);
  background: linear-gradient(180deg, #FFFEFA, var(--paper-2));
  border: 1px solid var(--line-strong);
  border-bottom-width: 2.5px;
  border-radius: 7px;
  padding: 2px 8px;
  white-space: nowrap;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--paper-3);
  border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px;
  color: var(--ink);
}

pre {
  background: var(--ink);
  color: #EDE8DD;
  border-radius: var(--r-m);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13px; line-height: 1.7;
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* ---- 5. Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--r-m);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .2s, border-color .2s, color .2s;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(28,23,18,.22); }
.btn-primary .chip-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent); color: #FFF8F2; flex: none;
  transition: transform .25s var(--ease);
}
.btn-primary:hover .chip-ic { transform: translateX(3px); }
.btn-primary .chip-ic svg { width: 13px; height: 13px; }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--plate); border-color: var(--ink); transform: translateY(-1px); }
.btn-ghost svg { width: 15px; height: 15px; color: var(--ink-2); }

.btn-sm { font-size: 13px; padding: 8px 16px; border-radius: 9px; gap: 8px; }

.btn-line { color: var(--accent-ink); font-weight: 600; }
.btn-line:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 6. Site header (subpages) --------------------------------------------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(247, 244, 237, 0.86);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  max-width: 1120px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 27px; height: 27px; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  box-shadow: inset 0 0 0 1.5px var(--ink), inset 0 0 0 3.5px var(--paper);
  outline: 1px solid rgba(28,23,18,.12);
}
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.head-crumb { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.head-links { display: flex; align-items: center; gap: 20px; }
.head-links a { font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: color .15s; }
.head-links a:hover { color: var(--ink); }
.head-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---- 7. Site footer -------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--line-strong);
  background: var(--paper-2);
  margin-top: 96px;
}
.foot-grid {
  max-width: 1120px; margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px;
}
.foot-brand p { font-size: 13.5px; color: var(--ink-3); margin-top: 14px; max-width: 280px; line-height: 1.65; }
.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}
.foot-col a {
  display: block; font-size: 13.5px; color: var(--ink-2);
  padding: 4px 0; transition: color .15s;
}
.foot-col a:hover { color: var(--accent-ink); }
.foot-bottom {
  border-top: 1px solid var(--line);
  max-width: 1120px; margin: 0 auto;
  padding: 20px 24px 26px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-4);
  font-family: var(--font-mono);
}

/* ---- 8. Page head (subpages) ----------------------------------------------- */
.page-main { max-width: 840px; margin: 0 auto; padding: 148px 24px 40px; }
.page-main.wide { max-width: 1040px; }
.page-head { margin-bottom: 52px; }
.page-head h1 {
  font-size: clamp(34px, 5.4vw, 54px); font-weight: 600;
  letter-spacing: -0.015em; line-height: 1.06;
  margin: 16px 0 18px;
}
.page-head h1 em { font-style: italic; color: var(--accent-ink); }
.page-head .lede { font-size: 17.5px; color: var(--ink-2); max-width: 640px; line-height: 1.65; }
.page-head .lede a { color: var(--accent-ink); font-weight: 550; }
.page-head .lede a:hover { text-decoration: underline; text-underline-offset: 3px; }
.last-updated {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-4);
  margin-top: 18px;
}

/* ---- 9. Cards --------------------------------------------------------------- */
.card {
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 20px 22px;
  margin: 18px 0;
}
.card > :last-child { margin-bottom: 0; }
.card.tip  { border-left: 3px solid var(--green); }
.card.warn { border-left: 3px solid var(--amber); }
.card-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 8px;
}
.card.tip .card-tag { color: var(--green); }
.card.warn .card-tag { color: var(--amber); }

.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-top: 12px; }
.meta-grid .meta-key {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-4); margin-bottom: 3px;
}
.meta-grid .meta-val { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ---- 10. Tables -------------------------------------------------------------- */
.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--plate);
  margin: 18px 0;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top; color: var(--ink-2); line-height: 1.6;
}
thead th {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3);
  background: var(--paper-2);
}
tbody tr:last-child td { border-bottom: none; }
td strong, th strong { color: var(--ink); }

/* ---- 11. Steps (numbered) ----------------------------------------------------- */
.steps { counter-reset: step; margin: 18px 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 26px 54px;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.steps > li::after {
  content: ''; position: absolute; left: 17px; top: 40px; bottom: 6px;
  width: 1px; background: var(--line);
}
.steps > li:last-child::after { display: none; }
.steps > li:last-child { padding-bottom: 6px; }

/* ---- 12. FAQ details ------------------------------------------------------------ */
details.faqitem {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--plate);
  margin-bottom: 10px;
  overflow: hidden;
}
details.faqitem summary {
  cursor: pointer; padding: 17px 20px;
  font-weight: 600; font-size: 15px; color: var(--ink);
  list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  transition: background .15s;
}
details.faqitem summary:hover { background: var(--paper-2); }
details.faqitem summary::-webkit-details-marker { display: none; }
details.faqitem summary .tog {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  color: var(--ink-4); flex: none; transition: color .15s, transform .2s var(--ease);
}
details.faqitem[open] summary .tog { color: var(--accent); transform: rotate(45deg); }
details.faqitem[open] { border-color: var(--line-strong); }
details.faqitem .a { padding: 2px 20px 18px; font-size: 14.5px; color: var(--ink-2); }
details.faqitem .a p:last-child,
details.faqitem .a ul:last-child,
details.faqitem .a ol:last-child { margin-bottom: 0; }
details.faqitem .a ul { margin: 8px 0 0 18px; list-style: disc; }
details.faqitem .a li { margin-bottom: 6px; }
details.faqitem .a strong { color: var(--ink); }
details.faqitem .a a { color: var(--accent-ink); font-weight: 550; }
details.faqitem .a a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 13. Docs layout ----------------------------------------------------------- */
.doc-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  max-width: 1160px;
  margin: 0 auto;
  padding: 140px 24px 40px;
  gap: 52px;
}
.toc {
  position: sticky; top: 104px;
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 6px;
  font-size: 13px;
  scrollbar-width: thin;
}
.toc::-webkit-scrollbar { width: 4px; }
.toc::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.toc-title {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-4);
  margin: 22px 0 8px;
}
.toc-title:first-child { margin-top: 0; }
.toc a {
  display: block; padding: 5px 10px; margin-left: -10px;
  border-radius: 7px; color: var(--ink-2);
  border-left: 2px solid transparent;
  transition: color .15s, background .15s;
}
.toc a:hover { color: var(--ink); background: var(--paper-2); }
.toc a.active {
  color: var(--accent-ink); background: var(--accent-soft);
  border-left-color: var(--accent); font-weight: 600;
}

.doc { min-width: 0; }
.doc-hero { margin-bottom: 56px; padding-bottom: 40px; border-bottom: 1px solid var(--line-strong); }
.doc-hero h1 {
  font-size: clamp(32px, 4.6vw, 46px); font-weight: 600; line-height: 1.08;
  letter-spacing: -0.015em; margin: 14px 0 16px;
}
.doc-hero .lede { color: var(--ink-2); font-size: 16.5px; max-width: 660px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

section.doc-section { margin-bottom: 76px; scroll-margin-top: 100px; }
section.doc-section > h2 {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-size: 27px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 6px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}
section.doc-section > .lede { color: var(--ink-3); font-size: 15px; margin: 10px 0 26px; }
h3 { font-size: 17.5px; font-weight: 700; margin: 32px 0 12px; letter-spacing: -0.01em; }
h4 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }
p { color: var(--ink-2); font-size: 15px; margin-bottom: 13px; }
p a, li a { color: var(--accent-ink); font-weight: 550; }
p a:hover, li a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul.bullets, ol.numbs { margin: 0 0 15px 20px; color: var(--ink-2); font-size: 15px; }
ul.bullets { list-style: disc; }
ol.numbs { list-style: decimal; }
ul.bullets li, ol.numbs li { margin-bottom: 8px; }
ul.bullets li > ul, ol.numbs li > ul { margin-top: 8px; list-style: disc; }
strong { color: var(--ink); font-weight: 650; }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin: 18px 0; }
.mode-card { border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; background: var(--plate); }
.mode-card h4 { margin: 0 0 6px; }
.mode-card p { font-size: 13px; color: var(--ink-3); margin: 0; }
.mode-card .mode-keys { margin: 10px 0 4px; display: flex; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); align-items: center; }

.badge-beta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 2px 9px; border-radius: 999px;
  margin-left: 8px; vertical-align: middle;
  text-transform: uppercase;
}

.doc-footer { border-top: 1px solid var(--line-strong); padding-top: 30px; margin-top: 24px; }
.doc-footer .links { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13.5px; }

/* ---- 14. Support page -------------------------------------------------------- */
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 24px 0 8px; }
.path-card {
  display: block; border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 22px; background: var(--plate); color: inherit;
  transition: border-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease);
}
.path-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.path-card .ic {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.path-card .ic svg { width: 18px; height: 18px; }
.path-card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 5px; }
.path-card p { font-size: 13px; color: var(--ink-3); margin: 0 0 10px; }
.path-card .arr { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-ink); }

.bug-template {
  position: relative;
  background: var(--ink); border-radius: var(--r-m);
  padding: 20px 22px; overflow-x: auto;
  margin: 16px 0;
}
.bug-template pre {
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.75; color: #D8D2C4;
  white-space: pre-wrap; background: none; margin: 0; padding: 0;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(247,244,237,0.1); border: 1px solid rgba(247,244,237,0.25);
  color: #EDE8DD; font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 7px; cursor: pointer;
  transition: all .15s ease;
}
.copy-btn:hover { background: rgba(247,244,237,0.18); }
.copy-btn.copied { color: #7ED99A; border-color: rgba(126,217,154,0.5); }

.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; background: var(--plate); }
.contact-card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 9px; }
.contact-card h3 svg { width: 16px; height: 16px; color: var(--accent-ink); }
.contact-card p { font-size: 13.5px; color: var(--ink-3); margin-bottom: 12px; }
.contact-card .cc-link { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; color: var(--accent-ink); }

.sla { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.sla span {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; background: var(--plate);
}

/* ---- 15. Changelog timeline ---------------------------------------------------- */
.release { position: relative; padding: 0 0 48px 38px; border-left: 1px solid var(--line-strong); }
.release:last-child { border-left-color: transparent; padding-bottom: 0; }
.release::before {
  content: ''; position: absolute; left: -5.5px; top: 7px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 4px var(--paper);
  outline: 1px solid var(--line-strong);
}
.rel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.rel-head h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; }
.rel-tag {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.rel-tag.latest { background: var(--accent); color: #FFF8F2; }
.rel-tag.next { background: var(--accent-soft); color: var(--accent-ink); }
.rel-tag.stable { background: var(--green-soft); color: var(--green); }
.rel-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-4); }
.rel-body h3 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-3); margin: 20px 0 8px;
}
.rel-body p { color: var(--ink-2); font-size: 14.5px; margin: 12px 0 6px; }
.rel-body ul { margin: 6px 0 10px 18px; list-style: disc; color: var(--ink-2); font-size: 14.5px; }
.rel-body li { margin-bottom: 7px; }
.rel-body li > a, .rel-body p a { color: var(--accent-ink); font-weight: 550; }

.subscribe-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--plate); padding: 22px 24px; margin-bottom: 48px;
}
.subscribe-card p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---- 16. Legal policy pages ------------------------------------------------------ */
.policy-card {
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 28px 30px;
  margin-bottom: 16px;
  scroll-margin-top: 100px;
}
.policy-card h2 { font-size: 19px; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em; }
.policy-card h2 .card-index {
  font-family: var(--font-mono); color: var(--accent-ink); margin-right: 10px; font-size: 16px;
}
.policy-card p { font-size: 15px; color: var(--ink-2); line-height: 1.75; margin-bottom: 12px; }
.policy-card p:last-child { margin-bottom: 0; }
.policy-card ul { margin-top: 10px; }
.policy-card li {
  display: flex; gap: 12px; font-size: 15px; color: var(--ink-2);
  line-height: 1.7; margin-bottom: 9px;
}
.policy-card li::before {
  content: ''; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-top: 9px;
}
.policy-card a { color: var(--accent-ink); font-weight: 550; }
.policy-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.policy-card strong { color: var(--ink); font-weight: 650; }

.policy-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); margin-top: 14px; }
.policy-table { min-width: 560px; }
.policy-table thead th { background: var(--paper-2); }

.policy > .section-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 14px;
}
.policy > .section-label::after { content: ''; height: 1px; flex: 1; background: var(--line-strong); }
.policy > .lede { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; max-width: 720px; margin-bottom: 28px; }
.page-head .lede.updated { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-4); margin-top: 14px; }

.contact-note { margin-top: 40px; font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.contact-note a { color: var(--accent-ink); font-weight: 550; }

/* FAQ category header */
.faq-cat { margin-bottom: 56px; scroll-margin-top: 100px; }
.faq-cat > h2 {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-size: 23px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 13px;
  padding-bottom: 13px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}
.faq-cat > h2 .cat-chip {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
}
.faq-cat > h2 .cat-chip svg { width: 15px; height: 15px; }

.still-stuck {
  text-align: center; padding: 44px 28px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-l);
  margin-top: 24px;
}
.still-stuck h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.still-stuck p { color: var(--ink-3); font-size: 14.5px; margin-bottom: 20px; }

/* ---- 17. Scroll reveal ----------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ---- 18. Responsive --------------------------------------------------------------- */
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; padding-top: 128px; gap: 0; }
  .toc {
    position: static; max-height: none; overflow: visible;
    margin-bottom: 30px;
    border: 1px solid var(--line); border-radius: var(--r-m); background: var(--plate);
  }
  .toc-inner { display: none; padding: 6px 6px 12px; }
  .toc.open .toc-inner { display: block; }
  .toc-toggle {
    display: flex; width: 100%; align-items: center; justify-content: space-between;
    background: none; border: none; color: var(--ink);
    font: inherit; font-weight: 700; font-size: 14px;
    padding: 14px 18px; cursor: pointer;
  }
  .toc-toggle .chev { transition: transform .2s var(--ease); color: var(--ink-3); }
  .toc.open .toc-toggle .chev { transform: rotate(180deg); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 700px) {
  .head-links a:not(.btn) { display: none; }
  .head-crumb { display: none; }
  .page-main, .page-main.wide { padding-top: 120px; }
  .meta-grid { grid-template-columns: 1fr; }
  .policy-card { padding: 22px 18px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .sec-head { flex-direction: column; gap: 4px; }
}
