/* KapikanMaps dashboard v2 (docs/server/dashboard.md §16.3): ported from the approved mockup
   (docs/server/design/dashboard-mockup/static/app.css). The ONE stylesheet of our own: no framework, no icon font, no web font.
   Tokens first (light, then dark), then the shell, the shared parts, the map, and one block per page. The map
   colours (--zone ... --uncovered) are render.py's exact constants. */

/* ------------------------------------------------------------------ tokens */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #f2f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #edf1f5;
  --ink: #0f1d2b;
  --ink-2: #4a5a6b;
  --ink-3: #8293a4;
  --line: #e3e9ef;
  --line-2: #d2dbe4;
  --accent: #0d7f8a;
  --accent-hover: #0a6c76;
  --accent-ink: #ffffff;
  --accent-soft: #e1f2f4;
  --ok: #17885a;
  --ok-soft: #e0f3e9;
  --warn: #a96608;
  --warn-soft: #fcf0d8;
  --bad: #c73434;
  --bad-soft: #fbe5e5;
  --test: #6a4fd0;
  --test-soft: #ece8fb;
  --muted-soft: #edf1f4;
  --up: #b05600;
  --up-soft: rgba(255, 127, 14, .15);
  --down: #1d679f;
  --down-soft: rgba(31, 119, 180, .13);
  --glass: rgba(255, 255, 255, .88);
  --glass-line: rgba(15, 29, 43, .08);
  --tip-bg: #13222f;
  --shadow-1: 0 1px 2px rgba(15, 29, 43, .05), 0 1px 3px rgba(15, 29, 43, .07);
  --shadow-2: 0 12px 32px -10px rgba(15, 29, 43, .22), 0 2px 8px rgba(15, 29, 43, .07);
  --shadow-3: 0 28px 64px -16px rgba(15, 29, 43, .34), 0 4px 12px rgba(15, 29, 43, .08);
  --r: 12px;
  --side-w: 220px;
  --top-h: 62px;
  /* the map palette: server/dashboard/render.py, exactly */
  --zone: rgb(214, 39, 40);
  --only-a: rgb(31, 119, 180);
  --only-b: rgb(255, 127, 14);
  --neither: rgb(235, 235, 235);
  --land: rgb(64, 64, 64);
  --uncovered: rgb(205, 205, 205);
  /* render.py's ZONE, ONLY_A, ONLY_B in hex (pinned by test_dashboard_render.py) */
  --red: #d62728; --blue: #1f77b4; --orange: #ff7f0e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a121b; --surface: #101b26; --surface-2: #13212e; --surface-3: #1a2938;
    --ink: #e6edf4; --ink-2: #a3b3c3; --ink-3: #6e8294; --line: #1e2f3f; --line-2: #2a3e51;
    --accent: #2ab4c0; --accent-hover: #4cc6d1; --accent-ink: #031417; --accent-soft: rgba(42, 180, 192, .15);
    --ok: #3fc78c; --ok-soft: rgba(63, 199, 140, .14); --warn: #e6a640; --warn-soft: rgba(230, 166, 64, .14);
    --bad: #f26b6b; --bad-soft: rgba(242, 107, 107, .15); --test: #a493ff; --test-soft: rgba(164, 147, 255, .16);
    --muted-soft: #1a2734; --up: #ffa65a; --up-soft: rgba(255, 127, 14, .18); --down: #6db6ee; --down-soft: rgba(31, 119, 180, .25);
    --glass: rgba(16, 27, 38, .86); --glass-line: rgba(255, 255, 255, .08); --tip-bg: #26394b;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .3);
    --shadow-3: 0 28px 64px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a121b; --surface: #101b26; --surface-2: #13212e; --surface-3: #1a2938;
  --ink: #e6edf4; --ink-2: #a3b3c3; --ink-3: #6e8294; --line: #1e2f3f; --line-2: #2a3e51;
  --accent: #2ab4c0; --accent-hover: #4cc6d1; --accent-ink: #031417; --accent-soft: rgba(42, 180, 192, .15);
  --ok: #3fc78c; --ok-soft: rgba(63, 199, 140, .14); --warn: #e6a640; --warn-soft: rgba(230, 166, 64, .14);
  --bad: #f26b6b; --bad-soft: rgba(242, 107, 107, .15); --test: #a493ff; --test-soft: rgba(164, 147, 255, .16);
  --muted-soft: #1a2734; --up: #ffa65a; --up-soft: rgba(255, 127, 14, .18); --down: #6db6ee; --down-soft: rgba(31, 119, 180, .25);
  --glass: rgba(16, 27, 38, .86); --glass-line: rgba(255, 255, 255, .08); --tip-bg: #26394b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-3: 0 28px 64px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -.012em; }
h2 { font-size: 16px; }
p { margin: 0; }
a { color: var(--accent); }
button, input, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; margin-top: 6px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ctr { text-align: center; }
.nowrap { white-space: nowrap; }
.txt-bad { color: var(--bad); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico .fill { fill: currentColor; stroke: none; }
.ico .soft { opacity: .55; }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: block; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-dark { display: block; }
  :root:not([data-theme="light"]) .when-light { display: none; }
}

/* ------------------------------------------------------------------ tooltips (CSS only) */
:where([data-tip]) { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 6px 9px; border-radius: 8px; background: var(--tip-bg); color: #fff;
  font: 500 12px/1.4 var(--font); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
  box-shadow: var(--shadow-2); z-index: 2000; pointer-events: none; animation: tip-in .12s ease-out;
}
[data-tip-side="right"]:hover::after { left: calc(100% + 10px); bottom: auto; top: 50%; transform: translateY(-50%); }
[data-tip-side="left"]:hover::after { left: auto; right: calc(100% + 10px); bottom: auto; top: 50%; transform: translateY(-50%); }
[data-tip-side="below"]:hover::after { bottom: auto; top: calc(100% + 9px); }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.side :where([data-tip]):hover::after { display: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 18px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff;
  background: linear-gradient(140deg, #16aab4 0%, #0d7f8a 45%, #0b4f86 100%); box-shadow: 0 8px 18px -8px rgba(13, 127, 138, .75); }
.brand-mark .ico { width: 24px; height: 24px; stroke-width: 1.6; }
.brand-text b { display: block; font-size: 15px; letter-spacing: -.015em; line-height: 1.2; }
.brand-text small { color: var(--ink-3); font-size: 11.5px; }
.nav-group { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 550; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.is-here { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-item.is-here .ico { stroke-width: 2.1; }
.nav-item.is-later { opacity: .48; cursor: not-allowed; }
.nav-item.is-later:hover { background: none; color: var(--ink-2); }
.nav-sep { margin: 18px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.side-foot { margin-top: auto; display: grid; gap: 5px; padding: 12px 8px 2px; }
.side-foot small { color: var(--ink-3); font-size: 11px; line-height: 1.35; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { flex: none; height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-title { min-width: 0; }
.top-title h1 { font-size: 18px; line-height: 1.2; }
.top-sub { margin-top: 1px; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 650; text-decoration: none; }
.status-pill.is-green { background: var(--ok-soft); color: var(--ok); }
.status-pill.is-red { background: var(--bad-soft); color: var(--bad); }
.status-pill.is-amber { background: var(--warn-soft); color: var(--warn); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 3px 13px 3px 3px; border: 1px solid var(--line); border-radius: 99px; background: transparent; cursor: pointer; text-align: left; }
.user-chip:hover { background: var(--surface-3); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-size: 11.5px; font-weight: 750; background: linear-gradient(140deg, #16aab4, #0b4f86); }
.avatar.xs { width: 20px; height: 20px; font-size: 9.5px; }
.user-text b { display: block; font-size: 12.5px; line-height: 1.25; }
.user-text small { display: block; color: var(--ink-3); font-size: 11.5px; line-height: 1.25; }
.content { position: relative; flex: 1; min-height: 0; overflow: auto; }
.page-maps .content { overflow: hidden; }
.page-pad { max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; }

/* ------------------------------------------------------------------ shared parts */
.card, .mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 18px 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-head p { margin-top: 2px; font-size: 13px; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 14px -8px var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; }
.btn .ico { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.danger-text { color: var(--bad); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.small { width: 30px; height: 30px; border-radius: 8px; }
.link { font-size: 12.5px; font-weight: 650; text-decoration: none; }
.link:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 650; white-space: nowrap; flex: none; }
.pill .ico { width: 9px; height: 9px; }
.pill.big { height: 27px; padding: 0 11px; font-size: 12.5px; }
.pill.big .ico { width: 10px; height: 10px; }
.pill-published, .pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-test, .pill-info { background: var(--test-soft); color: var(--test); }
.pill-inactive, .pill-muted { background: var(--muted-soft); color: var(--ink-2); }
.pill-red, .pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-amber { background: var(--warn-soft); color: var(--warn); }
.pill-land { background: rgba(64, 64, 64, .14); color: var(--ink-2); }
.pill-today { height: 19px; padding: 0 7px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; vertical-align: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip .ico { width: 14px; height: 14px; }
.chip-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip.tiny { height: 22px; padding: 0 8px; margin: 2px 4px 2px 0; font-size: 11.5px; }
.chips { display: flex; gap: 6px; }

.ab-badge { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 800; }
.ab-a { background: var(--only-a); }
.ab-b { background: var(--only-b); }
.ab-diff { width: auto; padding: 0 6px; background: var(--ink); color: var(--surface); }
.sp-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sp-yft { background: #f2c230; }
.sp-bet { background: #5a5fd6; }
.sp-skj { background: #2c9bd6; }
.sp-alb { background: #94a3b4; }
.sp-other { background: #a3a8b0; }      /* any other species: a neutral grey (dashboard.md §16.5) */
.wpp-code { display: inline-block; min-width: 34px; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }

.delta { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { background: var(--up-soft); color: var(--up); }
.delta.down { background: var(--down-soft); color: var(--down); }
.delta.same { background: var(--surface-3); color: var(--ink-3); }

.inline-msg { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600; }
.inline-msg.warn { background: var(--warn-soft); color: var(--warn); }

/* the range slider, one look in every browser; --fill is set by the script */
.range { --fill: 50%; width: 100%; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--line-2) var(--fill)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform .12s; }
.range:active::-webkit-slider-thumb { transform: scale(1.18); }
.range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--line-2); }
.range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
.range::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); }
.range:disabled { opacity: .4; cursor: not-allowed; }

/* segmented controls */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-3); }
.seg-full { display: flex; }
.seg-full .seg-opt { flex: 1 1 auto; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt span { display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 9px; border-radius: 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.seg-opt:hover span { color: var(--ink); }
.seg-opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-opt.is-disabled span { opacity: .4; }
.seg-opt input:disabled { cursor: not-allowed; }
.seg-small span { height: 26px; padding: 0 12px; font-size: 12px; letter-spacing: .03em; }

/* the dropdowns: <details> + radios, no browser-default select */
.field { display: grid; gap: 6px; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.field-label small { font-weight: 500; }
.field-label output { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.dd { position: relative; }
.dd-btn { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 11px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; list-style: none; user-select: none; transition: border-color .15s, box-shadow .15s; }
.dd-btn::-webkit-details-marker { display: none; }
.dd-btn:hover { border-color: var(--ink-3); }
.dd[open] > .dd-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.dd-chev { width: 16px; height: 16px; color: var(--ink-3); transition: transform .2s; }
.dd[open] .dd-chev { transform: rotate(180deg); }
.dd-lead { width: 16px; height: 16px; color: var(--ink-3); }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 100%; max-height: 340px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-3); animation: dd-in .14s ease-out; }
.dd-wide { width: 372px; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.dd-opt:hover { background: var(--surface-3); }
.dd-opt input { position: absolute; opacity: 0; pointer-events: none; }
.dd-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.dd-opt.is-on { background: var(--accent-soft); }
.dd-main { flex: 1; min-width: 0; display: grid; }
.dd-name { font-weight: 600; font-size: 13.5px; }
.dd-sub { color: var(--ink-3); font-size: 12px; }
.dd-tick { width: 16px; height: 16px; color: var(--accent); visibility: hidden; }
.dd-opt.is-on .dd-tick { visibility: visible; }

/* ------------------------------------------------------------------ the map component */
.mapshell { position: absolute; inset: 0; overflow: hidden; background: var(--surface-3); }
.panes { position: absolute; inset: 0; display: flex; }
.pane { position: relative; flex: 1 1 50%; min-width: 0; }
.pane-b { display: none; border-left: 2px solid var(--surface); }
.mapshell[data-view="side"] .pane-b { display: block; }
.map { position: absolute; inset: 0; }
.leaflet-container { background: var(--surface-3); font: inherit; outline: none; }
.mk-cells { image-rendering: pixelated; transition: opacity .3s ease; }
.leaflet-control-attribution { border-radius: 6px 0 0 0; font-size: 10.5px; background: color-mix(in srgb, var(--surface) 82%, transparent) !important; color: var(--ink-3); }
.leaflet-control-attribution a { color: var(--ink-2); }
.mapshell[data-view="side"] .pane-a .leaflet-control-attribution { display: none; }
.mk-cellbox { filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7)); }

.pane-tag { position: absolute; bottom: 116px; z-index: 600; display: none; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 5px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.pane-a .pane-tag { right: 42px; }
.pane-b .pane-tag { left: 42px; }
.pane-link { position: absolute; bottom: 120px; left: 50%; z-index: 610; display: none; align-items: center; gap: 4px; height: 22px; padding: 0 8px; transform: translateX(-50%); border-radius: 99px; background: var(--ink); color: var(--surface); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.pane-link .ico { width: 12px; height: 12px; }
.mapshell[data-view="side"] .pane-tag, .mapshell[data-view="side"] .pane-link { display: inline-flex; }

/* the floating settings card */
/* the card ends above the strip dock: 140px = the dock's bottom (26) + its height (~86) + the card's top (16) + a gap
   (12); the body scrolls inside the cap. The collapsed card (head only) is far shorter and unchanged. */
.map-card { position: absolute; top: 16px; left: 16px; z-index: 840; width: 344px; max-height: calc(100% - 140px); display: flex; flex-direction: column; border-radius: 16px; }
.mc-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 13px 10px 11px 16px; border-bottom: 1px solid var(--line); }
.mc-kicker { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.mc-title { margin-top: 1px; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.mc-body { display: grid; gap: 13px; padding: 13px 16px 15px; overflow-y: auto; min-height: 0; }
.map-card.is-collapsed .mc-body { display: none; }
.map-card.is-collapsed .mc-head { border-bottom: 0; }
.map-card.is-collapsed #card-collapse .ico { transform: rotate(180deg); }
.mc-form { display: grid; gap: 13px; }
.mc-rule { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.rule-swatch { width: 12px; height: 26px; flex: none; border-radius: 4px; background: var(--zone); }
.rule-text { flex: 1; display: grid; line-height: 1.3; }
.rule-text small { color: var(--ink-3); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.rule-text b { font-size: 13px; }
.rulebox { display: grid; gap: 6px; }
.mc-details { color: var(--ink-2); font-size: 12px; }
.mc-details > summary, .arow-more > summary, .empty-more > summary { cursor: pointer; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.mc-details-body { display: grid; gap: 8px; max-height: 260px; margin-top: 6px; overflow-y: auto; padding-right: 4px; }
.mc-details-body h4 { font-size: 12px; font-weight: 750; }
.mc-details-body ul { margin: 2px 0 0 16px; padding: 0; }
.runs-table { width: 100%; margin-top: 4px; border-collapse: collapse; font-size: 11.5px; }
.runs-table th, .runs-table td { padding: 3px 6px 3px 0; text-align: left; vertical-align: top; }
.map-message { display: none; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600; }
.map-message[role] { display: flex; }
.map-message .ico { width: 16px; height: 16px; flex: none; }

/* the tools, top right */
.map-tools { position: absolute; top: 16px; right: 16px; z-index: 830; display: flex; align-items: center; gap: 8px; }
.tool-btn { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 11px; border-radius: 12px; color: var(--ink); font-size: 13px; font-weight: 650; cursor: pointer; }
.tool-btn[aria-pressed="true"] { color: var(--accent); }
.zoom { display: flex; overflow: hidden; border-radius: 12px; }
.zoom button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); font-size: 18px; font-weight: 600; cursor: pointer; }
.zoom button + button { border-left: 1px solid var(--line); }
.zoom button:hover { background: var(--surface-3); }

/* the Areas drawer */
.drawer { position: absolute; top: 68px; right: 16px; z-index: 820; width: 372px; max-height: calc(100% - 68px - 238px); display: flex; flex-direction: column; border-radius: 16px; opacity: 0; pointer-events: none; transform: translateX(calc(100% + 24px)); transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.mapshell.drawer-open .drawer { opacity: 1; pointer-events: auto; transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 10px 6px 16px; }
.drawer-head p { font-size: 12.5px; }
.drawer-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding: 0 8px 12px; }
.arows { display: flex; flex-direction: column; min-height: 0; }
.drawer-sub { display: flex; align-items: center; gap: 8px; margin: 2px 8px 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) 46px 52px 50px; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 13px; }
.has-b .arow { grid-template-columns: minmax(0, 1fr) 42px 48px 46px 54px; }
.arow-head { padding-top: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink-3); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.arows-scroll { overflow-y: auto; min-height: 0; padding: 4px 0; }
a.arow { transition: background .12s; }
a.arow:hover { background: var(--surface-3); }
a.arow.is-focus { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.a-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.a-name small { overflow: hidden; color: var(--ink-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.arow .num.low { color: var(--warn); font-weight: 650; }
.same { display: inline-block; min-width: 38px; padding: 1px 6px; border-radius: 6px; font-size: 12px; font-weight: 750; text-align: center; }
.same-hi { background: var(--ok-soft); color: var(--ok); }
.same-mid { background: var(--warn-soft); color: var(--warn); }
.same-lo { background: var(--up-soft); color: var(--up); }
.cnt { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.1; }
.cnt.up { color: var(--up); }
.cnt.down { color: var(--down); }
.arow .score { color: var(--ink-2); }
.arow-foot { border-top: 1px solid var(--line); border-radius: 0; font-weight: 700; }
.arow-wrap + .arow-wrap { border-top: 1px solid var(--line); }
.arow-more { padding: 0 8px 4px; }
.arow-more-body { display: grid; gap: 4px; padding: 4px 0 4px; color: var(--ink-2); font-size: 11.5px; overflow-wrap: anywhere; }
.arow-more-body .ab-badge { width: 16px; height: 16px; margin-right: 4px; font-size: 9.5px; border-radius: 5px; }
.amber { color: var(--warn); font-weight: 650; }
.arow-more-body .amber { color: var(--warn); font-weight: 650; }
.drawer-empty { display: flex; gap: 10px; margin: 6px 8px; padding: 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; }

/* the date strip, bottom centre */
.strip-dock { position: absolute; left: 16px; right: 222px; bottom: 26px; z-index: 805; display: flex; justify-content: center; pointer-events: none; }
.strip { display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 8px; border-radius: 18px; pointer-events: auto; }
.strip-days { display: flex; gap: 3px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 12px 2px 2px; margin: -12px 0 -2px; }
.strip-days::-webkit-scrollbar { display: none; }
.strip-days .day { flex: none; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; width: 46px; padding: 7px 0 7px; border-radius: 11px; color: var(--ink); text-decoration: none; transition: background .15s, box-shadow .15s, transform .15s; }
.day:hover { background: var(--surface-3); transform: translateY(-1px); }
.day-wd { color: var(--ink-3); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2; }
.day-d { font-size: 17px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.day-m { color: var(--ink-3); font-size: 10.5px; line-height: 1.1; }
.day-none .day-d { color: var(--ink-3); font-weight: 600; }
.day-bars { display: flex; gap: 2px; width: 26px; margin-top: 6px; }
.bar { display: block; flex: 1; height: 4px; border-radius: 2px; }
.bar-published { background: var(--ok); }
.bar-test { background: var(--test); }
.bar-none { background: var(--line-2); }
.day.is-selected { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-1); }
.day.is-selected .day-d { color: var(--accent); }
.day-flag { position: absolute; top: -10px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 750; line-height: 16px; letter-spacing: .02em; }
.strip-arrow { display: grid; place-items: center; flex: none; width: 30px; height: 54px; border-radius: 10px; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s; }
.strip-arrow:hover { background: var(--surface-3); color: var(--ink); }
.strip-arrow.is-disabled { opacity: .35; }
.strip-legend { display: grid; gap: 3px; margin-left: 6px; padding: 0 6px 0 12px; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.strip-legend .bar { display: inline-block; width: 14px; margin-right: 6px; vertical-align: middle; }

/* the legend chip, bottom right */
.legend { position: absolute; right: 16px; bottom: 26px; z-index: 810; width: 192px; padding: 11px 13px; border-radius: 14px; font-size: 12px; }
.lg-ramp { margin-bottom: 9px; }
.lg-bar { display: block; height: 9px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.lg-ends { display: flex; justify-content: space-between; margin-top: 2px; color: var(--ink-3); font-size: 10.5px; }
.lg-items { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.lg-items li { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.lg-sw { width: 14px; height: 14px; flex: none; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.lg-hint { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 11px; }
.lg-hint .ico { width: 13px; height: 13px; }

/* the empty state over the map */
.map-empty { position: absolute; inset: 0; z-index: 700; pointer-events: none; }
.empty-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 0 90px; }
.empty-full { left: 360px; }
.mapshell.drawer-open .empty-full, .mapshell.drawer-open .empty-right { right: 396px; }
.empty-left { right: 50%; }
.empty-right { left: 50%; }
.empty-card { position: relative; width: min(420px, calc(100% - 32px)); padding: 22px 24px 20px; border-radius: 18px; text-align: center; pointer-events: auto; animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
.empty-card > .ab-badge { position: absolute; top: 14px; left: 14px; }
.empty-card h3 { margin-top: 6px; font-size: 16.5px; }
.empty-card p { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.empty-art { width: 120px; height: 84px; }
.ea-frame { fill: var(--surface-3); stroke: var(--line-2); stroke-width: 1.5; }
.ea-wave { fill: none; stroke: var(--accent); stroke-width: 2; opacity: .5; stroke-linecap: round; }
.ea-wave2 { opacity: .25; }
.ea-dash { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-dasharray: 4 4; }
.ea-dot { fill: var(--zone); opacity: .8; }
.empty-jumps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.empty-more { margin-top: 10px; text-align: left; font-size: 12px; }
.empty-line { font-weight: 650; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* the loading bar */
.loadbar { position: fixed; top: 0; left: 0; right: 0; z-index: 900; height: 3px; opacity: 0; pointer-events: none; transition: opacity .2s; background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 35% 100%; }
body.is-loading .loadbar { opacity: 1; animation: loading 1s linear infinite; }
@keyframes loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* the click popup */
.mk-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); }
.mk-popup .leaflet-popup-content { margin: 15px 16px 13px; font: 13px/1.45 var(--font); }
.mk-popup .leaflet-popup-tip { background: var(--surface); box-shadow: none; }
.mk-popup a.leaflet-popup-close-button { top: 9px; right: 9px; width: 26px; height: 26px; border-radius: 8px; color: var(--ink-3); font: 20px/24px var(--font); }
.mk-popup a.leaflet-popup-close-button:hover { background: var(--surface-3); color: var(--ink); }
.pop-loading { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--ink-2); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop-head { padding-right: 24px; margin-bottom: 9px; }
.pop-area b { display: block; font-size: 14px; line-height: 1.3; }
.pop-area small { color: var(--ink-3); font-size: 12px; }
.pop-table { width: 100%; margin: 10px 0 4px; border-collapse: collapse; }
.pop-table th { padding: 5px 10px 5px 0; color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.pop-table thead th { padding-bottom: 4px; text-align: right; }
.pop-table td { padding: 5px 0 5px 12px; text-align: right; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pop-table tbody tr + tr th, .pop-table tbody tr + tr td { border-top: 1px dashed var(--line); }
.pop-table small { color: var(--ink-3); font-weight: 500; }
.pop-rulehead { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.rankbar { display: inline-block; width: 38px; height: 5px; margin-right: 7px; overflow: hidden; border-radius: 3px; background: var(--surface-3); vertical-align: 2px; }
.rankbar b { display: block; height: 100%; background: linear-gradient(90deg, rgb(247, 251, 255), rgb(8, 48, 107)); }
.pop-models { display: grid; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.pop-models > span { display: flex; align-items: center; gap: 7px; }
.pop-models .ab-badge { width: 16px; height: 16px; font-size: 9.5px; border-radius: 5px; }
.pop-note { margin: 6px 0; color: var(--ink-2); }
.pop-details { margin-top: 8px; color: var(--ink-3); font-size: 11.5px; }
.pop-details summary { cursor: pointer; font-weight: 650; }
.pop-details p { margin-top: 4px; }

/* ------------------------------------------------------------------ Models */
.summary-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.slots { flex: 1; display: flex; align-items: center; gap: 28px; padding: 14px 20px; }
.slots-main { flex: none; }
.slots-text { font-size: 13.5px; color: var(--ink-2); }
.slots-text b { color: var(--ink); font-size: 16px; }
.slots-bar { display: flex; gap: 4px; margin-top: 7px; }
.slots-bar i { width: 46px; height: 8px; border-radius: 4px; background: var(--line-2); }
.slots-bar i.on { background: var(--accent); }
.slots p { font-size: 13px; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.mcard { position: relative; display: flex; flex-direction: column; gap: 10px; border-top-width: 3px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.mcard:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.mcard[data-state="published"] { border-top-color: var(--ok); }
.mcard[data-state="test"] { border-top-color: var(--test); }
.mcard[data-state="inactive"] { border-top-color: var(--line-2); }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mcard [data-tip], .mcard-actions, .mcard-id, .card-details, .publish-why { position: relative; z-index: 2; }
.mcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcard h3 { font-size: 18px; }
.mcard-note { margin-top: -6px; font-size: 13px; }
.policy-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px dashed var(--line-2); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.policy-chip.big { height: 26px; font-size: 13px; }
.build { padding: 12px; border-radius: 10px; background: var(--surface-2); }
.build-head { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--ink-2); font-size: 12.5px; }
.build-head b { color: var(--ink); }
.segbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.segbar i { height: 8px; border-radius: 4px; background: var(--line-2); }
.segbar i.on { background: var(--accent); }
.segbar.is-building i:not(.on) { background: repeating-linear-gradient(-45deg, var(--line-2) 0 4px, var(--surface-3) 4px 8px); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 0; }
.facts dt { color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.mcard-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.on-phones { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 12.5px; font-weight: 650; }
.on-phones .ico { width: 16px; height: 16px; }
.open-hint { margin-left: auto; color: var(--ink-3); transition: transform .2s; }
.mcard:hover .open-hint { transform: translateX(3px); color: var(--accent); }

.scrim { position: fixed; inset: 0; z-index: 1500; background: rgba(6, 14, 22, .34); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.side-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1600; width: min(540px, 100vw); overflow-y: auto; background: var(--surface); box-shadow: var(--shadow-3); transform: translateX(104%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.side-drawer.is-open { transform: none; }
.sd-inner { padding: 22px 26px 44px; }
.sd-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sd-head h2 { margin: 9px 0 2px; font-size: 22px; letter-spacing: -.02em; }
.sd-pills { display: flex; gap: 6px; }
.sd-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.sd-sec h3 { margin-bottom: 10px; color: var(--ink-3); font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.sd-sec h3 .muted { color: var(--ink-3); font-weight: 500; letter-spacing: 0; text-transform: none; }
.policy-box { padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.policy-box.is-warn { border-color: var(--warn); }
.policy-box p { margin-top: 9px; font-size: 13.5px; }
.policy-head { display: flex; align-items: center; gap: 8px; }
.policy-rec { font-weight: 650; }
.plain-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.kv { display: grid; margin: 0; }
.kv > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.kv dd.num { text-align: left; }
.kv.mono dd { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.days-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.days-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.dl-date b { display: block; font-size: 13px; }
.dl-date small { color: var(--ink-3); font-size: 12px; }
.dl-checks { display: flex; gap: 4px; }
.dl-checks i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.dl-checks i.bad { background: var(--bad); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 12px; padding-bottom: 14px; }
.timeline li::before { content: ""; position: absolute; top: 16px; bottom: -2px; left: 7px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 12px; height: 12px; margin: 4px 0 0 2px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); }
.tl-published .tl-dot { border-color: var(--ok); background: var(--ok); }
.tl-activated .tl-dot { border-color: var(--test); background: var(--test); }
.timeline b { display: block; font-size: 13.5px; }
.timeline small { color: var(--ink-3); font-size: 12px; }
.sd-details { margin-top: 16px; }
.sd-details summary { color: var(--ink-2); font-weight: 650; cursor: pointer; }
.sd-details .kv { margin-top: 8px; }

/* the confirm dialog + toasts */
.dlg { width: min(470px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); }
.dlg::backdrop { background: rgba(6, 14, 22, .46); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg-inner { padding: 22px 24px 18px; }
.dlg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.dlg-head h2 { font-size: 17.5px; }
.dlg p { margin: 9px 0; color: var(--ink-2); font-size: 13.5px; }
.dlg-field { display: grid; gap: 6px; margin: 14px 0 6px; font-size: 13px; font-weight: 650; }
.dlg-field small { font-weight: 500; }
.dlg-field textarea { padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); resize: vertical; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.hero-ico { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px; }
.hero-ico .ico { width: 28px; height: 28px; stroke-width: 2; }
.hero-ico.small { width: 38px; height: 38px; border-radius: 11px; }
.hero-ico.small .ico { width: 20px; height: 20px; }
.hero-ico.ok { background: var(--ok); color: #fff; box-shadow: 0 10px 22px -10px var(--ok); }
.hero-ico.bad { background: var(--bad); color: #fff; box-shadow: 0 10px 22px -10px var(--bad); }
.hero-ico.info { background: var(--accent-soft); color: var(--accent); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 3000; display: grid; gap: 10px; }
.toast { display: flex; align-items: flex-start; gap: 11px; width: 360px; max-width: calc(100vw - 40px); padding: 13px 12px 13px 14px; border-radius: 14px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-3); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.toast.in { opacity: 1; transform: none; }
.toast .ico { width: 20px; height: 20px; margin-top: 1px; color: #4fd39b; }
.toast div, .toast > span { flex: 1; min-width: 0; }
.toast b { display: block; font-size: 13.5px; }
.toast span { display: block; opacity: .75; font-size: 12.5px; }
.toast button { padding: 0 4px; border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; opacity: .55; cursor: pointer; }
.toast button:hover { opacity: 1; }

/* ------------------------------------------------------------------ Cut-off */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px 0 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 650; text-decoration: none; transition: border-color .15s, color .15s; }
.tab:hover { border-color: var(--ink-3); color: var(--ink); }
.tab.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.cutoff-grid { display: grid; grid-template-columns: minmax(360px, 410px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cutoff-col { display: grid; gap: 20px; min-width: 0; }
.cond { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); transition: border-color .2s; }
.cond:not(.is-off) { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cond.is-off .cond-body { opacity: .5; }
.cond-title { display: grid; }
.cond-title b { font-size: 14px; }
.cond-title .muted { font-size: 12.5px; }
.switch { position: relative; display: block; width: 40px; height: 24px; margin-top: 2px; }
.switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.switch-ui { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.range-row { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.numbox { display: flex; align-items: center; flex: none; height: 34px; padding: 0 9px 0 4px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); }
.numbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.numbox input { width: 40px; border: 0; outline: none; background: transparent; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.numbox input::-webkit-inner-spin-button, .numbox input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.numbox span { margin-left: 2px; color: var(--ink-3); }
.combine { display: flex; align-items: center; gap: 10px; padding: 9px 0 9px 14px; transition: opacity .2s; }
.combine.is-off { opacity: .45; }
.combine-hint { font-size: 12.5px; }
.cutoff-summary { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.rule-compare { display: flex; align-items: stretch; gap: 8px; }
.rc { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.rc small { display: block; color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rc b { font-size: 13px; }
.is-changed .rc-new { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.rc-arrow { display: grid; place-items: center; color: var(--ink-3); }
.totals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-2); font-size: 13px; }
.tnum { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.summary-actions { display: flex; justify-content: flex-end; gap: 8px; }
.preview-card { padding: 16px; }
.preview-card .card-head { margin-bottom: 12px; }
.mapshell-preview { position: relative; inset: auto; height: 560px; border-radius: 12px; }
.mapshell-preview .legend { right: 12px; bottom: 22px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { padding: 0 12px 9px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl th.ctr { text-align: center; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tfoot td { border-bottom: 0; font-weight: 750; }
.tbl .sub { display: block; color: var(--ink-3); font-size: 12px; }
.bar-col { width: 120px; }
.dbar { display: block; width: 100px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.dbar b { display: block; height: 100%; border-radius: 3px; }
.dbar b.up { background: var(--only-b); }
.dbar b.down { background: var(--only-a); }
.hist { position: relative; margin: 0; padding: 0; list-style: none; }
.hist li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding-bottom: 20px; }
.hist li::before { content: ""; position: absolute; top: 18px; bottom: 0; left: 8px; width: 2px; background: var(--line); }
.hist li:last-child { padding-bottom: 0; }
.hist li:last-child::before { display: none; }
.hist-dot { width: 13px; height: 13px; margin: 4px 0 0 3px; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); }
.hist li.is-current .hist-dot { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hist-top { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.hist-top > .muted { margin-left: auto; font-size: 12px; }
.ver { padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 800; }
.hist-body > b { font-size: 13.5px; }
.hist-body p { margin: 3px 0 9px; color: var(--ink-2); font-size: 13px; }
.hist-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; }

/* ------------------------------------------------------------------ Health */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 18px; margin-bottom: 20px; padding: 22px 24px; border: 1px solid; border-radius: 18px; }
.hero.is-green { border-color: color-mix(in srgb, var(--ok) 28%, transparent); background: linear-gradient(120deg, var(--ok-soft), var(--surface) 65%); }
.hero.is-red { border-color: color-mix(in srgb, var(--bad) 32%, transparent); background: linear-gradient(120deg, var(--bad-soft), var(--surface) 65%); }
.hero h2 { margin: 1px 0 4px; font-size: 24px; letter-spacing: -.025em; }
.hero-text > p { color: var(--ink-2); font-size: 14px; }
.reasons { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.reasons li { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13.5px; }
.reasons li .ico { margin-top: 1px; color: var(--bad); }
.reasons.warn li .ico { color: var(--warn); }
.demo-toggle { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--ink-3); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.demo-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.demo-toggle .ico { width: 14px; height: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; padding: 17px 18px 16px; }
.kpi-ico { position: absolute; top: 15px; right: 15px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.kpi-label { color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.kpi-value { margin: 8px 0 3px; font-size: 27px; font-weight: 780; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { color: var(--ink-3); font-size: 15px; font-weight: 650; letter-spacing: 0; }
.kpi-sub { color: var(--ink-2); font-size: 12.5px; }
.streak { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: 1px; }
.streak i { width: 15px; height: 6px; border-radius: 3px; background: var(--line-2); }
.streak i.on { background: var(--ok); }
.heat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: 12px; }
.heat-legend .hc { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -2px; }
.heat-wrap { overflow-x: auto; margin-top: -30px; padding-top: 30px; }
.heat { display: grid; gap: 4px; min-width: 620px; }
.heat-row { display: grid; grid-template-columns: 160px repeat(30, minmax(13px, 1fr)); align-items: center; gap: 4px; }
.heat-name { overflow: hidden; color: var(--ink-2); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.heat-days { margin-bottom: 2px; }
.heat-day { position: relative; color: var(--ink-3); font-size: 10.5px; text-align: center; font-variant-numeric: tabular-nums; }
.heat-day b { position: absolute; bottom: 100%; left: 0; color: var(--ink-2); font-size: 10.5px; }
.heat-day.is-today { color: var(--accent); font-weight: 800; }
.hc { display: block; width: 100%; height: 24px; border-radius: 5px; transition: transform .12s; }
.hc:hover { transform: scale(1.18); }
.hc.arrived { background: #2fa57a; }
.hc.late { background: #e5a21f; }
.hc.filled { background: #8fc1e9; }
.hc.missing { background: #e05252; }
.hc.unknown { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.hc.is-today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.health-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; margin-top: 20px; }
.matrix td, .matrix th { padding-left: 6px; padding-right: 6px; }
.matrix td:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix th.ctr, .matrix td.ctr { width: 44px; }
.mdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.mdot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.mdot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.mdot.muted { background: var(--line-2); }
.jobs .chips { flex: none; }
.empty-inline { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); }
.empty-inline .ico { width: 30px; height: 30px; }
.empty-inline b { color: var(--ink); }
.error-card { max-width: 460px; margin: 60px auto; text-align: center; display: grid; justify-items: center; gap: 12px; padding: 32px; }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-grid { grid-template-columns: minmax(0, 1fr); }
  .strip-legend { display: none; }
}
@media (max-width: 1100px) {
  :root { --side-w: 68px; }
  .brand-text, .nav-item > span, .nav-sep, .side-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .brand { justify-content: center; padding: 2px 0 18px; }
  .side :where([data-tip]):hover::after { display: block; }
  .cutoff-grid { grid-template-columns: minmax(0, 1fr); }
  .user-text { display: none; }
  .user-chip { padding: 3px; }
  .day { width: 40px; }
}
@media (max-width: 760px) {
  .top-sub, .status-pill { display: none; }
  /* here the dock sits at bottom 210: 324px = 210 + ~86 + the card's top (16) + a 12px gap */
  .map-card { width: calc(100% - 32px); max-height: calc(100% - 324px); }
  .strip-dock { right: 16px; bottom: 210px; }
  .strip-days { overflow-x: auto; max-width: calc(100vw - 180px); }
  .drawer { width: calc(100% - 32px); }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .page-pad { padding: 16px; }
  .summary-row, .slots { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ the shell's own parts (dashboard.md §16.3) */
.banner { display: flex; align-items: center; gap: 10px; flex: none; padding: 9px 24px; background: var(--bad-soft); border-bottom: 1px solid color-mix(in srgb, var(--bad) 32%, transparent); color: var(--bad); font-size: 13.5px; font-weight: 600; }
.banner .ico { width: 18px; height: 18px; }
.banner a { margin-left: auto; color: inherit; font-weight: 700; white-space: nowrap; }
.user-wrap { position: relative; }
.user-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 2500; min-width: 150px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-3); }
.user-menu.is-open { display: block; }
.user-menu form { margin: 0; }
.user-menu .btn { width: 100%; justify-content: flex-start; border-color: transparent; }
.user-menu .btn:hover { background: var(--surface-3); }
pre.raw { margin: 6px 0 0; padding: 9px 11px; max-height: 12rem; overflow: auto; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font: 12px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* the sign-in and error pages: no shell, one centred card */
body.bare { height: auto; min-height: 100%; }
.bare-center { display: grid; align-content: center; justify-items: center; gap: 16px; max-width: 26rem; min-height: 100vh; margin: 0 auto; padding: 24px 16px; }
.bare-center .card { width: 100%; display: grid; gap: 12px; }
.bare-center h1 { font-size: 19px; }
.bare-center .brand { padding: 0; }
.bare-center form { display: grid; gap: 12px; margin: 0; }
.bare-center label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.bare-center input[type=text], .bare-center input:not([type]), .bare-center input[type=password] { height: 40px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 14px; }
.bare-center input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bare-center .error-card { margin: 0; }

/* busy indicators (htmx's own styles are off, P66) */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; }
.btn[disabled], .btn.htmx-request { opacity: .6; cursor: progress; }

/* the dark street map (dashboard.md §16.4): only the tile pane is filtered; the cells and outlines keep their colours */
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9) saturate(0.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9) saturate(0.6); }
}

.message.error { color: var(--bad); font-weight: 600; }      /* the sign-in error and the pages not yet restyled */
.message.info { color: var(--ink-2); }


/* the Models and Upload pages (dashboard.md §16.6) */
.mcard-id { margin: -4px 0 0; color: var(--ink-3); font-size: 11.5px; }
.mcard-id code { font-family: var(--mono); }
.gave-up { color: var(--bad); font-weight: 650; }
.publish-why { margin: 0; }
.tip-wrap { display: inline-flex; }
.card-details summary { color: var(--ink-3); font-size: 12px; font-weight: 650; cursor: pointer; }
.card-details .kv > div { grid-template-columns: 96px minmax(0, 1fr); }
.card-details .kv { margin-top: 6px; font-size: 12px; }
.check-list { margin: 8px 0 0; padding: 0; list-style: none; }
.check { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--ink-2); }
.check .mark { flex: none; width: 16px; text-align: center; font-weight: 700; }
.check.is-ok .mark { color: var(--ok); }
.check.is-bad { color: var(--bad); font-weight: 600; }
.check.is-bad .mark { color: var(--bad); }
.check.is-wait .mark { color: var(--ink-3); }
.days-list li { grid-template-columns: minmax(0, 1fr) auto; }
.dl-words { display: grid; gap: 2px; grid-column: 1; font-size: 12.5px; color: var(--ink-2); }
.days-list .pill { grid-column: 2; grid-row: 1 / span 2; }
.chk.is-ok .mark { color: var(--ok); }
.chk.is-bad { color: var(--bad); font-weight: 600; }
.chk .mark { font-weight: 700; }
.read-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.inline-msg:empty, .dlg-msg:empty { display: none; }
.inline-msg > .inline-msg { padding: 0; background: none; }
.dlg-msg { margin: 10px 0 0; }
.dlg-foot form { display: flex; align-items: center; gap: 10px; margin: 0; }
.step-title { display: flex; align-items: center; gap: 9px; margin: 18px 0 8px; font-size: 14.5px; }
.step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 750; }
.upload-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.upload-form input[type=file] { max-width: 100%; font-size: 13px; }
.busy-bar { position: relative; height: 6px; margin: 10px 0; overflow: hidden; border-radius: 99px; background: var(--line-2); }
.busy-bar[hidden] { display: none; }
.busy-bar i { position: absolute; top: 0; bottom: 0; width: 32%; border-radius: 99px; background: var(--accent); animation: busy-slide 1.2s ease-in-out infinite; }
@keyframes busy-slide { 0% { left: -32%; } 100% { left: 100%; } }
.register-form { display: grid; gap: 12px; max-width: 520px; }
.register-form input[name=name], .register-form textarea { padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.policy-pick { display: grid; gap: 8px; }
.pick { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.form-actions { display: flex; align-items: center; gap: 12px; }
#upload-result { margin-top: 14px; }
#registered { margin-top: 10px; }

/* the Cut-off page (dashboard.md §16.7): the probability's box takes up to 4 decimals; the range, the re-cut line, the row Details */
.tab-ver { padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 800; }
.tab.is-on .tab-ver { background: rgba(255, 255, 255, .2); color: inherit; }
.numbox.wide input { width: 64px; }
.ranges-block { margin-top: 12px; }
.range-line { margin: 0 0 4px; color: var(--ink-2); font-size: 13px; }
.more-table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 12px; }
.more-table th, .more-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.more-table th { color: var(--ink-3); font-weight: 700; }
.more-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-more { margin-top: 4px; color: var(--ink-2); font-size: 12px; }
.row-more > summary { cursor: pointer; font-weight: 650; }
.row-chips { display: block; margin-top: 3px; }
.cutoff-recut { display: grid; gap: 6px; margin-top: 10px; }
.cutoff-recut:empty { display: none; }
.recut-line, .recut-wait { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--ink-2); font-size: 13px; }
.recut-line .ico, .recut-wait .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.recut-wait { color: var(--warn); }
.day-form { display: flex; align-items: center; gap: 8px; }
.day-pick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.day-pick select { height: 30px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); }
.view-seg { margin-bottom: 12px; }
.dlg-change { margin: 10px 0 4px; }
.dlg-foot .htmx-indicator { margin-right: auto; color: var(--ink-2); font-size: 12.5px; }

/* the Health page (dashboard.md §16.8): the amber status block, the problem rows, Today's maps' dots, the heatmap legend */
.hero.is-amber { border-color: color-mix(in srgb, var(--warn) 32%, transparent); background: linear-gradient(120deg, var(--warn-soft), var(--surface) 65%); }
.hero-ico.warn { background: var(--warn); color: #fff; box-shadow: 0 10px 22px -10px var(--warn); }
.reasons li.is-amber .ico { color: var(--warn); }
.reasons li pre.raw { margin-top: 6px; }
.prob-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.prob { padding: 10px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; background: var(--surface); font-size: 13.5px; }
.prob.is-red { border-left-color: var(--bad); }
.prob.is-amber { border-left-color: var(--warn); }
.prob-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.prob p { margin: 6px 0 0; }
.who-acts { margin-left: auto; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.ing-facts { margin-top: 12px; }
.ing-facts table { margin-top: 8px; font-size: 12.5px; }
.ing-facts th { padding-right: 14px; color: var(--ink-3); font-weight: 650; text-align: left; }
.tb-list { display: grid; gap: 6px; margin: 8px 0; padding: 0; list-style: none; font-size: 13px; }
.day-problems { margin: 6px 0 0 16px; padding: 0; font-size: 12px; color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot.is-green { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.is-red { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.is-grey { background: var(--line-2); }
.dot.is-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
#grid-legend.legend { position: static; display: flex; flex-wrap: wrap; gap: 6px 14px; width: auto; padding: 0; background: none; border: 0; box-shadow: none; color: var(--ink-2); font-size: 12px; }
#grid-legend .hc { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -2px; }
#catalog-as-of { margin: 0; font-size: 12.5px; }
.legend-col { display: grid; justify-items: end; gap: 6px; }
#problems .amber { color: var(--warn); font-weight: 650; }
.table-wrap { overflow-x: auto; }
.health-grid > .card { min-width: 0; }
#maps-today .matrix td:first-child { max-width: 140px; }
#maps-today .matrix th.ctr, #maps-today .matrix td.ctr { width: 34px; padding-left: 2px; padding-right: 2px; text-align: center; }
#maps-today .matrix th { white-space: nowrap; }
#maps-today .matrix th.ctr { white-space: normal; line-height: 1.15; }
