/* The freight map (templates/pages/map.html). Only what site.css doesn't have. */
.hero .btn--primary, .hero .btn--primary:hover { color: var(--ink); }  /* .hero a would turn it paper */

/* Controls strip on navy */
.hero .map-controls-wrap { padding-top: 0; padding-bottom: 24px; display: block; }
.map-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; padding: 14px 16px; background: var(--navy-2); border: 2px solid var(--rim); border-radius: 18px; box-shadow: 0 4px 0 #050A12; }
.map-controls .field label, .map-controls .field .label-text { font-size: 13px; color: var(--muted-ink); }
.field--fit { flex: none; }
.seg { display: flex; gap: 4px; padding: 4px; background: #070C15; border: 2px solid var(--rim); border-radius: 14px; }
.seg button { height: 40px; padding: 0 14px; border-radius: 10px; border: 2px solid transparent; background: transparent; color: var(--lede); font-size: 14px; font-weight: 900; cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--rim-2); background: var(--navy-3); color: var(--paper); box-shadow: 0 3px 0 #050A12; }

/* Map and its side panels */
.map-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 28px; padding-bottom: 28px; }
.map-frame { flex: 1.25 1 440px; min-width: 0; background: var(--navy); border: 2px solid var(--ink-deep); border-radius: 22px; box-shadow: 0 6px 0 var(--ink-deep); padding: 12px; }
.map-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.map { width: 100%; height: auto; display: block; }
.map-dots { fill: var(--rim-2); }
.map-flows { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.map-route-casing, .map-route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map-route-casing { stroke: var(--navy); stroke-width: 7; }
.map-route { stroke: var(--paper); stroke-width: 4; }
.map-stops { fill: var(--navy); stroke: var(--paper); stroke-width: 1.5; }
.map-places, .map-ends { font-family: var(--sans); paint-order: stroke; stroke: var(--navy); }
.map-places { font-size: 11px; font-weight: 800; fill: var(--lede); stroke-width: 3px; }
.map-places circle { fill: var(--paper); }
.map-ends { font-size: 13px; font-weight: 900; fill: var(--paper); stroke-width: 4px; }
.map-ends circle { fill: var(--paper); stroke: var(--navy); stroke-width: 2; }

.selected-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-deep); flex: none; }

.legend { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legend li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 15px; }
.legend-key { height: 6px; border-radius: 3px; box-shadow: 0 0 0 2px var(--ink); }
.legend .name { font-weight: 800; }
.legend .n { font-weight: 900; }

.busiest { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.busiest li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-top: 8px; border-top: 2px solid var(--band); }
.busiest .route, .busiest .n { font-size: 15px; font-weight: 900; }
.busiest .n { white-space: nowrap; }
.busiest .what { font-size: 13px; font-weight: 700; color: var(--muted); }

/* What this map never shows */
.map-never { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: flex-start; }
.map-never .sh { flex: 1 1 280px; }
.map-never-text { flex: 2 1 480px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--body-2); }
.map-never-text p { margin: 0; }
.map-never-text .lead { font-size: 18px; font-weight: 900; color: var(--ink); }

@media (max-width: 520px) {
  .map-controls { padding: 12px; }
  .field--fit { flex: 1 1 100%; }
  .seg button { flex: 1; padding: 0 8px; }
  .map-frame { padding: 8px; border-radius: 18px; }
}
