/* HowFast 2.2, 17 November 2026.  A free BroadbandSwitch.uk tool by Dr Alex J Martin-Smith.
   One enormous number that fills the screen, then quiet, useful detail below.
   Light by default on every device; dark only when the visitor chooses it with the switch.
   Type: Archivo, one variable family used at two widths (62 for numbers and headings, 100 for reading). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-variable.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --fog: #f4f5f7;
  --ink: #15171c;
  --ink-2: #4b515d;
  --ink-3: #636a78;
  --rule: #e3e6eb;
  --live: #7f8591;
  --red: #e40000;
  --pink: #ff4f9a;
  --on-pink: #24040f;
  --good: #0a7d4e;
  --ok: #8f5c00;
  --poor: #c22c47;
  --band-0: #f6c9d2;
  --band-1: #f6e3ae;
  --band-2: #bfe6d6;
  --band-3: #d9dbe2;
  --off: #cfd4dc;
  --red-text: #c40000;
  --face: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, .84, .24, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0d0f13;
  --fog: #15181e;
  --ink: #f1f2f4;
  --ink-2: #b6bcc7;
  --ink-3: #959cab;
  --rule: #2a2e38;
  --live: #8a909c;
  --red: #ff4545;
  --good: #5fd99a;
  --ok: #ffcb6b;
  --poor: #ff8fa3;
  --band-0: #5a2532;
  --band-1: #54451a;
  --band-2: #1b4d3e;
  --band-3: #3a3f4b;
  --off: #3a3f4b;
  --red-text: #ff6b6b;
  color-scheme: dark;
}
html:root { --stc-accent: var(--ink); --stc-accent-ink: var(--paper); --stc-bg: var(--paper); --stc-fg: var(--ink); --stc-fg-2: var(--ink-2); --stc-line: var(--rule); --stc-radius: 16px; --stc-font: var(--face); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--face); font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.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; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.mark { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; font-size: 27px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variation-settings: "wdth" 75; }
.mark i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); padding: 12px 10px; border-radius: 10px; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.top nav a.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 16px; margin-left: 6px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 650; }
.top nav a.pill svg { width: 14px; height: 14px; }
.top nav a.pill:hover { color: var(--paper); }
.switch { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); display: grid; place-items: center; cursor: pointer; margin-left: 4px; }
.switch svg { width: 18px; height: 18px; }
.switch:hover { border-color: var(--ink-3); }

/* ---------- The number ---------- */
.hero { min-height: calc(100svh - 76px); display: grid; align-content: center; justify-items: center; text-align: center; padding-block: 0 40px; }
.hero__label { margin: 0; font-size: clamp(17px, 2vw, 21px); font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 10px; font-variation-settings: "wdth" 100; }
.hero__label .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
body[data-state="running"] .hero__label .dot { background: var(--red); animation: beat 1s ease-in-out infinite; }
body[data-state="done"] .hero__label .dot { background: var(--good); }
@keyframes beat { 50% { transform: scale(1.7); opacity: .4; } }
.reading { display: flex; align-items: baseline; justify-content: center; gap: clamp(8px, 1.4vw, 20px); margin-top: 2px; max-width: 100%; }
.big { font-size: clamp(150px, min(40vw, 58vh), 600px); line-height: .84; font-weight: 220; letter-spacing: -0.015em; font-variation-settings: "wdth" 62; font-variant-numeric: tabular-nums lining-nums; color: var(--live); transition: color .9s ease, font-weight .9s ease; white-space: nowrap; }
body[data-state="done"] .big { color: var(--ink); font-weight: 540; letter-spacing: 0; font-variant-numeric: proportional-nums lining-nums; }
#hero:focus { outline: none; }
.unit { appearance: none; border: 0; background: none; padding: 8px 2px; min-height: 44px; cursor: pointer; font-size: clamp(20px, 3vw, 40px); font-weight: 600; font-variation-settings: "wdth" 75; color: var(--ink-2); text-decoration: underline dotted var(--ink-3); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.unit:hover { color: var(--ink); }
.trace { width: min(100%, 980px); height: 76px; margin-top: 8px; display: block; }

/* The progress line: red, across the top while a test runs */
.progress { position: sticky; top: 0; z-index: 20; height: 3px; margin-bottom: -3px; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.progress i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(var(--p, 0)); transform-origin: left center; box-shadow: 0 0 12px var(--red); }
body[data-state="running"] .progress { opacity: 1; }

/* Ten people: how you compare with tests in your region */
.people { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.people svg { width: 17px; height: 34px; fill: var(--off); transition: fill .4s ease calc(var(--i, 0) * 70ms); }
.people svg.on { fill: var(--ink); }
.say { font-size: clamp(19px, 2.4vw, 26px); font-weight: 500; font-variation-settings: "wdth" 88; max-width: 36ch; text-wrap: balance; margin: 14px 0 0; min-height: 1.4em; }
.say small { display: block; font-size: 15px; font-weight: 400; color: var(--ink-3); margin-top: 6px; font-variation-settings: "wdth" 100; text-wrap: pretty; }
.acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .15s; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn:hover { transform: translateY(-1px); }
.btn--quiet { border-color: var(--rule); color: var(--ink-2); }
.cta { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 999px; background: var(--pink); color: var(--on-pink); text-decoration: none; font-weight: 700; font-size: 16px; transition: transform .15s; }
.cta:hover { transform: translateY(-1px); }
.cta svg { width: 18px; height: 18px; }
.hero__cta { margin-top: 26px; }
.note { font-size: 14px; color: var(--ink-3); margin: 14px 0 0; max-width: 60ch; }
.note .linkish { color: var(--ink-2); }
.error { margin: 16px 0 0; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--poor); color: var(--ink); font-size: 15px; max-width: 46ch; }

/* ---------- More, under the number ---------- */
.more { width: min(100%, 980px); margin-top: 30px; border-top: 1px solid var(--rule); padding-top: 22px; display: grid; gap: 18px; }
.more__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { text-align: left; display: grid; gap: 2px; align-content: start; }
.stat__k { font-size: 15px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.stat__k i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.stat__v { font-size: clamp(54px, 7vw, 92px); line-height: .9; font-weight: 520; letter-spacing: -0.02em; font-variation-settings: "wdth" 62; font-variant-numeric: tabular-nums; min-height: .9em; }
.stat__v small { font-size: .32em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-left: 4px; font-variation-settings: "wdth" 85; }
.stat__note { font-size: 14px; color: var(--ink-3); }
.grade { display: inline-grid; place-items: center; width: 1em; height: 1em; border-radius: 22%; background: var(--rule); color: var(--ink); font-size: .82em; }
.where { font-size: 15px; color: var(--ink-3); text-align: left; margin: 0; }
.settings { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; text-align: left; font-size: 15px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 8px 14px; min-height: 40px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Sections below the fold ---------- */
section.band { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); }
section.band--fog { background: var(--fog); }
.h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1; font-weight: 750; letter-spacing: -0.025em; font-variation-settings: "wdth" 68; margin: 0 0 12px; text-wrap: balance; max-width: 20ch; }
.lede { color: var(--ink-2); max-width: 62ch; margin: 0 0 28px; }
.uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.use { padding: 18px 18px 6px 0; display: grid; gap: 6px; align-content: start; }
.use + .use { padding-left: 18px; border-left: 1px solid var(--rule); }
.use__v { font-size: clamp(56px, 7.2vw, 96px); line-height: .88; font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "wdth" 62; font-variant-numeric: tabular-nums; }
.use__v small { font-size: .3em; font-weight: 600; letter-spacing: 0; margin-left: 4px; font-variation-settings: "wdth" 85; }
.use__t { font-weight: 600; }
.use__s { font-size: 14px; color: var(--ink-3); }
.use { position: relative; }
.use__i { width: 30px; height: 30px; color: var(--ink-3); margin-bottom: 4px; }

/* Is it enough for your home? */
.homecheck { margin-top: 34px; padding: 22px; border: 1px solid var(--rule); border-radius: 20px; display: grid; gap: 14px; justify-items: start; max-width: 820px; }
.homecheck__q { margin: 0; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.05; font-weight: 750; letter-spacing: -0.02em; font-variation-settings: "wdth" 70; }
.homecheck__how { margin: -8px 0 0; color: var(--ink-2); }
.seg--lg button { font-size: 16px; padding: 10px 20px; min-height: 46px; }
.hmeter { position: relative; width: 100%; padding-bottom: 26px; }
.hmeter__track { display: block; height: 14px; border-radius: 7px; background: var(--fog); overflow: hidden; }
.hmeter__track i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--good); transition: width .9s var(--ease), background .3s; }
.hmeter b { position: absolute; top: -5px; left: var(--x, 0%); width: 3px; height: 24px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); transition: left .9s var(--ease); }
.hmeter b span { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.hmeter b.is-end span { left: auto; right: 0; transform: none; }
.hmeter b.is-start span { left: 0; transform: none; }
.homecheck__a { margin: 0; font-size: 18px; color: var(--ink-2); max-width: 62ch; }
.homecheck__a strong { font-weight: 750; }
.homecheck__a .v-good { color: var(--good); }
.homecheck__a .v-ok { color: var(--ok); }
.homecheck__a .v-poor { color: var(--poor); }

/* How to test properly: a real sequence, so the steps are numbered */
.howto { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.howto li { counter-increment: step; display: grid; gap: 6px; align-content: start; padding: 18px 18px 8px 0; }
.howto li + li { padding-left: 18px; border-left: 1px solid var(--rule); }
.howto li::before { content: counter(step); font-size: clamp(48px, 6vw, 80px); line-height: .9; font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "wdth" 62; color: var(--ink); }
.howto b { font-size: 18px; }
.howto span { font-size: 15px; color: var(--ink-2); }
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; margin-top: 34px; }
.next__h { margin: 0 0 6px; font-size: 20px; font-variation-settings: "wdth" 85; }
.next ul { list-style: none; margin: 0; padding: 0; }
.next li { padding: 10px 0; border-top: 1px solid var(--rule); }
.next a { color: var(--ink); font-weight: 600; text-decoration-color: var(--rule); }
.next a:hover { text-decoration-color: var(--ink); }

/* Wi-Fi against cable */
.wbars { display: grid; gap: 10px; }
.wbar { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 15px; color: var(--ink-2); }
.wbar__track { height: 18px; border-radius: 9px; background: var(--rule); overflow: hidden; }
.wbar__track i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--ink); transition: width .6s var(--ease); }
.wbar--wifi .wbar__track i { background: var(--red); }
.wbar b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.wcalc .calc__out { font-size: clamp(30px, 4vw, 48px); }

/* The 4 GB film race */
.race { border-top: 2px solid var(--ink); padding-top: 18px; display: grid; gap: 18px; }
.race__clock { display: flex; align-items: baseline; gap: 12px; }
.race__clock span { font-size: clamp(64px, 9vw, 120px); line-height: .9; font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "wdth" 62; font-variant-numeric: tabular-nums; }
.race__clock small { font-size: 15px; color: var(--ink-3); }
.race__lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lane { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr) 118px; align-items: center; gap: 14px; }
.lane__name { font-size: 15px; color: var(--ink-2); line-height: 1.3; }
.lane__name b { display: block; color: var(--ink); font-size: 17px; }
.lane__track { position: relative; height: 22px; border-radius: 11px; background: var(--rule); overflow: hidden; }
.lane__track i { position: absolute; inset: 0; border-radius: inherit; background: var(--ink-3); transform: scaleX(var(--f, 0)); transform-origin: left center; }
.lane--you .lane__track i { background: var(--red); }
.lane--uk .lane__track i { background: var(--ink); }
.lane__time { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s; }
.lane.is-done .lane__time { opacity: 1; }
.lane.is-left .lane__time { opacity: 1; color: var(--ink-3); font-weight: 500; }
.lane--you .lane__name b { color: var(--red-text); }
.race__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.race__say { margin: 0; font-size: clamp(18px, 2vw, 22px); font-weight: 500; font-variation-settings: "wdth" 88; max-width: 52ch; }
.fine { font-size: 14px; color: var(--ink-3); margin: 18px 0 0; max-width: 80ch; }
.cite { color: var(--ink-2); font-size: .88em; font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.cite:hover { color: var(--red); }

/* Ofcom's bands on a ten-times line */
.scale { position: relative; padding: 58px 0 34px; }
.scale__line { position: relative; height: 16px; display: flex; border-radius: 8px; overflow: hidden; }
.scale__line span { height: 100%; }
.scale__ticks { position: relative; height: 22px; margin-top: 10px; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.scale__ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale__ticks span:first-child { transform: none; }
.scale__names { position: relative; height: 22px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.scale__names span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale__pin { position: absolute; top: 0; left: clamp(var(--half, 0px), var(--x, 0%), calc(100% - var(--half, 0px))); transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; font-weight: 750; font-size: 20px; line-height: 1; letter-spacing: -0.01em; font-variation-settings: "wdth" 75; white-space: nowrap; transition: left 1.2s var(--ease); }
.scale__pin::after { content: ""; width: 3px; height: 34px; border-radius: 2px; background: var(--red); }
.scale__say { font-size: clamp(19px, 2.2vw, 24px); font-weight: 500; margin: 0; font-variation-settings: "wdth" 88; }

/* UK regions */
.regions { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; max-width: 820px; }
.region { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) 92px; align-items: center; gap: 12px; font-size: 15px; }
.region__bar { height: 12px; border-radius: 6px; background: var(--rule); overflow: hidden; }
.region__bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--ink-3); border-radius: inherit; transition: width 1s var(--ease); }
.region__v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.region__v small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.region.is-you { font-weight: 700; }
.region.is-you .region__bar i { background: var(--red); }
.gathering { font-size: 15px; color: var(--ink-3); margin: 16px 0 0; max-width: 80ch; }

/* Answers */
.qa { border-top: 1px solid var(--rule); }
.faq .qa:last-child { border-bottom: 1px solid var(--rule); }
.qa summary { cursor: pointer; list-style: none; padding: 18px 44px 18px 0; position: relative; font-size: 20px; line-height: 1.3; font-weight: 650; font-variation-settings: "wdth" 85; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 28px; font-weight: 300; color: var(--ink-3); }
.qa[open] summary::after { content: "\2212"; }
.qa__a { margin: 0 0 20px; color: var(--ink-2); max-width: 70ch; }
.answers .faq, .answers .fine { max-width: 880px; }

/* The family of tools */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.tool { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.tool b { font-size: 19px; font-variation-settings: "wdth" 85; }
.tool span { grid-column: 1; color: var(--ink-3); font-size: 15px; }
.tool svg { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s; }
.tool:hover svg { transform: translateX(4px); color: var(--red); }
.tool--lead { grid-column: 1 / -1; padding: 22px 0; border-top: 2px solid var(--ink); }
.tool--lead b { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.05; font-weight: 750; letter-spacing: -0.02em; font-variation-settings: "wdth" 68; }
.tool--lead span { font-size: 17px; color: var(--ink-2); }
.tool--lead svg { width: 24px; height: 24px; color: var(--ink); }

/* Sources */
.refs { padding-left: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); max-width: 900px; margin: 0; }
.refs li { padding-left: 2em; text-indent: -2em; overflow-wrap: anywhere; }
.refs a { color: var(--ink-2); }
.citebox { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; gap: 10px; max-width: 900px; }
.citebox h3 { margin: 0; font-size: 17px; }
.citebox p { margin: 0; color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }

/* Footer */
footer { padding-block: 44px 56px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-3); }
footer .wrap { display: grid; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer nav a, footer .linkish { color: var(--ink-2); }
footer p { margin: 0; max-width: 100ch; }
footer .mark { font-size: 23px; justify-self: start; color: var(--ink); }
footer nav + nav { padding-top: 14px; border-top: 1px solid var(--rule); }
footer .legal { font-size: 13px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-3); }
.byline a { color: var(--ink-2); }

/* ---------- Inner pages ---------- */
.page-head { padding-block: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rule); }
.crumbs a { color: var(--ink-2); }
.page-head h1 { margin: 0; font-size: clamp(42px, 7vw, 92px); line-height: .95; font-weight: 760; letter-spacing: -0.03em; font-variation-settings: "wdth" 66; max-width: 16ch; text-wrap: balance; overflow-wrap: break-word; }
.page-head__lead { margin: 18px 0 18px; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.article { max-width: 760px; padding-block: clamp(28px, 4vw, 48px) clamp(48px, 6vw, 80px); }
.article h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.05; font-weight: 730; letter-spacing: -0.02em; font-variation-settings: "wdth" 70; margin: 44px 0 14px; text-wrap: balance; }
.article h3 { font-size: 21px; margin: 28px 0 8px; font-variation-settings: "wdth" 85; }
.article p, .article li { color: var(--ink-2); }
.article p { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 18px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--ink); }
.answer { margin: 0 0 8px; padding: 18px 20px; border-radius: 16px; background: var(--fog); font-size: 18px; color: var(--ink); }
.answer b { font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--rule); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { background: var(--fog); font-weight: 700; color: var(--ink); }
tbody tr:last-child > * { border-bottom: 0; }
td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
tbody th { color: var(--ink); font-weight: 600; }
.figure { margin: 8px 0 26px; }
.figure figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; }
.cta-band { margin: 40px 0 8px; padding: 26px 24px; border-radius: 18px; background: var(--fog); display: grid; gap: 12px; }
.cta-band h2 { margin: 0 !important; font-size: 28px !important; }
.cta-band p { margin: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.updated { font-size: 14px; color: var(--ink-3); margin-top: 28px; }
.article .refs li { color: var(--ink-2); margin: 0; }
.article .citebox { margin-top: 28px; }
.more-reading { margin: 40px 0 8px; }
.more-reading h2 { margin-top: 0 !important; }
.more-reading ul { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.more-reading li { margin: 0 !important; padding: 12px 0; border-top: 1px solid var(--rule); }
.more-reading a { color: var(--ink); font-weight: 600; text-decoration: none; }
.more-reading a:hover { text-decoration: underline; }
.more-reading span { color: var(--ink-3); font-size: 14px; }

/* Figures in the guides */
.scale--fig { padding: 6px 0 4px; }
.hh { display: grid; gap: 14px; padding: 18px 18px 4px; border: 1px solid var(--rule); border-radius: 16px; }
.hh__row { display: grid; gap: 6px; }
.hh__name { font-size: 15px; font-weight: 600; color: var(--ink); }
.hh__track { position: relative; height: 14px; border-radius: 7px; background: var(--fog); }
.hh__track i { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--ink); }
.bits { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--rule); border-radius: 16px; }
.bits__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bits__cells { display: inline-flex; gap: 4px; padding: 6px; border: 2px solid var(--ink); border-radius: 10px; }
.bits__cells i { width: 18px; height: 26px; border-radius: 4px; background: var(--ink-3); }
.bits__eq { font-weight: 650; color: var(--ink); }
.bits__sum { margin: 0 !important; color: var(--ink) !important; font-size: 20px; }
.bits__sum b { font-size: clamp(40px, 6vw, 60px); line-height: 1; font-weight: 640; letter-spacing: -0.02em; font-variation-settings: "wdth" 62; }
.bits__sum span { color: var(--ink-3); font-size: 17px; }
.steps { list-style: none; display: flex; gap: 6px; padding: 0 !important; margin: 0 !important; }
.steps li { position: relative; flex: 1 1 0; min-width: 116px; margin: 0 !important; padding: 12px 12px 26px; border-radius: 12px; background: var(--fog); display: grid; gap: 2px; align-content: start; }
.steps li b { color: var(--ink); font-size: 16px; }
.steps li span { font-size: 14px; color: var(--ink-3); }
.steps__down span, .steps__up span { color: var(--ink) !important; }
.steps__down { background: var(--band-2) !important; }
.steps__up { background: var(--band-1) !important; }
.steps li i { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; background: radial-gradient(circle, var(--ink) 1.6px, transparent 2px) 0 50% / 8px 4px repeat-x; }

/* Download time calculator */
.calc { display: grid; gap: 18px; padding: 22px; border-radius: 18px; border: 1px solid var(--rule); margin: 8px 0 28px; }
.calc__row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field select { font: inherit; font-size: 18px; color: var(--ink); background: var(--paper); border: 1px solid var(--ink-3); border-radius: 12px; padding: 0 12px; height: 50px; min-width: 0; width: 100%; }
.field--num { width: 150px; }
.field--size { width: 220px; }
.article .calc__out { color: var(--ink); margin: 0 0 6px; }
.calc__out { font-size: clamp(44px, 7vw, 78px); line-height: .95; font-weight: 640; letter-spacing: -0.02em; font-variation-settings: "wdth" 62; }
.calc__sub { font-size: 15px; color: var(--ink-3); margin: 0; }

@media (max-width: 860px) {
  .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .howto li:nth-child(3) { padding-left: 0; border-left: 0; }
  .more__grid, .uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more__grid { gap: 22px 12px; }
  .use:nth-child(3) { padding-left: 0; border-left: 0; }
  .use:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .tools { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .article .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .article .table-wrap table { min-width: 0; }
  .article .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .article .table-wrap tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .article .table-wrap td, .article .table-wrap tbody th { display: block; padding: 2px 0; border: 0; }
  .article .table-wrap tbody tr > :first-child { font-weight: 700; color: var(--ink); }
  .article .table-wrap td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink); }
}
@media (max-width: 560px) {
  .top nav a { display: none; }
  .howto { grid-template-columns: 1fr; }
  .howto li, .howto li + li { padding: 16px 0 6px; border-left: 0; border-top: 1px solid var(--rule); }
  .howto li:first-child { border-top: 0; }
  .next { grid-template-columns: 1fr; }
  .lane { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .lane__track { grid-column: 1 / -1; grid-row: 2; height: 18px; }
  .homecheck { padding: 18px; }
  .top nav a.pill { display: inline-flex; padding: 8px 14px; }
  .more-reading ul { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .steps li { flex-grow: 1 !important; }
  .big { font-size: 46vw; }
  .reading { flex-direction: column; align-items: center; gap: 0; }
  .region { grid-template-columns: minmax(0, 1fr) auto; }
  .region__bar { grid-column: 1 / -1; grid-row: 2; }
  .scale__names span { font-size: 12px; }
  .scale__names span:nth-child(2) { top: 18px; }
  .scale__ticks span:nth-child(5) { display: none; }
  .scale { padding-bottom: 46px; }
  .field--num, .field--size { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .big, .scale__pin, .region__bar i, .btn, .cta, .people svg, .hmeter__track i, .hmeter b, .lane__time, .wbar__track i { transition: none; }
  body[data-state="running"] .hero__label .dot { animation: none; }
}
@media print {
  .top nav, .acts, .hero__cta, .tools, footer nav, .skip, .progress, #raceAgain, .homecheck .seg { display: none !important; }
  .hero { min-height: 0; }
}
