.route-explorer { margin-top: 38px; }
.route-explorer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.route-explorer h2 { font-size: 17px; line-height: 1.4; }
.route-explorer h3 { font-size: 14px; line-height: 1.4; }
.route-periods, .route-filters { display: inline-flex; flex: none; border: 1px solid var(--line-strong); background: var(--surface); }
.route-periods button, .route-filters button { min-height: 40px; padding: 4px 12px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.route-periods button:first-child, .route-filters button:first-child { border-left: 0; }
.route-periods button[aria-pressed="true"], .route-filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.route-periods button:hover:not([aria-pressed="true"]), .route-filters button:hover:not([aria-pressed="true"]) { background: rgba(23, 108, 103, .06); }
.route-periods button:focus-visible, .route-filters button:focus-visible { outline: 2px solid #176c67; outline-offset: 2px; }
.route-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; margin-top: 17px; }
.route-plot, .route-select { min-width: 0; }
.route-chart-wrap { border: 1px solid var(--line-strong); background: var(--surface); }
.route-chart { display: block; width: 100%; height: 312px; }
.route-chart:focus-visible { outline: 2px solid #176c67; outline-offset: 2px; }
.route-grid { stroke: var(--line); stroke-width: 1; }
.route-axis { fill: var(--ink-2); font-family: var(--font-mono); font-size: 12px; }
.route-guide { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; }
.route-trace { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.route-point { fill: var(--surface); stroke-width: 2.8; }
.route-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; min-height: 20px; margin-top: 11px; font-size: 12px; color: var(--ink-2); }
.route-legend span { display: inline-flex; align-items: center; gap: 7px; }
.route-legend span::before { content: ''; width: 19px; border-top: 3px solid var(--route-color); }
.route-legend-choice { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; cursor: pointer; }
.route-legend-choice input { width: 15px; height: 15px; margin: 0; accent-color: var(--route-color); }
.route-legend-choice span::before { display: none; }
.route-legend-choice input:focus-visible, .route-choice input:focus-visible, .route-picker input:focus-visible { outline: 2px solid #176c67; outline-offset: 3px; }
.route-picker { display: flex; align-items: center; gap: 12px; margin-top: 19px; }
.route-picker label { flex: none; font-size: 13px; font-weight: 600; }
.route-picker input { min-width: 0; min-height: 28px; margin: 0; flex: 1; accent-color: #176c67; }
.route-picker output { min-width: 50px; text-align: right; font-family: var(--font-mono); font-size: 13px; }
.route-select label[for] { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.route-selection-count { color: var(--ink-2); font-size: 12px; font-weight: 400; }
.route-search { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.route-search:focus-visible { outline: 2px solid #176c67; outline-offset: 2px; }
.route-filters { display: flex; width: 100%; margin-top: 8px; }
.route-filters button { flex: 1; }
.route-list { max-height: 322px; overflow: auto; margin-top: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route-choice { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 36px; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 12px; }
.route-choice:last-child { border-bottom: 0; }
.route-choice:hover { background: rgba(23, 108, 103, .06); }
.route-choice:has(input:disabled) { color: var(--ink-3); cursor: default; }
.route-choice input { width: 15px; height: 15px; margin: 0; accent-color: var(--route-color, #176c67); }
.route-choice span { min-width: 0; overflow-wrap: anywhere; }
.route-choice small { color: var(--ink-2); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.route-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 31px; margin-bottom: 8px; }
.route-history-head small { margin-left: 7px; color: var(--ink-3); font-size: 12px; font-weight: 400; }
.route-expand-all { border: 0; background: transparent; color: #176c67; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.route-expand-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.route-expand-all:focus-visible { outline: 2px solid #176c67; outline-offset: 2px; }
.route-year-group { border-top: 1px solid var(--line); }
.route-period-group { border-top: 1px solid var(--line-strong); }
.route-period-group:last-child { border-bottom: 1px solid var(--line-strong); }
.route-period-group > summary { display: list-item; list-style-position: inside; padding: 14px 4px; cursor: pointer; font-size: 14px; font-weight: 600; }
.route-period-group > summary small { float: right; color: var(--ink-2); font-size: 12px; font-weight: 400; }
.route-period-group > .route-year-group { margin-left: 16px; }
.route-period-group > .route-year-group:last-child { margin-bottom: 8px; }
.route-year-group summary { display: list-item; list-style-position: inside; padding: 12px 4px; cursor: pointer; font-size: 13px; font-weight: 600; }
.route-year-group summary small { float: right; color: var(--ink-2); font-size: 12px; font-weight: 400; }
.route-year-items { padding: 0 4px 10px; }
.route-change { display: grid; width: 100%; grid-template-columns: minmax(110px, 1fr) minmax(40px, 2fr) 78px 68px; align-items: center; gap: 10px; min-height: 38px; padding: 5px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.route-change:hover, .route-change:focus-visible { background: rgba(23, 108, 103, .06); }
.route-change[hidden], .route-year-group[hidden], .route-period-group[hidden] { display: none; }
.route-change:focus-visible { outline: 2px solid #176c67; outline-offset: -2px; }
.route-year-group.is-current > summary { color: #176c67; background: rgba(23, 108, 103, .06); }
.route-change > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.route-change-track { display: block; height: 7px; background: rgba(23, 108, 103, .07); }
.route-change-track i { display: block; height: 100%; background: #176c67; }
.route-change.is-negative .route-change-track i { background: #b45a31; }
.route-change strong { text-align: right; font-family: var(--font-mono); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.route-change.is-negative strong { color: #a44d20; }
.route-change small { color: var(--ink-3); text-align: right; font-size: 11px; }
.route-empty { padding: 0 4px 14px; color: var(--ink-3); font-size: 12px; }
.route-note { margin-top: 12px; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.route-note a { color: #176c67; text-underline-offset: 2px; }
.route-history-search { display: grid; gap: 6px; margin: 12px 0; color: var(--ink-2); font-size: 12px; }
.route-history-search input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); color: var(--ink); font: inherit; }
.route-history-search input:focus-visible { outline: 2px solid #176c67; outline-offset: 2px; }
.transport-annual { margin-top: 18px; }
.stat-segments[hidden] { display: none; }
.transport-annual-list time { flex: none; color: var(--ink-2); font-family: var(--font-mono); }
.transport-annual[hidden] { display: none; }
.transport-annual h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.transport-annual-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.transport-annual-list li { min-width: 0; border-bottom: 1px solid var(--line); }
.transport-annual-list button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 7px 8px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.transport-annual-list button > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.transport-annual-list strong { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.transport-annual-list small { color: var(--ink-3); white-space: nowrap; font-size: 11px; }
.transport-annual-list .is-negative { color: #a44d20; }
.transport-annual-list button:hover, .opening-row button:hover { background: rgba(23, 108, 103, .06); }
.transport-annual-list button:focus-visible, .opening-row button:focus-visible { outline: 2px solid #176c67; outline-offset: -2px; }
.opening-explorer { margin-top: 30px; }
.opening-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.opening-head h3 { margin: 0; }
.opening-head output { color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.opening-controls { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.opening-controls label { display: grid; gap: 6px; color: var(--ink-2); font-size: 12px; }
.opening-controls select, .opening-controls input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.opening-controls :is(select, input):focus-visible { outline: 2px solid #176c67; outline-offset: 2px; }
.opening-year { border-top: 1px solid var(--line-strong); }
.opening-year h4 { margin: 12px 0 4px; font-family: var(--font-mono); font-size: 13px; }
.opening-year.is-current h4 { color: #176c67; }
.opening-year-list { margin: 0; padding: 0; list-style: none; }
.opening-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 90px; gap: 12px; align-items: center; min-width: 0; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.opening-row:last-child { border-bottom: 0; }
.opening-row time { color: var(--ink-2); font-family: var(--font-mono); white-space: nowrap; }
.opening-row button { display: grid; gap: 4px; min-width: 0; min-height: 44px; padding: 5px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.opening-row button strong { font-size: 12px; font-weight: 600; }
.opening-row button span { color: var(--ink-2); line-height: 1.5; }
.opening-measures { display: grid; justify-items: end; gap: 3px; min-width: 0; color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.opening-distance { color: var(--ink); }

@media (max-width: 720px) {
  .route-layout { grid-template-columns: 1fr; }
  .route-chart { height: 280px; }
  .route-list { max-height: 192px; }
  .route-periods button, .route-filters button, .route-search, .route-choice, .route-picker input, .route-legend-choice { min-height: 44px; }
}
@media (max-width: 440px) {
  .transport-annual-list { grid-template-columns: 1fr; }
  .opening-controls { grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
  .opening-controls input, .opening-controls select { height: 44px; }
  .opening-row { grid-template-columns: 38px minmax(0, 1fr) 84px; gap: 6px; }
  .route-history-head { align-items: center; }
  .route-history-head small { display: block; margin: 3px 0 0; }
  .route-change { grid-template-columns: minmax(88px, 1fr) minmax(30px, 1fr) 70px; gap: 7px; }
  .route-change small { grid-column: 1 / -1; text-align: left; margin-top: -6px; }
  .route-change small:empty { display: none; }
}
