/* Öffimonitor – Stylesheet
   Gestaltung: kühles Stationsgrau, Petrol als Akzent, die bernsteinfarbene
   "Anzeigetafel" als einziges auffälliges Element. Keine Inline-Styles (CSP). */

:root {
  color-scheme: light;
  --bg: #eceff2;
  --surface: #ffffff;
  --surface-2: #f5f7f9;
  --ink: #142029;
  --ink-2: #44525e;
  --muted: #6b7884;
  --rule: #d4dbe1;
  --accent: #0b6470;
  --accent-ink: #ffffff;
  --accent-soft: #d9eef0;
  --board: #11171c;
  --board-2: #1b232a;
  --amber: #ffb81c;
  --amber-dim: #b9892a;
  --good: #0a7d32;
  --warn: #9a6400;
  --bad: #c4302b;
  --good-bg: #dff3e5;
  --warn-bg: #fdf0d2;
  --bad-bg: #fbe1df;
  /* Diagramme (dataviz-Referenzpalette, validiert) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #5598e7; --seq-4: #256abf; --seq-5: #104281;
  --grid: #e3e8ec;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 0 rgba(20, 32, 41, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1317; --surface: #161e24; --surface-2: #1c262d; --ink: #e7edf1; --ink-2: #b4c0c9;
    --muted: #8796a2; --rule: #2a363f; --accent: #4fb3bf; --accent-ink: #062226; --accent-soft: #163a40;
    --board: #0a0e11; --board-2: #141b20;
    --good: #4cc677; --warn: #f0b43c; --bad: #f07a72;
    --good-bg: #133222; --warn-bg: #3a2d10; --bad-bg: #3d1b19;
    --series-1: #3987e5; --series-2: #d95926;
    --seq-1: #13243a; --seq-2: #184f95; --seq-3: #2a78d6; --seq-4: #6da7ec; --seq-5: #b7d3f6;
    --grid: #233039;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1317; --surface: #161e24; --surface-2: #1c262d; --ink: #e7edf1; --ink-2: #b4c0c9;
  --muted: #8796a2; --rule: #2a363f; --accent: #4fb3bf; --accent-ink: #062226; --accent-soft: #163a40;
  --board: #0a0e11; --board-2: #141b20;
  --good: #4cc677; --warn: #f0b43c; --bad: #f07a72;
  --good-bg: #133222; --warn-bg: #3a2d10; --bad-bg: #3d1b19;
  --series-1: #3987e5; --series-2: #d95926;
  --seq-1: #13243a; --seq-2: #184f95; --seq-3: #2a78d6; --seq-4: #6da7ec; --seq-5: #b7d3f6;
  --grid: #233039;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; max-width: 70ch; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--rule);
}
.top-inner { max-width: 1240px; margin: 0 auto; padding: 8px 16px 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; min-height: 60px; }
/* Navigation immer in eigener Zeile unter Logo + Werkzeugen */
.top-inner .nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
.top-inner .top-tools { margin-left: auto; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--ink-2); text-decoration: none; padding: .45rem .7rem; border-radius: 999px; white-space: nowrap; font-weight: 500; font-size: .95rem;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.top-tools { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.live { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.live.stale .live-dot { background: var(--warn); }
.icon-btn {
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 999px; width: 36px; height: 36px;
  display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

main { max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head p { color: var(--ink-2); margin: .35rem 0 0; }

/* ---------- Anzeigetafel ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.board {
  background: var(--board); color: #f4f1e8; border-radius: 14px; padding: 18px 18px 10px; min-height: 320px;
  display: flex; flex-direction: column; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid #2b343b; padding-bottom: .7rem; margin-bottom: .3rem; }
.board-title { color: var(--amber); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.board-clock { color: var(--amber); font-weight: 700; font-size: 1.4rem; }
.board-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.board-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .62rem 0;
  border-bottom: 1px dashed #263038; cursor: pointer; color: inherit; text-decoration: none;
}
.board-row:hover .board-text { color: var(--amber); }
.board-row:last-child { border-bottom: 0; }
.board-text { font-weight: 600; color: #f4f1e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-sub { color: #a8b0b6; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-time { color: var(--amber); font-weight: 700; text-align: right; white-space: nowrap; }
.board-time small { display: block; color: #a8b0b6; font-weight: 500; font-size: .78rem; }
.board-empty { color: var(--amber); padding: 2.5rem 0; font-size: 1.15rem; text-align: center; }
.board-foot { display: flex; justify-content: space-between; color: #a8b0b6; font-size: .82rem; padding-top: .6rem; border-top: 1px solid #2b343b; margin-top: auto; }
.board-foot a { color: var(--amber); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--accent); }
.kpi-label { color: var(--ink-2); font-size: .85rem; }
.kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.1; margin-top: .25rem; letter-spacing: -.02em; }
.kpi-note { color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.kpi.wide { grid-column: span 2; }

/* ---------- Karten / Raster ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .9rem; }
.panel-head p { color: var(--muted); font-size: .85rem; margin: .2rem 0 0; }
.panel-head a { font-size: .9rem; white-space: nowrap; }
.mt { margin-top: 16px; }

/* ---------- Linien-Badges ---------- */
.badge {
  --c: #5b6670; display: inline-flex; align-items: center; justify-content: center; min-width: 2.2em; height: 1.75em;
  padding: 0 .45em; border-radius: 5px; background: var(--c); color: #fff; font-weight: 700; font-size: .92rem; line-height: 1;
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
}
.badge.lg { font-size: 1.5rem; height: 1.8em; min-width: 2.4em; border-radius: 8px; }
.badge.m-metro { border-radius: 4px; }
.badge.m-tram { --c: #c8202f; border-radius: 999px; }
.badge.m-bus { --c: #1f4e8c; }
.badge.m-nightbus { --c: #232a5c; }
.badge.m-sbahn { --c: #0a6fb6; border-radius: 999px; }
.badge.m-train { --c: #4b5560; }
.badge.m-fernzug { --c: #7a1f2b; }
.badge.m-regionalzug { --c: #3d5a80; }
.badge.op-westbahn { --c: #2c8a3c; }
.badge.m-regionalbus { --c: #a8481b; }
.badge.l-U1 { --c: #e3000f; } .badge.l-U2 { --c: #a8509f; } .badge.l-U3 { --c: #ee7d00; }
.badge.l-U4 { --c: #00963f; } .badge.l-U5 { --c: #008e98; } .badge.l-U6 { --c: #9a6736; }
.badges { display: inline-flex; flex-wrap: wrap; gap: .3rem; }

/* ---------- Chips / Status ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.live-chip { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pct { font-weight: 700; }
.pct.good { color: var(--good); } .pct.warn { color: var(--warn); } .pct.bad { color: var(--bad); }

/* ---------- Filter ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.field input, .field select {
  font: inherit; font-size: .95rem; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-s); padding: .45rem .6rem; min-height: 38px; min-width: 0;
}
.field input[type="search"] { min-width: 220px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: 20px; padding: 3px; background: var(--surface); }
.seg button { font: inherit; font-size: .9rem; border: 0; background: none; color: var(--ink-2); padding: .32rem .8rem; border-radius: 999px; cursor: pointer; min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.btn {
  font: inherit; font-size: .92rem; font-weight: 600; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-s); padding: .45rem .85rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 38px;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Störungsliste ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: start; padding: .9rem .25rem;
  border-bottom: 1px solid var(--rule); cursor: pointer;
}
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--surface-2); }
.item-title { font-weight: 600; }
.item-desc { color: var(--ink-2); font-size: .92rem; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; align-items: center; color: var(--muted); font-size: .82rem; }
.item-side { text-align: right; color: var(--ink-2); font-size: .85rem; white-space: nowrap; }
.item-side strong { display: block; color: var(--ink); font-size: 1rem; }
.empty { color: var(--muted); padding: 2rem 0; text-align: center; }
.more { display: flex; justify-content: center; margin-top: 1rem; }
.count { color: var(--muted); font-size: .9rem; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
th { color: var(--ink-2); font-weight: 600; font-size: .82rem; white-space: nowrap; }
th button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
td.num, th.num { text-align: right; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.rank { color: var(--muted); width: 2.5rem; }
.meter { position: relative; height: 8px; background: var(--grid); border-radius: 4px; min-width: 80px; overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--series-1); }
.meter-cell { display: flex; align-items: center; gap: .6rem; }
.meter-cell .meter { flex: 1; }

/* ---------- Linienraster ---------- */
.line-groups { display: grid; gap: 20px; }
.line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.line-tile {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 1px solid var(--rule); border-radius: var(--radius-s);
  background: var(--surface); text-decoration: none; color: var(--ink); position: relative;
}
.line-tile:hover { border-color: var(--accent); }
.line-tile .lt-val { font-size: .85rem; color: var(--ink-2); line-height: 1.25; }
.line-tile .lt-val strong { display: block; color: var(--ink); font-size: .95rem; }
.line-tile.disrupted { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.star { background: none; border: 0; cursor: pointer; color: var(--muted); padding: .25rem; margin-left: auto; line-height: 0; }
.star[aria-pressed="true"] { color: var(--amber-dim); }
.star svg { width: 18px; height: 18px; }

/* ---------- Diagramme ---------- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .lbl { fill: var(--ink-2); font-size: 12px; }
.chart .val { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--rule); stroke-width: 1; }
.chart .bar { fill: var(--series-1); }
.chart .bar.alt { fill: var(--series-2); }
.chart .bar.dim { fill: var(--grid); }
.chart .bar:hover, .chart .hit:hover + .bar { opacity: .85; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .1; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .ref { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .cell { stroke: var(--surface); stroke-width: 2; }
.chart .s0 { fill: var(--surface-2); } .chart .s1 { fill: var(--seq-1); } .chart .s2 { fill: var(--seq-2); }
.chart .s3 { fill: var(--seq-3); } .chart .s4 { fill: var(--seq-4); } .chart .s5 { fill: var(--seq-5); }
.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: var(--ink-2); margin-top: .5rem; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.legend .s1 { background: var(--seq-1); } .legend .s3 { background: var(--seq-3); } .legend .s5 { background: var(--seq-5); }
.tip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--surface); padding: .4rem .6rem; border-radius: 6px;
  font-size: .82rem; line-height: 1.35; max-width: 260px; opacity: 0; transition: opacity .08s;
}
.tip.on { opacity: 1; }
.tip b { display: block; }
.toggle-table { font-size: .82rem; margin-top: .4rem; }

/* ---------- Detaildialog ---------- */
dialog {
  border: 0; border-radius: 14px; padding: 0; max-width: 680px; width: calc(100% - 32px); background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
dialog::backdrop { background: rgba(10, 15, 20, .55); }
.dlg-head { display: flex; gap: .8rem; align-items: start; padding: 18px 18px 12px; border-bottom: 1px solid var(--rule); }
.dlg-head h2 { flex: 1; font-size: 1.15rem; }
.dlg-body { padding: 16px 18px 20px; max-height: 70vh; overflow: auto; }
.dlg-body p { white-space: pre-line; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 1rem 0; font-size: .93rem; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { margin: 0; }

/* ---------- Liniendetail ---------- */
.line-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.line-head .sub { color: var(--ink-2); }
.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 1.1rem 0 16px; }
.back { display: inline-flex; gap: .3rem; align-items: center; margin-bottom: .75rem; font-size: .92rem; white-space: nowrap; }
.back svg { width: 18px; height: 18px; }

.note { background: var(--accent-soft); border-radius: var(--radius); padding: .8rem 1rem; color: var(--ink); font-size: .92rem; }
.note p:last-child { margin-bottom: 0; }
.prose h2 { margin: 1.5rem 0 .5rem; }
.prose ul { padding-left: 1.2rem; max-width: 70ch; }
.prose li { margin-bottom: .3rem; }
code { background: var(--surface-2); padding: .05rem .3rem; border-radius: 4px; font-size: .9em; }
.error { background: var(--bad-bg); color: var(--bad); padding: .8rem 1rem; border-radius: var(--radius); }
.loading { color: var(--muted); padding: 2rem 0; }
footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; }
footer .inner { max-width: 1240px; margin: 0 auto; padding: 18px 16px 28px; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- Responsiv ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .top-inner { flex-wrap: wrap; padding-top: 8px; gap: .4rem; }
  .nav { order: 3; flex-basis: 100%; padding-bottom: 6px; }
  .top-tools { margin-left: auto; }
  .live-text { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 1.6rem; }
  h1 { font-size: 1.45rem; }
  .board { padding: 14px 12px 8px; }
  .board-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: .6rem; }
  .field input[type="search"] { min-width: 0; width: 100%; }
  .field.grow { flex-basis: 100%; }
  .item { grid-template-columns: auto minmax(0, 1fr); }
  .item-side { grid-column: 2; text-align: left; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (forced-colors: active) { .badge, .bar { forced-color-adjust: none; } }
@media print { .top, .filters, footer, .star { display: none; } body { background: #fff; } }
.star[aria-pressed="false"] svg path { fill: none; }

/* ---------- Bahn ---------- */
.train { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; font-weight: 600; }
.route { color: var(--ink-2); font-size: .88rem; }
.op-name { color: var(--muted); font-size: .8rem; }
.src-note { color: var(--muted); font-size: .85rem; margin-top: .6rem; }

/* ---------- Bundesland-Auswahl / Karte ---------- */
.region-pick select {
  font: inherit; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
  border-radius: 999px; padding: .35rem .7rem; min-height: 36px; max-width: 170px;
}
.region-banner { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between;
  background: var(--accent-soft); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 16px; }
.region-banner p { margin: 0; }
.map svg { width: 100%; height: auto; display: block; }
.map .state { stroke: var(--surface); stroke-width: 1.5; cursor: pointer; }
.map .state:hover, .map .state:focus { stroke: var(--ink); stroke-width: 2; outline: none; }
.map .state.sel { stroke: var(--ink); stroke-width: 2.5; }
.map .nodata { fill: var(--grid); }
.map text { fill: var(--ink); font-size: 17px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.region-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px;
  text-align: left; font: inherit; color: inherit; cursor: pointer; display: block; width: 100%; }
.region-card:hover { border-color: var(--accent); }
.region-card.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.region-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.region-card dl { display: grid; grid-template-columns: 1fr auto; gap: .25rem .8rem; margin: 0; font-size: .9rem; }
.region-card dt { color: var(--ink-2); }
.region-card dd { margin: 0; text-align: right; }
.region-card .src { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .3rem; }
@media (max-width: 720px) { .region-pick select { max-width: 130px; } }
