/* ==========================================================================
   Fancy City Transit: the /read/ menu as a subway map.
   Wide screens get the full service map; narrower ones get a door-strip map
   in each line's panel. Loaded after fancy.css on /read/ only.
   Each line's elements carry --c, the line color.
   ========================================================================== */

.transit { padding-block: 40px 64px; display: grid; gap: 32px; }
.tl-fallback { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 20px; font-weight: 800; }

/* --- the service map (wide screens) ---------------------------------------- */
.tmap-frame { border: 3px solid var(--ink); display: none; position: relative; }
/* keyboard users can jump past the 30-odd stops to the line panels */
.skip-map { position: absolute; left: -9999px; }
.skip-map:focus { left: 12px; top: 8px; z-index: 5; background: var(--paper); padding: 6px 10px; font-weight: 800; }
.tl-panels:focus { outline: none; }
.tmap-head { background: var(--ink); color: var(--paper); padding: 10px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; align-items: center; }
.tmap-head h2 { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tmap-head span { font-size: 13px; font-weight: 700; color: var(--on-ink-mute); }
.tmap { position: relative; width: 1080px; margin: 0 auto; background: #f6f6f4; }
.tmap-frame .tmap-bg { background: #f6f6f4; }

.tm-name { position: absolute; left: 20px; width: 220px; display: flex; gap: 12px; align-items: center; }
.tm-name .bullet { font-size: 26px; }
.tm-name a { display: block; font-size: 17px; font-weight: 800; line-height: 1.15; text-decoration: none; }
.tm-name a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tm-name small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

.tm-line { position: absolute; height: 14px; background: var(--c); }
.tm-line.start { border-radius: 7px 0 0 7px; }
.tm-line.diag { transform-origin: 0 50%; }
.tm-line.dash { background: repeating-linear-gradient(90deg, var(--c) 0 14px, transparent 14px 24px); }
.tm-joint { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--c); translate: -50% -50%; }

.tm-stop { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--ink); translate: -50% -50%; z-index: 1; }
.tm-stop.end { width: 22px; height: 22px; box-shadow: inset 0 0 0 5px var(--ink); }
.tm-stop:hover, .tm-stop:focus-visible { box-shadow: inset 0 0 0 7px var(--ink); }
.tm-stop.end:hover, .tm-stop.end:focus-visible { box-shadow: inset 0 0 0 11px var(--ink); }
.tm-stop:focus-visible { outline-offset: 2px; }
.tm-lab { position: absolute; translate: -50% 0; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }

.tm-note { position: absolute; width: 170px; display: grid; gap: 2px; }
.tm-note b { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tm-note span { font-size: 13px; font-weight: 600; color: var(--mute); }

.tm-central { position: absolute; width: 40px; border: 5px solid var(--ink); border-radius: 20px; background: var(--paper); z-index: 1; }
.tm-central-lab { position: absolute; width: 200px; display: grid; gap: 8px; justify-items: start; }
.tm-central-lab small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.tm-central-lab b { font-size: 22px; font-weight: 900; line-height: 1.05; }
.tm-central-lab a { font-size: 15px; font-weight: 800; text-underline-offset: 4px; }

/* you are here: the reader's saved place on a line */
.tm-flag { position: absolute; translate: -50% 0; background: var(--ink); color: var(--paper); padding: 6px 10px; display: grid; white-space: nowrap; font-size: 14px; font-weight: 800; line-height: 1.3; z-index: 2; }
.tm-flag small, .ts-flag small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-mute); }
.tm-stem { position: absolute; width: 2px; height: 28px; translate: -50% 0; background: var(--ink); }
.tm-here, .ts-here { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 6px var(--ink), 0 0 0 4px var(--advisory); translate: -50% -50%; z-index: 2; pointer-events: none; }

/* hovering or focusing a stop previews its page */
.tm-tip { position: absolute; width: 148px; padding: 8px; background: var(--paper); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .45), 0 0 0 1px var(--rule); display: grid; gap: 6px; z-index: 3; pointer-events: none; }
.tm-tip img { display: block; width: 132px; height: 120px; object-fit: cover; object-position: center top; background: var(--rule); }
.tm-tip span { font-size: 12px; font-weight: 800; }

.tm-legend { position: absolute; left: 20px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 12px; font-weight: 700; color: var(--mute); }
.tm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tm-legend i { display: inline-block; flex: none; }
.lg-stop { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--ink); background: var(--paper); }
.lg-here { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--ink), 0 0 0 3px var(--advisory); background: var(--paper); }
.lg-dash { width: 34px; height: 8px; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 13px); }
.lg-transfer { width: 12px; height: 26px; border-radius: 6px; box-shadow: inset 0 0 0 3px var(--ink); background: var(--paper); }

/* --- line panels ------------------------------------------------------------ */
.tl-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.tl-panel { border: 1px solid var(--rule); display: flex; flex-direction: column; min-width: 0; }
.tl-band { background: var(--ink); color: var(--paper); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.tl-band .bullet { font-size: 22px; }
.tl-band h2 { font-size: 19px; font-weight: 900; line-height: 1.15; }
.tl-band a { text-decoration: none; }
.tl-band a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tl-body { padding: 20px 18px 22px; display: grid; gap: 14px; justify-items: start; }
.tl-body > .label { color: var(--ink); }
.tl-credits { font-size: 15px; color: var(--mute); }
.tl-thumb { display: block; width: 100%; height: 96px; object-fit: cover; object-position: center top; box-shadow: 0 0 0 1px var(--rule); }
.tl-body .btns { gap: 10px 18px; }
.tl-body .btn.blue .arr { color: var(--blue); }
.tl-body .btn.red .arr { color: var(--red); }
.tl-link { font-size: 15px; font-weight: 800; text-underline-offset: 4px; }

/* --- door-strip map (narrow screens) --------------------------------------- */
.tstrip { position: relative; width: 100%; height: 106px; background: #f6f6f4; }
.ts-line { position: absolute; top: 58px; height: 8px; background: var(--c); }
.ts-line.start { border-radius: 4px 0 0 4px; }
.ts-line.dash { background: repeating-linear-gradient(90deg, var(--c) 0 9px, transparent 9px 15px); }
.ts-stop { position: absolute; top: 62px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2.5px var(--ink); translate: -50% -50%; z-index: 1; }
.ts-stop.end { width: 16px; height: 16px; box-shadow: inset 0 0 0 4px var(--ink); }
/* a bigger, invisible tap area around each stop */
.ts-stop::after { content: ""; position: absolute; inset: -10px -6px; }
.ts-lab { position: absolute; top: 74px; translate: -50% 0; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
/* cover labels sit on a row of their own, under the page numbers */
.ts-lab.first, .ts-lab.last { top: 88px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.ts-lab.first { translate: -6px 0; }
.ts-lab.last { translate: calc(-100% + 6px) 0; }
.ts-cap { position: absolute; left: 95%; top: 48px; width: 12px; height: 28px; translate: -50% 0; border-radius: 6px; box-shadow: inset 0 0 0 3px var(--ink); background: var(--paper); z-index: 1; }
.ts-note { position: absolute; top: 30px; right: 2%; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ts-flag { position: absolute; top: 8px; background: var(--ink); color: var(--paper); padding: 3px 8px; font-size: 11px; font-weight: 800; white-space: nowrap; display: flex; gap: 6px; align-items: baseline; z-index: 2; }
.ts-flag small { font-size: 9px; }
.ts-flag.left { translate: -12px 0; }
.ts-flag.right { translate: calc(-100% + 12px) 0; }
.ts-stem { position: absolute; top: 29px; width: 2px; height: 20px; translate: -50% 0; background: var(--ink); }
.ts-here { top: 62px; width: 18px; height: 18px; box-shadow: inset 0 0 0 4px var(--ink), 0 0 0 3px var(--advisory); }

/* Fancy City Central, for screens without the full map */
.central-band { background: var(--ink); color: var(--paper); padding: 28px 22px 30px; display: grid; gap: 10px; }
.central-band small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-mute); display: flex; align-items: center; gap: 12px; }
.central-band small i { width: 14px; height: 32px; border-radius: 7px; box-shadow: inset 0 0 0 3px var(--paper); }
.central-band h2 { font-size: 30px; font-weight: 900; }
.central-band a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-top: 1px solid #2c2d31; font-weight: 800; text-decoration: none; }
.central-band a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The full map needs 1080px of page; below that the strips take over. */
@media (min-width: 1120px) {
  .tmap-frame { display: block; }
  .tstrip, .central-band { display: none; }
}
@media (max-width: 760px) {
  .transit { padding-block: 24px 44px; gap: 24px; }
  .tl-panels { grid-template-columns: minmax(0, 1fr); }
  .tl-body .btns { display: grid; width: 100%; }
  .tl-body .btn { justify-content: space-between; }
}
