/* ─── site.css ────────────────────────────────────────────────────────────────
   The v2 master stylesheet: every component used on more than one page.
   Rules used by a single page live in /assets/css/pages/<page>.css instead.
   Rules: no inline styles, no page <style> blocks. Add a class here (or a
   modifier) rather than a one-off style.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Layout ────────────────────────────────────────────────────────────────── */
.wrap { width: var(--wrap); max-width: calc(100% - 48px); margin: 0 auto; position: relative; }

/* Page hero area (sits directly under the header) */
.stage { padding: 64px 24px 8px; }
.stage + .wrap > .sec:first-child { padding-top: 32px; }

.page-head { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.page-h1 {
  margin: 0; max-width: 26ch; text-wrap: pretty; text-transform: uppercase;
  font: 800 clamp(30px,4.4vw,58px)/1.04 var(--font-mono); letter-spacing: -1.6px;
  color: var(--fg-primary);
}
.page-sub { margin: 0; max-width: 66ch; font: 400 15px/24px var(--font-mono); color: var(--fg-muted); }
.page-head .ctas { justify-content: center; margin-top: 12px; }   /* hero buttons (/ugc/, feature pages) */

/* ── Sections ──────────────────────────────────────────────────────────────── */
.sec { padding: 72px 0; }
.sec + .sec { border-top: 1px dashed var(--brand-line); }
.sec + .sec.sec--flush { border-top: none; }   /* drop the rule between two sections */

.eyebrow { margin: 0; font: 700 11px/1 var(--font-mono); letter-spacing: 1.4px; color: var(--hint); text-transform: uppercase; }
.eyebrow--center { text-align: center; }
.sec-h {
  margin: 14px 0 0; max-width: 26ch; text-wrap: pretty;
  font: 800 40px/1.05 var(--font-mono); letter-spacing: -.4px; color: var(--fg-primary);
}
.sec-h--flush { margin-top: 0; }
.page-h1 em, .sec-h em { color: var(--brand); }
.sec-body + .sec-body { margin-top: 14px; }
.sec-body { margin: 16px 0 15px; max-width: 62ch; font: 400 15px/24px var(--font-mono); color: var(--fg-muted); }

/* Two-column section: copy left, list/visual right */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.split--end { align-items: end; }
.split > * { min-width: 0; }   /* wide content (code samples) scrolls inside its column instead of widening the page */

/* ── Solid orange band ─────────────────────────────────────────────────────── */
.band-solid { background: var(--brand); }
.band-solid .split { align-items: center; }
.band-solid .split--end { align-items: end; }
.band-solid .eyebrow,
.band-solid .sec-h,
.band-solid .sec-h em { color: var(--ink); }
.band-solid .sec-body { color: rgba(22,10,6,.72); }
.band-solid .sec-body strong { font-weight: 700; color: var(--ink); }   /* emphasis on orange: full-strength ink (white fails contrast here) */

/* ── Large buttons ─────────────────────────────────────────────────────────── */
.ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn-lg {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 20px; border: none; border-radius: 2px; cursor: pointer;
  background: var(--brand); color: var(--bg-base);
  font: 700 12px/1 var(--font-mono); letter-spacing: .8px; text-transform: uppercase;
  transition: background 100ms steps(10), color 100ms steps(10), border 100ms steps(10);
}
.btn-lg:hover { background: var(--brand-tint); color: var(--bg-base); }
.btn-lg.ghost { background: transparent; border: 1px solid var(--brand-stroke); color: var(--brand); }
.btn-lg.ghost:hover { background: var(--brand-bg); color: var(--brand); }
.band-solid .btn-lg { background: var(--ink); color: var(--brand); }
.band-solid .btn-lg:hover { background: var(--fg-primary); color: var(--ink); }
.band-solid .btn-lg.ghost { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.band-solid .btn-lg.ghost:hover { background: var(--ink); color: var(--brand); }

/* ── Numbered list (/ 01 …) ────────────────────────────────────────────────── */
.api-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.api-row {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  padding: 17px 0; border-bottom: 1px dashed var(--brand-line);
  font: 400 14px/20px var(--font-mono); color: var(--fg-secondary);
}
.api-row:first-child { border-top: 1px dashed var(--brand-line); }
.api-row i { font: 700 11px/1 var(--font-mono); font-style: normal; color: var(--hint); }
.api-row:hover { color: var(--fg-primary); }
.band-solid .api-row { color: var(--ink-body); border-color: var(--ink-line); }
.band-solid .api-row i { color: var(--ink-muted); }
.band-solid .api-row:hover { color: var(--ink); }

/* ── Inline numbered points (01 / …) ──────────────────────────────────────── */
.num-list { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; margin: 0; padding: 0; list-style: none; }
.num-list li { display: flex; gap: 10px; align-items: flex-start; font: 400 13px/20px var(--font-mono); color: var(--fg-muted); }
.num-list i { flex-shrink: 0; font-style: normal; font-weight: 700; color: var(--hint); }

/* ── Label / value list ────────────────────────────────────────────────────── */
.ff-list { display: flex; flex-direction: column; margin: 0; }
.ff-row dd { margin: 0; }
.ff-row {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px dashed var(--brand-line);
  font: 400 14px/20px var(--font-mono); color: var(--fg-secondary);
}
.ff-row:first-child { border-top: 1px dashed var(--brand-line); }
.ff-row dt { font: 700 11px/1 var(--font-mono); letter-spacing: 1px; color: var(--hint); text-transform: uppercase; }
.band-solid .ff-row { color: var(--ink-body); border-color: var(--ink-line); }
.band-solid .ff-row dt { color: var(--ink-muted); }
/* Plan cards on the orange band: dark cards, ink outline so they don't dissolve into the orange */
.band-solid .pbox { border-color: var(--ink); }
.band-solid .pbox .cm { border-color: var(--ink); }
.band-solid .pt-more { max-width: none; margin-top: 24px; }
.band-solid .pt-more a { color: var(--ink); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 3px; }

/* ── Pricing cards (rendered from _data/plans.json) ────────────────────────── */
.pgrid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin-top: 28px; }
.pgrid--4 { grid-template-columns: repeat(4,1fr); gap: 16px; }
.pgrid--3 { grid-template-columns: repeat(3,1fr); gap: 16px; }
.pbox {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 22px 20px; border: 1px dashed var(--brand); background: var(--bg-base);
}
.p-name { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 700 13px/1 var(--font-mono); letter-spacing: 1px; color: var(--brand); }
.tag { padding: 4px 6px; background: var(--hint); color: var(--bg-base); font: 700 9px/1 var(--font-mono); letter-spacing: .8px; }
.p-price { display: flex; align-items: baseline; gap: 8px; }
.p-amt { font: 800 40px/1 var(--font-mono); letter-spacing: -1.5px; color: var(--fg-primary); }
.p-per { font: 400 12px/1 var(--font-mono); color: var(--fg-muted); }
.p-desc { margin: 0; min-height: 60px; font: 400 13px/20px var(--font-mono); color: var(--fg-secondary); }
.p-cta {
  display: flex; justify-content: center; align-items: center; gap: 8px; height: 36px;
  border: 1px solid var(--brand-stroke); border-radius: 2px; background: transparent; color: var(--brand);
  font: 700 11px/1 var(--font-mono); letter-spacing: .8px; text-transform: uppercase;
  transition: background 100ms steps(10), color 100ms steps(10), border 100ms steps(10);
}
.p-cta:hover { background: var(--brand); color: var(--bg-base); }
.p-feats { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px dashed var(--divider-dim); }
.p-feat { display: flex; gap: 8px; align-items: flex-start; font: 400 12px/17px var(--font-mono); color: var(--fg-secondary); }
.p-feat::before {
  content: ""; display: block; width: 12px; height: 12px; flex-shrink: 0; margin-top: 3px;
  background: var(--success);
  -webkit-mask: url('/assets/icons/checkbox-on.svg') center/contain no-repeat;
  mask: url('/assets/icons/checkbox-on.svg') center/contain no-repeat;
}
.p-feat.off { color: var(--fg-muted); }
.p-feat.off::before {
  background: var(--fg-muted);
  -webkit-mask-image: url('/assets/icons/checkbox.svg'); mask-image: url('/assets/icons/checkbox.svg');
}
/* Featured ("most popular") card - solid orange */
.pbox.feat { background: var(--brand); border: 1px solid var(--brand); color: var(--ink); }
.pbox.feat .cm { border-color: var(--brand); }
.pbox.feat .p-name,
.pbox.feat .p-amt { color: var(--ink); }
.pbox.feat .tag { background: var(--ink); color: var(--brand); }
.pbox.feat .p-per { color: var(--ink-muted); }
.pbox.feat .p-desc,
.pbox.feat .p-feat { color: rgba(22,10,6,.84); }
.pbox.feat .p-feats { border-top-color: rgba(22,10,6,.4); }
.pbox.feat .p-feat::before { background: var(--ink); }
.pbox.feat .p-feat.off { color: var(--ink-muted); }
.pbox.feat .p-feat.off::before { background: var(--ink-muted); }
.pbox.feat .p-cta { background: var(--ink); border-color: var(--ink); color: var(--brand); }
.pbox.feat .p-cta:hover { background: var(--fg-primary); border-color: var(--fg-primary); color: var(--ink); }

/* ── FAQ accordion ─────────────────────────────────────────────────────────────
   Answers are always in the HTML. They only collapse once JS is running
   (html.js), so no-JS visitors and crawlers see every answer. Open/close is
   a CSS grid-rows transition, so there are no JS-set heights. */
.faq { display: flex; flex-direction: column; border-top: 1px dashed var(--brand-line); }
.faq-row { border-bottom: 1px dashed var(--brand-line); }
.faq-h { margin: 0; font: inherit; }
.faq-q {
  width: 100%; display: flex; gap: 16px; align-items: center;
  padding: 20px 2px; margin: 0; background: none; border: none; cursor: pointer; text-align: left;
  font: 700 14px/1.3 var(--font-mono); letter-spacing: .3px; color: var(--fg-primary); text-transform: uppercase;
  transition: color 60ms steps(1);
}
.faq-q:hover { color: var(--brand); }
.faq-n { flex-shrink: 0; font-weight: 400; color: var(--hint); }
.faq-sign { margin-left: auto; font-weight: 400; font-size: 16px; color: var(--brand); }
.faq-sign::before { content: "+"; }
.faq-row.open .faq-sign { color: var(--hint); }
.faq-row.open .faq-sign::before { content: "\2212"; }
.faq-a { display: grid; grid-template-rows: 1fr; }
.js .faq-a { grid-template-rows: 0fr; transition: grid-template-rows 180ms steps(6,end); }
.js .faq-row.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 2px 22px 46px; max-width: 78ch; font: 400 13px/22px var(--font-mono); color: var(--fg-muted); }

/* FAQ section: heading left, accordion right (homepage, /ugc/) */
.faq-wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 56px; align-items: start; margin-top: 22px; }
.faq-more { margin: 20px 0 0; font: 400 13px/1 var(--font-mono); color: var(--fg-muted); }

/* ── Final CTA - "access request" console ──────────────────────────────────── */
.final-box { width: 100%; margin: 64px auto 96px; }
.final-body {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 76px 40px 84px; background: var(--bg-terminal);
}
.final-body .sec-h { margin: 18px auto 0; max-width: 18ch; }
.final-body .sec-body { margin-inline: auto; }
.final-body .ctas { justify-content: center; }
.sys {
  display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px;
  border: 1px solid var(--danger); color: var(--danger);
  font: 700 10px/1 var(--font-mono); letter-spacing: 1.4px;
}

/* ── Reveal animation (shared) ─────────────────────────────────────────────────
   SEO-safe: text is never changed, only opacity / clip-path, and nothing
   shifts layout. Hidden states apply only under html.js; site.js adds .is-in to
   [data-reveal] in view, html.reveal-all (head failsafe in layouts/v2.njk) or
   reduced motion shows everything. 1ms linear = an instant cut (steps(1) can
   round to the hidden state at the end of a 1ms animation). */
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes vanish { from { opacity: 1; } to { opacity: 0; } }

/* ── "thinking..." beat (decorative: aria-hidden, label drawn by CSS) ─────── */
.think {
  display: flex; align-items: center; gap: 10px;
  font: 400 13px/1 var(--font-mono); color: var(--brand); pointer-events: none;
}
/* The word is picked at random per beat by site.js (data-word); "thinking"
   without JS. The dots step in by trimming the right edge (1, 2, 3 dots), so
   any word length works. */
.think::after {
  content: "thinking..."; display: block; white-space: nowrap; text-transform: lowercase;
  animation: think-dots 1.2s steps(3, end) infinite;
}
.think[data-word]::after { content: attr(data-word) "..."; }
@keyframes think-dots { from { clip-path: inset(0 2ch 0 0); } to { clip-path: inset(0 -1ch 0 0); } }
.think-icon {
  width: 14px; height: 14px; flex-shrink: 0; image-rendering: pixelated;
  background: url('/assets/thinking/frame-1.svg') center/contain no-repeat;
  animation: think-icon 700ms steps(1) infinite;
}
@keyframes think-icon {
  0%      { background-image: url('/assets/thinking/frame-1.svg'); }
  14.28%  { background-image: url('/assets/thinking/frame-2.svg'); }
  28.57%  { background-image: url('/assets/thinking/frame-3.svg'); }
  42.85%  { background-image: url('/assets/thinking/frame-4.svg'); }
  57.14%  { background-image: url('/assets/thinking/frame-5.svg'); }
  71.42%  { background-image: url('/assets/thinking/frame-6.svg'); }
  85.71%  { background-image: url('/assets/thinking/frame-7.svg'); }
}

/* ── Pricing: thinking beat, then cards wipe in left-to-right ────────────── */
/* Zero-height, sits just above the cards: overlays the (still hidden) grid, takes no space */
.plans-think { height: 0; justify-content: center; transform: translateY(80px); opacity: 0; }
@keyframes wipe-in { from { clip-path: inset(-2px calc(100% + 2px) -2px -2px); } to { clip-path: inset(-2px -2px -2px -2px); } }

.js:not(.reveal-all) .plans-reveal .eyebrow { opacity: 0; }
.js:not(.reveal-all) .plans-reveal .pbox { clip-path: inset(-2px calc(100% + 2px) -2px -2px); }

.js .plans-reveal.is-in .plans-think { animation: appear 1ms linear both, vanish 1ms 600ms linear forwards; }
.js .plans-reveal.is-in .eyebrow { animation: appear 1ms 600ms linear both; }
.js .plans-reveal.is-in .pbox { animation: wipe-in 320ms steps(9, end) both; }
.js .plans-reveal.is-in .pbox:nth-child(1) { animation-delay: 650ms; }
.js .plans-reveal.is-in .pbox:nth-child(2) { animation-delay: 740ms; }
.js .plans-reveal.is-in .pbox:nth-child(3) { animation-delay: 830ms; }
.js .plans-reveal.is-in .pbox:nth-child(4) { animation-delay: 920ms; }
.js .plans-reveal.is-in .pbox:nth-child(5) { animation-delay: 1010ms; }
/* Phone token section (pricing): heading and copy pop in after the eyebrow,
   the cards wipe in, then the "need more?" line */
.pt-reveal { --rv-start: 650ms; }
.js .pt-reveal.is-in .pbox:nth-child(1) { animation-delay: 800ms; }
.js .pt-reveal.is-in .pbox:nth-child(2) { animation-delay: 890ms; }
.js .pt-reveal.is-in .pbox:nth-child(3) { animation-delay: 980ms; }
.js .pt-reveal.is-in .pt-more.rv { animation-delay: 1350ms; }   /* .rv: outranks the generic [data-reveal] .rv delay */

/* ── Staggered section reveal (generic) ─────────────────────────────────────
   Put data-reveal on a section and class="rv" on the items that should pop in.
   site.js numbers the items (--i) when the section enters view; each shows at
   --rv-start + i x 50ms, after a centred "thinking..." beat (.sec-think). */
[data-reveal] { --rv-start: 700ms; }
.sec-think { height: 0; justify-content: center; opacity: 0; }
.band-solid .think { color: rgba(22,10,6,.7); }
.js:not(.reveal-all) [data-reveal] .rv { opacity: 0; }
.js [data-reveal].is-in .sec-think { animation: appear 1ms linear both, vanish 1ms 650ms linear forwards; }
.js [data-reveal].is-in .rv { animation: appear 1ms linear both; animation-delay: calc(var(--rv-start) + var(--i, 0) * 50ms); }

@media (prefers-reduced-motion: reduce) {
  .js .plans-reveal .eyebrow, .js .plans-reveal .pbox, .js [data-reveal] .rv { animation: none !important; opacity: 1 !important; clip-path: none !important; }
  .think { display: none; }
}

/* ── Prop for That reveal (generic) ──────────────────────────────────────────
   Driven by the prop-for-that library's --const-has-entered (0 -> 1, latched,
   never goes back). Markup:
     <section class="pft">                       the block that reveals
       <div class="eyebrow" data-props-for="visibility" data-props-to=".pft">
                                                 small sentinel at the top: when it's fully on
                                                 screen, the lib writes the var onto the .pft block
       <... class="pft-item">   pops in (instant cut)
       <... class="pft-wipe">   wipes in left-to-right (cards)
       <div class="think sec-think" aria-hidden="true">   optional "thinking..." beat
   A block's items stagger by their position among siblings (--i, nth-child
   ladder below): delay = --pft-start + i x 50ms (x 90ms for wipes).
   SEO / fallbacks: text never changes (opacity / clip-path only, no layout
   shift). Hidden only under html.js; before the lib writes a value the
   fallback is 0 (hidden) with JS, 1 (visible) without. html.reveal-all
   (head failsafe - also fires if the lib never loads) and reduced motion
   force everything visible. */
.pft { --pft-start: 700ms; --entered: var(--const-has-entered, 1); }
.js .pft { --entered: var(--const-has-entered, 0); }
.js.reveal-all .pft { --entered: 1; }
@media (prefers-reduced-motion: reduce) { .js .pft { --entered: 1; } }

.pft .pft-item {
  opacity: var(--entered);
  transition: opacity 1ms linear calc(var(--pft-start) + var(--i, 0) * 50ms);
}
.pft .pft-wipe {
  clip-path: inset(-2px calc((1 - var(--entered)) * (100% + 4px) - 2px) -2px -2px);
  transition: clip-path 320ms steps(9, end) calc(var(--pft-start) + var(--i, 0) * 90ms);
}
.pft :is(.pft-item, .pft-wipe):nth-child(1) { --i: 0; }
.pft :is(.pft-item, .pft-wipe):nth-child(2) { --i: 1; }
.pft :is(.pft-item, .pft-wipe):nth-child(3) { --i: 2; }
.pft :is(.pft-item, .pft-wipe):nth-child(4) { --i: 3; }
.pft :is(.pft-item, .pft-wipe):nth-child(5) { --i: 4; }
.pft :is(.pft-item, .pft-wipe):nth-child(6) { --i: 5; }
.pft :is(.pft-item, .pft-wipe):nth-child(7) { --i: 6; }
.pft :is(.pft-item, .pft-wipe):nth-child(8) { --i: 7; }
.pft :is(.pft-item, .pft-wipe):nth-child(9) { --i: 8; }
.pft :is(.pft-item, .pft-wipe):nth-child(10) { --i: 9; }
.pft :is(.pft-item, .pft-wipe):nth-child(11) { --i: 10; }
.pft :is(.pft-item, .pft-wipe):nth-child(12) { --i: 11; }
/* "thinking..." beat: plays once as the block enters (browsers without
   container style queries just skip it; the items still reveal) */
@container style(--const-has-entered: 1) {
  .pft .sec-think { animation: appear 1ms linear both, vanish 1ms 650ms linear forwards; }
}
@media (prefers-reduced-motion: reduce) { .pft .pft-item, .pft .pft-wipe { transition: none; } }

/* ── Document pages (legal, blog) ─────────────────────────────────────────────
   Single reading column: head (eyebrow, H1, meta row) + long-form .prose body.
   Used by layouts/legal.njk and the blog post template. */
.wrap--prose { --wrap: 780px; }   /* ~80 characters of SF Mono at 14px */
.doc-stage { padding: 64px 0 0; }   /* no side padding: head lines up with the column on mobile */
.doc-head { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; border-bottom: 1px dashed var(--brand-line); }
.doc-h1 { max-width: 24ch; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -1px; }
.doc-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0;
  font: 400 12px/1 var(--font-mono); letter-spacing: .4px; color: var(--fg-muted);
}
.doc-meta > :not(.tag) { display: inline-flex; align-items: center; gap: 8px; }
.doc-meta > :not(.tag)::before { content: ""; width: 6px; height: 6px; background: var(--brand); }
.doc-meta .tag { background: none; border: 1px solid var(--brand-stroke); color: var(--brand); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; }

.prose { padding: 12px 0 96px; font: 400 14px/1.7 var(--font-mono); color: var(--fg-secondary); }
.prose h2 {
  margin: 44px 0 16px; padding-top: 28px; border-top: 1px dashed var(--brand-line);
  font: 800 20px/1.25 var(--font-mono); letter-spacing: -.2px; color: var(--fg-primary); text-wrap: pretty;
}
.prose > h2:first-child { margin-top: 20px; padding-top: 0; border-top: none; }
.prose h3 { margin: 28px 0 12px; font: 700 12px/1.3 var(--font-mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--hint); }
.prose h4 { margin: 22px 0 10px; font: 700 14px/1.4 var(--font-mono); color: var(--fg-primary); }
.prose p { margin: 0 0 14px; }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 3px; }
.prose a:hover { color: var(--fg-primary); }
.prose a u { text-decoration: none; }
.prose strong { font-weight: 700; color: var(--fg-primary); }
.prose address { margin: 0 0 14px; font-style: normal; }
.prose hr { margin: 28px 0; border: 0; border-top: 1px dashed var(--brand-line); }
.prose img { display: block; max-width: 100%; height: auto; margin: 22px 0; border: 1px dashed var(--brand-line-strong); }
.prose blockquote {
  margin: 18px 0; padding: 14px 20px; border-left: 2px solid var(--brand);
  background: var(--bg-elevated); color: var(--fg-primary);
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code { font: inherit; color: var(--fg-primary); }
.prose pre {
  margin: 18px 0; padding: 18px 20px; overflow-x: auto;
  background: var(--bg-elevated); border: 1px solid var(--brand-line); font-size: 13px; line-height: 1.6;
}

/* Ordered lists: "01 /" counters, restarting per list (legal clause numbering relies on this) */
.prose ol { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: prose-ol; }
.prose ol > li { position: relative; padding-left: 40px; counter-increment: prose-ol; }
.prose ol > li::before {
  content: counter(prose-ol, decimal-leading-zero) " /";
  position: absolute; left: 0; top: 0; font-weight: 700; letter-spacing: .4px; color: var(--hint);
}
/* Unordered lists: small brand square */
.prose ul { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; background: var(--brand); }
.prose li > p { margin: 0; }   /* CMS rich text wraps list items in <p> */

/* Tables. CMS tables have no <th>, so a first row of bold cells reads as the header. */
.prose table { width: 100%; margin: 6px 0 22px; border-collapse: collapse; border-top: 1px dashed var(--brand-line); font: 400 13px/1.45 var(--font-mono); }
.prose th, .prose td { padding: 11px 12px; border-bottom: 1px dashed var(--brand-line); text-align: left; vertical-align: top; }
.prose td > p { margin: 0; }
.prose th, .prose tbody tr:first-child td:has(> p > strong:only-child) { font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--hint); }
.prose tbody tr:first-child td:has(> p > strong:only-child) strong { color: inherit; }

@media (max-width:640px) {
  .prose h2 { font-size: 18px; }
  .prose ol > li { padding-left: 34px; }
  .prose table { display: block; overflow-x: auto; }   /* scrolls sideways... */
  .prose th, .prose td { min-width: 132px; }            /* ...with readable columns */
}

/* ── Contact modal (v2/contact-modal.njk) ─────────────────────────────────────
   A console window over a dimmed page. Opened by [data-contact-open] (site.js). */
.ctm[hidden], .ctm [hidden] { display: none; }   /* beats .ctm / .ctm-success display rules */
.ctm { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ctm-backdrop { position: absolute; inset: 0; background: rgba(10,11,14,.8); }
.ctm-box { width: 100%; max-width: 480px; max-height: calc(100vh - 40px); }
.ctm-box .ab-top { padding-right: 8px; }
.ctm-close {
  margin-left: auto; padding: 0 6px; background: none; border: 0; cursor: pointer;
  font: 400 20px/1 var(--font-mono); color: var(--fg-muted);
}
.ctm-close:hover { color: var(--brand); }
.ctm-body { overflow-y: auto; padding: 26px 24px 24px; background: var(--bg-terminal); }
.ctm-title { margin: 0 0 10px; font: 800 20px/1.2 var(--font-mono); letter-spacing: -.2px; color: var(--fg-primary); text-transform: uppercase; }
.ctm-title--ok { color: var(--success); }
.ctm-desc { margin: 0 0 18px; font: 400 13px/1.6 var(--font-mono); color: var(--fg-muted); }
.ctm-form { display: flex; flex-direction: column; gap: 14px; }
.ctm-field { display: flex; flex-direction: column; gap: 6px; }
.ctm-label { font: 700 11px/1 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--hint); }
.ctm-form input, .ctm-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--brand-line); border-radius: 0;
  background: var(--bg-base); font: 400 13px/1.4 var(--font-mono); color: var(--fg-primary);
}
.ctm-form textarea { min-height: 96px; resize: vertical; }
.ctm-form input::placeholder { color: var(--fg-muted); }
.ctm-form input:focus, .ctm-form textarea:focus { outline: none; border-color: var(--brand); }
.ctm-form [aria-invalid="true"] { border-color: var(--danger); }
.ctm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ctm-error { margin: 0; font: 400 12px/1.4 var(--font-mono); color: var(--danger); }
.ctm-submit { justify-content: center; }
.ctm-submit[disabled] { opacity: .6; cursor: default; }
.ctm-success { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
html.ctm-open { overflow: hidden; }   /* no page scroll behind the modal */

/* Open / close: same "console boot" as the homepage hero, in hard steps.
   In: backdrop steps in, title bar draws out from the centre, box opens down.
   Out: the reverse. site.js waits for the out animation before hiding. */
@keyframes ctm-box-in {
  0%   { clip-path: inset(-2px 50% calc(100% - 29px) 50%); animation-timing-function: steps(6, end); }
  40%  { clip-path: inset(-2px -2px calc(100% - 29px) -2px); animation-timing-function: steps(9, end); }
  100% { clip-path: inset(-2px -2px -2px -2px); }
}
@keyframes ctm-box-out {
  0%   { clip-path: inset(-2px -2px -2px -2px); animation-timing-function: steps(7, end); }
  55%  { clip-path: inset(-2px -2px calc(100% - 29px) -2px); animation-timing-function: steps(5, end); }
  100% { clip-path: inset(-2px 50% calc(100% - 29px) 50%); }
}
@keyframes ctm-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ctm-fade-out { from { opacity: 1; } to { opacity: 0; } }
.ctm:not([hidden]) .ctm-box      { animation: ctm-box-in 340ms both; }
.ctm:not([hidden]) .ctm-backdrop { animation: ctm-fade-in 200ms steps(4, end) both; }
.ctm.is-closing .ctm-box         { animation: ctm-box-out 260ms both; }
.ctm.is-closing .ctm-backdrop    { animation: ctm-fade-out 260ms steps(4, end) both; }
@media (prefers-reduced-motion: reduce) {
  .ctm .ctm-box, .ctm .ctm-backdrop { animation: none !important; }
}

/* ── Wide-left split: copy gets the larger column (/our-data/, feature pages) ── */
.split--wide-left { grid-template-columns: minmax(0,3fr) minmax(0,2fr); }
.split--wide-left .sec-body { max-width: none; }

/* ── Step cards: "01 /", title, text (/how-it-works/, feature pages) ──────── */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.step {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px 20px 24px; background: var(--bg-elevated); border: 1px dashed var(--brand-line-strong);
}
.step b { font: 700 16px/1 var(--font-mono); letter-spacing: 1px; color: var(--brand); }
.step-h { margin: 0; font: 700 16px/1.3 var(--font-mono); letter-spacing: .4px; color: var(--fg-primary); text-transform: lowercase; }
.step p { margin: 0; font: 400 14px/22px var(--font-mono); color: var(--fg-muted); }

/* ── Record cards (/our-data/, feature pages) ─────────────────────────────── */
.recs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 28px; }
.rec {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px;
  background: var(--bg-elevated); border: 1px dashed var(--brand-line-strong);
}
.rec-h { margin: 0; font: 700 12px/1 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--brand); }
.rec p { margin: 0; font: 400 14px/22px var(--font-mono); color: var(--fg-muted); }

/* ── JSON payload sample (/our-data/, feature pages) ──────────────────────── */
.pre {
  margin: 0; padding: 22px; overflow-x: auto; white-space: pre;
  background: var(--bg-elevated); border: 1px solid var(--brand-line);
  font: 400 13px/21px var(--font-mono); color: var(--fg-secondary);
}
.pre code { font: inherit; }
.pre .k { color: var(--brand); }
.pre .v { color: var(--success); }

/* ── In-page form card (/data-sales/, /ugc/) ──────────────────────────────────
   A card like the pricing plan cards (.pbox). Fields use the .ctm-field /
   .ctm-label / .ctm-form input styles above; these rules add the card, a
   two-column field grid, selects, checkboxes and inline field errors. */
.form-card {
  position: relative; max-width: 760px; margin: 0 auto;
  padding: 32px 32px 28px; border: 1px dashed var(--brand); background: var(--bg-base);
}
.form-card [hidden] { display: none; }   /* beats .ctm-form / .ctm-success display rules outside .ctm */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.form-full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.form-grid textarea { min-height: 128px; }
.form-card .ctm-success { padding: 8px 0; }
.form-card .ctm-success:focus { outline: none; }

.ctm-form select {
  width: 100%; padding: 11px 36px 11px 12px; border: 1px solid var(--brand-line); border-radius: 0;
  background: var(--bg-base); font: 400 13px/1.4 var(--font-mono); color: var(--fg-primary);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  /* chevron: two gradients forming a "v" at the right edge */
  background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%), linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.ctm-form select:focus { outline: none; border-color: var(--brand); }
.ctm-form select:invalid { color: var(--fg-muted); }   /* placeholder option still selected */
.ctm-form option { color: var(--fg-primary); background: var(--bg-base); }
.ctm-form :disabled:not(.ctm-submit) { opacity: .5; cursor: not-allowed; }

/* Inline error under a field; linked to it with aria-describedby */
.field-error { margin: 0; font: 400 12px/1.4 var(--font-mono); color: var(--danger); }

/* Checkbox row. The real input stays in the page (visually hidden, still
   focusable and announced); .check-box draws the pixel box, so a mask never
   clips the focus ring. */
.check { position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font: 400 13px/20px var(--font-mono); color: var(--fg-secondary); }
/* Beats .ctm-form input (full width, padding, border) for the hidden native box */
.ctm-form .check input { position: absolute; top: 2px; left: 0; width: 16px; height: 16px; margin: 0; padding: 0; border: 0; opacity: 0; }
.check-box {
  flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; position: relative;
}
.check-box::before {
  content: ""; position: absolute; inset: 0; background: var(--brand);
  -webkit-mask: url('/assets/icons/checkbox.svg') center/contain no-repeat;
  mask: url('/assets/icons/checkbox.svg') center/contain no-repeat;
}
.check input:checked + .check-box::before { -webkit-mask-image: url('/assets/icons/checkbox-on.svg'); mask-image: url('/assets/icons/checkbox-on.svg'); }
.check input[aria-invalid="true"] + .check-box::before { background: var(--danger); }
.check input:focus-visible + .check-box { outline: 2px solid var(--hint); outline-offset: 3px; }
.check a { color: var(--brand); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 3px; }

/* Keyboard focus in the card (text fields show focus with their border) */
.form-card button:focus-visible, .form-card a:focus-visible { outline: 2px solid var(--hint); outline-offset: 3px; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width:1180px) {
  .pgrid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width:1040px) {
  .pgrid, .pgrid--4 { grid-template-columns: repeat(2,1fr); }
  .pgrid--3 { grid-template-columns: repeat(3,1fr); }   /* three cards stay in a row until phone width */
  .split { grid-template-columns: 1fr; gap: 36px; }
  .faq-wrap { grid-template-columns: 1fr; gap: 28px; }
  .split--wide-left { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; }
  .recs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ff-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .num-list { flex-direction: column; }
}
@media (max-width:640px) {
  .pgrid, .pgrid--4, .pgrid--3 { grid-template-columns: 1fr; }
  .sec { padding: 52px 0; }
  .final-body { padding: 52px 20px 56px; }
  .form-card { padding: 24px 18px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .ctm-submit { width: 100%; }
}
