:root {
  color-scheme: light;
  --ink: #274755;
  --muted: #6d8089;
  --paper: #f2f5f3;
  --panel: #fbfcf8;
  --line: #d4dad6;
  --shadow: 0 18px 55px rgba(39, 71, 85, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(39, 71, 85, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(39, 71, 85, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.map-panel {
  flex-direction: column;
  min-width: 0;
  padding: 28px;
}

.map-panel.active {
  display: flex;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.home-sign {
  align-items: center;
  padding: 32px 36px 34px 32px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-left: 6px solid #f05a28;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #181512;
  box-shadow: 0 18px 42px rgba(24, 21, 18, 0.22);
}

.home-title-group {
  min-width: 0;
  color: #fffdf8;
}

.home-sign h1 {
  color: #fffdf8;
  font-size: clamp(1.95rem, 2.85vw, 3.2rem);
  line-height: 1.08;
  margin-top: clamp(32px, 4.4vw, 54px);
}

.home-sign .sign-kicker {
  margin-bottom: 16px;
}

.home-description {
  max-width: 720px;
  margin: 6px 0 0;
  color: rgba(255, 253, 248, 0.7);
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 400;
  line-height: 1.7;
}

.home-route-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.status-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.home-sign .status-key {
  max-width: 460px;
  color: rgba(255, 253, 248, 0.82);
}

.status-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.home-sign .status-key span {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.key-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  background: #172033;
}

.key-dot.construction {
  background: repeating-linear-gradient(45deg, #172033 0 3px, #f4c542 3px 6px);
}

.key-dot.planned {
  background: #fffdf8;
  border: 2px dashed #172033;
}

.map-wrap {
  position: relative;
  flex: 1;
  min-height: 520px;
  padding-top: 200px;
  box-sizing: border-box;
  border: 1px solid rgba(39, 71, 85, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 22%, rgba(39, 71, 85, 0.03) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 58%, rgba(39, 71, 85, 0.025) 0 1px, transparent 1px),
    #f7f9f6;
  background-size: 18px 18px, 22px 22px, auto;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-line-legend {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 50%;
  width: min(600px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #181512;
  box-shadow: 0 18px 42px rgba(24, 21, 18, 0.2);
  transform: translateX(-50%);
}

.map-line-legend h2 {
  margin: 0 0 10px;
  color: rgba(255, 253, 248, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-status-key {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 253, 248, 0.64);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-status-key span {
  gap: 6px;
}

#metro-map {
  display: block;
  width: 100%;
  height: calc(100% - 200px);
  min-height: 320px;
}

.waterfront {
  fill: rgba(129, 219, 205, 0.38);
  stroke: none;
}

.water-channel {
  fill: none;
  stroke: rgba(129, 219, 205, 0.5);
  stroke-width: 36;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.water-channel.narrow {
  stroke-width: 26;
}

.street-line {
  fill: none;
  stroke: rgba(39, 71, 85, 0.1);
  stroke-width: 7;
  stroke-linecap: butt;
  stroke-linejoin: round;
  stroke-dasharray: 2 18;
}

.street-line.thin {
  stroke-width: 5;
  stroke-dasharray: 2 15;
}

.county-boundary {
  fill: none;
  stroke: rgba(39, 71, 85, 0.18);
  stroke-width: 3;
  stroke-dasharray: 12 12;
}

.regional-line {
  fill: none;
  stroke: rgba(205, 74, 69, 0.52);
  stroke-width: 4;
  stroke-linecap: butt;
  stroke-linejoin: round;
}

.secondary-system {
  fill: none;
  stroke-width: 9;
  stroke-linecap: butt;
  stroke-linejoin: round;
  opacity: 0.45;
}

.secondary-system.teal {
  stroke: #66c7bd;
}

.secondary-system.mint {
  stroke: #9ce2d5;
}

.secondary-system.gold {
  stroke: #e0c94d;
}

.district {
  fill: rgba(255, 255, 255, 0.32);
  stroke: rgba(39, 71, 85, 0.08);
}

.district-label {
  fill: rgba(39, 71, 85, 0.32);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-label {
  fill: rgba(39, 71, 85, 0.54);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.transfer-link {
  stroke: rgba(39, 71, 85, 0.22);
  stroke-width: 3;
  stroke-dasharray: 8 9;
}

.metro-track {
  fill: none;
  stroke-width: 16;
  stroke-linecap: butt;
  stroke-linejoin: round;
}

.metro-track.shadow {
  stroke: rgba(39, 71, 85, 0.13);
  stroke-width: 24;
}

.station {
  cursor: pointer;
  outline: none;
}

.station-outer {
  fill: #fffdf8;
  stroke: var(--ink);
  stroke-width: 5;
  transition: r 140ms ease, stroke-width 140ms ease;
}

.station-inner {
  stroke: #fffdf8;
  stroke-width: 2;
}

.station-label {
  fill: var(--ink);
  font-size: 17px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #f7f9f6;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.station-years {
  fill: #5f687c;
  font-size: 13px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #f7f9f6;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.station.construction .station-outer {
  stroke-dasharray: 7 5;
}

.station.planned .station-outer,
.station.planned .station-inner {
  opacity: 0.72;
}

.station.selected .station-outer,
.station:focus-visible .station-outer,
.station:hover .station-outer {
  r: 22;
  stroke-width: 6;
}

.line-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf8;
  cursor: pointer;
  text-align: left;
}

.line-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(16px, 2vw, 24px);
}

.line-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
}

.line-item.selected {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.line-item strong,
.line-item small {
  display: block;
}

.line-item strong {
  font-weight: 650;
}

.line-item small {
  margin-top: 3px;
  color: rgba(255, 253, 248, 0.6);
  font-size: 0.78rem;
  font-weight: 600;
}

.line-swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.line-detail,
.stop-detail {
  --line-color: var(--ink);
  min-height: 100vh;
  padding: 28px;
}

.line-detail-header,
.line-detail-grid,
.stop-detail-header,
.stop-route-nav,
.stop-detail-grid {
  width: min(1320px, 100%);
  margin-inline: auto;
}

.line-detail-header,
.stop-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 20px 18px 18px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-left: 6px solid var(--line-color);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #181512;
  box-shadow: 0 18px 42px rgba(24, 21, 18, 0.22);
}

.stop-detail-header {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.back-button {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: #0f0d0b;
  color: #fffdf8;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 950;
}

.line-title-group,
.stop-title-group {
  min-width: 0;
  color: #fffdf8;
}

.sign-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: rgba(255, 253, 248, 0.76);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: var(--line-color);
  color: #fffdf8;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.route-badge.compact {
  width: 26px;
  height: 26px;
  border-width: 2px;
  font-size: 0.78rem;
}

.direction-arrow {
  color: #fffdf8;
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 1;
}

.line-detail h1,
.stop-detail h1 {
  position: relative;
  width: fit-content;
  margin-bottom: 8px;
  color: #fffdf8;
}

.line-description {
  max-width: 780px;
  margin-bottom: 14px;
  color: rgba(255, 253, 248, 0.86);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 750;
  line-height: 1.45;
}

.stop-detail-years {
  display: inline-flex;
  min-height: 30px;
  margin: 0 0 12px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf8;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stop-service-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stop-service-icons span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 2px solid #fffdf8;
  border-radius: 2px;
  background: #1f82c9;
  color: #fffdf8;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
}

.stop-service-icons span:first-child {
  background: #fffdf8;
  color: #181512;
}

.stop-service-icons span:nth-child(2) {
  background: #fffdf8;
  color: #181512;
}

.line-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 253, 248, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.line-detail-grid,
.stop-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.stop-route-nav {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(39, 71, 85, 0.1);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stop-route-strip {
  --line-color: var(--ink);
  display: grid;
  grid-auto-columns: minmax(178px, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding: 18px 16px 16px;
  background:
    radial-gradient(circle at 16% 24%, rgba(39, 71, 85, 0.03) 0 1px, transparent 1px),
    #fffdf8;
  background-size: 18px 18px, auto;
}

.stop-route-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  background: #fffdf8;
}

.route-nav-control {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: var(--line-color);
  color: #fffdf8;
  cursor: pointer;
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1;
}

.route-nav-control:hover:not(:disabled) {
  background: color-mix(in srgb, var(--line-color) 84%, #181512);
}

.route-nav-control:disabled {
  background: rgba(39, 71, 85, 0.16);
  color: rgba(39, 71, 85, 0.42);
  cursor: not-allowed;
}

.route-stop {
  position: relative;
  display: grid;
  grid-template-rows: 28px auto;
  justify-items: center;
  min-width: 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.route-stop-track {
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  height: 8px;
  background: var(--line-color);
}

.route-stop:first-child .route-stop-track {
  left: 50%;
}

.route-stop:last-child .route-stop-track {
  right: 50%;
}

.route-stop-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--line-color);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.route-stop.construction .route-stop-marker {
  border-style: dashed;
}

.route-stop.planned {
  opacity: 0.72;
}

.route-stop[aria-current="page"] .route-stop-marker {
  width: 36px;
  height: 36px;
  margin-top: -3px;
  background: var(--line-color);
  color: #fffdf8;
  box-shadow: 0 0 0 5px rgba(39, 71, 85, 0.12);
}

.route-stop-copy {
  display: grid;
  gap: 3px;
  max-width: 150px;
  margin-top: 8px;
}

.route-stop-copy strong,
.route-stop-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-copy strong {
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.15;
}

.route-stop-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.isolated-map-card,
.stops-panel,
.stop-main-panel,
.connections-panel {
  border: 1px solid rgba(39, 71, 85, 0.1);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.isolated-map-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(39, 71, 85, 0.03) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 58%, rgba(39, 71, 85, 0.025) 0 1px, transparent 1px),
    #f7f9f6;
  background-size: 18px 18px, 22px 22px, auto;
}

.container-sign {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  background: #181512;
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.container-sign .direction-arrow {
  margin-left: auto;
  font-size: 1.35rem;
}

.route-nav-sign {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.08)),
    var(--line-color);
  color: #fffdf8;
}

.route-nav-sign .route-badge {
  background: rgba(255, 253, 248, 0.18);
  color: #fffdf8;
}

#line-map {
  display: block;
  width: 100%;
  aspect-ratio: 1.45 / 1;
  min-height: 420px;
}

.isolated-track {
  fill: none;
  stroke-width: 18;
  stroke-linecap: butt;
  stroke-linejoin: round;
}

.isolated-track.shadow {
  stroke: rgba(39, 71, 85, 0.12);
  stroke-width: 28;
}

.isolated-station .station-outer {
  stroke-width: 5;
}

.isolated-station.construction .station-outer {
  stroke-dasharray: 7 5;
}

.isolated-station.planned .station-outer,
.isolated-station.planned .station-inner {
  opacity: 0.72;
}

.stops-panel,
.stop-main-panel,
.connections-panel {
  overflow: hidden;
  padding: 0;
}

.stop-list {
  display: grid;
  padding: 4px 18px;
}

.stop-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid rgba(39, 71, 85, 0.14);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.stop-item:last-child {
  border-bottom: 0;
}

.stop-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: #fffdf8;
}

.stop-marker::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--line-color);
}

.stop-marker span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.stop-item.construction .stop-marker {
  border-style: dashed;
}

.stop-item.planned .stop-marker {
  opacity: 0.7;
}

.stop-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.stop-item h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.stop-item-header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stop-years {
  margin-bottom: 8px;
  color: var(--line-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.stop-item p:last-child {
  margin-bottom: 0;
  color: #435b66;
  font-size: 0.92rem;
  line-height: 1.45;
}

.isolated-station {
  cursor: pointer;
  outline: none;
}

.isolated-station:hover .station-outer,
.isolated-station:focus-visible .station-outer {
  r: 23;
  stroke-width: 6;
}

.stop-overview {
  padding: 20px;
}

.stop-overview dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 22px;
  background: rgba(39, 71, 85, 0.16);
  border: 1px solid rgba(39, 71, 85, 0.16);
}

.stop-overview dl div {
  min-width: 0;
  padding: 14px;
  background: #fffdf8;
}

.stop-overview dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stop-overview dd {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.stop-overview p {
  max-width: 780px;
  margin-bottom: 0;
  color: #435b66;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 650;
  line-height: 1.55;
}

.connection-list {
  display: grid;
  padding: 4px 16px;
}

.connection-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(39, 71, 85, 0.14);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.connection-item:last-child {
  border-bottom: 0;
}

.connection-item strong,
.connection-item small {
  display: block;
}

.connection-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.connection-item .direction-arrow {
  color: var(--ink);
  font-size: 1.4rem;
}

.connection-empty {
  margin: 0;
  padding: 18px 0;
  color: #435b66;
  font-weight: 750;
  line-height: 1.45;
}

button:hover {
  border-color: rgba(23, 32, 51, 0.34);
}

button:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.3);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .map-panel,
  .line-detail,
  .stop-detail {
    padding: 20px;
  }

  .line-detail-grid,
  .stop-detail-grid {
    grid-template-columns: 1fr;
  }

  #line-map {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-key {
    justify-content: flex-start;
  }

  .home-description {
    max-width: none;
  }

  .map-wrap,
  #metro-map {
    min-height: 420px;
  }

  .map-wrap {
    padding-top: 190px;
  }

  #metro-map {
    height: calc(100% - 190px);
    min-height: 230px;
  }

  .map-line-legend {
    top: 10px;
    left: 50%;
    width: calc(100% - 20px);
    padding: 10px;
  }

  .line-list {
    gap: 6px;
  }

  .line-item {
    grid-template-columns: 26px 1fr;
    gap: 7px;
    min-height: 48px;
    padding: 8px;
  }

  .line-swatch {
    width: 14px;
    height: 14px;
  }

  .line-item strong {
    font-size: 0.78rem;
  }

  .line-item small {
    font-size: 0.68rem;
  }

  .station-label {
    font-size: 16px;
  }

  .station-years {
    font-size: 12px;
  }

  .line-detail,
  .stop-detail {
    padding: 14px;
  }

  .line-detail-header,
  .stop-detail-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .stop-service-icons {
    justify-content: flex-start;
  }

  .back-button {
    order: 2;
    justify-self: end;
    width: fit-content;
  }

  .route-badge {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .line-description {
    font-size: 0.98rem;
  }

  .line-stats {
    gap: 6px;
  }

  .line-stats span {
    min-height: 28px;
    font-size: 0.68rem;
  }

  .container-sign {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  .stop-route-strip {
    grid-auto-columns: minmax(142px, 48%);
    padding: 15px 10px 13px;
  }

  .stop-route-controls {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .route-nav-control {
    font-size: 1.3rem;
  }

  .route-stop {
    padding: 0 7px;
  }

  .route-stop-copy {
    max-width: 118px;
  }

  .route-stop-copy strong {
    font-size: 0.76rem;
  }

  #line-map {
    aspect-ratio: 1 / 0.9;
    min-height: 330px;
  }

  .stops-panel {
    padding: 0;
  }

  .stop-list {
    padding: 2px 12px;
  }

  .stop-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 0;
  }

  .stop-marker {
    width: 30px;
    height: 30px;
  }

  .stop-item-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .stop-item h3 {
    font-size: 0.95rem;
  }

  .stop-item p:last-child {
    font-size: 0.86rem;
  }

  .stop-overview {
    padding: 14px;
  }

  .stop-overview dl {
    grid-template-columns: 1fr;
    margin-bottom: 16px;
  }

  .connection-list {
    padding: 2px 12px;
  }
}
