/* ============================================================
   GOV.UK — The Government Motorway
   Motorway-signage modernism: gantry signs, exit numbering,
   hazard stripes, lane markings, split-flap mechanics.
   Palette: motorway blue, sign white, road-marking yellow,
   asphalt near-black. Type: AG Transport Heavy (real UK road
   sign letterforms) + Inter Variable for longform.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "AG Transport";
  src: url("fonts/AG-Transport-Heavy.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --blue: #00408b;          /* motorway sign blue */
  --blue-hi: #0a55b3;       /* lit blue */
  --blue-lo: #003068;       /* shadowed blue */
  --white: #ffffff;         /* sign white */
  --yellow: #ffd400;        /* road-marking yellow */
  --amber: #ffb000;         /* matrix amber */
  --asphalt: #101418;       /* the road */
  --asphalt-2: #171d24;     /* worn asphalt */
  --steel: #8d97a3;         /* gantry steel */
  --ink: #0c1116;           /* near-black text on light */
  --sign-radius: 6px;
  --transport: "AG Transport", "Inter", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--asphalt) 18px 36px);
  --hazard-anim: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--asphalt) 18px 36px, var(--yellow) 36px 54px, var(--asphalt) 54px 72px, var(--yellow) 72px 90px, var(--asphalt) 90px 108px);
  --lane-line: repeating-linear-gradient(to right, var(--white) 0 44px, transparent 44px 84px);
  --flap-bg: #0b0e12;
  --flap-face: #1b2129;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--yellow); color: var(--asphalt); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: 300;
  background: var(--yellow); color: var(--asphalt);
  font-family: var(--transport); font-size: 15px;
  padding: 12px 18px; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   SHARED SIGN LANGUAGE
   ============================================================ */
.sign {
  background: var(--blue);
  color: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--sign-radius);
  box-shadow: 0 8px 0 var(--blue-lo), 0 18px 40px rgb(0 0 0 / .45);
}
.sign--yellow {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 8px 0 #b39000, 0 18px 40px rgb(0 0 0 / .45);
}

.section-sign {
  max-width: 1060px;
  margin: 0 auto 34px;
  padding: 26px 34px;
}
.sign-heading {
  font-family: var(--transport);
  font-size: clamp(26px, 4.6vw, 52px);
  line-height: 1.02;
  letter-spacing: .01em;
  margin: 0;
}
.sign-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  margin: 10px 0 0;
  max-width: 62ch;
}
.sign--yellow .sign-sub strong { color: inherit; }

/* hazard stripe divider between sections */
section { position: relative; overflow-x: clip; scroll-margin-top: 120px; }
footer.end { overflow-x: clip; }
section::after {
  content: "";
  display: block;
  height: 10px;
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--lane-line);
  background-position: center;
  opacity: .28;
}
section:last-of-type::after { display: none; }

section { padding: clamp(48px, 8vw, 110px) clamp(16px, 4vw, 48px) 0; }

/* scroll-in: signs sweep past like gantries */
@media (prefers-reduced-motion: no-preference) {
  body.js .reveal {
    opacity: 0;
    transform: translateX(var(--sweep, 60px));
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  }
  body.js .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   GANTRY MASTHEAD
   ============================================================ */
.gantry {
  position: sticky; top: 0; z-index: 200;
  background: var(--asphalt);
}
.gantry-beam {
  display: flex; align-items: stretch; gap: 10px;
  padding: 10px clamp(12px, 3vw, 28px);
  border-bottom: 1px solid rgb(255 255 255 / .14);
}
.route-badge {
  display: flex; align-items: center; gap: 0;
  text-decoration: none; color: var(--white);
  font-family: var(--transport);
  font-size: clamp(18px, 2.2vw, 24px);
  background: var(--blue);
  border: 2px solid var(--white);
  border-radius: 4px;
  padding: 6px 12px;
}
.route-m { color: var(--white); }
.route-num { color: var(--yellow); margin-left: 4px; }
.route-badge:hover { background: var(--blue-hi); }

.brand-sign {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--white);
  font-family: var(--transport);
  font-size: clamp(18px, 2.2vw, 24px);
  padding: 6px 4px;
  letter-spacing: .02em;
}
.brand-crown svg { width: 26px; height: 20px; display: block; color: var(--white); }

/* split-flap clock */
.flap-clock {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
}
.flap-clock-digits {
  display: flex; gap: 3px;
}
.flap {
  position: relative;
  display: inline-grid; place-items: center;
  min-width: 1.05ch;
  padding: 2px 4px;
  background: var(--flap-face);
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 3px;
  font-family: var(--transport);
  font-size: clamp(14px, 1.8vw, 19px);
  color: var(--white);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.flap::after { /* the hinge line */
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: rgb(0 0 0 / .65);
}
@media (prefers-reduced-motion: no-preference) {
  .flap.flapping { animation: flap-flip .09s linear infinite; }
  @keyframes flap-flip {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(.12); }
    100% { transform: scaleY(1); }
  }
}
.flap-clock-date {
  font-size: 12.5px; color: var(--steel);
  max-width: 150px; line-height: 1.25;
}

/* nav */
.gantry-nav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.gantry-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 4px;
  font-family: var(--transport);
  font-size: 14px;
  text-decoration: none;
  padding: 8px 12px;
  white-space: nowrap;
}
.gantry-nav a .nav-arrow { transition: transform .25s var(--ease-out); }
.gantry-nav a:hover, .gantry-nav a:focus-visible { background: var(--blue-hi); }
.gantry-nav a:hover .nav-arrow { transform: translateX(5px); }
.gantry-nav a.nav-search { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.gantry-nav a.nav-search kbd {
  font-family: var(--transport);
  border: 1.5px solid var(--ink); border-radius: 3px;
  padding: 0 5px; font-size: 12px;
}
@media (max-width: 1440px) {
  .flap-clock-date { display: none; }
  .gantry-nav a { font-size: 13px; padding: 8px 10px; }
}
.nav-toggle {
  display: none;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px;
  font-family: var(--transport); font-size: 15px;
  padding: 8px 14px; cursor: pointer;
}
.gantry-stripe { height: 8px; background: var(--hazard); }
@media (prefers-reduced-motion: no-preference) {
  .gantry-stripe { animation: hazard-run 2.4s linear infinite; background: var(--hazard-anim); }
  @keyframes hazard-run { to { background-position: 101.8px 0; } }
}

/* ============================================================
   HERO GANTRY
   ============================================================ */
.hero {
  padding-top: clamp(24px, 4vw, 56px);
  text-align: center;
}
.hero-posts {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; justify-content: space-between;
  padding: 0 clamp(6px, 6vw, 90px);
  pointer-events: none; z-index: -1;
}
.hero-posts span {
  width: clamp(14px, 2.4vw, 30px);
  background: linear-gradient(to right, #2a3138, #4a545f 45%, #22282e);
  border-inline: 1px solid rgb(255 255 255 / .08);
}
.hero-sign {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(26px, 4.5vw, 60px) clamp(20px, 4vw, 56px);
}
.sign-topline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--transport);
  font-size: clamp(14px, 1.8vw, 20px);
  margin: 0 0 clamp(18px, 3vw, 34px);
  color: var(--white);
}
.junc-badge {
  background: var(--white); color: var(--blue);
  border-radius: 4px; padding: 3px 10px;
  font-size: clamp(15px, 2vw, 22px);
}
.sign-topline-right { margin-left: auto; opacity: .82; font-family: var(--body); font-size: clamp(12.5px, 1.5vw, 15px); }
.hero-title {
  font-family: var(--transport);
  font-size: clamp(46px, 9.4vw, 132px);
  line-height: .98;
  letter-spacing: -.005em;
  margin: 0;
  text-align: left;
}
.hero-line { display: block; }
.hero-arrow {
  display: inline-block;
  color: var(--yellow);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-arrow { animation: arrow-sweep 2.6s var(--ease-out) infinite; }
  @keyframes arrow-sweep {
    0%, 55%, 100% { transform: translateX(0); }
    70% { transform: translateX(clamp(10px, 2.4vw, 34px)); }
  }
}
.hero-sub {
  font-family: var(--transport);
  font-size: clamp(17px, 2.6vw, 28px);
  text-align: left;
  margin: clamp(16px, 2.6vw, 30px) 0 0;
}
.hero-sub strong { color: var(--yellow); }
.hero-lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: clamp(22px, 3.6vw, 42px);
}
.lane {
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  background: var(--blue-lo);
  border: 2px solid var(--white);
  border-radius: 4px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--transport);
  font-size: clamp(14px, 1.7vw, 19px);
  padding: 14px 16px;
  transition: background .2s, transform .2s var(--ease-out);
}
.lane-arrow { color: var(--yellow); font-size: 1.25em; transition: transform .25s var(--ease-out); }
.lane-note {
  font-family: var(--body); font-size: 12.5px; opacity: .75; font-weight: 400;
}
.lane:hover, .lane:focus-visible { background: var(--blue-hi); transform: translateY(-3px); }
.lane:hover .lane-arrow { transform: translateX(6px); }
.lane:first-child:hover .lane-arrow { transform: translateY(-4px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1240px;
  margin: clamp(22px, 3.4vw, 40px) auto 0;
  background: rgb(255 255 255 / .2);
  border: 1px solid rgb(255 255 255 / .2);
}
.stat {
  background: var(--asphalt-2);
  padding: clamp(14px, 2.4vw, 26px) 10px;
}
.stat-num {
  display: block;
  font-family: var(--transport);
  font-size: clamp(30px, 5vw, 58px);
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-label {
  display: block; margin-top: 6px;
  font-size: clamp(11.5px, 1.4vw, 14px);
  color: var(--steel);
  letter-spacing: .06em; text-transform: uppercase;
}

/* ============================================================
   SEARCH GANTRY
   ============================================================ */
.search-gantry { padding-top: 0; }
.search-sign {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 50px) clamp(20px, 4vw, 50px);
}
.sign-chevrons { color: var(--yellow); letter-spacing: -.08em; }
.inline-query {
  background: none; border: none; padding: 0;
  color: var(--yellow); font: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.inline-query:hover { color: var(--white); }
.search-rig {
  display: flex; align-items: stretch; gap: 0;
  margin-top: clamp(18px, 2.8vw, 30px);
  background: var(--white);
  border-radius: 4px;
  border: 3px solid var(--white);
  overflow: hidden;
}
.search-arrow {
  display: grid; place-items: center;
  padding: 0 16px;
  color: var(--blue);
  font-family: var(--transport);
  font-size: clamp(22px, 3vw, 34px);
  background: var(--white);
}
.search-input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  font-family: var(--transport);
  font-size: clamp(18px, 2.6vw, 30px);
  color: var(--ink);
  padding: clamp(12px, 1.8vw, 20px) 6px;
  background: var(--white);
}
.search-input::placeholder { color: #6b7683; }
.search-input:focus-visible { outline-offset: -3px; }
.search-go {
  border: none; cursor: pointer;
  background: var(--ink); color: var(--yellow);
  font-family: var(--transport);
  font-size: clamp(18px, 2.4vw, 28px);
  padding: 0 clamp(20px, 3.4vw, 44px);
  transition: background .15s;
}
.search-go:hover, .search-go:focus-visible { background: #000; color: var(--white); }

.search-results {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.sr-item {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  background: var(--blue-lo);
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 4px;
  font-family: var(--transport);
  padding: 12px 16px;
  cursor: pointer;
  transition: background .15s, transform .2s var(--ease-out);
}
.sr-item::after {
  content: "→";
  margin-left: auto;
  color: var(--yellow);
  font-size: 1.4em;
  transition: transform .2s var(--ease-out);
}
.sr-item:hover, .sr-item[aria-selected="true"] { background: var(--blue-hi); transform: translateX(4px); }
.sr-item:hover::after, .sr-item[aria-selected="true"]::after { transform: translateX(5px); }
.sr-kind {
  background: var(--yellow); color: var(--ink);
  font-size: 11.5px; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 3px;
  flex-shrink: 0;
}
.sr-title { font-size: clamp(16px, 2vw, 21px); }
.sr-title mark { background: var(--yellow); color: var(--ink); padding: 0 2px; border-radius: 2px; }
.sr-meta { font-family: var(--body); font-size: 12.5px; opacity: .75; }
.sr-empty {
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px;
  padding: 18px 20px;
  font-size: 15.5px;
}
.sr-empty strong { display: block; font-family: var(--transport); font-size: clamp(18px, 2.4vw, 24px); margin-bottom: 4px; }
.sign-foot { font-size: 14px; opacity: .85; margin: 16px 0 0; }

/* ============================================================
   SPLIT-FLAP DEPARTURES BOARD
   ============================================================ */
.departures { padding-top: 0; }
.board {
  max-width: 1060px;
  margin: 0 auto;
  background: var(--flap-bg);
  border: 3px solid #2a3138;
  border-radius: 8px;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .06), 0 18px 40px rgb(0 0 0 / .5);
  padding: clamp(20px, 3.4vw, 40px);
}
.board-head {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  border-bottom: 1px solid rgb(255 255 255 / .12);
  padding-bottom: 14px;
}
.board-head h2 {
  font-family: var(--transport);
  font-size: clamp(24px, 3.8vw, 44px);
  margin: 0;
  display: flex; align-items: center; gap: 14px;
}
.board-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: clamp(12px, 1.5vw, 15px);
  color: #ff5a48; letter-spacing: .1em;
}
.live-dot {
  width: .7em; height: .7em; border-radius: 50%;
  background: #ff5a48;
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: live-blink 1.6s ease-in-out infinite; }
  @keyframes live-blink { 50% { opacity: .25; } }
}
.board-sub { font-size: 13.5px; color: var(--steel); margin: 0; }
.board-rows {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.board-row {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--transport);
}
.board-row-label {
  flex: 1; min-width: 0;
  display: flex; gap: 2px; flex-wrap: wrap;
}
.board-row .flap { font-size: clamp(11px, 1.55vw, 17px); min-width: 1ch; padding: 2px 3px; }
.board-row .flap--space { background: transparent; border-color: transparent; }
.board-row .flap--space::after { display: none; }
.board-count {
  flex-shrink: 0;
  background: var(--yellow); color: var(--ink);
  font-family: var(--transport);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: clamp(13px, 1.8vw, 18px);
  white-space: nowrap;
}
.board-count.is-today { background: #ff5a48; color: var(--white); }
.board-foot { font-size: 13px; color: var(--steel); margin: 18px 0 0; font-style: italic; }

/* ============================================================
   MOST-USED TASKS — EXIT SIGNS
   ============================================================ */
.exit-signs {
  max-width: 1060px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px;
}
.exit-sign {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: clamp(14px, 2.4vw, 28px);
  background: var(--blue);
  color: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--sign-radius);
  box-shadow: 0 6px 0 var(--blue-lo), 0 14px 30px rgb(0 0 0 / .4);
  padding: clamp(14px, 2.2vw, 24px) clamp(16px, 2.6vw, 30px);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: background .18s, transform .22s var(--ease-out), box-shadow .22s;
}
.exit-sign::before { /* hazard stripe revealed on hover */
  content: "";
  position: absolute; inset: auto 0 0 0; height: 8px;
  background: var(--hazard-anim);
  opacity: 0; transition: opacity .2s;
}
@media (prefers-reduced-motion: no-preference) {
  .exit-sign:hover::before, .exit-sign:focus-visible::before { animation: hazard-run 2.4s linear infinite; }
}
.exit-sign:hover, .exit-sign:focus-visible {
  background: var(--blue-hi);
  transform: translateX(8px);
  box-shadow: 0 6px 0 var(--blue-lo), 0 20px 44px rgb(0 0 0 / .5);
}
.exit-sign:hover::before, .exit-sign:focus-visible::before { opacity: 1; }
.exit-badge {
  background: var(--white); color: var(--blue);
  border-radius: 4px;
  font-family: var(--transport);
  font-size: clamp(15px, 2vw, 22px);
  padding: 8px 12px;
  text-align: center;
  line-height: 1.05;
  white-space: nowrap;
}
.exit-badge small { display: block; font-size: .62em; letter-spacing: .08em; }
.exit-main { min-width: 0; }
.exit-title {
  display: block;
  font-family: var(--transport);
  font-size: clamp(20px, 3.2vw, 36px);
  line-height: 1.05;
}
.exit-desc {
  display: block;
  font-family: var(--body);
  font-size: clamp(13px, 1.5vw, 15px);
  opacity: .85;
  margin-top: 5px;
  max-width: 64ch;
}
.exit-meta {
  display: block;
  font-family: var(--transport);
  font-size: clamp(12px, 1.5vw, 15px);
  color: var(--yellow);
  margin-top: 7px;
  letter-spacing: .04em;
}
.exit-arrow {
  font-family: var(--transport);
  font-size: clamp(34px, 5.4vw, 64px);
  color: var(--yellow);
  line-height: 1;
  transition: transform .25s var(--ease-out);
}
.exit-sign:hover .exit-arrow, .exit-sign:focus-visible .exit-arrow { transform: translateX(10px); }

/* ============================================================
   TOPICS — ADVANCE DIRECTION SIGN
   ============================================================ */
.ads-wrap {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(80px, 150px) 1fr;
  gap: clamp(14px, 2.6vw, 30px);
  align-items: start;
}
.junction-diagram {
  position: sticky; top: 120px;
  width: 100%;
  color: var(--white);
}
.topic-signs {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
  counter-reset: junc 1; /* hero is J1 */
}
.topic-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px;
  background: var(--blue);
  color: var(--white);
  border: 2.5px solid var(--white);
  border-radius: 5px;
  padding: 13px 18px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .15s, transform .2s var(--ease-out);
}
.topic-row:hover, .topic-row:focus-visible { background: var(--blue-hi); transform: translateX(6px); }
.topic-junc {
  counter-increment: junc;
  background: var(--white); color: var(--blue);
  border-radius: 3px;
  font-family: var(--transport);
  font-size: clamp(14px, 1.8vw, 19px);
  padding: 4px 9px;
  white-space: nowrap;
}
.topic-junc::before { content: "J" counter(junc); }
.topic-name {
  font-family: var(--transport);
  font-size: clamp(17px, 2.4vw, 26px);
  line-height: 1.1;
}
.topic-strap {
  display: block;
  font-family: var(--body);
  font-size: 13px; opacity: .8; margin-top: 3px;
}
.topic-side {
  font-family: var(--transport);
  color: var(--yellow);
  font-size: clamp(18px, 2.6vw, 30px);
  display: flex; align-items: center; gap: 12px;
  transition: transform .22s var(--ease-out);
}
.topic-count { font-size: clamp(11px, 1.3vw, 13px); color: var(--white); opacity: .85; letter-spacing: .05em; white-space: nowrap; }
.topic-row:hover .topic-side { transform: translateX(6px); }

/* ============================================================
   LIFE EVENTS — SLIP ROADS
   ============================================================ */
.slip-grid {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.slip {
  display: flex; align-items: center; gap: 14px;
  background: var(--asphalt-2);
  border: 2.5px solid var(--yellow);
  border-radius: 5px;
  color: var(--white);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  position: relative;
  transition: transform .2s var(--ease-out), border-color .2s, background .2s;
}
.slip::before {
  content: "→";
  font-family: var(--transport);
  color: var(--yellow);
  font-size: 26px;
  transition: transform .22s var(--ease-out);
}
.slip:hover, .slip:focus-visible { background: #1e2630; transform: translateY(-4px); border-color: var(--white); }
.slip:hover::before { transform: translateX(6px) rotate(-45deg); }
.slip-label {
  font-family: var(--transport);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.1;
}
.slip-blurb {
  display: block;
  font-family: var(--body);
  font-size: 12.5px; opacity: .75; margin-top: 3px;
}

/* ============================================================
   DEPARTMENTS — CONFIRMATORY LEDGER
   ============================================================ */
.dept-controls {
  max-width: 1060px;
  margin: 0 auto 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.dept-filter-rig {
  display: flex; align-items: stretch;
  background: var(--white); border-radius: 4px; overflow: hidden;
  border: 3px solid var(--white);
}
.dept-filter {
  flex: 1; min-width: 0; border: none; outline: none;
  font-family: var(--transport);
  font-size: clamp(16px, 2vw, 22px);
  padding: 12px 6px;
  color: var(--ink);
}
.dept-filter:focus-visible { outline-offset: -3px; }
.az-bar { display: flex; flex-wrap: wrap; gap: 5px; }
.az-btn {
  min-width: 44px; min-height: 44px;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 4px;
  font-family: var(--transport);
  font-size: 15px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.az-btn:hover:not(:disabled) { background: var(--blue-hi); transform: translateY(-2px); }
.az-btn[aria-pressed="true"] { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.az-btn:disabled { opacity: .28; cursor: default; }
.dept-count {
  max-width: 1060px; margin: 0 auto 12px;
  font-family: var(--transport);
  color: var(--yellow);
  font-size: clamp(14px, 1.7vw, 18px);
}
.dept-ledger {
  max-width: 1060px; margin: 0 auto;
  list-style: none; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.dept-row {
  width: 100%;
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 5px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .15s, transform .2s var(--ease-out);
}
.dept-row:hover, .dept-row:focus-visible { background: var(--blue-hi); transform: translateY(-3px); }
.dept-abbr {
  background: var(--white); color: var(--blue);
  border-radius: 3px;
  font-family: var(--transport);
  font-size: 14px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.dept-name { font-family: var(--transport); font-size: 16.5px; line-height: 1.15; display: block; }
.dept-type { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--yellow); margin: 4px 0 2px; }
.dept-mission { font-size: 12.5px; opacity: .8; margin: 0; }
.dept-empty { background: var(--asphalt-2); cursor: default; }
.dept-empty:hover { transform: none; background: var(--asphalt-2); }

/* ============================================================
   GUIDANCE — DIVERSION BOARDS (yellow)
   ============================================================ */
.diversion-boards {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.diversion {
  position: relative;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 5px;
  padding: 18px 20px 16px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 6px 0 #b39000;
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.diversion::before {
  content: "DIVERSION ↑";
  font-family: var(--transport);
  font-size: 11.5px; letter-spacing: .12em;
  display: block;
  margin-bottom: 8px;
}
.diversion:hover, .diversion:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 0 #b39000; }
.d-kind { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.d-title {
  font-family: var(--transport);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.15;
  margin: 6px 0 8px;
}
.d-meta { font-size: 12px; margin: 0 0 8px; opacity: .75; }
.d-desc { font-size: 13.5px; margin: 0; line-height: 1.45; }

/* ============================================================
   NEWS — MATRIX SIGNALS
   ============================================================ */
.news { padding-bottom: 0; }
.matrix-head { max-width: 1060px; margin: 0 auto 26px; }
.matrix-heading {
  font-family: var(--transport);
  font-size: clamp(26px, 4.6vw, 52px);
  margin: 0;
  color: var(--amber);
}
.matrix-sub { color: var(--steel); font-size: clamp(14px, 1.6vw, 17px); margin: 8px 0 0; }
.matrix-grid {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.matrix-signal {
  background: var(--flap-bg);
  border: 3px solid #2a3138;
  border-radius: 6px;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--amber);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .05);
  transition: border-color .2s, transform .2s var(--ease-out);
  position: relative;
}
.matrix-signal:hover, .matrix-signal:focus-visible { border-color: var(--amber); transform: translateY(-3px); }
.m-tag {
  font-family: var(--transport);
  font-size: 11.5px; letter-spacing: .14em;
  color: var(--white);
  display: block; margin-bottom: 10px;
}
.m-title {
  font-family: var(--transport);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: .02em;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .m-title {
    background-image: radial-gradient(circle at 50% 50%, var(--amber) 62%, transparent 66%);
    background-size: 4px 4px;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
.m-lede { font-size: 13.5px; color: #c8cdd4; margin: 0 0 10px; line-height: 1.5; }
.m-meta { font-size: 12px; color: var(--steel); margin: 0; }
.m-meta b { color: var(--amber); font-weight: 600; }

/* ============================================================
   CONSULTATIONS — ROADWORKS
   ============================================================ */
.roadworks-grid {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.roadwork {
  position: relative;
  background: var(--asphalt-2);
  border: 2.5px solid var(--yellow);
  border-radius: 6px;
  color: var(--white);
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  overflow: hidden;
  transition: transform .2s var(--ease-out), border-color .2s;
}
.roadwork:hover, .roadwork:focus-visible { transform: translateY(-4px); border-color: var(--white); }
.rw-stripe { display: block; height: 10px; background: var(--hazard); }
.rw-body { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .roadwork:hover .rw-stripe, .roadwork:focus-visible .rw-stripe { background: var(--hazard-anim); animation: hazard-run 2.4s linear infinite; }
}
.rw-body { padding: 16px 18px 18px; }
.rw-kind { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); font-weight: 700; }
.rw-title {
  font-family: var(--transport);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.15;
  display: block; margin: 8px 0;
}
.rw-desc { font-size: 13px; opacity: .8; margin: 0 0 14px; }
.rw-clock {
  display: inline-flex; align-items: baseline; gap: 10px;
  background: var(--flap-bg);
  border: 1.5px solid #2a3138;
  border-radius: 4px;
  padding: 8px 12px;
}
.rw-days {
  font-family: var(--transport);
  font-size: clamp(24px, 3.2vw, 34px);
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rw-when { font-size: 12px; color: var(--steel); }
.rw-dept { display: block; font-size: 12px; color: var(--steel); margin-top: 12px; }
.roadwork.is-urgent { border-color: #ff5a48; }
.roadwork.is-urgent .rw-days { color: #ff5a48; }

/* ============================================================
   END OF MOTORWAY
   ============================================================ */
.end { padding: clamp(48px, 8vw, 110px) clamp(16px, 4vw, 48px) 0; }
.end-sign {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: clamp(26px, 4vw, 44px) clamp(20px, 4vw, 46px);
  text-align: center;
  overflow: hidden;
}
.end-red {
  position: absolute; inset: 0;
  pointer-events: none;
}
.end-red::after {
  content: "";
  position: absolute; top: -20%; bottom: -20%; left: 46%;
  width: clamp(20px, 3.4vw, 40px);
  background: #c03028;
  transform: rotate(24deg);
  opacity: .92;
}
.end-title {
  position: relative;
  font-family: var(--transport);
  font-size: clamp(26px, 4.6vw, 54px);
  margin: 0;
}
.end-sub { position: relative; font-size: clamp(14px, 1.7vw, 17px); margin: 12px 0 0; }
.end-sub a { color: var(--yellow); }
.colophon {
  max-width: 900px;
  margin: clamp(26px, 4vw, 44px) auto 0;
  padding-bottom: 40px;
  color: #aab3bd;
  font-size: 14px;
}
.colophon strong { color: var(--white); }
.colophon-fine { font-size: 12.5px; opacity: .75; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; }
.footer-nav a { color: var(--yellow); text-decoration: none; font-family: var(--transport); font-size: 14px; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   SIGN DRAWER
   ============================================================ */
.drawer-root { position: fixed; inset: 0; z-index: 400; }
.drawer-root[hidden] { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgb(4 6 9 / .72);
  backdrop-filter: blur(3px);
}
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(680px, 100%);
  background: var(--white);
  color: var(--ink);
  display: flex; flex-direction: column;
  overflow-y: auto;
  box-shadow: -30px 0 60px rgb(0 0 0 / .5);
}
@media (prefers-reduced-motion: no-preference) {
  .drawer-root:not([hidden]) .drawer { animation: drawer-in .45s var(--ease-out); }
  .drawer-root:not([hidden]) .drawer-backdrop { animation: fade-in .3s ease-out; }
  @keyframes drawer-in { from { transform: translateX(100%); } }
  @keyframes fade-in { from { opacity: 0; } }
}
.drawer-stripe { height: 12px; background: var(--hazard); flex-shrink: 0; }
.drawer-head {
  position: relative;
  background: var(--blue);
  color: var(--white);
  padding: clamp(22px, 3.4vw, 36px) clamp(20px, 3.4vw, 40px);
  border-bottom: 3px solid var(--ink);
}
.drawer-crumb {
  font-family: var(--transport);
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 10px;
}
.drawer-title {
  font-family: var(--transport);
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.05;
  margin: 0;
  padding-right: 90px;
}
.drawer-sub { font-size: 15px; margin: 12px 0 0; opacity: .9; max-width: 56ch; }
.drawer-close {
  position: absolute; top: clamp(18px, 3vw, 30px); right: clamp(16px, 3vw, 30px);
  background: var(--yellow); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 4px;
  font-family: var(--transport);
  font-size: 15px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .2s var(--ease-out);
}
.drawer-close:hover { transform: translateX(4px); }
.drawer-body { padding: clamp(20px, 3.4vw, 36px) clamp(20px, 3.4vw, 40px) 48px; }

/* drawer content blocks */
.d-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 0 0 26px;
}
.d-meta-cell {
  background: var(--blue);
  color: var(--white);
  border-radius: 5px;
  padding: 14px 16px;
}
.d-meta-cell dt {
  font-family: var(--transport);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--yellow);
}
.d-meta-cell dd { margin: 6px 0 0; font-family: var(--transport); font-size: 17px; line-height: 1.25; }
.d-section { margin-bottom: 26px; }
.d-section h3 {
  font-family: var(--transport);
  font-size: 19px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--yellow);
}
.d-section p { font-size: 15.5px; max-width: 56ch; }
.d-need { margin: 0; padding-left: 22px; }
.d-need li { font-size: 15px; margin-bottom: 8px; }
.d-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.d-steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 10px 52px;
  font-size: 15px;
  border-bottom: 1px dashed #c5cdd6;
}
.d-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 10px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--blue); color: var(--white);
  border-radius: 4px;
  font-family: var(--transport);
  font-size: 16px;
}
.d-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.d-link {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: #f2f5f8;
  border: 2px solid var(--ink);
  border-radius: 5px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--transport);
  font-size: 15.5px;
  color: var(--ink);
  transition: background .15s, transform .2s var(--ease-out);
}
.d-link small { display: block; font-family: var(--body); font-size: 12px; opacity: .7; margin-top: 2px; }
.d-link::after { content: "→"; margin-left: auto; color: var(--blue); font-size: 20px; transition: transform .2s; }
.d-link:hover, .d-link:focus-visible { background: var(--yellow); transform: translateX(4px); }
.d-link:hover::after { transform: translateX(4px); }
.d-note {
  font-size: 13px; color: #4c5764;
  border-left: 6px solid var(--yellow);
  padding: 4px 0 4px 14px;
  margin-top: 26px;
}
.d-tagrow { display: flex; flex-wrap: wrap; gap: 8px; }
.d-tag {
  font-family: var(--transport);
  font-size: 12.5px;
  background: var(--blue); color: var(--white);
  border-radius: 3px;
  padding: 5px 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-lanes { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; margin-left: auto; }
  .flap-clock { display: none; }
  .gantry-beam { flex-wrap: wrap; }
  .gantry-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
  }
  .gantry-nav.open { display: flex; }
  .gantry-nav a { justify-content: space-between; font-size: 16px; padding: 13px 14px; }
  .ads-wrap { grid-template-columns: 1fr; }
  .junction-diagram { position: static; width: 90px; margin: 0 auto 6px; }
  .board-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 560px) {
  .exit-sign { grid-template-columns: auto 1fr; }
  .exit-arrow { display: none; }
  .hero-title { font-size: clamp(42px, 12.5vw, 72px); }
  .d-meta { grid-template-columns: 1fr; }
  .drawer-title { padding-right: 76px; }
  .sign-topline-right { display: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}
