/* Base + components. No raw colors: everything comes from tokens.css. */

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

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

/* Surface ink. Every element that sets a background also sets these, so
   text colour follows the surface it sits on rather than the section it
   happens to be inside. Nesting a dark panel in a paper band was painting
   labels dark-on-dark before this existed. */
:root,
.panel--dark,
.band--dots {
  --ink-strong: var(--c-ink);
  --ink-soft: var(--c-ink-mid);
  --ink-faint: var(--c-ink-quiet);
  --ink-eyebrow: var(--c-accent-2);
}

.band--paper,
.panel--paper,
.plate {
  --ink-strong: var(--c-ink-on-paper);
  --ink-soft: var(--c-ink-quiet-on-paper);
  --ink-faint: var(--c-ink-quiet-on-paper);
  --ink-eyebrow: var(--c-ink-quiet-on-paper);
}

body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--t-s);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-accent-3); }

:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--c-accent-2);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-accent-3);
  color: var(--c-ink-on-paper);
  padding: var(--s-3) var(--s-4);
  font-weight: 700;
  z-index: 50;
}
.skip:focus { left: var(--s-4); top: var(--s-4); }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(2.5rem, 6vw, 5rem); }
.band--paper { background: var(--c-paper); color: var(--c-ink-on-paper); }
.band--dots { background-image: var(--texture-dots); background-size: 10px 10px; }

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--lg { gap: var(--s-6); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.between { justify-content: space-between; }

.cols {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .cols--5-7 { grid-template-columns: 5fr 7fr; align-items: start; }
  .cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- type ---------- */
.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--display-tracking);
  line-height: 0.86;
  margin: 0;
  transform: skewX(var(--display-skew));
  transform-origin: left bottom;
}
.display--hero {
  font-size: var(--t-xxl);
  color: var(--c-accent-3);
  text-shadow: 6px 6px 0 var(--c-accent), 12px 12px 0 var(--c-base);
}
.display--xl { font-size: var(--t-xl); }
.display--l { font-size: var(--t-l); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

/* Labels are set in the body face, not mono. Small mono with wide tracking
   is the single biggest legibility mistake in a data-heavy layout. */
.label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Eyebrows above headings: mono is fine here because it is one short line
   at a readable size. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-eyebrow);
}

/* Announced to screen readers, never shown. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The verdict is a sentence of advice, so it is set as one. */
.verdict {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-strong);
  border-left: 6px solid var(--c-accent);
  padding-left: var(--s-4);
}

/* Cautions must be readable: this is the line that says check your manual. */
.note {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.quiet { color: var(--ink-faint); }
.lead { font-size: var(--t-m); max-width: 46ch; }
.measure { max-width: 68ch; }

/* ---------- components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: var(--border-w) solid var(--c-ink-on-paper);
  border-radius: var(--radius-panel);
  background: var(--c-accent-3);
  color: var(--c-ink-on-paper);
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-hard) var(--c-accent);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
.btn:hover { color: var(--c-ink-on-paper); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--c-accent); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--c-accent); }

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-ink);
  box-shadow: none;
}
.btn--ghost:hover { color: var(--c-accent-3); box-shadow: none; }

.panel {
  border: var(--border-w) solid var(--c-line);
  border-radius: var(--radius-panel);
  padding: var(--s-5);
  background: var(--c-surface);
}
.panel--paper {
  background: var(--c-paper-raised);
  color: var(--c-ink-on-paper);
  border-color: var(--c-ink-on-paper);
  box-shadow: var(--shadow-hard) var(--c-accent);
}
.panel--dark {
  background: var(--c-base);
  color: var(--c-ink);
  border-color: var(--c-ink-on-paper);
  border-color: var(--c-ink-on-paper);
  box-shadow: var(--shadow-hard) var(--c-accent);
}

.plate {
  display: flex;
  gap: var(--s-5);
  align-items: center;
  padding: var(--s-5);
  background: var(--c-paper-raised);
  color: var(--c-ink-on-paper);
  border: var(--border-w) solid var(--c-ink-on-paper);
  border-radius: var(--radius-plate);
}
.plate__num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 0.78;
}

.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field > label { font-weight: 700; font-size: var(--t-s); }

.stepper { display: flex; gap: var(--s-2); }
.stepper button {
  width: 48px;
  min-height: 48px;
  flex: 0 0 auto;
  border: var(--border-w) solid currentColor;
  border-radius: var(--radius-panel);
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.stepper input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  border: var(--border-w) solid currentColor;
  border-radius: var(--radius-panel);
  background: var(--c-paper-raised);
  color: var(--c-ink-on-paper);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}
.panel--dark .stepper input { background: var(--c-base); color: var(--c-accent-3); }

.readout { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.readout__from { font-family: var(--font-mono); font-size: 2rem; color: var(--ink-soft); }
.readout__to {
  font-family: var(--font-mono);
  font-size: var(--t-data);
  font-weight: 700;
  line-height: 0.9;
  color: var(--c-accent-3);
}

.stat { border: var(--border-w) solid var(--c-line); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.stat__value { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 700; letter-spacing: 0; }

/* Bar rows carry their own value so the comparison reads without the bars. */
.bar-row { display: flex; align-items: center; gap: var(--s-4); }
.bar-row__key { width: 1.25rem; font-family: var(--font-mono); font-weight: 700; }
.bar-row__value { width: 3.5rem; font-family: var(--font-mono); font-size: 1rem; text-align: right; }

.bar { height: 18px; background: var(--c-surface); border: 2px solid var(--c-line); }
.bar > span { display: block; height: 100%; background: var(--c-accent-3); }
.bar--quiet > span { background: var(--c-ink-quiet); }

.checker { height: 28px; }
.checker > span { display: block; height: 14px; }
.checker > span:first-child {
  background: repeating-linear-gradient(90deg, var(--c-paper) 0 14px, var(--c-base) 14px 28px);
}
.checker > span:last-child {
  background: repeating-linear-gradient(90deg, var(--c-base) 0 14px, var(--c-paper) 14px 28px);
}

.specs { width: 100%; border-collapse: collapse; }
.specs caption { text-align: left; padding-bottom: var(--s-3); }
.specs th,
.specs td { text-align: left; padding: var(--s-3) var(--s-2); border-top: 1px solid var(--c-line); }
.band--paper .specs th,
.band--paper .specs td { border-color: var(--c-line-paper); }
.specs td.num { font-family: var(--font-mono); }
.specs .missing { color: var(--ink-soft); font-style: italic; }

.tag {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: var(--s-2) var(--s-3);
  border: 2px solid currentColor;
}
.tag--solid { background: var(--c-accent); color: var(--c-ink-on-paper); border-color: var(--c-ink-on-paper); font-weight: 700; }
.tag--electric { background: var(--c-accent-2); color: var(--c-ink-on-paper); border-color: var(--c-ink-on-paper); font-weight: 700; }

.brand { display: inline-flex; align-items: center; gap: var(--s-3); }
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 44px;
  background: var(--c-accent);
  color: var(--c-ink-on-paper);
  border: var(--border-w) solid var(--c-ink-on-paper);
  border-radius: var(--radius-plate);
  font-family: var(--font-display);
  font-size: 1.5rem;
  transform: skewX(var(--display-skew));
}
.brand__word { font-family: var(--font-display); font-size: 1.75rem; text-transform: uppercase; transform: skewX(var(--display-skew)); }

.site-head { border-bottom: var(--border-w) solid var(--c-paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 88px; flex-wrap: wrap; }
.site-nav { display: flex; gap: var(--s-5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9375rem; }

.site-foot { padding-top: var(--s-6); }
.site-foot .wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px var(--c-line);
  transform: skewX(var(--display-skew));
  display: block;
}

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 600ms var(--ease), transform 600ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
