@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  --paper: #f6f7f8;
  --paper-2: #e4e8ec;
  --ink: #15191d;
  --muted: #4e5761;
  --rule: #c3cad2;
  --rule-strong: #15191d;
  --rust: #8d3b2a;
  --pine: #1b3d38;
  --warn: #fbf1d6;
  --safe: #e3efe8;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --measure: 72rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.55;
}
a { color: var(--pine); text-underline-offset: 0.16em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
}
.skip:focus { top: 0.5rem; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 1.1rem 1.15rem 3rem; }

.mast {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.7rem 0 0.55rem;
}
.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand:hover { color: inherit; }
.mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 0.28rem var(--paper), inset 0 0 0 0.38rem var(--rust);
  flex: none;
}
.brand-name {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.brand-kicker {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; font-size: 0.92rem; }
.nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--rust); }

h1, h2, h3 { font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.2rem 0 0.3rem; }
h2 { font-size: 1.25rem; margin: 1.8rem 0 0.5rem; }
h3 { font-size: 1.02rem; margin: 1.2rem 0 0.35rem; }
.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.1rem 0 0;
}
.deck { max-width: 42rem; color: var(--ink); margin: 0.4rem 0 0; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; }
.crumbs a { color: var(--muted); }

.lookup {
  margin: 1.15rem 0 0.4rem;
  border: 1px solid var(--ink);
  background: #ffffff;
}
.lookup form { margin: 0; }
.lookup-row, .size-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
}
.size-row { border-top: 1px solid var(--rule); grid-template-columns: 7.5rem 1fr 1fr 8rem auto; }
label.field {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
input[type="search"], input[type="number"], select {
  font: inherit;
  font-family: var(--mono);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.35rem 0.2rem;
  width: 100%;
  border-radius: 0;
}
button {
  font: inherit;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
button:hover { background: var(--rust); border-color: var(--rust); }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.55rem 0 0.2rem; }
.chips a {
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 0.15rem 0.4rem;
  color: var(--ink);
}
.chips a:hover { border-color: var(--ink); }
.results { margin: 0.7rem 0 0.2rem; }
.hit {
  display: grid;
  grid-template-columns: 4rem 8rem 1fr auto;
  gap: 0.2rem 0.7rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.3rem;
  min-height: 3.25rem;
}
.hit:hover { background: var(--paper-2); }
.hit-code { font-family: var(--mono); font-weight: 500; }
.hit-meta { color: var(--muted); font-size: 0.92rem; }
.hit-note { font-family: var(--mono); font-size: 0.75rem; color: var(--rust); }
.hint { color: var(--muted); }

.lede { max-width: 44rem; }
.lede p { margin: 0.6rem 0; }
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem 1.5rem;
  margin-top: 1.4rem;
}
.cols h2 { margin-top: 0; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.index { list-style: none; margin: 0; padding: 0; }
.index li { border-bottom: 1px solid var(--rule); }
.index a {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  padding: 0.28rem 0;
  font-family: var(--mono);
  font-size: 0.88rem;
}
.index a span { color: var(--muted); font-family: var(--sans); font-size: 0.82rem; }
.index a:hover { color: var(--rust); }

.head-code {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0.15rem 0;
}
.head-code .head-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.42em;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 0.1rem;
}
.also { font-size: 0.9rem; color: var(--muted); margin: 0.2rem 0 0.6rem; }
.also a { color: inherit; }
.also a:hover { color: var(--rust); }
.facts {
  font-family: var(--mono);
  color: var(--muted);
  margin: 0 0 0.8rem;
}

table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td, .grid th, .grid td {
  text-align: left;
  vertical-align: top;
  padding: 0.42rem 0.45rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.sheet th { width: 34%; color: var(--muted); font-size: 0.92rem; }
.sheet td { font-family: var(--mono); font-size: 0.92rem; }
.grid { font-size: 0.92rem; }
.grid th { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.grid td.num, .grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }

.callout {
  border-left: 3px solid var(--rust);
  background: var(--warn);
  padding: 0.7rem 0.9rem;
  margin: 1rem 0;
}
.callout h2 { margin: 0 0 0.35rem; }
.callout p { margin: 0.4rem 0; }
.prose { max-width: 44rem; }
.prose p { margin: 0.7rem 0; }
.prose h2 { margin-top: 1.6rem; }

.site-foot {
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink);
  padding-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: 0.9rem; }
.copy { margin: 0; font-family: var(--mono); font-size: 0.85rem; }

.missing { color: var(--muted); font-family: var(--sans); font-style: italic; }

@media (max-width: 800px) {
  .cols { grid-template-columns: 1fr; }
  .lookup-row, .size-row { grid-template-columns: 1fr; }
  .lookup-row button, .size-row button { width: 100%; }
  .hit { grid-template-columns: 1fr; gap: 0.1rem; }
  .mast { flex-direction: column; align-items: flex-start; }
  .sheet th { width: 46%; }
}

@media print {
  body { background: white; font-size: 10pt; }
  .mast, .lookup, .chips, .site-foot, .crumbs, .skip, .no-print { display: none !important; }
  a { color: black; text-decoration: none; }
  .wrap { max-width: none; padding: 0; }
  .print-only { display: block; }
  h1 { font-size: 16pt; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
}
.print-only { display: none; }
.print-sheet { font-size: 0.78rem; }
.print-sheet td, .print-sheet th { padding: 0.18rem 0.28rem; }
@page { size: auto; margin: 8mm; }

/* ---------- finder-first layout ---------- */
.hero { margin: 1.2rem 0 0.4rem; }
.hero h1 { margin-bottom: 0.6rem; }
.bigfind { border: 2px solid var(--ink); background: #ffffff; padding: 0.7rem 0.8rem 0.6rem; }
.bf-label { display: block; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.bf-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
.bigfind input[type="search"] { font-size: 1.45rem; min-height: 3.4rem; border-bottom: 2px solid var(--ink); padding: 0.4rem 0.3rem; }
.bigfind input::placeholder { color: #5f6873; }
.bigfind button { min-height: 3.4rem; min-width: 5.5rem; font-size: 0.95rem; }
.bf-help { margin: 0.45rem 0 0; font-size: 0.88rem; color: var(--muted); }
.results.has { border: 1px solid var(--ink); border-top: none; background: #ffffff; margin-top: 0; }
.results .hit:last-child { border-bottom: none; }
.res-head { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0.7rem 0.3rem 0.2rem; }
.results .hint { padding: 0.5rem 0.4rem; margin: 0; }
.hit:focus-visible { outline-offset: -2px; background: var(--paper-2); }
.thumb { display: block; max-width: 4rem; height: auto; justify-self: center; }
.thumb-none, .thumb-dev { width: 2.4rem; height: 1.2rem; border: 1px dashed var(--rule); }
.thumb-dev { border-style: solid; border-radius: 0.3rem; }
.hit-pair { border-left: 4px solid var(--ink); }
.hit-pair.v-safe { border-left-color: var(--pine); }
.hit-pair.v-check { border-left-color: #a77a16; }
.hit-pair.v-no { border-left-color: var(--rust); }
.hit-pair .verdict-dot { justify-self: center; }

.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 0.9rem 0 0.4rem; }
.path {
  display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 0.1rem;
  align-content: center; min-height: 4.4rem; padding: 0.7rem 0.8rem; border: 1px solid var(--ink);
  text-decoration: none; color: inherit; background: var(--paper);
}
.path:hover, .path:focus-visible { background: var(--paper-2); color: inherit; }
.path-tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rust); }
.path b { font-weight: 600; font-size: 1.05rem; }
.path span:last-child { color: var(--muted); font-size: 0.85rem; }
.chips a { min-height: 2.2rem; display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; }

.lineup-fig { margin: 1.6rem 0 0.6rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.6rem 0; overflow-x: auto; }
.lineup-fig svg { display: block; min-width: 40rem; width: 100%; height: auto; }
.lineup-fig figcaption, .fig figcaption, .ts-cap { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.lu-shape { fill: var(--paper-2); stroke: var(--ink); stroke-width: 0.6; }
a:hover .lu-shape, a:focus .lu-shape { fill: #e3cfc5; stroke: var(--rust); }
.lu-code { font-family: var(--mono); font-size: 4px; fill: var(--ink); }
.lu-bar { stroke: var(--ink); stroke-width: 0.6; }
.lu-scale { font-family: var(--mono); font-size: 3.4px; fill: var(--muted); }
.toolrow th { width: 16rem; font-weight: 500; }
.toolrow th, .toolrow td { padding: 0.55rem 0.45rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.toolrow td { color: var(--muted); }
.tools h2 { margin-top: 1.6rem; }

/* ---------- drawings ---------- */
.fig { margin: 0; }
.drawing { display: block; width: 100%; height: auto; max-height: 22rem; }
.drawing .outline { fill: var(--paper-2); stroke: var(--ink); stroke-width: 0.6; }
.drawing .centre { stroke: var(--rust); stroke-width: 0.3; stroke-dasharray: 3 1 0.6 1; fill: none; }
.drawing .ext { stroke: var(--muted); stroke-width: 0.25; fill: none; }
.drawing .dim { stroke: var(--ink); stroke-width: 0.3; fill: none; }
.drawing .dim-arrow { fill: var(--ink); stroke: none; }
.drawing .dim-text { font-family: var(--mono); font-size: 4.2px; fill: var(--ink); }
.drawing .view-cap { font-family: var(--mono); font-size: 3.2px; letter-spacing: 0.08em; fill: var(--muted); }
.drawing .hidden-line { stroke: var(--ink); stroke-width: 0.3; stroke-dasharray: 1.2 0.8; fill: none; }
.drawing .ov-a { fill: rgba(21, 25, 29, 0.08); stroke: var(--ink); stroke-width: 0.7; }
.drawing .ov-b { fill: none; stroke: var(--rust); stroke-width: 0.7; stroke-dasharray: 2 1.2; }
.drawing .ov-base { stroke: var(--muted); stroke-width: 0.3; }
.key { display: inline-block; width: 1.4rem; height: 0; border-top: 2px solid var(--ink); vertical-align: middle; margin-right: 0.35rem; }
.key-b { border-top: 2px dashed var(--rust); }

/* ---------- battery page: answer first ---------- */
.bat-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; margin-top: 0.4rem; }
.bat-top .kicker { margin-top: 0.4rem; }
.answer { border: 2px solid var(--ink); background: #ffffff; padding: 0.75rem 0.85rem; margin: 0.4rem 0 0.8rem; }
.ans-buy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin: 0 0 0.5rem; }
.ans-label { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ans-buy strong { font-family: var(--mono); font-size: 1.5rem; font-weight: 500; }
.ans-spec { color: var(--muted); font-size: 0.92rem; }
.ans-same { display: flex; gap: 0.5rem; align-items: baseline; margin: 0.3rem 0 0.6rem; background: var(--safe); padding: 0.45rem 0.55rem; }
.ans-same .verdict-dot { flex: none; }
.code { font-family: var(--mono); }
.ans-q { font-weight: 600; margin: 0.6rem 0 0.25rem; }
.swaps { list-style: none; margin: 0; padding: 0; }
.swap a {
  display: grid; grid-template-columns: 1rem 6.5rem 8.5rem 1fr; gap: 0.5rem; align-items: center;
  min-height: 2.9rem; padding: 0.35rem 0.3rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit;
}
.swap a:hover { background: var(--paper-2); color: inherit; }
.swap-code { font-family: var(--mono); font-weight: 500; }
.swap-word { font-weight: 600; font-size: 0.92rem; }
.swap.v-safe .swap-word { color: var(--pine); }
.swap.v-check .swap-word { color: #7a5a0f; }
.swap.v-no .swap-word { color: var(--rust); }
.swap-why { color: var(--muted); font-size: 0.86rem; }
.ans-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.6rem 0 0; }
.ans-link { display: inline-flex; align-items: center; min-height: 2.6rem; }
.verdict-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); vertical-align: -0.05rem; }
.verdict-dot.v-safe { background: var(--pine); border-color: var(--pine); }
.verdict-dot.v-check { background: #d9a520; border-color: #7a5a0f; }
.verdict-dot.v-no { background: var(--rust); border-color: var(--rust); border-radius: 0.1rem; transform: rotate(45deg); }
.verdict-dot.v-unknown { background: var(--paper); border-style: dashed; }

.safety { border: 1px solid var(--ink); border-left: 4px solid var(--ink); padding: 0.5rem 0.75rem; margin: 0.9rem 0; max-width: 46rem; font-size: 0.9rem; }
.safety p { margin: 0; }
.ans-shared { display: flex; gap: 0.5rem; align-items: baseline; margin: 0.3rem 0 0.6rem; border: 1px dashed var(--rule); padding: 0.45rem 0.55rem; font-size: 0.92rem; }
.ans-shared .verdict-dot { flex: none; }

/* ---------- size check ---------- */
.sizecheck { border-top: 1px solid var(--ink); margin-top: 1.8rem; }
.ts-toggle, .cmp-go, [data-print], [data-calib-apply] { min-height: 2.9rem; }
.ts-panel { margin-top: 0.8rem; }
.ts-stage { background: #fff; border: 1px solid var(--rule); padding: 1rem; overflow-x: auto; }
.ts-stage-big { min-height: 8rem; }
.ts-svg, .ts-img { display: block; max-width: none; }
.calib { border: 1px solid var(--rule); padding: 0.7rem 0.8rem; margin: 0.9rem 0; background: #ffffff; }
.calib-head { font-weight: 600; margin: 0 0 0.3rem; }
.calib-note { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.6rem; }
.calib-bar { height: 2.6rem; width: 85.6mm; max-width: none; border: 1.5px solid var(--ink); border-radius: 3mm; background: var(--paper-2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 0.75rem; margin: 0.3rem 0 0.7rem; }
.calib-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin: 0.4rem 0; font-size: 0.9rem; }
.calib-row input[type="range"] { flex: 1 1 12rem; min-height: 2.6rem; accent-color: var(--rust); }
.calib-row input[type="number"] { width: 6rem; }
.calib-row output { font-family: var(--mono); min-width: 4rem; }
.calib-saved { color: var(--muted); font-size: 0.82rem; }
.ts-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; }
.ts-print-note { font-size: 0.85rem; color: var(--muted); }
button.ghost { background: transparent; color: var(--ink); }
button.ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.tsc-form { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; max-width: 30rem; margin: 1rem 0; }
.btn { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0 0.9rem; border: 1px solid var(--ink); text-decoration: none; color: var(--ink); font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.btn:hover { background: var(--paper-2); }

/* ---------- compare ---------- */
.cmp-form { border: 2px solid var(--ink); background: #ffffff; padding: 0.7rem 0.8rem; margin: 1rem 0; }
.cmp-fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: end; }
.cmp-field span, .measure label span { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cmp-field input { font-size: 1.3rem; min-height: 3rem; border-bottom: 2px solid var(--ink); }
.cmp-swap { min-height: 3rem; min-width: 3rem; font-size: 1.2rem; }
.cmp-go { width: 100%; margin-top: 0.7rem; font-size: 0.95rem; }
.verdict { border: 2px solid var(--ink); border-left-width: 8px; padding: 0.7rem 0.9rem; margin: 0.4rem 0 1rem; background: #ffffff; }
.verdict.v-safe { border-color: var(--pine); background: var(--safe); }
.verdict.v-check { border-color: #a77a16; background: var(--warn); }
.verdict.v-no { border-color: var(--rust); background: #f6e7e1; }
.verdict.v-unknown { border-style: dashed; }
.verdict-k { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.verdict-t { font-size: 1.5rem; font-weight: 600; margin: 0.15rem 0 0.3rem; display: flex; gap: 0.6rem; align-items: center; }
.verdict-t .verdict-dot { width: 1.1rem; height: 1.1rem; }
.verdict-n { margin: 0; max-width: 46rem; }
.fig-ov { max-width: 36rem; margin: 0 0 1rem; }
.cmp-table td:last-child { font-family: var(--mono); font-size: 0.82rem; }
.same { color: var(--pine); }
.diff { color: var(--rust); font-weight: 500; }
.cmp-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.pairs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.4rem; }
.pairs a { display: flex; align-items: center; min-height: 2.8rem; padding: 0 0.7rem; border: 1px solid var(--rule); text-decoration: none; font-family: var(--mono); font-size: 0.88rem; color: var(--ink); }
.pairs a:hover { border-color: var(--ink); }

/* ---------- devices ---------- */
.devlist, .hits { list-style: none; margin: 1rem 0; padding: 0; }
.devlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; }
.dev { display: block; border: 1px solid var(--ink); padding: 0.7rem 0.8rem; min-height: 4.4rem; text-decoration: none; color: inherit; }
.dev:hover { background: var(--paper-2); color: inherit; }
.dev b { display: block; font-weight: 600; }
.dev span { display: block; color: var(--muted); font-size: 0.86rem; font-family: var(--mono); }

/* ---------- replace flow ---------- */
.steps { list-style: none; padding: 0; margin: 1rem 0; counter-reset: none; }
.step { border-top: 1px solid var(--ink); padding: 0.4rem 0 1rem; }
.step h2 { margin: 0.15rem 0 0.5rem; }
.step-tag { margin: 0.8rem 0 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rust); }
.shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.shape { position: relative; display: grid; grid-template-columns: 3rem 1fr; grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center; border: 1px solid var(--rule); padding: 0.6rem 0.7rem; min-height: 4.2rem; cursor: pointer; background: var(--paper); }
.shape input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.shape:has(input:checked) { border: 2px solid var(--ink); background: #ffffff; }
.shape:has(input:focus-visible) { outline: 2px solid var(--rust); outline-offset: 2px; }
.shape b { font-weight: 600; }
.shape > span:last-child { color: var(--muted); font-size: 0.82rem; grid-column: 2; }
.shape-ico { grid-row: 1 / 3; justify-self: center; border: 1.5px solid var(--ink); background: var(--paper-2); }
.ico-coin { width: 2.6rem; height: 2.6rem; border-radius: 50%; }
.ico-button { width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.ico-hearing { width: 1.4rem; height: 1.4rem; border-radius: 50%; border-style: dotted; border-width: 2px; }
.ico-cyl { width: 1.1rem; height: 2.6rem; border-radius: 0.25rem; }
.ico-box { width: 2rem; height: 2.6rem; border-radius: 0.15rem; }
.ico-any { width: 2rem; height: 2rem; border-style: dashed; border-radius: 50%; background: transparent; }
.measure { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; max-width: 36rem; }
.measure.one { grid-template-columns: 1fr; max-width: 24rem; }
.measure input, .measure select { font-size: 1.3rem; min-height: 3rem; border-bottom: 2px solid var(--ink); }
.rp-out { border: 2px solid var(--ink); background: #ffffff; padding: 0.4rem 0.8rem 0.8rem; scroll-margin-top: 1rem; }
.rp-out h2 { margin-top: 0.6rem; }
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-more { margin: 0.1rem 0 0.4rem 4.7rem; font-size: 0.86rem; }
.rp-compact .rp-more { display: none; }

/* ---------- true-size print sheet ---------- */
.pt-check { display: flex; gap: 0.6rem; align-items: center; font-family: var(--mono); font-size: 0.8rem; margin: 0.6rem 0; }
.pt-group h2 { font-size: 0.95rem; margin: 1rem 0 0.3rem; }
.pt-grid { display: flex; flex-wrap: wrap; gap: 4mm 6mm; align-items: flex-end; }
.pt { margin: 0; break-inside: avoid; }
.pt svg { display: block; }
.pt figcaption { font-family: var(--mono); font-size: 0.7rem; margin-top: 1mm; }
.pt:target figcaption { color: var(--rust); font-weight: 500; }

.ts-outline { fill: var(--paper-2); stroke: var(--ink); fill-opacity: 1; }
.pt-check .ts-outline { fill: none; }
.ts-centre { stroke: var(--rust); fill: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
td.thumb-cell { width: 4.5rem; vertical-align: middle; }
td.thumb-cell img { display: block; }

/* ---------- mobile dock ---------- */
.dock { display: none; }
@media (max-width: 800px) {
  body { padding-bottom: 4.4rem; }
  .mast { flex-direction: column; align-items: stretch; gap: 0.35rem; }
  .mast .nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 0.2rem 1rem; font-size: 0.88rem; padding-bottom: 0.15rem; scrollbar-width: none; }
  .wrap { padding-top: 0.6rem; }
  .hero { margin-top: 0.6rem; }
  .hero h1 { font-size: 1.6rem; }
  .bigfind { padding: 0.55rem 0.6rem 0.5rem; }
  .bigfind input[type="search"] { font-size: 1.25rem; }
  .bigfind button { min-width: 4.5rem; }
  .bf-help { font-size: 0.82rem; }
  .paths { grid-template-columns: 1fr; gap: 0.45rem; }
  .path { min-height: 3.6rem; padding: 0.5rem 0.7rem; }
  .hit { grid-template-columns: 3.4rem 1fr; grid-template-rows: auto auto; padding: 0.55rem 0.3rem; }
  .hit > :first-child { grid-row: 1 / 4; }
  .hit-code, .hit-meta, .hit-note { grid-column: 2; }
  .thumb { max-width: 3.2rem; }
  .bat-top { grid-template-columns: 1fr; gap: 0.4rem; }
  .bat-top .fig { order: 2; }
  .head-code { font-size: 2.2rem; }
  .bat-top .kicker { margin: 0.2rem 0 0; }
  .answer { padding: 0.6rem 0.65rem; }
  .ans-buy strong { font-size: 1.3rem; }
  .swap a { grid-template-columns: 1rem 1fr auto; grid-template-rows: auto auto; }
  .swap-why { grid-column: 2 / 4; }
  .cmp-fields { grid-template-columns: 1fr; }
  .cmp-swap { justify-self: end; margin: -0.3rem 0; }
  .shapes { grid-template-columns: 1fr 1fr; }
  .shape { grid-template-columns: 2.6rem 1fr; padding: 0.5rem; }
  .shape > span:last-child { display: none; }
  .measure { grid-template-columns: 1fr 1fr; }
  .measure label:last-child:nth-child(3) { grid-column: 1 / 3; }
  .toolrow th { width: auto; display: block; border-bottom: none; padding-bottom: 0; }
  .toolrow td { display: block; padding-top: 0.1rem; }
  .rp-more { margin-left: 3.9rem; }
  .verdict-t { font-size: 1.25rem; }
  .dock {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--paper); border-top: 2px solid var(--ink); padding: 0.2rem 0.2rem calc(0.2rem + env(safe-area-inset-bottom));
  }
  .dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; min-height: 3.5rem; text-decoration: none; color: var(--ink); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }
  .dock a[aria-current="page"] { color: var(--rust); }
  .dock-ico { width: 1.3rem; height: 1.3rem; border: 1.5px solid currentColor; }
  .dock-find { border-radius: 50%; }
  .dock-measure { border-radius: 0; height: 0.7rem; width: 1.6rem; margin: 0.3rem 0; }
  .dock-device { border-radius: 0.3rem; width: 0.9rem; }
  .dock-compare { border-radius: 50%; border-style: dashed; }
}
@media (max-width: 380px) {
  .shapes { grid-template-columns: 1fr; }
}
@media print {
  .dock, .ts-toggle, .calib, .ts-actions, .answer .ans-links, .cmp-form { display: none !important; }
  body { padding: 0; }
  body.printing-ts .wrap > *:not(main), body.printing-ts main > *:not(.sizecheck) { display: none !important; }
  body.printing-ts .sizecheck > *:not(.ts-panel) { display: none !important; }
  body.printing-ts .ts-panel { display: block !important; }
  .ts-stage { border: none; padding: 0; }
  .pt-grid { gap: 3mm 5mm; }
}
.res-amb { color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 0.92rem; border-left: 3px solid #a77a16; padding-left: 0.5rem; }
.hit-more .hit-code { font-family: var(--sans); font-weight: 600; }
.cmp-amb { border: 1px dashed var(--ink); padding: 0.5rem 0.7rem; margin: 0 0 1rem; max-width: 46rem; }
.head-code .head-alias { font-size: 0.6em; font-weight: 400; color: var(--muted); white-space: nowrap; }
