/* Four skins. Weighbridge follows the viewer's light or dark theme; the
   colourful skins each commit to one look. Every colour is a token. */
:root {
  --ground: #eef0ea;
  --surface: #f8f9f5;
  --raised: #ffffff;
  --ink: #18231f;
  --muted: #55635b;
  --line: #c9d0c6;
  --accent: #e8a317;
  --accent-ink: #18231f;
  --accent-text: #8a5a00;
  --band: #18231f;
  --band-ink: #eef0ea;
  --c1: #e8a317;
  --c2: #3e8e41;
  --c3: #0f7b6c;
  --reuse: #0f7b6c;
  --recycle: #3e8e41;
  --recover: #c9741f;
  --dispose: #9b3d2e;
  --good: #2f7d3a;
  --bad: #a3392b;
  --map-bg: #0f1a17;
  --map-land: #1d2b26;
  --map-coast: #3b4d45;
  --map-grid: rgba(143, 161, 152, 0.08);
  --map-text: #dfe7e1;
  --map-muted: #8fa198;
  --map-site: #f2b33a;
  --m-reuse: #3fb8a5;
  --m-recycle: #6cc070;
  --m-recover: #eb9b4c;
  --m-dispose: #d9705f;
  --ticket: #fbfaf3;
  --ticket-ink: #1b1f1c;
  --shadow: #18231f;
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --display-case: uppercase;
  --display-weight: 900;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0e1512;
    --surface: #151f1b;
    --raised: #1b2722;
    --ink: #e5ebe6;
    --muted: #9aa79f;
    --line: #2c3a33;
    --accent: #f2b33a;
    --accent-ink: #13100a;
    --accent-text: #f2b33a;
    --band: #f2b33a;
    --band-ink: #13100a;
    --c1: #f2b33a;
    --c2: #6cc070;
    --c3: #3fb8a5;
    --reuse: #3fb8a5;
    --recycle: #6cc070;
    --recover: #eb9b4c;
    --dispose: #d9705f;
    --good: #6cc070;
    --bad: #e0705f;
    --shadow: #000000;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0e1512;
  --surface: #151f1b;
  --raised: #1b2722;
  --ink: #e5ebe6;
  --muted: #9aa79f;
  --line: #2c3a33;
  --accent: #f2b33a;
  --accent-ink: #13100a;
  --accent-text: #f2b33a;
  --band: #f2b33a;
  --band-ink: #13100a;
  --c1: #f2b33a;
  --c2: #6cc070;
  --c3: #3fb8a5;
  --reuse: #3fb8a5;
  --recycle: #6cc070;
  --recover: #eb9b4c;
  --dispose: #d9705f;
  --good: #6cc070;
  --bad: #e0705f;
  --shadow: #000000;
}

/* Hi-vis: safety orange, signal yellow and navy, as on a fleet's livery. */
:root[data-skin="hivis"] {
  color-scheme: light;
  --ground: #fff4dc;
  --surface: #fffaf0;
  --raised: #ffffff;
  --ink: #14213d;
  --muted: #4a5675;
  --line: #ecd9b0;
  --accent: #ff6b1a;
  --accent-ink: #ffffff;
  --accent-text: #c2410c;
  --band: #14213d;
  --band-ink: #ffd23f;
  --c1: #ff6b1a;
  --c2: #ffd23f;
  --c3: #1f8fff;
  --reuse: #0e9f8e;
  --recycle: #2fa84f;
  --recover: #ff8a00;
  --dispose: #d7263d;
  --good: #1f8a3c;
  --bad: #d7263d;
  --map-bg: #14213d;
  --map-land: #23335a;
  --map-coast: #3d5185;
  --map-grid: rgba(255, 210, 63, 0.07);
  --map-text: #fff4dc;
  --map-muted: #a9b5d6;
  --map-site: #ffd23f;
  --m-reuse: #3de0c9;
  --m-recycle: #7ef07e;
  --m-recover: #ff8a3d;
  --m-dispose: #ff5370;
  --shadow: #14213d;
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --display-case: uppercase;
  --display-weight: 900;
  --radius: 6px;
}

/* Riso: fluorescent pink, blue and yellow, as on a two-colour print run. */
:root[data-skin="riso"] {
  color-scheme: light;
  --ground: #f7f2e8;
  --surface: #fffcf5;
  --raised: #ffffff;
  --ink: #1f2a6b;
  --muted: #4f5888;
  --line: #e2d8c4;
  --accent: #ff48b0;
  --accent-ink: #ffffff;
  --accent-text: #d1157f;
  --band: #0078bf;
  --band-ink: #ffe800;
  --c1: #ff48b0;
  --c2: #0078bf;
  --c3: #ffe800;
  --reuse: #00a95c;
  --recycle: #0078bf;
  --recover: #ff7a3d;
  --dispose: #e8344e;
  --good: #00a95c;
  --bad: #e8344e;
  --map-bg: #fffcf5;
  --map-land: #d6e6f7;
  --map-coast: #0078bf;
  --map-grid: rgba(0, 120, 191, 0.1);
  --map-text: #1f2a6b;
  --map-muted: #4f5888;
  --map-site: #ff48b0;
  --m-reuse: #00a95c;
  --m-recycle: #0078bf;
  --m-recover: #ff7a3d;
  --m-dispose: #e8344e;
  --ticket: #fff7d6;
  --shadow: #ff48b0;
  --display: "Rubik", "Arial Rounded MT Bold", system-ui, sans-serif;
  --display-case: none;
  --display-weight: 800;
  --radius: 14px;
}

/* Circular: deep teal with lime and violet, for loops that close. */
:root[data-skin="circular"] {
  color-scheme: dark;
  --ground: #062b2c;
  --surface: #0b3a3b;
  --raised: #104647;
  --ink: #eafff7;
  --muted: #9fd1c4;
  --line: #1d5d5d;
  --accent: #c6f432;
  --accent-ink: #062b2c;
  --accent-text: #c6f432;
  --band: #8b6cff;
  --band-ink: #ffffff;
  --c1: #c6f432;
  --c2: #8b6cff;
  --c3: #39d0c3;
  --reuse: #39d0c3;
  --recycle: #c6f432;
  --recover: #ffb648;
  --dispose: #ff6b8b;
  --good: #c6f432;
  --bad: #ff6b8b;
  --map-bg: #04201f;
  --map-land: #0d3c3b;
  --map-coast: #2a7a74;
  --map-grid: rgba(198, 244, 50, 0.06);
  --map-text: #eafff7;
  --map-muted: #9fd1c4;
  --map-site: #c6f432;
  --m-reuse: #39d0c3;
  --m-recycle: #c6f432;
  --m-recover: #ffb648;
  --m-dispose: #ff6b8b;
  --shadow: #c6f432;
  --display: "Fraunces", Georgia, serif;
  --display-case: none;
  --display-weight: 700;
  --radius: 999px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  padding-inline: 20px;
  transition: background 250ms ease, color 250ms ease;
}
@media (prefers-reduced-motion: reduce) { body { transition: none; } }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.wrap { max-width: 1200px; margin-inline: auto; }
h1, h2, h3 {
  font-family: var(--display);
  text-wrap: balance;
  margin: 0;
  line-height: 1;
  font-weight: var(--display-weight);
}
h1 { text-transform: var(--display-case); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.45rem; }
:root[data-skin="hivis"] h1, :root[data-skin="hivis"] h2 { font-stretch: 125%; letter-spacing: -0.01em; }
:root[data-skin="hivis"] h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
p { margin: 0; }
.eyebrow {
  font: 600 0.78rem/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.num { font-variant-numeric: tabular-nums; }
.tag {
  display: inline-block;
  font: 600 0.66rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: min(var(--radius), 4px);
}
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border: 2px solid var(--ink);
  background: var(--accent); color: var(--accent-ink);
  font: 700 0.95rem/1 var(--body);
  text-decoration: none; cursor: pointer;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.button.ghost { background: transparent; color: var(--ink); box-shadow: none; }

/* Live banner */
.live {
  margin-inline: -20px;
  padding: 8px 20px;
  background: var(--band);
  color: var(--band-ink);
  font: 600 0.85rem/1.4 var(--body);
}
.live .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 560px) { .live { font-size: 0.78rem; } .live a { margin-left: 0; } }
.live b { font-family: var(--mono); letter-spacing: 0.1em; font-size: 0.72rem; }
.live i {
  width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block;
  animation: blink 1.6s ease-in-out infinite;
}
.live a { margin-left: auto; font-weight: 700; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } }

/* Top bar */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  margin-inline: -20px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 20px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark svg { width: 32px; height: 32px; flex: none; }
.mark b { font: var(--display-weight) 1.4rem/1 var(--display); text-transform: var(--display-case); letter-spacing: 0.01em; }
.mark small { font: 600 0.6rem/1 var(--mono); letter-spacing: 0.14em; color: var(--muted); display: block; margin-top: 4px; text-transform: uppercase; }
.bar nav { display: flex; gap: 4px; margin-left: auto; font-weight: 600; font-size: 0.93rem; align-items: center; }
.bar nav > a, .menu > button {
  text-decoration: none; color: var(--muted); padding: 8px 10px; border-radius: var(--radius);
  background: none; border: 0; font: inherit; cursor: pointer;
}
.bar nav > a:hover, .menu > button:hover, .bar nav > a[aria-current="page"], .menu.current > button { color: var(--ink); }
.bar nav > a[aria-current="page"], .menu.current > button { box-shadow: inset 0 -3px 0 var(--accent); }
.menu { position: relative; }
.menu-list {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: var(--surface); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--shadow);
  border-radius: min(var(--radius), 10px);
  padding: 8px; display: grid; gap: 2px; z-index: 30;
}
.menu-list a { display: grid; gap: 2px; padding: 10px 12px; text-decoration: none; border-radius: min(var(--radius), 8px); }
.menu-list a:hover { background: var(--raised); }
.menu-list a b { color: var(--ink); }
.menu-list a span { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.skin { position: relative; }
.skin > button {
  width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; cursor: pointer;
  background: conic-gradient(#e8a317 0 25%, #ff6b1a 0 50%, #ff48b0 0 75%, #c6f432 0);
}
.skin .menu-list { left: auto; right: 0; min-width: 230px; }
.skin .menu-list button {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: none; border: 0; padding: 9px 10px; font: 600 0.92rem var(--body); color: var(--ink); cursor: pointer;
  border-radius: min(var(--radius), 8px);
}
.skin .menu-list button:hover, .skin .menu-list button[aria-pressed="true"] { background: var(--raised); }
.skin .menu-list button span { color: var(--muted); font-weight: 400; font-size: 0.8rem; display: block; }
.swatch { display: flex; flex: none; }
.swatch i { width: 12px; height: 26px; display: block; }
.burger { display: none; background: none; border: 2px solid var(--ink); padding: 7px 10px; font: 700 0.85rem var(--body); color: var(--ink); cursor: pointer; border-radius: var(--radius); }
@media (max-width: 980px) {
  .burger { display: inline-block; margin-left: auto; }
  .bar nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 2px solid var(--ink); padding: 10px 20px 16px; }
  .bar nav.open { display: flex; }
  .menu-list { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .bar .wrap > .button { display: none; }
  .mark small { display: none; }
}

/* Pages */
main { min-height: 70vh; }
.page { padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 96px); display: grid; gap: clamp(48px, 7vw, 88px); }
.page[hidden] { display: none; }
.head { display: grid; gap: 14px; }
.crumb { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.crumb a { text-decoration: none; }

/* Home hero */
.hero { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); align-items: start; }
.hero .copy { display: grid; gap: 26px; }
.hero h1 { font-size: clamp(2.8rem, 8.6vw, 6.8rem); line-height: 0.9; max-width: 13ch; }
:root[data-skin="hivis"] .hero h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 0.95; }
:root[data-skin="riso"] .hero h1, :root[data-skin="circular"] .hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 0.98; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
:root[data-skin="riso"] .hero h1 em { color: var(--accent); text-shadow: 3px 3px 0 var(--c3); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.record {
  margin-top: 30px; transform: rotate(1.6deg);
  background: var(--ticket); color: var(--ticket-ink);
  font: 400 0.8rem/1.55 var(--mono); padding: 18px 20px 16px; position: relative;
  box-shadow: 8px 10px 0 var(--shadow);
}
.record::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
  background: radial-gradient(circle at 6px 8px, transparent 5px, var(--ticket) 5.5px) 0 0 / 12px 8px repeat-x;
}
.record header { display: flex; justify-content: space-between; font-weight: 600; border-bottom: 1px dashed #8c8c80; padding-bottom: 6px; margin-bottom: 8px; }
.record dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 14px; }
.record dt { color: #6b6b60; } .record dd { margin: 0; text-align: right; }
.record footer { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #8c8c80; color: #6b6b60; font-size: 0.72rem; line-height: 1.45; }
.record .stamp { position: absolute; right: 14px; bottom: 44px; transform: rotate(-12deg); border: 2px solid #2f7d3a; color: #2f7d3a; font: 800 0.95rem/1 var(--display); letter-spacing: 0.06em; padding: 4px 8px; text-transform: uppercase; opacity: 0.85; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 2px solid var(--ink); }
.facts div { padding: 16px 18px 6px 0; display: grid; gap: 4px; }
.facts strong { font: var(--display-weight) 2.1rem/1 var(--display); }
.facts span { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.facts a { font-size: 0.78rem; color: var(--muted); }

/* Role chooser: one tile per seat in the chain */
.chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.seat {
  display: grid; gap: 12px; align-content: start; padding: 24px; text-decoration: none;
  background: var(--surface); border: 2px solid var(--ink); border-radius: min(var(--radius), 18px);
  box-shadow: 5px 5px 0 var(--shadow); position: relative; overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.seat:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow); }
.seat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--seat, var(--c1)); }
.seat .when { font: 600 0.72rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.seat p { color: var(--muted); font-size: 0.95rem; }
.seat .go { font-weight: 700; color: var(--ink); }
.seat.c1 { --seat: var(--c1); } .seat.c2 { --seat: var(--c2); } .seat.c3 { --seat: var(--c3); } .seat.c4 { --seat: var(--accent); }
.chain-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 600 0.82rem/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase;
}
.chain-line span { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: min(var(--radius), 6px); background: var(--surface); }
.chain-line i { font-style: normal; color: var(--accent-text); }

/* Generic panels */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.box { border: 2px solid var(--ink); background: var(--surface); padding: 24px; border-radius: min(var(--radius), 18px); box-shadow: 5px 5px 0 var(--shadow); display: grid; gap: 14px; align-content: start; }
.ticks { margin: 0; padding-left: 1.1em; display: grid; gap: 9px; }
.ticks li::marker { color: var(--accent-text); }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.cols3 > div { display: grid; gap: 8px; align-content: start; }
.cols3 p { color: var(--muted); font-size: 0.95rem; }
.pipe { counter-reset: stage; }
.pipe > div { counter-increment: stage; }
.pipe > div::before { content: counter(stage, decimal-leading-zero); font: 900 3.2rem/0.8 var(--display); color: var(--line); }
code { font: 400 0.84em var(--mono); background: var(--raised); border: 1px solid var(--line); padding: 1px 5px; }

/* Integration status */
.status {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center;
  border: 2px dashed var(--accent-text); padding: 18px 20px; border-radius: min(var(--radius), 14px); background: var(--surface);
}
.status .pill {
  grid-row: span 2; font: 700 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 10px; background: var(--accent); color: var(--accent-ink); border-radius: min(var(--radius), 999px);
}
.status p { color: var(--muted); font-size: 0.92rem; }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 2px solid var(--ink); }
.step { padding: 18px 18px 18px 0; display: grid; gap: 8px; align-content: start; position: relative; }
.step::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; background: var(--ground); border: 2px solid var(--ink); border-radius: 50%; }
.step.done::before { background: var(--ink); }
.step.now::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
.step time { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.06em; color: var(--accent-text); text-transform: uppercase; }
.step b { font: var(--display-weight) 1.3rem/1.05 var(--display); }
.step p { font-size: 0.9rem; color: var(--muted); }
.step .flag { justify-self: start; font: 700 0.65rem/1 var(--mono); letter-spacing: 0.1em; padding: 4px 6px; background: var(--accent); color: var(--accent-ink); border-radius: min(var(--radius), 4px); }
.step.unknown time { color: var(--muted); }
.src { font-size: 0.8rem; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border: 2px solid var(--ink); background: var(--surface); border-radius: min(var(--radius), 14px); }
table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 0.93rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 0.7rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--raised); }
td.fig { font: var(--display-weight) 1.3rem/1.1 var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }
td a { font-size: 0.8rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* Scales */
.scales { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px; background: var(--ink); border: 2px solid var(--ink); border-radius: min(var(--radius), 14px); overflow: hidden; }
.scale { background: var(--surface); padding: 20px 18px; display: grid; gap: 6px; align-content: start; }
.scale b { font: var(--display-weight) 1.25rem/1 var(--display); text-transform: var(--display-case); }
.scale p { font-size: 0.88rem; color: var(--muted); }
.scale.live2 { background: var(--raised); }
.scale.live2 .tag { border-color: var(--accent); color: var(--accent-text); }
pre.agent { margin: 0; overflow-x: auto; background: var(--map-bg); color: var(--map-text); padding: 18px; font: 400 0.8rem/1.6 var(--mono); border: 2px solid var(--ink); border-radius: min(var(--radius), 14px); }
pre.agent .k { color: var(--map-site); } pre.agent .c { color: var(--map-muted); }

/* Demo */
.seats { display: flex; flex-wrap: wrap; gap: 8px; }
.seats button {
  font: 700 0.92rem var(--body); padding: 10px 16px; cursor: pointer; color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
}
.seats button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.demo {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow);
  border-radius: min(var(--radius), 18px);
  overflow: hidden;
}
@media (max-width: 980px) { .demo { grid-template-columns: 1fr; } }
.map-panel { position: relative; background: var(--map-bg); color: var(--map-text); min-height: 600px; }
.map-panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-head {
  position: absolute; top: 14px; left: 16px; right: 16px; z-index: 2;
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; pointer-events: none;
}
.map-head b { font: var(--display-weight) 1.2rem/1.05 var(--display); text-transform: var(--display-case); letter-spacing: 0.02em; }
.map-head small { display: block; color: var(--map-muted); font: 400 0.72rem/1.4 var(--mono); margin-top: 4px; max-width: 34ch; }
.legend { display: grid; gap: 4px; font: 400 0.72rem/1.2 var(--mono); color: var(--map-muted); text-align: right; }
.legend i { display: inline-block; width: 18px; height: 4px; margin-left: 6px; vertical-align: middle; border-radius: 2px; }
@media (max-width: 560px) { .map-head .legend { display: none; } .map-panel { min-height: 520px; } }
.tip {
  position: absolute; z-index: 3; pointer-events: none;
  background: var(--ticket); color: var(--ticket-ink);
  border: 1px solid #000; padding: 8px 10px; font: 400 0.75rem/1.4 var(--mono);
  max-width: 270px; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}
.tip b { font-family: var(--body); font-size: 0.85rem; display: block; }
.tickets {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  width: min(270px, calc(100% - 32px));
  display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none;
}
.ticket {
  background: var(--ticket); color: var(--ticket-ink);
  font: 400 0.7rem/1.45 var(--mono);
  padding: 10px 12px 9px; position: relative;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: print 420ms ease-out;
}
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: radial-gradient(circle at 5px 6px, transparent 4px, var(--ticket) 4.5px) 0 0 / 10px 6px repeat-x;
}
.ticket header { display: flex; justify-content: space-between; font-weight: 600; border-bottom: 1px dashed #8c8c80; padding-bottom: 4px; margin-bottom: 4px; }
.ticket dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 10px; }
.ticket dt { color: #6b6b60; }
.ticket dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.ticket .haz { color: #a3392b; font-weight: 600; }
.ticket:nth-child(2) { opacity: 0.6; }
.ticket:nth-child(n+3) { display: none; }
@keyframes print { from { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ticket { animation: none; } }
@media (max-width: 760px) { .tickets { display: none; } }

.controls { display: grid; align-content: start; border-left: 2px solid var(--ink); }
@media (max-width: 980px) { .controls { border-left: 0; border-top: 2px solid var(--ink); } }
.controls > * { padding: 18px 20px; }
.who { border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.who p { color: var(--muted); font-size: 0.9rem; }
.scen { display: grid; gap: 2px; border-bottom: 1px solid var(--line); }
.scen h3 { font-size: 1.1rem; margin-bottom: 8px; }
.toggle {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start;
  padding: 9px 8px; margin-inline: -8px; cursor: pointer; border-radius: min(var(--radius), 8px);
}
.toggle:hover { background: var(--raised); }
.toggle input { appearance: none; width: 38px; height: 22px; border: 2px solid var(--ink); border-radius: 22px; position: relative; margin: 2px 0 0; cursor: pointer; background: var(--surface); transition: background 150ms; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform 150ms; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle strong { font-size: 0.95rem; line-height: 1.3; }
.toggle small { grid-column: 2 / 4; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.toggle .delta { font: 600 0.78rem/1.3 var(--mono); white-space: nowrap; }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); }
.scen-actions { display: flex; gap: 14px; margin-top: 10px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); font: 600 0.85rem var(--body); text-decoration: underline; cursor: pointer; }
.readout { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.kpi { display: grid; gap: 2px; }
.kpi span { font: 600 0.68rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kpi strong { font: var(--display-weight) 1.8rem/1 var(--display); font-variant-numeric: tabular-nums; }
.kpi small { font: 600 0.74rem/1.25 var(--mono); }
.kpi small.good { color: var(--good); } .kpi small.bad { color: var(--bad); } .kpi small.flat { color: var(--muted); }
.kpi:first-child { grid-column: 1 / -1; }
.hier { display: flex; height: 14px; border: 1px solid var(--ink); overflow: hidden; border-radius: min(var(--radius), 7px); }
.hier i { display: block; height: 100%; transition: width 500ms ease; }
.hier-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 0.72rem/1.3 var(--mono); color: var(--muted); }
.hier-key b { display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: -1px; }
.note { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }

/* FAQ */
.faq { display: grid; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font: 800 1.4rem/1 var(--display); color: var(--accent-text); }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 72ch; }

/* Form */
form { display: grid; gap: 14px; border: 2px solid var(--ink); background: var(--surface); padding: 22px; box-shadow: 6px 6px 0 var(--shadow); border-radius: min(var(--radius), 18px); }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="number"], select, textarea {
  font: 400 1rem var(--body); color: var(--ink); background: var(--raised);
  border: 1.5px solid var(--line); padding: 10px 12px; border-radius: min(var(--radius), 8px); width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border: 1.5px solid var(--line); padding: 6px 10px; cursor: pointer; background: var(--raised); border-radius: min(var(--radius), 8px); }
.checks input { accent-color: var(--accent); }
.summary { display: grid; gap: 10px; }
.summary pre { white-space: pre-wrap; font: 400 0.82rem/1.5 var(--mono); background: var(--raised); border: 1px solid var(--line); padding: 12px; margin: 0; }

/* Next-step strip at the foot of each page */
.next { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 22px 24px; background: var(--band); color: var(--band-ink); border-radius: min(var(--radius), 18px); }
.next b { font: var(--display-weight) 1.5rem/1.1 var(--display); text-transform: var(--display-case); }
.next .button { box-shadow: none; border-color: var(--band-ink); }

footer { border-top: 2px solid var(--ink); padding-block: 36px 48px; display: grid; gap: 18px; color: var(--muted); font-size: 0.85rem; }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
footer ul { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
footer b { color: var(--ink); }

/* Connect: the reuse story and the three routes in */
.reuse { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; padding: 28px; background: var(--band); color: var(--band-ink); border-radius: min(var(--radius), 18px); }
@media (max-width: 860px) { .reuse { grid-template-columns: 1fr; } }
.reuse .eyebrow { color: var(--band-ink); opacity: 0.8; }
.reuse h3 { font-size: clamp(2rem, 4vw, 3rem); margin: 6px 0 12px; }
.reuse-copy p:last-child { max-width: 60ch; }
.reuse-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: flow; }
@media (max-width: 560px) { .reuse-flow { grid-template-columns: 1fr 1fr; } }
.reuse-flow li { counter-increment: flow; display: grid; gap: 4px; align-content: start; padding: 14px 12px; border: 2px solid currentColor; border-radius: min(var(--radius), 12px); position: relative; }
.reuse-flow li::before { content: counter(flow); font: var(--display-weight) 1.6rem/1 var(--display); }
.reuse-flow li:nth-child(3) { background: var(--band-ink); color: var(--band); }
.reuse-flow b { font-size: 0.95rem; }
.reuse-flow span { font-size: 0.8rem; opacity: 0.85; }
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.pill-status { justify-self: start; font: 700 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 9px; border: 2px solid var(--muted); color: var(--muted); border-radius: min(var(--radius), 999px); }
.pill-status.ok { border-color: var(--good); color: var(--good); }
.pill-status.prog { border-color: var(--accent-text); color: var(--accent-text); }

/* Circular: the value ladder and the calculator */
.ladder-wrap { display: grid; gap: 12px; }
.ladder svg { width: 100%; height: auto; display: block; overflow: visible; }
.ladder text { font: 600 13px var(--mono); fill: var(--ink); }
.ladder text.name { font: 600 14px var(--body); }
.ladder .axis { stroke: var(--ink); stroke-width: 2; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .calc { grid-template-columns: 1fr; } }
.calc-out { display: grid; gap: 6px; padding: 14px 16px; background: var(--raised); border: 1px solid var(--line); border-radius: min(var(--radius), 10px); }
.calc-out strong { font: var(--display-weight) 1.9rem/1 var(--display); }
.calc-out .good { color: var(--good); } .calc-out .bad { color: var(--bad); }
.calc-out span { color: var(--muted); font-size: 0.9rem; }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: start; }
.tier { display: grid; gap: 12px; padding: 24px; background: var(--surface); border: 2px solid var(--ink); border-radius: min(var(--radius), 18px); }
.tier.featured { box-shadow: 6px 6px 0 var(--shadow); background: var(--raised); }
.tier .tag { justify-self: start; }
.tier .price { font: var(--display-weight) 1.6rem/1 var(--display); color: var(--accent-text); }

/* Insights: trust signals */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px; background: var(--ink); border: 2px solid var(--ink); border-radius: min(var(--radius), 14px); overflow: hidden; }
.trust > div { background: var(--surface); padding: 18px; display: grid; gap: 6px; align-content: start; }
.trust b { font: var(--display-weight) 1.2rem/1.1 var(--display); }
.trust p { color: var(--muted); font-size: 0.9rem; }
td .pill-status { display: inline-block; white-space: nowrap; }

/* Connect: a record checked before submission */
.preflight-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .preflight-wrap { grid-template-columns: 1fr; } }
.record.preflight { margin-top: 10px; transform: rotate(-1.2deg); }
.record b.ok { color: #2f7d3a; } .record b.warn { color: #b06a00; } .record b.bad { color: #a3392b; }
.record footer b { display: inline-block; width: 1.1em; }

/* Chain of custody: permissions and what each party sees */
.chain-demo { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .chain-demo { grid-template-columns: 1fr; } }
.grants h3 small { font-family: var(--body); font-weight: 400; }
.grant { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-weight: 400; cursor: pointer; padding: 8px; margin-inline: -8px; border-radius: min(var(--radius), 8px); }
.grant:hover { background: var(--raised); }
.grant input { appearance: none; width: 38px; height: 22px; border: 2px solid var(--ink); border-radius: 22px; position: relative; margin: 2px 0 0; cursor: pointer; background: var(--surface); }
.grant input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform 150ms; }
.grant input:checked { background: var(--accent); } .grant input:checked::after { transform: translateX(16px); }
.grant span { font-size: 0.86rem; color: var(--muted); } .grant b { display: block; color: var(--ink); font-size: 0.92rem; }
.chain-loads { display: grid; gap: 10px; }
.load { display: grid; gap: 8px; padding: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: min(var(--radius), 10px); }
.load header { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.load header small { font: 600 0.72rem var(--mono); color: var(--muted); }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 560px) { .stages { grid-template-columns: 1fr; } }
.stage { padding: 8px 9px; border: 1.5px solid var(--line); border-radius: min(var(--radius), 8px); font-size: 0.8rem; display: grid; gap: 2px; align-content: start; }
.stage b { font: 600 0.68rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stage.seen { border-color: var(--good); }
.stage.hidden { border-style: dashed; color: var(--muted); }
.stage.invite { border-style: dashed; border-color: var(--accent-text); color: var(--accent-text); }
.match { font-size: 0.82rem; }
.match.ok { color: var(--good); } .match.off { color: var(--bad); }
.audit { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 0.85rem; max-height: 260px; overflow-y: auto; }
.audit li span { font: 600 0.72rem var(--mono); color: var(--muted); margin-right: 6px; }

/* The demo's plan board: a row per change, a column per year. */
.planboard { border: 2px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--shadow); border-radius: min(var(--radius), 18px); margin-bottom: 18px; padding: 16px 18px; display: grid; gap: 10px; }
.pb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pb-head h3 { font-size: 1.2rem; display: flex; gap: 8px; align-items: center; margin: 0 0 4px; }
.pb-head .note { margin: 0; max-width: 62ch; }
.pb-presets { display: flex; gap: 12px; flex-wrap: wrap; }
.stepno { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--ink); color: var(--surface); font: 700 0.8rem/1 var(--mono); }
.pb-grid { display: grid; gap: 4px; }
.pb-row { display: grid; grid-template-columns: minmax(200px, 2.2fr) repeat(5, minmax(46px, 1fr)) minmax(110px, auto); gap: 4px; align-items: stretch; }
.pb-row.head { font: 700 0.78rem/1 var(--mono); color: var(--muted); }
.pb-row.head .pb-yr { text-align: center; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: min(var(--radius), 6px); }
.pb-row.head .pb-yr.now { color: var(--ink); background: var(--raised); outline: 1.5px solid var(--ink); }
.pb-title { display: grid; gap: 1px; align-content: center; padding: 4px 2px; }
.pb-title strong { font-size: 0.92rem; line-height: 1.25; }
.pb-title small { color: var(--muted); font-size: 0.74rem; line-height: 1.3; }
.pb-cell { border: 1.5px dashed var(--line); background: transparent; cursor: pointer; border-radius: min(var(--radius), 6px); position: relative; min-height: 34px; color: var(--muted); font: 600 0.72rem/1 var(--mono); }
.pb-cell:hover { border-color: var(--ink); color: var(--ink); }
.pb-cell:hover::after { content: "start"; }
.pb-cell.on { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 35%, transparent); }
.pb-cell.on:hover::after { content: ""; }
.pb-cell.first { background: var(--accent); color: var(--accent-ink); }
.pb-cell.first::after { content: "starts"; }
.pb-cell.first:hover { filter: brightness(1.08); }
.pb-cell.full { opacity: 0.35; cursor: not-allowed; }
.pb-cell.full:hover { border-color: var(--line); }
.pb-cell.full:hover::after { content: "full"; }
.pb-cell.refused { animation: pb-refused 0.4s; border-color: var(--warn, #d1495b); }
@keyframes pb-refused { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .pb-cell.refused { animation: none; } }
.pb-title .pb-cost { color: var(--ink); opacity: 0.75; margin-top: 2px; font-family: var(--mono); font-size: 0.7rem; }
.pb-limits { margin-top: 4px; font-weight: 600; color: var(--ink); }
.pb-budget .pb-spent { font: 600 0.68rem/1.2 var(--mono); color: var(--muted); text-align: center; align-self: center; }
.pb-budget .pb-spent.full { color: var(--ink); }
.pb-cell.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.pb-alone { font: 600 0.78rem/1.2 var(--mono); text-align: right; align-self: center; white-space: nowrap; }
.pb-alone.good { color: var(--good); } .pb-alone.bad { color: var(--bad); }
.pb-play { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.pb-play .play { font: 700 1rem/1 var(--body); padding: 12px 16px; border: 2px solid var(--ink); background: var(--accent); color: var(--accent-ink, #fff); cursor: pointer; border-radius: min(var(--radius), 8px); display: inline-flex; gap: 8px; align-items: center; }
.pb-play .play .stepno { background: var(--accent-ink); color: var(--accent); }
.year-news { min-height: 2.6em; margin: 0; }
@media (max-width: 760px) {
  .pb-row { grid-template-columns: repeat(5, 1fr); }
  .pb-row .pb-title, .pb-row .pb-alone { grid-column: 1 / -1; text-align: left; }
  .pb-row.head > span:first-child, .pb-row.head > span:last-child { display: none; }
  .pb-play { grid-template-columns: 1fr; }
}
.year-badge { position: absolute; right: 18px; bottom: 14px; font: var(--display-weight) 3.4rem/1 var(--display); color: var(--map-text); opacity: 0.35; pointer-events: none; font-variant-numeric: tabular-nums; }
.cum { display: grid; grid-template-columns: 1fr; gap: 4px; }
.cum b { font: var(--display-weight) 1.6rem/1.1 var(--display); }
.cum b.good { color: var(--good); } .cum b.bad { color: var(--bad); }
.cum svg { width: 100%; height: auto; }
.cum .engine { font: 400 0.7rem/1.3 var(--mono); color: var(--muted); }

.rollout { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rollout .play { font: 700 0.9rem/1 var(--body); padding: 9px 12px; border: 2px solid var(--ink); background: var(--accent); color: var(--accent-ink, #fff); cursor: pointer; border-radius: min(var(--radius), 8px); justify-self: start; }
.rollout-bar { height: 12px; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.rollout-bar i { display: block; height: 100%; width: 0; background: var(--good); transition: width 600ms ease; }
.calc-diesel { display: grid; gap: 4px; margin-top: 10px; }
.calc-years { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; align-items: end; height: 110px; margin-top: 12px; }
.calc-years div { display: grid; align-content: end; gap: 3px; text-align: center; font: 600 0.7rem/1.2 var(--mono); height: 100%; }
.calc-years i { display: block; background: var(--good); border-radius: 3px 3px 0 0; transition: height 500ms ease; min-height: 2px; }
.calc-years i.bad { background: var(--bad); }

/* The map stays in view while the plan and figures scroll beside it. */
@media (min-width: 981px) {
  .demo .map-panel { position: sticky; top: 64px; align-self: start; height: min(calc(100vh - 80px), 860px); min-height: 560px; }
}

/* Chain of custody: what each company learns */
.insights { margin-top: 16px; }
.journey { width: 100%; height: auto; margin: 6px 0 4px; overflow: visible; }
.journey .road { stroke: var(--line); stroke-width: 10; stroke-linecap: round; fill: none; }
.journey .load { fill: var(--accent); }
.journey .site rect, .journey .site path, .journey .site circle { stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.journey .site text { fill: var(--ink); font: 700 13px var(--mono, ui-monospace); text-anchor: middle; }
.journey .site .sub { fill: var(--muted); font-weight: 500; font-size: 11px; }
.journey .flow { fill: none; stroke-width: 2.5; stroke-dasharray: 6 5; }
.journey .flow.on { stroke: var(--accent); }
.journey .flow.off { stroke: var(--line); opacity: 0.6; }
.journey .flowlabel { font: 600 11px var(--mono, ui-monospace); text-anchor: middle; }
.journey .flowlabel.on { fill: var(--accent); }
.journey .flowlabel.off { fill: var(--muted); }
.journey .site.away { opacity: 0.35; }
.insight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .insight-grid { grid-template-columns: 1fr; } }
.insight { border: 1px solid var(--line); border-radius: min(var(--radius), 10px); padding: 12px; background: var(--raised, transparent); }
.insight h4 { margin: 0; font-size: 1rem; }
.insight h4 small { display: block; font: 600 0.7rem var(--mono, ui-monospace); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.insight .alone { margin: 8px 0; font-size: 0.85rem; color: var(--muted); }
.insight ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.insight li { font-size: 0.86rem; line-height: 1.35; padding-left: 22px; position: relative; }
.insight li b { display: block; }
.insight li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #fff); font: 700 10px/16px system-ui; text-align: center; }
.insight li.off { opacity: 0.45; }
.insight li.off::before { content: "–"; background: var(--line); color: var(--ink); }
.insight li .needs { display: block; font: 600 0.72rem var(--mono, ui-monospace); color: var(--muted); margin-top: 2px; }

.chain-views { margin: 4px 0 6px; }
.chain-map { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 12px; }
.chain-map[hidden] { display: none; }
@media (max-width: 760px) { .chain-map { grid-template-columns: 1fr; } }
#chain-map { width: 100%; height: auto; max-height: 520px; }
#chain-map .place text .sub { font-weight: 500; font-size: 10.5px; }
#chain-map .land { fill: var(--raised, #eee); stroke: var(--line); stroke-width: 1; }
#chain-map .place circle, #chain-map .place rect { stroke: var(--ink); stroke-width: 2; }
#chain-map .place.src circle { fill: var(--panel, #fff); }
#chain-map .place.dst rect { fill: var(--ink); }
#chain-map .place text { fill: var(--ink); font: 700 12px var(--mono, ui-monospace); paint-order: stroke; stroke: var(--bg, #fff); stroke-width: 4px; }
#chain-map .place.off { opacity: 0.4; }
.leg { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.leg.seen { stroke: var(--accent); }
.leg.unseen { stroke: var(--muted); stroke-dasharray: 5 6; opacity: 0.55; stroke-width: 2.5; }
.end { stroke: var(--ink); stroke-width: 1.5; }
.end.seen { fill: var(--accent); }
.end.unseen { fill: var(--panel, #fff); }
#chain-map .mover { fill: var(--ink); }
.chain-map-key ul { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 0.86rem; }
.chain-map-key li svg { width: 40px; height: 10px; vertical-align: middle; margin-right: 6px; }

/* Where Northfold's waste goes */
.fates { margin-top: 16px; }
.fates-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.fates-head > div:first-child { max-width: 70ch; }
.fate-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.fate-summary .stat { border: 1px solid var(--line); border-radius: min(var(--radius), 10px); padding: 8px 10px; }
.fate-summary .stat b { display: block; font-size: 1.35rem; letter-spacing: -0.02em; }
.fate-summary .stat span { font-size: 0.8rem; color: var(--muted); }
.fate-summary .stat i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.sankey { width: 100%; height: auto; }
.sankey .band { opacity: 0.55; }
.sankey .band.estimate { opacity: 0.16; }
.sankey .band:hover { opacity: 0.85; }
.sankey .node { fill: var(--ink); }
.sankey text { fill: var(--ink); font: 600 12px var(--sans, system-ui); paint-order: stroke; stroke: var(--panel, var(--bg, #fff)); stroke-width: 4px; stroke-linejoin: round; }
.sankey text .t { fill: var(--muted); font-weight: 500; }
.sankey .colhead { font: 700 11px var(--mono, ui-monospace); fill: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 700px) { .sankey text { font-size: 15px; } }

.fate-bars { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.fate-bars h4 { margin: 0 0 8px; font-size: 0.95rem; }
.fbar { display: grid; grid-template-columns: 9.5em 1fr 4em; gap: 2px 8px; align-items: center; font-size: 0.82rem; margin-bottom: 8px; }
.fbar .why { grid-column: 2 / -1; color: var(--muted); font-size: 0.72rem; line-height: 1.3; }
.fbar .name { font-weight: 600; }
.fbar .t { text-align: right; color: var(--muted); font-family: var(--mono, ui-monospace); font-size: 0.75rem; }
.fbar .track { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--line); }
.fbar .seg { height: 100%; }
.fbar .seg.estimate { opacity: 0.4; }
.fbar .seg + .seg { box-shadow: inset 1px 0 0 var(--panel, #fff); }
.fate-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.76rem; color: var(--muted); margin: 6px 0 2px; }
.fate-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
