:root {
  --navy: #0e2440;
  --navy-soft: #1b3a61;
  --red: #d52b1e;
  --ivory: #f7f3ea;
  --paper: #fffdf8;
  --ink: #1b1a17;
  --muted: #5d584f;
  --line: #ddd4c4;
  --gold: #c9a227;
  --bakerloo: #b36305;
  --central: #e32017;
  --circle: #ffd300;
  --district: #00782a;
  --elizabeth: #6950a1;
  --hammersmith: #f3a9bb;
  --jubilee: #a0a5a9;
  --metropolitan: #9b0056;
  --northern: #333333;
  --piccadilly: #003688;
  --victoria: #0098d4;
  --waterloo: #95cdba;
  --dlr: #00a4a7;
  --shadow: 0 16px 36px rgba(14, 36, 64, .12);
  --header: 4.7rem;
  --measure: 74rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(90deg, var(--bakerloo), var(--central), var(--circle), var(--district), var(--elizabeth), var(--jubilee), var(--metropolitan), var(--northern), var(--piccadilly), var(--victoria), var(--waterloo), var(--dlr)) top/100% .35rem no-repeat,
    var(--ivory);
  color: var(--ink);
  font: 1.05rem/1.65 "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.site { padding-top: .35rem; }
img { max-width: 100%; display: block; }
a { color: var(--navy-soft); text-underline-offset: .16em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip {
  position: absolute; left: .8rem; top: -4rem; z-index: 30;
  background: var(--navy); color: white; padding: .65rem .85rem;
}
.skip:focus { top: .6rem; }
.wrap { width: min(var(--measure), calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(46rem, calc(100% - 2rem)); }
h1, h2, h3, legend { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif; line-height: 1.15; color: var(--navy); }
h1 { margin: .15rem 0 .75rem; font-size: clamp(2.15rem, 6vw, 4.5rem); letter-spacing: -.025em; }
h2 { margin: 1.6rem 0 .7rem; font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }
.prose p:first-of-type::first-letter { float: left; margin: .15rem .45rem 0 0; color: var(--red); font: 3.1rem/1 Georgia, serif; }

.mast {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 243, 234, .88);
  border-bottom: 1px solid rgba(14, 36, 64, .12);
  backdrop-filter: blur(16px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: var(--header); padding: .45rem 4vw; }
.brand { display: flex; gap: .65rem; align-items: center; color: var(--navy); text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand small { color: var(--red); }
.mark { width: 1.55rem; height: 1.55rem; border: .28rem solid var(--navy); border-radius: 50%; box-shadow: inset 0 0 0 .28rem var(--red); }
.nav-toggle, button, .button {
  border: 0; border-radius: .35rem; background: var(--navy); color: white;
  font: inherit; padding: .65rem .95rem; cursor: pointer; text-decoration: none; display: inline-block;
}
.nav-toggle { display: none; background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.lang { display: flex; gap: .3rem; align-items: center; }
.lang a, .lang span { min-width: 2.35rem; padding: .2rem; text-align: center; text-decoration: none; color: var(--navy); font-size: .82rem; font-weight: 760; }
.lang [aria-current] { color: var(--red); }
.main-nav { display: flex; gap: .95rem; overflow: auto; padding: 0 4vw .75rem; }
.main-nav a { flex: 0 0 auto; color: var(--navy); text-decoration: none; font-size: .92rem; }
.main-nav [aria-current] { color: var(--red); box-shadow: inset 0 -2px var(--red); }

.hero {
  position: relative; isolation: isolate; min-height: 25rem; display: grid; align-items: end;
  margin: 1rem 0 1.5rem; overflow: hidden; color: white;
  background:
    linear-gradient(90deg, rgba(14,36,64,.95) 0%, rgba(14,36,64,.78) 46%, rgba(14,36,64,.28) 100%),
    var(--hero-image, none) center/cover no-repeat,
    linear-gradient(135deg, var(--navy), #244872 58%, var(--navy-soft));
}
.hero::before {
  content: ""; position: absolute; inset: auto 0 0; height: .48rem; z-index: 2;
  background: linear-gradient(90deg, var(--bakerloo), var(--central), var(--circle), var(--district), var(--elizabeth), var(--jubilee), var(--metropolitan), var(--northern), var(--piccadilly), var(--victoria), var(--waterloo), var(--dlr));
}
.hero-copy { position: relative; z-index: 1; padding: clamp(1.3rem, 4vw, 3rem); }
.hero h1, .hero .lead, .hero .kicker, .hero .hero-note { color: white; }
.kicker { margin: 0 0 .45rem; letter-spacing: .09em; text-transform: uppercase; font-size: .76rem; font-weight: 760; }
.lead, .hero-note { max-width: 42rem; }
.hero-note { color: rgba(255,255,255,.82); font-size: .92rem; }
.hero-figure { position: relative; margin: 0; min-height: 15rem; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.home-hero { min-height: 33rem; align-items: center; }
.home-search, .filters, .stack-form, .add-row, .actions { display: grid; gap: .75rem; }
.home-search { grid-template-columns: 1fr auto; max-width: 39rem; margin-top: 1rem; }
.home-search label, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--ink); font: inherit; padding: .7rem .75rem; border-radius: .3rem; }
label { display: grid; gap: .3rem; font-size: .92rem; color: var(--navy); }
.section-grid, .cards, .map-grid, .footer-grid { display: grid; gap: 1rem; }
.section-link, .card {
  background: var(--paper); color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: .5rem; box-shadow: var(--shadow);
}
.section-link { display: grid; gap: .25rem; min-height: 9rem; padding: 1rem 1rem 1.1rem; position: relative; overflow: hidden; }
.section-link::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .35rem; background: var(--red); }
.section-link span { font-family: Georgia, serif; font-size: 1.45rem; color: var(--navy); }
.section-link strong { color: var(--red); font-size: 1.7rem; }
.section-link small { color: var(--muted); line-height: 1.4; }
.card { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-.35rem); box-shadow: 0 20px 38px rgba(14,36,64,.16); }
.card > div, .tool-card { padding: 1rem 1rem 1.15rem; }
.card h3 { margin: .35rem 0 .45rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card p { color: var(--muted); }
.card-media { position: relative; display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-empty { background:
  linear-gradient(135deg, rgba(14,36,64,.92), rgba(14,36,64,.5)),
  repeating-linear-gradient(90deg, var(--bakerloo) 0 8%, var(--central) 8% 16%, var(--circle) 16% 24%, var(--district) 24% 32%, var(--elizabeth) 32% 40%, var(--jubilee) 40% 48%, var(--metropolitan) 48% 56%, var(--northern) 56% 64%, var(--piccadilly) 64% 72%, var(--victoria) 72% 80%, var(--waterloo) 80% 88%, var(--dlr) 88% 100%);
}
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .35rem; }
.tags span, .badge-ai, .badge-official {
  display: inline-flex; align-items: center; border-radius: 999px; padding: .12rem .5rem;
  background: #efe7d6; color: var(--navy); font-size: .74rem; line-height: 1.35; letter-spacing: .01em;
}
.badge-ai, .badge-official { position: absolute; left: .6rem; bottom: .6rem; max-width: calc(100% - 1.2rem); }
.badge-official { background: white; }
.crumbs ol, .sources ul, .system-links, .map-grid ul, .colophon ul, .toc ol { margin: 0; padding: 0; list-style: none; }
.crumbs { margin: 1rem 0 .2rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .3rem .65rem; font-size: .9rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .65rem; color: var(--muted); }
.meta-row, .count, .fine, .rights { color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.article-grid { display: block; }
article p, .prose p { font-size: 1.06rem; }
.toc { margin: 1.2rem 0; padding: 1rem; background: rgba(255,253,248,.86); border-left: .25rem solid var(--gold); }
.toc a { text-decoration: none; }
.toc li + li { margin-top: .45rem; }
.takeaway, .notice { padding: 1rem 1rem .2rem; background: white; border-left: .35rem solid var(--red); }
.sources a { overflow-wrap: anywhere; }
.filters { margin: 0 0 1rem; }
.checklist fieldset { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); background: var(--paper); }
.checklist ul { margin: .4rem 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: .5rem; align-items: center; margin: .45rem 0; }
.checklist input[type="checkbox"] { width: 1.05rem; height: 1.05rem; }
.result { min-height: 4.5rem; padding: .8rem 0; font-weight: 700; }
.map-grid section, .system-links { background: var(--paper); border: 1px solid var(--line); padding: 1rem; }
.colophon { margin-top: 3.5rem; padding: 2.2rem 0 1rem; background: var(--navy); color: #f7f3ea; }
.colophon a, .colophon h2 { color: white; }
.colophon h2 { margin-top: 0; font-size: 1.25rem; }
.owner { display: grid; gap: .15rem; }
.rights { width: min(var(--measure), calc(100% - 2rem)); margin: 1.2rem auto; }

@media (min-width: 720px) {
  .filters { grid-template-columns: 1.5fr .8fr .8fr auto; align-items: end; }
  .stack-form { grid-template-columns: 1fr 1fr; }
  .stack-form button, .actions { grid-column: 1 / -1; justify-self: start; }
  .section-grid, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid, .map-grid { grid-template-columns: 1.3fr .8fr .9fr; }
  .hero:not(.home-hero) { grid-template-columns: 1.25fr .75fr; align-items: stretch; }
  .hero-copy { align-self: end; }
}
@media (min-width: 980px) {
  .cards, .section-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-grid { display: grid; grid-template-columns: minmax(0, 820px) 250px; gap: 1.6rem; align-items: start; }
  .toc { position: sticky; top: calc(var(--header) + 1rem); width: 250px; }
}
@media (max-width: 719px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; flex-direction: column; gap: .15rem; padding-bottom: .8rem; background: rgba(247,243,234,.98); }
  .main-nav a { padding: .45rem 0; }
  .mast.open .main-nav { display: flex; }
  .home-search { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .mast, .colophon, .skip, .actions, .toc, .nav-toggle, .add-row, .filters { display: none !important; }
  body, .hero, .card, .takeaway { background: white !important; color: black !important; box-shadow: none; }
  .hero { min-height: 0; }
  .hero h1, .hero p { color: black !important; }
  a { color: black; text-decoration: none; }
  .card, fieldset, .takeaway { break-inside: avoid; }
  .checklist input { outline: 1px solid black; }
}

/* Text-first release: no blank media columns or artificial image placeholders. */
.hero:not(:has(.hero-figure)):not(.home-hero){grid-template-columns:1fr;min-height:19rem}
.hero-figure img{max-height:34rem}
.card img{loading:lazy}
@media(max-width:719px){.bar{flex-wrap:wrap;gap:.4rem .6rem;padding:.55rem 1rem}.brand{font-size:.98rem;min-width:0}.brand .mark{width:1.25rem;height:1.25rem;flex:none}.nav-toggle{padding:.35rem .55rem;font-size:.88rem}.lang{margin-left:auto}.lang a,.lang span{min-width:1.9rem}.bar>.lang{flex-basis:100%;justify-content:flex-end}.hero h1{overflow-wrap:anywhere}}

/* Illustrated release: readable split heroes and immersive London home. */
.hero:has(.hero-figure){grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:stretch;border-radius:.65rem}
.hero-figure{min-width:0;min-height:26rem;overflow:hidden}
.hero-figure img{display:block;height:100%;max-height:none;position:absolute;inset:0}
.hero-copy{align-self:center;min-width:0}
.home-hero{min-height:38rem;margin-top:0;background:#0e2440}
.home-hero-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 48%;z-index:-2}
.home-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(8,25,46,.94),rgba(8,25,46,.64) 48%,rgba(8,25,46,.08));z-index:-1}
.home-hero .hero-copy{width:100%}.home-hero h1{max-width:15ch}.home-hero .lead{max-width:42ch}.home-hero>.badge-ai{z-index:3;left:auto;right:1rem;bottom:1rem}
.section-image{width:calc(100% + 2rem);max-width:none;height:11rem;object-fit:cover;margin:-1rem -1rem .6rem}
@media(max-width:719px){.hero:has(.hero-figure){grid-template-columns:minmax(0,1fr)}.hero-figure{min-height:21rem;order:-1}.home-hero{min-height:43rem;align-items:end}.home-hero-image{object-position:62% center}.home-hero:after{background:linear-gradient(0deg,rgba(8,25,46,.97),rgba(8,25,46,.65) 65%,rgba(8,25,46,.12))}.home-hero .hero-copy{padding-bottom:3rem}.home-hero h1{font-size:2.65rem}.hero h1{font-size:clamp(2rem,6vw,3.3rem)}}
