/* ==========================================================================
   weavernetwork.org.uk — site-specific styles
   Builds on /assets/weaver.css (shared tokens & components). Do not edit that file.
   ========================================================================== */

/* ---------- Small helpers ---------- */
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head h2 { margin-bottom: 0.4em; }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; margin: 0; }
.section-head.center { margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }
.kicker { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; font-weight: 500; max-width: 30ch; }
.time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.01em; }
.no-js .js-only { display: none !important; }
.js-fallback { display: none; }
.no-js .js-fallback { display: block; }

/* Thread underline: a little woven stripe under a key word */
.thread-u {
  background-image: linear-gradient(90deg, var(--leeds) 0 20%, var(--bradford) 20% 40%, var(--calderdale) 40% 60%, var(--kirklees) 60% 80%, var(--wakefield) 80% 100%);
  background-repeat: no-repeat; background-size: 100% 0.13em; background-position: 0 92%;
  padding-bottom: 0.04em;
}

/* ---------- Fact vs opinion tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 0.22rem 0.6rem 0.22rem 0.5rem; border-radius: 999px;
  border: 1px solid transparent; line-height: 1.3; vertical-align: middle; white-space: nowrap;
}
.tag svg { width: 0.95rem; height: 0.95rem; flex: none; }
.tag-fact { background: var(--brand-tint); color: var(--brand-text); }
.tag-view { background: var(--warn-tint); color: var(--warn); }
.tag-future { background: var(--bg-sunk); color: var(--ink-2); border-color: var(--line); }
.tag-illus { background: var(--bg-sunk); color: var(--ink-2); border: 1px dashed var(--line-strong); }

/* ---------- Hero (home) ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.7rem); max-width: 11ch; margin-bottom: 0.4em; line-height: 1.04; }
.key { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.75rem; font-size: 0.9rem; color: var(--ink-3); }
.key > span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero .lede { margin-bottom: 1.75rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-art { margin: 0; }
.hero-art figcaption { font-size: var(--step--1); color: var(--ink-3); margin-top: 0.5rem; text-align: center; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 560px; }
}

/* The woven-threads illustration */
.hero-weave { width: 100%; height: auto; display: block; overflow: visible; }
.hw-weft { fill: none; stroke-linecap: round; }
.hw-fray { fill: none; stroke-width: 5; stroke-linecap: round; opacity: 0.85; }
.hw-warp { fill: var(--brand); }
.hw-future { fill: none; stroke: var(--brand); stroke-width: 3; stroke-dasharray: 7 6; }
.hw-gap { stroke: var(--bg); stroke-width: 3; fill: none; }
.hw-mode { font: 700 13px var(--font-mono); fill: var(--ink-2); letter-spacing: 0.08em; }
.hw-label { font: 700 17px var(--font-body); fill: var(--ink); }
.hw-stop { fill: var(--bg-elev); stroke-width: 6; }
.hw-knots circle { fill: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  .hw-fray { animation: fray 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 100% 50%; }
  .hw-fray:nth-of-type(3n) { animation-delay: -1.7s; }
  .hw-fray:nth-of-type(3n+1) { animation-delay: -3.1s; }
  .hw-knots circle { animation: knot 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .hw-knots circle:nth-child(2) { animation-delay: -0.6s; }
  .hw-knots circle:nth-child(3) { animation-delay: -1.2s; }
  .hw-knots circle:nth-child(4) { animation-delay: -1.8s; }
}
@keyframes fray { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
@keyframes knot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }

/* ---------- Inner page hero ---------- */
.page-hero { padding-block: clamp(2.25rem, 5vw, 4.25rem) clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); position: relative; }
.page-hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.page-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem); max-width: 14ch; margin-bottom: 0.35em; }
.page-hero .eyebrow { color: var(--c, var(--brand-text)); }
.page-hero .lede { margin-bottom: 0; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: minmax(0, 1fr); } }
:root[data-theme="dark"] .page-hero .eyebrow, :root[data-theme="dark"] .pillar .p-num { filter: none; }

/* ---------- "Where we are" status track ---------- */
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; position: relative; }
.track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand) 0 var(--done, 22%), var(--line-strong) var(--done, 22%) 100%);
}
.track > li { position: relative; padding: 2.4rem 0.9rem 0 0; margin: 0; }
.track > li::before {
  content: ""; position: absolute; top: 4px; left: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--line-strong); box-sizing: border-box;
}
.track > li.done::before { background: var(--brand); border-color: var(--brand); }
.track > li.now::before { background: var(--kirklees); border-color: var(--bg); box-shadow: 0 0 0 4px var(--kirklees); }
.track > li.future::before { border-style: dashed; }
.track .when { font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem; color: var(--ink-3); display: block; letter-spacing: 0.01em; }
.track .what { font-weight: 700; line-height: 1.3; display: block; margin-top: 0.2rem; }
.track .note { font-size: var(--step--1); color: var(--ink-2); display: block; margin-top: 0.25rem; line-height: 1.4; }
.track .now .when { color: var(--ink); }
.track .now .what::after { content: "We are here"; display: inline-block; margin-left: 0.4rem; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--kirklees); color: #17201d; padding: 0.05rem 0.45rem; border-radius: 999px; vertical-align: 0.15em; }
@media (max-width: 960px) {
  .track { grid-template-columns: minmax(0, 1fr); }
  .track::before { left: 9px; right: auto; top: 6px; bottom: 6px; width: 4px; height: auto; background: linear-gradient(180deg, var(--brand) 0 var(--done-v, 26%), var(--line-strong) var(--done-v, 26%) 100%); }
  .track > li { padding: 0 0 1.4rem 2.6rem; }
  .track > li::before { top: 2px; }
}

/* ---------- Problem / argument blocks ---------- */
.knot-grid { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: knot; }
.knot { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.5rem; position: relative; box-shadow: var(--shadow); }
.knot h3 { font-size: var(--step-1); margin-bottom: 0.35em; }
.knot p { color: var(--ink-2); margin: 0; }
.knot .k-icon { width: 44px; height: 44px; margin-bottom: 0.9rem; color: var(--c, var(--bad)); }
.big-quote {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3rem); line-height: 1.12;
  letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 1rem; font-variation-settings: "SOFT" 100;
}
.big-quote .strike { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 0.08em; color: var(--ink-3); }

/* Split: announced vs our view */
.fv { display: grid; gap: clamp(1rem, 3vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.fv > div { border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); background: var(--bg-elev); }
.fv > div > .tag { margin-bottom: 0.9rem; }
.fv ul { margin: 0; padding-left: 1.1em; }
.fv li { color: var(--ink-2); }
.fv li strong { color: var(--ink); }
.fv .fv-view { border-style: dashed; border-color: var(--line-strong); background: transparent; }

/* ---------- Pillar cards (home) ---------- */
.pillars { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .pillars { grid-template-columns: minmax(0, 1fr); } }
.pillar {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: start;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: clamp(1.4rem, 3.5vw, 2.2rem); box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c, var(--brand)); }
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); border-color: var(--line-strong); }
.pillar:focus-within { box-shadow: var(--shadow-l); }
.pillar h3 { font-size: var(--step-3); margin: 0 0 0.3em; }
.pillar h3 a { color: var(--ink); text-decoration: none; }
.pillar h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pillar h3 a:focus-visible { outline: none; }
.pillar:has(a:focus-visible) { outline: 3px solid var(--kirklees); outline-offset: 3px; }
.pillar p { color: var(--ink-2); margin: 0 0 1rem; }
.pillar .p-icon { width: clamp(64px, 9vw, 92px); height: auto; color: var(--c, var(--brand)); }
.pillar .p-fact { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.25rem; }
.pillar .p-fact .stat { font-size: var(--step-3); color: var(--c, var(--brand-text)); }
.pillar .p-fact span:last-child { color: var(--ink-2); font-size: 0.95rem; }
.pillar .p-go { font-weight: 700; color: var(--brand-text); display: inline-flex; align-items: center; gap: 0.35rem; }
.pillar .p-go svg { width: 1.1em; height: 1.1em; transition: transform 0.2s; }
.pillar:hover .p-go svg { transform: translateX(4px); }
.pillar-wide { grid-column: 1 / -1; background: var(--brand-deep); border-color: transparent; color: #e7f3ee; }
.pillar-wide h3 a, .pillar-wide .p-go { color: #ffffff; }
.pillar-wide p, .pillar-wide .p-fact span:last-child { color: #cfe5dc; }
.pillar-wide .p-fact { border-color: rgb(255 255 255 / 0.18); }
.pillar-wide .p-fact .stat { color: #ffd277; }
.pillar-wide .p-icon { color: #ffd277; }
.pillar-wide::before { background: linear-gradient(90deg, var(--leeds) 0 20%, var(--bradford) 20% 40%, var(--calderdale) 40% 60%, var(--kirklees) 60% 80%, var(--wakefield) 80% 100%); }
:root[data-theme="dark"] .pillar-wide { background: #0d3a30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pillar-wide { background: #0d3a30; } }

/* ---------- Stat band ---------- */
.stat-band { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.stat-band > div { border-left: 4px solid var(--c, var(--brand)); padding: 0.2rem 0 0.2rem 1rem; }
.stat-band .stat { font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); color: var(--ink); white-space: nowrap; }
.stat-band .stat-label { margin-top: 0.4rem; font-size: 0.95rem; }

/* ---------- Two-minute teaser (home) ---------- */
.teaser { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
@media (max-width: 900px) { .teaser { grid-template-columns: minmax(0, 1fr); } }
.teaser-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1rem, 3vw, 1.75rem); box-shadow: var(--shadow-l); }
.mini-tl { width: 100%; height: auto; display: block; }
.mini-tl text { font-family: var(--font-body); fill: var(--ink-2); font-size: 13px; }
.mini-tl .t-mono { font-family: var(--font-mono); font-weight: 700; fill: var(--ink); font-size: 13px; }
.mini-tl .t-row { font-weight: 700; fill: var(--ink); font-size: 14px; letter-spacing: 0.04em; }
.mini-tl .axis { stroke: var(--line-strong); stroke-width: 2; }
.mini-tl .tick { stroke: var(--line-strong); stroke-width: 1; }
.mini-tl .ride { stroke: var(--brand); stroke-width: 6; stroke-linecap: round; fill: none; }
.mini-tl .walk { stroke: var(--ink-3); stroke-width: 2.5; stroke-dasharray: 3 5; stroke-linecap: round; fill: none; }
.mini-tl .wait { stroke: var(--bad); stroke-width: 6; stroke-linecap: round; opacity: 0.85; }
.mini-tl .wait-ok { stroke: var(--ok); }
.mini-tl .bus-gone { fill: var(--bg-sunk); stroke: var(--line-strong); stroke-width: 1.5; }
.mini-tl .bus-go { fill: var(--brand); }
.mini-tl .bus-txt { fill: var(--brand-ink); font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.mini-tl .bus-txt-gone { fill: var(--ink-3); font-family: var(--font-mono); font-weight: 700; font-size: 12px; text-decoration: line-through; }
.mini-tl .train { fill: var(--ink); }
.mini-tl .train-txt { fill: var(--bg); font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.mini-tl .bad-txt { fill: var(--bad); font-weight: 700; }
.mini-tl .ok-txt { fill: var(--ok); font-weight: 700; }
.mini-tl .divider { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }

/* ---------- Sister-site cards ---------- */
.sisters { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.sister {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 1rem; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.sister:hover { border-color: var(--brand); transform: translateY(-2px); }
.sister svg { width: 40px; height: 40px; color: var(--brand-text); grid-row: span 2; }
.sister strong { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.15; }
.sister span { color: var(--ink-2); font-size: 0.95rem; }

/* ---------- Next page link ---------- */
.next-page { padding-block: clamp(2.5rem, 6vw, 4rem); }
.next-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem 2rem; text-decoration: none;
  background: var(--brand); color: var(--brand-ink); border-radius: var(--radius-l); padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
  position: relative; overflow: hidden; transition: background 0.2s;
}
.next-link:hover { background: var(--brand-hover); }
.next-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(90deg, var(--leeds) 0 20%, var(--bradford) 20% 40%, var(--calderdale) 40% 60%, var(--kirklees) 60% 80%, var(--wakefield) 80% 100%); }
.next-link .nl-eyebrow { display: block; font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85; }
.next-link .nl-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.02em; margin-top: 0.3rem; }
.next-link .nl-sub { display: block; margin-top: 0.5rem; opacity: 0.9; max-width: 55ch; }
.next-link svg { width: clamp(48px, 7vw, 72px); height: auto; transition: transform 0.2s; }
.next-link:hover svg { transform: translateX(6px); }

/* ---------- Sources ---------- */
.sources { border-top: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3rem); }
.sources h2 { font-size: var(--step-2); }
.sources ol { columns: 2 22rem; column-gap: 2.5rem; font-size: 0.92rem; color: var(--ink-2); padding-left: 1.4em; margin: 0; }
.sources li { break-inside: avoid; margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.sources li + li { margin-top: 0; }
.sources .note { font-size: 0.92rem; color: var(--ink-3); max-width: 75ch; }

/* ---------- Buses: illustration ---------- */
.bus-art { margin: 0; }
.bus-art > svg { width: 100%; height: auto; display: block; }
.bus-art figcaption { font-size: var(--step--1); color: var(--ink-3); margin-top: 0.75rem; display: flex; gap: 0.5rem; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.bus-ground { stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.bus-shadow { fill: var(--ink); opacity: 0.12; }
@media (prefers-reduced-motion: no-preference) {
  .bus-art .speed-line { animation: whoosh 1.8s ease-in-out infinite; }
  .bus-art .speed-line:nth-of-type(2) { animation-delay: -0.6s; }
  .bus-art .speed-line:nth-of-type(3) { animation-delay: -1.2s; }
}
.speed-line { stroke: var(--ink-3); stroke-width: 3; stroke-linecap: round; opacity: 0.5; }
@keyframes whoosh { 0%, 100% { opacity: 0.15; transform: translateX(0); } 50% { opacity: 0.6; transform: translateX(-8px); } }

/* Who-decides table */
.decide { width: 100%; }
.decide th[scope="row"] { background: transparent; color: var(--ink); width: 26%; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.decide td { color: var(--ink-2); }
.decide thead th { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.decide thead th:last-child { background: var(--brand-tint); color: var(--brand-text); }
.decide td:last-child { background: color-mix(in srgb, var(--brand-tint) 45%, transparent); color: var(--ink); }
@media (max-width: 640px) {
  .decide thead { display: none; }
  .decide tr { display: block; border-bottom: 1px solid var(--line); padding: 0.75rem 0.8rem; }
  .decide tr:last-child { border-bottom: 0; }
  .decide th[scope="row"], .decide td { display: block; border: 0; padding: 0.15rem 0; width: auto; background: transparent; }
  .decide td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--ink-3); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; display: block; }
  .decide td:last-child { background: transparent; }
}

/* Phase map */
.phase { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; }
@media (max-width: 900px) { .phase { grid-template-columns: minmax(0, 1fr); } }
.phase-map { width: 100%; height: auto; display: block; }
.phase-map .d { stroke: var(--bg); stroke-width: 4; stroke-linejoin: round; transition: fill 0.4s ease; fill: var(--bg-sunk); }
.phase-map .d-out { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
.phase-map .d.on { fill: var(--brand); }
.phase-map .d.part { fill: url(#part-stripe); }
.phase-map .dn { font-family: var(--font-display); font-weight: 700; font-size: 20px; fill: var(--ink); transition: fill 0.4s; pointer-events: none; paint-order: stroke; stroke: var(--bg-sunk); stroke-width: 5px; stroke-linejoin: round; }
.phase-map .tn { font-family: var(--font-body); font-size: 13px; fill: var(--ink-2); transition: fill 0.4s; pointer-events: none; paint-order: stroke; stroke: var(--bg-sunk); stroke-width: 4px; stroke-linejoin: round; }
.phase-map .lbl-on .dn, .phase-map .lbl-on .tn { stroke: var(--brand); }
.phase-map .town { fill: var(--ink); transition: fill 0.4s; }
.phase-map .lbl-on .dn, .phase-map .lbl-on .tn { fill: #ffffff; }
.phase-map .lbl-on .town { fill: #ffffff; }
:root[data-theme="dark"] .phase-map .lbl-on .dn, :root[data-theme="dark"] .phase-map .lbl-on .tn, :root[data-theme="dark"] .phase-map .lbl-on .town { fill: #06231c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phase-map .lbl-on .dn, :root:not([data-theme="light"]) .phase-map .lbl-on .tn, :root:not([data-theme="light"]) .phase-map .lbl-on .town { fill: #06231c; } }
.phase-map .stripe-a { fill: var(--brand); }
.phase-map .stripe-b { fill: var(--bg-sunk); }
.phase-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }
.phase-btns button {
  font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; border-radius: 999px; padding: 0.55rem 1rem;
  border: 2px solid var(--line-strong); background: var(--bg-elev); color: var(--ink);
}
.phase-btns button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.phase-btns button:hover { border-color: var(--brand); }
.phase-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: var(--step--1); color: var(--ink-2); margin-top: 0.75rem; }
.phase-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.phase-legend i { width: 18px; height: 14px; border-radius: 3px; display: inline-block; background: var(--brand); }
.phase-legend i.lg-part { background: repeating-linear-gradient(45deg, var(--brand) 0 4px, var(--bg-sunk) 4px 8px); border: 1px solid var(--line-strong); }
.phase-legend i.lg-off { background: var(--bg-sunk); border: 1px dashed var(--line-strong); }
.phase-status { min-height: 3.2em; }
.phase .timeline { margin-top: 0.5rem; }
.timeline > li.is-active h3 { color: var(--brand-text); }

/* Feature list (the new buses) */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); list-style: none; padding: 0; margin: 0; }
.features li { margin: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0.25rem 1rem; align-items: start; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; }
.features svg { width: 48px; height: 48px; color: var(--brand-text); grid-row: span 2; }
.features strong { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.2; }
.features span { color: var(--ink-2); font-size: 0.97rem; }

/* Operator cards */
.op-card { display: grid; gap: 0.5rem; }
.op-card .op-area { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-3); font-weight: 700; }

/* Fare ladder */
.fares { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: stretch; }
.fare { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.fare .when { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; color: var(--ink-3); }
.fare .price { white-space: nowrap; font-family: var(--font-display); font-size: clamp(2.1rem, 1.6rem + 1.6vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.fare .price small { font-size: 0.4em; font-family: var(--font-body); letter-spacing: 0; color: var(--ink-2); font-weight: 400; }
.fare p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.fare.is-now { border: 2px solid var(--brand); }
.fare.is-maybe { border-style: dashed; background: transparent; }

/* ---------- Trains ---------- */
.rail-map-wrap { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(0.75rem, 2.5vw, 1.75rem); box-shadow: var(--shadow); }
.rail-map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rail-map { width: 100%; min-width: 640px; height: auto; display: block; }
.rail-map .ln { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.rail-map .ln-thin { stroke-width: 5; }
.rail-map .ln-ecml { stroke-width: 3; stroke-dasharray: 2 0; }
.rail-map .st { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 2.5; }
.rail-map .st-major { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 3.5; }
.rail-map .st-new { fill: var(--bg-elev); stroke: var(--kirklees); stroke-width: 3; stroke-dasharray: 3 2.5; }
.rail-map text { font-family: var(--font-body); font-size: 13px; fill: var(--ink-2); paint-order: stroke; stroke: var(--bg-elev); stroke-width: 4px; stroke-linejoin: round; }
.rail-map .t-major { font-weight: 700; font-size: 15px; fill: var(--ink); }
.rail-map .t-hub { font-family: var(--font-display); font-weight: 700; font-size: 22px; fill: var(--ink); }
.rail-map .t-beyond { font-size: 12px; fill: var(--ink-3); font-style: italic; }
.rail-map .t-new { fill: var(--warn); font-weight: 700; font-size: 12.5px; }
.rail-map .county { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.rail-map .county-lbl { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--ink-3); }
.rail-map .hub { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 4; }
.map-note { font-size: var(--step--1); color: var(--ink-3); margin: 0.75rem 0 0; }
.scroll-hint { display: none; font-size: var(--step--1); color: var(--ink-3); margin: 0 0 0.5rem; }
@media (max-width: 700px) { .scroll-hint { display: block; } }

.lines { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); list-style: none; padding: 0; margin: 0; }
.lines li { margin: 0; background: var(--bg-elev); border: 1px solid var(--line); border-left: 8px solid var(--c, var(--brand)); border-radius: var(--radius-s); padding: 0.95rem 1.1rem; }
.lines h3 { font-size: 1.15rem; margin: 0 0 0.25rem; }
.lines p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.lines .route { font-size: 0.95rem; color: var(--ink); margin: 0 0 0.35rem; }
.lines .op { font-size: 0.82rem; color: var(--ink-3); font-weight: 700; letter-spacing: 0.02em; }

.new-stations { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.ns { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow); }
.ns h3 { font-size: var(--step-2); margin-bottom: 0.2em; }
.ns dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 1rem; margin: 1rem 0 0; font-size: 0.95rem; }
.ns dt { font-weight: 700; color: var(--ink-3); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 0.15rem; }
.ns dd { margin: 0; color: var(--ink-2); }

/* Progress meter (TRU electrification) */
.meter { height: 14px; border-radius: 999px; background: var(--bg-sunk); border: 1px solid var(--line); overflow: hidden; margin: 0.5rem 0 0.4rem; }
.meter > span { display: block; height: 100%; width: var(--v, 25%); background: repeating-linear-gradient(135deg, var(--brand) 0 8px, color-mix(in srgb, var(--brand) 80%, #fff) 8px 16px); border-radius: inherit; }

/* ---------- Trams ---------- */
.tram-map-wrap { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(0.75rem, 2.5vw, 1.75rem); box-shadow: var(--shadow); position: relative; }
.tram-map { width: 100%; height: auto; display: block; }
.tram-map .corr { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0.22; }
.tram-map .tl { fill: none; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.tram-map .tl-dash { stroke-dasharray: 1 14; stroke-width: 8; }
.tram-map .stop { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 3; }
.tram-map .stop-hub { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 4; }
.tram-map text { font-family: var(--font-body); font-size: 15px; fill: var(--ink-2); paint-order: stroke; stroke: var(--bg-elev); stroke-width: 4px; stroke-linejoin: round; }
.tram-map .t-major { font-family: var(--font-display); font-weight: 700; font-size: 20px; fill: var(--ink); }
.tram-map .t-corr { font-size: 13px; font-style: italic; fill: var(--ink-3); }
.tram-map .t-line { font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.indicative {
  position: absolute; top: clamp(0.75rem, 2.5vw, 1.5rem); right: clamp(0.75rem, 2.5vw, 1.5rem);
  background: var(--warn-tint); color: var(--warn); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid currentColor;
}
.delay-bar { display: grid; gap: 0.6rem; margin-top: 1rem; }
.delay-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; align-items: center; font-size: 0.95rem; }
.delay-row .bar { height: 26px; border-radius: 6px; background: var(--bg-sunk); position: relative; overflow: hidden; border: 1px solid var(--line); }
.delay-row .bar > span { position: absolute; top: 0; bottom: 0; left: var(--from); width: var(--w); border-radius: 5px; background: var(--c, var(--brand)); }
.delay-row .bar > span.fuzzy { background: repeating-linear-gradient(135deg, var(--c, var(--brand)) 0 6px, transparent 6px 12px); border: 2px solid var(--c, var(--brand)); }
.delay-axis { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); }
.delay-axis div:last-child { display: flex; justify-content: space-between; }
@media (max-width: 560px) { .delay-row, .delay-axis { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; } .delay-axis div:first-child { display: none; } }

/* ---------- Joined-up: problem cards ---------- */
.problem-lede { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: end; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
@media (max-width: 900px) { .problem-lede { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Simulator ---------- */
.sim { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); overflow: hidden; }
.sim-head { padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) 0; }
.sim-head h3 { font-size: var(--step-2); margin-bottom: 0.25em; }
.sim-head p { color: var(--ink-2); margin: 0; max-width: 70ch; }
.sim-controls {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.75rem; align-items: end;
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem); border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) { .sim-controls { grid-template-columns: minmax(0, 1fr); align-items: stretch; } }
.ctl-label { display: block; font-weight: 700; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 0.45rem; letter-spacing: 0.02em; }
.seg { display: inline-flex; padding: 4px; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 999px; gap: 2px; margin: 0; min-inline-size: 0; }
.seg legend { padding: 0; float: left; width: 100%; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { cursor: pointer; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem; color: var(--ink-2); white-space: nowrap; transition: background 0.15s, color 0.15s; }
.seg input:checked + label { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow); }
.seg input[value="weaver"]:checked + label { background: var(--brand); color: var(--brand-ink); }
.seg input:focus-visible + label { outline: 3px solid var(--kirklees); outline-offset: 2px; }
fieldset.ctl { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.ctl legend { padding: 0; margin-bottom: 0.45rem; font-weight: 700; font-size: 0.85rem; color: var(--ink-2); }
.range-row { display: flex; align-items: center; gap: 0.9rem; }
.range-row output { font-family: var(--font-mono); font-weight: 700; min-width: 7.5ch; text-align: right; font-size: 1.05rem; white-space: nowrap; }
input[type="range"].late {
  -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"].late::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ok) 0%, var(--kirklees) 45%, var(--bad) 100%); }
input[type="range"].late::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ok) 0%, var(--kirklees) 45%, var(--bad) 100%); }
input[type="range"].late::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-elev); border: 3px solid var(--ink); margin-top: -9px; box-shadow: var(--shadow); }
input[type="range"].late::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-elev); border: 3px solid var(--ink); box-shadow: var(--shadow); }
input[type="range"].late:focus-visible { outline: none; }
input[type="range"].late:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--kirklees); outline-offset: 2px; }
input[type="range"].late:focus-visible::-moz-range-thumb { outline: 3px solid var(--kirklees); outline-offset: 2px; }
.check { display: inline-flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; font-weight: 700; font-size: 0.95rem; line-height: 1.3; max-width: 22rem; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); margin: 0; flex: none; }
.check small { display: block; font-weight: 400; color: var(--ink-3); }
.sim-stage { padding: 1rem clamp(0.5rem, 2vw, 1.25rem) 0.25rem; position: relative; }
.sim-clock { position: absolute; top: 0.9rem; right: clamp(1rem, 3vw, 2rem); font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; color: var(--ink-3); }
.sim-svg { width: 100%; height: auto; display: block; overflow: hidden; }
.sim-svg text { font-family: var(--font-body); fill: var(--ink-2); font-size: 13px; }
.sim-svg .s-mono { font-family: var(--font-mono); font-weight: 700; font-size: 12px; fill: var(--ink-2); }
.sim-svg .s-row { font-weight: 700; fill: var(--ink); font-size: 14px; }
.sim-svg .s-sub { fill: var(--ink-3); font-size: 12px; }
.sim-svg .grid-l { stroke: var(--line); stroke-width: 1; }
.sim-svg .grid-h { stroke: var(--line-strong); stroke-width: 1; }
.sim-svg .lane { fill: var(--bg-sunk); }
.sim-svg .p-ride { stroke: var(--brand); stroke-width: 6; fill: none; stroke-linecap: round; }
.sim-svg .p-walk { stroke: var(--ink-2); stroke-width: 3; fill: none; stroke-dasharray: 2 6; stroke-linecap: round; }
.sim-svg .p-wait { stroke: var(--wcol, var(--bad)); stroke-width: 10; fill: none; stroke-linecap: round; opacity: 0.9; }
.sim-svg .p-hold { stroke: var(--kirklees); stroke-width: 3; fill: none; stroke-dasharray: 4 4; }
.sim-svg .train-due { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 4 3; }
.sim-svg .train-body { fill: var(--ink); }
.sim-svg .train-win { fill: var(--bg-elev); }
.sim-svg .bus-body { fill: var(--brand); }
.sim-svg .bus-win { fill: var(--brand-tint); }
.sim-svg .bus-label { font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; fill: var(--ink); }
.sim-svg .bus.missed .bus-body { fill: var(--bg-sunk); stroke: var(--ink-3); stroke-width: 1.5; }
.sim-svg .bus.missed .bus-win { fill: var(--line); }
.sim-svg .bus.missed .bus-label { fill: var(--ink-3); text-decoration: line-through; }
.sim-svg .bus.caught .bus-ring { fill: none; stroke: var(--ok); stroke-width: 3; }
.sim-svg .bus .bus-ring { fill: none; stroke: none; }
.sim-svg .bus.ghost { opacity: 0.45; }
.sim-svg .bus.ghost .bus-body { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 4 3; }
.sim-svg .bus.gone { opacity: 0.25; transition: opacity 0.4s; }
.sim-svg .bus { transition: transform 0.45s cubic-bezier(.3,.7,.3,1), opacity 0.3s; }
.sim-svg .you { fill: var(--kirklees); stroke: var(--bg-elev); stroke-width: 3; }
.sim-svg .now-line { stroke: var(--ink); stroke-width: 2; }
.sim-svg .now-dot { fill: var(--ink); }
.sim-svg .callout-t { font-weight: 700; font-size: 12.5px; }
.sim-svg .c-bad { fill: var(--bad); }
.sim-svg .c-ok { fill: var(--ok); }
.sim-svg .c-warn { fill: var(--warn); }
.sim-svg .anim { transition: transform 0.45s cubic-bezier(.3,.7,.3,1); }
.sim-out { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) ; gap: 0; border-top: 1px solid var(--line); }
.sim-out > div { padding: 1rem clamp(1rem, 2.5vw, 1.5rem); border-right: 1px solid var(--line); }
.sim-out > div:last-child { border-right: 0; }
.sim-out dt { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.sim-out dd { margin: 0.2rem 0 0; font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); font-variant-numeric: tabular-nums; }
.sim-out dd small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.85rem; color: var(--ink-2); }
@media (max-width: 700px) { .sim-out { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sim-out > div:nth-child(2) { border-right: 0; } .sim-out > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.sim-verdict { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.1rem clamp(1.25rem, 3vw, 2rem); background: var(--vbg, var(--bg-sunk)); border-top: 1px solid var(--line); }
.sim-verdict .v-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--vcol, var(--ink-3)); color: var(--bg-elev); font-weight: 700; font-size: 1.3rem; }
.sim-verdict .v-icon svg { width: 22px; height: 22px; }
.sim-verdict p { margin: 0; }
.sim-verdict .v-title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.2; color: var(--ink); }
.sim-verdict .v-body { color: var(--ink-2); font-size: 0.97rem; margin-top: 0.2rem; }
.sim[data-grade="good"] .sim-verdict { --vbg: var(--ok-tint); --vcol: var(--ok); }
.sim[data-grade="meh"] .sim-verdict { --vbg: var(--warn-tint); --vcol: var(--warn); }
.sim[data-grade="bad"] .sim-verdict { --vbg: var(--bad-tint); --vcol: var(--bad); }
@media (max-width: 640px) { .sim-verdict { grid-template-columns: auto minmax(0, 1fr); } .sim-verdict .btn { grid-column: 1 / -1; } }
.sim-foot { padding: 0.9rem clamp(1.25rem, 3vw, 2rem) 1.1rem; font-size: var(--step--1); color: var(--ink-3); border-top: 1px solid var(--line); }
.sim-foot p { margin: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 clamp(1.25rem, 3vw, 2rem) 1.1rem; }
.presets button { font: inherit; font-size: 0.88rem; font-weight: 700; padding: 0.4rem 0.8rem; border-radius: 999px; background: transparent; color: var(--ink-2); border: 1px dashed var(--line-strong); cursor: pointer; }
.presets button:hover { color: var(--ink); border-style: solid; border-color: var(--brand); }
.presets span { font-size: 0.85rem; color: var(--ink-3); align-self: center; }

/* ---------- Pulse hub ---------- */
.pulse { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 900px) { .pulse { grid-template-columns: minmax(0, 1fr); } }
.pulse-fig { display: flex; flex-direction: column; margin: 0; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(0.75rem, 2vw, 1.25rem); box-shadow: var(--shadow); position: relative; }
.pulse-svg { width: 100%; height: auto; display: block; max-width: 520px; margin-inline: auto; }
.pulse-svg .spoke { stroke: color-mix(in srgb, var(--brand) 30%, var(--bg-elev)); stroke-width: 10; stroke-linecap: round; }
.pulse-svg .spoke-rail { stroke: var(--ink-3); stroke-width: 12; }
.pulse-svg .spoke-rail-sleeper { stroke: var(--bg-elev); stroke-width: 12; stroke-dasharray: 2 10; }
.pulse-svg .hub-ring { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 4; transition: stroke 0.3s, fill 0.3s; }
.pulse-svg .hub-glow { fill: var(--brand); opacity: 0; transition: opacity 0.35s; }
.pulse-svg.is-pulse .hub-glow { opacity: 0.16; }
.pulse-svg.is-pulse .hub-ring { stroke: var(--brand); }
.pulse-svg .clock { font-family: var(--font-mono); font-weight: 700; font-size: 28px; fill: var(--ink); }
.pulse-svg .clock-sub { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--ink-3); }
.pulse-svg .veh-bus { fill: var(--brand); }
.pulse-svg .veh-train { fill: var(--ink); }
.pulse-svg .veh-tram { fill: var(--leeds); }
.pulse-svg .end-lbl { font-family: var(--font-body); font-size: 16px; font-weight: 700; fill: var(--ink-2); letter-spacing: 0.06em; text-transform: uppercase; }
.pulse-svg .xfer { fill: var(--kirklees); opacity: 0; transition: opacity 0.3s; }
.pulse-svg.is-pulse .xfer { opacity: 1; }
.pulse-ctrl { margin: 0.25rem auto 0; display: flex; }
.pulse-steps { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.6rem; }
.pulse-steps li { margin: 0; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.6rem 0.9rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg-elev); transition: border-color 0.3s, background 0.3s; }
.pulse-steps li.on { border-color: var(--brand); background: var(--brand-tint); }
.pulse-steps .time { color: var(--ink); }

/* ---------- Principles ---------- */
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); counter-reset: pr; }
.principle { margin: 0; display: grid; grid-template-columns: clamp(3.2rem, 7vw, 5rem) minmax(0, 1fr); gap: 0 clamp(1rem, 3vw, 2rem); padding: clamp(1.25rem, 3vw, 2rem); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); counter-increment: pr; position: relative; }
.principle::before { content: counter(pr, decimal-leading-zero); font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); line-height: 0.9; color: var(--c, var(--brand-text)); letter-spacing: -0.04em; }
.principle h3 { font-size: var(--step-2); margin-bottom: 0.4em; }
.principle .pr-body > p { color: var(--ink-2); }
.principle .pr-cols { display: grid; gap: 1rem 1.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 0.75rem; }
.principle .pr-cols > div { font-size: 0.97rem; color: var(--ink-2); }
.principle .pr-cols > div > .tag { margin-bottom: 0.5rem; }
.principle .pr-cols p { margin: 0; }
@media (max-width: 560px) { .principle { grid-template-columns: minmax(0, 1fr); } .principle::before { margin-bottom: 0.5rem; } }

/* ---------- Journeys (illustrative) ---------- */
.journeys { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.journey { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2rem); }
.journey-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 0.25rem; }
.journey h3 { font-size: var(--step-2); margin: 0; }
.journey .j-why { color: var(--ink-2); margin: 0.4rem 0 1.25rem; max-width: 70ch; }
.jrow { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 5.5rem; gap: 0.75rem 1rem; align-items: center; margin-bottom: 0.65rem; }
.jrow .j-lbl { font-weight: 700; font-size: 0.95rem; }
.jrow .j-total { font-family: var(--font-mono); font-weight: 700; text-align: right; font-size: 1.05rem; }
.jbar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; background: var(--bg-sunk); border: 1px solid var(--line); }
.jbar > span { flex: var(--m) 0 0; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; white-space: nowrap; overflow: hidden; min-width: 0; border-right: 2px solid var(--bg-elev); }
.jbar > span:last-child { border-right: 0; }
.jbar .rail { background: var(--ink); color: var(--bg); }
.jbar .bus { background: var(--brand); color: var(--brand-ink); }
.jbar .tram { background: var(--leeds); color: #fff; }
.jbar .walk { background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 8px); color: var(--ink-2); }
.jbar .wait { background: repeating-linear-gradient(135deg, var(--bad-tint) 0 6px, color-mix(in srgb, var(--bad) 30%, var(--bg-elev)) 6px 12px); color: var(--bad); }
.jbar .wait-s { background: var(--ok-tint); color: var(--ok); }
.jrow.better .j-total { color: var(--ok); }
.jrow.worse .j-total { color: var(--bad); }
.j-notes { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 1rem; font-size: 0.95rem; color: var(--ink-2); }
.j-notes p { margin: 0; }
.j-notes strong { color: var(--ink); }
.j-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 1.25rem; }
.j-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.j-legend i { width: 22px; height: 12px; border-radius: 3px; display: inline-block; }
@media (max-width: 600px) {
  .jrow { grid-template-columns: minmax(0, 1fr) auto; }
  .jrow .jbar { grid-column: 1 / -1; grid-row: 2; }
  .jrow .j-total { grid-row: 1; grid-column: 2; }
}

/* Powers box */
.powers { display: grid; gap: clamp(1rem, 3vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.powers > div { padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev); }
.powers h3 { font-size: var(--step-1); }
.powers ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); }

/* Manifesto band */
.manifesto { background: var(--brand-deep); color: #e7f3ee; }
:root[data-theme="dark"] .manifesto { background: #0b2c25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .manifesto { background: #0b2c25; } }
.manifesto h2, .manifesto .big-quote { color: #ffffff; }
.manifesto .eyebrow { color: #ffd277; }
.manifesto p { color: #cfe5dc; }
.manifesto a { color: #ffffff; }
.manifesto .btn { background: #ffd277; color: #17201d; }
.manifesto .btn:hover { background: #ffe2a3; }
.manifesto .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.4); }
.manifesto .btn-ghost:hover { background: rgb(255 255 255 / 0.08); }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: grid; align-items: center; }
.lost .board { background: #111613; color: #ffb000; font-family: var(--font-mono); border-radius: var(--radius); padding: 1.25rem 1.5rem; max-width: 34rem; box-shadow: var(--shadow-l); border: 6px solid #2a322e; }
.lost .board div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0.75rem; padding: 0.3rem 0; border-bottom: 1px dashed rgb(255 176 0 / 0.25); font-size: clamp(0.85rem, 0.8rem + 0.4vw, 1.05rem); }
.lost .board div:last-child { border-bottom: 0; }
.lost .board .blink { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* Print */
@media print {
  .fanbar, .site-header, .site-footer, .next-page, .sim-controls, .presets, .pulse-ctrl { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Station clock (joined-up hero) ---------- */
.clock-art { width: 100%; height: auto; display: block; }
.ck-rim { fill: var(--ink); }
.ck-face { fill: var(--bg-elev); }
.ck-maj { stroke: var(--ink); stroke-width: 6; }
.ck-min { stroke: var(--ink-3); stroke-width: 2.5; }
.ck-hour { stroke: var(--ink); stroke-width: 11; stroke-linecap: round; }
.ck-minute { stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.ck-cap { fill: var(--ink); }
.ck-miss { fill: var(--bad); opacity: 0.35; }
.ck-ok { stroke: var(--ok); stroke-width: 10; fill: none; stroke-linecap: round; }
.ck-lbl { font: 700 17px var(--font-mono); fill: var(--ink-2); }
.ck-bad { fill: var(--bad); }
.ck-good { fill: var(--ok); }
.ck-lead { fill: none; stroke-width: 2; }
.ck-lead-bad { stroke: var(--bad); }
.ck-lead-ok { stroke: var(--ok); }

/* ---------- Extra rail line colours (site-only tokens) ---------- */
:root { --rl-teal: #13808f; --rl-olive: #6f7d1c; --rl-brown: #8a5a2b; --rl-slate: #4f6475; --rl-lner: #17201d; }
:root[data-theme="dark"] { --rl-teal: #4cc3d1; --rl-olive: #b3c24e; --rl-brown: #d39a62; --rl-slate: #9db3c4; --rl-lner: #ebe8e0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rl-teal: #4cc3d1; --rl-olive: #b3c24e; --rl-brown: #d39a62; --rl-slate: #9db3c4; --rl-lner: #ebe8e0; } }
.rail-map .ln-beyond { stroke-dasharray: 1 9; stroke-width: 5; }
.rail-map .ln-lner { fill: none; stroke: var(--rl-lner); stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.rail-map .t-lner { font-size: 12px; font-weight: 700; fill: var(--ink); }
.swatch { display: inline-block; width: 1.6em; height: 0.5em; border-radius: 999px; background: var(--c); vertical-align: 0.15em; margin-right: 0.35em; }

/* ---------- Platform screen mock-up ---------- */
.board {
  background: #0d1110; color: #ffb000; font-family: var(--font-mono); border-radius: var(--radius); padding: 1.1rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-l); border: 6px solid #2a322e; font-size: clamp(0.82rem, 0.76rem + 0.35vw, 1rem); line-height: 1.35;
}
.board .b-head { display: flex; justify-content: space-between; gap: 1rem; color: #ffd27a; font-weight: 700; border-bottom: 1px solid rgb(255 176 0 / 0.3); padding-bottom: 0.5rem; margin-bottom: 0.5rem; letter-spacing: 0.04em; }
.board .b-row { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: 0.75rem; padding: 0.28rem 0; }
.board .b-sub { color: #7fe0b9; font-weight: 700; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed rgb(127 224 185 / 0.35); letter-spacing: 0.04em; }
.board .b-bus { color: #7fe0b9; }
.board .b-ok { color: #7fe0b9; }

@media (prefers-reduced-motion: reduce) { .board .b-wait { animation: none; } }
.board-cap { font-size: var(--step--1); color: var(--ink-3); margin-top: 0.75rem; text-align: center; display: flex; gap: 0.5rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.sim-svg.is-compact .s-mono, .sim-svg.is-compact .bus-label { font-size: 13px; }
.sim-svg.is-compact .callout-t { font-size: 13px; }
.sim-svg.is-compact .s-row { font-size: 14px; }
@media (max-width: 640px) {
  .seg { display: flex; width: 100%; }
  .seg label { flex: 1 1 0; text-align: center; padding: 0.55rem 0.5rem; white-space: normal; line-height: 1.2; }
}
@media (max-width: 700px) {
  .rail-map { min-width: 780px; }
  .tram-map { min-width: 640px; }
  .tram-map-wrap .indicative { position: static; display: inline-block; margin-bottom: 0.5rem; }
}

/* ---------- Contrast fixes (AA) ---------- */
:root { --view-ink: #845400; }
:root[data-theme="dark"] { --view-ink: var(--warn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --view-ink: var(--warn); } }
.tag-view { color: var(--view-ink); }
.section-alt .muted, .section-alt .track .when, .section-alt .timeline .when, .section-alt .op-area,
.section-alt .note, .site-footer .disclaimer { color: var(--ink-2); }
.pillar .p-fact .stat { color: var(--stat-c, var(--c, var(--brand-text))); }
