:root {
  --paper: #f4efe4;
  --paper-deep: #e9e0cf;
  --ink: #202b32;
  --muted: #5f6b6e;
  --rule: #b9ae9b;
  --blue: #1d4f78;
  --blue-soft: #d5e1e5;
  --yellow: #d7ab34;
  --yellow-soft: #f3e7b1;
  --red: #b94a3e;
  --red-soft: #ead0c7;
  --graphite: #354046;
  --white: #fffdf8;
  --shadow: 0 1.25rem 2.75rem rgba(33, 42, 44, 0.1);
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 18rem;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(32, 43, 50, 0.035) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    linear-gradient(rgba(32, 43, 50, 0.035) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    var(--paper);
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
}

a:focus-visible,
button:focus-visible {
  outline: 0.2rem solid var(--red);
  outline-offset: 0.2rem;
}

img,
svg {
  max-width: 100%;
}

.wrap {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(244, 239, 228, 0.94);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.brand,
.utility,
.eyebrow,
.label,
.meta,
.status,
.source-label,
.route-index,
.table-note {
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brand {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.language-switch a {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  text-decoration: none;
}

.language-switch a[aria-current="page"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid var(--rule);
}

.hero::after {
  position: absolute;
  top: 0;
  right: 0;
  width: min(24vw, 18rem);
  height: 100%;
  background: repeating-linear-gradient(135deg, transparent 0 1.1rem, rgba(29, 79, 120, 0.08) 1.1rem 1.16rem);
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(18rem, 0.84fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.eyebrow,
.meta,
.source-label,
.route-index,
.table-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin: 0 0 1.45rem;
  padding: 0.5rem 0.8rem;
  border-left: 0.35rem solid var(--red);
  background: var(--red-soft);
  color: var(--ink);
}

h1,
h2,
h3,
p {
  max-width: 70ch;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 12.5ch;
  margin-bottom: 1.3rem;
  font-size: clamp(3.4rem, 6vw, 5.6rem);
  line-height: 0.93;
}

h2 {
  max-width: 17ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.12;
}

p {
  margin: 0 0 1rem;
}

.dek {
  max-width: 38rem;
  margin-bottom: 1.6rem;
  color: #35434a;
  font-size: clamp(1.1rem, 1.75vw, 1.4rem);
  line-height: 1.35;
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.status-stamp {
  justify-self: start;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.payoff {
  position: relative;
  padding: 1.3rem 1.35rem 1.4rem;
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}

.payoff::before {
  position: absolute;
  top: -0.45rem;
  right: 1.2rem;
  width: 4rem;
  height: 0.75rem;
  background: var(--yellow);
  content: "";
  transform: rotate(2deg);
}

.payoff .label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
}

.payoff p:last-child {
  margin-bottom: 0;
}

.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.jump-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
}

.jump-links a:hover {
  border-color: var(--red);
  background: var(--red-soft);
}

.section {
  padding: clamp(3.2rem, 7vw, 6.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 0.4fr) minmax(0, 1.6fr);
  gap: clamp(1.5rem, 6vw, 6rem);
}

.section-lead {
  align-self: start;
}

.section-lead .route-index {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--red);
  font-weight: 700;
}

.section-lead p {
  color: var(--muted);
  font-size: 0.96rem;
}

.prose {
  min-width: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.callout {
  margin: 1.8rem 0;
  padding: 1.2rem 1.3rem;
  border-left: 0.35rem solid var(--blue);
  background: var(--blue-soft);
}

.callout.yellow {
  border-left-color: var(--yellow);
  background: var(--yellow-soft);
}

.callout.red {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.callout p:last-child {
  margin-bottom: 0;
}

.route-board {
  margin: 2rem 0 1.2rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 43, 50, 0.08) 1px, transparent 1px) 0 0 / 2rem 2rem,
    linear-gradient(rgba(32, 43, 50, 0.08) 1px, transparent 1px) 0 0 / 2rem 2rem,
    #f8f3e8;
  box-shadow: var(--shadow);
}

.route-board-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.route-board-head strong {
  font-size: 1.1rem;
}

.route-board-head span {
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.lane {
  position: relative;
  display: grid;
  grid-template-columns: 7.8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.lane:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.lane-label {
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.lane-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}

.lane-step {
  position: relative;
  min-height: 6.2rem;
  padding: 0.8rem;
  border: 1px solid var(--ink);
  background: var(--white);
}

.lane-step::after {
  position: absolute;
  top: 50%;
  right: -0.52rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  background: var(--white);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.lane-step:last-child::after {
  display: none;
}

.lane-step .step-no {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.68rem;
}

.lane-step strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
}

.lane-step small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.lane-proposed .lane-step:nth-child(2) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.lane-proposed .lane-step:nth-child(3) {
  border-color: var(--red);
  background: var(--red-soft);
}

.lane-proposed .lane-step:nth-child(3)::before {
  position: absolute;
  top: -0.55rem;
  bottom: -0.55rem;
  left: -0.35rem;
  width: 0.35rem;
  background: var(--red);
  content: "";
}

.lane-energy .lane-step:nth-child(3) {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.lane-london .lane-step:nth-child(2) {
  border-color: var(--graphite);
  background: #dce0dd;
}

.lane-london .lane-step:nth-child(3) {
  border-color: var(--graphite);
  background: #eef0eb;
}

.caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}

.fact-card {
  min-height: 10rem;
  padding: 1.15rem;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.72);
}

.fact-card .big-number {
  display: block;
  margin: 0.4rem 0 0.55rem;
  color: var(--blue);
  font-size: clamp(2.5rem, 6vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.fact-card.red .big-number {
  color: var(--red);
}

.fact-card.yellow .big-number {
  color: #9c7410;
}

.fact-card p:last-child {
  margin-bottom: 0;
}

.comparison-table {
  width: 100%;
  margin: 1.8rem 0 0.65rem;
  border-collapse: collapse;
  background: rgba(255, 253, 248, 0.7);
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--graphite);
  color: var(--white);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comparison-table tbody th {
  width: 28%;
  background: var(--paper-deep);
  font-weight: 700;
}

.source-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule);
}

.source-list li::before {
  color: var(--red);
  content: "↳";
  font-size: 1.3rem;
  font-weight: 700;
}

.source-list p {
  margin-bottom: 0.4rem;
}

.source-list small {
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
}

.source-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--blue);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.closing-line {
  max-width: 42rem;
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  border-top: 0.3rem solid var(--red);
  background: var(--white);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.site-footer {
  padding: 2.2rem 0 3.2rem;
  background: var(--ink);
  color: var(--white);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem 2rem;
}

.site-footer p,
.site-footer a {
  color: var(--white);
}

.site-footer p {
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.site-footer .meta {
  color: #c5ced0;
  font-size: 0.68rem;
}

.not-found {
  min-height: 70vh;
  padding: 7rem 0;
}

.not-found h1 {
  max-width: 16ch;
}

@media (max-width: 820px) {
  .hero-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    max-width: 36rem;
  }

  .section-lead {
    display: grid;
    grid-template-columns: minmax(5rem, 0.25fr) minmax(0, 1fr);
    gap: 1rem;
  }

  .section-lead h2 {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .section-lead p {
    grid-column: 1;
    grid-row: 2;
  }

  .section-lead .route-index {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 1.25rem, 40rem);
  }

  .site-nav {
    min-height: 3.75rem;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero::after {
    width: 7rem;
    opacity: 0.55;
  }

  h1 {
    max-width: 13.5ch;
    font-size: clamp(2.65rem, 12.5vw, 4rem);
  }

  .hero-grid {
    gap: 1.25rem;
  }

  .dek {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .section-lead {
    display: block;
  }

  .section-lead h2 {
    margin-bottom: 0.9rem;
  }

  .lane {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .lane-track {
    grid-template-columns: 1fr;
  }

  .lane-step {
    min-height: 0;
  }

  .lane-step::after {
    top: auto;
    right: auto;
    bottom: -0.52rem;
    left: 50%;
    border-top: 0;
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    transform: translateX(-50%) rotate(45deg);
  }

  .lane-proposed .lane-step:nth-child(3)::before {
    top: -0.35rem;
    right: -0.35rem;
    bottom: auto;
    left: -0.35rem;
    width: auto;
    height: 0.35rem;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    display: block;
    overflow-x: auto;
  }

  .comparison-table th,
  .comparison-table td {
    min-width: 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
