/* Radiesel web interface. No build step; colors are tokens on :root. */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --accent: #0b5cad;
  --accent-soft: #e8f1fb;
  --route: #0b5cad;

  --cheap: #16a34a;
  --cheap-soft: #e7f6ec;
  --mid: #d99a00;
  --mid-soft: #fdf4dc;
  --expensive: #dc2626;
  --expensive-soft: #fdeaea;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .16);
  --topbar-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 14px; font-weight: 650; }
code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
a { color: var(--accent); }
.muted { color: var(--muted); margin: 2px 0 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  min-height: var(--topbar-h); /* grows when the route name wraps */
  flex: none;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1100;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; }
/* min-width: 0 lets the route name shrink (and wrap) instead of overlapping the tabs. */
.brand-text { min-width: 0; padding: 6px 0; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 12px; line-height: 1.35; }
.brand-route { overflow-wrap: anywhere; }

.tabs { display: flex; flex: none; gap: 2px; align-self: stretch; margin-left: 12px; }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 550; color: var(--muted);
  padding: 0 14px; position: relative;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px 2px 0 0;
}
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 8px; }

.topbar-meta { margin-left: auto; flex: none; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; }
.data-status { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.data-status strong { color: var(--text-2); font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.status-dot.ok { background: var(--cheap); box-shadow: 0 0 0 3px var(--cheap-soft); }
.status-dot.warn { background: var(--mid); box-shadow: 0 0 0 3px var(--mid-soft); }

select, input[type="search"], input[type="password"] {
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 7px 10px; min-height: 36px;
}
select:focus-visible, input:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.select-inline select { font-size: 12.5px; min-height: 32px; padding: 4px 8px; }

.direction-bar {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  padding: 8px 20px; font-size: 13px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.direction-bar.filtered { background: var(--accent-soft); }
.direction-label { font-weight: 600; color: var(--text-2); }
.direction-note { color: var(--muted); }
.direction-bar.filtered .direction-note { color: var(--accent); font-weight: 550; }

.banner {
  flex: none; padding: 9px 20px; font-size: 13px;
  background: var(--mid-soft); color: #7a5600; border-bottom: 1px solid #f1dfa6;
}
.banner.error { background: var(--expensive-soft); color: #991b1b; border-color: #f5c2c2; }

/* ------------------------------------------------------------------ layout */
main { flex: 1; min-height: 0; display: flex; }
.view { flex: 1; min-width: 0; }
.view-map { display: grid; grid-template-columns: 360px 1fr; grid-template-rows: auto 1fr; min-height: 0; }
.view-map > .favorites { grid-column: 1; grid-row: 1; }
.view-map > .sidebar { grid-column: 1; grid-row: 2; min-height: 0; }
.view-map > .map-wrap { grid-column: 2; grid-row: 1 / 3; }
.view-page { overflow-y: auto; padding: 24px clamp(16px, 3vw, 40px) 40px; }
.view-page > * { max-width: 1240px; margin-left: auto; margin-right: auto; }

.sidebar {
  overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px;
  background: var(--bg); border-right: 1px solid var(--border);
}
.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: #e9eef3; }
/* Muted base map so the price colors stand out. */
#map .leaflet-tile-pane { filter: saturate(.3) brightness(1.04) contrast(.95); }

/* ------------------------------------------------------------------ favourite stations */
/* Pinned: stays at the top of the left column while the sidebar below it scrolls. */
.favorites {
  display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 0;
  max-height: 60vh; overflow-y: auto; background: var(--bg); border-right: 1px solid var(--border);
}
.fav { background: #fffaf0; border: 1px solid #f0c75e; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.fav-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fav-title {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: left;
  font: inherit; font-weight: 700; font-size: 14.5px; color: var(--text);
}
.fav-title:hover { color: var(--accent); text-decoration: underline; }
.fav-star { color: #e0a100; margin-right: 4px; }
.fav-sub { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.fav-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; }
.fav-price .value { font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fav-price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.fav-change { font-size: 13px; margin: 2px 0 0; }
.fav-change .change-up, .fav-change .change-down { white-space: normal; }
.fav-outlook { font-size: 12.5px; color: var(--text-2); margin: 6px 0 0; }
.fav-calc { border-top: 1px dashed #e3cf95; margin-top: 12px; padding-top: 10px; }
.fav-calc label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.fav-calc input {
  width: 96px; font: inherit; font-size: 15px; font-weight: 600; text-align: right; padding: 6px 8px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text);
}
.fav-total { font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 8px; }
.fav-range { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.fav-range .change-up, .fav-range .change-down { font-weight: 600; }
.fav-missing { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* ------------------------------------------------------------------ cards & KPIs */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 12px; }
.note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.source { color: var(--muted); font-size: 11.5px; margin: 0; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpis-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px auto; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.kpi-label { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-value-sm { font-size: 17px; white-space: nowrap; }
.price-cheap { color: var(--cheap); }
.price-mid { color: #a87600; }
.price-expensive { color: var(--expensive); }

/* ------------------------------------------------------------------ legend */
.legend { display: grid; gap: 6px; }
.legend-item {
  appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.legend-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.legend-item[aria-pressed="false"] { opacity: .45; }
.legend-item[aria-pressed="false"] .legend-dot { background: var(--border-strong) !important; }
.legend-name { font-weight: 600; }
.legend-range { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.legend-count { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.legend-dot, .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15,23,42,.15); }
.dot { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-right: 6px; }
.bg-cheap { background: var(--cheap); }
.bg-mid { background: var(--mid); }
.bg-expensive { background: var(--expensive); }

/* ------------------------------------------------------------------ segments */
.segments { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: seg; }
.segment { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.segment-main {
  appearance: none; border: 0; background: var(--surface); font: inherit; color: inherit; cursor: pointer;
  width: 100%; text-align: left; padding: 9px 11px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
}
.segment-main:hover { background: var(--surface-2); }
.segment-name { font-weight: 600; }
.segment-km { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.segment-stats { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.segment-cheapest {
  appearance: none; border: 0; border-top: 1px solid var(--border); background: var(--cheap-soft);
  font: inherit; font-size: 12px; color: #14532d; cursor: pointer; width: 100%; text-align: left;
  padding: 6px 11px; display: flex; justify-content: space-between; gap: 8px;
}
.segment-cheapest:hover { background: #d7f0df; }
.segment-cheapest span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segment-cheapest strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.segment-empty { padding: 6px 11px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface-2); }

/* ------------------------------------------------------------------ map bits */
.loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(244, 246, 249, .75); color: var(--muted); font-weight: 500; z-index: 1000;
}
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.waypoint-icon { width: 0; height: 0; }
.waypoint-dot {
  position: absolute; width: 12px; height: 12px; left: -6px; top: -6px; border-radius: 3px;
  background: var(--text); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transform: rotate(45deg);
}
.waypoint-label {
  position: absolute; left: 10px; top: -10px; white-space: nowrap; font: 600 11.5px/1 var(--font); color: var(--text);
  background: rgba(255,255,255,.92); padding: 4px 6px; border-radius: 5px; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.leaflet-tooltip.station-tip { font: 12px/1.35 var(--font); padding: 6px 9px; border-radius: 7px; border: 0; box-shadow: var(--shadow-lg); }
.station-tip strong { display: block; font-weight: 600; }
.leaflet-container { font-family: var(--font); }

/* ------------------------------------------------------------------ pages */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-subhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; margin-bottom: 12px; }
.page-subhead h2 { font-size: 16px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 18px auto 14px; }
.toolbar-compact { margin: 0; align-items: center; flex-wrap: nowrap; }
.toolbar-compact .field-grow { flex: 0 1 280px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.field-grow { flex: 1 1 240px; }
.field input, .field select { font-size: 14px; }

.btn {
  appearance: none; font: inherit; font-weight: 550; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: #94a3b8; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #094c90; border-color: #094c90; }
.btn-ghost { border-color: transparent; background: none; color: var(--accent); }

.segmented { flex: none; display: inline-flex;border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segmented button { appearance: none; border: 0; background: none; font: inherit; font-weight: 550; color: var(--muted); padding: 7px 14px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

/* ------------------------------------------------------------------ tables */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table th button { appearance: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.data-table th button:hover { color: var(--text); }
.data-table th[aria-sort] button { color: var(--accent); }
.data-table th[aria-sort="ascending"] button::after { content: " ↑"; }
.data-table th[aria-sort="descending"] button::after { content: " ↓"; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.cell-name { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-muted { color: var(--muted); white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 28px 16px; margin: 0; }
.table-foot { display: flex; justify-content: center; }
.table-foot .btn { margin: 8px; }

.price-pill {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.price-pill.cheap { background: var(--cheap-soft); color: #166534; }
.price-pill.mid { background: var(--mid-soft); color: #8a6100; }
.price-pill.expensive { background: var(--expensive-soft); color: #b91c1c; }
.change-up { color: var(--expensive); font-weight: 600; white-space: nowrap; }
.change-down { color: var(--cheap); font-weight: 600; white-space: nowrap; }
.change-none { color: var(--muted); }

/* ------------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--border); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-tooltip {
  position: absolute; pointer-events: none; background: var(--text); color: #fff; font-size: 12px; line-height: 1.5;
  padding: 7px 10px; border-radius: 7px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px));
}
.chart-tooltip strong { display: block; font-weight: 600; margin-bottom: 2px; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.swatch-max { background: var(--expensive); }
.swatch-median { background: var(--text); }
.swatch-min { background: var(--cheap); }

/* ------------------------------------------------------------------ drawer */
.backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .28); z-index: 1190; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 1200;
  background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .22s ease; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 12px 22px; border-bottom: 1px solid var(--border); }
.drawer-kicker { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.drawer-body { overflow-y: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.drawer-body > * { flex-shrink: 0; }
.icon-btn { appearance: none; border: 0; background: none; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.detail-title h2 { font-size: 19px; margin-top: 8px; }
.detail-title p { margin: 4px 0 0; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.badge.cheap { background: var(--cheap-soft); border-color: transparent; color: #166534; }
.badge.mid { background: var(--mid-soft); border-color: transparent; color: #8a6100; }
.badge.expensive { background: var(--expensive-soft); border-color: transparent; color: #b91c1c; }

.price-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.price-hero .label { color: var(--muted); font-size: 12px; }
.price-hero .value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.price-hero .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.price-hero .delta { text-align: right; font-size: 12px; color: var(--muted); }
.price-hero .delta strong { display: block; font-size: 14px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 0; }
.facts div { background: var(--surface); padding: 10px 12px; }
.facts dt { color: var(--muted); font-size: 11.5px; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.detail-section h3 { font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.list-plain { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.list-plain li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; font-variant-numeric: tabular-nums; }
.list-plain li + li { border-top: 1px solid var(--border); }
.list-plain li.current { font-weight: 600; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mini-table th, .mini-table td { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: left; }
.mini-table th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.mini-table .num { text-align: right; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ dialog */
dialog { border: 0; border-radius: 14px; padding: 22px; width: min(400px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 42, .4); }
dialog form { display: flex; flex-direction: column; gap: 12px; }
dialog p { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .hide-md { display: none; }
  .brand-sub { display: none; }
}
@media (max-width: 860px) {
  :root { --topbar-h: auto; }
  body { height: auto; min-height: 100%; }
  .topbar { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px 0; }
  .topbar-meta { margin-left: auto; }
  .data-status span:last-child { display: none; }
  .tabs { order: 3; width: 100%; margin: 0 -4px; height: 44px; }
  .toolbar-compact { flex-wrap: wrap; width: 100%; }
  .toolbar-compact .field-grow { flex: 1 1 200px; }
  .tab { flex: 1; }
  .direction-bar { padding: 8px 16px; }
  .direction-bar .segmented { width: 100%; }
  .direction-bar .segmented button { flex: 1; padding: 7px 4px; font-size: 13px; white-space: nowrap; }
  main { display: block; }
  .view-map { display: flex; flex-direction: column; }
  .view-map > .favorites { order: 1; max-height: none; overflow: visible; border-right: 0; padding-bottom: 14px; }
  .view-map > .map-wrap { order: 2; }
  .view-map > .sidebar { order: 3; }
  .map-wrap { height: 62vh; min-height: 360px; }
  .sidebar { border-right: 0; overflow: visible; }
  .view-page { padding: 18px 16px 32px; }
  .hide-sm { display: none; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .cell-sub { max-width: 52vw; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
  .spinner, .skeleton { animation: none; }
}
