/* mirror.css: the layout for zpe.vc/privacy.
 *
 * Every colour here is a var() from tokens.css, which is the one file in this page holding a
 * literal. If a value is missing, add it to tokens.css in ~/Projects/design and re-run
 * tools/sync-tokens.sh; do not type a hex in this file.
 *
 * Type: this is an editorial page rather than a dashboard, so it carries one display step
 * (the headline and the entropy number) that the fleet scale tops out below. It is derived
 * from the token scale with clamp, not invented as a new size.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 15% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--alert) 4%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

::selection {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

a:hover {
  border-bottom-color: var(--accent);
}

code,
.mono,
pre,
.hash {
  font-family: var(--font-data);
}

code {
  font-size: 0.92em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-hair);
  padding: 0 var(--s1);
  word-break: break-word;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel);
  color: var(--ink);
  padding: var(--s7) var(--s9);
  z-index: var(--z-tooltip);
}

.skip:focus {
  left: var(--s9);
  top: var(--s9);
}

/* ── head ──────────────────────────────────────────────────────────────── */

.head,
main,
.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--s9);
}

.head {
  padding-top: calc(var(--s12) * 2);
  padding-bottom: var(--s11);
  border-bottom: 1px solid var(--line);
}

.overline {
  font-family: var(--font-data);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s9);
}

.overline .slash {
  color: var(--line);
  margin: 0 var(--s1);
}

.overline .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: var(--s8);
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

h1 {
  font-size: clamp(var(--fs-page), 4.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 var(--s9);
  max-width: 22ch;
}

.lede {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  max-width: 68ch;
  margin: 0 0 var(--s11);
}

.promises {
  list-style: none;
  margin: 0 0 var(--s11);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s5);
}

.promises li {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  padding: var(--s7) var(--s8);
}

.p-k {
  display: block;
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.p-v {
  display: block;
  font-family: var(--font-data);
  font-size: var(--fs-title);
  color: var(--ok-ink);
  margin-top: var(--s2);
}

.p-note {
  display: block;
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  line-height: 1.4;
  color: var(--muted);
  margin-top: var(--s2);
}

.p-note:empty {
  display: none;
}

.toc-label {
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s2);
}

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0 var(--s9);
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  border-top: 1px solid var(--line);
  padding-top: var(--s6);
}

.toc a {
  color: color-mix(in srgb, var(--ink) 74%, var(--muted));
  border-bottom: 1px solid var(--line);
  padding: var(--s4) 0;
}

.toc a:hover {
  color: var(--accent);
  border-bottom-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ── sections ──────────────────────────────────────────────────────────── */

main {
  padding-bottom: calc(var(--s12) * 2);
}

section {
  padding-top: calc(var(--s12) * 1.5);
  scroll-margin-top: var(--s12);
}

h2 {
  font-size: var(--fs-page);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s6);
  display: flex;
  align-items: baseline;
  gap: var(--s8);
}

h2 .n {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-pill);
  padding: 0 var(--s5);
  line-height: 1.7;
}

h3 {
  font-size: var(--fs-lead);
  font-weight: 600;
  margin: var(--s11) 0 var(--s6);
}

h4 {
  font-size: var(--fs-ui);
  font-weight: 600;
  margin: 0 0 var(--s4);
}

.sub {
  color: var(--muted);
  max-width: 74ch;
  margin: 0 0 var(--s9);
}

.small {
  color: var(--muted);
  font-size: var(--fs-meta);
  margin: var(--s5) 0 0;
}

.placeholder {
  color: var(--muted);
  font-style: normal;
  font-size: var(--fs-meta);
}

/* ── facts ─────────────────────────────────────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--s5);
  margin: 0 0 var(--s11);
}

.facts-tight {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.fact {
  border: 1px solid var(--line);
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--r-card);
  background: var(--panel);
  padding: var(--s7) var(--s8);
  min-width: 0;
}

.fact-k {
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
}

.fact-v {
  font-family: var(--font-data);
  font-size: var(--fs-ui);
  line-height: 1.4;
  color: var(--ink);
  margin-top: var(--s3);
  overflow-wrap: anywhere;
}

.fact-n {
  color: var(--muted);
  font-size: var(--fs-meta);
  margin: var(--s4) 0 0;
  line-height: 1.45;
}

/* ── chips ─────────────────────────────────────────────────────────────── */

.chip {
  display: inline-block;
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 1px var(--s4);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.chip-request,
.chip-load {
  color: var(--warn-ink);
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
}

.chip-grant {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.chip-ok {
  color: var(--ok-ink);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
}

.chip-warn {
  color: var(--alert-ink);
  border-color: color-mix(in srgb, var(--alert) 45%, transparent);
  background: color-mix(in srgb, var(--alert) 10%, transparent);
}

.chip-unknown {
  color: var(--muted);
}

/* ── tables ────────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin: 0 0 var(--s9);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-meta);
  /* A dense table squeezed into 390px breaks values mid word and turns the note column into
     slivers. Give it a floor and let the wrapper scroll: a table read sideways beats a table
     read as debris. */
  min-width: 560px;
}

table.tight-grid {
  min-width: 0;
}

table.grid thead th {
  text-align: left;
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: var(--s6) var(--s7);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--panel-2);
}

table.grid td,
table.grid tbody th {
  padding: var(--s6) var(--s7);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  vertical-align: top;
  text-align: left;
}

table.grid tbody th {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  font-size: var(--fs-meta);
}

table.grid td.mono {
  font-size: var(--fs-meta);
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  max-width: 42ch;
  overflow-wrap: break-word;
  word-break: normal;
}

table.grid td.note,
table.grid td .note {
  color: var(--muted);
  font-size: var(--fs-meta);
  max-width: 46ch;
}

table.grid tr:last-child td,
table.grid tr:last-child th {
  border-bottom: none;
}

table.tight-grid td,
table.tight-grid th {
  padding: var(--s4) var(--s6);
}

table.tight-grid {
  border: none;
  background: transparent;
}

.raw {
  font-size: var(--fs-meta);
  line-height: 1.6;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s8);
  margin: 0 0 var(--s9);
  overflow-x: auto;
  max-height: 380px;
  white-space: pre;
  color: color-mix(in srgb, var(--ink) 90%, var(--muted));
}

.absent {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  line-height: 2;
  word-spacing: var(--s3);
}

.mono-list {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  line-height: 2;
  margin: 0;
}

/* ── blocks ────────────────────────────────────────────────────────────── */

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s9) var(--s11);
  margin: 0 0 var(--s9);
}

.block {
  min-width: 0;
}

.steps {
  margin: 0;
  padding-left: var(--s9);
  color: color-mix(in srgb, var(--ink) 85%, var(--muted));
}

.steps li {
  margin-bottom: var(--s6);
}

.tight {
  margin: 0;
  padding-left: var(--s9);
  color: color-mix(in srgb, var(--ink) 85%, var(--muted));
}

.tight li {
  margin-bottom: var(--s4);
}

.two-col {
  columns: 2;
  column-gap: var(--s11);
}

.deflist {
  margin: 0;
}

.deflist dt {
  font-family: var(--font-data);
  font-size: var(--fs-label);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: var(--s8);
}

.deflist dd {
  margin: var(--s3) 0 0;
  color: color-mix(in srgb, var(--ink) 85%, var(--muted));
  max-width: 72ch;
}

.chain {
  margin: 0 0 var(--s11);
  padding-left: var(--s11);
  max-width: 78ch;
}

.chain li {
  margin-bottom: var(--s7);
  color: color-mix(in srgb, var(--ink) 86%, var(--muted));
}

.chain b {
  color: var(--ink);
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: var(--r-card);
  padding: var(--s7) var(--s8);
  margin: var(--s6) 0;
  font-size: var(--fs-body);
  max-width: 78ch;
}

.callout-warn {
  border-left-color: var(--alert);
  background: var(--alert-bg);
  color: var(--alert-ink);
}

.callout-ok {
  border-left-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.trace {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  padding: var(--s8);
  margin: 0 0 var(--s9);
}

.trace table.grid {
  background: transparent;
}

/* ── controls ──────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--font-prose);
  font-size: var(--fs-ui);
  height: var(--h-control-lg);
  padding: 0 var(--s9);
  border-radius: var(--r-inline);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-press) var(--ease-out), border-color var(--dur-press) var(--ease-out);
}

.btn:hover {
  background: var(--hover);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.btn:focus-visible,
.toc a:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  cursor: default;
  color: var(--muted);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--fill-ink);
  font-weight: 600;
  height: calc(var(--h-control-lg) + 8px);
  padding: 0 var(--s11);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 85%, var(--ink));
}

.btn-primary:disabled {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--muted);
}

.scan {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  padding: var(--s9);
  margin: 0 0 var(--s11);
}

.scan-note {
  color: var(--muted);
  font-size: var(--fs-meta);
  margin: var(--s6) 0 0;
  max-width: 70ch;
}

.progress {
  --done: 0;
  margin-top: var(--s8);
  border: 1px solid var(--line);
  border-radius: var(--r-inline);
  padding: var(--s6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s6);
  position: relative;
}

.progress::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--done) * 100%);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: var(--r-inline);
  transition: width var(--dur-tip) linear;
  pointer-events: none;
}

.tick {
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
}

.tick.active {
  color: var(--accent);
}

.tick.done {
  color: var(--ok-ink);
}

.group {
  margin-bottom: var(--s11);
}

/* ── proofs ────────────────────────────────────────────────────────────── */

.proves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s7);
  margin: 0 0 var(--s9);
}

.prove {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  padding: var(--s8);
  min-width: 0;
}

.prove p {
  color: var(--muted);
  font-size: var(--fs-meta);
  margin: 0 0 var(--s6);
}

.prove-wide {
  margin-top: var(--s9);
}

#capture-input {
  width: 100%;
  height: var(--h-control-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-inline);
  color: var(--ink);
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  padding: 0 var(--s6);
}

#capture-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

#pointer-pad {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-inline);
  background: var(--bg);
  touch-action: none;
  cursor: crosshair;
}

.capture-line {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  color: var(--muted);
  margin: var(--s5) 0 0;
  overflow-wrap: anywhere;
}

/* ── verdict ───────────────────────────────────────────────────────────── */

.verdict {
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--r-card);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--accent) 7%, var(--panel)),
    var(--panel) 65%
  );
  padding: var(--s11);
  margin: 0 0 var(--s11);
}

.verdict-number {
  display: flex;
  align-items: baseline;
  gap: var(--s8);
  flex-wrap: wrap;
}

.big {
  font-family: var(--font-data);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.unit {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.verdict-line {
  margin: var(--s7) 0 0;
  font-size: var(--fs-lead);
  max-width: 70ch;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.hash {
  font-size: var(--fs-body);
  color: var(--accent);
  word-break: break-all;
  margin: 0;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-inline);
  padding: var(--s6);
  background: var(--bg);
}

.actions {
  display: flex;
  align-items: center;
  gap: var(--s7);
  flex-wrap: wrap;
  margin-top: var(--s9);
}

/* ── foot ──────────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding-top: var(--s9);
  padding-bottom: calc(var(--s12) * 2);
  color: var(--muted);
  font-size: var(--fs-meta);
}

.foot p {
  margin: 0 0 var(--s4);
  max-width: 70ch;
}

/* ── the score band ────────────────────────────────────────────────────── */

.score-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--s11);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: var(--r-card);
  background:
    radial-gradient(700px 260px at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--panel);
  padding: var(--s11);
  margin: 0 0 var(--s11);
}

.score-left {
  min-width: 0;
  /* The note sits at the foot of the column, so the two halves of the band end together instead
     of leaving a hole under the button. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.score-number {
  display: flex;
  align-items: baseline;
  gap: var(--s5);
  margin: var(--s4) 0 var(--s6);
  font-family: var(--font-data);
  line-height: 1;
}

#score-value {
  font-size: clamp(3.25rem, 9vw, 4.5rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.score-of {
  font-size: var(--fs-lead);
  color: var(--muted);
}

.score-track {
  height: 12px;
  width: 100%;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--panel-2) 70%, var(--line));
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: var(--s7);
}

#score-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--muted);
  transition: width var(--dur-menu) var(--ease-out), background var(--dur-menu) var(--ease-out);
}

#score-fill[data-band='good'] {
  background: var(--ok);
}

#score-fill[data-band='mid'] {
  background: var(--warn);
}

#score-fill[data-band='low'] {
  background: var(--alert);
}

.score-rank {
  font-size: var(--fs-ui);
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  margin: 0 0 var(--s8);
  max-width: 46ch;
}

.score-rank.is-good {
  color: var(--ok-ink);
}

.score-rank.is-low {
  color: var(--warn-ink);
}

.score-right {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: var(--s11);
}

.today {
  list-style: none;
  margin: var(--s4) 0 0;
  padding: 0;
  counter-reset: today;
}

.today li {
  display: flex;
  gap: var(--s7);
  align-items: flex-start;
  padding: var(--s6) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.today li:last-child {
  border-bottom: none;
}

.today-points {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  /* A fixed column, so five different weights do not push five titles out of line. */
  width: 52px;
  text-align: center;
  /* Accent, not alert: these are points to GAIN. Red belongs to the score, where it means loss. */
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--r-pill);
  padding: 1px 0;
  flex: none;
}

.today-body {
  display: block;
  min-width: 0;
}

.today-label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-ui);
  margin-bottom: var(--s1);
}

.today-action {
  display: block;
  font-size: var(--fs-meta);
  color: var(--muted);
  line-height: 1.45;
}

.today-empty {
  color: var(--muted);
  font-size: var(--fs-meta);
  display: block;
}

.score-note {
  font-size: var(--fs-meta);
  color: var(--muted);
  margin: auto 0 0;
  padding-top: var(--s7);
  line-height: 1.45;
  max-width: 44ch;
}

/* ── the breakdown and the histogram ───────────────────────────────────── */

.weight {
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 1px var(--s5);
}

.of {
  color: var(--muted);
  font-size: var(--fs-micro);
}

.act {
  display: inline-block;
  margin-top: var(--s3);
  color: var(--accent);
}

.act-none {
  color: var(--muted);
}

.hist-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  padding: var(--s9);
  margin: 0 0 var(--s9);
}

.hist {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  padding-bottom: var(--s2);
}

.hist-bar {
  flex: 1 1 auto;
  min-width: 0;
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-2));
  border-radius: 1px 1px 0 0;
  transition: height var(--dur-menu) var(--ease-out);
}

.hist-bar.is-mine {
  background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}

.hist-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-data);
  font-size: var(--fs-micro);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: var(--s2);
  margin-bottom: var(--s6);
}

/* ── the comparison ─────────────────────────────────────────────────────── */

.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s6);
  margin: var(--s7) 0 var(--s5);
}

.band-actions .btn[hidden] {
  display: none;
}

.link-out {
  display: inline;
  font-size: var(--fs-meta);
  overflow-wrap: anywhere;
}

.compare {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-top: var(--s4);
  padding-top: var(--s9);
}

.compare-head {
  margin-bottom: var(--s7);
}

.compare-line {
  font-size: var(--fs-lead);
  line-height: 1.45;
  margin: 0 0 var(--s5);
  max-width: 76ch;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.compare-score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s7);
  font-family: var(--font-data);
  margin: var(--s3) 0 var(--s6);
}

.compare-score .mono {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--ink);
  letter-spacing: -0.03em;
}

.compare-arrow {
  font-family: var(--font-data);
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.delta {
  font-family: var(--font-data);
  font-size: var(--fs-body);
  border-radius: var(--r-pill);
  padding: 2px var(--s6);
  border: 1px solid var(--line);
}

.delta-up {
  color: var(--ok-ink);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: var(--ok-bg);
}

.delta-down {
  color: var(--alert-ink);
  border-color: var(--alert-line);
  background: var(--alert-bg);
}

.delta-flat {
  color: var(--muted);
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s6);
  margin-top: var(--s7);
}

table.grid td.is-good {
  color: var(--ok-ink);
}

table.grid td.is-bad {
  color: var(--alert-ink);
}

/* ── narrow ────────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .head,
  main,
  .foot {
    padding-left: var(--s7);
    padding-right: var(--s7);
  }

  .head {
    padding-top: calc(var(--s12) * 1.5);
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .score-band {
    grid-template-columns: 1fr;
    gap: var(--s9);
    padding: var(--s9);
  }

  .score-right {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: var(--s9);
  }

  .hist {
    height: 90px;
  }

  .two-col {
    columns: 1;
  }

  h2 {
    flex-direction: column;
    gap: var(--s4);
  }

  table.grid tbody th {
    white-space: normal;
  }

  /* A dense three or four column table cannot survive 390px. Below this width each row becomes a
     stacked block: the row header is the label, the cells follow it. The header row is dropped
     because the label above each value already says which column it came from, and a table that
     scrolls sideways on a phone is a table nobody reads to the end. */
  table.grid,
  table.grid thead,
  table.grid tbody,
  table.grid tr,
  table.grid th,
  table.grid td {
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  table.grid thead {
    display: none;
  }

  table.grid tr {
    border-bottom: 1px solid var(--line);
    padding: var(--s6) var(--s7);
  }

  table.grid tbody th,
  table.grid td {
    border: none;
    padding: 0;
  }

  table.grid tbody th {
    font-family: var(--font-data);
    font-size: var(--fs-micro);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--s2);
  }

  table.grid td {
    margin-bottom: var(--s3);
    overflow-wrap: anywhere;
  }

  table.grid td:last-child {
    margin-bottom: 0;
  }

  /* A raw request is a wall of long values. On a phone, wrapping beats scrolling sideways to
     find the end of a user agent. */
  .raw {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: none;
  }

  table.grid tr:last-child {
    border-bottom: none;
  }

  .table-wrap {
    border: none;
    background: transparent;
  }

  .verdict {
    padding: var(--s9);
  }
}

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

  * {
    transition-duration: var(--motion-kill) !important;
    animation-duration: var(--motion-kill) !important;
  }
}
