@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Azeret Mono";
  src: url("assets/fonts/azeret-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

/* The Curb Test: a sidewalk at first light. Concrete paper, an asphalt trunk
   panel, one burnt orange that only ever means action, and a park green for a
   checkpoint that holds. Nothing lifts; hairlines and the stage's own grid do
   the work. */
:root {
  --ground: #f1ece2;
  --ground-2: #e9e3d7;
  --paper: #fbf8f1;
  --panel: #232a2b;
  --panel-2: #2b3334;
  --panel-3: #374243;
  --ink: #191d1c;
  --muted: #5f6864;
  --line: rgba(25, 29, 28, 0.14);
  --line-2: rgba(25, 29, 28, 0.28);
  --line-3: rgba(25, 29, 28, 0.45);
  --action: #b3471c;
  --action-2: #94370f;
  --action-ink: #fff6ee;
  --action-dim: rgba(179, 71, 28, 0.1);
  --good: #2f6b4f;
  --good-dim: rgba(47, 107, 79, 0.1);
  --warn: #8a6414;
  --warn-dim: rgba(138, 100, 20, 0.12);
  --fail: #a32e2e;
  --fail-dim: rgba(163, 46, 46, 0.1);
  --sky: #4a7d92;
  --stage-ink: #ece7da;
  --stage-muted: #a4afab;
  --stage-line: rgba(236, 231, 218, 0.16);
  --stage-line-2: rgba(236, 231, 218, 0.34);
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", monospace;
  --max: 1360px;
  --gutter: clamp(18px, 4.4vw, 56px);
  --label: 0.6875rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
main section[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    repeating-linear-gradient(0deg, rgba(25, 29, 28, 0.026) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(25, 29, 28, 0.018) 0 1px, transparent 1px 96px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--action); color: var(--action-ink); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) var(--ground); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--ground); }

a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; background: var(--action); color: var(--action-ink);
  font-family: var(--mono); font-size: 0.75rem; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin-inline: auto; }

.mono {
  font-family: var(--mono);
  font-size: var(--label);
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

/* ---------- bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 94%, transparent);
  border-bottom: 1px solid var(--line-2);
  backdrop-filter: blur(8px);
}
.bar-in { display: flex; align-items: center; gap: 1.2rem; min-height: 64px; }

.brand { display: flex; flex-direction: column; gap: 0.05rem; text-decoration: none; line-height: 1; }
.brand-a { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.04em; text-transform: uppercase; font-stretch: 112%; }
.brand-b { font-family: var(--mono); font-size: var(--label); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--action); }

.bar-tool { margin-left: auto; color: var(--muted); }
.bar-live {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.bar-live b { color: var(--action); font-size: 0.95rem; letter-spacing: 0.02em; }

.reset {
  background: none; border: 1px solid var(--line-2); color: var(--muted);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.55rem 0.7rem;
}
.reset:hover { color: var(--ink); border-color: var(--line-3); }

.social { display: flex; gap: 0.25rem; }
.social a { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); text-decoration: none; }
.social a:hover { color: var(--action); }
.social svg { width: 17px; height: 17px; }

/* ---------- intro ---------- */

.intro { padding: clamp(2.2rem, 5vw, 4.2rem) 0 clamp(1.8rem, 4vw, 3.2rem); }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.intro h1 {
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  font-weight: 800;
  max-width: 17ch;
  font-stretch: 110%;
  text-wrap: balance;
}
.lede-answer { max-width: 62ch; margin: 1.1rem 0 0; font-size: 1.05em; line-height: 1.6; }
.last-checked {
  margin-top: 0.9rem; color: var(--muted);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro-copy > p:not(.lede-answer):not(.last-checked) { margin-top: 1.1rem; max-width: 58ch; color: var(--muted); }

.intro-specs {
  display: flex; flex-wrap: wrap; list-style: none; margin: 1.7rem 0 0; padding: 0;
  border-top: 1px solid var(--line-2);
}
.intro-specs li {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.8rem 1.3rem 0.8rem 0; margin-right: 1.3rem;
  border-right: 1px solid var(--line);
}
.intro-specs li:last-child { border-right: 0; }
.intro-specs .mono { color: var(--muted); font-size: var(--label); }
.intro-specs b { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }

/* the outing card — the one dark object above the fold */
.ticket {
  margin: 0;
  background: var(--panel);
  color: var(--stage-ink);
  border: 1px solid #101415;
}
.ticket-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1rem; border-bottom: 1px dashed var(--stage-line-2);
  color: var(--stage-muted); font-size: var(--label);
}
.ticket-body { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem; }
.ticket-img { width: 104px; height: 104px; object-fit: contain; background: #fff; border: 1px solid var(--stage-line-2); }
.ticket-type { padding: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.ticket-size { padding: 0.15rem 0 0; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--stage-muted); }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px dashed var(--stage-line-2); }
.ticket-grid > div { padding: 0.75rem 1rem; border-bottom: 1px dashed var(--stage-line-2); }
.ticket-grid > div:nth-child(odd) { border-right: 1px dashed var(--stage-line-2); }
.ticket-grid dt { color: var(--stage-muted); font-size: var(--label); margin-bottom: 0.25rem; }
.ticket-grid dd { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.ticket-link { color: inherit; text-decoration: underline; text-decoration-color: var(--stage-line-2); text-underline-offset: 3px; }
.ticket-link:hover { color: #fff; text-decoration-color: #fff; }
.ticket-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.8rem 1rem; color: var(--stage-muted);
}
.ticket-foot b { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--stage-ink); }
.ticket-foot b.caution { color: #e8b45a; }
.ticket-foot b.no { color: #e8846a; }
.ticket-foot b.fits { color: #8fd0b0; }

/* ---------- notice ---------- */

.notice {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.4rem;
  align-items: start;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--action);
  background: var(--action-dim);
}
.notice-tag { color: var(--action); padding-top: 0.1rem; }
.notice ul { list-style: none; display: grid; gap: 0.25rem; }
.notice li { font-size: 0.92rem; }
.notice li::before { content: "— "; color: var(--action); }

/* ---------- section grammar ---------- */

.sec-head {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.2rem, 4vw, 4rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: clamp(1.2rem, 2.5vw, 2rem);
  border-top: 1px solid var(--line-2);
}
.sec-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-stretch: 108%; }
.sec-head p { color: var(--muted); max-width: 64ch; }
.sec-num {
  display: inline-block; margin-right: 0.7rem; color: var(--action);
  font-family: var(--mono); font-size: var(--label); font-weight: 500;
  letter-spacing: 0.12em; vertical-align: 0.35em;
}

/* ---------- presets ---------- */

.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.preset {
  display: flex; flex-direction: column; gap: 0.1rem; text-align: left;
  padding: 0.5rem 0.75rem; min-width: 150px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
}
.preset b { font-size: 0.9rem; font-weight: 600; }
.preset span { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; color: var(--muted); }
.preset:hover { border-color: var(--line-3); }
.preset[aria-pressed="true"] { border-color: var(--action); background: var(--action-dim); }
.preset[aria-pressed="true"] span { color: var(--ink); }

/* ---------- curb ---------- */

.curb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
  gap: clamp(1.2rem, 2.6vw, 2rem);
  align-items: start;
}

.stage {
  border: 1px solid #101415;
  background: linear-gradient(168deg, var(--panel-2), var(--panel) 72%);
  color: var(--stage-ink);
  padding: 0.9rem;
}
.stage-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0 0.2rem 0.7rem; border-bottom: 1px solid var(--stage-line);
  color: var(--stage-muted);
}
.stage-head .mono:first-child { color: #fff; }

.stage-figure { margin: 0; }
.stage-figure svg { display: block; width: 100%; height: auto; }
.stage-cap {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.4rem 0.2rem 0.8rem; border-bottom: 1px solid var(--stage-line);
  color: var(--stage-muted);
}

.floor { fill: #1a2122; stroke: var(--stage-line-2); stroke-width: 1.5; }
.sill { fill: url(#sillHatch); stroke: #101415; stroke-width: 1; }
.open-line { stroke: var(--action); stroke-width: 2; stroke-dasharray: 6 4; }
.stage-label { fill: var(--stage-muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.dim-line { stroke: var(--stage-line-2); stroke-width: 1; }
.dim-text { fill: var(--stage-muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; }
/* The frame is dragged with a finger on a phone, so the stage must not also
   scroll under it. */
#boxGroup, #boxGroup * { touch-action: none; }
.folded-box { fill: rgba(179, 71, 28, 0.3); stroke: #e8846a; stroke-width: 2; cursor: grab; }
.folded-box:active { cursor: grabbing; }
.folded-box.is-off { fill: rgba(236, 231, 218, 0.08); stroke: var(--stage-line-2); stroke-dasharray: 5 4; }
.box-label { fill: #fff; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; pointer-events: none; }
.box-label .sub { fill: var(--stage-muted); font-size: 8.5px; }
#boxGroup:focus-visible .folded-box { stroke-width: 4; }
.no-car { fill: var(--stage-muted); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }

.readouts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--stage-line); border-bottom: 1px solid var(--stage-line);
}
.readout {
  display: grid; gap: 0.1rem; padding: 0.7rem 0.8rem;
  border-right: 1px solid var(--stage-line);
}
.readout:last-child { border-right: 0; }
.readout .mono { color: var(--stage-muted); font-size: var(--label); }
.readout b { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.readout b.no { color: #e8846a; }
.readout b.caution { color: #e8b45a; }
.readout b.fits { color: #8fd0b0; }
.readout b.small { font-size: 0.86rem; letter-spacing: 0; }

.stage-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 0 0.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.6rem 1rem;
  border: 1px solid var(--action); background: var(--action); color: var(--action-ink);
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  touch-action: manipulation;
}
.btn:hover { background: var(--action-2); border-color: var(--action-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--stage-ink); border-color: var(--stage-line-2); }
.btn.ghost:hover { border-color: #e8846a; color: #fff; }

.stage-read {
  margin-top: 0.2rem; padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--stage-line-2); background: rgba(0, 0, 0, 0.18);
  font-size: 0.94rem; color: var(--stage-ink);
}
.stage-read.fits { border-left-color: #8fd0b0; }
.stage-read.caution { border-left-color: #e8b45a; }
.stage-read.no { border-left-color: #e8846a; }

.stage .saved-mount { margin-top: 1rem; }

/* ---------- controls ---------- */

.controls { display: grid; gap: 1rem; }
.control-group { border: 1px solid var(--line-2); background: var(--paper); }
.control-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line);
}
.control-head h3 { font-size: 1rem; font-weight: 600; }
.control-head .mono { color: var(--muted); font-size: var(--label); }

.field { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; margin-bottom: 0.45rem; }
.field-head label, .field-head .mono:first-child { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.field-head output, .field-head .mono:last-child { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; color: var(--action); }
.field.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field.two-up > div { min-width: 0; }

.seg { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.seg button {
  min-height: 40px; padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase;
}
.seg button:hover { color: var(--ink); border-color: var(--line-3); }
.seg button[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.seg.chips { display: grid; grid-template-columns: 1fr 1fr; }
.seg.chips button { min-height: 44px; text-align: left; text-transform: none; letter-spacing: 0.02em; font-family: var(--sans); font-size: 0.78rem; font-weight: 500; }
.seg.chips button[aria-pressed="true"] { font-weight: 600; }

select {
  width: 100%; min-height: 44px; padding: 0.35rem 0.5rem;
  border: 1px solid var(--line-2); border-radius: 0;
  background: #fff; color: var(--ink);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.04em;
}

.toggle {
  width: 100%; min-height: 44px; padding: 0.4rem 0.6rem;
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.08em; text-transform: uppercase;
}
.toggle[aria-pressed="true"] { border-color: var(--action); background: var(--action-dim); color: var(--action); }

input[type="range"] { width: 100%; accent-color: var(--action); min-height: 28px; }
input[type="range"]:focus-visible { outline-offset: 6px; }
.hint { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.trunk-help { padding: 0.9rem; border: 1px dashed var(--line-2); }
.trunk-help p { color: var(--muted); font-size: 0.86rem; margin-top: 0.35rem; }
.trunk-help .mono { color: var(--action); }

/* ---------- route ---------- */

.route {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none; gap: 0; margin-top: 1.4rem;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.checkpoint { padding: 0.9rem 0.9rem 1rem; border-right: 1px solid var(--line); position: relative; }
.checkpoint:last-child { border-right: 0; }
.checkpoint::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--line-2);
}
.checkpoint.pass::before { background: var(--good); }
.checkpoint.caution::before { background: var(--warn); }
.checkpoint.fail::before { background: var(--fail); }
.checkpoint.off::before { background: var(--line-2); }
.cp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.cp-label { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.cp-status { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.1em; text-transform: uppercase; }
.pass .cp-status { color: var(--good); }
.caution .cp-status { color: var(--warn); }
.fail .cp-status { color: var(--fail); }
.off .cp-status { color: var(--muted); }
.cp-unit { margin-top: 0.15rem; color: var(--muted); font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; }
.cp-note { margin-top: 0.4rem; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

/* ---------- results ---------- */

.results { padding-bottom: clamp(1rem, 2vw, 2rem); }
.result-head {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.6rem 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  color: var(--muted);
}
.result-head .mono:first-child { color: var(--ink); }

.rows { list-style: none; }
.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 108px 168px;
  gap: 1rem; align-items: start;
  padding: 1rem 0.2rem 1rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.row:hover { background: rgba(25, 29, 28, 0.018); }
.row.is-on::before {
  content: ""; position: absolute; left: -0.65rem; top: 0.9rem; bottom: 0.9rem;
  width: 3px; background: var(--action);
}
.row-rank { color: var(--muted); font-size: 0.7rem; padding-top: 0.2rem; }
.row-main { min-width: 0; }
.row-lead { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.row-thumb {
  display: block; width: 72px; height: 72px;
  background: #fff; border: 1px solid var(--line);
}
.row-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.row-copy { min-width: 0; }
.row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem; }
.row-title h3 { font-size: 1.16rem; font-weight: 600; letter-spacing: -0.02em; }
.row-type { color: var(--muted); font-family: var(--mono); font-size: var(--label); letter-spacing: 0.05em; }
.row-reason { margin-top: 0.3rem; font-size: 0.92rem; }
.row-trade { margin-top: 0.3rem; color: var(--muted); font-size: 0.84rem; }
.row-trade b { color: var(--ink); font-weight: 500; }
.row-metrics {
  display: flex; flex-wrap: wrap; gap: 0.2rem 0.55rem; margin-top: 0.5rem;
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.04em; color: var(--muted);
}
.row-metrics span + span::before { content: "·"; margin-right: 0.55rem; color: var(--line-3); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.tag {
  padding: 0.15rem 0.4rem; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.tag.fail { color: var(--fail); border-color: rgba(163, 46, 46, 0.45); }
.tag.warn { color: var(--warn); border-color: rgba(138, 100, 20, 0.45); }

.verdict {
  display: inline-flex; align-items: center; gap: 0.4rem; justify-self: start;
  padding: 0.25rem 0.5rem; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.1em; text-transform: uppercase;
}
.verdict::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.verdict.fits { color: var(--good); border-color: rgba(47, 107, 79, 0.45); }
.verdict.caution { color: var(--warn); border-color: rgba(138, 100, 20, 0.45); }
.verdict.no { color: var(--fail); border-color: rgba(163, 46, 46, 0.45); }

.row-actions { display: grid; gap: 0.45rem; justify-items: end; text-align: right; }
.row-actions .btn { min-height: 38px; padding: 0.4rem 0.6rem; font-size: var(--label); }
.row-actions .btn.ghost { color: var(--ink); border-color: var(--line-2); }
.row-actions .btn.ghost:hover { border-color: var(--action); color: var(--action); }
.row-link {
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.row-link:hover { color: var(--action); }

/* ---------- table ---------- */

.catalogue { padding-bottom: clamp(1rem, 2vw, 2rem); }
.table-hint { color: var(--muted); margin-bottom: 0.5rem; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
caption { text-align: left; }
th {
  text-align: left; padding: 0.6rem 0.8rem 0.6rem 0;
  font-family: var(--mono); font-size: var(--label); font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
td { padding: 0.7rem 0.8rem 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td.name b { display: block; font-size: 0.95rem; font-weight: 600; }
td.name span { display: block; font-family: var(--mono); font-size: var(--label); letter-spacing: 0.06em; color: var(--muted); }
/* The thumbnail makes the table carry the products without JavaScript. */
td.name .t-prod { display: flex; align-items: center; gap: 9px; }
td.name .t-prod img {
  width: 36px; height: 36px; object-fit: contain; background: #fff;
  flex: none; padding: 2px; border: 1px solid var(--line);
}
td.num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; white-space: nowrap; }
td.desc { color: var(--muted); font-size: 0.8rem; }
td a { color: var(--ink); text-decoration-color: var(--line-3); text-underline-offset: 3px; }
td a:hover { color: var(--action); }
.chart-note { margin-top: 0.7rem; color: var(--muted); font-size: 0.8rem; max-width: 92ch; }

/* ---------- method ---------- */

.method { padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.method details { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.method summary {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 0; cursor: pointer; list-style: none;
}
.method summary::-webkit-details-marker { display: none; }
.method summary .mono:first-child { color: var(--ink); }
.method summary .mono:last-child { color: var(--muted); }
.method-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.6rem); padding: 0.5rem 0 1.6rem;
}
.method h3 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.method p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.7rem; }
.method p b { color: var(--ink); font-weight: 500; }
.limits { list-style: none; display: grid; gap: 0.55rem; }
.limits li { color: var(--muted); font-size: 0.86rem; padding-left: 0.9rem; position: relative; }
.limits li::before { content: "—"; position: absolute; left: 0; color: var(--action); }
.limits b { color: var(--ink); font-weight: 500; }
.sources { list-style: none; display: grid; gap: 0.35rem; }
.sources a { font-size: 0.82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.sources a:hover { color: var(--action); }
.fine { font-size: 0.78rem !important; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line-2); padding: clamp(1.6rem, 3vw, 2.4rem) 0 2rem; }
.related-tools { display: grid; gap: 0.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.related-title { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--action); }
.related-tools ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.related-tools a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.related-tools a:hover { color: var(--ink); }
.affiliate-disclosure { max-width: 92ch; padding: 1.2rem 0; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.affiliate-disclosure strong { color: var(--ink); }
.foot-in {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.2rem;
  padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted);
}
.foot-mark { font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin-right: auto; }
.foot-in .mono { font-size: var(--label); }
.foot-in a { color: var(--muted); text-decoration: none; }
.foot-in a:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .curb-grid { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr 1fr; }
  .trunk-help { grid-column: 1 / -1; }
  .route { grid-template-columns: 1fr 1fr; }
  .checkpoint:nth-child(2n) { border-right: 0; }
  .checkpoint:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .row { grid-template-columns: 38px minmax(0, 1fr) 100px; }
  .row-actions { grid-column: 2 / -1; grid-auto-flow: column; justify-content: start; justify-items: start; }
  .row.is-on::before { left: -0.4rem; }
}

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; align-items: start; }
  .ticket { max-width: 460px; }
  .sec-head { grid-template-columns: 1fr; gap: 0.7rem; }
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .bar-in { flex-wrap: wrap; gap: 0.5rem 0.9rem; padding: 0.5rem 0; }
  .bar-tool { display: none; }
  .bar-live { order: 5; margin-left: 0; }
  .reset { order: 6; margin-left: auto; }
  .brand-b { font-size: var(--label); }
  .readouts { grid-template-columns: 1fr 1fr; }
  .readout:nth-child(2) { border-right: 0; }
  .readout:nth-child(1), .readout:nth-child(2) { border-bottom: 1px solid var(--stage-line); }
  .controls { grid-template-columns: 1fr; }
  .row { grid-template-columns: 30px minmax(0, 1fr); gap: 0.6rem; }
  .verdict { grid-column: 2; }
  .row-actions { grid-column: 2; }
  .row.is-on::before { left: -0.35rem; }
  .notice { grid-template-columns: 1fr; }
  .route { grid-template-columns: 1fr; }
  .checkpoint { border-right: 0; border-top: 1px solid var(--line); }
  .checkpoint:first-child { border-top: 0; }
}

@media (max-width: 560px) {
  :root { --label: 0.75rem; }
}

@media (max-width: 480px) {
  .intro h1 { font-size: 2.15rem; }
  .intro-specs li { padding-right: 0.9rem; margin-right: 0.9rem; }
  .field.two-up { grid-template-columns: 1fr; }
  .presets { display: grid; grid-template-columns: 1fr 1fr; }
  .preset { min-width: 0; }
  .row-lead { grid-template-columns: 56px minmax(0, 1fr); gap: 0.65rem; }
  .row-thumb { width: 56px; height: 56px; }
  .ticket-body { grid-template-columns: 84px minmax(0, 1fr); }
  .ticket-img { width: 84px; height: 84px; }
  .stage { padding: 0.55rem; }
  .row-title h3 { font-size: 1.04rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
