/* ============================================================================
   LADDERS — long-read pages
   Layered on top of style.css. Nothing here redefines a token; every colour,
   face and rhythm value comes from the same :root the home page uses, so the
   documents read as the same site rather than as attachments to it.
   ========================================================================== */

/* ─────────────────────────── PAGE FRAME ─────────────────────────── */
/* These pages have no splash, so the nav is present from the first paint. */
.nav.static { transform: none; border-bottom-color: var(--line); }

.doc { padding-top: 74px; }

.doc-head {
  padding: clamp(56px, 11vh, 104px) 0 clamp(36px, 6vh, 56px);
  border-bottom: 1px solid var(--line);
}
.doc-head h1 { max-width: 18ch; }
.doc-head .t-lead { margin-top: 22px; max-width: 54ch; }

/* The standing note — every page that describes unbuilt work carries one.
   It is the first thing after the title and it is not dismissible. */
.standing {
  margin-top: 30px;
  padding: 20px 24px;
  border-left: 2px solid var(--red);
  background: var(--red-wash);
  border-radius: 0 12px 12px 0;
  max-width: 62ch;
}
.standing .k {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.standing p { margin-top: 8px; font-size: 0.96rem; line-height: 1.62; color: var(--ink-soft); }
.standing p + p { margin-top: 9px; }
.standing strong { color: var(--ink); }

/* ─────────────────────────── DOCUMENT BODY ─────────────────────────── */
.doc-section {
  padding: clamp(48px, 8vh, 84px) 0;
  border-bottom: 1px solid var(--line);
}
.doc-section:last-of-type { border-bottom: 0; }

.doc-section h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -0.034em;
  font-weight: 640;
  max-width: 22ch;
}
.doc-section h3 {
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  line-height: 1.25;
  letter-spacing: -0.024em;
  font-weight: 640;
  margin-bottom: 10px;
}
.rule {
  width: 44px; height: 2px;
  background: var(--red);
  margin: 18px 0 26px;
}

.prose > p { font-size: 1.02rem; line-height: 1.7; color: var(--ink-soft); max-width: 62ch; }
.prose > p + p { margin-top: 14px; }
.prose > p.lift { color: var(--ink); font-weight: 500; }
.prose strong { color: var(--ink); }

/* claim lists — the red tick marks are the only ornament on these pages */
.marks { margin: 20px 0; display: grid; gap: 11px; max-width: 62ch; }
.marks li {
  position: relative;
  padding-left: 22px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.marks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
}
.marks.firm li { color: var(--ink); font-weight: 500; }

/* a maths line, always visually quarantined from the prose around it */
.formula {
  display: block;
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-x: auto;
}
.caveat {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
  font-style: italic;
  max-width: 58ch;
}

/* ─────────────────────────── DEFINITIONS ─────────────────────────── */
.defs { margin-top: 30px; border-top: 1px solid var(--line-firm); }
.def { border-bottom: 1px solid var(--line-firm); }
.def-btn {
  width: 100%;
  background: none;
  border: 0;
  padding: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
  cursor: pointer;
}
.def-btn:hover .def-t { color: var(--red); }
.def-t {
  flex: 1;
  font-size: clamp(1rem, 1.9vw, 1.18rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  transition: color 0.22s;
}
.def-plus {
  position: relative;
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-firm);
  display: grid;
  place-items: center;
  margin-top: 2px;
  transition: transform 0.3s var(--ease), border-color 0.25s, background 0.25s;
}
.def-plus::before, .def-plus::after {
  content: "";
  position: absolute;
  background: var(--ink-soft);
  transition: background 0.25s;
}
.def-plus::before { width: 10px; height: 1.5px; }
.def-plus::after { width: 1.5px; height: 10px; }
.def.open .def-plus { transform: rotate(135deg); border-color: var(--red); background: var(--red-wash); }
.def.open .def-plus::before, .def.open .def-plus::after { background: var(--red); }
.def-panel { overflow: hidden; max-height: 0; transition: max-height 0.45s var(--ease); }
.def-panel-in { padding: 0 46px 24px 0; }
.def-panel-in p { font-size: 0.97rem; line-height: 1.65; color: var(--ink-soft); max-width: 62ch; }
.def-panel-in p + p { margin-top: 10px; }
.def-panel-in .marks { margin: 12px 0 0; }

/* ─────────────────────────── CARD GRIDS ─────────────────────────── */
.cards {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.card { background: var(--bg); padding: 24px 22px; }
.card h4 {
  font-size: 0.98rem;
  font-weight: 640;
  letter-spacing: -0.018em;
  margin-bottom: 7px;
}
.card p { font-size: 0.92rem; line-height: 1.58; color: var(--ink-soft); }
.card .formula { margin: 12px 0 0; font-size: 0.78rem; padding: 9px 12px; }

/* two columns set against each other */
.versus {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.versus-col { background: var(--bg); padding: 26px 24px; }
.versus-col:last-child { background: var(--surface); }
.versus-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.versus-col:last-child h4 { color: var(--red); }
.chain { display: grid; gap: 6px; }
.chain span { font-size: 1rem; font-weight: 550; letter-spacing: -0.015em; color: var(--ink); }
.chain i {
  display: block;
  width: 1px; height: 16px;
  margin-left: 3px;
  background: var(--line-firm);
}
@media (max-width: 620px) { .versus { grid-template-columns: 1fr; } }

/* the filtering funnel — proportion carried by bar width, numbers as claims */
.funnel { margin-top: 28px; display: grid; gap: 4px; max-width: 640px; }
.stage { padding: 16px 0; border-top: 1px solid var(--line); }
.stage:first-child { border-top: 0; }
.stage-top { display: flex; align-items: baseline; gap: 12px; }
.stage-n { font-family: var(--mono); font-size: 0.74rem; color: var(--red); }
.stage-t { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.stage-bar { margin: 10px 0 8px; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.stage-bar i { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.stage-d { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; }

/* ─────────────────────────── DOCUMENT FOOT ─────────────────────────── */
.doc-foot {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 9vh, 96px) 0;
  text-align: center;
}
.doc-foot .t-statement { max-width: 26ch; margin: 0 auto; }
.doc-foot .t-body { max-width: 48ch; margin: 16px auto 0; }
.doc-foot-links {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   EVIDENCE
   Measured figures, so the numbers are set in mono and the reader can scan a
   column. The wrapper scrolls on its own rather than letting a wide table
   push the page sideways.
   ═══════════════════════════════════════════════════════════════ */
.dtable-wrap { margin: 24px 0 8px; overflow-x: auto; }
.dtable {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.dtable th, .dtable td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.dtable th:first-child, .dtable td:first-child {
  text-align: left;
  padding-left: 0;
}
.dtable thead th {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom-color: var(--line-firm);
}
.dtable tbody td {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.dtable tbody td:first-child {
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--ink-soft);
}
/* the one column the surrounding prose is actually about */
.dtable .lead-col { color: var(--red); }
.dtable-note {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-faint);
  max-width: 62ch;
}

/* the falsifiable bets — numbered, because they are meant to be cited back */
.bets { margin-top: 28px; border-top: 1px solid var(--line-firm); }
.bet {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 6px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-firm);
}
.bet-n {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--red);
  padding-top: 5px;
  letter-spacing: 0.04em;
}
.bet h3 {
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  font-weight: 640;
  letter-spacing: -0.024em;
  line-height: 1.34;
  margin-bottom: 9px;
}
.bet p { font-size: 0.97rem; line-height: 1.66; color: var(--ink-soft); max-width: 62ch; }
.bet p + p { margin-top: 9px; }
.bet .then {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--red);
  color: var(--ink);
}
@media (max-width: 560px) {
  .bet { grid-template-columns: 1fr; gap: 8px; }
  .bet-n { padding-top: 0; }
}

/* a quoted line from a source, kept visually distinct from our own prose */
.quote {
  margin: 18px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--line-firm);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: 62ch;
}
.quote cite { display: block; margin-top: 9px; font-style: normal; font-size: 0.8rem; font-family: var(--mono); color: var(--ink-faint); }

/* ═══════════════════════════════════════════════════════════════
   LEGAL
   Many short numbered clauses rather than a few long arguments, so these
   sections are tighter than .doc-section and carry their number in the margin.
   ═══════════════════════════════════════════════════════════════ */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-wash);
  border: 1px solid rgba(198, 25, 25, 0.16);
  border-radius: 999px;
  padding: 6px 13px;
}

.legal { padding: clamp(40px, 7vh, 72px) 0 clamp(56px, 9vh, 96px); }
.clause {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 6px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.clause:last-of-type { border-bottom: 0; }
.clause-n {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--red);
  padding-top: 6px;
  letter-spacing: 0.04em;
}
.clause h2 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 640;
  letter-spacing: -0.024em;
  line-height: 1.3;
  margin-bottom: 12px;
}
.clause h3 {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red);
  margin: 20px 0 8px;
}
.clause p { font-size: 0.99rem; line-height: 1.7; color: var(--ink-soft); max-width: 62ch; }
.clause p + p { margin-top: 10px; }
.clause strong { color: var(--ink); }
.clause a { color: var(--red); font-weight: 500; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.clause a:hover { border-bottom-color: var(--red); }
.clause .marks { margin: 12px 0; }

/* a callout inside a clause — contact points, opt-out instructions */
.note {
  margin: 14px 0 4px;
  padding: 14px 18px;
  background: var(--surface);
  border-left: 2px solid var(--red);
  border-radius: 0 10px 10px 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}
@media (max-width: 560px) {
  .clause { grid-template-columns: 1fr; gap: 8px; }
  .clause-n { padding-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════════ */
.contact-grid {
  margin-top: clamp(40px, 7vh, 68px);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-line { padding: 18px 0; border-top: 1px solid var(--line); }
.contact-line:first-child { border-top: 0; padding-top: 0; }
.contact-k {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-v {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--ink);
}
a.contact-v:hover { color: var(--red); }
.contact-note { margin-top: 8px; font-size: 0.88rem; color: var(--ink-faint); line-height: 1.55; }

.contact-form { display: grid; gap: 14px; }
.contact-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 7px;
}
.contact-form label .opt-tag { color: var(--ink-faint); font-weight: 400; letter-spacing: 0; }
.contact-form .btn { justify-self: start; }
.contact-form .btn[disabled] { opacity: 0.55; cursor: default; }

/* the gate — one sentence about why the form is long, then it begins */
.gate {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: var(--gut);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-in { text-align: center; max-width: 560px; }
.gate-in p {
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.gate-in p + p {
  margin-top: 18px;
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.015em;
}
.gate-in .btn { margin-top: 34px; }

.apply { padding: 96px 0 clamp(72px, 12vh, 130px); }

/* progress across the steps */
.steps-rail {
  position: sticky;
  top: 74px;
  z-index: 30;
  background: var(--bg);
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}
.steps-track { flex: 1; height: 2px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.steps-track i { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.5s var(--ease-out); }
.steps-n { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); }

.step { display: none; padding-top: clamp(40px, 7vh, 68px); }
.step.on { display: block; animation: stepIn 0.5s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.step h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 640;
  max-width: 20ch;
}
.step > .t-lead { margin-top: 14px; max-width: 52ch; }

/* the two tracks, picked as cards rather than radios */
.tracks { margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.track {
  position: relative;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line-firm);
  border-radius: 16px;
  padding: 26px 24px 24px;
  cursor: pointer;
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.16s var(--ease);
}
.track:hover { border-color: var(--ink-faint); }
.track:active { transform: scale(0.99); }
.track.on {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-wash);
}
.track-tick {
  position: absolute;
  top: 20px; right: 20px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-firm);
  transition: background 0.2s, border-color 0.2s;
}
.track.on .track-tick { background: var(--red); border-color: var(--red); }
.track.on .track-tick::after {
  content: "";
  position: absolute;
  left: 6px; top: 3px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.track h3 {
  font-size: 1.12rem;
  font-weight: 640;
  letter-spacing: -0.024em;
  line-height: 1.3;
  max-width: 22ch;
  margin-bottom: 8px;
}
.track p { font-size: 0.94rem; line-height: 1.55; color: var(--ink-soft); }
.track .micro {
  margin-top: 12px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 680px) { .tracks { grid-template-columns: 1fr; } }

/* questions */
.qs { margin-top: 34px; display: grid; gap: clamp(30px, 5vh, 46px); }
.q { max-width: 62ch; }
.q-label {
  display: block;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  font-weight: 550;
  letter-spacing: -0.022em;
  line-height: 1.4;
  color: var(--ink);
}
.q-hint { margin-top: 7px; font-size: 0.88rem; color: var(--ink-faint); line-height: 1.55; }
.q-big .q-label { font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.25; letter-spacing: -0.03em; }

textarea.field { resize: vertical; min-height: 108px; line-height: 1.6; font-family: var(--sans); }
.q .field { margin-top: 14px; }

.opts { margin-top: 16px; display: grid; gap: 8px; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
  border: 1px solid var(--line-firm);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.97rem;
  color: var(--ink-soft);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.opt:hover { border-color: var(--ink-faint); color: var(--ink); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .box {
  flex: none;
  width: 17px; height: 17px;
  border: 1px solid var(--line-firm);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.opt.check .box { border-radius: 5px; }
.opt:has(input:checked) {
  border-color: var(--red);
  background: var(--red-wash);
  color: var(--ink);
  font-weight: 500;
}
.opt:has(input:checked) .box { background: var(--red); border-color: var(--red); }
.opt:has(input:checked) .box::after {
  content: "";
  position: absolute;
  left: 5.5px; top: 2px;
  width: 4px; height: 9px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.opt input:focus-visible ~ .box { box-shadow: 0 0 0 3px var(--red-wash); }

/* sliders */
.slide { margin-top: 22px; }
input[type="range"].dial {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--line-firm);
  border-radius: 999px;
  outline: none;
}
input[type="range"].dial::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  cursor: grab;
  border: 3px solid var(--bg);
  box-shadow: 0 2px 10px -2px rgba(198,25,25,0.7);
}
input[type="range"].dial::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  cursor: grab;
  border: 3px solid var(--bg);
}
.slide-ends {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.slide-ends span:last-child { text-align: right; }

.followup {
  margin-top: 18px;
  padding-left: 18px;
  border-left: 2px solid var(--red);
  display: none;
}
.followup.on { display: block; }

.step-foot { margin-top: clamp(36px, 6vh, 56px); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.step-err { font-size: 0.9rem; color: var(--red); font-weight: 500; }

/* confirmation */
.done {
  display: none;
  min-height: 64svh;
  place-items: center;
  text-align: center;
}
.done.on { display: grid; animation: stepIn 0.7s var(--ease-out); }
.done p {
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.032em;
  font-weight: 600;
}
.done p + p { margin-top: 12px; color: var(--ink-soft); font-weight: 400; }
.done .btn { margin-top: 34px; }
