/* Toopkav
   Layout: one live match (a fixed canvas) runs behind the whole page; sections are either
   transparent "scenes" that look at it, or dark bands of text laid over it. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* colour: a floodlit pitch at night */
  --night: #04140d;                       /* page ground */
  --night-2: #082319;                     /* raised surface */
  --panel: rgba(5, 24, 17, 0.84);         /* glass over the live pitch */
  --chalk: #f2f5ee;                       /* primary ink, pitch lines */
  --chalk-2: #b9c7bc;                     /* secondary ink */
  --chalk-3: #82958a;                     /* muted ink */
  --hair: rgba(242, 245, 238, 0.14);
  --hair-2: rgba(242, 245, 238, 0.30);
  --flood: #ffd166;                       /* floodlight amber: live values and emphasis */
  --flood-soft: rgba(255, 209, 102, 0.18);
  --home: #e66767;                        /* team marks (validated pair) */
  --away: #3987e5;
  --good: #35b45f;
  --warn: #fab219;
  --bad: #ec835a;
  /* type */
  --font: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* space */
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.95;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
img, canvas, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--flood); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--flood); color: var(--night); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.latin { direction: ltr; unicode-bidi: isolate; font-family: var(--mono); font-size: 0.86em; }
.skip { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 50; background: var(--chalk); color: var(--night); padding: 8px 16px; border-radius: 99px; font-weight: 800; }
.skip:focus { top: 12px; }

/* ---------- live stage */
.stage {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(120% 80% at 50% 78%, #0f4a2c 0%, #082519 46%, var(--night) 78%);
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
main, .foot { position: relative; z-index: 1; }

/* ---------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gut-r) 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(4, 20, 13, 0.82); border-bottom-color: var(--hair); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.3rem; }
.brand svg { flex: none; }
.nav-links { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.nav-links a { text-decoration: none; color: var(--chalk-2); font-weight: 600; font-size: 0.95rem; padding: 6px 2px; position: relative; }
.nav-links a::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--flood); transform: scaleX(0); transform-origin: right; transition: transform 0.25s; }
.nav-links a:hover, .nav-links a.is-here { color: var(--chalk); }
.nav-links a:hover::after, .nav-links a.is-here::after { transform: scaleX(1); }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 26px; border-radius: 99px;
  font-weight: 800; font-size: 1rem; line-height: 1.4; text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--chalk); color: var(--night); }
.btn-solid:hover { background: var(--flood); }
.btn-line { border-color: var(--hair-2); color: var(--chalk); background: rgba(4, 20, 13, 0.35); }
.btn-line:hover { border-color: var(--chalk); }
.btn-small { min-height: 40px; padding: 4px 18px; font-size: 0.9rem; }

/* ---------- shared type */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--flood); font-weight: 800; font-size: 0.92rem; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 20px; height: 13px; background: currentColor; clip-path: polygon(0 0, 100% 0, 68% 100%, 32% 100%); }
h2 { font-size: clamp(1.85rem, 4.3vw, 3.3rem); font-weight: 900; line-height: 1.32; text-wrap: balance; }
h3 { font-size: 1.16rem; font-weight: 800; line-height: 1.6; }
.lead { font-size: clamp(1.04rem, 1.5vw, 1.22rem); color: var(--chalk-2); }
.narrow { max-width: 46em; margin-top: 18px; }
.fine { font-size: 0.82rem; color: var(--chalk-3); line-height: 1.8; }
.wrap { max-width: 1180px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }

/* marks used in legends: the same shapes the canvas draws */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 7px; background: var(--chalk); vertical-align: 0; }
.dot-a { background: var(--home); }
.dot-b { background: var(--away); }
.dot-ref { background: #16181b; box-shadow: inset 0 0 0 2px #dfe94e; }
.mark { display: inline-block; width: 12px; height: 12px; margin-inline-end: 7px; vertical-align: -1px; }
.mark-seen { border-radius: 50%; background: var(--chalk); }
.mark-est { border-radius: 50%; border: 2px dashed var(--chalk); }
.mark-cone { width: 16px; background: var(--flood); clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%); }
.mark-shot { width: 3px; height: 13px; background: var(--flood); border-radius: 2px; }

/* corner brackets instead of borders: the look of a detection box */
.box {
  --c: var(--hair-2);
  position: relative;
  background-color: rgba(8, 35, 25, 0.62);
  background-image:
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c));
  background-repeat: no-repeat;
  background-size: 16px 1.5px, 1.5px 16px, 16px 1.5px, 1.5px 16px, 16px 1.5px, 1.5px 16px, 16px 1.5px, 1.5px 16px;
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
}

/* ---------- hero */
.hero {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(16px, 4.5vh, 48px)) var(--gut-r) 0 var(--gut);
  background:
    radial-gradient(62% 58% at 100% 26%, rgba(4, 20, 13, 0.82) 0%, rgba(4, 20, 13, 0.5) 52%, rgba(4, 20, 13, 0) 100%),
    linear-gradient(180deg, rgba(4, 20, 13, 0.7) 0%, rgba(4, 20, 13, 0.3) 34%, rgba(4, 20, 13, 0) 58%);
}
.hero-copy { max-width: 640px; position: relative; }
.hero-copy::before {
  content: ""; position: absolute; z-index: -1; inset: -30px -70px -34px -90px;
  background: radial-gradient(closest-side, rgba(4, 20, 13, 0.74), rgba(4, 20, 13, 0.5) 62%, rgba(4, 20, 13, 0));
  pointer-events: none;
}
.tag {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px; border-radius: 99px;
  background: rgba(4, 20, 13, 0.6); border: 1px solid var(--hair); color: var(--chalk-2); font-size: 0.86rem; font-weight: 600;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--home); box-shadow: 0 0 0 0 rgba(230, 103, 103, 0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(230, 103, 103, 0); } 100% { box-shadow: 0 0 0 0 rgba(230, 103, 103, 0); } }
h1 { font-size: clamp(2.5rem, min(6.2vw, 10.4vh), 4.7rem); font-weight: 900; line-height: 1.24; margin: 14px 0 12px; text-shadow: 0 2px 30px rgba(4, 20, 13, 0.6); }
.hero .lead { max-width: 31em; font-size: clamp(1rem, 1.35vw, 1.14rem); color: #d3ddd5; text-shadow: 0 1px 16px rgba(4, 20, 13, 0.8); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.hud {
  position: absolute; inset-inline: var(--gut-r) var(--gut); bottom: max(22px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  width: fit-content; max-width: calc(100% - var(--gut) - var(--gut-r));
  background: var(--panel); border: 1px solid var(--hair); border-radius: 16px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hud-item { padding: 10px 20px; display: grid; gap: 0; border-inline-start: 1px solid var(--hair); min-width: 0; }
.hud-item:first-child { border-inline-start: 0; }
.hud-k { font-size: 0.76rem; color: var(--chalk-3); font-weight: 600; white-space: nowrap; line-height: 1.7; }
.hud-v { font-size: 1.22rem; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.hud-note { font-size: 0.86rem; font-weight: 600; color: var(--chalk-2); }
.scroll-cue { position: absolute; inset-inline-end: var(--gut); bottom: max(26px, env(safe-area-inset-bottom, 0px)); width: 26px; height: 42px; border: 1.5px solid var(--hair-2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--chalk); animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- text bands over the dimmed stage */
.band {
  position: relative; padding-block: clamp(84px, 14vh, 150px);
  background: linear-gradient(180deg, rgba(4, 20, 13, 0) 0, rgba(4, 20, 13, 0.9) 130px, rgba(4, 20, 13, 0.9) calc(100% - 130px), rgba(4, 20, 13, 0) 100%);
  scroll-margin-top: 40px;
}
.band-last { background: linear-gradient(180deg, rgba(4, 20, 13, 0) 0, rgba(4, 20, 13, 0.86) 130px, rgba(4, 20, 13, 0.72) 100%); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 46px; }
.tile { padding: 24px 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.tile .ico { margin-bottom: 6px; }
.tile h3 { font-size: 1.24rem; }
.tile-zero { --c: var(--flood); background-color: rgba(12, 48, 33, 0.72); }
.tile-l { color: var(--chalk-2); font-size: 0.96rem; line-height: 1.85; flex: 1; }

.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(22px, 4vw, 54px); margin-top: 54px; align-items: start; }
.timeline h3, .why h3, .road h3 { margin-bottom: 18px; }
.timeline ol { border-inline-start: 1.5px solid var(--hair-2); padding-inline-start: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; padding: 0 22px 20px 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--night); border: 2px solid var(--chalk-2); }
.timeline li b { font-weight: 800; font-size: 1.12rem; color: var(--chalk); }
.timeline li span { color: var(--chalk-2); }
.timeline li strong { color: var(--chalk); font-weight: 800; }
.timeline .is-now::before { background: var(--flood); border-color: var(--flood); box-shadow: 0 0 0 5px var(--flood-soft); }
.timeline .is-now b { color: var(--flood); }
.timeline .is-now { padding-bottom: 0; }
.why { padding: 26px; }
.why p { color: var(--chalk-2); }
.why p + p { margin-top: 12px; }

/* ---------- pinned stories */
.story { position: relative; height: calc(var(--n, 4) * 92vh + 100vh); scroll-margin-top: 0; }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; pointer-events: none; }
.story-card {
  position: absolute; inset-inline-start: max(4vw, var(--gut-r)); top: 50%; transform: translateY(-46%);
  width: min(440px, 37vw); pointer-events: auto;
  max-height: calc(100vh - var(--nav-h) - 28px); overflow-y: auto; scrollbar-width: thin;
  background: var(--panel); border: 1px solid var(--hair); border-radius: 20px; padding: 28px 28px 22px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.story-head h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: 18px; }
.story-head .eyebrow { margin-bottom: 6px; }
.steps { display: grid; border-top: 1px solid var(--hair); padding-top: 18px; }
.step { grid-area: 1 / 1; min-width: 0; }
.js .step { opacity: 0; transform: translateY(14px); transition: opacity 0.4s, transform 0.4s; pointer-events: none; }
.js .step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.step h3 { font-size: 1.3rem; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--flood); color: var(--night); font-weight: 900; font-size: 1.05rem; line-height: 1; padding-top: 2px; }
.step p { color: var(--chalk-2); }
.story-dots { display: flex; gap: 6px; margin-top: 20px; }
.story-dots button { flex: 1; height: 16px; padding: 6px 0; border: 0; background: none; cursor: pointer; }
.story-dots button::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--hair-2); transition: background-color 0.3s; }
.story-dots button[aria-current="true"]::before { background: var(--flood); }
.story-dots button:hover::before { background: var(--chalk-2); }

.live { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.live-one { grid-template-columns: 1fr; }
.live div { background: rgba(242, 245, 238, 0.06); border-radius: 12px; padding: 9px 14px; }
.live dt { font-size: 0.8rem; color: var(--chalk-3); line-height: 1.7; }
.live dd { font-size: 1.45rem; font-weight: 800; color: var(--flood); line-height: 1.45; }
.live-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.93rem; }
.live-table th, .live-table td { padding: 7px 4px; text-align: start; border-bottom: 1px solid var(--hair); font-weight: 600; }
.live-table thead th { color: var(--chalk-2); font-size: 0.86rem; }
.live-table tbody th { color: var(--chalk-2); font-weight: 500; }
.live-table td .num { color: var(--flood); font-weight: 800; font-size: 1.08rem; }
.live-table tr:last-child th, .live-table tr:last-child td { border-bottom: 0; }

.meter-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.meter-name { font-size: 0.9rem; color: var(--chalk-2); white-space: nowrap; }
.meter { flex: 1; height: 8px; border-radius: 99px; background: var(--flood-soft); overflow: hidden; min-width: 40px; }
.meter i { display: block; height: 100%; width: 40%; background: var(--flood); border-radius: 99px; transition: width 0.25s linear; }
.meter-under { background: linear-gradient(to left, var(--flood) 68%, rgba(255, 209, 102, 0)) !important; }
.meter-row b { font-weight: 800; min-width: 3.2em; text-align: end; }

.share { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.share-fig { font-size: 0.9rem; color: var(--chalk-2); white-space: nowrap; }
.share-fig b { color: var(--chalk); font-size: 1.05rem; }
.share-fig .dot { margin-inline: 0 6px; }
.share-fig:last-child .dot { margin-inline: 6px 0; }
.share-bar { flex: 1; display: flex; gap: 2px; height: 8px; min-width: 40px; }
.share-bar i { display: block; height: 100%; border-radius: 99px; }
.share-a { background: var(--home); width: 52%; transition: width 0.3s linear; }
.share-b { background: var(--away); flex: 1; }

.report { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 10px; }
.report-h { font-size: 0.78rem; color: var(--chalk-3) !important; }
.report li { font-size: 0.93rem; line-height: 1.8; margin-top: 8px; padding-inline-start: 12px; border-inline-start: 2px solid var(--flood); }
.report code { display: block; direction: ltr; text-align: left; font-family: var(--mono); font-size: 0.7rem; color: var(--chalk-3); margin-top: 1px; }

/* ---------- real data (Iran at the 2022 World Cup) */
.story-real .story-head h2 { margin-bottom: 12px; font-size: clamp(1.2rem, 1.75vw, 1.5rem); }
.seg.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-3 button { display: grid; gap: 0; padding: 6px 4px; line-height: 1.5; }
.seg-3 button small { font-weight: 600; font-size: 0.74rem; opacity: 0.82; }
.real-meta { font-size: 0.78rem; color: var(--chalk-3); margin-top: 8px; line-height: 1.6; }
.story-real .steps { margin-top: 14px; padding-top: 14px; }
.story-real .step h3 { font-size: 1.16rem; }
.story-real .step p { font-size: 0.92rem; line-height: 1.85; }
.story-real .chips { margin-top: 12px; }
.rbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.pbtn-s { width: 36px; height: 36px; }
.pbtn-s svg { width: 18px; height: 18px; }
.seek { -webkit-appearance: none; appearance: none; flex: 1; min-width: 60px; height: 30px; background: transparent; margin: 0; cursor: pointer; direction: ltr; }
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--hair-2); }
.seek::-moz-range-track { height: 4px; border-radius: 2px; background: var(--hair-2); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--chalk); margin-top: -6px; border: 0; }
.seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--chalk); border: 0; }
.story-real .step .rcap { display: flex; align-items: center; min-height: 1.9em; margin-top: 6px; color: var(--chalk); font-weight: 700; font-size: 0.94rem; }
.rcap .dot { flex: none; }
.story-real .live { margin-top: 10px; }
.live dd small { font-size: 0.8rem; font-weight: 600; color: var(--chalk-2); }
.story-real .step .rnote { margin-top: 10px; font-size: 0.9rem; }
.rnote b { color: var(--chalk); font-weight: 800; }
.story-real .step p b { color: var(--flood); font-weight: 800; }
.scale { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.76rem; color: var(--chalk-3); }
.scale i { flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(to left, #164a2e, #7d7a3e 55%, var(--flood)); }
.hist { margin-top: 12px; }
.hist figcaption { font-size: 0.78rem; color: var(--chalk-3); line-height: 1.6; }
.hist-bars { display: flex; align-items: flex-end; gap: 2px; height: 58px; direction: ltr; margin-top: 6px; border-bottom: 1px solid var(--hair-2); }
.hist-bars i { flex: 1; background: var(--flood); border-radius: 3px 3px 0 0; }
.hist-bars i:hover { background: var(--chalk); }
.hist-axis { display: flex; justify-content: space-between; direction: ltr; font-size: 0.72rem; color: var(--chalk-3); line-height: 1.7; }
.report-real { margin-top: 8px; padding-top: 2px; }
.report-real li { font-size: 0.88rem; line-height: 1.75; margin-top: 7px; }
.credit { margin-top: 10px; font-size: 0.72rem; color: var(--chalk-3); line-height: 1.7; }
.credit a { text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.credit a:hover { color: var(--chalk); }
.credit img { height: 18px; width: auto; vertical-align: -4px; margin-inline-end: 8px; background: #fff; border-radius: 4px; padding: 2px 5px; }
.legend [hidden] { display: none; }
.measured { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); }
.measured-h { font-weight: 800; }
.measured dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.measured dl div { background: rgba(242, 245, 238, 0.06); border-radius: 12px; padding: 9px 12px; }
.measured dt { font-size: 0.78rem; color: var(--chalk-3); line-height: 1.6; }
.measured dd { font-size: 1.4rem; font-weight: 800; color: var(--flood); line-height: 1.5; }
.measured .fine { margin-top: 10px; }

/* ---------- honesty */
.meters { padding: 26px; }
.meters figcaption { font-weight: 800; font-size: 1.08rem; margin-bottom: 8px; }
.meter-big { margin-top: 20px; flex-wrap: wrap; row-gap: 6px; }
.meter-big .meter-name { flex: 1 0 100%; font-weight: 700; color: var(--chalk); font-size: 1rem; }
.meter-big .meter-name small { display: block; font-weight: 400; color: var(--chalk-3); font-size: 0.82rem; }
.meter-big .meter { height: 10px; }
.meter-big b { min-width: 6.8em; font-size: 1.02rem; }
.facts { display: grid; gap: 22px; }
.facts article { border-inline-start: 2px solid var(--hair-2); padding-inline-start: 18px; }
.facts h3 { margin-bottom: 4px; }
.facts p { color: var(--chalk-2); }
.table-wrap { margin-top: 54px; padding: 8px 22px 12px; overflow-x: auto; }
.rel { width: 100%; min-width: 620px; border-collapse: collapse; }
.rel caption { text-align: start; font-weight: 800; font-size: 1.08rem; padding: 16px 0 10px; }
.rel th, .rel td { text-align: start; padding: 11px 10px 11px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.rel thead th { color: var(--chalk-3); font-size: 0.84rem; font-weight: 600; }
.rel tbody th { font-weight: 700; }
.rel td { color: var(--chalk-2); }
.rel tbody tr:last-child th, .rel tbody tr:last-child td { border-bottom: 0; }
.st { display: inline-flex; align-items: baseline; gap: 9px; color: var(--chalk); }
.st i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--good); transform: translateY(1px); }
.st-good i { background: var(--good); }
.st-mid i { border-color: var(--warn); background: linear-gradient(90deg, var(--warn) 50%, transparent 50%); }
.st-low i { border-color: var(--bad); }

/* ---------- audience */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 46px; }
.card { padding: 26px 24px 24px; display: flex; flex-direction: column; transition: background-color 0.25s; }
.card:hover { --c: var(--flood); background-color: rgba(12, 48, 33, 0.72); }
.ico { width: 36px; height: 36px; fill: none; stroke: var(--flood); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-top .ico { flex: none; width: 32px; height: 32px; margin: 0; }
.card-top h3 { font-size: 1rem; font-weight: 800; color: var(--flood); line-height: 1.5; }
.card-q { font-size: 1.24rem; font-weight: 800; line-height: 1.65; color: var(--chalk); text-wrap: balance; }
.card-p { color: var(--chalk-2); margin-top: 6px; }
.card ul { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hair); }
.card li { position: relative; padding-inline-start: 20px; color: var(--chalk-2); font-size: 0.9rem; line-height: 1.85; margin-top: 6px; }
.card li::before { content: ""; position: absolute; inset-inline-start: 1px; top: 0.66em; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--flood); }
.card-lead { grid-column: span 2; --c: var(--flood); background-color: rgba(12, 48, 33, 0.72); }
.card-lead .card-q { font-size: clamp(1.4rem, 2.3vw, 1.75rem); }
.card-lead .card-p { max-width: 40em; }
.card-lead ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.card-cta { grid-column: span 2; justify-content: center; align-items: flex-start; --c: var(--flood); background-color: rgba(12, 48, 33, 0.72); }
.card-cta h3 { font-size: 1.35rem; }
.card-cta p { color: var(--chalk-2); max-width: 34em; margin-top: 4px; }
.card-cta .btn { margin-top: 18px; }

/* ---------- playground */
.play { position: relative; height: 210vh; }
.play-pin { position: sticky; top: 0; height: 100vh; height: 100svh; pointer-events: none; }
.play-side {
  position: absolute; inset-inline-start: max(3vw, var(--gut-r)); top: calc(var(--nav-h) + 18px); bottom: 22px;
  width: min(360px, 31vw); display: flex; flex-direction: column; gap: 14px; pointer-events: auto; overflow-y: auto;
  scrollbar-width: none;
}
.play-side::-webkit-scrollbar { display: none; }
.play-head, .play-panel { background: var(--panel); border: 1px solid var(--hair); border-radius: 18px; padding: 20px 22px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.play-head h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.play-head .eyebrow { margin-bottom: 4px; }
.play-head p:last-child { color: var(--chalk-2); font-size: 0.93rem; margin-top: 6px; line-height: 1.85; }
.play-panel { display: grid; gap: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button, .chips button {
  border: 1px solid var(--hair-2); background: transparent; border-radius: 10px; padding: 7px 8px; cursor: pointer;
  font-weight: 700; font-size: 0.86rem; color: var(--chalk-2); line-height: 1.5; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.seg button:hover, .chips button:hover { border-color: var(--chalk); color: var(--chalk); }
.seg button[aria-pressed="true"] { background: var(--chalk); color: var(--night); border-color: var(--chalk); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border-radius: 99px; padding: 5px 13px; display: inline-flex; align-items: center; gap: 7px; }
.chips button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.chips button[aria-pressed="true"] { color: var(--chalk); border-color: var(--flood); background: var(--flood-soft); }
.chips button[aria-pressed="true"]::before { background: var(--flood); border-color: var(--flood); }
.pcard { border-top: 1px solid var(--hair); padding-top: 14px; min-height: 96px; }
.pcard-empty { color: var(--chalk-3); font-size: 0.9rem; line-height: 1.8; }
.pcard h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.pcard .state { margin-inline-start: auto; font-size: 0.78rem; font-weight: 700; color: var(--chalk-2); border: 1px solid var(--hair-2); border-radius: 99px; padding: 0 10px; white-space: nowrap; }
.pcard dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 10px; }
.pcard dt { font-size: 0.76rem; color: var(--chalk-3); line-height: 1.6; }
.pcard dd { font-weight: 800; font-size: 1.02rem; line-height: 1.5; }
.pcard dd small { font-weight: 500; color: var(--chalk-2); font-size: 0.76rem; }
.pcard button { margin-top: 12px; background: none; border: 0; color: var(--chalk-2); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 0; font-size: 0.86rem; }

.play-bar {
  position: absolute; inset-inline: calc(max(3vw, var(--gut-r)) + min(360px, 31vw) + 3vw) max(3vw, var(--gut)); bottom: 22px;
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; pointer-events: auto;
  background: var(--panel); border: 1px solid var(--hair); border-radius: 16px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.pbtn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--chalk); color: var(--night); display: grid; place-items: center; cursor: pointer; }
.pbtn:hover { background: var(--flood); }
.pbtn svg { width: 22px; height: 22px; fill: currentColor; }
.seek-wrap { position: relative; flex: 1; min-width: 60px; height: 30px; display: grid; align-items: center; direction: ltr; }
.seek-marks { position: absolute; inset: 0 8px; pointer-events: none; }
.seek-marks i { position: absolute; top: 2px; width: 3px; height: 9px; margin-left: -1.5px; border-radius: 2px; background: var(--flood); }
#seek { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0; cursor: pointer; }
#seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--hair-2); }
#seek::-moz-range-track { height: 4px; border-radius: 2px; background: var(--hair-2); }
#seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--chalk); margin-top: -6px; border: 0; }
#seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--chalk); border: 0; }
.time { font-size: 0.86rem; color: var(--chalk-2); white-space: nowrap; direction: ltr; }
#speed { background: transparent; border: 1px solid var(--hair-2); border-radius: 10px; padding: 6px 10px; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
#speed option { background: var(--night-2); color: var(--chalk); }
.legend {
  position: absolute; inset-inline-end: max(3vw, var(--gut)); top: calc(var(--nav-h) + 22px);
  display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.82rem; color: var(--chalk-2);
  background: rgba(4, 20, 13, 0.62); border-radius: 99px; padding: 4px 18px;
}
.legend li { display: inline-flex; align-items: center; white-space: nowrap; }

/* ---------- glossary */
.glossary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 46px; }
.term { padding: 14px 14px 20px; }
.term h3, .term p { padding-inline: 8px; }
.term h3 { margin-top: 12px; }
.term p { color: var(--chalk-2); font-size: 0.95rem; line-height: 1.9; }
.term .fine { margin-top: 6px; font-size: 0.8rem; color: var(--chalk-3); }
.mini { display: block; width: 100%; height: auto; aspect-ratio: 320 / 208; border-radius: 10px; background: #0e482a; }
.mini-touch { cursor: crosshair; touch-action: manipulation; }
.xg-out { color: var(--flood); font-weight: 800; white-space: nowrap; }

/* ---------- contact */
.road li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; }
.road li::before { content: ""; position: absolute; inset-inline-start: 13px; top: 30px; bottom: 0; width: 1.5px; background: var(--hair-2); }
.road li:last-child::before { display: none; }
.road li:last-child { padding-bottom: 0; }
.road li i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--flood); margin-top: 2px; background: var(--night); position: relative; z-index: 1; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 0.92rem; line-height: 1; padding-top: 2px; color: var(--flood); }
.road b { display: block; font-weight: 800; }
.road span { color: var(--chalk-2); font-size: 0.95rem; }
.perks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.perks li { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--hair-2); border-radius: 99px; padding: 3px 16px; font-size: 0.88rem; font-weight: 700; color: var(--chalk-2); background: rgba(4, 20, 13, 0.4); }
.perks li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flood); }
.offer { padding: 28px; --c: var(--flood); background-color: rgba(12, 48, 33, 0.78); }
.offer h3 { font-size: 1.3rem; margin-bottom: 8px; }
.offer > p { color: var(--chalk-2); }
.offer-ask { margin-top: 10px; color: var(--chalk) !important; font-weight: 700; }
.lead-form { margin-top: 14px; display: grid; gap: 12px; }
.lead-form[hidden], .lead-done[hidden], .contact[hidden] { display: none; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 0.86rem; font-weight: 700; color: var(--chalk-2); }
.field label small { font-weight: 500; color: var(--chalk-3); }
.field input, .field textarea {
  width: 100%; min-width: 0; background: rgba(4, 20, 13, 0.62); border: 1px solid var(--hair-2); border-radius: 12px;
  padding: 10px 14px; color: var(--chalk); font-size: 16px; line-height: 1.6; transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 84px; display: block; }
.field input:hover, .field textarea:hover { border-color: var(--chalk-2); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--flood); outline-offset: 1px; border-color: var(--flood); border-radius: 12px; }
.field [aria-invalid="true"] { border-color: var(--bad); }
.field .hint { font-size: 0.78rem; color: var(--chalk-3); line-height: 1.7; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* no off-screen offset: in a right-to-left page it would widen the page */
.lead-form .btn { justify-self: start; }
.lead-form .btn[disabled] { opacity: 0.6; cursor: progress; }
.lead-status { font-size: 0.88rem; color: var(--chalk-2); line-height: 1.8; }
.lead-status:empty { display: none; }
.lead-status.is-bad { color: var(--chalk); border-inline-start: 3px solid var(--bad); padding-inline-start: 12px; }
.lead-done { margin-top: 18px; border: 1.5px solid var(--good); border-radius: 14px; padding: 16px 18px; background: rgba(4, 20, 13, 0.5); }
.lead-done h4 { margin: 0 0 2px; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.lead-done h4::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--good) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.3l2.5 2.5 5-5.6' fill='none' stroke='%2304140d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.lead-done p { color: var(--chalk-2); }
.contact-alt { font-size: 0.84rem; color: var(--chalk-3); }
.contact { margin-top: 22px; display: grid; gap: 10px; }
.contact-missing { border: 1.5px dashed var(--warn); border-radius: 12px; padding: 12px 16px; color: var(--chalk); font-size: 0.92rem; }
.contact-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(4, 20, 13, 0.55); border-radius: 12px; padding: 9px 14px; }
.contact-row .k { color: var(--chalk-3); font-size: 0.82rem; min-width: 4.2em; }
.contact-row .v { font-weight: 700; direction: ltr; unicode-bidi: isolate; user-select: all; overflow-wrap: anywhere; min-width: 0; }
.contact-row .copy { margin-inline-start: auto; border: 1px solid var(--hair-2); background: none; border-radius: 99px; padding: 2px 14px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.contact-row .copy:hover { border-color: var(--chalk); }
.contact .btn { margin-top: 6px; }

/* ---------- footer */
.foot { background: rgba(4, 20, 13, 0.92); border-top: 1px solid var(--hair); padding-block: 40px calc(46px + env(safe-area-inset-bottom, 0px)); color: var(--chalk-3); font-size: 0.9rem; }
.foot-brand { font-weight: 900; font-size: 1.2rem; color: var(--chalk); display: flex; align-items: center; gap: 9px; }
.foot-brand svg { flex: none; }
.foot p { max-width: 60em; }
.foot-tag { color: var(--chalk-2); font-weight: 600; margin-bottom: 8px; }

/* ---------- floating bits */
.aircap {
  position: fixed; z-index: 20; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 12px); left: 50%; transform: translate(-50%, -8px);
  width: max-content; max-width: min(92vw, 640px); text-align: center;
  background: rgba(4, 20, 13, 0.86); border: 1px solid var(--flood); color: var(--chalk); border-radius: 99px; padding: 5px 20px;
  font-size: 0.86rem; font-weight: 600; line-height: 1.8; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s;
}
.aircap.is-on { opacity: 1; transform: translate(-50%, 0); }
.tip {
  position: fixed; z-index: 25; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity 0.15s;
  background: rgba(4, 20, 13, 0.92); border: 1px solid var(--hair-2); border-radius: 10px; padding: 4px 12px; font-size: 0.84rem; font-weight: 700; white-space: nowrap;
}
.tip.is-on { opacity: 1; }

/* ---------- without JavaScript the stories read as plain sections */
.no-js .story { height: auto; padding-block: 60px; }
.no-js .story-pin { position: static; height: auto; }
.no-js .story-card { position: static; transform: none; width: auto; margin-inline: var(--gut); }
.no-js .steps { display: block; }
.no-js .step { margin-bottom: 22px; }
.no-js .play, .no-js .story-dots, .no-js .story-real, .no-js [data-needs-real] { display: none; }

/* ---------- narrower screens */
@media (max-width: 1040px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-lead ul { grid-template-columns: 1fr; }
  .card-cta { grid-column: auto; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --nav-h: 56px; --gut: max(16px, env(safe-area-inset-left, 0px)); --gut-r: max(16px, env(safe-area-inset-right, 0px)); --edge: max(10px, env(safe-area-inset-left, 0px)); --edge-r: max(10px, env(safe-area-inset-right, 0px)); }
  body { font-size: 15.5px; }
  .brand { font-size: 1.15rem; }
  .hero { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 14px); background: linear-gradient(180deg, rgba(4, 20, 13, 0.86) 0%, rgba(4, 20, 13, 0.62) 34%, rgba(4, 20, 13, 0) 58%); }
  h1 { font-size: clamp(1.9rem, 9.8vw, 2.9rem); margin: 10px 0 8px; }
  .hero .lead { font-size: 0.95rem; line-height: 1.8; }
  .hero-copy::before { inset: -20px -16px -20px -16px; }
  .tag { font-size: 0.78rem; padding: 3px 12px; }
  .cta-row { margin-top: 14px; gap: 8px; flex-wrap: nowrap; }
  .cta-row .btn { min-height: 46px; padding-inline: 8px; font-size: 0.88rem; flex: 1 1 0; min-width: 0; }
  .hud { inset-inline: var(--gut-r) var(--gut); width: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 14px; }
  .hud-item { padding: 7px 8px; text-align: center; justify-items: center; }
  .hud-k { font-size: 0.66rem; white-space: normal; line-height: 1.5; }
  .hud-k .mark, .hud-x { display: none; }
  .hud-v { font-size: 1rem; }
  .hud-wide, .scroll-cue { display: none; }
  .tiles, .cards, .glossary { grid-template-columns: minmax(0, 1fr); }
  .card-lead { grid-column: auto; }
  .card-q { font-size: 1.14rem; }
  .card-lead .card-q { font-size: 1.3rem; }
  .timeline li { grid-template-columns: 58px minmax(0, 1fr); padding-inline-end: 0; padding-inline-start: 18px; }
  .story-card {
    inset-inline: var(--edge-r) var(--edge); top: auto; bottom: max(10px, env(safe-area-inset-bottom, 0px)); transform: none; width: auto;
    padding: 14px 16px 10px; border-radius: 16px; max-height: 47svh; overflow-y: auto;
  }
  .story-head .eyebrow { display: none; }
  .story-head h2 { font-size: 1rem; margin-bottom: 8px; color: var(--chalk-2); font-weight: 700; }
  .steps { padding-top: 10px; }
  .step h3 { font-size: 1.08rem; margin-bottom: 4px; }
  .step-n { width: 28px; height: 28px; font-size: 0.95rem; }
  .step p { font-size: 0.92rem; line-height: 1.8; }
  .live { margin-top: 10px; }
  .live div { padding: 5px 12px; }
  .live dd { font-size: 1.2rem; }
  .live-table { margin-top: 6px; font-size: 0.86rem; }
  .live-table th, .live-table td { padding: 4px 2px; }
  .report li { font-size: 0.86rem; margin-top: 6px; }
  .report li:nth-child(n+3) { display: none; }
  .wide-only, .real-meta, .credit { display: none; }
  .story-real .story-head h2 { display: none; }
  .story-real .steps { margin-top: 8px; padding-top: 8px; }
  .story-real .step h3 { font-size: 1.02rem; }
  .story-real .step p { font-size: 0.86rem; line-height: 1.75; }
  .seg-3 button { font-size: 0.78rem; padding: 4px 2px; }
  .seg-3 button small { font-size: 0.68rem; }
  .story-real .chips { margin-top: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .story-real .chips::-webkit-scrollbar { display: none; }
  .story-real .chips button { flex: none; }
  .rbar { margin-top: 6px; gap: 8px; }
  .story-real .step .rcap { font-size: 0.86rem; margin-top: 2px; }
  .hist-bars { height: 40px; }
  .scale { margin-top: 8px; }
  .report-real li { font-size: 0.84rem; }
  .measured dl { grid-template-columns: minmax(0, 1fr); }
  .story-dots { margin-top: 8px; }
  .play-side { inset-inline: var(--edge-r) var(--edge); top: auto; bottom: calc(64px + max(10px, env(safe-area-inset-bottom, 0px))); width: auto; max-height: 37svh; gap: 8px; }
  .play-head { display: none; }
  .play-panel { padding: 12px 14px; gap: 10px; border-radius: 14px; }
  .seg { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .seg button { font-size: 0.76rem; padding: 6px 2px; }
  .chips button { font-size: 0.78rem; padding: 3px 10px; }
  .pcard { min-height: 0; padding-top: 10px; }
  .play-bar { inset-inline: var(--edge-r) var(--edge); bottom: max(10px, env(safe-area-inset-bottom, 0px)); padding: 6px 10px; gap: 8px; border-radius: 14px; }
  .pbtn { width: 40px; height: 40px; }
  #speed { padding: 4px 6px; font-size: 0.78rem; }
  .time { font-size: 0.74rem; }
  .legend { top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 6px); inset-inline: var(--edge-r) var(--edge); justify-content: center; font-size: 0.72rem; gap: 2px 10px; padding: 2px 10px; }
  .legend li:last-child { display: none; }
  .table-wrap { padding-inline: 14px; }
  .aircap { font-size: 0.76rem; padding: 4px 14px; border-radius: 14px; width: auto; }
}

/* short screens: the real-data card drops its longer explanations before it has to scroll */
@media (max-height: 790px) and (min-width: 761px) {
  .story-real .wide-only, .real-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
