/* ============================================================================
   Folio — Refract, an image API published as a magazine.
   White paper, black ink, one editorial blue. Three voices, split by role.
   Radius 0 everywhere. Hairlines, not elevation. No box-shadow anywhere.
   ============================================================================ */

/* ---------- Fonts (self-hosted woff2, no CDN) ------------------------------ */

/* Display — Playfair Display, weight 400 only. Never bolded. lnum available. */
@font-face {
  font-family: "Playfair Display";
  src: url("./assets/fonts/playfair-display-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Body — Source Serif 4, roman + italic, weight 400. opsz axis retained.
   Full layout features preserved (onum, smcp, lnum, tnum, case). */
@font-face {
  font-family: "Source Serif 4";
  src: url("./assets/fonts/source-serif-4-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("./assets/fonts/source-serif-4-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Sans — Manrope 400/500/600/700. tnum + case preserved. */
@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens --------------------------------------------------------- */

:root {
  /* Palette — white paper, black ink, one editorial blue (two stops). */
  --paper: #ffffff;
  --paper-tint: #f5f5f5;
  --ink: #000000;
  --ink-soft: #1a1a1a;
  --ink-meta: #6b6b6b;
  --on-ink: #ffffff;
  --rule: #e0e0e0;
  --blue: #057dbc;       /* rules & non-text marks only */
  --blue-deep: #04618f;  /* every blue that carries text */

  /* Type families */
  --serif-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Spacing — 4px base unit (2 4 8 12 16 20 24 32 48 64 96) */
  --s2: 2px;  --s4: 4px;  --s8: 8px;  --s12: 12px; --s16: 16px;
  --s20: 20px; --s24: 24px; --s32: 32px; --s48: 48px; --s64: 64px; --s96: 96px;

  /* Layout */
  --container: 1200px;
  --measure: 680px;   /* the article measure — never widens */
  --outer: 300px;     /* the outer column */

  /* Rules */
  --hair: 1px solid var(--rule);
  --bound: 1px solid var(--ink);
  --heavy: 2px solid var(--ink);
  --mark: 2px solid var(--blue);
}

/* ---------- Reset / base --------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--serif-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: "onum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Radius is 0 on every element. No exceptions, no rounding, no circles. */
* { border-radius: 0 !important; }

/* No box-shadow anywhere, at rest or on hover. */
* { box-shadow: none !important; }

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

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

/* The single focus mark: 2px --ink outline at a 2px offset. Never removed. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s24); }
.measure { max-width: var(--measure); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type roles ----------------------------------------------------- */

.t-display-xxl { font-family: var(--serif-display); font-weight: 400; font-size: 64px; line-height: .95; letter-spacing: -0.5px; margin: 0; }
.t-display-xl  { font-family: var(--serif-display); font-weight: 400; font-size: 48px; line-height: 1.05; letter-spacing: -0.4px; margin: 0; }
.t-display-l   { font-family: var(--serif-display); font-weight: 400; font-size: 32px; line-height: 1.1; letter-spacing: -0.3px; margin: 0; }
.t-display-m   { font-family: var(--serif-display); font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: 0; margin: 0; }

.t-figure { font-family: var(--serif-display); font-weight: 400; font-size: 48px; line-height: 1.0; letter-spacing: -0.5px; font-feature-settings: "lnum" 1; }
.t-price  { font-family: var(--serif-display); font-weight: 400; font-size: 40px; line-height: 1.0; letter-spacing: -0.4px; font-feature-settings: "lnum" 1; }
.t-step   { font-family: var(--serif-display); font-weight: 400; font-size: 32px; line-height: 1.0; letter-spacing: 0; font-feature-settings: "lnum" 1; }

.t-deck   { font-family: var(--serif-body); font-weight: 400; font-style: italic; font-size: 22px; line-height: 1.45; font-feature-settings: "onum" 1; margin: 0; }
.t-lead   { font-family: var(--serif-body); font-weight: 400; font-size: 19px; line-height: 1.55; font-feature-settings: "onum" 1; }
.t-body   { font-family: var(--serif-body); font-weight: 400; font-size: 16px; line-height: 1.6; font-feature-settings: "onum" 1; }
.t-body-s { font-family: var(--serif-body); font-weight: 400; font-size: 15px; line-height: 1.55; font-feature-settings: "onum" 1; }

.t-running-head, .t-eyebrow, .t-standing-head, .t-table-head {
  font-family: var(--sans); font-weight: 700; text-transform: uppercase;
  font-feature-settings: "case" 1;
}
.t-running-head { font-size: 11px; line-height: 1.2; letter-spacing: 1.4px; }
.t-eyebrow      { font-size: 12px; line-height: 1.2; letter-spacing: 1.4px; }
.t-standing-head{ font-size: 12px; line-height: 1.2; letter-spacing: 1.4px; }
.t-table-head   { font-size: 12px; line-height: 1.2; letter-spacing: 1.2px; }

.t-nav    { font-family: var(--sans); font-weight: 700; font-size: 14px; line-height: 1.3; letter-spacing: 0.4px; }
.t-button { font-family: var(--sans); font-weight: 700; font-size: 16px; line-height: 1.25; letter-spacing: 0.3px; }
.t-key    { font-family: var(--sans); font-weight: 600; font-size: 14px; line-height: 1.3; }
.t-data   { font-family: var(--sans); font-weight: 500; font-size: 15px; line-height: 1.5; font-feature-settings: "tnum" 1; }
.t-listing{ font-family: var(--sans); font-weight: 400; font-size: 15px; line-height: 1.7; font-feature-settings: "tnum" 1; }
.t-url    { font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.5; letter-spacing: 0.2px; font-feature-settings: "tnum" 1; }
.t-caption{ font-family: var(--sans); font-weight: 400; font-size: 12px; line-height: 1.4; color: var(--ink-meta); }
.t-folio  { font-family: var(--sans); font-weight: 400; font-size: 12px; line-height: 1.2; letter-spacing: 0.6px; }

/* The four-word run-in after the drop cap — true small caps, roman only. */
.run-in { font-feature-settings: "smcp" 1; letter-spacing: 0.6px; }

/* Inline link — the only place blue meets text besides the validation message. */
.link { color: var(--blue-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- Masthead + nav ------------------------------------------------- */

.masthead {
  border-top: var(--hair);
  border-bottom: var(--hair);
  padding: var(--s12) var(--s24);
  text-align: center;
}
.wordmark { display: inline-block; color: var(--ink); }

.nav {
  border-bottom: var(--hair);
}
.nav-inner {
  display: flex;
  gap: var(--s24);
  align-items: center;
  justify-content: center;
  padding: var(--s12) 0;
}
.nav-link {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: var(--s4);
  border-bottom: 2px solid transparent;
}
.nav-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav-link[aria-current="page"],
.nav-link.is-active {
  border-bottom: var(--mark);  /* 2px --blue rule beneath the active link */
}

/* ---------- Running head + folio ------------------------------------------ */

.running-head {
  border-top: var(--hair);
  border-bottom: var(--hair);
  padding: var(--s8) 0;
  color: var(--ink-meta);
  display: flex;
  justify-content: space-between;
  gap: var(--s16);
}
.folio {
  border-top: var(--hair);
  border-bottom: var(--hair);
  padding: var(--s16) 0;
  text-align: center;
  color: var(--ink-meta);
  margin-top: var(--s64);
}

/* ---------- Sections ------------------------------------------------------- */

.band { padding: var(--s64) 0; }
.band-cover { padding: var(--s96) 0; }

.eyebrow { color: var(--ink-meta); display: block; margin-bottom: var(--s16); }
.deck { color: var(--ink-soft); }

.rule-hair  { border: 0; border-top: var(--hair); margin: var(--s24) 0; }
.rule-heavy { border: 0; border-top: var(--heavy); margin: var(--s24) 0; }

/* ---------- Cover ---------------------------------------------------------- */

.cover .t-display-xxl { margin-bottom: var(--s20); max-width: var(--measure); }
.cover .deck { max-width: var(--measure); margin-bottom: var(--s24); }
.cover-hairline { border: 0; border-top: var(--hair); margin: var(--s24) 0 var(--s32); }

/* ---------- Plate + caption ----------------------------------------------- */

.plate { margin: 0; }
.plate img {
  width: 100%;
  height: auto;
  display: block;
  /* no border, no radius, no shadow, no overlay, no scrim */
}
.plate figcaption { margin-top: var(--s8); }

/* ---------- The lead + drop cap ------------------------------------------- */

.lead-block { max-width: var(--measure); }
.lead { margin: 0; }
.dropcap {
  font-family: var(--serif-display);
  font-weight: 400;
  color: var(--ink);
  float: left;
  font-size: 6.3em;      /* ~3 lines of the 19px/1.55 lead */
  line-height: 0.66;
  padding: 0.02em 0.09em 0 0;
  margin: 0.04em 0 0 0;
}

/* ---------- Capability trio (three columns of the grid, not cards) -------- */

.cap-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.cap-col { padding: 0 var(--s32); }
.cap-col:first-child { padding-left: 0; }
.cap-col:last-child { padding-right: 0; }
.cap-col + .cap-col { border-left: var(--hair); }  /* 1px column rules between columns */
.cap-col .plate { margin-bottom: var(--s16); }
.cap-col h3 { margin: var(--s16) 0 var(--s12); }
.cap-col p { margin: 0; color: var(--ink-soft); }

/* ---------- Article grid (measure + outer column) ------------------------- */

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) var(--outer);
  column-gap: var(--s48);
}
.article-grid .outer-col {
  border-left: var(--hair);   /* the 1px column rule */
  padding-left: var(--s48);
}
.article-main { min-width: 0; }

/* ---------- Live-transform demo (Signature 1 & 2) ------------------------- */

.demo-figure { margin: 0; }
.demo-plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
}
.plate-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plate-frame > img { width: 100%; height: 100%; object-fit: cover; }
/* right output plate: an inner canvas the transform paints into. Its
   aspect-ratio is the output box (w:h, or the source's own when h is unset);
   the frame around it is the plate mount, in paper. */
.plate-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 100%;
  overflow: hidden;
  background: transparent;
}
.plate-canvas img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* The live caption — the site's one control surface. */
.live-caption {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  font-feature-settings: "tnum" 1;
  color: var(--ink-meta);
  margin: var(--s16) 0 0;
}
.live-caption .fig-no { color: var(--ink-meta); }
.caption-server { display: block; margin-top: var(--s8); color: var(--ink-meta); }

/* An editable value: --ink at 600 among running words in --ink-meta at 400. */
.cv {
  color: var(--ink);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  display: inline;
  border-bottom: 1px solid transparent;
  padding: 0 1px;
  white-space: nowrap;
}
.cv[data-kind="num"] { cursor: ew-resize; }
.cv[data-kind="enum"], .cv[data-kind="hex"] { cursor: pointer; }
.cv:hover { border-bottom: var(--bound); }   /* the writing rule */
.cv.is-editing { border-bottom: var(--bound); }
.cv.is-frozen { display: inline-block; text-align: left; }
.hex-hash { color: var(--ink-meta); }

/* caption list — hung beneath an enum word, in the flow, no box/border/fill */
.caption-list {
  list-style: none;
  margin: var(--s4) 0 var(--s8);
  padding: 0;
  border-bottom: var(--hair);   /* a hairline closes the list */
}
.caption-list li {
  padding: var(--s2) 0;
}
.caption-list button {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  color: var(--ink-meta);
  padding: var(--s4) 0;
  border-bottom: 2px solid transparent;
  text-align: left;
}
.caption-list li[aria-selected="true"] button {
  color: var(--ink);
  font-weight: 600;
  border-bottom: var(--mark);   /* 2px --blue rule beneath the current option */
}

/* caption stepper — coarse pointers, present only while a numeral has focus */
.caption-stepper {
  display: inline-flex;
  gap: var(--s4);
  margin-left: var(--s8);
  vertical-align: middle;
}
.caption-stepper button {
  width: 24px;
  height: 24px;
  border: var(--bound);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1;
  /* padded out to a 44px touch target via an inset shadow-free hit area */
  position: relative;
}
.caption-stepper button::after {
  content: "";
  position: absolute;
  top: -10px; bottom: -10px; left: -10px; right: -10px;
}

/* validation message — same blue as a link, no error red */
.caption-invalid {
  color: var(--blue-deep);
  margin-top: var(--s8);
}

/* ---------- Credit line (the URL beneath the caption) --------------------- */

.credit-line {
  border-top: var(--hair);
  margin-top: var(--s16);
  padding-top: var(--s16);
  display: flex;
  align-items: center;
  gap: var(--s16);
  justify-content: space-between;
}
.credit-url { color: var(--ink); word-break: break-all; }
.credit-url .p-live { color: var(--ink); }   /* what happened in this browser */
.credit-url .p-meta { color: var(--ink-meta); } /* daggered edge params */
.credit-url .p-sep { color: var(--ink-meta); }

/* ---------- Shoulder note + footnote (marginal instruments) --------------- */

.shoulder-note {
  font-family: var(--serif-body);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "onum" 1;
  color: var(--ink-soft);
  text-align: left;               /* ragged right */
  border-top: var(--hair);
  padding-top: var(--s12);
}
.footnote {
  font-family: var(--serif-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "onum" 1;
  color: var(--ink-soft);
  border-top: var(--hair);
  padding-top: var(--s12);
  margin-top: var(--s16);
}
.footnote .dagger, .spec-table .dagger { color: var(--ink); }
.tok { font-family: var(--sans); font-weight: 600; font-size: 0.92em; }

/* stacked notes beneath the credit line, below 1024px */
.notes-below { margin-top: var(--s24); }
.notes-below .shoulder-note { border-top: var(--hair); }
.notes-below .footnote { border-top: var(--hair); margin-top: var(--s16); }

/* ---------- BY THE NUMBERS (stats band) ----------------------------------- */

.stats-head { margin-bottom: var(--s24); color: var(--ink-meta); }
.stats-band {
  border-top: var(--heavy);      /* bracketed by a 2px --ink rule above */
  border-bottom: var(--hair);    /* and a hairline below */
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-cell {
  padding: var(--s32) var(--s24);
}
.stat-cell + .stat-cell { border-left: var(--hair); }
.stat-fig { color: var(--ink); display: block; }
.stat-label { margin-top: var(--s12); color: var(--ink-meta); }

/* ---------- Buttons -------------------------------------------------------- */

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--on-ink);
  height: 48px;
  padding: 0 var(--s24);
  text-decoration: none;
  transition: background 120ms ease-out;
}
.button-primary:hover, .button-primary:active { background: var(--ink-soft); }

.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  border: var(--bound);
  height: 48px;
  padding: 0 var(--s24);
  text-decoration: none;
}
.button-outline:hover { text-decoration: underline; text-underline-offset: 3px; }

/* CTA band — hairline-bracketed, one black button */
.cta-band {
  border-top: var(--hair);
  border-bottom: var(--hair);
  text-align: center;
}
.cta-band p { max-width: var(--measure); margin: 0 auto var(--s24); }

/* ---------- Quickstart (docs) --------------------------------------------- */

.quickstart-step { position: relative; margin-bottom: var(--s48); }
.step-list { counter-reset: none; }
.step-num {
  color: var(--ink);
  display: block;
  margin-bottom: var(--s12);
}
.step-body { }
@media (min-width: 1024px) {
  .quickstart-step { padding-left: 64px; }
  .step-num {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
  }
}

/* SDK listing — the only tinted surface. Ruled line numbers in the margin. */
.listing {
  background: var(--paper-tint);
  border-top: var(--heavy);       /* 2px --ink rule above */
  border-bottom: var(--hair);     /* 1px hairline below */
  padding: var(--s32);
  position: relative;
}
.listing-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--s16);
}
.listing-code {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--s16);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  font-feature-settings: "tnum" 1;
  color: var(--ink-soft);
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}
.listing-nums {
  text-align: right;
  color: var(--ink-meta);
  border-right: var(--hair);      /* 1px --rule vertical behind the numbers */
  padding-right: var(--s16);
  user-select: none;
}
.listing-lines { min-width: 0; }
.listing-code b { font-weight: 700; }

/* ---------- Standing box (AT A GLANCE, docs outer column) ----------------- */

.standing-box {
  border-top: var(--heavy);   /* 2px --ink rule on top */
}
.standing-box .standing-head { display: block; padding: var(--s12) 0 var(--s8); color: var(--ink-meta); }
.standing-box .standing-deck { color: var(--ink-soft); margin: 0 0 var(--s16); }
.standing-box .ledger { border-bottom: var(--hair); }

/* ---------- Ledger rows ---------------------------------------------------- */

.ledger { }
.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s16);
  padding: var(--s12) 0;
  border-top: var(--hair);
}
.ledger-row:first-child { border-top: var(--hair); }
.ledger-label { color: var(--ink); }
.ledger-value { color: var(--ink); text-align: right; }

/* ---------- Spec table (Signature 3) -------------------------------------- */

.table-wrap { overflow-x: auto; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border-top: var(--heavy);       /* 2px --ink rule above the head */
  border-bottom: var(--heavy);    /* 2px --ink rule closing the block */
}
.spec-table thead th {
  border-bottom: var(--hair);     /* 1px hairline beneath the head */
  color: var(--ink);
  text-align: left;
  padding: var(--s12) var(--s16) var(--s12) 0;
  vertical-align: bottom;
}
.spec-table tbody td {
  border-top: var(--hair);        /* 1px hairlines between rows */
  padding: var(--s12) var(--s16) var(--s12) 0;
  vertical-align: top;
}
.spec-table tbody tr:first-child td { border-top: 0; }
.col-param { color: var(--ink); white-space: nowrap; }
.col-values { color: var(--ink); }
.col-default { color: var(--ink-meta); }
.col-desc { color: var(--ink-soft); }
.em-dash { color: var(--ink-meta); }

/* ---------- Tier table (three columns of one printed table) --------------- */
/* Desktop: one printed comparison table, row-major grid. No striping, no card. */

.tier-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  border-bottom: var(--heavy);      /* 2px --ink rule closes the block */
}
.tier-grid .cell { padding: var(--s16); border-top: var(--hair); }
.tier-grid .corner { border-top: 0; border-bottom: var(--heavy); }
.tier-grid .th {
  border-top: 0;
  border-bottom: var(--heavy);      /* heavy rule under the tier heads */
  padding: var(--s16);
}
.tier-grid .cta-corner { border-top: 0; }
.tier-grid .cta { border-top: 0; padding: var(--s24) var(--s16) 0; }
.tier-grid .cta .button-outline { width: 100%; }

.tier-name { display: block; margin-bottom: var(--s8); color: var(--ink); }
.tier-price { color: var(--ink); }
.tier-price .per { font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: 0; color: var(--ink-meta); }
.tier-rowlabel { color: var(--ink); }
.tier-value { color: var(--ink); }

/* Mobile: three stacked ruled blocks — never three cards. */
.tier-stack { display: none; }
.tier-block { border-top: var(--heavy); padding: var(--s16) 0 var(--s24); }
.tier-block .tier-name { font-size: 26px; }
.tier-block .tier-price { display: block; margin-bottom: var(--s16); }
.tier-block .button-outline { width: 100%; margin-top: var(--s16); }

/* ---------- FAQ ------------------------------------------------------------ */

.faq { max-width: var(--measure); }
.faq-row { border-top: var(--hair); }
.faq-row:last-child { border-bottom: var(--hair); }
.faq-row > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s16);
  padding: var(--s20) 0;
}
.faq-row > summary::-webkit-details-marker { display: none; }
.faq-q { margin: 0; }
.faq-q:hover { text-decoration: underline; text-underline-offset: 3px; }
/* the plus marker — two rules laid across each other (pseudo-elements) */
.faq-mark {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.faq-mark::before { left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%); }   /* horizontal */
.faq-mark::after  { top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); }    /* vertical */
.faq-row[open] .faq-mark::after { display: none; }   /* open leaves a minus */
.faq-a { margin: 0 0 var(--s20); color: var(--ink-soft); }

/* ---------- Pricing plate (outer column, tall) ---------------------------- */

.pricing-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) var(--outer);
  column-gap: var(--s48);
}
.pricing-lead-grid .outer-col { border-left: var(--hair); padding-left: var(--s48); }

/* ---------- Footer (white, no dark band) ---------------------------------- */

.footer {
  border-top: var(--heavy);    /* 2px --ink rule above */
  padding: var(--s48) 0;
  background: var(--paper);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s24);
}
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s8); }
.footer-legal {
  border-top: var(--hair);
  margin-top: var(--s32);
  padding-top: var(--s16);
  color: var(--ink-meta);
}

/* ---------- Responsive ----------------------------------------------------- */

/* Tablet 768–1024px: display 48px; single-column article grid; notes beneath */
@media (max-width: 1024px) {
  .t-display-xxl { font-size: 48px; }

  .article-grid,
  .pricing-lead-grid {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
  .article-grid .outer-col,
  .pricing-lead-grid .outer-col {
    border-left: 0;
    padding-left: 0;
    margin-top: var(--s24);
  }
  /* the demo's marginal notes drop beneath the credit line, in order */
  .outer-notes { display: none; }
  .notes-below { display: block; }
}

@media (min-width: 1025px) {
  .notes-below { display: none; }   /* on desktop the notes live in the margin */
}

/* Mobile <768px */
@media (max-width: 767px) {
  .t-display-xxl { font-size: 36px; }
  .t-display-xl { font-size: 32px; }

  /* drop cap steps 3 lines -> 2 */
  .dropcap { font-size: 4.3em; line-height: 0.66; }

  /* the demo's two plates stack */
  .demo-plates { grid-template-columns: 1fr; }

  /* the caption stays a caption — leading opens 1.6 -> 2.0 */
  .live-caption { line-height: 2.0; }
  .live-caption .cv { padding-top: 6px; padding-bottom: 6px; }

  /* credit line: Copy drops beneath the URL */
  .credit-line { flex-direction: column; align-items: flex-start; }
  .credit-line .button-outline { margin-top: var(--s12); }

  /* capability trio goes 1-up; vertical column rules become horizontal */
  .cap-trio { grid-template-columns: 1fr; }
  .cap-col { padding: var(--s24) 0 0; }
  .cap-col:first-child { padding-top: 0; }
  .cap-col + .cap-col { border-left: 0; border-top: var(--hair); }

  /* stats grid stacks to 2-up */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-cell:nth-child(3), .stat-cell:nth-child(4) { border-top: var(--hair); }
  .stat-cell:nth-child(odd) { border-left: 0; }
  /* the figure follows the mobile display scale so two cells fit a 2-up row */
  .stat-fig { font-size: 36px; }

  /* the spec table's Description column drops beneath its row */
  .spec-table, .spec-table thead, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; }
  .spec-table thead { display: none; }
  .spec-table tbody tr { border-top: var(--hair); padding: var(--s12) 0; }
  .spec-table tbody tr:first-child { border-top: 0; }
  .spec-table tbody td { border-top: 0; padding: var(--s2) 0; }
  .spec-table td.col-desc { margin-top: var(--s8); }
  .spec-table td::before {
    content: attr(data-head);
    display: block;
    font-family: var(--sans); font-weight: 700; font-size: 11px;
    text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-meta);
    margin-bottom: 2px;
  }

  /* the tier table becomes three stacked ruled blocks — never cards */
  .tier-grid { display: none; }
  .tier-stack { display: block; }
  .footer-cols { grid-template-columns: 1fr; }
}

/* Reduced motion — every transition dropped, final state rendered */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
