/* =====================================================================
   /next/ : What an experiment could test (closing page)
   Series colours: NiH = amber, PdH = orange-ink, PdD = crimson-ink (as on the wells page).
   How firm: firm = amber, conditional = orange-ink, extrapolated = purple-ink.
   Compute tiers (as on the method page): light = orange, moderate = crimson, heavy = purple; measurement = amber.
   Every class is prefixed next-.
   ===================================================================== */
.page-next { --nih: var(--amber); --pdh: var(--orange-ink); --pdd: var(--crimson-ink); }

/* ---------- section heads ---------- */
.next-head { margin-bottom: clamp(36px, 5vw, 64px); }
.next-head .display-2 { text-wrap: balance; }
.next-head--split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px clamp(32px, 5vw, 96px); align-items: end; }
.next-head--split .lead { margin-top: 0; max-width: 52ch; }
@media (max-width: 900px) { .next-head--split { grid-template-columns: 1fr; align-items: start; } }
.next-chips { margin-top: 22px; }
.next-u { font: 400 11px/1.3 var(--font-mono); color: var(--ink-3); letter-spacing: 0.02em; text-transform: none; }
.next-h4 { font: 700 var(--fs-h4)/1.25 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.next-h4 .next-u { font-weight: 400; margin-left: 6px; }
.next-h4--gap { margin-top: clamp(32px, 4vw, 48px); }

/* ---------- hero ---------- */
.next-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--bg-deep); min-height: min(calc(100svh - var(--header-h)), 940px); display: flex; }
.next-hero--noimg { background: radial-gradient(60% 70% at 72% 50%, rgba(235, 91, 0, 0.35), transparent 70%), radial-gradient(40% 50% at 80% 60%, rgba(100, 13, 95, 0.5), transparent 70%), var(--bg-deep); }
.next-hero__media { position: absolute; inset: 0; z-index: -2; }
.next-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 50%; }
.next-hero__media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 18, 18, 0.88) 0%, rgba(18, 18, 18, 0.6) 32%, rgba(18, 18, 18, 0) 60%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.2) 0%, rgba(18, 18, 18, 0) 40%, rgba(18, 18, 18, 0) 70%, var(--bg-deep) 100%); }
.next-hero__media .illus-tag { left: auto; right: var(--gutter); bottom: 20px; }
.next-hero__inner { position: relative; display: flex; flex-direction: column; padding-top: 28px; padding-bottom: clamp(36px, 4vw, 56px); }
.next-hero .crumbs { margin-bottom: 0; }
.next-hero__copy { margin-top: clamp(24px, 7vh, 104px); max-width: 1000px; }
.next-hero__title { font: 400 clamp(54px, 8.6vw, 148px)/0.88 var(--font-display); letter-spacing: var(--track-display); margin-left: -0.04em; max-width: 9.5ch; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45); text-wrap: balance; }
.next-hero__lead { font: 400 var(--fs-lead)/1.38 var(--font-text); color: var(--ink-2); max-width: 36ch; margin-top: clamp(24px, 3vw, 40px); letter-spacing: -0.012em; text-wrap: pretty; text-shadow: 0 1px 24px rgba(0, 0, 0, 0.6); }
.next-hero__lead strong { color: var(--ink); font-weight: 400; }
.next-onpage { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: auto; padding-top: clamp(40px, 8vh, 96px); max-width: 760px; }
.next-onpage a { font: 400 12.5px/1 var(--font-mono); color: var(--ink-2); text-decoration: none; padding: 9px 0; }
.next-onpage a:hover { color: var(--amber); }
@media (max-width: 760px) {
  .next-hero { flex-direction: column; min-height: 0; background: var(--bg); }
  .next-hero__media { position: relative; order: 2; inset: auto; z-index: 0; aspect-ratio: 16 / 10; margin-top: 8px; }
  .next-hero__media::after { background: linear-gradient(180deg, var(--bg) 0%, rgba(25, 25, 25, 0) 30%, rgba(25, 25, 25, 0) 75%, var(--bg) 100%); }
  .next-hero__media img { object-position: 74% 50%; }
  .next-hero__media .illus-tag { left: var(--gutter); right: auto; bottom: 14px; max-width: calc(100% - 2 * var(--gutter)); white-space: normal; line-height: 1.35; }
  .next-hero__inner { order: 1; padding-bottom: 0; }
  .next-hero__copy { margin-top: 28px; }
  .next-onpage { order: 3; padding-top: 28px; gap: 0 16px; }
  .next-onpage a { padding: 8px 0; }
}

/* ---------- in short ---------- */
.next-short__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.next-short__p { font: 400 clamp(18px, 1.45vw, 21px)/1.5 var(--font-text); color: var(--ink-2); max-width: 46ch; letter-spacing: -0.008em; }
.next-short__p + .next-short__p { margin-top: 0.75em; }
.next-short__p strong { color: var(--ink); font-weight: 400; }
.next-short .statbar__label { font-size: clamp(16px, 1.55vw, 24px); }
.next-short .statbar { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.next-short .statbar__value { font-size: clamp(48px, 6.4vw, 92px); }
@media (max-width: 720px) { .next-short .statbar { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .next-short__grid { grid-template-columns: 1fr; } }

/* ---------- figure frame ---------- */
.next-fig { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-deep); overflow: hidden; min-width: 0; }
.next-fig__bar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.03em; color: var(--ink-2); text-transform: uppercase; }
.next-fig__tag { color: var(--amber); white-space: nowrap; }
.next-fig__cap { padding: 13px 16px 15px; border-top: 1px solid var(--line); font: 400 12.5px/1.65 var(--font-mono); color: var(--ink-3); }
.next-fig__cap b { color: var(--ink-2); font-weight: 500; }
.next-fig__cap .chip { margin: 2px 4px 0 0; }
.next-figlabel { font: 500 12px/1.4 var(--font-mono); color: var(--amber); letter-spacing: 0.03em; text-transform: uppercase; margin: clamp(28px, 3vw, 40px) 0 4px; }
.next-cap { font: 400 12.5px/1.65 var(--font-mono); color: var(--ink-3); margin-top: 18px; max-width: 96ch; }
.next-key { display: inline-block; flex: none; width: 18px; height: 3px; border-radius: 1px; vertical-align: middle; background: var(--ink-2); }
.next-key--nih { background: var(--nih); }
.next-key--pdh { background: var(--pdh); }
.next-key--pdd { background: var(--pdd); }

/* ---------- 09.1 the frequency ruler ---------- */
.next-ruler__body { padding: 10px 16px 6px; }
.next-ruler__row { --c: var(--ink-2); display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 0 24px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.next-ruler__row:not(.next-ruler__row--axis):hover { background: rgba(255, 255, 255, 0.02); }
.next-ruler__row--axis { padding: 4px 0; border-bottom: 0; }
.next-ruler__row--bottom { padding-top: 8px; }
.next-ruler__unit { font: 500 11px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0.04em; text-align: right; }
.next-ruler__scale { position: relative; height: 16px; }
.next-ruler__scale span { position: absolute; top: 0; transform: translateX(-50%); font: 400 11px/16px var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.next-ruler__scale span:first-child { transform: none; }
.next-ruler__head { display: grid; gap: 4px; }
.next-ruler__mat { display: flex; align-items: center; gap: 10px; font: 400 22px/1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.next-ruler__vals { font: 400 12px/1.55 var(--font-mono); color: var(--ink-3); }
.next-ruler__vals b { color: var(--ink); font-weight: 500; }
.next-ruler__vals span { display: block; }
.next-ruler__track { position: relative; height: 66px;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% * 10 / 45) 100%; background-repeat: repeat-x; }
.next-ruler__track::after { content: ""; position: absolute; left: 0; right: 0; top: 50px; height: 1px; background: var(--line-2); }
.next-ruler__arc { position: absolute; left: 0; top: 0; width: 100%; height: 50px; overflow: visible; pointer-events: none; }
.next-ruler__arc path { fill: none; stroke: var(--c); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.85; }
.next-ruler__x2 { position: absolute; top: 0; transform: translateX(-50%); font: 500 11px/1 var(--font-mono); color: var(--c); padding: 1px 4px; background: var(--bg-deep); border-radius: 2px; }
.next-mk { position: absolute; top: 50px; z-index: 1; transform: translate(-50%, -50%); cursor: default; }
.next-mk::before { content: ""; position: absolute; inset: -7px; }
.next-mk:focus { outline: none; }
.next-mk:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 50%; }
.next-mk--mode { width: 15px; height: 15px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg-deep); z-index: 2; }
.next-mk--pump { width: 15px; height: 15px; border-radius: 50%; background: var(--bg-deep); border: 2.5px solid var(--c); }
.next-mk--meas { width: 3px; height: 30px; background: var(--ink); border-radius: 1px; z-index: 3; box-shadow: 0 0 0 1px var(--bg-deep); }
.next-mk--meas:focus-visible { border-radius: 1px; }
.next-readout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 12px 16px; border-top: 1px solid var(--line); }
.next-readout__legend { font: 400 12px/1.4 var(--font-mono); color: var(--ink-3); display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; }
.next-li { display: inline-flex; align-items: center; gap: 8px; }
.next-sym { display: inline-block; flex: none; }
.next-sym--mode { width: 11px; height: 11px; border-radius: 50%; background: var(--ink-2); }
.next-sym--pump { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink-2); }
.next-sym--meas { width: 3px; height: 14px; background: var(--ink); border-radius: 1px; }
@media (max-width: 760px) {
  .next-ruler__row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 0 8px; }
  .next-ruler__row--axis { padding: 2px 0; }
  .next-ruler__row--axis .next-ruler__unit { text-align: left; }
  .next-ruler__row--axis { grid-template-columns: 2.6em minmax(0, 1fr); gap: 0 6px; }
  .next-ruler__head { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 12px; }
  .next-ruler__mat { font-size: 19px; }
  .next-ruler__vals { font-size: 11.5px; }
}
@media (max-width: 760px) {
  /* the axis rows keep a narrow unit column; the tracks need the same left edge */
  .next-ruler__row:not(.next-ruler__row--axis) .next-ruler__track { margin-left: calc(2.6em + 6px); }
}

.next-where__notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 44px); margin-top: clamp(32px, 4vw, 52px); }
.next-note { border-top: 1px solid var(--line-2); padding-top: 14px; }
.next-note__k { font: 500 12px/1.3 var(--font-mono); color: var(--amber); letter-spacing: 0.03em; }
.next-note p:last-child { font: 400 16px/1.6 var(--font-text); color: var(--ink-2); margin-top: 10px; max-width: 46ch; }
.next-inlink { color: var(--ink); text-decoration-color: var(--amber); }
.next-inlink:hover { color: var(--amber); }
@media (max-width: 900px) { .next-where__notes { grid-template-columns: 1fr; } }

/* ---------- tooltip ---------- */
.next-tip { position: fixed; z-index: 300; max-width: 280px; padding: 9px 11px; background: var(--paper-2); color: var(--paper-ink); font: 400 12.5px/1.45 var(--font-mono); border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; }
.next-tip.is-on { opacity: 1; transform: none; }
.next-tip b { font-weight: 600; }

/* ---------- how firm (tag) ---------- */
.next-basis { --c: var(--amber); display: inline-flex; align-items: center; gap: 7px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); border-radius: 3px; padding: 4px 7px 3px; white-space: nowrap; }
.next-basis--cond { --c: var(--orange-ink); }
.next-basis--extra { --c: var(--purple-ink); }
.next-basis__pips { display: inline-grid; grid-template-columns: repeat(3, 6px); gap: 2px; }
.next-basis__pips i { display: block; height: 6px; background: var(--c); opacity: 0.22; }
.next-basis--firm .next-basis__pips i { opacity: 1; }
.next-basis--cond .next-basis__pips i:nth-child(-n + 2) { opacity: 1; }
.next-basis--extra .next-basis__pips i:nth-child(1) { opacity: 1; }
.next-basiskey { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 10px 32px; }
.next-basiskey li { display: flex; align-items: baseline; gap: 10px; font: 400 12.5px/1.45 var(--font-mono); color: var(--ink-2); max-width: 46ch; }
.next-basiskey .next-basis { flex: none; }

/* ---------- filter controls ---------- */
.next-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin-bottom: 18px; }
.next-ctl__g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.next-ctl__k { font: 500 11px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-right: 6px; }
.next-seg { font: 400 12.5px/1 var(--font-mono); color: var(--ink-2); padding: 9px 11px; min-height: 34px; border: 1px solid var(--line-2); border-radius: 3px; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.next-seg:hover { color: var(--ink); border-color: var(--ink-3); }
.next-seg[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.next-ctl__count { margin-left: auto; font: 400 12px/1.4 var(--font-mono); color: var(--ink-3); }
.no-js .next-ctl { display: none; }
@media (max-width: 640px) { .next-ctl__count { margin-left: 0; } }
.next-empty { font: 400 14px/1.5 var(--font-mono); color: var(--ink-2); padding: 24px 0; }
.next-reset { color: var(--amber); text-decoration: underline; text-underline-offset: 0.2em; margin-left: 6px; }

/* ---------- the prediction board ---------- */
.next-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.next-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px 18px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: calc(var(--header-h) + 24px); transition: border-color 0.25s, box-shadow 0.25s; }
.next-card[hidden] { display: none; }
.next-card:target, .next-card.is-flash { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.next-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.next-card__n { font: 400 40px/0.85 var(--font-display); letter-spacing: var(--track-display); color: var(--ink); margin-right: 2px; }
.next-card__mats { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.next-card__head .next-basis { margin-left: auto; }
.next-card__h { font: 400 clamp(22px, 1.9vw, 27px)/1.08 var(--font-display); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.next-mat { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--font-mono); color: var(--ink-2); }
.next-mat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.next-mat--nih { --c: var(--nih); }
.next-mat--pdh { --c: var(--pdh); }
.next-mat--pdd { --c: var(--pdd); }
.next-mat--ni-on::before { background: linear-gradient(90deg, var(--ink-2) 50%, var(--pdd) 50%); }
.next-card__io { display: grid; gap: 0; border-top: 1px solid var(--line); }
.next-card__io div { display: grid; grid-template-columns: 7.6em minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.next-card__io dt { font: 500 10.5px/1.6 var(--font-mono); color: var(--ink-3); letter-spacing: 0.03em; }
.next-card__io dd { margin: 0; font: 400 14.5px/1.55 var(--font-text); color: var(--ink-2); }
.next-card__io div:nth-child(2) dd { color: var(--ink); }
.next-card__src { margin-top: auto; padding-top: 4px; }
@media (max-width: 420px) {
  .next-card { padding: 16px 14px 14px; }
  .next-card__io div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.next-xref { display: inline-block; font: 500 12px/1 var(--font-mono); color: var(--ink); text-decoration: none; padding: 5px 8px; margin: 0 6px 4px 0; border: 1px solid var(--line-2); border-radius: 3px; transition: border-color 0.2s, color 0.2s; }
.next-xref:hover { border-color: var(--amber); color: var(--amber); }

/* mini charts inside the cards (inline SVG, drawn by the template) */
.next-mini { width: 100%; height: auto; overflow: visible; }
.next-mini__cap { font: 400 11.5px/1.5 var(--font-mono); color: var(--ink-3); margin-top: -4px; }
.next-mini__l { font: 500 11.5px var(--font-mono); fill: var(--ink-2); }
.next-mini__l--sm { font-size: 10.5px; font-weight: 400; fill: var(--ink-3); }
.next-mini__t { font: 400 10.5px var(--font-mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.next-mini__v { font: 500 11.5px var(--font-mono); fill: var(--ink); font-variant-numeric: tabular-nums; }
.next-mini__vs { font-weight: 400; fill: var(--ink-3); }
.next-mini__vin { font: 600 11.5px var(--font-mono); fill: #121212; font-variant-numeric: tabular-nums; }
.next-mini__axis { stroke: var(--line-2); stroke-width: 1; }
.next-mini__grid { stroke: var(--line); stroke-width: 1; }
.next-mini__zero { stroke: var(--line-2); stroke-width: 1; }
.next-mini__guide { stroke: var(--line); stroke-width: 1; }
.next-mini__track { fill: var(--bg-raise-2); }
.next-mini__bar { fill: var(--ink-3); }
.next-mini__bar--nih { fill: var(--nih); }
.next-mini__bar--pdh { fill: var(--pdh); }
.next-mini__bar--pdd { fill: var(--pdd); }
.next-mini__bar--pddim { fill: color-mix(in srgb, var(--pdd) 45%, var(--bg)); }
.next-mini__meas { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.next-mini__dot { stroke: var(--bg); stroke-width: 2; }
.next-mini__dot--nih { fill: var(--nih); }
.next-mini__dot--pdh { fill: var(--pdh); }
.next-mini__dot--pdd { fill: var(--pdd); }
.next-mini__dot.is-hollow { fill: var(--bg); stroke: var(--pdd); stroke-width: 2; }
.next-mini__line { fill: none; stroke: var(--pdd); stroke-width: 1.8; }
.next-mini__line--dash { stroke-dasharray: 3 4; }
.next-mini__range { stroke: var(--orange-ink); stroke-width: 2; }
.next-mini__sq { fill: var(--ink-2); }
.next-mini__tri { fill: var(--purple-ink); }

/* ---------- 09.3 trust ---------- */
.next-trust__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 72px); }
.next-col { --c: var(--amber); border-top: 3px solid var(--c); padding-top: 16px; }
.next-col--not { --c: var(--purple-ink); }
.next-col__k { font: 500 13px/1.3 var(--font-mono); color: var(--c); letter-spacing: 0.03em; }
.next-col__list { margin-top: 10px; }
.next-col__list li { position: relative; padding: 13px 0 13px 24px; border-bottom: 1px solid var(--line); font: 400 16px/1.55 var(--font-text); color: var(--ink-2); }
.next-col__list li::before { content: ""; position: absolute; left: 0; top: 20px; width: 10px; height: 10px; background: var(--c); }
.next-col--not .next-col__list li::before { background: transparent; border: 2px solid var(--c); }
.next-col__list b { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) { .next-trust__cols { grid-template-columns: 1fr; } }

/* the structural finding: a paper card */
.next-finding { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 28px clamp(28px, 4vw, 64px); margin-top: clamp(48px, 6vw, 88px); padding: clamp(24px, 3vw, 44px); background: var(--paper); color: var(--paper-ink); border-radius: 10px; border-left: 6px solid var(--amber); }
.next-finding__k { font: 600 12.5px/1.3 var(--font-mono); color: var(--purple); letter-spacing: 0.03em; }
.next-finding__h { font: 400 clamp(30px, 3.2vw, 48px)/1 var(--font-display); letter-spacing: -0.04em; color: var(--paper-ink); margin-top: 14px; text-wrap: balance; }
.next-finding__p { font: 400 16.5px/1.6 var(--font-text); color: var(--paper-ink-2); margin-top: 16px; max-width: 44ch; }
.next-finding__p strong { color: var(--paper-ink); font-weight: 700; }
.next-finding__cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-content: start; }
.next-finding__cases li { border-top: 1px solid var(--paper-line); padding-top: 14px; }
.next-finding__ck { font: 600 11px/1.35 var(--font-mono); color: var(--purple); letter-spacing: 0.03em; margin-top: 10px; }
.next-finding__cases li p:last-child { font: 400 15px/1.55 var(--font-text); color: var(--paper-ink-2); margin-top: 8px; }
.next-finding__note { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 400 12px/1.5 var(--font-mono); color: var(--paper-ink-2); padding-top: 14px; border-top: 1px solid var(--paper-line); }
.next-finding .chip { color: var(--paper-ink-2); border-color: var(--paper-line); }
.next-finding .chip__arrow { color: var(--purple); }
.next-finding .chip:hover { color: var(--paper-ink); }
.next-glyph { width: 150px; height: auto; overflow: visible; }
.next-glyph__dir { fill: none; stroke: var(--purple); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.next-glyph__w { fill: none; stroke: var(--paper-ink); stroke-width: 2.2; stroke-linecap: round; }
.next-glyph__b { fill: var(--crimson); }
.next-glyph__ghost { fill: none; stroke: var(--crimson); stroke-width: 1.4; stroke-dasharray: 2 3; }
.next-glyph__a { fill: none; stroke: var(--purple); stroke-width: 1.6; stroke-dasharray: 3 3; }
.next-glyph__a--v { stroke-dasharray: 3 3; }
.next-glyph__film { stroke: var(--paper-ink-2); stroke-width: 2; }
.next-glyph__axis { stroke: var(--paper-ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.next-glyph__vac { fill: none; stroke: var(--paper-ink-2); stroke-width: 1.4; stroke-dasharray: 3 2; }
@media (max-width: 1100px) { .next-finding { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .next-finding__cases { grid-template-columns: 1fr; } .next-finding { border-left-width: 4px; } }

/* ---------- 09.4 the next pass ---------- */
.next-road { margin: 0; }
.next-passes { display: flex; align-items: flex-end; gap: 3px; flex-wrap: nowrap; }
.next-passes__i { --c: var(--amber); --on: var(--on-amber); display: grid; gap: 6px; width: clamp(64px, 9vw, 120px); text-decoration: none; }
.next-passes__i--orange { --c: var(--orange); --on: var(--on-orange); }
.next-passes__i--crimson { --c: var(--crimson); --on: #fff; }
.next-passes__i--purple { --c: var(--purple); --on: #fff; }
.next-passes__b { display: flex; align-items: flex-start; height: calc(24px + var(--i) * 11px); background: var(--c); color: var(--on); padding: 3px 7px; transition: filter 0.2s; }
.next-passes__b b { font: 400 18px/1 var(--font-display); }
a.next-passes__i:hover .next-passes__b { filter: brightness(1.15); }
a.next-passes__i:hover .next-passes__t { color: var(--ink); }
.next-passes__t { font: 500 10px/1.2 var(--font-mono); color: var(--ink-3); letter-spacing: 0.03em; }
.next-passes__i--next .next-passes__b { background: transparent; border: 1.5px dashed var(--amber); color: var(--amber); opacity: 1; }
.next-passes__i--next .next-passes__t { color: var(--amber); }
@media (max-width: 520px) { .next-passes__t { font-size: 9px; } .next-passes__i { width: auto; flex: 1 1 0; } }

.next-scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(22rem, 100%); margin-top: 14px; border-bottom: 1px solid var(--line-2); }
.next-scale span { font: 500 10px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0.04em; padding: 0 0 7px 6px; border-left: 1px solid var(--line-2); }
.next-steps { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.next-steps .next-step:first-child { border-top: 0; }
.next-step { --c: var(--orange); --c2: var(--crimson); --on: var(--on-orange); display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "bar text" "sharp text"; gap: 14px clamp(24px, 3.5vw, 56px); padding: 22px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.next-step__bar { grid-area: bar; }
.next-step__text { grid-area: text; }
.next-step__sharp { grid-area: sharp; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.next-step__sk { width: 100%; font: 500 10.5px/1.7 var(--font-mono); color: var(--ink-3); letter-spacing: 0.03em; margin-bottom: 6px; }
.next-step--t2 { --c: var(--crimson); --c2: var(--purple); --on: #fff; }
.next-step--t3 { --c: var(--purple); --c2: var(--purple); --on: #fff; }
.next-step--meas { --c: var(--amber); --on: var(--on-amber); }
.next-step:target, .next-step.is-flash { background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 8%, transparent), transparent 70%); }
.next-step__bar { position: relative; height: 76px; background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px calc(100% / 3)), var(--bg-deep); }
.next-step__fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--lo) / 3 * 100%); display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--c); color: var(--on); transform-origin: left center; }
.next-step__ext { position: absolute; top: 0; bottom: 0; left: calc(var(--lo) / 3 * 100%); width: calc((var(--hi) - var(--lo)) / 3 * 100%); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c2) 85%, transparent) 0 3px, transparent 3px 8px); }
.next-step__num { font: 400 clamp(44px, 4vw, 60px)/0.84 var(--font-display); letter-spacing: var(--track-display); }
.next-step__tier { font: 500 10.5px/1.25 var(--font-mono); letter-spacing: 0.04em; text-align: right; padding-top: 3px; }
.next-step__h { font: 400 clamp(22px, 2vw, 30px)/1.1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.next-step__flag { display: inline-block; font: 600 10.5px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-amber); background: var(--amber); padding: 5px 7px 4px; border-radius: 3px; margin-right: 12px; vertical-align: 0.3em; }
.next-step__io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; margin-top: 12px; }
.next-step__io div:first-child { grid-column: 1 / -1; }
.next-step__io div { display: grid; grid-template-rows: auto 1fr; gap: 3px; padding: 7px 0; }
.next-step__io dt { font: 500 10.5px/1.7 var(--font-mono); color: var(--ink-3); letter-spacing: 0.03em; }
.next-step__io dd { margin: 0; font: 400 15.5px/1.55 var(--font-text); color: var(--ink-2); max-width: 78ch; }
.next-step__io div:first-child dd { color: var(--ink); }
.js .next-road[data-reveal] .next-step__fill { transform: scaleX(0.04); transition: transform 1s var(--ease-out); }
.js .next-road[data-reveal].is-in .next-step__fill { transform: none; }
.next-road .next-step:nth-child(2) .next-step__fill { transition-delay: 0.06s; }
.next-road .next-step:nth-child(3) .next-step__fill { transition-delay: 0.12s; }
.next-road .next-step:nth-child(4) .next-step__fill { transition-delay: 0.18s; }
.next-road .next-step:nth-child(5) .next-step__fill { transition-delay: 0.24s; }
.next-road .next-step:nth-child(6) .next-step__fill { transition-delay: 0.3s; }
.next-road .next-step:nth-child(7) .next-step__fill { transition-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) { .js .next-road[data-reveal] .next-step__fill { transform: none !important; transition: none !important; } }
@media (max-width: 900px) {
  .next-scale { width: 100%; }
  .next-step { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "bar" "text" "sharp"; }
  .next-step__bar { height: 64px; }
}
@media (max-width: 520px) {
  .next-step__io { grid-template-columns: minmax(0, 1fr); }
  .next-step__num { font-size: 40px; }
  .next-step__tier { font-size: 9.5px; }
}

.next-outside { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 12px clamp(24px, 3.5vw, 56px); margin-top: clamp(48px, 6vw, 80px); padding: clamp(20px, 2.4vw, 30px); border: 1px solid var(--line-2); border-radius: 10px; }
.next-outside__k { font: 500 12px/1.4 var(--font-mono); color: var(--ink-2); letter-spacing: 0.03em; }
.next-outside__p { font: 400 clamp(18px, 1.5vw, 22px)/1.45 var(--font-text); color: var(--ink); max-width: 58ch; letter-spacing: -0.01em; }
@media (max-width: 720px) { .next-outside { grid-template-columns: 1fr; } }

/* ---------- 09.5 detail ---------- */
.next-table td { font-variant-numeric: tabular-nums; }
.next-table th { white-space: normal; }
.next-table th i { text-transform: none; font-family: var(--font-text); font-size: 14px; }
.next-table .next-nt { text-transform: none; letter-spacing: 0; }
.next-detail__inputs .next-table td:first-child { min-width: 190px; }
.next-detail__inputs .next-table td { min-width: 0; white-space: nowrap; }
.next-detail__inputs .next-table td:first-child { white-space: normal; }
.next-table td code { font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.next-table tr.is-scen td { color: var(--ink-3); }
.next-table tr.is-scen td:first-child { color: var(--ink-2); }
.next-table a { color: var(--ink); text-decoration-color: var(--amber); }
.next-detail > .container > .next-table td:nth-child(3) { min-width: 260px; }
.next-detail > .container > .next-table td:last-child { min-width: 220px; }
.next-detail > .container > .next-table td:first-child { min-width: 0; color: var(--amber); font-family: var(--font-mono); }
.next-detail > .container > .next-table td:nth-child(2) { color: var(--ink); min-width: 160px; }
.next-detail__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: clamp(48px, 6vw, 88px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.next-detail__eqs .next-h4 { margin-top: 34px; }
.next-detail__eqs .next-h4:first-child { margin-top: 0; }
.next-detail__inputs .table-wrap { margin: 14px 0 0; }
.next-eq { display: flex; align-items: baseline; gap: 18px; margin-top: 14px; padding: 16px 18px; background: var(--bg-raise); border-left: 2px solid var(--crimson); border-radius: 0 6px 6px 0; overflow-x: auto; }
.next-eq__n { font: 500 12px/1 var(--font-mono); color: var(--crimson-ink); flex: none; }
.next-eq__f { font: 400 clamp(19px, 1.8vw, 25px)/1.4 var(--font-text); color: var(--ink); letter-spacing: 0.005em; white-space: nowrap; }
.next-eq__f sub, .next-eq__f sup { font-size: 0.62em; }
.next-def { font: 400 15.5px/1.65 var(--font-text); color: var(--ink-2); margin-top: 12px; max-width: 70ch; }
.next-def i { color: var(--ink); }
.next-note-sm { font: 400 12.5px/1.6 var(--font-mono); color: var(--ink-3); margin-top: 10px; max-width: 76ch; }
.next-note-sm .chip { margin-left: 4px; }
@media (max-width: 980px) { .next-detail__cols { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .next-eq__f { white-space: normal; font-size: 17px; } .next-eq { padding: 14px 12px; gap: 10px; } }

/* ---------- end ---------- */
.next-end__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.next-end__lead { margin-top: 24px; }
@media (max-width: 900px) { .next-end__grid { grid-template-columns: 1fr; } }

/* grid children may shrink below their content */
:is(.next-short__grid, .next-head--split, .next-trust__cols, .next-finding, .next-step, .next-detail__cols, .next-end__grid, .next-outside) > * { min-width: 0; }
