/* Manchester.one
   Warm paper, red brick, tram yellow. Fonts self-hosted. */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --bg: #f7f4ee; --bg-alt: #efe9df; --card: #fdfbf7; --raised: #e9e2d6;
  --text: #1f1b16; --text-2: #5e554a; --muted: #776e62;
  --line: rgba(31, 27, 22, .1); --line-strong: rgba(31, 27, 22, .18);
  --accent: #b23a20; --accent-ink: #a3341c; --accent-soft: rgba(178, 58, 32, .1);
  --tram: #f2c230; --tram-ink: #3b2c26;
  --good: #16a34a; --bad: #dc2626;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1240px; --pad: 24px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513; --bg-alt: #12110f; --card: #1c1a18; --raised: #262421;
    --text: #efe9de; --text-2: #aaa398; --muted: #8a847a;
    --line: rgba(239, 233, 222, .08); --line-strong: rgba(239, 233, 222, .16);
    --accent: #c4472b; --accent-ink: #e2735a; --accent-soft: rgba(226, 115, 90, .14);
    --good: #4cc38a; --bad: #e5484d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; color: var(--text); }
p { margin: 0 0 16px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
cite { font-style: normal; font-weight: 600; }
::selection { background: var(--tram); color: var(--tram-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 2000; background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font: 600 16px/1 var(--body); text-decoration: none; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-quiet { background: var(--card); color: var(--text); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--raised); }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); }
.btn[disabled] { cursor: default; }
.btn[disabled]:active { transform: none; }
.toggle { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; font-size: 14px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.toggle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.toggle:hover { background: var(--raised); color: var(--text); }
.toggle[aria-pressed="true"] { color: var(--text); border-color: var(--text-2); }
.toggle[aria-pressed="true"]::before { background: var(--tram); box-shadow: 0 0 0 2px var(--tram-ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.link-btn:hover { text-decoration-thickness: 2.5px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-ink); margin-bottom: 12px; display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tram); box-shadow: 0 0 0 2.5px var(--tram-ink); }
@media (prefers-color-scheme: dark) { .eyebrow::before { box-shadow: 0 0 0 2.5px var(--tram); background: var(--bg); } }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 19px/1 var(--display); text-decoration: none; letter-spacing: -.01em; }
.brand-bee { width: 26px; height: 26px; color: var(--text); --bee-stripe: var(--tram); }
.links { display: flex; gap: 2px; margin-left: auto; }
.links a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.links a:hover, .links a.is-active { background: var(--raised); color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 8px; }
.bee-tally { margin: 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bee-tally svg { width: 18px; height: 18px; color: var(--text); --bee-stripe: var(--tram); }
.bee-tally.bump { animation: bump .5s var(--ease); }
.menu-btn { display: none; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); font-size: 14px; font-weight: 600; }
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--tram); }
@media (max-width: 920px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { gap: 12px; } .nav-end { margin-left: auto; }
  .links { position: absolute; top: 64px; left: 0; right: 0; margin: 0; flex-direction: column; padding: 8px var(--pad) 16px; background: var(--bg); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; }
  .links.is-open { opacity: 1; visibility: visible; transform: none; }
  .links a { padding: 12px; font-size: 17px; }
}

/* ---------- Photos ---------- */
.ph { background: var(--raised); object-fit: cover; width: 100%; height: 100%; }
.ph-fallback { display: grid; place-items: center; align-content: center; gap: 10px; aspect-ratio: 4 / 3; width: 100%; border-radius: 16px; background: var(--raised) url("../img/hex.svg") center / 28px 48px; color: var(--text-2); padding: 24px; text-align: center; font-size: 14px; }
.ph-fallback svg { width: 40px; height: 40px; color: var(--text); --bee-stripe: var(--tram); }
.hood .ph-fallback { border-radius: 0; aspect-ratio: 16 / 10; }
.hero .ph-fallback { display: none; }
.credit { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 8px 0 0; }
.credit a { color: inherit; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100svh - 64px); display: grid; align-items: end; color: #fff; isolation: isolate; overflow: hidden; background: #2b211c; }
.hero-media { position: absolute; inset: 0; margin: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 10, .15) 0%, rgba(20, 14, 10, .2) 35%, rgba(20, 14, 10, .82) 100%), linear-gradient(90deg, rgba(20, 14, 10, .55) 0%, rgba(20, 14, 10, 0) 60%); }
.hero-media .credit { position: absolute; right: 16px; top: 12px; z-index: 2; color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .35); padding: 4px 8px; border-radius: 6px; margin: 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 48px; align-items: end; padding-block: 96px 56px; }
.hello { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 500; color: rgba(255, 255, 255, .88); }
.hello::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tram); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
h1 { font-size: clamp(46px, 7vw, 92px); line-height: 1; letter-spacing: -.035em; font-weight: 700; color: #fff; max-width: 11ch; margin-bottom: 24px; text-wrap: balance; }
.sub { font-size: 19px; line-height: 1.55; color: rgba(255, 255, 255, .9); max-width: 36rem; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.now-card { background: rgba(253, 251, 247, .96); color: var(--tram-ink); border-radius: 18px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); justify-self: end; width: min(100%, 360px); }
@media (prefers-color-scheme: dark) { .now-card { background: rgba(28, 26, 24, .95); color: #efe9de; } }
.mini-sky { position: relative; height: 120px; background: #8fbfe0; }
.mini-sky svg { width: 100%; height: 100%; }
.mini-sky .win rect { fill: #4a2a1f; transition: fill .6s var(--ease); }
.mini-sky.is-night .win rect:nth-child(odd) { fill: #f4cf6a; }
.rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); }
.rain.on { opacity: 1; }
.now-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 4px; }
.now-time { font: 600 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.now-label { font-size: 14px; opacity: .75; }
.now-card .toggle { color: inherit; border-color: currentColor; opacity: .85; }
.now-sun { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 16px 14px; margin: 0; font-size: 13px; opacity: .85; }
.now-sun b { font-variant-numeric: tabular-nums; }
#nowlabel { flex-basis: 100%; }

/* ---------- Numbers ---------- */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-block: 48px; }
.num { padding: 20px 0; border-top: 2px solid var(--text); }
.num strong { display: block; font: 700 clamp(34px, 4vw, 48px)/1 var(--display); letter-spacing: -.02em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.num span { color: var(--text-2); font-size: 15px; line-height: 1.45; display: block; max-width: 26ch; }

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section-alt { background: var(--bg-alt); }
.head { max-width: 44rem; margin-bottom: 48px; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -.03em; margin-bottom: 16px; text-wrap: balance; }
.lede { font-size: 19px; color: var(--text-2); margin: 0; }

/* ---------- History chapters ---------- */
.history { padding-top: 64px; }
.chapters { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.chapter-nav { position: sticky; top: 96px; }
.chapter-nav ol { position: relative; display: grid; gap: 2px; }
.chapter-nav ol::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; background: var(--raised); }
.chapter-nav a { position: relative; display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; padding: 8px 8px 8px 0; text-decoration: none; color: var(--text-2); font-size: 15px; font-weight: 500; line-height: 1.25; border-radius: 8px; transition: color .15s var(--ease); }
.chapter-nav a::before { content: ""; grid-row: span 2; align-self: center; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; background: var(--bg); border: 3px solid var(--muted); transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); z-index: 1; }
.chapter-nav a span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chapter-nav a:hover { color: var(--text); }
.chapter-nav a.is-active { color: var(--text); font-weight: 600; }
.chapter-nav a.is-active::before { background: var(--tram); border-color: var(--tram-ink); transform: scale(1.2); }
.chapter-nav a.is-done::before { border-color: var(--tram-ink); }
@media (prefers-color-scheme: dark) { .chapter-nav a.is-active::before, .chapter-nav a.is-done::before { border-color: var(--tram); } }
.chapter-list { display: grid; gap: 96px; }
.chapter { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.chapter.flip .ch-text { order: 2; }
.ch-era { font-size: 14px; font-weight: 600; color: var(--accent-ink); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.chapter h3 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 20px; text-wrap: balance; }
.ch-text > p { color: var(--text-2); }
.ch-text > p:first-of-type + p, .ch-text > p { max-width: 62ch; }
.facts { margin: 24px 0; padding: 16px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; font-size: 15px; }
.facts li { position: relative; padding-left: 124px; min-height: 1.5em; }
.facts b { position: absolute; left: 0; top: 0; width: 112px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.ch-media { margin: 0; position: sticky; top: 96px; }
.ch-media img { border-radius: 16px; aspect-ratio: 4 / 3; height: auto; }
.quote-card { background: var(--accent); color: #fff; border-radius: 16px; padding: 40px 32px; }
.quote-card blockquote { margin: 0; }
.quote-card blockquote p { font: 700 clamp(34px, 4vw, 52px)/1.05 var(--display); letter-spacing: -.02em; margin-bottom: 16px; }
.quote-card footer { font-size: 15px; opacity: .85; }
.mini-timeline { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 16px; border-top: 2px solid rgba(255, 255, 255, .35); font: 600 14px/1 var(--display); font-variant-numeric: tabular-nums; }
.mini-timeline span { position: relative; }
.mini-timeline span::before { content: ""; position: absolute; top: -23px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--tram); border: 2px solid #fff; }
.science-card { background: #1d2433; color: #e9eef5; border-radius: 16px; padding: 32px; display: grid; gap: 24px; overflow: hidden; }
.atom { position: relative; width: 180px; height: 180px; margin-inline: auto; }
.nucleus { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: var(--tram); }
.orbit { position: absolute; inset: 0; border: 2px solid rgba(233, 238, 245, .4); border-radius: 50%; }
.orbit::after { content: ""; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #e9eef5; }
.o1 { transform: rotateX(70deg) rotate(0deg); animation: spin1 8s linear infinite; }
.o2 { transform: rotateX(70deg) rotateY(60deg); animation: spin2 10s linear infinite; }
.o3 { transform: rotateX(70deg) rotateY(-60deg); animation: spin3 12s linear infinite; }
.hexlattice { height: 90px; border-radius: 10px; background-image: url("../img/hex.svg"); background-size: 28px 48px; opacity: .9; }
.sci-cap { margin: 0; font-size: 15px; opacity: .85; }

/* ---------- Tram line ---------- */
.tram-line { display: grid; gap: 24px; }
.track-scroll { overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad) * -1); padding: 0 var(--pad) 4px; }
.track-scroll::-webkit-scrollbar { display: none; }
.track { position: relative; display: grid; grid-template-columns: repeat(12, minmax(84px, 1fr)); min-width: 1020px; padding-top: 44px; }
.track-rail, .track-fill { position: absolute; top: 55px; height: 6px; border-radius: 3px; }
.track-rail { background: var(--raised); }
.track-fill { background: var(--tram); width: 0; transition: width .5s var(--ease); }
.tram-car { position: absolute; top: 2px; left: 0; width: 60px; height: 30px; transition: transform .5s var(--ease); pointer-events: none; }
.tram-car svg { width: 100%; height: 100%; }
.stop { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; background: none; border: 0; padding: 0 4px 8px; color: var(--text-2); border-radius: 12px; }
.stop-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 4px solid var(--muted); transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease); }
.stop-label { font: 600 15px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.stop-name { font-size: 13px; line-height: 1.3; color: var(--muted); text-align: center; max-width: 12ch; }
.stop:hover .stop-dot { transform: scale(1.1); }
.stop.passed .stop-dot { border-color: var(--tram-ink); }
.stop[aria-selected="true"] { color: var(--text); }
.stop[aria-selected="true"] .stop-dot { background: var(--tram); border-color: var(--tram-ink); transform: scale(1.15); }
@media (prefers-color-scheme: dark) { .stop.passed .stop-dot, .stop[aria-selected="true"] .stop-dot { border-color: var(--tram); } }
.stop-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.stop-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.stop-year { font: 700 40px/1 var(--display); color: var(--accent-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stop-card h3 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 12px; }
.stop-text { color: var(--text-2); font-size: 18px; max-width: 46rem; }
.stop-card.swap .stop-meta, .stop-card.swap h3, .stop-card.swap .stop-text { animation: rise .35s var(--ease) both; }
.stop-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.stop-nav .toggle { margin-left: auto; }

/* ---------- Map ---------- */
.map-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); font-size: 15px; font-weight: 500; color: var(--text-2); transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.chip:hover { color: var(--text); background: var(--raised); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; height: 640px; }
.map-frame { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #e8e2d6; }
.leaflet-host { position: absolute; inset: 0; }
.leaflet-host .leaflet-tile-pane { filter: saturate(.75) sepia(.12) contrast(.98); }
@media (prefers-color-scheme: dark) { .map-frame, .leaflet-container { background: #2a2622 !important; } .leaflet-host .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.5) brightness(.95) sepia(.15); } }
.map-fallback { padding: 24px; }
.place-list-wrap { display: flex; flex-direction: column; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.list-count { margin: 0; padding: 14px 16px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.place-list { overflow-y: auto; padding: 6px; flex: 1; }
.place-item button { width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; display: grid; grid-template-columns: 14px 1fr; gap: 2px 12px; align-items: baseline; transition: background-color .15s var(--ease); }
.place-item button:hover, .place-item button.is-on { background: var(--raised); }
.place-item .dot { width: 12px; height: 12px; border-radius: 50%; grid-row: span 2; align-self: center; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong); }
.place-item .pn { font-weight: 600; font-size: 15px; line-height: 1.3; }
.place-item .pc { font-size: 13px; color: var(--muted); }
.map-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.map-note a { color: inherit; }
.cat-hood { background: #8a7d70; } .cat-history { background: #b23a20; } .cat-culture { background: #2f6f8f; } .cat-music { background: #7b4fa0; } .cat-sport { background: #2f8a55; } .cat-green { background: #6c8f2f; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); display: grid; place-items: center; transition: transform .15s var(--ease); }
.pin span { transform: rotate(45deg); font: 700 12px/1 var(--display); color: #fff; }
.pin.is-on { transform: rotate(-45deg) scale(1.25); }
.leaflet-popup-content-wrapper { border-radius: 14px; background: var(--card); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.leaflet-popup-tip { background: var(--card); }
.leaflet-popup-content { margin: 16px 18px; font: 400 15px/1.5 var(--body); }
.pop-cat { font-size: 12px; font-weight: 600; text-transform: none; color: var(--muted); margin: 0 0 4px; }
.pop-title { font: 600 18px/1.2 var(--display); margin: 0 0 6px; }
.pop-text { margin: 0 0 10px; color: var(--text-2); }
.pop-link { font-weight: 600; color: var(--accent-ink); }
.leaflet-container a.pop-link { color: var(--accent-ink); }
.leaflet-container { font-family: var(--body); background: #e8e2d6; }
.leaflet-control-attribution { font-size: 11px; }
.leaflet-bar a { color: #1f1b16; }

/* ---------- Neighbourhoods ---------- */
.hoods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hood { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s var(--ease); }
.hood:hover { border-color: var(--line-strong); }
.hood img { aspect-ratio: 16 / 10; height: auto; }
.hood-wide { grid-column: span 2; }
.hood-wide img { aspect-ratio: 21 / 9; }
.hood-body { padding: 20px 22px 4px; flex: 1; }
.hood h3 { font-size: 22px; margin-bottom: 8px; letter-spacing: -.01em; }
.hood p { color: var(--text-2); font-size: 16px; }
.hood .credit { padding: 0 22px 16px; margin: 0; }

/* ---------- Sport ---------- */
.sport-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.sport-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sport-cards li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.sp-year { display: inline-block; font: 700 15px/1 var(--display); background: var(--tram); color: var(--tram-ink); padding: 6px 10px; border-radius: 6px; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.sport-cards h3 { font-size: 21px; margin-bottom: 8px; }
.sport-cards p { color: var(--text-2); margin: 0; font-size: 16px; }

/* ---------- Bees ---------- */
.bee-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.mosaic { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 4px; padding: 16px; border-radius: 20px; background: #2c2420; aspect-ratio: 1; max-width: 520px; width: 100%; }
.tile { border-radius: 4px; background: #ece4d4; border: 0; padding: 0; display: grid; place-items: center; transition: background-color .3s var(--ease), transform .15s var(--ease); }
.tile.t2 { background: #ddd0b8; } .tile.t3 { background: #c9b79a; } .tile.t4 { background: #b23a20; }
.tile svg { width: 72%; height: 72%; color: #2c2420; --bee-stripe: #e0b22a; pointer-events: none; }
.tile.secret svg { transform: rotate(180deg); }
.tile:hover { transform: scale(.92); }
.tile.lit, .tile.secret.found-tile { background: var(--tram); }
.bee-copy p { color: var(--text-2); }
.hunt { margin-top: 32px; padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.hunt h3 { font-size: 20px; margin-bottom: 8px; }
.hidden-bee { position: absolute; z-index: 5; width: 26px; height: 26px; padding: 0; border: 0; background: none; color: var(--text); --bee-stripe: var(--tram); opacity: .5; transition: opacity .15s var(--ease), transform .2s var(--ease); }
.hidden-bee.on-dark { color: #fff; }
.hidden-bee svg { width: 100%; height: 100%; }
.hidden-bee:hover, .hidden-bee:focus-visible { opacity: 1; transform: rotate(-12deg) scale(1.2); }
.hidden-bee.found { animation: away .8s var(--ease) forwards; pointer-events: none; }
.hint-on .hidden-bee:not(.found), .hint-on .tile.secret:not(.found-tile) { opacity: 1; animation: wiggle .5s ease-in-out 3; }

/* ---------- Speak Manc ---------- */
.translator { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 64px; }
.tr-box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.tr-label { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0; }
textarea { width: 100%; resize: vertical; min-height: 120px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; background: var(--bg); color: var(--text); font: 400 18px/1.5 var(--body); transition: border-color .15s var(--ease); }
textarea:focus { outline: none; border-color: var(--accent); }
.samples { display: flex; flex-wrap: wrap; gap: 8px; }
.sample { border: 1px solid var(--line-strong); background: transparent; border-radius: 8px; padding: 6px 10px; font-size: 14px; color: var(--text-2); text-align: left; transition: background-color .15s var(--ease), color .15s var(--ease); }
.sample:hover { background: var(--raised); color: var(--text); }
.tr-out { background: var(--tram); border-color: var(--tram); color: var(--tram-ink); }
.tr-out .tr-label { color: rgba(59, 44, 38, .75); }
.tr-result { font: 600 clamp(22px, 2.6vw, 30px)/1.3 var(--display); letter-spacing: -.01em; margin: 0; flex: 1; min-height: 120px; }
.tr-result mark { background: rgba(255, 255, 255, .55); color: inherit; border-radius: 4px; padding: 0 4px; }
.tr-out .btn-quiet { align-self: flex-start; background: rgba(255, 255, 255, .5); border-color: rgba(59, 44, 38, .2); color: var(--tram-ink); }
.tr-out .btn-quiet:hover { background: rgba(255, 255, 255, .75); }
.words-title { font-size: 22px; margin-bottom: 16px; }
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.word { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; display: grid; gap: 4px; transition: border-color .15s var(--ease); }
.word:hover { border-color: var(--line-strong); }
.word-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.word-term { font: 600 20px/1.2 var(--display); }
.word-say { font-size: 13px; color: var(--muted); }
.word-mean { color: var(--text-2); font-size: 15px; }
.word-eg { font-size: 15px; color: var(--text); display: none; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.word[aria-expanded="true"] { border-color: var(--accent); }
.word[aria-expanded="true"] .word-eg { display: block; animation: rise .25s var(--ease) both; }
.fun-facts { margin-top: 48px; background: var(--text); color: var(--bg); border-radius: 20px; padding: 32px; }
.fun-facts h3 { color: var(--bg); font-size: 22px; margin-bottom: 16px; }
.fun-facts ul { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
.fun-facts li { position: relative; padding-left: 24px; font-size: 16px; opacity: .92; }
.fun-facts li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--tram); }

/* ---------- Day ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--raised); margin-bottom: 32px; }
.tabs button { border: 0; background: transparent; height: 40px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.route { position: relative; display: grid; max-width: 760px; }
.route::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--raised); }
.route li { position: relative; display: grid; grid-template-columns: 30px 72px 1fr; gap: 16px; padding-bottom: 32px; }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ""; grid-column: 1; grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 4px solid var(--muted); position: relative; z-index: 1; }
.r-time { font: 600 18px/30px var(--display); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.route h3 { font-size: 21px; line-height: 30px; margin-bottom: 4px; }
.route p { color: var(--text-2); margin: 0; }
.panel { animation: rise .35s var(--ease) both; }

/* ---------- Quiz ---------- */
.quiz-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.quiz-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; position: relative; }
.q-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.q-dots span { flex: 1; height: 6px; border-radius: 3px; background: var(--raised); transition: background-color .3s var(--ease); }
.q-dots span.now { background: var(--text-2); } .q-dots span.right { background: var(--good); } .q-dots span.wrong { background: var(--bad); }
.q-count { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.q-text { font: 600 clamp(22px, 2.4vw, 28px)/1.3 var(--display); letter-spacing: -.01em; margin-bottom: 24px; min-height: 2.6em; }
.q-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.q-btns .btn { min-width: 120px; }
.q-btns .btn.right { background: var(--good); border-color: var(--good); color: #fff; }
.q-btns .btn.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.q-btns .btn[disabled]:not(.right):not(.wrong) { opacity: .5; }
.q-result { color: var(--text-2); margin: 20px 0 16px; min-height: 1.6em; }
.quiz-card.shake { animation: shake .35s ease-in-out; }

/* ---------- Sources ---------- */
.sources { padding-block: 56px; }
.src summary { cursor: pointer; list-style: none; display: grid; gap: 6px; }
.src summary::-webkit-details-marker { display: none; }
.src summary h2 { font-size: 28px; margin: 0; display: inline-flex; align-items: center; gap: 12px; }
.src summary h2::after { content: "+"; font-size: 24px; color: var(--accent-ink); transition: transform .2s var(--ease); }
.src[open] summary h2::after { transform: rotate(45deg); }
.src summary span { color: var(--text-2); }
.src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; }
.src-grid h3 { font-size: 18px; margin-bottom: 12px; }
.src-grid ul { display: grid; gap: 8px; font-size: 15px; color: var(--text-2); }
.src-grid p { font-size: 15px; color: var(--text-2); }
.src-grid a { color: var(--text); }

/* ---------- Footer ---------- */
.footer { padding-block: 48px; border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.foot-brand { font: 700 32px/1 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.foot-line { color: var(--text-2); margin: 0; }
.foot-meta { color: var(--muted); font-size: 14px; text-align: right; }
.foot-meta p:last-child { margin: 0; }

/* ---------- 404 ---------- */
.lost { min-height: 80vh; display: grid; align-content: center; padding-block: 64px; }
.lost h1 { color: var(--text); max-width: 14ch; }
.lost .sub { color: var(--text-2); }
.lost .hello { color: var(--text-2); }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bump { 40% { transform: scale(1.15); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@keyframes away { 30% { transform: scale(1.4) rotate(-15deg); opacity: 1; } 100% { transform: translate(40px, -90px) scale(.5) rotate(20deg); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes spin1 { to { transform: rotateX(70deg) rotate(360deg); } }
@keyframes spin2 { to { transform: rotateX(70deg) rotateY(60deg) rotate(360deg); } }
@keyframes spin3 { to { transform: rotateX(70deg) rotateY(-60deg) rotate(360deg); } }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-copy > * { animation: rise .6s var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: .05s; } .js .hero-copy > :nth-child(3) { animation-delay: .1s; } .js .hero-copy > :nth-child(4) { animation-delay: .15s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .chapters { grid-template-columns: 1fr; }
  .chapter-nav { position: sticky; top: 64px; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-inline: calc(var(--pad) * -1); padding: 8px var(--pad); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .chapter-nav::-webkit-scrollbar { display: none; }
  .chapter-nav ol { display: flex; gap: 6px; }
  .chapter-nav ol::before { display: none; }
  .chapter-nav a { display: inline-flex; white-space: nowrap; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; background: var(--card); }
  .chapter-nav a::before { display: none; }
  .chapter-nav a.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
  .chapter-nav a.is-active span { color: inherit; opacity: .7; }
  .chapter, .chapter.flip { grid-template-columns: 1fr; gap: 24px; }
  .chapter.flip .ch-text { order: 0; }
  .ch-media { position: static; }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-frame { height: 520px; }
  .place-list { max-height: 360px; }
  .hoods { grid-template-columns: 1fr 1fr; }
  .hood-wide { grid-column: span 2; }
  .hero-inner { grid-template-columns: 1fr; }
  .now-card { justify-self: start; }
  .sport-grid, .bee-grid, .quiz-grid { grid-template-columns: 1fr; gap: 32px; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --pad: 20px; }
  body { font-size: 16px; }
  h1 { font-size: 44px; }
  .sub { font-size: 17px; }
  .section { padding-block: 64px; }
  .hero-inner { padding-block: 72px 32px; gap: 32px; }
  .hero-media .credit { right: 8px; top: 8px; font-size: 11px; }
  .numbers { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .facts li { padding-left: 0; }
  .facts b { position: static; display: block; width: auto; }
  .hoods { grid-template-columns: 1fr; }
  .hood-wide { grid-column: auto; }
  .hood-wide img { aspect-ratio: 16 / 9; }
  .sport-cards { grid-template-columns: 1fr; }
  .translator { grid-template-columns: 1fr; }
  .fun-facts ul { grid-template-columns: 1fr; }
  .stop-card { padding: 24px; }
  .stop-nav .toggle { margin-left: 0; }
  .route li { grid-template-columns: 30px 1fr; gap: 4px 16px; }
  .r-time { grid-column: 2; }
  .route li > div { grid-column: 2; }
  .foot, .src-grid { grid-template-columns: 1fr; }
  .foot-meta { text-align: left; }
  .map-frame { height: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .top, .now-card, .map-tools, .map-layout, .translator, .quiz-card, .hidden-bee, .hunt, .stop-nav, .chapter-nav { display: none !important; }
  .hero { min-height: 0; color: #000; } .hero-media { position: static; } h1, .sub { color: #000; }
}
