@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 Grip Test: a lift bay in wet slate. Chalk slab, black rubber, one safety
   yellow that only ever means vacuum or action. Rust marks a grip that failed. */
:root {
  --ground: #101417;
  --ground-2: #12181c;
  --panel: #181f24;
  --panel-2: #1c242a;
  --panel-3: #242e35;
  --line: rgba(152, 164, 167, 0.16);
  --line-2: rgba(152, 164, 167, 0.32);
  --line-control: rgba(152, 164, 167, 0.5);
  --ink: #ece7da;
  --muted: #98a4a7;
  --vac: #e6de52;
  --vac-2: #c4bd3a;
  --vac-dim: rgba(230, 222, 82, 0.12);
  --chalk: #cfc9b8;
  --chalk-dim: rgba(207, 201, 184, 0.16);
  --steel: #8a989f;
  --fail: #d26345;
  --fail-dim: rgba(210, 99, 69, 0.13);
  --warn: #e6b45a;
  --warn-dim: rgba(230, 180, 90, 0.12);
  --good: #8fc9a3;
  --good-dim: rgba(143, 201, 163, 0.12);
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", monospace;
  --max: 1380px;
  --gutter: clamp(18px, 4.2vw, 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(152, 164, 167, 0.04) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(90deg, rgba(152, 164, 167, 0.025) 0 1px, transparent 1px 84px),
    radial-gradient(circle at 92% -6%, rgba(230, 222, 82, 0.09), transparent 38%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--vac); color: var(--ground); }
* { 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(--vac); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; background: var(--vac); color: var(--ground);
  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) 93%, transparent);
  border-bottom: 1px solid var(--line);
  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(--vac); }

.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(--vac); 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-control); }

.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(--vac); }
.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.25fr) minmax(300px, 0.75fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.intro h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
  font-weight: 800;
  max-width: 15ch;
  font-stretch: 110%;
  text-wrap: balance;
}
.last-checked {
  margin-top: 1rem; color: var(--muted);
  font-family: var(--mono); font-size: var(--label); letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro-copy > p:not(.last-checked) { margin-top: 1.2rem; max-width: 56ch; color: var(--muted); }

.intro-specs {
  display: flex; flex-wrap: wrap; list-style: none; margin: 1.8rem 0 0; padding: 0;
  border-top: 1px solid var(--line);
}
.intro-specs li {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.8rem 1.4rem 0.8rem 0; margin-right: 1.4rem;
  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; }

/* lift ticket — the one paper object in the bay */
.ticket {
  margin: 0;
  background: #efe9d8;
  color: #1c2327;
  border: 1px solid #d6cfba;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.22);
}
.ticket-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1rem; border-bottom: 1px dashed #b7af98;
  color: #5c615c; font-size: var(--label);
}
.ticket-type { padding: 1rem 1rem 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.ticket-size { padding: 0.15rem 1rem 0.9rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: #5c615c; }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px dashed #b7af98; }
.ticket-grid > div { padding: 0.75rem 1rem; border-bottom: 1px dashed #b7af98; }
.ticket-grid > div:nth-child(odd) { border-right: 1px dashed #b7af98; }
.ticket-grid dt { color: #565b55; font-size: var(--label); margin-bottom: 0.2rem; }
.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: #b7af98; text-underline-offset: 3px; }
.ticket-link:hover { text-decoration-color: #1c2327; }
.ticket-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.8rem 1rem; color: #5c615c;
}
.ticket-foot b { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.ticket-foot b.caution { color: #8a5a12; }
.ticket-foot b.no { color: #a3361f; }

/* ---------- safety strip ---------- */

.safety {
  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(--vac);
  background: var(--vac-dim);
}
.safety-tag { color: var(--vac); padding-top: 0.1rem; }
.safety ul { list-style: none; display: grid; gap: 0.25rem; }
.safety li { color: var(--ink); font-size: 0.92rem; }
.safety li::before { content: "— "; color: var(--vac); }

/* ---------- 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);
}
.sec-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-stretch: 108%; }
.sec-head p { color: var(--muted); max-width: 62ch; }
.sec-num {
  display: inline-block; margin-right: 0.7rem; color: var(--vac);
  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: 138px;
  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-control); }
.preset[aria-pressed="true"] { border-color: var(--vac); background: var(--vac-dim); }
.preset[aria-pressed="true"] span { color: var(--ink); }

/* ---------- bay ---------- */

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

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

.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(--line);
  color: var(--muted);
}

.floor { stroke: var(--line-control); stroke-width: 1.5; }
.trestle path { fill: var(--panel-3); stroke: var(--line-control); stroke-width: 1; }
.slab { fill: #bdb7a7; }
.slab-grain { fill: url(#grain); pointer-events: none; }
.slab-edge { stroke: #efe9d8; stroke-width: 2; opacity: 0.45; }
.stage-label { fill: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.com circle, .com line { fill: none; stroke: #39444a; stroke-width: 1.4; }
.com text { fill: #39444a; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; }

.hit { fill: transparent; cursor: grab; }
.hit:active { cursor: grabbing; }
#lifterGroup:focus-visible .lifter-seal { outline: none; stroke-width: 6; }
.lifter-body { fill: #232b31; stroke: #0b0f11; stroke-width: 1.5; }
.lifter-plate { fill: #2c363d; stroke: #0b0f11; stroke-width: 1.5; }
.lifter-seal { fill: rgba(230, 222, 82, 0.08); stroke: var(--vac); stroke-width: 3; }
.lifter-seal-off { fill: none; stroke: var(--steel); stroke-width: 2; stroke-dasharray: 5 4; }
.dim { fill: none; stroke: var(--line-control); stroke-width: 1; }
.dim-text { fill: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; }
#lifterBody.is-off .lifter-seal { stroke: var(--steel); stroke-dasharray: 5 4; }
.lifter-detail { fill: var(--steel); }
.lifter-grip { fill: #1a2227; stroke: var(--line-control); stroke-width: 1.2; }
.lifter-led { fill: var(--vac); }
.lifter-name { fill: var(--ink); font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-anchor: middle; }

.gauge-arc { fill: none; stroke: var(--line-2); stroke-width: 2; }
.gauge-fillpath { fill: none; stroke: var(--vac); stroke-width: 3; }
.gauge-needle { stroke: var(--vac); stroke-width: 2.4; stroke-linecap: round; }
.gauge-hub { fill: var(--vac); }
.gauge-value { fill: var(--ink); font-family: var(--sans); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.gauge-tick { stroke: var(--line-control); stroke-width: 1.4; }
.gauge-tick.major { stroke: var(--muted); stroke-width: 2; }
.gauge-num { fill: var(--muted); font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.08em; }
.slip-tag { fill: var(--fail); font-family: var(--mono); font-size: 13px; letter-spacing: 0.24em; font-weight: 600; animation: slip 0.9s steps(2, end) infinite; }
@keyframes slip { 50% { opacity: 0.25; } }

.readouts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.readout {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 0.4rem;
  padding: 0.7rem 0.8rem; border-right: 1px solid var(--line);
}
.readout:last-child { border-right: 0; }
.readout .mono { grid-column: 1 / -1; color: var(--muted); font-size: var(--label); }
.readout b { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.readout .unit { color: var(--muted); font-size: var(--label); }
.readout b.no { color: var(--fail); }
.readout b.caution { color: var(--warn); }
.readout b.holds { color: var(--good); }

.trigger-row { display: grid; gap: 0.6rem; padding: 0.9rem 0 0.4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 46px; padding: 0.7rem 1.1rem;
  border: 1px solid var(--vac); background: var(--vac); color: #12171a;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  touch-action: manipulation; user-select: none;
}
.btn:hover { background: var(--vac-2); border-color: var(--vac-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-control); }
.btn.ghost:hover { border-color: var(--vac); color: var(--vac); }
.btn.trigger { width: 100%; min-height: 54px; font-size: 0.76rem; }
.btn.trigger.is-on { background: var(--fail); border-color: var(--fail); color: #fff4ee; }

.hint { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

.stage-read {
  margin-top: 0.2rem; padding: 0.8rem 0.9rem;
  border-left: 2px solid var(--line-control); background: rgba(0, 0, 0, 0.16);
  font-size: 0.95rem;
}
.stage-read.holds { border-left-color: var(--good); }
.stage-read.caution { border-left-color: var(--warn); }
.stage-read.no { border-left-color: var(--fail); }
.offset-note { margin-top: 0.5rem; color: var(--warn); font-size: 0.82rem; }
.offset-note:empty { display: none; }

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

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

.controls { display: grid; gap: 1rem; }
.control-group { border: 1px solid var(--line-2); background: var(--panel); }
.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(--vac); }
.field.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field.two-up.stack { grid-template-columns: 1fr; }
.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-control); }
.seg button[aria-pressed="true"] { background: var(--vac); border-color: var(--vac); color: #12171a; }
.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: var(--panel-2); 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.1em; text-transform: uppercase;
}
.toggle[aria-pressed="true"] { border-color: var(--warn); background: var(--warn-dim); color: var(--warn); }

input[type="range"] { width: 100%; accent-color: var(--vac); min-height: 28px; }
input[type="range"]:focus-visible { outline-offset: 6px; }

.cup-help { padding: 0.9rem; border: 1px dashed var(--line-2); }
.cup-help p { color: var(--muted); font-size: 0.86rem; margin-top: 0.35rem; }
.cup-help .mono { color: var(--vac); }
.cup-help .btn { margin-top: 0.7rem; width: 100%; min-height: 40px; font-size: var(--label); }

/* ---------- 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); border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.result-head .mono:first-child { color: var(--ink); }

.rows { list-style: none; }
.row {
  display: grid;
  grid-template-columns: 46px 72px minmax(0, 1fr) 92px 176px;
  gap: 1rem; align-items: start;
  padding: 1rem 0.2rem 1rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.row-img {
  display: block; align-self: start;
  border: 1px solid var(--line-2); background: #fff;
}
.row-img img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.row-img:hover { border-color: var(--vac); }
.row:hover { background: rgba(255, 255, 255, 0.015); }
.row.is-on::before {
  content: ""; position: absolute; left: -0.65rem; top: 0.9rem; bottom: 0.9rem;
  width: 3px; background: var(--vac);
}
.row-rank { color: var(--muted); font-size: 0.7rem; padding-top: 0.15rem; }
.row-main { min-width: 0; }
.row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; }
.row-title h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.02em; }
.row-price { color: var(--muted); font-size: var(--label); }
.row-reason { margin-top: 0.3rem; font-size: 0.92rem; }
.row-best { margin-top: 0.25rem; color: var(--ink); font-size: 0.84rem; }
.row-trade { margin-top: 0.35rem; 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-control); }
.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(210, 99, 69, 0.45); }
.tag.warn { color: var(--warn); border-color: rgba(230, 180, 90, 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.holds { color: var(--good); border-color: rgba(143, 201, 163, 0.45); }
.verdict.caution { color: var(--warn); border-color: rgba(230, 180, 90, 0.45); }
.verdict.no { color: var(--fail); border-color: rgba(210, 99, 69, 0.45); }
.verdict.legacy { color: var(--muted); }

.row-actions { display: grid; gap: 0.45rem; justify-items: end; text-align: right; }
.row-actions .btn { min-height: 36px; padding: 0.4rem 0.6rem; font-size: var(--label); }
.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(--vac); }

.empty-pick {
  padding: 1.4rem 1rem; border-left: 3px solid var(--fail); background: var(--fail-dim);
}
.empty-pick b { display: block; margin-bottom: 0.3rem; }

/* ---------- 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: 940px; }
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); }
.t-piece { display: flex; align-items: flex-start; gap: 0.6rem; }
.t-piece img {
  flex: none; width: 40px; height: 40px; object-fit: contain;
  border: 1px solid var(--line-2); background: #fff;
}
.t-meta { min-width: 0; }
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-control); text-underline-offset: 3px; }
td a:hover { color: var(--vac); }
.chart-note { margin-top: 0.7rem; color: var(--muted); font-size: 0.8rem; max-width: 90ch; }

/* ---------- 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(--vac); }
.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(--vac); }
.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(--vac); }
.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) {
  .bay-grid { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr 1fr; }
  .cup-help { grid-column: 1 / -1; }
  .row { grid-template-columns: 40px 64px minmax(0, 1fr) 92px; }
  .row-actions { grid-column: 3 / -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(--line); }
  .controls { grid-template-columns: 1fr; }
  .row { grid-template-columns: 32px 56px minmax(0, 1fr); gap: 0.6rem; }
  .verdict { grid-column: 3; }
  .row-actions { grid-column: 3; }
  .row.is-on::before { left: -0.35rem; }
  .safety { grid-template-columns: 1fr; }
}

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

@media (max-width: 480px) {
  .intro h1 { font-size: 2.2rem; }
  .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; }
  .stage { padding: 0.55rem; }
  .row-title h3 { font-size: 1.05rem; }
}

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

/* The quotable answer under the h1. */
.lede-answer { max-width: 62ch; margin: 0 0 0.9rem; font-size: 1.06em; line-height: 1.6; }
