/* Hamburg, 24 hours of transit: the interactive. Dark map look, hvv symbols and line colours. */
.hh { --hh-panel: #151B19; --hh-chip: #1B2220; --hh-accent: var(--accent); padding: 8px var(--gutter) 0; }
@media (min-width: 720px) { .hh { padding: 0; } }
.hh button, .hh select, .hh input { font: inherit; color: inherit; }
.hh button { cursor: pointer; }
.hh :focus-visible { outline: 2px solid var(--hh-accent); outline-offset: 2px; }

/* readout */
.hh-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.hh-date { font-size: 15px; color: var(--muted); margin-bottom: 2px; }
.hh-clock { font-size: clamp(56px, 15vw, 112px); font-weight: 800; line-height: .86; letter-spacing: -0.03em; }
.hh-totals { display: flex; gap: 20px; align-items: flex-end; }
.hh-total { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; }
.hh-total .hh-lab { grid-column: 1 / -1; }
.hh-num { font-size: clamp(30px, 7vw, 52px); font-weight: 800; line-height: 1; color: var(--accent-text); }
.hh-total-bus .hh-num { color: var(--ink); }
.hh-lab { font-size: 13px; color: var(--muted); max-width: 13em; line-height: 1.25; margin-top: 4px; }

/* view switch */
.hh-views { display: flex; gap: 4px; padding: 4px; background: var(--hh-panel); border-radius: 10px; width: fit-content; max-width: 100%; margin-bottom: 10px; }
.hh-views button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; }
.hh-views button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 480px) { .hh-views { width: 100%; } .hh-views button { flex: 1; padding: 0 6px; font-size: 14px; } }

/* stage */
.hh-stage { position: relative; }
.hh-map canvas { display: block; width: 100%; aspect-ratio: 1080 / 950; border-radius: 8px; background: #0A1013; }
.hh-board { max-height: min(78vh, 760px); overflow: auto; border-radius: 8px; background: var(--hh-panel); }
.hh-dots { position: relative; padding: 8px 0; }
.hh-dots canvas { display: block; width: 100%; }
.hh-dots-labels { position: absolute; inset: 8px 0 auto 0; pointer-events: none; }
.hh-dots-label { position: absolute; left: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.hh-dots-label strong { color: var(--ink); }

/* board */
.hh-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hh-table thead th { position: sticky; top: 0; z-index: 1; background: var(--hh-panel); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.hh-table th[scope="row"] { font-weight: 600; text-align: left; white-space: nowrap; }
.hh-table td, .hh-table th[scope="row"] { padding: 6px 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); vertical-align: middle; }
.hh-table .hh-n { text-align: right; width: 4.5em; font-variant-numeric: tabular-nums; }
.hh-table .hh-now { font-weight: 800; font-size: 17px; }
.hh-table .hh-day { position: relative; width: 45%; min-width: 110px; }
.hh-spark { display: block; width: 100%; height: 26px; }
.hh-spark-cursor { position: absolute; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; background: var(--hh-accent); }
.hh-table td.hh-day .hh-spark-cursor { left: 0; }
.hh-row-sym { display: inline-flex; vertical-align: -4px; margin-right: 8px; }
.hh-idle { opacity: .45; }
.hh-board .hh-note { margin: 0; padding: 10px; }
@media (max-width: 560px) {
  .hh-table { font-size: 14px; }
  .hh-table th[scope="row"] { white-space: normal; }
  .hh-table .hh-day { width: 30%; min-width: 64px; }
  .hh-table .hh-n { width: 3em; }
  .hh-table tr > :last-child { display: none; }
  .hh-row-sym { display: none; }
}

/* badges in hvv style */
.hh-badge { display: inline-block; min-width: 2.3em; padding: 1px 6px; font-weight: 800; font-size: 14px; line-height: 1.35; text-align: center; border-radius: 1px; }
.hh-badge-pill { border-radius: 999px; }
.hh-badge-r { background: transparent; color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--ink) 50%, transparent); border-radius: 999px; }
.hh-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.hh-sym { display: block; flex: none; overflow: visible; }
.hh-sym text { font-family: inherit; }

/* chart */
.hh-chart { margin-top: 14px; }
.hh-chart canvas { display: block; width: 100%; height: clamp(110px, 22vw, 170px); cursor: ew-resize; touch-action: none; }
.hh-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* controls */
.hh-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.hh-play { min-height: 44px; min-width: 88px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--hh-accent); color: #fff !important; font-weight: 800; }
.hh-speed { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.hh select { min-height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--hh-chip); color: var(--ink); }
.hh-scrub { flex: 1 1 100%; }
.hh-scrub input { width: 100%; height: 32px; accent-color: var(--hh-accent); }
@media (min-width: 720px) { .hh-scrub { flex: 1 1 200px; order: 3; } }

/* filters */
.hh-filters { margin-top: 16px; display: grid; gap: 10px; }
.hh-filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hh-lines { gap: 10px 14px; }
.hh-line-group { display: flex; flex-wrap: wrap; gap: 6px; }
.hh-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--hh-chip); font-size: 14px; font-weight: 600; transition: opacity .15s; }
.hh-chip[aria-pressed="false"] { opacity: .4; background: transparent; }
.hh-chip[aria-pressed="false"] .hh-sym, .hh-chip[aria-pressed="false"] .hh-badge, .hh-chip[aria-pressed="false"] .hh-swatch { filter: grayscale(1); }
.hh-chip:disabled { opacity: .2; cursor: default; }
.hh-chip-line { padding: 0 8px; min-height: 36px; }
.hh-opts { gap: 10px 22px; font-size: 14px; }
.hh-opts label { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.hh-opts input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--hh-accent); }
.hh-hint { color: var(--muted); }
.hh-note { color: var(--muted); font-size: 14px; }

.hh .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
