/* ============================================================================
   SubwaySite — MAP STYLES
   ----------------------------------------------------------------------------
   Presentation only. Nothing here knows about specific projects; the three
   line colours come from js/data.js and are applied as inline styles by the
   engine.

   Theme values live in the custom properties below — change them in one place
   and the whole map follows.
   ============================================================================ */

/* ============================================================================
   SubwaySite — FRAMEWORK FILE.  You should not need to edit this.
   ----------------------------------------------------------------------------
   This file is generic: it renders whatever your configuration and content
   files describe, and knows nothing about any particular business.

   To change your website, edit these three instead:
       js/site.config.js   name, colours, wording, features, start view
       js/network.js       your railway lines and background stations
       js/data.js          your stations, text, photographs and videos

   See docs/SETUP.md for a walkthrough.
   ============================================================================ */

:root {
  --ss-bg: #0d141c;
  --ss-bg-soft: #121c27;
  --ss-surface: #16212e;
  --ss-surface-raised: #1c2938;
  --ss-border: #26374a;
  --ss-text: #e8eef6;
  --ss-text-muted: #93a4b8;
  --ss-text-faint: #6d7f93;
  --ss-ink: #0d141c;
  /* reading and feedback */
  --ss-panel-text: #c9d6e4;
  --ss-badge-good-border: #3c5a3f;
  --ss-badge-good-bg: rgba(54, 179, 126, 0.12);
  --ss-badge-good-dot: #36b37e;
  --ss-notice-warn-border: #8a5a1a;
  --ss-notice-warn-bg: rgba(138, 90, 26, 0.14);
  --ss-notice-warn-text: #f0d4a8;
  --ss-notice-bad-border: #8a2f2f;
  --ss-notice-bad-bg: rgba(138, 47, 47, 0.16);
  --ss-notice-bad-text: #f3c6c6;
  /* how much map stays visible round the photo viewer */
  --ss-viewer-margin: 56px;
  --ss-scrim: rgba(4, 7, 11, 0.78);
  --ss-reader-bg: rgba(6, 9, 13, 0.90);
  --ss-reader-text: #ffffff;
  --ss-accent: #4c8dff;
  /* Derived from --ss-accent by the engine, so every tinted surface follows
     the configured accent colour. */
  --ss-accent-faint: rgba(76, 141, 255, 0.10);
  --ss-accent-soft: rgba(76, 141, 255, 0.16);
  --ss-accent-strong: rgba(76, 141, 255, 0.28);
  --ss-radius: 14px;
  --ss-radius-sm: 9px;

  /* Map surfaces. The engine fills these from the active theme palette; the
     values here are the dark default for a site that sets no theme at all. */
  --ss-grid: #16202c;
  --ss-corridor: #0f1822;
  --ss-node-fill: #0d141c;
  --ss-node-ring: #93a4b8;
  --ss-hub-fill: #e8b04b;
  --ss-hub-ring: #0d141c;
  --ss-label-halo: #0d141c;
  --ss-network-node: #c9d6e4;
  --ss-network-station-ring: #8d8574;
  --ss-interchange-ink: #e8eef6;
  --ss-symbol-fill: #0d141c;
  --ss-symbol-ring: #93a4b8;
  --ss-symbol-ink: #93a4b8;

  /* The floating chrome: chips, legend and controls are translucent so the map
     shows faintly through them, which is what keeps the map feeling like one
     continuous surface rather than a page with panels on it. */
  --ss-chrome: rgba(22, 33, 46, 0.88);
  --ss-chrome-soft: rgba(22, 33, 46, 0.80);
  --ss-shadow: rgba(0, 0, 0, 0.35);
  --ss-shadow-strong: rgba(0, 0, 0, 0.55);
  --ss-hover-border: #34495f;

  --ss-panel-width: 460px;
  --ss-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
             Arial, sans-serif;
  --ss-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* The map is the page, so the document itself never scrolls. */
html, body { margin: 0; padding: 0; height: 100%; }

body {
  overflow: hidden;
  background: var(--ss-bg);
  color: var(--ss-text);
  font-family: var(--ss-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The element that carries the theme RE-STARTS inheritance.

   Without this the chain runs body -> #site -> panel, and body resolved
   var(--ss-text) against :root — the no-theme palette — so a light page
   inherited dark near-white text. Anything a theme defines and that
   inherits (colour, font, size) has to be set here as well as on body. */
[data-ss-theme] {
  background: var(--ss-bg);
  color: var(--ss-text);
  font-family: var(--ss-font);
  font-size: 16px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------- map */

/* Full-bleed: no max-width, no margin, no border, no padding. */
.ss-map { position: fixed; inset: 0; }

.ss-map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, var(--ss-accent-faint), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(242, 128, 58, 0.07), transparent 55%),
    var(--ss-bg-soft);
}

/* The pan/zoom viewport. Its height is set by MapCamera to the map's fitted
   height, so at 100% the map looks exactly as it always did; zooming in simply
   makes the content overflow this box instead of growing the page. */
.ss-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ss-map-viewport:focus { outline: none; }

.ss-map-viewport:focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: -2px;
  border-radius: var(--ss-radius-sm);
}

.ss-map-viewport.is-panning { cursor: grabbing; }
.ss-map-viewport.is-panning .ss-station,
.ss-map-viewport.is-panning .ss-station-label { cursor: grabbing; }

/* The content keeps its natural size and is moved with a transform.
   Layer promotion while moving is handled by MapCamera (see _boost), not here:
   a permanent will-change stops the browser re-rasterising after a zoom and
   leaves scaled-up vector content blurry. */
.ss-map-viewport svg {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
}

/* Fallback used when js/map-camera.js is absent: the old static behaviour. */
.ss-map-stage--static { overflow-x: auto; }

.ss-map-stage--static svg {
  display: block;
  width: 100%;
  min-width: 780px;   /* keeps labels readable on phones; the stage scrolls */
  height: auto;
}

/* ------------------------------------------------------------------ legend */

/* A dropdown, not a bar. One button at rest; the ten lines appear when it is
   opened. The old permanent row of chips cost the map more room than the
   control was worth. */
.ss-legend { position: relative; }

.ss-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1;
  color: var(--ss-text);
  background: var(--ss-chrome);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px var(--ss-shadow);
  transition: border-color 0.15s, color 0.15s;
}

.ss-legend-toggle:hover { border-color: var(--ss-hover-border); }

.ss-legend-toggle:focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: 2px;
}

.ss-legend-caret {
  flex: 0 0 auto;
  color: var(--ss-text-muted);
  transition: transform 0.18s ease;
}

.ss-legend.is-open .ss-legend-caret { transform: rotate(180deg); }

.ss-legend-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 250px;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  box-shadow: 0 18px 44px var(--ss-shadow-strong);
  transform-origin: top right;
  animation: ss-menu-in 0.14s ease;
}

.ss-legend-menu[hidden] { display: none; }

@keyframes ss-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.ss-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  color: var(--ss-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--ss-radius-sm);
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}

.ss-legend-item:hover,
.ss-legend-item:focus-visible {
  color: var(--ss-text);
  background: var(--ss-surface-raised);
  outline: none;
}

.ss-legend-item:focus-visible { border-color: var(--ss-accent); }

.ss-legend-item.is-active {
  color: var(--ss-text);
  background: var(--ss-surface-raised);
  border-color: var(--ss-accent);
}

.ss-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ss-legend-name { flex: 1 1 auto; }

.ss-legend-count { font-size: 12px; color: var(--ss-text-faint); }

/* A line chip inside a station window: same look, but it is a button now, so
   it can be hovered, focused and reached by keyboard. */
.ss-badge-line {
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ss-badge-line:hover,
.ss-badge-line:focus-visible {
  color: var(--ss-text);
  border-color: var(--ss-accent);
  background: var(--ss-surface);
  outline: none;
}

.ss-badge-line:focus-visible {
  box-shadow: 0 0 0 2px var(--ss-accent-faint);
}

.ss-badge-line.is-active {
  color: var(--ss-text);
  border-color: var(--ss-accent);
  background: var(--ss-surface);
}

/* ---------------------------------------------------------------- controls */

.ss-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ss-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 13.5px;
  line-height: 1;
  color: var(--ss-text-muted);
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ss-control:hover {
  color: var(--ss-text);
  background: var(--ss-surface-raised);
  border-color: var(--ss-hover-border);
}

.ss-control:active { transform: translateY(1px); }

.ss-control:focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: 2px;
}

.ss-zoom-readout {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  color: var(--ss-text-faint);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------- svg: network layer */

/* The decorative environment. Everything here is muted and thinner than the
   interactive map so the project lines and stations read on top of it.

   A printed transit diagram works because the working lines are the only
   confident marks on the page: the rest of the network is present, dense and
   legible, but visibly quieter. That balance is the whole trick — the
   background must be interesting enough to look like a real network and faded
   enough that a newcomer still finds the coloured lines first. */

/* Nothing in the decorative layer is a control. It is scenery: no pointer
   cursor, no hover state, no click target, and no way to open a gallery. */
.ss-network-lines,
.ss-network-nodes,
.ss-network-labels,
.ss-symbols,
.ss-station-links,
.ss-grid {
  pointer-events: none;
  cursor: default;
}

.ss-network-line {
  transition: opacity 0.25s ease;
  /* `--ss-bg-contrast` comes from config.background.contrast. The base 0.62
     keeps the decorative routes present but clearly quieter than a working
     line; raising the dial brings the whole background up together. */
  opacity: calc(0.52 * var(--ss-bg-contrast, 1));
}

.ss-network-line.is-dimmed { opacity: 0.10; }

/* A background station is a real, visible mark: a filled disc with a ring
   round it, not a speck. Two lines meeting there makes it an interchange, and
   that gets a second ring inside the first — the way a printed diagram shows
   somewhere you can change trains. */
.ss-network-node {
  fill: var(--ss-network-node, #c9d6e4);
  fill-opacity: calc(0.55 * var(--ss-bg-contrast, 1));
  stroke: var(--ss-network-station-ring, #8d8574);
  stroke-width: 1.8;
  stroke-opacity: calc(0.75 * var(--ss-bg-contrast, 1));
  transition: opacity 0.25s ease;
}

.ss-network-node.is-interchange {
  fill: var(--ss-bg-soft);
  fill-opacity: 1;
  stroke-width: 2.6;
}

/* the inner ring of a double-ring interchange */
.ss-network-node-inner {
  fill: none;
  stroke: var(--ss-network-station-ring, #8d8574);
  stroke-width: 2;
  opacity: 0.95;
}

/* A background terminus wears a short bar across the end of its line. */
.ss-network-terminus {
  stroke: var(--ss-network-station-ring, #8d8574);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0.95;
}

.ss-network-node.is-dimmed,
.ss-network-node-inner.is-dimmed,
.ss-network-terminus.is-dimmed { opacity: 0.12; }

.ss-network-label {
  font-family: var(--ss-font);
  font-size: 10.5px;
  fill: var(--ss-text-muted);
  fill-opacity: calc(0.68 * var(--ss-bg-contrast, 1));
  user-select: none;
  transition: opacity 0.25s ease;
  /* a halo in the map ground keeps a decorative name readable where it
     crosses a route */
  paint-order: stroke;
  stroke: var(--ss-label-halo);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.ss-network-label.is-dimmed { opacity: 0.12; }

/* Level of detail: the background names are noise once the map is zoomed out,
   so the engine drops a class on the root rather than rebuilding the DOM. */
.ss-map.ss-network-labels-hidden .ss-network-labels { display: none; }

/* ------------------------------------------------------------- svg: routes */

/* The light channel each line sits in. Drawn first and wider, it separates
   two lines running side by side and keeps a line legible where it crosses
   the background network — the same job the white casing does on a printed
   Underground diagram. */
.ss-line-casing {
  fill: none;
  stroke: var(--ss-corridor);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.25s ease;
}

.ss-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.25s ease;
}

.ss-line.is-dimmed,
.ss-line-casing.is-dimmed { opacity: 0.10; }

.ss-interchange-link { opacity: 0.55; }

/* ---------------------------------------------------------- svg: stations */

.ss-station { cursor: pointer; }

/* The Underground marker: a solid white disc with a ring in the line's colour.
   The engine draws it as two circles, so the fill and the ring are separate
   elements and either can be restyled per theme. */
.ss-station .ss-station-dot {
  fill: var(--ss-node-fill);
  stroke-width: 3.5;
  transition: opacity 0.25s ease, r 0.15s ease;
}

.ss-station { transition: opacity 0.25s ease; }
.ss-station.is-dimmed { opacity: 0.2; }

/* The marker grows under the pointer. `r` is a CSS geometry property, so it
   needs a unit — a bare `r: 10` is invalid and silently dropped, which is why
   this never worked before. The start marker has its own larger size so
   hovering it never shrinks it. */
.ss-station-dot { transition: r 0.12s ease, stroke 0.12s ease; }
.ss-station.is-hovered .ss-station-dot { r: 10px; }
.ss-station.is-interchange.is-hovered .ss-station-dot { r: 13px; }
.ss-station.is-start.is-hovered .ss-station-dot { r: 16px; }

@media (prefers-reduced-motion: reduce) {
  .ss-station-dot { transition: none; }
}

.ss-station.is-active .ss-station-dot {
  fill: var(--ss-text);
  stroke-width: 4;
}

.ss-station:focus { outline: none; }

.ss-station:focus-visible .ss-station-dot {
  stroke: var(--ss-accent);
  stroke-dasharray: 3 3;
}

/* YOU ARE HERE. The one marker on the map that is filled rather than hollow,
   so it reads as a destination and not just another stop.

   A hub that several lines share wears a ring per line, and each ring keeps
   its own line's colour — so for a shared hub neither the fill NOR the stroke
   is set here, or every ring would come out in the hub colour and the ten
   lines meeting there would be indistinguishable. */
.ss-station.is-start.is-lines-1 .ss-station-dot,
.ss-station.is-start.is-lines-0 .ss-station-dot {
  fill: var(--ss-hub-fill);
  stroke: var(--ss-hub-ring);
  stroke-width: 3;
}

.ss-station-label {
  font-family: var(--ss-font);
  font-size: 13px;
  font-weight: 500;
  fill: var(--ss-text-muted);
  cursor: pointer;
  transition: opacity 0.25s ease, fill 0.15s ease;
  user-select: none;
  /* A halo in the map background lets a project label sit over a route or a
     background label without becoming unreadable. */
  paint-order: stroke;
  stroke: var(--ss-label-halo);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.ss-station-label.is-dimmed { opacity: 0.18; }
.ss-station-label.is-active { fill: var(--ss-text); font-weight: 700; }

/* The hub's label carries the same weight as the marker. */
.ss-station.is-start + .ss-station-label,
.ss-station-label.is-start {
  fill: var(--ss-text);
  font-weight: 700;
  font-size: 13.5px;
}

/* ------------------------------------------------------------------- panel */

/* A free-floating window, not an edge panel. Its position and size are set by
   the engine (see _positionPanel) so it sits beside its station with a margin
   on every side, leaving the map visible all the way around it. There is no
   backdrop: the map stays live, and another station can be opened without
   closing this one first. */
.ss-panel {
  position: fixed;
  left: 16px;
  top: 16px;
  width: 440px;
  height: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  box-shadow: 0 26px 64px var(--ss-shadow-strong);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transform-origin: 50% 50%;
  /* visibility flips instantly on open and only after the fade on close, so a
     closed window's contents are never reachable by Tab or a screen reader. */
  visibility: hidden;
  transition: opacity 0.2s ease,
              transform 0.22s cubic-bezier(0.32, 0.72, 0, 1),
              visibility 0s linear 0.22s;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 50;
  padding: 24px 24px 34px;
}

.ss-panel.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.2s ease,
              transform 0.22s cubic-bezier(0.32, 0.72, 0, 1),
              visibility 0s;
}

/* Narrow screens: a bottom sheet, so most of the map stays visible above it.
   The engine adds `is-sheet` and stops setting left/top. */
@media (max-width: 640px) {
  .ss-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    height: auto;
    max-height: min(64vh, 540px);
    transform: translateY(14px);
  }
  .ss-panel.is-open { transform: none; }
}

body.ss-lightbox-open { overflow: hidden; }

.ss-panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ss-text-muted);
  background: var(--ss-surface-raised);
  border: 1px solid var(--ss-border);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.ss-panel-close:hover { color: var(--ss-text); background: var(--ss-surface-raised); }

.ss-panel-body { max-width: 46ch; }

.ss-panel-title {
  margin: 6px 0 14px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  padding-right: 40px;
}

.ss-panel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 4px;
}

.ss-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ss-text-muted);
  background: var(--ss-surface-raised);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  padding: 4px 11px;
}

.ss-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ss-panel-description {
  margin: 0 0 18px;
  color: var(--ss-panel-text);
  font-size: 15px;
  line-height: 1.65;
}

.ss-panel-description p { margin: 0 0 12px; }
.ss-panel-description p:last-child { margin-bottom: 0; }

.ss-badge-status {
  color: var(--ss-text);
  border-color: var(--ss-badge-good-border);
  background: var(--ss-badge-good-bg);
}

.ss-badge-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ss-badge-good-dot);
  box-shadow: 0 0 0 3px var(--ss-badge-good-bg);
  flex: 0 0 auto;
}

.ss-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.ss-tag {
  font-size: 12px;
  color: var(--ss-text-faint);
  background: transparent;
  border: 1px dashed var(--ss-border);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ------------------------------------------------------------ media block */

/* The window is sized to its contents, so the body fills whatever it is
   given. Long prose is capped for readability; media uses the full width. */
.ss-panel-body { max-width: none; }
.ss-panel-description { max-width: 68ch; }

/* A column of media groups. Each group lays out its own grid inside. */
.ss-panel-media {
  display: block;
  margin-bottom: 16px;
}

.ss-panel-media.is-empty {
  display: block;
  margin-bottom: 18px;
}

.ss-media-item {
  display: block;
  position: relative;
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  overflow: hidden;
  background: var(--ss-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.ss-media-item:hover,
.ss-media-item:focus-visible {
  border-color: var(--ss-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px var(--ss-shadow);
  outline: none;
}

.ss-media-frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--ss-reader-bg);
}

.ss-media-item img,
.ss-media-item video {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: var(--ss-reader-bg);
  transition: transform 0.35s ease;
}

.ss-media-item:hover img,
.ss-media-item:hover video { transform: scale(1.045); }

.ss-media-play,
.ss-media-zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, rgba(6, 9, 13, 0.12), rgba(6, 9, 13, 0.55));
  transition: opacity 0.18s ease;
}

.ss-media-play {
  font-size: 13px;
  padding-left: 2px;
}

.ss-media-play::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: rgba(6, 9, 13, 0.35);
  z-index: -1;
}

.ss-media-zoom { opacity: 0; }

.ss-media-item:hover .ss-media-zoom,
.ss-media-item:focus-visible .ss-media-zoom { opacity: 1; }

.ss-media-caption {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ss-text-muted);
  padding: 8px 10px 9px;
  min-height: 34px;
}

/* Empty gallery: designed, not a row of dashes, and it claims nothing. */
.ss-gallery-empty {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  background:
    radial-gradient(circle at 8% 0%, var(--ss-accent-faint), transparent 60%),
    var(--ss-bg-soft);
  padding: 16px 17px;
}

.ss-gallery-empty-mark {
  font-size: 22px;
  line-height: 1;
  color: var(--ss-text-faint);
  flex: 0 0 auto;
  margin-top: 1px;
}

.ss-gallery-empty-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ss-gallery-empty-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ss-text);
}

.ss-gallery-empty-copy span {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ss-text-muted);
}

.ss-panel-note {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ss-text-faint);
  border-left: 2px solid var(--ss-border);
  padding-left: 11px;
}

.ss-panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ss-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ss-text);
  text-decoration: none;
  background: var(--ss-surface-raised);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  padding: 7px 14px;
  transition: border-color 0.15s, background 0.15s;
}

.ss-panel-link::after { content: '\2197'; font-size: 11px; color: var(--ss-text-faint); }
.ss-panel-link:hover { border-color: var(--ss-accent); background: var(--ss-surface-raised); }

/* --------------------------------------------------------------- lightbox */

.ss-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.ss-lightbox[hidden] { display: none; }
.ss-lightbox.is-open { opacity: 1; }

.ss-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--ss-scrim);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.ss-lightbox-stage {
  position: relative;
  margin: 0;
  max-width: min(1180px, calc(100vw - (var(--ss-viewer-margin) * 2)));
  max-height: calc(100vh - (var(--ss-viewer-margin) * 2));
  display: flex;
  flex-direction: column;
  transform: scale(0.985);
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

.ss-lightbox.is-open .ss-lightbox-stage { transform: scale(1); }

.ss-lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ss-radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--ss-border);
  min-width: 200px;
}

.ss-lightbox-media img,
.ss-lightbox-media video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 168px);
  object-fit: contain;
}

.ss-lightbox-media iframe {
  display: block;
  width: min(1100px, calc(100vw - 160px));
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.ss-lightbox-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 4px 0;
  font-size: 13px;
  color: var(--ss-text-muted);
}

.ss-lightbox-count {
  font-variant-numeric: tabular-nums;
  color: var(--ss-text-faint);
  white-space: nowrap;
}

.ss-lightbox-nav,
.ss-lightbox-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  color: var(--ss-text);
  background: var(--ss-chrome);
  border: 1px solid var(--ss-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ss-lightbox-prev { left: 22px; }
.ss-lightbox-next { right: 22px; }

.ss-lightbox-close {
  top: 22px;
  right: 22px;
  transform: none;
  font-size: 22px;
}

.ss-lightbox-nav:hover,
.ss-lightbox-close:hover { background: #23324a; border-color: var(--ss-accent); }

.ss-lightbox-nav[hidden] { display: none; }

.ss-lightbox :focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .ss-lightbox-stage { max-width: calc(100vw - 24px); }
  .ss-lightbox-media iframe { width: calc(100vw - 40px); }
  .ss-lightbox-prev { left: 8px; }
  .ss-lightbox-next { right: 8px; }
  .ss-lightbox-close { top: 10px; right: 10px; }
}

/* ---------------------------------------------------------- data warnings */

.ss-notices {
  max-width: 1400px;
  margin: 0 auto 22px;
  padding: 14px 18px;
  border: 1px solid var(--ss-notice-warn-border);
  border-left-width: 4px;
  border-radius: var(--ss-radius-sm);
  background: var(--ss-notice-warn-bg);
  color: var(--ss-notice-warn-text);
  font-size: 14px;
}

.ss-notices.is-fatal { border-color: var(--ss-notice-bad-border);
  background: var(--ss-notice-bad-bg); color: var(--ss-notice-bad-text); }
.ss-notices ul { margin: 8px 0 0; padding-left: 20px; }
.ss-notices li { margin-bottom: 4px; }

/* ------------------------------------------------------- reduced motion/print */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (max-width: 620px) {
  .ss-panel { width: 100%; padding: 22px 18px 34px; }
  .ss-panel-title { font-size: 21px; }
  .ss-controls { margin-left: 0; }
  .ss-control-fit { padding: 0 8px; }
}


/* ============================================================================
   FLOATING INTERFACE  (framework)
   ----------------------------------------------------------------------------
   Controls hover above the map instead of occupying horizontal bands, so the
   network stays the dominant feature and the whole viewport is map. The layer
   itself is transparent to pointer events: a drag that begins on empty space
   still pans the map underneath, and only the controls capture input.
   ========================================================================= */

.ss-ui {
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.ss-ui > * { pointer-events: auto; }

/* --- top-left stack: identity, then the way home --- */
.ss-topleft {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: min(300px, calc(100vw - 28px));
}

.ss-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 9px;
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  background: var(--ss-chrome);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px var(--ss-shadow);
}

.ss-brand-logo { display: block; border-radius: 50%; }

.ss-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.ss-brand-text strong { font-size: 14px; }
.ss-brand-text span { font-size: 11px; color: var(--ss-text-muted); }

/* --- legend (top right) --- */
.ss-legend-wrap {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: min(320px, calc(100vw - 28px));
}

/* --- navigation cluster (bottom right) --- */
.ss-nav-cluster {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* The way home sits directly under the logo and is deliberately the most
   prominent control on the map: accent-tinted, larger than the zoom buttons,
   and labelled with a house glyph as well as words. */
.ss-home {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: auto;
  height: 42px;
  padding: 0 16px 0 13px;
  border-color: var(--ss-accent);
  background: var(--ss-accent-soft);
  color: var(--ss-text);
  font-weight: 600;
  box-shadow: 0 8px 24px var(--ss-shadow);
}

.ss-home:hover {
  background: var(--ss-accent-strong);
  border-color: var(--ss-accent);
}

.ss-home-icon { flex: none; color: var(--ss-accent); }

.ss-home-label {
  font-size: 12px;
  letter-spacing: 0.07em;
}

/* --- hint (bottom left) --- */
.ss-hint {
  position: absolute;
  left: 14px;
  bottom: 14px;
  margin: 0;
  padding: 7px 13px;
  max-width: min(74ch, calc(100vw - 200px));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--ss-text-muted);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  background: var(--ss-chrome-soft);
  backdrop-filter: blur(8px);
}

/* --- small screens: tighten the chrome, drop the hint --- */
@media (max-width: 640px) {
  .ss-hint { display: none; }
  .ss-brand { padding: 6px 12px 6px 8px; }
  .ss-brand-text span { display: none; }

  /* The legend goes to the foot of the screen, in the band above the zoom
     cluster. It used to sit under the brand chip, where on a narrow screen it
     landed squarely on top of the YOU ARE HERE button. */
  .ss-legend-wrap {
    top: auto;
    bottom: 56px;
    left: 14px;
    right: 14px;
    max-width: none;
  }

  /* Tighter chrome on a small screen. The menu is anchored to the right edge,
     so it never runs off the side. */
  .ss-legend-toggle { padding: 9px 12px; font-size: 13px; }
  .ss-legend-menu { min-width: 0; width: min(78vw, 300px); max-height: 52vh; }
  .ss-legend-item { padding: 8px 10px; }
  .ss-legend-name { font-size: 13px; }

  .ss-nav-cluster { bottom: 14px; }

  /* A station sheet covers the bottom of the screen. The legend is of no use
     while reading a station, and there is nowhere left for it to sit without
     covering either the map or a control, so it stands down. The zoom cluster
     takes the corner the legend vacated, rather than floating in mid-map. */
  .ss-map.is-sheet-open .ss-legend-wrap { display: none; }
  .ss-map.is-sheet-open .ss-nav-cluster { bottom: auto; top: 14px; }
}

/* ============================================================================
   START STATION  ("YOU ARE HERE")
   ----------------------------------------------------------------------------
   Any station whose content carries role: "start" is drawn like this. The
   engine has no idea what the station is called - the wording is content.
   ========================================================================= */

.ss-start-halo {
  fill: none;
  stroke: var(--ss-accent);
  stroke-width: 2;
  opacity: 0.4;
  animation: ss-pulse 2.8s ease-in-out infinite;
}

@keyframes ss-pulse {
  0%, 100% { opacity: 0.16; }
  50%      { opacity: 0.48; }
}

.ss-station.is-start .ss-station-dot {
  fill: var(--ss-accent);
  stroke: #ffffff;
  stroke-width: 2.5;
}

.ss-station.is-start .ss-station-label {
  font-weight: 700;
  font-size: 15px;
  fill: var(--ss-text);
}

/* No pulsing for anyone who has asked the system for less motion. */
@media (prefers-reduced-motion: reduce) {
  .ss-start-halo { animation: none; opacity: 0.32; }
}

/* ------------------------------------------------------------------ noscript */

.ss-noscript {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  background: var(--ss-surface);
  color: var(--ss-text);
}


/* ============================================================================
   STATION PREVIEW  (framework)
   ----------------------------------------------------------------------------
   Shown on hover, and on the first tap of a touchscreen. It never accepts
   pointer events, so it cannot interfere with dragging, zooming, or clicking
   the station beneath it. Positioned by the engine (see _positionPreview):
   above the marker by preference, flipped below when there is no room.
   ========================================================================= */

.ss-preview {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  max-width: min(290px, calc(100vw - 24px));
  padding: 11px 14px 12px 17px;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  background: var(--ss-surface);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 38px var(--ss-shadow-strong);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.ss-preview.is-visible { opacity: 1; transform: none; }

/* The station's own line colour, as a quiet accent down the side. */
.ss-preview-accent {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ss-preview-accent, var(--ss-accent));
}

.ss-preview-name {
  display: block;
  font-size: 13.5px;
  line-height: 1.25;
}

.ss-preview-text {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ss-text-muted);
}

.ss-preview-cue {
  display: block;
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ss-accent);
}


/* ============================================================================
   MEDIA GROUPS  (framework)
   ----------------------------------------------------------------------------
   A gallery is a titled set of photographs; a video collection is a titled set
   of videos with its own inline 16:9 player and an optional link out to the
   complete playlist. Nothing here is specific to any one customer.
   ========================================================================= */

.ss-media-group { margin: 0 0 22px; }
.ss-media-group:last-child { margin-bottom: 0; }

.ss-group-title {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ss-text-faint);
}

.ss-group-intro {
  margin: 0 0 12px;
  max-width: 68ch;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ss-text-muted);
}

/* --- galleries ------------------------------------------------------------ */

.ss-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* --- video collections ---------------------------------------------------- */

.ss-video-stage {
  margin: 0 0 12px;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  overflow: hidden;
  background: var(--ss-ink);
}

.ss-video-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 13px;
  font-size: 13px;
  border-bottom: 1px solid var(--ss-border);
}

.ss-video-close {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  color: var(--ss-text-muted);
  background: none;
  border: 1px solid var(--ss-border);
  border-radius: 50%;
  cursor: pointer;
}

.ss-video-close:hover { color: var(--ss-text); border-color: var(--ss-accent); }

/* A properly proportioned player, whatever width the window happens to be. */
.ss-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ss-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ss-video-list {
  display: grid;
  /* auto-fit, not auto-fill: with two cards the empty tracks collapse and the
     pair fills the row, instead of huddling in the left-hand corner. */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  transition: opacity 0.2s ease;
}

/* While something is playing, the rest of the collection steps back. */
.ss-video-list.is-playing { opacity: 0.55; }

.ss-video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  font: inherit;
  text-align: left;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  background: var(--ss-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.ss-video-card:hover:not(.is-placeholder),
.ss-video-card:focus-visible { border-color: var(--ss-accent); background: var(--ss-surface-raised); }

.ss-video-card.is-playing { border-color: var(--ss-accent); }

.ss-video-card.is-placeholder { cursor: default; opacity: 0.78; }

.ss-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0a1017;
}

.ss-video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ss-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.75);  /* stays dark: sits under a photo */
}

.ss-video-meta { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ss-video-meta strong { font-size: 14px; line-height: 1.35; }
.ss-video-desc { font-size: 12.5px; line-height: 1.45; color: var(--ss-text-muted); }

/* Pinned to the bottom so the placeholder cards line up with each other. */
.ss-video-flag {
  margin-top: auto;
  padding-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ss-text-faint);
}

/* --- link out to the full playlist ---------------------------------------- */

.ss-playlist-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 8px 14px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ss-text);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  background: var(--ss-accent-soft);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ss-playlist-link:hover,
.ss-playlist-link:focus-visible {
  background: var(--ss-accent-strong);
  border-color: var(--ss-accent);
}

.ss-playlist-arrow { color: var(--ss-accent); }

.ss-playlist-pending {
  margin: 13px 0 0;
  font-size: 12.5px;
  color: var(--ss-text-faint);
}

/* The cards already stack, so a narrow window only needs a single column. */
@media (max-width: 520px) {
  .ss-video-list { grid-template-columns: 1fr; gap: 12px; }
}


/* ============================================================================
   TRAINS  (framework)
   ----------------------------------------------------------------------------
   The layer sits below the station markers and labels, and ignores pointer
   events entirely, so a train can never cover a label or swallow a click. The
   train itself lives in map coordinates, so it moves with the railway when the
   map is dragged or zoomed.
   ========================================================================= */

.ss-trains,
.ss-train,
.ss-train * { pointer-events: none; }

.ss-train-body {
  stroke: rgba(0, 0, 0, 0.5);
  stroke-width: 1.4;
}

/* ----------------------------------------------------------------------------
   An image whose file is missing or misnamed. The browser's own broken-image
   icon is replaced by a labelled placeholder, so an owner who mistypes a path
   can see what happened rather than wonder why the site looks broken.
   ---------------------------------------------------------------------------- */
.ss-media-frame, .ss-video-thumb { position: relative; }

.ss-media-missing img { visibility: hidden; }

.ss-media-missing {
  background: repeating-linear-gradient(45deg,
    rgba(255, 255, 255, 0.03) 0 8px, rgba(255, 255, 255, 0.06) 8px 16px);
  outline: 1px dashed var(--ss-danger, #b4534b);
  outline-offset: -2px;
}

.ss-media-missing-note {
  position: absolute;
  inset: auto 6px 6px 6px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--ss-text);
  background: rgba(0, 0, 0, 0.66);
}

/* ----------------------------------------------------------------------------
   GALLERY OF WORKS  (framework)
   ----------------------------------------------------------------------------
   A grid of individual pieces rather than a grid of photographs. Each tile is
   one work, showing its main photograph; a badge says how many views it has.
   Nothing here is specific to any one customer.
   ---------------------------------------------------------------------------- */

.ss-works-grid {
  display: grid;
  /* auto-fit so a small set fills the row instead of huddling at the left */
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.ss-work-tile {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-sm);
  background: var(--ss-ink);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.ss-work-tile:hover,
.ss-work-tile:focus-visible {
  border-color: var(--ss-accent);
  transform: translateY(-2px);
}

.ss-work-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0a1017;
}

.ss-work-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ss-work-tile:hover .ss-work-frame img,
.ss-work-tile:focus-visible .ss-work-frame img { transform: scale(1.04); }

.ss-work-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ss-text);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.ss-work-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px 12px;
}

.ss-work-title {
  font-size: 14px;
  line-height: 1.3;
}

.ss-work-caption {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ss-text-muted);
}

/* A narrow window shows two across rather than one very large tile. */
@media (max-width: 520px) {
  .ss-works-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ss-work-title { font-size: 13px; }
  .ss-work-body { padding: 8px 10px 10px; }
}

/* No lift, no zoom for anyone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  .ss-work-tile, .ss-work-frame img { transition: none; }
  .ss-work-tile:hover, .ss-work-tile:focus-visible { transform: none; }
  .ss-work-tile:hover .ss-work-frame img,
  .ss-work-tile:focus-visible .ss-work-frame img { transform: none; }
}

/* ----------------------------------------------------------------------------
   SLIDESHOW PLAYBACK  (framework)
   ----------------------------------------------------------------------------
   Play/pause sits in the viewer's caption bar beside the count. It only appears
   when there is more than one photograph to step through.
   ---------------------------------------------------------------------------- */

.ss-lightbox-play {
  margin-left: 12px;
  padding: 5px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ss-text);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  background: var(--ss-surface);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ss-lightbox-play:hover,
.ss-lightbox-play:focus-visible {
  border-color: var(--ss-accent);
  background: var(--ss-surface-raised);
}

/* While playing, the control reads as active rather than merely available. */
.ss-lightbox-play.is-playing {
  color: var(--ss-text);
  border-color: var(--ss-accent);
  background: var(--ss-accent-soft);
}

.ss-lightbox-play[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ss-lightbox-play { transition: none; }
}

/* ============================================================================
   TRANSIT FURNITURE  (framework)
   ----------------------------------------------------------------------------
   The marks a printed diagram uses: a faint square grid, interchange rings
   threaded on a bar, terminus ticks, junction squares, and small transport
   symbols. All colours come from the theme, so a light and a dark palette each
   get the treatment that suits them.
   ============================================================================ */

/* A grid quiet enough to give scale without ever competing with a line. */
/* A fine square grid. Pale blue on the warm ground, so it reads as printed
   graph paper rather than as another route. */
.ss-grid { pointer-events: none; }

/* --- interchange ---------------------------------------------------------- */

/* The bar the rings are threaded on. It reads as the interchange itself, so it
   is drawn in the map's ink rather than in any one line's colour. */
.ss-interchange-bar,
.ss-interchange-link {
  stroke: var(--ss-interchange-ink);
  fill: none;
}

.ss-terminal-tick {
  stroke-linecap: round;
}

/* A junction is a square rather than a circle, so a glance distinguishes it
   from an ordinary stop. */
.ss-station-dot.ss-junction {
  fill: var(--ss-node-fill);
}

/* --- transport symbols ---------------------------------------------------- */

.ss-symbol { pointer-events: none; }

.ss-symbol-disc {
  fill: var(--ss-symbol-fill);
  stroke: var(--ss-symbol-ring);
  stroke-width: 1.6;
}

.ss-symbol-glyph {
  fill: var(--ss-symbol-ink);
}

/* A hub that too many lines share takes one large interchange symbol rather
   than a row of rings. Two concentric rings read as a junction at any size,
   and the converging lines carry the count. */
.ss-hub-disc {
  fill: var(--ss-node-fill);
  stroke: var(--ss-interchange-ink);
  stroke-width: 3.5;
}

.ss-hub-inner {
  fill: none;
  stroke: var(--ss-interchange-ink);
  stroke-width: 2;
  opacity: 0.55;
}

/* A pedestrian link between two stations a short walk apart. Dashed, so it
   never reads as a railway: two stations joined by a walk, not one station. */
.ss-station-link {
  stroke: var(--ss-interchange-ink);
  stroke-width: 2;
  stroke-dasharray: 3 4;
  stroke-linecap: round;
  opacity: 0.75;
  pointer-events: none;
}

/* A station emblem: the operator's mark on a main station. Drawn above the
   marker, so it reads as a badge rather than as part of the railway. */
.ss-station-emblem {
  pointer-events: none;
  opacity: 0.92;
}

/* ==========================================================================
   THE PHOTO VIEWER LEAVES THE MAP VISIBLE

   The viewer used to be a full-bleed black curtain. It is now a card with a
   margin of map showing round it, and a scrim light enough to read the
   network through, so a visitor never loses the sense of where they are.
   ========================================================================== */

@media (max-width: 900px) {
  :root { --ss-viewer-margin: 28px; }
}

@media (max-width: 640px) {
  :root { --ss-viewer-margin: 12px; }
}

/* ------------------------------------------------------------------
   LINE NAMES BESIDE THE HUB

   Ten coloured tracks leave YOU ARE HERE, and without a name on each the
   visitor has to travel to a terminus to learn which is which. The name sits
   just off its own track, in the line's colour, over a halo so it stays
   readable wherever it lands. Quieter than a station name, stronger than the
   decorative labels: it is a working line's identity.
   ------------------------------------------------------------------ */

/* Decorative layers never take a pointer event — including this one. */
.ss-line-labels { pointer-events: none; }

.ss-line-label {
  font-family: var(--ss-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.005em;
  pointer-events: none;
  user-select: none;
  paint-order: stroke fill;
  stroke: var(--ss-label-halo);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Zoomed far out the names would collide with each other and with the
   station names; below the threshold they step aside. */
.ss-line-labels-hidden .ss-line-label { display: none; }

/* A name the owner has switched off. The track, its stations and its markers
   are all untouched — only the words go. Kept as a class rather than by
   removing the element so the editor can still offer to switch it back on and
   can still drag it into place. */
.ss-line-label.is-hidden,
.ss-station-label.is-hidden { display: none; }

/* Two kinds of connection between stations.

   A WALKING link is the dotted path this stylesheet has always drawn: a short
   hop between two places that are close together. An INTERCHANGE link is a
   solid connector, for two nearby stations on different lines where changing
   between them is the point. The base rule above is the walking look, so a map
   written before styles existed renders exactly as it always did. */
.ss-station-link-walking {
  stroke-dasharray: 3 4;
}

.ss-station-link-interchange {
  stroke: var(--ss-interchange-ink);
  stroke-width: 3.5;
  stroke-dasharray: none;
  stroke-linecap: round;
  opacity: 0.9;
}

/* Publish-copy fix: readable gallery text in the light palette. */
.ss-work-title, .ss-work-count { color: #ffffff; }
.ss-work-caption { color: #d5d0c6; }
