:root {
  color-scheme: light;
  --paper: #faf7ef;
  --ink: #252627;
  --mute: #6c6a62;
  --rule: #d6d3c9;
  --focus: #254369;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
#map {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  outline-offset: -4px;
}
#map.dragging {
  cursor: grabbing;
}
#network {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}

/* Tracks */
.track {
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.track.siding {
  stroke-opacity: 0.85;
}
.overview .track {
  vector-effect: non-scaling-stroke;
}
.overview .track.ray {
  stroke-width: 3;
}
.overview .track.siding,
.overview .track.terminus {
  stroke-width: 1.5;
}
.track.terminus {
  stroke-linecap: butt;
}
.transfer-link {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  opacity: 0.55;
  pointer-events: none;
}

/* Stations */
.station {
  cursor: pointer;
  outline: none;
  transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 200ms;
}
.station.arriving {
  opacity: 0;
}
.station .hit {
  fill: transparent;
}
.station .dot {
  fill: var(--paper);
  stroke: none;
}
.station .ring circle {
  fill: none;
}
.station .inner {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.5;
}
.station.express .inner {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.5;
}
.station.collection-only .ring circle,
.station.unavailable .ring circle {
  stroke-dasharray: 3 2.5;
}
.station .sign {
  fill: var(--ink);
  font-weight: 650;
  pointer-events: none;
}
.station .label {
  fill: var(--ink);
  font-weight: 500;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5;
  stroke-linejoin: round;
}
.station.line .label,
.station.express .label {
  font-weight: 700;
}
.station.collection .label {
  font-weight: 600;
}
.station.sub .label {
  font-weight: 500;
}
.station .count {
  fill: var(--mute);
  font-weight: 500;
  font-size: 0.86em;
}
.station.stop .label {
  font-weight: 450;
}
.station.transfer .label {
  font-style: italic;
}
.station:hover .dot,
.station:focus .dot,
.station.match .dot,
.station.twin .dot {
  fill: var(--line);
}
.station.twin .dot {
  fill: var(--ink);
}
.station:hover .sign,
.station:focus .sign {
  fill: var(--paper);
}
.station:hover .label,
.station:focus-visible .label,
.station.match .label,
.station.twin .label {
  font-weight: 700;
}
.station:focus-visible .hit {
  fill: #e3e9ed;
  stroke: var(--focus);
  stroke-width: 2;
}
.station.match .hit {
  fill: #eee4c8;
}
.station:focus-visible .label,
.station.match .label {
  stroke: none;
}

/* Hub */
.central .dot {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 5;
}
.central .inner {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}
.central .monogram {
  font-size: 25px;
  font-weight: 400;
  font-family: Georgia, serif;
  fill: var(--ink);
}
.central .nameplate {
  fill: var(--ink);
}
.central .central-label {
  fill: var(--paper);
  font-size: 15px;
  letter-spacing: 3px;
  font-weight: 650;
}
.central:hover .dot,
.central:focus .dot {
  fill: #eee4c8;
}

/* Chrome */
#find,
#tools {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  background: #faf7eff2;
  border: 1px solid var(--rule);
  border-radius: 5px;
}
#find {
  top: max(18px, env(safe-area-inset-top));
  left: 18px;
  max-width: calc(100vw - 36px);
}
input,
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  min-height: 44px;
}
input {
  width: 172px;
  padding: 10px 12px;
  font-size: 14px;
  min-width: 0;
}
button {
  cursor: pointer;
  min-width: 44px;
  font-size: 23px;
  padding: 5px 10px;
}
#all {
  font-size: 14px;
  font-weight: 600;
}
button:hover {
  background: #eae6db;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
#match-count {
  font-size: 11px;
  white-space: nowrap;
}
#tools {
  bottom: max(18px, env(safe-area-inset-bottom));
  right: 18px;
}
#tools button + button {
  border-left: 1px solid #dedad0;
}
#hint {
  position: fixed;
  bottom: 22px;
  left: 22px;
  margin: 0;
  pointer-events: none;
  font-size: 12px;
  color: var(--mute);
  background: var(--paper);
  padding: 4px;
  max-width: 60vw;
}
#error,
.fallback {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 4;
  background: var(--paper);
  padding: 20px;
  max-width: 380px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* The hit region supplies the keyboard focus indicator, including SVG links. */
.station:focus-visible {
  outline: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  #hint {
    display: none;
  }
}
@media (forced-colors: active) {
  .track,
  .ring circle {
    stroke: CanvasText !important;
  }
  .station .label,
  .station .sign {
    fill: CanvasText;
    stroke: Canvas;
  }
  .station:focus-visible .hit {
    stroke: Highlight;
  }
  .central .central-label {
    fill: Canvas;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
    animation: none !important;
  }
}
