/* Zootopia Transit Atlas. Every colour is a token; each token has a dark value in both dark blocks. */
:root {
  --bg: #f6f4ee; --bg2: #ecE8dc; --card: #ffffff; --ink: #15202b; --muted: #4b5866; --rule: #c9c3b4;
  --accent: #d9675a; --accent-ink: #ffffff; --focus: #1b5e8a;
  --sea: #8fd3dc; --land: #efe6cf; --hatch: #c9bfa4;
  --tun: #cfe6ee; --sah: #f1d49a; --rain: #9fd6a5; --canal: #b7dcc4; --meadow: #cfe8b0; --down: #f4e3c0; --sav: #ecc890;
  --z2: #b0418a; --z2fill: rgba(176, 65, 138, .14);
  --ours: #1d6f78; --ours-bg: #e2f1f2;
  --stop: #ffffff; --stop-line: #15202b;
  --la-land: #efe8d6; --la-fwy: #8a8f96; --la-hood: #d9675a;
  --map-ink: #15202b; --map-halo: #ffffff; --map-hover: rgba(21, 32, 43, .12); --map-pink: #b0418a; --map-pinkfill: rgba(255, 255, 255, .75); --map-sea: #2fbfd0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161d; --bg2: #161f28; --card: #1b2530; --ink: #eef2f6; --muted: #a9b6c3; --rule: #34414f;
    --accent: #f08a7d; --accent-ink: #10161d; --focus: #9fd0ff;
    --sea: #173c4a; --land: #26303a; --hatch: #3a4652;
    --tun: #2c4553; --sah: #5a4a2a; --rain: #24452e; --canal: #23413a; --meadow: #33452a; --down: #4a3f2c; --sav: #5a4526;
    --z2: #f08fd0; --z2fill: rgba(240, 143, 208, .16);
    --ours: #7fd3db; --ours-bg: #15343a;
    --stop: #10161d; --stop-line: #eef2f6;
    --la-land: #1f2830; --la-fwy: #75808c; --la-hood: #f08a7d;
    --map-ink: #15202b; --map-halo: #ffffff; --map-hover: rgba(21, 32, 43, .12); --map-pink: #b0418a; --map-pinkfill: rgba(255, 255, 255, .75); --map-sea: #2fbfd0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10161d; --bg2: #161f28; --card: #1b2530; --ink: #eef2f6; --muted: #a9b6c3; --rule: #34414f;
  --accent: #f08a7d; --accent-ink: #10161d; --focus: #9fd0ff;
  --sea: #173c4a; --land: #26303a; --hatch: #3a4652;
  --tun: #2c4553; --sah: #5a4a2a; --rain: #24452e; --canal: #23413a; --meadow: #33452a; --down: #4a3f2c; --sav: #5a4526;
  --z2: #f08fd0; --z2fill: rgba(240, 143, 208, .16);
  --ours: #7fd3db; --ours-bg: #15343a;
  --stop: #10161d; --stop-line: #eef2f6;
  --la-land: #1f2830; --la-fwy: #75808c; --la-hood: #f08a7d;
  --map-ink: #15202b; --map-halo: #ffffff; --map-hover: rgba(21, 32, 43, .12); --map-pink: #b0418a; --map-pinkfill: rgba(255, 255, 255, .75); --map-sea: #2fbfd0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 'Archivo', system-ui, sans-serif; overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .4em; }
h2 { font-weight: 800; font-size: clamp(28px, 5vw, 42px); letter-spacing: -.02em; }
h3 { font-weight: 700; font-size: 20px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 2px solid var(--ink); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.roundel { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--accent); font: 800 14px 'Archivo', sans-serif; }
.bar nav { display: flex; align-items: center; gap: 2px; font: 600 16px 'Archivo Narrow', sans-serif; }
.bar nav a { white-space: nowrap; text-decoration: none; padding: 10px 6px; min-height: 44px; display: inline-flex; align-items: center; }
.bar nav a:hover { text-decoration: underline; }
.mode { width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; display: inline-grid; place-items: center; border-radius: 50%; }
.hide-sm { display: none !important; }
@media (min-width: 820px) { .hide-sm { display: inline-flex !important; } }

/* hero */
.hero { position: relative; padding: 40px 0 70px; overflow: hidden; }
.kicker { font: 600 15px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 14px; }
.hero h1 { font-weight: 800; font-size: clamp(40px, 9vw, 92px); letter-spacing: -.035em; margin: 0; }
.m2 { font: italic 500 clamp(21px, 3.4vw, 32px)/1.25 'Archivo Narrow', sans-serif; color: var(--ours); margin: 10px 0 22px; max-width: 22em; }
.lede { font-size: clamp(17px, 2.2vw, 20px); max-width: 38em; margin: 0 0 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 2px solid var(--ink); text-decoration: none; font-weight: 700; background: none; color: inherit; cursor: pointer; font-family: inherit; font-size: 16px; }
.btn.primary { background: var(--ink); color: var(--bg); }
.hero-lines { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60px; }
.hl { fill: none; stroke-width: 8; }
.hl.sav { stroke: #d9a43a; } .hl.tun { stroke: #38b8c8; } .hl.sah { stroke: #d9675a; } .hl.rain { stroke: #3a9e48; }

/* sections */
.sec { padding: 48px 0; border-top: 2px solid var(--ink); }
.sec.alt { background: var(--bg2); }
.sec-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 800 20px 'Archivo', sans-serif; margin: 2px 0 0; }
.sub { color: var(--muted); max-width: 46em; margin: 0; }

/* map */
.layers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); color: inherit; font: 600 16px 'Archivo Narrow', sans-serif; cursor: pointer; }
.chip[aria-pressed="false"] { opacity: .55; background: none; }
.chip[aria-pressed="false"] .sw { visibility: hidden; }
.sw { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--ink); }
.sw-d { background: var(--sah); } .sw-s { background: #d9675a; border-radius: 50%; } .sw-z { background: var(--z2fill); border-style: dashed; border-color: var(--z2); }
.map-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .map-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.stage { min-width: 0; }
#city { width: 100%; height: auto; display: block; border: 2px solid var(--ink); border-radius: 8px; background: var(--map-sea); touch-action: manipulation; }
.sea { fill: var(--sea); }
.land { fill: var(--land); }
.hatch { stroke: var(--hatch); stroke-width: 3; }
.dist path.hit { fill: transparent; stroke: transparent; stroke-width: 4; cursor: pointer; }
.outlined .dist path.hit { stroke: var(--map-ink); stroke-dasharray: 8 6; }
.dist:hover path.hit, .dist.on path.hit { fill: var(--map-hover); stroke: var(--map-ink); }
.dist:focus-visible path.hit { stroke: var(--focus); stroke-width: 6; fill: var(--map-hover); }
.dist text { font: 700 22px 'Archivo Narrow', sans-serif; fill: var(--ink); text-transform: uppercase; letter-spacing: .05em; pointer-events: none; paint-order: stroke; stroke: var(--land); stroke-width: 4px; }
.dist:focus { outline: none; }
.f-tun { fill: var(--tun); } .f-sah { fill: var(--sah); } .f-rain { fill: var(--rain); } .f-canal { fill: var(--canal); } .f-meadow { fill: var(--meadow); } .f-down { fill: var(--down); } .f-sav { fill: var(--sav); }
.line { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.stn circle { fill: var(--stop); stroke: var(--stop-line); stroke-width: 3; }
.stn text { font: 600 13px 'Archivo Narrow', sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--land); stroke-width: 3px; }
.wall { stroke: var(--map-pink); stroke-width: 6; stroke-dasharray: 2 8; stroke-linecap: round; }
.tube { fill: none; stroke: var(--map-pink); stroke-width: 5; stroke-dasharray: 10 8; stroke-linecap: round; }
.spot { cursor: pointer; }
.spot:focus { outline: none; }
.spot .ring { fill: var(--map-halo); stroke: var(--map-ink); stroke-width: 3; }
.spot.z2 .ring { fill: var(--map-pinkfill); stroke: var(--map-pink); stroke-dasharray: 5 4; }
.spot .dot { fill: var(--map-ink); }
.spot.z2 .dot { fill: var(--map-pink); }
.spot text { font: 700 15px 'Archivo Narrow', sans-serif; fill: var(--map-ink); paint-order: stroke; stroke: var(--map-halo); stroke-width: 5px; }
.spot:hover .ring, .spot:focus-visible .ring, .spot.on .ring { stroke-width: 5; }
.spot:focus-visible .ring { stroke: var(--focus); }
.cmp { fill: var(--card); stroke: var(--ink); stroke-width: 2; } .cmp-n { fill: var(--ink); } .cmp-t { font: 700 14px 'Archivo', sans-serif; fill: var(--ink); }
[data-hidden="true"] { display: none; }
.hint { font: 500 14px 'Archivo Narrow', sans-serif; color: var(--muted); margin: 8px 0 0; }
.panel { background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 16px 18px; align-self: start; }
.panel h3 { font-size: 24px; }
.panel .meta { font: 600 14px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.panel dl { margin: 0; } .panel dt { font: 700 14px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 10px; } .panel dd { margin: 2px 0 0; }
.panel .src { margin-top: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; font: 600 15px 'Archivo Narrow', sans-serif; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 26px; height: 7px; border-radius: 4px; }
.list-h { margin-top: 24px; }
.place-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.place-list button { width: 100%; min-height: 44px; text-align: left; padding: 8px 12px; border: 2px solid var(--rule); border-radius: 8px; background: var(--card); color: inherit; font: 600 16px 'Archivo Narrow', sans-serif; cursor: pointer; }
.place-list button:hover { border-color: var(--ink); }
.place-list .z2 { border-style: dashed; border-color: var(--z2); }

/* official maps */
.maps { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .maps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mapfig.wide { grid-column: 1 / -1; } }
.mapfig { margin: 0; background: var(--card); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.mapfig figcaption { padding: 12px 14px 14px; font-size: 16px; }
.badge { display: inline-block; font: 700 13px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); margin-right: 4px; }
.credit { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.note { margin-top: 24px; border-left: 6px solid var(--accent); padding: 4px 0 4px 16px; max-width: 46em; }

/* districts and readings */
.reading { background: var(--ours-bg); border-left: 6px solid var(--ours); padding: 14px 18px; border-radius: 0 8px 8px 0; max-width: 50em; margin-bottom: 24px; }
.reading p { margin: 0 0 .8em; } .reading p:last-child { margin-bottom: 0; }
.tag { font: 700 14px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.tag.ours, .col-h.ours { color: var(--ours); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.card .band { height: 12px; border-bottom: 2px solid var(--ink); }
.card .in { padding: 12px 14px 14px; }
.card p { margin: 0 0 .5em; font-size: 16px; }
.card .lab { font: 700 13px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: block; }
.timeline { list-style: none; margin: 0 0 12px; padding: 0 0 0 26px; position: relative; max-width: 46em; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 6px; border-radius: 3px; background: var(--z2); }
.timeline li { position: relative; margin-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--stop); border: 3px solid var(--stop-line); }
.timeline .t { font: 700 14px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.timeline p { margin: 2px 0 0; }
.src { font-size: 14px; color: var(--muted); }
.two { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; } }
.col-h { font: 700 15px 'Archivo Narrow', sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.crit { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.crit li { background: var(--card); border: 2px solid var(--rule); border-radius: 8px; padding: 12px 14px; }
.crit.ours li { background: var(--ours-bg); border-color: var(--ours); }
.sources { padding-left: 20px; }
.sources li { margin-bottom: 6px; }
.fine { color: var(--muted); font-size: 15px; max-width: 50em; }
.foot { border-top: 2px solid var(--ink); padding: 18px 0 28px; font-size: 15px; color: var(--muted); }
.foot p { margin: 0; }

/* map scrolls inside its frame on small screens */
.scroller { overflow-x: auto; border-radius: 8px; }
@media (max-width: 759px) { #city { min-width: 720px; } }

/* lessons */
.lessons { list-style: none; counter-reset: l; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.lessons li { counter-increment: l; position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 14px 16px 14px 62px; }
.lessons li::before { content: counter(l); position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--accent); display: grid; place-items: center; font: 800 16px 'Archivo', sans-serif; }
.lessons h3 { font-size: 19px; margin-bottom: .3em; }
.lessons p { margin: 0; font-size: 16px; }

/* Los Angeles */
#la-map { width: 100%; height: auto; display: block; border: 2px solid var(--ink); border-radius: 8px; background: var(--la-land); }
@media (max-width: 759px) { #la-map { min-width: 640px; } }
.fwy { fill: none; stroke: var(--la-fwy); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.fwy-gap { fill: none; stroke: var(--la-fwy); stroke-width: 6; stroke-dasharray: 4 10; stroke-linecap: round; }
.shield rect { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.shield text, .la-lab { font: 700 15px 'Archivo Narrow', sans-serif; fill: var(--ink); }
.la-lab { paint-order: stroke; stroke: var(--la-land); stroke-width: 5px; }
.la-area { font: 700 14px 'Archivo Narrow', sans-serif; letter-spacing: .12em; fill: var(--muted); paint-order: stroke; stroke: var(--la-land); stroke-width: 5px; pointer-events: none; }
.rail { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.rail.dash { stroke-dasharray: 10 8; }
.rail-lab { font: 800 14px 'Archivo', sans-serif; fill: #ffffff; }
.hood { cursor: pointer; }
.hood:focus { outline: none; }
.hood .ring { fill: var(--la-hood); stroke: var(--ink); stroke-width: 3; }
.hood:hover .ring, .hood.on .ring { stroke-width: 6; }
.hood:focus-visible .ring { stroke: var(--focus); stroke-width: 6; }
.sw-f { background: var(--la-fwy); }
.pairs { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.pairs li { display: grid; gap: 4px 18px; grid-template-columns: minmax(0, 1fr); background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 12px 16px; }
@media (min-width: 760px) { .pairs li { grid-template-columns: 220px minmax(0, 1fr); } }
.pairs p { margin: 0; }
.pairs .z { font-weight: 800; }
.plain { margin: 0; padding-left: 20px; } .plain li { margin-bottom: 6px; }
