/* /accuracy/ only. Shared components live in /styles.css; motion primitives in /motion.css (web/MOTION.md).
   No results are published: every result cell is a dash or an empty hatched cell, labelled "Not yet measured".
   Every figure here is drawn from numbers already in the copy, at their true proportions:
   - the damage board and the hit rule: 1 SVG unit = 1 mm, grid squares 10 mm
   - the kit strips: 100 SVG units = 100 mm, stretched to the row
   - the interval rows: n dots for n defects (same dot in every row); bar widths 1 : 0.5 : 0.25
   Motion: transform, opacity, clip-path and the custom properties that feed them. Start states sit behind
   html.js and prefers-reduced-motion: no-preference, or are set by js/accuracy.js at the moment a figure is seen. */

/* ---------- header: title left, status right ---------- */
.ac-head{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,.6fr); align-items:end; gap:48px clamp(40px, 6vw, 112px); }
.ac-head .h1{ max-width:12ch; }
.ac-status dd{ display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.ac-status .dot{ width:8px; height:8px; }

/* ---------- empty results tables ---------- */
.ac-cap{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:8px 24px; margin-bottom:28px; font-size:var(--t-small); }
.ac-cap .label{ color:var(--ink); }
.ac-results td:first-child{ font-weight:600; }
.ac-results td:first-child .sub{ font-weight:400; max-width:56ch; }
.data td.nil, .nil{ color:var(--ink-4); }
.ac-results th.num, .ac-results td.num{ width:12%; }
.ac-after{ margin-top:24px; }

/* ---------- scoring: four rules in columns ---------- */
.ac-rules{ --n:4; }
.ac-rules dt{ font-size:var(--t-h3); font-weight:600; letter-spacing:-.022em; line-height:1.2; }
.ac-rules dd{ margin:10px 0 0; color:var(--ink-2); }

/* ---------- the hit rule, to scale ----------
   Stage left, controls and readout right. The stage is 240 x 140 mm of board: its grid is the background
   (24 x 14 squares, so each is 10 mm at any width) and the SVG on top is in mm with the origin at the defect. */
.ht{
  margin:clamp(56px, 3rem + 3vw, 104px) 0 0;
  display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr); grid-template-rows:auto auto 1fr;
  grid-template-areas:"stage top" "stage panel" "foot panel";
  gap:24px clamp(32px, 5vw, 80px); align-items:start;
}
.ht-top{ grid-area:top; display:grid; gap:14px; }
.ht-stage{ grid-area:stage; }
.ht-foot{ grid-area:foot; display:grid; gap:14px; }
.ht-panel{ grid-area:panel; }

.ht-pick{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin-top:14px; }
.ht-pick button{
  display:grid; gap:3px; align-content:center; justify-items:start; min-height:56px; padding:8px 14px;
  border:0; border-radius:14px; background:rgba(255,255,255,.03); box-shadow:inset 0 0 0 1px var(--line-2);
  color:var(--ink-2); font:600 var(--t-small)/1.2 var(--font); letter-spacing:-.01em; text-align:left; cursor:pointer;
  transition:background-color var(--dur-micro) ease, color var(--dur-micro) ease, box-shadow var(--dur-micro) ease, transform var(--dur-micro) var(--ease-out);
}
.ht-pick .measure{ font-size:var(--t-micro); font-weight:500; color:var(--ink-3); }
.ht-pick button[aria-pressed="true"]{ background:rgba(255,255,255,.09); box-shadow:inset 0 0 0 1px var(--ink-3); color:var(--ink); }
.ht-pick button:active{ transform:scale(.97); }

.ht-stage{
  position:relative; aspect-ratio:240 / 140; overflow:hidden; border-radius:var(--radius);
  background-color:var(--card);
  background-image:linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size:calc(100% / 24) calc(100% / 14);
  box-shadow:inset 0 0 0 1px var(--line-2);
}
.ht.is-live .ht-stage{ cursor:crosshair; }
.ht-svg{ position:absolute; inset:0; width:100%; height:100%; }
.ht-reach{ fill:rgba(255,255,255,.02); stroke:var(--ink-4); stroke-width:.5; transition:stroke var(--dur-ui) ease, fill var(--dur-ui) ease; }
.ht.is-near .ht-reach{ stroke:var(--sealed); fill:rgba(60,203,127,.05); }
.ht-truth{ opacity:0; transition:opacity .12s var(--ease-in); }
.ht-truth.is-on{ opacity:1; transition:opacity .3s var(--ease-out) .08s; }
.ht-tbox{ fill:none; stroke:var(--ink-3); stroke-width:.4; stroke-dasharray:1.6 1.6; }
.ht-over{ fill:rgba(255,255,255,.16); transition:fill var(--dur-ui) ease; }
.ht.is-over .ht-over{ fill:rgba(60,203,127,.42); }
.ht-link{ stroke:var(--ink-3); stroke-width:.4; }
.ht-tc{ fill:var(--ink); }
.ht-fbox{ fill:var(--new-dim); stroke:var(--new); stroke-width:.7; }
.ht-fc{ fill:var(--new); }

/* The grab point: an HTML handle over the finding's center (a real 56px touch target; touch-action none, so a
   drag moves the finding and not the page). accuracy.js moves it with `translate`; `scale` is the press state.
   At rest it is a soft halo, not a ring, so it is never read as a second 2 cm circle. */
.ht-handle{
  display:none; position:absolute; left:0; top:0; width:56px; height:56px; margin:-28px 0 0 -28px; border-radius:50%;
  background:radial-gradient(closest-side, rgba(255,107,94,.2), rgba(255,107,94,0)); box-shadow:inset 0 0 0 1.5px rgba(255,107,94,0);
  touch-action:none; cursor:grab; -webkit-user-select:none; user-select:none;
  transition:scale .45s var(--ease-spring), box-shadow var(--dur-ui) ease;
}
.ht.is-live .ht-handle{ display:block; }
.ht.is-drag .ht-handle{ cursor:grabbing; scale:1.14; box-shadow:inset 0 0 0 1.5px var(--new); transition-duration:var(--dur-micro); transition-timing-function:var(--ease-out); }

.ht-legend{ list-style:none; display:flex; flex-wrap:wrap; gap:8px 22px; font-size:var(--t-micro); color:var(--ink-2); }
.ht-legend li{ display:flex; align-items:center; gap:9px; }
.ht-key{ flex:none; width:16px; height:11px; }
.ht-key-t{ border:1px dashed var(--ink-3); }
.ht-key-f{ background:var(--new-dim); box-shadow:inset 0 0 0 1.5px var(--new); }
.ht-key-r{ width:12px; height:12px; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--ink-4); transition:box-shadow var(--dur-ui) ease; }
.ht.is-near .ht-key-r{ box-shadow:inset 0 0 0 1.5px var(--sealed); } /* green only while the center is inside it, like the circle */

/* Distance slider: the keyboard and step-through way to move the finding. The mark on the track is the rule's
   2 cm; thumb travel is inset by half the 22px thumb, hence the 2.2px (40% of the way: 11px + 40% of (100% - 22px)). */
.ht-range{ display:grid; gap:4px; visibility:hidden; }
.ht.is-live .ht-range{ visibility:visible; }
.ht-track{ position:relative; display:block; height:44px; }
.ht-track::after{ content:""; position:absolute; left:calc(40% + 2.2px); top:12px; width:1px; height:20px; margin-left:-.5px; background:var(--ink-3); pointer-events:none; }
.ht-range input{ -webkit-appearance:none; appearance:none; display:block; width:100%; height:44px; margin:0; padding:0; background:none; cursor:pointer; }
.ht-range input:focus-visible{ outline:none; }
.ht-range input::-webkit-slider-runnable-track{ height:2px; border-radius:1px; background:linear-gradient(90deg, var(--ink-2) var(--fill, 30%), var(--line-2) 0); }
.ht-range input::-moz-range-track{ height:2px; border-radius:1px; background:linear-gradient(90deg, var(--ink-2) var(--fill, 30%), var(--line-2) 0); }
.ht-range input::-webkit-slider-thumb{ -webkit-appearance:none; width:22px; height:22px; margin-top:-10px; border:0; border-radius:50%; background:var(--ink); box-shadow:0 0 0 4px var(--bg); transition:transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) ease; }
.ht-range input::-moz-range-thumb{ width:22px; height:22px; border:0; border-radius:50%; background:var(--ink); box-shadow:0 0 0 4px var(--bg); transition:transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) ease; }
.ht-range input:active::-webkit-slider-thumb{ transform:scale(.9); }
.ht-range input:active::-moz-range-thumb{ transform:scale(.9); }
.ht-range input:focus-visible::-webkit-slider-thumb{ box-shadow:0 0 0 3px var(--bg), 0 0 0 5px var(--amber); }
.ht-range input:focus-visible::-moz-range-thumb{ box-shadow:0 0 0 3px var(--bg), 0 0 0 5px var(--amber); }
.ht-ticks{ position:relative; display:flex; justify-content:space-between; font-size:var(--t-label); color:var(--ink-3); }
.ht-ticks .at-2{ position:absolute; left:calc(40% + 2.2px); transform:translateX(-50%); color:var(--ink-2); }

.ht-read{ margin-top:28px; border-top-color:var(--line-2); }
.ht-read > div{ align-items:center; }
.ht-read dt{ color:var(--ink-2); }
.ht-read .sub, .ac-kit .sub, .ac-log .sub{ display:block; margin-top:4px; color:var(--ink-3); font-size:var(--t-micro); }
.ht-read dd{ display:flex; align-items:center; gap:10px; white-space:nowrap; }
.ht-read .dot{ width:8px; height:8px; }
.ht-read > .ht-verdict{ padding-block:18px; }
.ht-verdict dd{ font:600 var(--t-h3)/1.2 var(--font-display); letter-spacing:-.022em; }
.ht-verdict [data-ht-verdict]{ display:inline-block; }

/* ---------- sub-blocks: the damage board, the calibration grid ---------- */
.ac-methods > div{ grid-template-columns:minmax(0,220px) minmax(0,1fr); }
.ac-sub{ display:grid; grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); gap:32px clamp(40px, 6vw, 96px); align-items:start; margin-top:clamp(72px, 4rem + 3vw, 128px); }
.ac-sub-head{ display:grid; gap:14px; }
.ac-sub-head p{ max-width:44ch; }
.ac-sub > .ac-after, .ac-sub > .ac-cellread{ grid-column:2; margin-top:-12px; }
.ac-mult{ font-size:var(--t-micro); color:var(--ink-2); white-space:normal; }
/* The count runs up when scrolled to (accuracy.js): a fixed two-digit box, so the heading does not shift. */
[data-ac-count]{ display:inline-block; min-width:2ch; text-align:right; font-variant-numeric:tabular-nums; }

/* The damage board, drawn at 2 px per mm with a 10 mm grid. */
.ac-board{ list-style:none; display:flex; flex-wrap:wrap; gap:28px 20px; }
.ac-board li{ display:grid; align-content:start; gap:2px; width:120px; }
.ac-board li.wide{ width:260px; }
.ac-board svg{
  width:100%; height:112px; margin-bottom:12px; border-radius:12px;
  background-color:var(--card);
  background-image:linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size:20px 20px; background-position:-1px -1px;
  box-shadow:inset 0 0 0 1px var(--line);
}
.ac-board li.wide svg{ width:240px; }
.ac-board b{ font-size:var(--t-small); font-weight:600; letter-spacing:-.01em; }
.ac-board .measure{ font-size:var(--t-micro); color:var(--ink-3); white-space:normal; }
:is(.ac-board, .ht-svg) .hole{ fill:var(--ink); }
.ac-board .rim{ fill:none; stroke:var(--ink-3); stroke-width:1; }
:is(.ac-board, .ht-svg) .scuff{ stroke:var(--ink-2); stroke-width:2.5; stroke-linecap:round; }
.ac-board .crack{ fill:none; stroke:var(--ink); stroke-width:1; stroke-linejoin:round; stroke-linecap:round; }
:is(.ac-board, .ht-svg) .dent-o{ fill:rgba(255,255,255,.05); stroke:var(--ink-4); stroke-width:1; }
:is(.ac-board, .ht-svg) .dent-i{ fill:rgba(255,255,255,.08); }
.ac-board .stain{ fill:rgba(201,154,42,.32); stroke:rgba(201,154,42,.6); stroke-width:1; }
.ac-board .ctl svg{ box-shadow:inset 0 0 0 1px var(--line-2); }

/* Calibration grid: every cell empty and hatched. */
.ac-matrix{ width:100%; border-collapse:collapse; table-layout:fixed; font-size:var(--t-micro); }
.ac-matrix th{ padding:0 4px 10px; font:500 var(--t-label)/1.3 var(--mono); letter-spacing:.04em; color:var(--ink-3); text-align:center; font-variant-numeric:tabular-nums; transition:color var(--dur-micro) ease; }
.ac-matrix thead tr:first-child th{ padding-bottom:6px; color:var(--ink-2); letter-spacing:0; font-family:var(--font); font-size:var(--t-micro); font-weight:600; }
.ac-matrix thead tr:last-child th{ border-bottom:1px solid var(--line-2); }
.ac-matrix .corner{ width:30%; text-align:left; vertical-align:bottom; border-bottom:1px solid var(--line-2); padding-left:0; }
.ac-matrix tbody th{ padding:0 12px 0 0; text-align:left; font:400 var(--t-micro)/1.3 var(--font); color:var(--ink-2); letter-spacing:0; height:44px; border-bottom:1px solid var(--line); }
.ac-matrix td{ height:44px; border-bottom:1px solid var(--line); border-left:1px solid var(--line); background:repeating-linear-gradient(-45deg, transparent 0 5px, rgba(255,255,255,.045) 5px 6px); transition:background-color var(--dur-micro) ease; }
.ac-matrix td:nth-child(3n+2){ border-left-color:var(--line-2); }
.ac-matrix thead tr:first-child th + th{ border-left:1px solid var(--line-2); }
/* The cell under the pointer or the last one tapped, and the three headers that name it (accuracy.js). */
.ac-matrix td.is-on{ background-color:rgba(255,255,255,.1); }
.ac-matrix th.is-on{ color:var(--ink); }
.ac-cellread{ min-height:1.5em; font-size:var(--t-micro); font-weight:400; color:var(--ink-3); white-space:normal; transition:color var(--dur-micro) ease; }
.ac-cellread.is-on{ color:var(--ink); }
.ac-cellread + .ac-after{ margin-top:-20px; }

/* ---------- blind tests, intervals, later: two columns ---------- */
.ac-two{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:56px clamp(40px, 6vw, 112px); align-items:start; }
.ac-blind-side{ display:grid; gap:clamp(48px, 2.5rem + 2vw, 72px); }

/* Four envelopes: 0 to 3 decals each, one empty. */
.ac-env{ margin:0; display:grid; gap:20px; }
.ac-env-row{ list-style:none; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; padding-block:24px; border-block:1px solid var(--line); }
.ac-env-row li{ display:grid; gap:12px; justify-items:start; align-content:start; }
.ac-env-row svg{ width:100%; max-width:96px; height:auto; overflow:visible; --draw-dur:.9s; }
.ac-env .env{ fill:none; stroke:var(--ink-3); stroke-width:1.5; stroke-linejoin:round; stroke-linecap:round; }
.ac-env .is-empty .env{ stroke:var(--ink-4); }
.ac-env .is-empty .label{ color:var(--ink-2); }
.ac-env .decal{ fill:var(--ink); }

/* The decal kit: rows and hairlines; every numeric size is also a tick on one 0-100 mm scale. */
.ac-kit{ list-style:none; margin-top:24px; border-top:1px solid var(--line-2); font-size:var(--t-small); }
.ac-kit li{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 24px; padding:18px 0; border-bottom:1px solid var(--line); }
.ac-kit-name{ color:var(--ink); }
.ac-kit-size{ text-align:right; color:var(--ink); white-space:normal; }
.ac-kit-size.nil{ color:var(--ink-4); }
.ac-kit-size .sub{ font-family:var(--mono); }
.ac-strip{ grid-column:1 / -1; width:100%; height:14px; margin-top:16px; overflow:visible; background:linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.ac-strip .tick{ stroke:var(--ink); stroke-width:2; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.ac-strip .span{ fill:var(--ink-2); }
.ac-strip .rule{ stroke:var(--ink-4); stroke-width:1; vector-effect:non-scaling-stroke; }
.ac-kit .ac-kit-axis{ grid-template-columns:minmax(0,1fr); padding:0 0 12px; }
.ac-kit-axis .ac-strip{ height:6px; margin-top:0; background:none; }
.ac-axis{ display:flex; justify-content:space-between; margin-top:8px; font-size:var(--t-label); color:var(--ink-3); }

/* Intervals: the formula, then n = 25, 100, 400 as dots over the interval's relative width. */
.ac-lede{ margin-top:28px; }
.ac-formula{ margin:0 0 12px; padding:24px 0; border-block:1px solid var(--line-2); }
.ac-formula code{ font:500 clamp(.875rem, .82rem + .25vw, 1rem)/1.9 var(--mono); color:var(--ink); letter-spacing:-.02em; }
.ac-formula code > span{ display:block; padding-left:2ch; text-indent:-2ch; }
/* Each line breaks only between whole terms, never inside one ("√( p(1 −" / "p)/n"). */
.ac-formula code > span > span{ white-space:nowrap; }
.ac-ci{ list-style:none; margin-bottom:20px; }
.ac-ci li{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:12px 16px; padding:20px 0 22px; border-bottom:1px solid var(--line); font-size:var(--t-small); }
.ac-ci [data-ci-n]{ color:var(--ink-2); }
.ac-ci [data-ci-x]{ text-align:right; color:var(--ink); }
/* --f: the share of the 400-dot width on show (1 = all of this row's dots). */
.ac-dots{ grid-column:1 / -1; display:block; clip-path:inset(0 calc((1 - var(--f, 1)) * 100%) 0 0); }
.ac-dots svg{ width:100%; height:auto; }
.ac-ci pattern circle{ fill:var(--ink-3); }
.ac-ci .bar{ grid-column:1 / -1; position:relative; display:block; height:10px; margin-top:4px; }
.ac-ci .bar::before{ content:""; position:absolute; left:0; right:0; top:50%; height:1px; margin-top:-.5px; background:var(--line-2); }
/* 1x is 80% of the track; --w is the width relative to that (0.5, 0.25), taken evenly off both ends. */
.ac-ci .bar i{ position:absolute; top:0; bottom:0; left:10%; right:10%; background:var(--ink-2); clip-path:inset(0 calc((1 - var(--w, 1)) * 50%) round 5px); }
.ac-ci .w2{ --w:.5; } .ac-ci .w3{ --w:.25; }
.ac-ci .bar b{ position:absolute; left:50%; top:-5px; bottom:-5px; width:2px; margin-left:-1px; border-radius:1px; background:var(--ink); }

/* Change log: one entry per comparison version, one line per change. */
.ac-log{ list-style:none; border-top:1px solid var(--line-2); font-size:var(--t-small); }
.ac-log > li{ display:grid; grid-template-columns:minmax(0,132px) minmax(0,1fr); gap:10px 24px; padding:22px 0; border-bottom:1px solid var(--line); }
.ac-log-v .mono{ color:var(--ink); white-space:nowrap; }
.ac-log-notes{ list-style:none; display:grid; gap:14px; color:var(--ink-2); }
.ac-close{ margin-top:48px; }
.ac-close .actions{ margin-top:28px; }
.ac-close .note{ margin-top:16px; }

/* ---------- motion (see the header comment; nothing here hides content without html.js + motion allowed) ---------- */
.ac-matrix tbody tr:nth-child(2){ --r:1; } .ac-matrix tbody tr:nth-child(3){ --r:2; } .ac-matrix tbody tr:nth-child(4){ --r:3; }
.ac-matrix tbody tr:nth-child(5){ --r:4; } .ac-matrix tbody tr:nth-child(6){ --r:5; }
.ac-matrix td:nth-child(3){ --c:1; } .ac-matrix td:nth-child(4){ --c:2; } .ac-matrix td:nth-child(5){ --c:3; } .ac-matrix td:nth-child(6){ --c:4; }
.ac-matrix td:nth-child(7){ --c:5; } .ac-matrix td:nth-child(8){ --c:6; } .ac-matrix td:nth-child(9){ --c:7; } .ac-matrix td:nth-child(10){ --c:8; }
:is(.ac-strip, .ac-env-row svg) :nth-child(2){ --k:1; } :is(.ac-strip, .ac-env-row svg) :nth-child(3){ --k:2; }
:is(.ac-strip, .ac-env-row svg) :nth-child(4){ --k:3; } :is(.ac-strip, .ac-env-row svg) :nth-child(5){ --k:4; }
.ac-env-row li:nth-child(2){ --e:1; } .ac-env-row li:nth-child(3){ --e:2; } .ac-env-row li:nth-child(4){ --e:3; }
@media (prefers-reduced-motion: no-preference){
  /* Board: each tile arrives (kit stagger), then its defect lands on it. Strokes use the kit's data-draw. */
  .js .ac-board.is-in :is(.hole, .rim, .dent-o, .dent-i, .stain){ transform-box:fill-box; transform-origin:center; animation:ac-pop .6s var(--ease-out) backwards; animation-delay:calc(var(--i, 0) * 55ms + 320ms); }
  .ac-board [data-draw]{ --draw-dur:.8s; --delay:320ms; }
  /* Calibration grid: the 54 empty cells arrive as a diagonal wave, lighting by lighting, phone by phone. */
  .js .ac-matrix-wrap.is-in td{ animation:ac-cell .5s var(--ease-out) backwards; animation-delay:calc((var(--c, 0) + var(--r, 0)) * 45ms + 150ms); }
  /* Envelopes: outlines draw (kit), then the decals drop in, envelope by envelope. */
  .ac-env-row [data-draw]{ --delay:calc(var(--e, 0) * 110ms); }
  .js .ac-env.is-in .decal{ transform-box:fill-box; transform-origin:center; animation:ac-pop .5s var(--ease-out) backwards; animation-delay:calc(var(--e, 0) * 110ms + var(--k, 0) * 60ms + 500ms); }
  /* Kit strips: ticks stand up at their size, left to right; the 5-20 mm range grows from its low end. */
  .js .ac-kit li.is-in .tick{ transform-box:fill-box; transform-origin:center; animation:ac-tick .5s var(--ease-out) backwards; animation-delay:calc(var(--delay, 0ms) + var(--k, 0) * 70ms + 280ms); }
  .js .ac-kit li.is-in .span{ transform-box:fill-box; transform-origin:left center; animation:ac-span .7s var(--ease-out) backwards; animation-delay:calc(var(--delay, 0ms) + 280ms); }
}
@keyframes ac-pop{ from{ opacity:0; transform:scale(.6); } }
@keyframes ac-cell{ from{ opacity:0; transform:scale(.82); } }
@keyframes ac-tick{ from{ opacity:0; transform:scaleY(0); } }
@keyframes ac-span{ from{ transform:scaleX(0); } }

@media (hover: hover) and (pointer: fine){
  .ht-pick button:hover{ color:var(--ink); background:rgba(255,255,255,.06); }
  .ht-pick button[aria-pressed="true"]:hover{ background:rgba(255,255,255,.11); }
  .ht-handle:hover{ box-shadow:inset 0 0 0 1.5px rgba(255,107,94,.7); }
  .ht-range input:hover::-webkit-slider-thumb{ transform:scale(1.1); }
  .ht-range input:hover::-moz-range-thumb{ transform:scale(1.1); }
  .ht-range input:active::-webkit-slider-thumb{ transform:scale(.9); }
  .ht-range input:active::-moz-range-thumb{ transform:scale(.9); }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px){
  .ac-sub{ grid-template-columns:minmax(0,1fr); }
  .ac-sub > .ac-after, .ac-sub > .ac-cellread{ grid-column:1; margin-top:0; }
  .ac-cellread + .ac-after{ margin-top:-20px; }
  .ac-rules{ --n:2; row-gap:40px; }
  .ac-rules > :nth-child(odd){ padding-left:0; border-left:0; }
  .ht{ grid-template-columns:minmax(0,1fr); grid-template-rows:none; grid-template-areas:"top" "stage" "foot" "panel"; }
  .ht-panel{ margin-top:8px; }
}
@media (max-width: 860px){
  .ac-head, .ac-two{ grid-template-columns:minmax(0,1fr); }
  .ac-methods > div{ grid-template-columns:minmax(0,1fr); }
  .ac-rules{ --n:1; row-gap:0; }
}
@media (max-width: 560px){
  .ac-results .ci{ display:none; }
  .ac-results th.num, .ac-results td.num{ width:16%; }
  .ac-matrix .long{ display:none; }
  .ac-matrix .corner{ width:27%; }
  .ac-matrix th{ padding-inline:1px; }
  /* same scale for every tile, 1.5 px per mm, three to a row */
  .ac-board{ gap:24px 16px; }
  .ac-board li{ width:90px; }
  .ac-board li.wide{ width:180px; }
  .ac-board svg, .ac-board li.wide svg{ height:84px; background-size:15px 15px; border-radius:10px; }
  .ac-board li.wide svg{ width:180px; }
  .ht-stage{ border-radius:14px; }
  .ht-pick button{ padding-inline:12px; }
  .ac-env-row{ gap:12px; }
  .ac-env-row .label{ font-size:12px; }
  .ac-log > li{ grid-template-columns:minmax(0,1fr); }
}
