/* ==========================================================================
   ReceiptChase design system
   Ledger precise: paper stock, ink rules, receipt tape yellow.
   IBM Plex Mono for figures and labels, IBM Plex Sans for reading.
   ========================================================================== */

:root {
  /* Core palette from the brand sheet */
  --paper: #FBFBF9;
  --surface: #FFFFFF;
  --ink: #111111;
  --primary: #1F3A34;
  --accent: #F5D547;
  --muted: #5E625F;

  /* Derived tints and shades */
  --ink-90: #2A2A28;
  --ink-60: #4A4C49;
  --primary-dark: #12241F;
  --primary-mid: #2F544B;
  --primary-wash: #EAEFED;
  --primary-line: #C3D0CC;
  --accent-deep: #D8B417;
  --accent-wash: #FDF6D6;
  --accent-line: #EEDC8A;
  --rule: #D9D9D2;
  --rule-soft: #E8E8E1;
  --tape: #F3F2EC;

  /* Spacing scale, 4px base */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 88px;
  --s10: 120px;

  /* Radii, kept tight: this is stationery, not a bubble */
  --r0: 0px;
  --r1: 2px;
  --r2: 4px;
  --r3: 8px;

  /* Shadows behave like carbon copies, offset and hard */
  --lift: 4px 4px 0 var(--ink);
  --lift-accent: 4px 4px 0 var(--accent);
  --lift-soft: 0 1px 0 var(--rule), 0 10px 24px rgba(17, 17, 17, 0.06);
  --lift-deep: 0 18px 40px rgba(17, 17, 17, 0.10);

  /* Type scale */
  --t-xs: 0.72rem;
  --t-sm: 0.82rem;
  --t-base: 1rem;
  --t-md: 1.08rem;
  --t-lg: 1.32rem;
  --t-xl: 1.7rem;
  --t-2xl: 2.15rem;
  --t-3xl: 2.9rem;
  --t-4xl: 3.6rem;

  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1180px;
  --wrap-tight: 860px;
  --header-h: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* Ledger stock: faint horizontal rules with one vertical margin line */
  background-image:
    linear-gradient(to bottom, rgba(31, 58, 52, 0.055) 1px, transparent 1px),
    linear-gradient(to right, rgba(245, 213, 71, 0.28) 1px, transparent 1px);
  background-size: 100% 30px, 100% 100%;
  background-position: 0 0, 46px 0;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 900px) {
  body { background-position: 0 0, 18px 0; }
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.14; margin: 0 0 var(--s4); letter-spacing: -0.015em; }
p { margin: 0 0 var(--s4); }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.15em; }
li { margin-bottom: var(--s2); }
strong { font-weight: 600; }
:target { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- typography roles ---------- */
h1 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2.05rem, 5.2vw, var(--t-4xl));
  letter-spacing: -0.03em;
}
h2 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, var(--t-2xl));
  letter-spacing: -0.025em;
}
h3 { font-family: var(--mono); font-weight: 600; font-size: var(--t-lg); }
h4 { font-family: var(--mono); font-weight: 600; font-size: var(--t-md); }

.num, .figure, .price, table, .board, .tabular {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s3);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 0;
  border-top: 2px dotted var(--accent-deep);
  display: inline-block;
}

.lede { font-size: var(--t-md); color: var(--ink-60); max-width: 62ch; }
.small { font-size: var(--t-sm); color: var(--muted); }

/* Highlighter swipe, drawn like a marker pass over receipt tape */
.mark {
  background-image: linear-gradient(to bottom, transparent 58%, var(--accent) 58%, var(--accent) 94%, transparent 94%);
  padding: 0 0.08em;
}

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--s5), var(--wrap)); margin-inline: auto; }
.wrap-tight { width: min(100% - 2 * var(--s5), var(--wrap-tight)); margin-inline: auto; }
section { padding-block: var(--s9); position: relative; }
@media (max-width: 720px) { section { padding-block: var(--s8); } }
.section-head { max-width: 68ch; margin-bottom: var(--s7); }

/* Perforation rule, the dotted tear line between sections */
.perf { position: relative; }
.perf::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background-image: radial-gradient(circle, var(--rule) 0 1.4px, transparent 1.6px);
  background-size: 10px 2px;
  background-repeat: repeat-x;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -60px;
  z-index: 200;
  background: var(--primary);
  color: var(--surface);
  font-family: var(--mono);
  font-size: var(--t-sm);
  padding: var(--s3) var(--s4);
  border: 2px solid var(--ink);
  transition: top 0.16s ease-out;
}
.skip-link:focus { top: var(--s3); color: var(--surface); }

/* ---------- focus ---------- */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r1);
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  box-shadow: 0 0 0 6px var(--accent-wash);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 1px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--t-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--r1);
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--lift);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background-color 0.12s ease-out;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--primary); color: var(--surface); border-color: var(--ink); box-shadow: var(--lift-accent); }
.btn-primary:hover { background: var(--primary-dark); color: var(--surface); box-shadow: 2px 2px 0 var(--accent-deep); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-deep); color: var(--ink); }
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--rule); color: var(--primary); }
.btn-ghost:hover { background: var(--primary-wash); box-shadow: none; transform: none; }
.btn-sm { padding: 10px 15px; font-size: var(--t-xs); box-shadow: 3px 3px 0 var(--ink); }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.18s ease-out, background-color 0.18s ease-out;
}
.site-header.is-stuck { box-shadow: 0 2px 0 var(--accent), 0 10px 22px rgba(17, 17, 17, 0.07); background: var(--paper); }
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark svg { flex: none; }
.wordmark span b { font-weight: 600; color: var(--primary); }
.wordmark .wm-sub {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}
.nav-main { display: flex; align-items: center; gap: var(--s5); }
.nav-main a {
  font-family: var(--mono);
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--ink-60);
  padding: var(--s2) 0;
  position: relative;
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  border-bottom: 2px dotted transparent;
}
.nav-main a:hover { color: var(--ink); }
.nav-main a:hover::after { border-bottom-color: var(--accent-deep); }
.header-cta { display: flex; align-items: center; gap: var(--s3); }
.nav-toggle {
  display: none;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r1);
  padding: 8px 10px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.nav-toggle:active { transform: translate(3px, 3px); box-shadow: none; }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .header-cta .btn { display: none; }
  .nav-main {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 2px solid var(--ink);
    border-top: 1px solid var(--rule);
    padding: var(--s3) var(--s5) var(--s5);
    box-shadow: var(--lift-deep);
  }
  .nav-main[hidden] { display: none; }
  .nav-main a {
    padding: var(--s3) 0;
    border-bottom: 1px dotted var(--rule);
    font-size: var(--t-base);
  }
  .nav-main .btn { margin-top: var(--s4); }
}
@media (min-width: 981px) {
  .nav-main[hidden] { display: flex; }
  .nav-main .btn.nav-cta { display: none; }
}

/* ---------- hero ---------- */
.hero { padding-block: var(--s8) var(--s9); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: var(--s8);
  align-items: center;
}
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s7); } }
.hero h1 { margin-bottom: var(--s5); max-width: 17ch; }
.hero .lede { margin-bottom: var(--s6); font-size: var(--t-lg); line-height: 1.5; color: var(--ink-60); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s7); }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px dotted var(--rule);
}
.trust-strip div {
  padding: var(--s4) var(--s4) var(--s4) 0;
  border-right: 1px dotted var(--rule);
}
.trust-strip div:last-child { border-right: 0; }
.trust-strip .num {
  display: block;
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.trust-strip .lbl { font-size: var(--t-xs); color: var(--muted); line-height: 1.4; display: block; margin-top: 2px; }
@media (max-width: 560px) {
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip div { border-right: 0; border-bottom: 1px dotted var(--rule); padding-block: var(--s3); }
  .trust-strip div:last-child { border-bottom: 0; }
}

/* Hero photo framed like a document in a sleeve */
.photo-frame { position: relative; }
.photo-frame img {
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--accent);
  background: var(--surface);
}
.photo-frame::after {
  content: attr(data-caption);
  position: absolute;
  left: -10px;
  bottom: -18px;
  background: var(--surface);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  color: var(--ink-60);
}
.photo-frame.right::after { left: auto; right: -10px; }

/* Floating receipt chip on the hero photo */
.chip-receipt {
  position: absolute;
  top: -22px;
  right: -14px;
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: var(--s3) var(--s4);
  font-family: var(--mono);
  font-size: var(--t-xs);
  box-shadow: 5px 5px 0 var(--primary);
  max-width: 220px;
}
.chip-receipt .row { display: flex; justify-content: space-between; gap: var(--s3); }
.chip-receipt .row + .row { border-top: 1px dotted var(--rule); margin-top: 4px; padding-top: 4px; }
.chip-receipt .ok { color: var(--primary); font-weight: 600; }
@media (max-width: 1000px) { .chip-receipt { display: none; } }

/* ---------- receipt slip component ---------- */
.slip {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: var(--s5) var(--s5) var(--s6);
}
.slip::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px;
  bottom: -12px;
  height: 12px;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) 0 0 / 12px 12px repeat-x,
    linear-gradient(-45deg, transparent 50%, var(--ink) 50%) 6px 0 / 12px 12px repeat-x;
}
.slip::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -9px;
  height: 12px;
  z-index: 1;
  background:
    linear-gradient(45deg, transparent 50%, var(--surface) 50%) 0 0 / 12px 12px repeat-x,
    linear-gradient(-45deg, transparent 50%, var(--surface) 50%) 6px 0 / 12px 12px repeat-x;
}

/* ---------- generic card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r1);
  padding: var(--s5);
  position: relative;
  box-shadow: var(--lift-soft);
}
.card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }

/* ---------- problem grid ---------- */
.section-problem { background: var(--tape); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.cost-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  box-shadow: 5px 5px 0 rgba(17, 17, 17, 0.08);
}
.cost-card .tag {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px dotted var(--rule);
  padding-bottom: var(--s2);
}
.cost-card h3 { font-size: var(--t-md); margin: 0; }
.cost-card p { margin: 0; font-size: 0.95rem; color: var(--ink-60); }
.cost-card .toll {
  margin-top: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  background: var(--accent-wash);
  border-left: 4px solid var(--accent);
  padding: var(--s2) var(--s3);
}

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--s5) 66px;
  margin-bottom: var(--s5);
  border-bottom: 1px dotted var(--rule);
}
.steps > li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--surface);
  background: var(--primary);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--accent);
}
.steps h3 { font-size: var(--t-md); margin-bottom: var(--s2); }
.steps p { margin: 0; color: var(--ink-60); font-size: 0.97rem; }

/* ---------- status board, the checked rows motif ---------- */
.board {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(31, 58, 52, 0.12);
  overflow: hidden;
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  background: var(--primary);
  color: var(--surface);
  padding: var(--s3) var(--s4);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.board-head .dot-set { display: inline-flex; gap: 5px; }
.board-head .dot-set i { width: 8px; height: 8px; background: var(--accent); display: block; }
.board-head .dot-set i:nth-child(2) { background: var(--primary-line); }
.board-head .dot-set i:nth-child(3) { background: var(--primary-line); }
.board-cols, .board-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1.6fr) minmax(0, 1.3fr) 96px 84px;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-sm);
}
.board-cols {
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  background: var(--tape);
}
.board-row { border-bottom: 1px dotted var(--rule); }
.board-row:last-child { border-bottom: 0; }
.board-row .who { color: var(--ink); font-weight: 500; }
.board-row .doc { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .age { color: var(--ink-60); }
.pill {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid currentColor;
  text-align: center;
  white-space: nowrap;
}
.pill.in { color: var(--primary); background: var(--primary-wash); }
.pill.chase { color: #8A6A00; background: var(--accent-wash); }
.pill.wait { color: var(--muted); background: var(--tape); }
.tick {
  width: 20px; height: 20px;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  background: var(--surface);
}
.tick svg { width: 14px; height: 14px; display: block; }
.tick svg path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: square;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
}
.board.is-visible .tick svg path { animation: draw-tick 0.42s ease-out forwards; }
.board.is-visible .board-row:nth-child(1) .tick svg path { animation-delay: 0.10s; }
.board.is-visible .board-row:nth-child(2) .tick svg path { animation-delay: 0.34s; }
.board.is-visible .board-row:nth-child(3) .tick svg path { animation-delay: 0.58s; }
.board.is-visible .board-row:nth-child(4) .tick svg path { animation-delay: 0.82s; }
.board.is-visible .board-row:nth-child(5) .tick svg path { animation-delay: 1.06s; }
.board.is-visible .board-row:nth-child(6) .tick svg path { animation-delay: 1.30s; }
.board.is-visible .board-row .tick { animation: flash-cell 0.5s ease-out both; }
.board.is-visible .board-row:nth-child(1) .tick { animation-delay: 0.10s; }
.board.is-visible .board-row:nth-child(2) .tick { animation-delay: 0.34s; }
.board.is-visible .board-row:nth-child(3) .tick { animation-delay: 0.58s; }
.board.is-visible .board-row:nth-child(4) .tick { animation-delay: 0.82s; }
.board.is-visible .board-row:nth-child(5) .tick { animation-delay: 1.06s; }
.board.is-visible .board-row:nth-child(6) .tick { animation-delay: 1.30s; }
@keyframes draw-tick { to { stroke-dashoffset: 0; } }
@keyframes flash-cell {
  0% { background: var(--accent); }
  100% { background: var(--surface); }
}
.board-foot {
  border-top: 1px solid var(--ink);
  background: var(--tape);
  padding: var(--s3) var(--s4);
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .board-cols, .board-row { grid-template-columns: 26px minmax(0, 1fr) 76px; font-size: var(--t-xs); }
  .board-cols .doc, .board-row .doc, .board-cols .age, .board-row .age { display: none; }
}

/* ---------- features ---------- */
.feature {
  background: var(--surface);
  border: 1px solid var(--ink);
  padding: var(--s5);
  position: relative;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out;
  box-shadow: 0 1px 0 var(--rule);
}
.feature:hover { transform: translateY(-3px); box-shadow: 6px 8px 0 rgba(31, 58, 52, 0.10); }
.feature .ico {
  width: 46px; height: 46px;
  border: 2px solid var(--ink);
  background: var(--accent-wash);
  display: grid; place-items: center;
  margin-bottom: var(--s4);
}
.feature .ico svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; }
.feature h3 { font-size: var(--t-md); margin-bottom: var(--s2); }
.feature p { margin: 0; font-size: 0.95rem; color: var(--ink-60); }
.feature::before {
  content: "";
  position: absolute;
  top: var(--s5); right: var(--s5);
  width: 34px; height: 0;
  border-top: 2px dotted var(--rule);
}

/* ---------- outcomes with typewriter numerals ---------- */
.section-outcomes { background: var(--primary); color: var(--primary-wash); }
.section-outcomes h2, .section-outcomes h3 { color: var(--surface); }
.section-outcomes .eyebrow { color: var(--accent); }
.section-outcomes .eyebrow::before { border-top-color: var(--accent); }
.section-outcomes .lede { color: var(--primary-line); }
.outcome {
  border-top: 2px solid var(--accent);
  padding-top: var(--s4);
}
.outcome .figure {
  display: block;
  font-size: clamp(2.4rem, 5.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1.05;
  margin-bottom: var(--s2);
  white-space: nowrap;
  overflow: hidden;
  max-width: max-content;
  border-right: 3px solid transparent;
}
.outcome.is-visible .figure {
  animation: typeout 1.1s steps(9, end) both, caret 0.7s step-end 6;
}
@keyframes typeout { from { width: 0; } to { width: 100%; } }
@keyframes caret { 0%, 100% { border-right-color: transparent; } 50% { border-right-color: var(--accent); } }
.outcome h3 { font-size: var(--t-md); margin-bottom: var(--s2); }
.outcome p { color: var(--primary-line); font-size: 0.95rem; margin: 0; }
.outcome:nth-child(2).is-visible .figure { animation-delay: 0.16s; }
.outcome:nth-child(3).is-visible .figure { animation-delay: 0.32s; }
.outcome:nth-child(4).is-visible .figure { animation-delay: 0.48s; }

/* ---------- testimonials ---------- */
.testimonial {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: var(--s5);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  box-shadow: 6px 6px 0 var(--tape);
  position: relative;
}
.testimonial::before {
  content: "";
  position: absolute;
  top: -1px; left: var(--s5); right: var(--s5);
  height: 7px;
  background: var(--accent);
}
.testimonial p { margin: 0; font-size: 1.02rem; }
.testimonial .stars { display: flex; gap: 3px; }
.testimonial .stars svg { width: 15px; height: 15px; fill: var(--accent-deep); }
.testimonial figcaption {
  border-top: 1px dotted var(--rule);
  padding-top: var(--s3);
  font-family: var(--mono);
  font-size: var(--t-sm);
  margin-top: auto;
}
.testimonial figcaption b { display: block; font-weight: 600; color: var(--ink); }
.testimonial figcaption span { color: var(--muted); font-size: var(--t-xs); line-height: 1.5; display: block; }

.results-strip {
  margin-top: var(--s7);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--ink);
  background: var(--surface);
}
.results-strip div { padding: var(--s5); border-right: 1px dotted var(--rule); }
.results-strip div:last-child { border-right: 0; }
.results-strip .num { display: block; font-size: 1.9rem; font-weight: 600; color: var(--primary); letter-spacing: -0.03em; }
.results-strip .lbl { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 780px) {
  .results-strip { grid-template-columns: 1fr; }
  .results-strip div { border-right: 0; border-bottom: 1px dotted var(--rule); }
  .results-strip div:last-child { border-bottom: 0; }
}

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
@media (max-width: 940px) { .price-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  position: relative;
}
.tier.featured {
  box-shadow: 8px 8px 0 var(--primary);
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.tier .flag {
  position: absolute;
  top: -15px; right: var(--s4);
  background: var(--accent);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
}
.tier h3 { font-size: var(--t-lg); margin: 0; }
.tier .tier-for { font-size: var(--t-sm); color: var(--muted); margin: 0; min-height: 3em; }
.tier .price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-top: 1px dotted var(--rule);
  border-bottom: 1px dotted var(--rule);
  padding-block: var(--s3);
}
.tier .price b { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.tier .price span { font-family: var(--mono); font-size: var(--t-sm); color: var(--muted); }
.tier ul { list-style: none; margin: 0; padding: 0; }
.tier ul li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--s2);
  font-size: 0.94rem;
  padding-block: 7px;
  border-bottom: 1px dotted var(--rule-soft);
  color: var(--ink-60);
}
.tier ul li:last-child { border-bottom: 0; }
.tier ul li svg { width: 15px; height: 15px; margin-top: 5px; stroke: var(--primary); fill: none; stroke-width: 2.4; }
.tier .btn { margin-top: auto; }
.billing-note {
  margin-top: var(--s5);
  border: 1px dashed var(--ink);
  background: var(--accent-wash);
  padding: var(--s4) var(--s5);
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--ink-90);
}
.billing-note p { margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 2px solid var(--ink); }
.faq-item { border-bottom: 1px dotted var(--rule); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  background: transparent;
  border: 0;
  padding: var(--s5) 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.faq-q:hover { color: var(--primary); }
.faq-q .sign {
  flex: none;
  width: 26px; height: 26px;
  border: 2px solid var(--ink);
  background: var(--surface);
  display: grid; place-items: center;
  position: relative;
  margin-top: 2px;
}
.faq-q .sign::before, .faq-q .sign::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}
.faq-q .sign::before { width: 12px; height: 2px; }
.faq-q .sign::after { width: 2px; height: 12px; }
.faq-q[aria-expanded="true"] .sign { background: var(--accent); }
.faq-q[aria-expanded="true"] .sign::after { transform: scaleY(0); opacity: 0; }
.faq-a { padding: 0 0 var(--s5); max-width: 78ch; color: var(--ink-60); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* ---------- contact form ---------- */
.section-contact { background: var(--tape); }
.form-shell {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--s8);
  align-items: start;
}
@media (max-width: 940px) { .form-shell { grid-template-columns: 1fr; gap: var(--s6); } }
.form-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: var(--s6);
  box-shadow: 8px 8px 0 var(--accent);
}
@media (max-width: 560px) { .form-card { padding: var(--s5); box-shadow: 5px 5px 0 var(--accent); } }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field.span-2 { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-90);
}
.field .req { color: var(--accent-deep); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--r1);
  padding: 12px 13px;
  font-size: 0.98rem;
  font-family: var(--sans);
  transition: border-color 0.14s ease-out, background-color 0.14s ease-out;
}
.field input:hover, .field select:hover, .field textarea:hover { background: var(--surface); }
.field textarea { min-height: 132px; resize: vertical; }
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #A3320F;
  background: #FDF2EE;
}
.err {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: #8C2A0C;
  min-height: 1em;
}
.err:empty { display: none; }
.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--s3);
  align-items: start;
  border-top: 1px dotted var(--rule);
  padding-top: var(--s4);
  margin-bottom: var(--s4);
}
.consent input { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 3px; }
.consent label { font-size: 0.88rem; color: var(--ink-60); font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 400; }
.form-aside .slip { margin-bottom: var(--s7); }
.form-aside ul { list-style: none; padding: 0; }
.form-aside ul li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--s3);
  padding-block: 8px;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.95rem;
}
.form-aside ul li:last-child { border-bottom: 0; }
.form-aside ul li svg { width: 15px; height: 15px; margin-top: 5px; stroke: var(--primary); fill: none; stroke-width: 2.4; }
.reassure { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s4); }

/* ---------- author byline ---------- */
.byline {
  display: flex;
  gap: var(--s4);
  align-items: center;
  border-top: 2px solid var(--ink);
  border-bottom: 1px dotted var(--rule);
  padding-block: var(--s4);
  margin-top: var(--s7);
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.byline .stamp {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 4px 8px;
  background: var(--accent-wash);
  white-space: nowrap;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #D6D8D4;
  padding-block: var(--s8) var(--s5);
  border-top: 6px solid var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--s7);
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s4);
  padding-bottom: var(--s2);
  border-bottom: 1px dotted #43443F;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #D6D8D4; text-decoration: none; font-size: 0.94rem; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand .wordmark { color: var(--paper); margin-bottom: var(--s4); }
.footer-brand .wordmark span b { color: var(--accent); }
.footer-brand .wm-sub { color: #9A9C97; }
.footer-brand p { font-size: 0.94rem; color: #A8AAA5; max-width: 34ch; }
.social { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); }
.social a {
  width: 38px; height: 38px;
  border: 1px solid #43443F;
  display: grid; place-items: center;
  transition: background-color 0.14s ease-out, border-color 0.14s ease-out;
}
.social a svg { width: 17px; height: 17px; fill: #D6D8D4; }
.social a:hover { background: var(--accent); border-color: var(--accent); }
.social a:hover svg { fill: var(--ink); }
.footer-base {
  margin-top: var(--s7);
  border-top: 1px dotted #43443F;
  padding-top: var(--s4);
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: #9A9C97;
  letter-spacing: 0.04em;
}
.footer-base a { color: #9A9C97; font-size: var(--t-xs); }

/* ---------- interior pages ---------- */
.page-head {
  background: var(--primary);
  color: var(--primary-wash);
  padding-block: var(--s8);
  border-bottom: 6px solid var(--accent);
}
.page-head h1 { color: var(--surface); max-width: 22ch; }
.page-head .eyebrow { color: var(--accent); }
.page-head .eyebrow::before { border-top-color: var(--accent); }
.page-head p { color: var(--primary-line); max-width: 68ch; margin-bottom: 0; }
.crumbs { font-family: var(--mono); font-size: var(--t-xs); margin-bottom: var(--s4); color: var(--primary-line); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.prose { max-width: 76ch; }
.prose h2 {
  font-size: var(--t-xl);
  margin-top: var(--s8);
  padding-top: var(--s4);
  border-top: 2px solid var(--ink);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--t-md); margin-top: var(--s6); }
.prose dl { margin: 0 0 var(--s5); }
.prose dt { font-family: var(--mono); font-size: var(--t-sm); font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.prose dd { margin: 0 0 var(--s3); padding-bottom: var(--s3); border-bottom: 1px dotted var(--rule); }
.fact-table { width: 100%; border-collapse: collapse; margin-bottom: var(--s5); font-size: 0.95rem; }
.fact-table th, .fact-table td { text-align: left; padding: 10px var(--s3); border-bottom: 1px dotted var(--rule); vertical-align: top; }
.fact-table th { width: 40%; font-family: var(--mono); font-weight: 600; font-size: var(--t-sm); color: var(--muted); }
/* the registration numbers are long unbroken strings, so on a narrow phone the
   table has to be allowed to break them rather than push the page sideways */
@media (max-width: 520px) {
  .fact-table th, .fact-table td { padding: 8px 6px; font-size: 0.85rem; overflow-wrap: anywhere; }
  .fact-table th { width: 42%; }
}

.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
@media (max-width: 860px) { .map-grid { grid-template-columns: 1fr; } }
.map-block { background: var(--surface); border: 1px solid var(--ink); padding: var(--s5); }
.map-block h2 { font-size: var(--t-md); border-bottom: 2px solid var(--accent); padding-bottom: var(--s2); margin-bottom: var(--s4); }
.map-block ul { list-style: none; padding: 0; margin: 0; }
.map-block li { padding-block: 10px; border-bottom: 1px dotted var(--rule); }
.map-block li:last-child { border-bottom: 0; }
.map-block a { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.map-block a:hover { text-decoration: underline; }
.map-block span { display: block; font-size: var(--t-sm); color: var(--muted); }

/* author page */
.author-grid { display: grid; grid-template-columns: 300px 1fr; gap: var(--s8); align-items: start; }
@media (max-width: 860px) { .author-grid { grid-template-columns: 1fr; gap: var(--s6); } }
.author-card { background: var(--surface); border: 2px solid var(--ink); padding: var(--s4); box-shadow: 8px 8px 0 var(--accent); position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 860px) { .author-card { position: static; max-width: 340px; } }
.author-card img { border: 1px solid var(--ink); width: 100%; }
.author-card .meta { font-family: var(--mono); font-size: var(--t-xs); color: var(--muted); margin-top: var(--s3); letter-spacing: 0.06em; text-transform: uppercase; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px dotted var(--rule); }
.link-list a { display: block; padding: 10px 0; font-family: var(--mono); font-size: 0.9rem; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }

.status-note {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-left: 8px solid var(--accent);
  padding: var(--s5);
  margin-bottom: var(--s6);
}
.status-note p:last-child { margin-bottom: 0; }

.big-404 {
  font-family: var(--mono);
  font-size: clamp(4rem, 18vw, 9rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  color: var(--primary);
  line-height: 0.9;
  margin-bottom: var(--s5);
  font-variant-numeric: tabular-nums;
}

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.07s; }
.reveal.d2 { transition-delay: 0.14s; }
.reveal.d3 { transition-delay: 0.21s; }
.reveal.d4 { transition-delay: 0.28s; }
.reveal.d5 { transition-delay: 0.35s; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .outcome .figure { width: auto; border-right-color: transparent; }
  .board .tick svg path { stroke-dashoffset: 0; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   The Ledger Tape, the magazine layer
   Same stationery: ledger rules, mono headings, hard carbon copy shadows.
   ========================================================================== */

/* ---------- navigation state ---------- */
.nav-main a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-main a[aria-current="page"]::after { border-bottom-color: var(--accent-deep); }
@media (min-width: 981px) and (max-width: 1150px) { .nav-main { gap: var(--s4); } }

/* ---------- masthead and article header ---------- */
.mag-masthead h1 { max-width: 14ch; }
.mag-head h1 { max-width: 24ch; font-size: clamp(1.85rem, 4.2vw, var(--t-3xl)); }
.crumbs .crumb-here { color: var(--primary-line); }
.crumbs span[aria-hidden="true"] { color: var(--accent-deep); padding-inline: 4px; }

.mag-standfirst {
  font-family: var(--sans);
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--primary-line);
  max-width: 58ch;
  margin: var(--s5) 0 0;
}
.mag-byline, .mag-masthead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s5);
  margin: var(--s6) 0 0;
  padding-top: var(--s4);
  border-top: 1px dotted rgba(195, 208, 204, 0.45);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-line);
}
.mag-byline a { color: var(--accent); text-decoration: none; }
.mag-byline a:hover { color: var(--accent); text-decoration: underline; }
.mag-byline .mag-by { color: var(--surface); }
.mag-byline time { color: var(--primary-wash); }
.mag-byline .mag-read {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 3px 8px;
  letter-spacing: 0.12em;
}
.mag-masthead-meta i {
  width: 4px; height: 4px;
  background: var(--accent);
  display: block;
  margin-inline: calc(-1 * var(--s3));
}
@media (max-width: 560px) {
  .mag-byline, .mag-masthead-meta { gap: var(--s2) var(--s4); font-size: 0.66rem; }
  .mag-masthead-meta i { display: none; }
}

/* ---------- article shell ---------- */
.mag-shell { padding-block: var(--s8) var(--s9); }
.mag-figure { margin: 0 0 var(--s7); }
.mag-figure img {
  width: 100%;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 10px 10px 0 var(--accent);
}
.mag-figure figcaption {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px dotted var(--rule);
  padding: var(--s4) 0 var(--s3);
  margin-top: var(--s4);
}
@media (min-width: 861px) { .mag-figure { margin-top: calc(-1 * var(--s9)); } }
@media (max-width: 560px) {
  .mag-shell { padding-block: var(--s7) var(--s8); }
  .mag-figure img { box-shadow: 5px 5px 0 var(--accent); }
}

/* ---------- article body typography ---------- */
.mag-body {
  max-width: 66ch;
  margin-inline: auto;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--ink-90);
}
.mag-body > *:first-child { margin-top: 0; }
.mag-body p { margin: 0 0 var(--s5); }
.mag-body h2 {
  font-size: clamp(1.35rem, 3vw, var(--t-xl));
  line-height: 1.2;
  margin: var(--s8) 0 var(--s4);
  padding-top: var(--s4);
  border-top: 2px solid var(--ink);
}
.mag-body h3 {
  font-size: var(--t-md);
  color: var(--primary);
  margin: var(--s6) 0 var(--s3);
}
.mag-body h3::before {
  content: "";
  display: inline-block;
  width: 14px;
  border-top: 2px dotted var(--accent-deep);
  vertical-align: middle;
  margin-right: var(--s2);
}
.mag-body a { color: var(--primary); text-decoration-color: var(--accent-deep); }
.mag-body a:hover { color: var(--primary-dark); }
.mag-body strong { color: var(--ink); font-weight: 600; }
.mag-body ul { list-style: none; padding-left: 0; margin: 0 0 var(--s5); }
.mag-body ul li { position: relative; padding-left: 30px; margin-bottom: var(--s3); }
.mag-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 12px; height: 12px;
  border: 2px solid var(--ink);
  background: var(--accent);
}
.mag-body ol { list-style: none; counter-reset: magstep; padding-left: 0; margin: 0 0 var(--s5); }
.mag-body ol li { counter-increment: magstep; position: relative; padding-left: 38px; margin-bottom: var(--s3); }
.mag-body ol li::before {
  content: counter(magstep, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--primary);
}
.mag-body blockquote {
  margin: var(--s6) 0;
  padding: var(--s4) var(--s5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--accent);
  font-size: var(--t-md);
  color: var(--ink);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--s6);
  background: var(--surface);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}
.mag-body th, .mag-body td {
  text-align: left;
  padding: 10px var(--s3);
  border-bottom: 1px dotted var(--rule);
  vertical-align: top;
}
.mag-body thead th {
  background: var(--tape);
  border-bottom: 1px solid var(--ink);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.mag-body tbody tr:last-child td { border-bottom: 0; }

/* the contextual reading link the magazine drops between sections */
.mag-body .inline-read {
  font-family: var(--mono);
  font-size: var(--t-sm);
  line-height: 1.55;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-left: 4px solid var(--accent);
  padding: var(--s3) var(--s4);
  margin: var(--s6) 0;
  color: var(--ink-90);
}
.mag-body .inline-read a { font-weight: 600; text-decoration-thickness: 1px; }
@media (max-width: 560px) {
  .mag-body { font-size: 1.01rem; line-height: 1.7; }
  .mag-body table { font-size: 0.78rem; }
  .mag-body th, .mag-body td { padding: 8px var(--s2); }
}

/* ---------- call to action after the conclusion ---------- */
.mag-cta {
  max-width: 66ch;
  margin: var(--s8) auto 0;
  background: var(--primary);
  color: var(--primary-wash);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
  padding: var(--s6);
}
.mag-cta .eyebrow { color: var(--accent); }
.mag-cta .eyebrow::before { border-top-color: var(--accent); }
.mag-cta h2 { color: var(--surface); font-size: clamp(1.3rem, 2.8vw, var(--t-xl)); margin-bottom: var(--s3); }
.mag-cta p { color: var(--primary-line); margin-bottom: 0; }
.mag-cta-go { margin-top: var(--s5) !important; }
.mag-cta .btn-primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--surface);
}
.mag-cta .btn-primary:hover { background: var(--accent-deep); color: var(--ink); box-shadow: 2px 2px 0 var(--surface); }
.mag-cta-wide { max-width: none; margin-top: var(--s9); }
@media (max-width: 560px) {
  .mag-cta { padding: var(--s5); box-shadow: 5px 5px 0 var(--accent); }
}

/* ---------- author box ---------- */
.mag-author {
  max-width: 66ch;
  margin: var(--s7) auto 0;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: var(--s5);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-top: 5px solid var(--accent);
  padding: var(--s5);
  box-shadow: var(--lift-soft);
}
.mag-author img { width: 100%; border: 1px solid var(--ink); }
.mag-author h2 { font-size: var(--t-md); margin-bottom: var(--s3); }
.mag-author p { font-size: 0.95rem; color: var(--ink-60); margin-bottom: var(--s3); }
.mag-author-link { margin-bottom: 0 !important; }
.mag-author-link a { font-family: var(--mono); font-size: var(--t-sm); font-weight: 600; }
@media (max-width: 560px) {
  .mag-author { grid-template-columns: 1fr; gap: var(--s4); }
  .mag-author img { max-width: 128px; }
}

/* ---------- read also ---------- */
.mag-also { background: var(--tape); }
.mag-also-head { margin-bottom: var(--s6); }
.mag-also-head h2 { font-size: clamp(1.4rem, 3vw, var(--t-xl)); margin-bottom: 0; }
.mag-also-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 860px) { .mag-also-grid { grid-template-columns: 1fr; } }
.mag-rel {
  background: var(--surface);
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out;
}
.mag-rel:hover { transform: translateY(-3px); box-shadow: 6px 8px 0 rgba(31, 58, 52, 0.10); }
.mag-rel img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--ink);
}
.mag-rel-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.mag-rel h3 { font-size: var(--t-base); line-height: 1.3; margin: 0; }
.mag-rel h3 a { color: var(--ink); text-decoration: none; }
.mag-rel h3 a:hover { color: var(--primary); text-decoration: underline; }
.mag-rel-body > p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-60);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- magazine index grid ---------- */
.mag-index { padding-block: var(--s8) var(--s9); }
.mag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s5); }
@media (max-width: 1000px) { .mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .mag-grid { grid-template-columns: 1fr; gap: var(--s5); } }

.mag-card {
  background: var(--surface);
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  box-shadow: var(--lift-soft);
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out;
}
.mag-card:hover { transform: translateY(-3px); box-shadow: 7px 9px 0 rgba(31, 58, 52, 0.10); }
.mag-card-media { position: relative; border-bottom: 1px solid var(--ink); }
.mag-card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-flag {
  position: absolute;
  left: -1px;
  bottom: var(--s3);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-left: 0;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 9px;
}
.mag-card-body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); flex: 1 1 auto; }
.mag-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mag-meta i { width: 4px; height: 4px; background: var(--accent-deep); display: block; }
.mag-card-title { font-size: var(--t-md); line-height: 1.26; margin: 0; }
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--primary); text-decoration: underline; }
.mag-card-dek {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-60);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mag-card-go { margin: auto 0 0; padding-top: var(--s3); border-top: 1px dotted var(--rule); }
.mag-card-go a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
}
.mag-card-go a::after { content: ""; width: 20px; border-top: 2px dotted var(--accent-deep); }
.mag-card-go a:hover { text-decoration: underline; }

/* the lead card, one size up */
.mag-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--accent);
}
.mag-card.lead:hover { transform: none; box-shadow: 10px 10px 0 var(--accent); }
.mag-card.lead .mag-card-media { flex: 1 1 55%; border-bottom: 0; border-right: 2px solid var(--ink); }
.mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 340px; }
.mag-card.lead .mag-card-body { flex: 1 1 45%; padding: var(--s6); gap: var(--s4); justify-content: center; }
.mag-card.lead .mag-card-title { font-size: clamp(1.35rem, 2.5vw, var(--t-2xl)); line-height: 1.16; }
.mag-card.lead .mag-card-dek { font-size: var(--t-md); -webkit-line-clamp: 6; }
.mag-card.lead .mag-flag { bottom: var(--s5); }
@media (max-width: 860px) {
  .mag-card.lead { flex-direction: column; box-shadow: 6px 6px 0 var(--accent); }
  .mag-card.lead:hover { box-shadow: 6px 6px 0 var(--accent); }
  .mag-card.lead .mag-card-media { border-right: 0; border-bottom: 2px solid var(--ink); }
  .mag-card.lead .mag-card-media img { min-height: 0; aspect-ratio: 3 / 2; }
  .mag-card.lead .mag-card-body { padding: var(--s5); }
}
@media (max-width: 400px) {
  .mag-card-body { padding: var(--s4); }
  .mag-flag { font-size: 0.6rem; letter-spacing: 0.1em; }
}

/* ---------- magazine on the home page and the author page ---------- */
.mag-home-link { margin: var(--s7) 0 0; }
.mag-bib { list-style: none; margin: 0 0 var(--s5); padding: 0; border-top: 2px solid var(--ink); }
.mag-bib li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2) var(--s4);
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px dotted var(--rule);
}
.mag-bib a { font-family: var(--mono); font-size: 0.96rem; font-weight: 600; text-decoration: none; }
.mag-bib a:hover { text-decoration: underline; }
.mag-bib time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 560px) { .mag-bib li { grid-template-columns: 1fr; } }
.map-block.mag-map { grid-column: 1 / -1; }
@media (max-width: 420px) {
  .mag-masthead h1 { font-size: 1.78rem; }
  .mag-head h1 { font-size: 1.62rem; }
  .mag-standfirst { font-size: var(--t-md); }
}



/* Network strip: five sibling products, rotated so every site is linked the same
   number of times. Spans the full footer grid rather than adding a fifth column,
   because each footer declares a fixed column count and a fifth item would wrap. */
.site-network { grid-column: 1 / -1; flex-basis: 100%; width: 100%;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.site-network h2 { font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.7rem; opacity: 0.72; }
.site-network ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-network li + li { margin-top: 0; }
.site-network a { font-size: 0.86rem; text-decoration: none; opacity: 0.9;
  border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 620px) { .site-network ul { gap: 0.45rem 1.1rem; } }


/* Decorative bleed guard. Several sections intentionally hang a rotated or offset
   pseudo element past the viewport edge. overflow-x: clip contains them without
   creating a scroll container, so position: sticky keeps working, unlike overflow
   hidden. Genuine content overflow is still reported by the element level check in
   the browser pass. */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* Wide content on phones. Class names for the prose wrapper differ from site to site,
   so this targets tables and pre blocks directly: they scroll inside their own box
   rather than pushing cells past the right edge, per the build contract. */
@media (max-width: 700px) {
  table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { overflow-wrap: anywhere; }
  pre { overflow-x: auto; max-width: 100%; }
}
