/* Tidewire operations desk. One family (Barlow, a signage face, two widths), harbour navy rail,
   tide-teal accent, and red reserved for what needs action: critical faults and overdue response. */
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --ink: #0f1d2b;
    --ink-2: #3d4f60;
    --muted: #5e6f7e;
    --paper: #eef2f5;
    --panel: #ffffff;
    --line: #c6d1da;
    --line-soft: #e1e8ee;
    --rail: #0b3954;
    --rail-ink: #d7e6ef;
    --accent: #0a7584;
    --accent-soft: #dff1f3;
    --critical: #b3101c;
    --critical-soft: #fde7e8;
    --overdue: #8a0c1c;
    --warn: #a94d00;
    --warn-soft: #fff0dc;
    --medium: #6b5a00;
    --medium-soft: #fbf3c8;
    --ok: #1d6f47;
    --low-soft: #e6eef4;
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
    --r: 6px;
    --cond: "Barlow SC", "Barlow", "Arial Narrow", sans-serif;
    font-family: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { line-height: 1.4; }
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
h1, h2 { font-family: var(--cond); margin: 0; letter-spacing: 0.01em; }
h1:focus { outline: none; }
h1 { font-size: 1.85rem; font-weight: 700; line-height: 1.1; }
h2 { font-size: 1.1rem; font-weight: 600; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.sub { color: var(--muted); font-size: 0.82rem; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.rail { background: var(--rail); color: var(--rail-ink); display: flex; flex-direction: column; gap: var(--s5); padding: var(--s4) var(--s3); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: var(--s3); align-items: center; color: #fff; padding: var(--s2); }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; fill: #3fd0db; flex: none; }
.brand span { font-family: var(--cond); font-weight: 700; font-size: 1.35rem; display: flex; flex-direction: column; line-height: 1.05; }
.brand small { font-family: "Barlow", sans-serif; font-weight: 500; font-size: 0.78rem; color: #9fc0d3; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; align-items: center; gap: var(--s3); color: var(--rail-ink); padding: 9px var(--s3); border-radius: var(--r); font-weight: 500; border-left: 3px solid transparent; }
.nav:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.nav.active { background: #fff; color: var(--rail); border-left-color: #3fd0db; font-weight: 700; }
.rail-note { margin-top: auto; font-size: 0.78rem; color: #9fc0d3; padding: 0 var(--s2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.demo-ribbon { background: repeating-linear-gradient(-45deg, #fff4c2 0 14px, #ffeaa0 14px 28px); color: #4a3b00; border-bottom: 1px solid #e3c65a; padding: 6px var(--s5); font-size: 0.86rem; }
.topbar { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) var(--s5); background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.fresh { margin-left: auto; display: flex; align-items: center; gap: var(--s2); font-size: 0.86rem; color: var(--ink-2); }
.fresh .sep { width: 1px; height: 16px; background: var(--line); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa7b2; }
.live-dot.on { background: #1fa463; box-shadow: 0 0 0 3px #d2f0e0; }
.live-dot.warn { background: #e08a00; }
.live-dot.off { background: #9aa7b2; }
.content { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s5); max-width: 1880px; width: 100%; }

/* ---------- global search ---------- */
.gsearch { position: relative; display: flex; align-items: center; gap: var(--s2); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 0 var(--s3); flex: 1 1 420px; max-width: 640px; }
.gsearch input { border: 0; background: transparent; font: inherit; padding: 9px 0; width: 100%; color: var(--ink); }
.gsearch input:focus { outline: none; }
.gsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gsearch-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: var(--s1); list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(15,29,43,0.18); max-height: 420px; overflow: auto; z-index: 50; }
.gsearch-list li { display: grid; grid-template-columns: 150px 1fr auto; gap: var(--s3); padding: 7px var(--s2); border-radius: 4px; cursor: pointer; align-items: baseline; }
.gsearch-list li.active, .gsearch-list li:hover { background: var(--accent-soft); }
.gs-kind { color: var(--muted); font-size: 0.8rem; }
.gs-val { font-weight: 600; }
.gs-count { font-family: var(--cond); color: var(--ink-2); }
.gsearch-list .gs-note { display: block; color: var(--muted); cursor: default; }

/* ---------- page head, KPIs ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.lede { margin: var(--s1) 0 0; color: var(--ink-2); max-width: 75ch; }
.head-figures { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--panel); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 2px; color: var(--ink); border-top: 4px solid var(--line-soft); }
.kpi:hover { background: #f7fafc; text-decoration: none; }
.kpi-n { font-family: var(--cond); font-weight: 700; font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 0.84rem; color: var(--ink-2); font-weight: 500; }
.kpi.tone-alert { border-top-color: var(--critical); }
.kpi.tone-alert .kpi-n { color: var(--critical); }
.kpi.tone-warn { border-top-color: var(--warn); }
.kpi.tone-warn .kpi-n { color: var(--warn); }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); }
.panel-note { margin: 0 0 var(--s3); color: var(--muted); font-size: 0.86rem; }
.more { font-size: 0.86rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }

/* ---------- response clock ---------- */
.rclock { display: flex; flex-direction: column; gap: 4px; }
.rclock-axis, .rc-row { display: grid; grid-template-columns: minmax(260px, 1.3fr) minmax(280px, 2fr) 220px; gap: var(--s4); align-items: center; }
.rclock-axis { font-size: 0.76rem; color: var(--muted); padding: 0 var(--s3); }
.rclock-axis .rc-zone { grid-column: 1; text-align: right; color: var(--overdue); font-weight: 600; }
.rc-ticks { grid-column: 2; display: flex; justify-content: space-between; padding-left: 64px; }
.rc-row { padding: 8px var(--s3); border: 1px solid var(--line-soft); border-left: 5px solid var(--warn); border-radius: 4px; color: var(--ink); background: #fff; }
.rc-row:hover { background: #f6fafb; text-decoration: none; }
.rc-row.is-p1 { border-left-color: var(--critical); }
.rc-row.is-overdue { background: var(--critical-soft); border-color: #f2b8bc; border-left-color: var(--overdue); }
.rc-who { display: flex; flex-wrap: wrap; gap: 2px var(--s2); align-items: baseline; min-width: 0; }
.rc-num { font-family: var(--cond); font-weight: 700; font-size: 1.05rem; }
.rc-site { font-weight: 600; }
.rc-meta { color: var(--muted); font-size: 0.82rem; width: 100%; }
.rc-track { position: relative; height: 30px; background: linear-gradient(to right, transparent 0 64px, var(--line-soft) 64px calc(64px + 1px), transparent 0) , repeating-linear-gradient(to right, #f3f6f8 0, #f3f6f8 calc(25% - 1px), #dfe6ec calc(25% - 1px) 25%); border-radius: 3px; margin-left: 0; }
.rc-zone-bg { position: absolute; left: 0; top: 0; bottom: 0; width: 64px; background: repeating-linear-gradient(-45deg, #f6cdd0 0 6px, #fbe4e6 6px 12px); border-right: 2px solid var(--overdue); border-radius: 3px 0 0 3px; }
.rc-track .rc-marker { position: absolute; top: 3px; }
.rc-marker span { display: inline-block; transform: translateX(-50%); background: var(--ink); color: #fff; font-family: var(--cond); font-weight: 600; font-size: 0.85rem; padding: 2px 8px; border-radius: 12px; white-space: nowrap; }
.is-p1 .rc-marker span { background: var(--critical); }
.is-p2 .rc-marker span { background: var(--warn); }
.rc-flag { position: absolute; left: 4px; top: 3px; background: var(--overdue); color: #fff; font-family: var(--cond); font-weight: 700; padding: 2px 10px; border-radius: 12px; white-space: nowrap; font-size: 0.88rem; }
.rc-due { display: flex; flex-direction: column; font-size: 0.86rem; text-align: right; }
.rc-due small { color: var(--muted); }

/* ---------- badges ---------- */
.sev, .prio, .tag-warn, .age { display: inline-block; font-family: var(--cond); font-weight: 600; font-size: 0.82rem; padding: 1px 8px; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; }
a.sev:hover { text-decoration: none; filter: brightness(0.95); }
.sev-critical { background: var(--critical); color: #fff; }
.sev-high { background: var(--warn-soft); color: var(--warn); border-color: #f0c48f; }
.sev-medium { background: var(--medium-soft); color: var(--medium); border-color: #e6d47a; }
.sev-low { background: var(--low-soft); color: var(--ink-2); border-color: #cdd9e3; }
.sev-unknown { background: #f1f1f1; color: var(--muted); }
.prio { min-width: 30px; text-align: center; background: var(--low-soft); color: var(--ink-2); }
.prio-p1 { background: var(--critical); color: #fff; }
.prio-p2 { background: var(--warn); color: #fff; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.age { background: var(--low-soft); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.age-3to7d { background: var(--warn-soft); color: var(--warn); }
.age-gt7d { background: var(--overdue); color: #fff; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tbl th { text-align: left; font-family: var(--cond); font-weight: 600; color: var(--ink-2); font-size: 0.84rem; border-bottom: 2px solid var(--line); padding: 6px var(--s2); white-space: nowrap; }
.tbl td { border-bottom: 1px solid var(--line-soft); padding: 6px var(--s2); vertical-align: top; }
.tbl tr:hover td { background: #f7fafc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.out { color: var(--critical); font-weight: 700; }
.row-critical td:first-child { box-shadow: inset 4px 0 0 var(--critical); }
.row-overdue td { background: var(--critical-soft); }
.row-overdue td:first-child { box-shadow: inset 4px 0 0 var(--overdue); }
.th-sort { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.th-sort:hover { color: var(--accent); }

.matrix { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 0.9rem; }
.matrix th { font-family: var(--cond); font-weight: 600; color: var(--ink-2); font-size: 0.82rem; text-align: center; }
.matrix th[scope=row] { text-align: left; }
.matrix td { text-align: center; padding: 8px 4px; border-radius: 3px; font-family: var(--cond); font-weight: 700; font-size: 1.1rem; }
.matrix td a { color: inherit; display: block; }
.cell-0 { background: #f5f7f9; color: #b6c1ca; }
.cell-on { background: var(--low-soft); }
.cell-warm { background: var(--warn-soft); color: var(--warn); }
.cell-hot { background: var(--critical); color: #fff; }
.matrix td.tot { background: transparent; color: var(--ink); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3); }
.searchbox { display: flex; align-items: center; gap: var(--s2); border: 1px solid var(--line); border-radius: var(--r); padding: 0 var(--s3); background: #fff; flex: 1 1 260px; max-width: 380px; }
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.searchbox input { border: 0; font: inherit; padding: 8px 0; width: 100%; background: transparent; color: var(--ink); }
.searchbox input:focus { outline: none; }
.pick { display: flex; flex-direction: column; gap: 2px; font-size: 0.78rem; color: var(--ink-2); font-weight: 600; }
.pick select { font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink); padding: 7px 30px 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233d4f60' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; min-width: 130px; max-width: 240px; }
.pick select:focus { border-color: var(--accent); }
.toggle { display: flex; gap: 6px; align-items: center; font-size: 0.9rem; font-weight: 500; padding-bottom: 8px; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.tabs { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); width: fit-content; }
.tab { padding: 8px 16px; color: var(--ink-2); font-weight: 600; border-right: 1px solid var(--line); }
.tab:last-child { border-right: 0; }
.tab:hover { text-decoration: none; background: #f4f8fa; }
.tab.on { background: var(--rail); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--rail); border: 1px solid #a9d8de; border-radius: 14px; padding: 3px 6px 3px 12px; font-size: 0.86rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { text-decoration: none; background: #c9e9ed; }

.btn { font: inherit; font-weight: 600; background: var(--rail); color: #fff; border: 0; border-radius: var(--r); padding: 8px 16px; cursor: pointer; }
.btn:hover { background: #0e4a6d; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: #fff; color: var(--rail); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f1f6f9; }
.btn-ghost.on { background: var(--rail); color: #fff; }
.btn-more { align-self: center; margin-top: var(--s3); }

/* ---------- groups ---------- */
.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); padding-bottom: var(--s2); }
.group-head.hot { border-left: 4px solid var(--critical); padding-left: var(--s3); margin-left: calc(-1 * var(--s3)); }
.group-n { margin-left: auto; color: var(--ink-2); }

/* ---------- states ---------- */
.state { padding: var(--s4); border-radius: var(--r); display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.state-loading { color: var(--ink-2); background: var(--panel); border: 1px dashed var(--line); }
.state-empty { color: var(--ink-2); background: #f7fafb; border: 1px dashed var(--line); margin: 0; }
.state-error { background: var(--critical-soft); color: var(--overdue); border: 1px solid #f2b8bc; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- bars ---------- */
.barlist { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: var(--s2); align-items: center; font-size: 0.88rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: block; height: 14px; background: #edf2f5; border-radius: 2px; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.bar-fill.tone-alert { background: var(--critical); }
.bar-fill.tone-warn { background: var(--warn); }
.bar-fill.tone-muted { background: #8fa3b3; }
.bar-value { text-align: right; font-family: var(--cond); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-meta { color: var(--muted); font-size: 0.8rem; margin: 0 0 var(--s2); }

/* ---------- details ---------- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; font-size: 0.92rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.crumbs { font-size: 0.86rem; color: var(--muted); }
.note-box { background: #f7fafb; border-left: 3px solid var(--accent); padding: var(--s2) var(--s3); white-space: pre-wrap; margin: 0; }

/* ---------- map ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr); gap: var(--s4); align-items: start; }
.map-box { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #dfe7ec; }
#sitemap { height: calc(100vh - 290px); min-height: 460px; }
.map-tools { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; }
.map-tools .btn-ghost { box-shadow: 0 1px 4px rgba(0,0,0,0.2); padding: 6px 12px; font-size: 0.86rem; }
.map-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 14px; font-size: 0.86rem; z-index: 5; pointer-events: none; }
.area-del { background: var(--rail); color: #fff; border: 2px solid #fff; border-radius: 14px; padding: 2px 10px; font: 600 0.82rem "Barlow", sans-serif; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.drawing .maplibregl-marker, .drawing .maplibregl-popup { pointer-events: none; }
.drawing .maplibregl-canvas-container { touch-action: none; }
.site-list { max-height: calc(100vh - 290px); min-height: 460px; overflow: auto; }
.site-row { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s3); padding: 8px var(--s3); border-bottom: 1px solid var(--line-soft); }
.site-row:hover { background: #f6fafb; }
.site-row .dist { font-family: var(--cond); font-weight: 600; text-align: right; }
.faultpill { display: inline-block; font-family: var(--cond); font-weight: 600; font-size: 0.8rem; padding: 0 7px; border-radius: 10px; background: var(--low-soft); color: var(--ink-2); }
.faultpill.hot { background: var(--critical); color: #fff; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: var(--s4); bottom: var(--s4); display: flex; flex-direction: column; gap: var(--s2); z-index: 100; width: min(360px, calc(100vw - 32px)); }
.toast { position: relative; background: var(--ink); color: #fff; border-radius: var(--r); padding: var(--s3) var(--s5) var(--s3) var(--s3); font-size: 0.88rem; box-shadow: 0 8px 24px rgba(15,29,43,0.3); border-left: 4px solid #3fd0db; }
.toast-head { display: flex; justify-content: space-between; gap: var(--s2); }
.toast-head span { color: #a9c1d1; font-size: 0.8rem; }
.toast-changes { color: #cfe0ea; font-size: 0.82rem; margin-top: 2px; }
.toast-x { position: absolute; top: 6px; right: 4px; background: none; border: 0; color: #a9c1d1; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

#blazor-error-ui { background: #fff4c2; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,0.2); display: none; left: 0; padding: 0.6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }

/* ---------- responsive ---------- */
@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
    .grid-2, .map-layout { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-list { max-height: none; min-height: 0; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .rail { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; padding: var(--s2); gap: var(--s2); z-index: 30; overflow-x: auto; }
    .brand span, .rail-note { display: none; }
    .rail nav { flex-direction: row; }
    .nav { padding: 8px 10px; border-left: 0; }
    .nav span { display: none; }
    .nav .icon { width: 22px; height: 22px; }
    .topbar { position: static; padding: var(--s2) var(--s3); }
    .fresh { margin-left: 0; flex-wrap: wrap; }
    .content { padding: var(--s3); gap: var(--s4); }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: 1fr; }
    .rclock-axis { display: none; }
    .rc-row { grid-template-columns: 1fr; gap: 6px; }
    .rc-due { text-align: left; }
    #sitemap { height: 56vh; min-height: 320px; }
    .searchbox { max-width: none; }
    .pick select { min-width: 0; }
    h1 { font-size: 1.5rem; }
}
.tbl-faults { table-layout: fixed; min-width: 900px; }
.tbl-faults th:first-child { width: 16%; }
.site-row .th-sort { font-size: 0.82rem; color: var(--accent); }
