/* Reefer Yard Monitor, a Kosmorph concept. Plain CSS, tokens on :root, light by default. */

@font-face { font-family: 'Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --font: 'Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --bg: #e9eef2;
  --panel: #fbfcfd;
  --panel-2: #f2f5f8;
  --raise: #ffffff;
  --line: #dbe2e8;
  --line-2: #c5d0d9;
  --ink: #0b1b27;
  --ink-2: #384a58;
  --ink-3: #566a7a;
  --accent: #1d4cc0;
  --accent-ink: #ffffff;
  --accent-soft: #e6edfb;
  --accent-line: #b9cbf3;
  --ok: #13724d; --ok-fill: #35a273; --ok-soft: #e1f1e9;
  --drift: #745b06; --drift-fill: #caa52b; --drift-soft: #f7efd2;
  --alarm: #b3271f; --alarm-fill: #dc463b; --alarm-soft: #fbe4e1;
  --idle-fill: #9aa8b4;
  --dry-fill: #b9c4cd;
  --grid: #e3e9ee;
  --band: rgba(53, 162, 115, 0.12);
  --band-line: rgba(19, 114, 77, 0.35);
  --shadow-1: 0 1px 0 rgba(11, 27, 39, 0.05), 0 1px 2px rgba(11, 27, 39, 0.06);
  --shadow-2: 0 1px 1px rgba(11, 27, 39, 0.04), 0 6px 16px -6px rgba(11, 27, 39, 0.16), 0 16px 36px -12px rgba(11, 27, 39, 0.14);
  --btn-top: rgba(255, 255, 255, 0.9);
  --btn-shade: rgba(11, 27, 39, 0.07);

  --y-sky: #e6ecf1; --y-ground: #dfe5ea; --y-asphalt: #cfd8df; --y-mark: #ffffff; --y-paint: #8d9dab;
  --y-ao: rgba(28, 46, 64, 0.26);
  --y-water: #b3cee0; --y-steel: #6a7884; --y-crane: #f3f5f7; --y-crane-dark: #2c3944; --y-building: #f5f7f9;
  --y-glass: #6b8192; --y-hull: #2d3b49; --y-chassis: #29323b; --y-barrier: #ffffff; --y-curb: #f7f9fa;
  --y-cab: #f5f7f9; --y-cab-2: #c4ced7; --y-cab-3: #3b4a57; --y-cab-4: #7f909e;
  --y-ok: #a9d6c2; --y-drift: #d9b43a; --y-alarm: #e2463b; --y-ghost: #dde3e8; --y-select: #1d4cc0; --y-hover: #0b1b27;
  --y-dry1: #cdd4da; --y-dry2: #c6ced5; --y-dry3: #d2d8dd; --y-dry4: #c2cad1; --y-dry5: #cad1d7; --y-dry6: #bfc8cf;
  --y-fog-near: 430; --y-fog-far: 700;
  --y-hemi-sky: #eef4fa; --y-hemi-ground: #a9b6c1; --y-hemi-i: 2.05; --y-sun-i: 1.6;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #070d12;
  --panel: #0c141b;
  --panel-2: #111b24;
  --raise: #142029;
  --line: #1c2833;
  --line-2: #293846;
  --ink: #e5ecf1;
  --ink-2: #aebccb;
  --ink-3: #8b9cab;
  --accent: #86a8ff;
  --accent-ink: #06101c;
  --accent-soft: rgba(134, 168, 255, 0.13);
  --accent-line: rgba(134, 168, 255, 0.45);
  --ok: #5fcb98; --ok-fill: #3f9f74; --ok-soft: rgba(63, 159, 116, 0.16);
  --drift: #e2c050; --drift-fill: #cfa933; --drift-soft: rgba(207, 169, 51, 0.16);
  --alarm: #ff8679; --alarm-fill: #e5544a; --alarm-soft: rgba(229, 84, 74, 0.17);
  --idle-fill: #5a6976;
  --dry-fill: #3a4855;
  --grid: #18232d;
  --band: rgba(63, 159, 116, 0.16);
  --band-line: rgba(95, 203, 152, 0.4);
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.3);
  --shadow-2: 0 10px 30px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --btn-top: rgba(255, 255, 255, 0.06);
  --btn-shade: rgba(0, 0, 0, 0.32);

  --y-sky: #0b131a; --y-ground: #16212a; --y-asphalt: #111a21; --y-mark: #3a4a57; --y-paint: #4f606e;
  --y-ao: rgba(0, 0, 0, 0.45);
  --y-water: #0b2233; --y-steel: #5d6b78; --y-crane: #c6cfd7; --y-crane-dark: #18212a; --y-building: #2a3743;
  --y-glass: #0f1a22; --y-hull: #1b2731; --y-chassis: #10171d; --y-barrier: #d5dde3; --y-curb: #24313c;
  --y-cab: #c8d1d9; --y-cab-2: #7a8a97; --y-cab-3: #2b3743; --y-cab-4: #56656f;
  --y-ok: #3c8c6b; --y-drift: #d9b43a; --y-alarm: #e8564b; --y-ghost: #1f2a33; --y-select: #86a8ff; --y-hover: #e5ecf1;
  --y-dry1: #2e3b47; --y-dry2: #2b3742; --y-dry3: #323f4b; --y-dry4: #29343f; --y-dry5: #34414d; --y-dry6: #27323c;
  --y-fog-near: 420; --y-fog-far: 640;
  --y-hemi-sky: #c9d6e2; --y-hemi-ground: #1a242e; --y-hemi-i: 1.55; --y-sun-i: 1.25;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'tnum' 1;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* Optical centring of short labels inside shapes */
.lbl, .tag-label, .badge > span, .chips .n, .seg .lbl {
  display: inline-block;
  line-height: 1;
  text-box: trim-both cap alphabetic;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
canvas:focus-visible { outline-offset: -3px; }

/* ---------- layout ---------- */
.app {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr) 368px;
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: 'top top top' 'left stage right';
  height: 100vh;
  height: 100dvh;
  min-height: 640px;
}
.topbar { grid-area: top; }
.rail-left { grid-area: left; }
.stage { grid-area: stage; }
.rail-right { grid-area: right; }
.foot { display: none; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  min-width: 0;
  min-height: 56px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark rect:first-child { fill: var(--ink); }
.brand-mark .m-line { fill: none; stroke: var(--panel); stroke-width: 1.6; }
.brand-mark .m-line.thin { stroke-width: 1.1; }
.brand-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; }
.product { flex: none; }
.live { flex: none; }
.product { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; }
.site { color: var(--ink-3); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tag {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; padding: 0 9px;
  border: 1px dashed var(--line-2);
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
  background: var(--panel-2);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.clock { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-day { color: var(--ink-3); font-size: 14px; }
.clock-time { font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: 0.01em; min-width: 72px; }
.live { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.live-delta { font-family: var(--mono); font-size: 13px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--idle-fill); }
.live.is-live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-soft); }
.live.is-live .live-dot { background: var(--ok-fill); }
.live.is-replay { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.live.is-replay .live-dot { background: var(--accent); }
.transport { display: flex; align-items: center; gap: 8px; }
.divider { width: 1px; height: 24px; background: var(--line); }
.by { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 8px 2px; white-space: nowrap; }
.by:hover { color: var(--accent); }

/* ---------- buttons: square, engraved, colour-only feedback ---------- */
.btn {
  --b-bg: var(--raise);
  --b-line: var(--line-2);
  --b-ink: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--b-line);
  border-radius: 3px;
  background:
    linear-gradient(var(--btn-top), var(--btn-top)) top / 100% 1px no-repeat,
    linear-gradient(var(--btn-shade), var(--btn-shade)) bottom / 100% 1px no-repeat,
    var(--b-bg);
  color: var(--b-ink);
  font-size: 14px; font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition-property: background-color, border-color, color;
  transition-duration: 120ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.btn:hover { --b-bg: var(--panel-2); --b-line: var(--ink-3); }
.btn:active { --b-bg: var(--line); }
.btn .ico { width: 16px; height: 16px; flex: none; fill: currentColor; }
.btn .ico .stroke, .ico.stroke-only path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.btn-icon { width: 34px; padding: 0; }
.btn-primary {
  --b-bg: var(--ink);
  --b-line: var(--ink);
  --b-ink: var(--panel);
  --btn-top: rgba(255, 255, 255, 0.16);
  --btn-shade: rgba(0, 0, 0, 0.35);
  font-weight: 500;
}
.btn-primary:hover { --b-bg: var(--accent); --b-line: var(--accent); --b-ink: var(--accent-ink); }
.btn-primary:active { --b-bg: color-mix(in srgb, var(--accent) 82%, #000); }
:root[data-theme='dark'] .btn-primary { --b-bg: var(--accent); --b-line: var(--accent); --b-ink: var(--accent-ink); }
:root[data-theme='dark'] .btn-primary:hover { --b-bg: #a4bdff; --b-line: #a4bdff; }
.btn-strong { --b-bg: var(--ink); --b-line: var(--ink); --b-ink: var(--panel); --btn-top: rgba(255,255,255,0.16); --btn-shade: rgba(0,0,0,0.35); font-weight: 500; }
.btn-strong:hover { --b-bg: var(--accent); --b-line: var(--accent); --b-ink: var(--accent-ink); }
:root[data-theme='dark'] .btn-strong { --b-bg: var(--raise); --b-line: var(--line-2); --b-ink: var(--ink); --btn-top: rgba(255,255,255,0.07); }
:root[data-theme='dark'] .btn-strong:hover { --b-bg: var(--accent); --b-line: var(--accent); --b-ink: var(--accent-ink); }
.btn-block { width: 100%; height: 38px; }
.btn-small { height: 30px; padding: 0 10px; font-size: 14px; }
.btn-play { min-width: 84px; justify-content: flex-start; }
.btn-play .ico-pause { display: none; }
.btn-play[aria-pressed='true'] .ico-play { display: none; }
.btn-play[aria-pressed='true'] .ico-pause { display: block; }
#themeBtn .ico-sun { display: none; }
:root[data-theme='dark'] #themeBtn .ico-sun { display: block; fill: none; stroke: currentColor; stroke-width: 1.4; }
:root[data-theme='dark'] #themeBtn .ico-sun circle { fill: none; }
:root[data-theme='dark'] #themeBtn .ico-moon { display: none; }

.seg {
  display: inline-flex; height: 34px; padding: 2px; gap: 2px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--panel-2);
}
.seg button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; padding: 0 8px; border: 0; border-radius: 2px;
  background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1), color 120ms cubic-bezier(0.2, 0, 0, 1);
}
.seg button:hover { color: var(--ink); background: var(--line); }
.seg button[aria-checked='true'] { background: var(--raise); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2), 0 1px 1px rgba(11, 27, 39, 0.06); }

/* ---------- rails ---------- */
.rail { background: var(--panel); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; min-height: 0; }
.rail-left { border-right: 1px solid var(--line); }
.rail-right { border-left: 1px solid var(--line); }
.block { padding: 14px 20px 16px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-head h2 { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.meta { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 3px; background: var(--raise); }
.kpi { padding: 10px 12px 12px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi dt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.kpi dd { margin-top: 8px; font-size: 28px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 1px; flex: none; }
.kpi-ok .dot { background: var(--ok-fill); }
.kpi-drift .dot { background: var(--drift-fill); }
.kpi-alarm .dot { background: var(--alarm-fill); }
.kpi-drift dd { color: var(--drift); }
.kpi-alarm dd { color: var(--alarm); }
.dist { display: flex; height: 4px; margin-top: 10px; gap: 2px; }
.dist span { display: block; height: 100%; min-width: 2px; }
.d-ok { background: var(--ok-fill); }
.d-drift { background: var(--drift-fill); }
.d-alarm { background: var(--alarm-fill); }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chips button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 34px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: var(--raise); color: var(--ink-2); font-size: 13px; cursor: pointer; text-align: left;
  transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1), border-color 120ms cubic-bezier(0.2, 0, 0, 1), color 120ms cubic-bezier(0.2, 0, 0, 1);
  min-width: 0;
}
.chips button .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips button:hover { border-color: var(--ink-3); color: var(--ink); }
.chips .n { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.chips button[aria-checked='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chips button[aria-checked='true'] .n { color: var(--accent); }

.comp-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--raise); }
.fig { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.fig + .fig { border-left: 1px solid var(--line); }
.fig-v { font-size: 28px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fig-l { font-size: 13px; color: var(--ink-3); }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
table.mini th { font-weight: 400; color: var(--ink-3); text-align: left; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 7px 0; border-bottom: 1px solid var(--grid); color: var(--ink-2); font-variant-numeric: tabular-nums; }
table.mini tr:last-child td { border-bottom: 0; }
table.mini .num { text-align: right; }
table.mini td.num { color: var(--ink); }

.plugs { display: grid; grid-template-columns: repeat(3, minmax(max-content, 1fr)); gap: 8px; margin-bottom: 12px; }
.plugs div { min-width: 0; }
.plugs dt { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plugs dd { font-size: 20px; font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.plugs dd.warn { color: var(--alarm); }
.block-gate .plugs { margin-bottom: 0; }
.racks { display: grid; gap: 8px; }
.racks li { display: grid; grid-template-columns: 52px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.racks .bar { position: relative; height: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 1px; overflow: hidden; }
.racks .bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink-3); }
.racks li.has-fault .bar i { background: linear-gradient(90deg, var(--ink-3), var(--ink-3)); }
.racks .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.racks .flag { color: var(--alarm); }
.tl-more { margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* ---------- stage ---------- */
.stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: var(--bg); }
.viewport { position: relative; min-height: 0; overflow: hidden; background: var(--y-sky); }
#yard { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: default; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.yard-label { position: absolute; left: 0; top: 0; will-change: transform; }
.yard-label span {
  display: inline-block; transform: translate(-50%, -50%);
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  padding: 5px 7px; border-radius: 2px; white-space: nowrap; line-height: 1;
  box-shadow: 0 0 0 1px var(--line);
}
.yard-pin { position: absolute; left: 0; top: 0; visibility: hidden; }
.yard-pin .pin {
  display: inline-flex; align-items: center; justify-content: center;
  transform: translate(-50%, -100%);
  height: 26px; padding: 0 9px;
  font: 500 13px/1 var(--mono);
  color: var(--accent-ink); background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 6px 16px -6px rgba(11, 27, 39, 0.5);
}
.yard-alarm { position: absolute; left: 0; top: 0; visibility: hidden; }
.yard-alarm .pin {
  display: inline-flex; align-items: center; justify-content: center;
  transform: translate(-50%, -100%);
  width: 22px; height: 22px;
  font: 600 14px/1 var(--font);
  color: #fff; background: var(--alarm-fill);
  border-radius: 2px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 85%, transparent);
}
.vp-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 10px; background: color-mix(in srgb, var(--panel) 92%, transparent); border-radius: 3px; box-shadow: 0 0 0 1px var(--line); pointer-events: auto; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lg i { width: 10px; height: 10px; border-radius: 1px; display: block; }
.lg-ok i { background: var(--y-ok); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.lg-drift i { background: var(--drift-fill); }
.lg-alarm i { background: var(--alarm-fill); }
.lg-dry i { background: var(--y-dry2); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.vp-tools { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.vp-card { position: absolute; left: 12px; bottom: 12px; display: flex; margin: 0; background: color-mix(in srgb, var(--panel) 94%, transparent); border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.vp-card > div { padding: 8px 12px 9px; min-width: 0; }
.vp-card > div + div { border-left: 1px solid var(--line); }
.vp-card dt { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.vp-card dd { margin-top: 3px; font-size: 15px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; pointer-events: none; }
.vp-loading.is-done { display: none; }
.btn-play-overlay { position: absolute; right: 12px; top: 12px; height: 40px; padding: 0 16px; box-shadow: var(--shadow-2); }
.is-still .btn-play-overlay { display: none !important; }

.tooltip {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  min-width: 200px; padding: 10px 12px;
  background: var(--raise); border-radius: 3px; box-shadow: var(--shadow-2);
  font-size: 13px; color: var(--ink-2);
}
.tooltip .tt-id { font: 500 14px/1.2 var(--mono); color: var(--ink); }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tooltip .tt-row b { font-weight: 500; color: var(--ink); }

.toasts { position: absolute; top: 12px; right: 12px; display: grid; gap: 8px; width: 340px; z-index: 2; }
.toast {
  display: grid; grid-template-columns: 4px 1fr auto auto; gap: 8px 10px; align-items: center;
  padding: 10px 10px 10px 0; background: var(--raise); border-radius: 3px; box-shadow: var(--shadow-2); font-size: 13px; color: var(--ink-2);
  overflow: hidden;
}
.toast::before { content: ''; align-self: stretch; background: var(--alarm-fill); }
.toast b { display: block; color: var(--ink); font-weight: 500; font-size: 14px; }
.toast-msg { padding-left: 2px; }
.toast .btn-icon, .selbar .btn-icon { width: 30px; height: 30px; }

/* ---------- timeline ---------- */
.timeline { background: var(--panel); border-top: 1px solid var(--line); padding: 12px 16px 12px; min-width: 0; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 8px; min-height: 28px; }
.tl-head h2 { white-space: nowrap; font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.tl-legend { display: flex; gap: 14px; margin-left: auto; }
.tl-replay { margin-left: auto; font-size: 13px; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline.is-replay .tl-legend { display: none; }
.tl-body { position: relative; }
.tl-svg { display: block; width: 100%; overflow: visible; }
.tl-svg text { font-family: var(--font); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-svg .row-id { font-family: var(--mono); font-size: 13px; fill: var(--ink-2); }
.tl-svg .row-c { font-size: 13px; fill: var(--ink-3); }
.tl-svg .row { cursor: pointer; }
.tl-svg .row-bg { fill: transparent; }
.tl-svg .row:hover .row-bg, .tl-svg .row:focus-visible .row-bg { fill: var(--panel-2); }
.tl-svg .row.is-sel .row-bg { fill: var(--accent-soft); }
.tl-svg .row.is-sel .row-id { fill: var(--accent); }
.tl-svg .row:focus { outline: none; }
.tl-svg .row:focus-visible .row-bg { stroke: var(--accent); stroke-width: 2; }
.tl-svg .row-line { stroke: var(--grid); }
.tl-svg .gridline { stroke: var(--grid); }
.tl-svg .bar-drift { fill: var(--drift-fill); }
.tl-svg .bar-alarm { fill: var(--alarm-fill); }
.tl-svg .now { stroke: var(--ink); stroke-width: 1; }
.tl-svg .cursor { stroke: var(--accent); stroke-width: 2; }
.tl-svg .cursor-cap { fill: var(--accent); }
.tl-svg .cursor-label { fill: var(--accent-ink); font-size: 12px; font-family: var(--mono); }
.tl-svg .future { fill: var(--panel); opacity: 0.6; }
.tl-svg .scrub { fill: transparent; cursor: ew-resize; }
.tl-svg .scrub:focus { outline: none; }
.tl-svg .scrub:focus-visible { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.tl-svg .cursor-chip { pointer-events: none; }
.tl-svg .cursor-chip rect { fill: var(--accent); }
.tl-svg .cursor-chip text { fill: var(--accent-ink); font-family: var(--mono); font-weight: 500; font-size: 12px; }
.tl-svg .axis-band { fill: var(--panel-2); }
.tl-svg .more { fill: var(--ink-3); font-size: 13px; }
.tl-empty { font-size: 13px; color: var(--ink-3); padding: 12px 0; }

/* ---------- unit panel ---------- */
.panel-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.ph-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ph-id { font: 500 20px/1 var(--mono); letter-spacing: 0; }
.ph-tools { gap: 8px; }
.ph-sub { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.ph-loc { margin-top: 4px; color: var(--ink-3); font-size: 13px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 24px; padding: 0 8px; border-radius: 2px; font-size: 13px; white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 1px; background: currentColor; flex: none; }
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-drift { color: var(--drift); background: var(--drift-soft); }
.badge-alarm { color: var(--alarm); background: var(--alarm-soft); }
.badge-idle { color: var(--ink-3); background: var(--panel-2); }
.badge-ack { color: var(--ink-2); background: var(--panel-2); }
.badge-ack::before { background: var(--ink-3); }

.readings { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.rd { padding: 14px 0 14px 20px; min-width: 0; }
.rd + .rd { padding-left: 14px; border-left: 1px solid var(--line); }
.rd-l { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.rd-v { margin-top: 6px; font-size: 20px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-big .rd-v { font-size: 28px; letter-spacing: -0.02em; }
.rd-v.is-alarm { color: var(--alarm); }
.rd-v.is-drift { color: var(--drift); }
.rd-s { margin-top: 4px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Notice strip under the readings. The text is trimmed to its cap height and the alphabetic baseline, so equal
   padding centres it in the strip; a wrapped notice keeps its line spacing. Height as before, about 40px. */
.trend { padding: 15px 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); background: var(--panel-2); text-box: trim-both cap alphabetic; }
.trend.is-alarm { color: var(--alarm); background: var(--alarm-soft); }
.trend.is-drift { color: var(--drift); background: var(--drift-soft); }
/* Without text-box the line box sets the text 1.4px high, so the padding moves it down by that much. The strip
   keeps its line height because a long notice wraps onto two lines. */
@supports not (text-box: trim-both cap alphabetic) {
  .trend { padding: 11px 20px 9px; }
}

.chart-block { padding: 14px 20px 8px; border-bottom: 1px solid var(--line); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.chart-head h3 { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.chart-key { display: flex; gap: 12px; font-size: 13px; color: var(--ink-3); }
.chart-key i { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--ink); vertical-align: middle; margin-right: 6px; }
.chart-key i.k-band { height: 9px; border: 1px solid var(--band-line); background: var(--band); }
.chart-key i.k-sp { border-top: 1px dashed var(--ink-3); }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; font-family: var(--font); }
.chart .band { fill: var(--band); }
.chart .band-edge { stroke: var(--band-line); stroke-width: 1; }
.chart .sp { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.chart .grid { stroke: var(--grid); }
.chart .trace { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.chart .trace-alarm { fill: none; stroke: var(--alarm-fill); stroke-width: 2.2; stroke-linejoin: round; }
.chart .trace-drift { fill: none; stroke: var(--drift-fill); stroke-width: 2; stroke-linejoin: round; }
.chart .exc { fill: var(--alarm-soft); }
.chart .cursor { stroke: var(--accent); stroke-width: 1.5; }
.chart .cursor-dot { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.chart .future { fill: var(--panel); opacity: 0.65; }
.chart .defrost { fill: var(--panel-2); }

.kv { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.kv > div { padding: 12px 20px; border-top: 1px solid var(--grid); min-width: 0; }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv > div:nth-child(even) { border-left: 1px solid var(--line); padding-left: 14px; }
.kv dt { font-size: 13px; color: var(--ink-3); }
.kv dd { margin-top: 4px; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kv dd.is-alarm { color: var(--alarm); }
.kv dd.is-drift { color: var(--drift); }

.exc-block { padding: 14px 20px 18px; border-bottom: 1px solid var(--line); }
.exc-block h3 { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 8px; }
.exc-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--grid); font-size: 13px; }
.exc-list li:first-child { border-top: 0; }
.exc-list .e-cause { color: var(--ink); font-size: 14px; }
.exc-list .e-when { color: var(--ink-3); }
.exc-list .e-peak { text-align: right; color: var(--alarm); font-variant-numeric: tabular-nums; font-size: 14px; }
.exc-list .e-dur { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.exc-none { font-size: 13px; color: var(--ink-3); }
.act-block { padding: 14px 20px 16px; border-bottom: 1px solid var(--line); }
.act-block h3 { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 8px; }
.act-list { margin: 0; padding: 0; list-style: none; }
.act-list li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 5px 0; font-size: 13px; color: var(--ink-2); }
.act-list .a-t { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 20px 20px; }
.panel-actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* On desktop the rail scrolls: the alarm actions stay in reach at its foot. */
@media (min-width: 1081px) {
  .panel-actions { position: sticky; bottom: 0; z-index: 1; background: var(--panel); border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 14px; }
}

/* attention list */
.list-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.list-head h2 { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.search { position: relative; margin-top: 12px; }
.search input {
  width: 100%; height: 34px; padding: 0 10px 0 32px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--raise); color: var(--ink);
  font: 400 14px var(--font);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.ulist-label { padding: 12px 20px 6px; font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between; }
.ulist { border-top: 1px solid var(--line); }
.urow {
  display: grid; grid-template-columns: 3px 74px 1fr auto; align-items: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 20px 0 0; border: 0; border-bottom: 1px solid var(--grid);
  background: transparent; text-align: left; cursor: pointer; font-size: 13px; color: var(--ink-2);
  transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1);
}
.urow:hover { background: var(--panel-2); }
.urow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.urow .u-bar { align-self: stretch; background: transparent; }
.urow.st-alarm .u-bar { background: var(--alarm-fill); }
.urow.st-drift .u-bar { background: var(--drift-fill); }
.urow .u-id { font: 500 13px/1 var(--mono); color: var(--ink); }
.urow .u-c { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow .u-t { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.urow .u-t small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.urow.st-alarm .u-t b { color: var(--alarm); font-weight: 500; }
.urow.st-drift .u-t b { color: var(--drift); font-weight: 500; }
.urow .u-t b { font-weight: 400; }

/* ---------- report ---------- */
.report { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; }
.report[hidden] { display: none; }
.report-scrim { position: absolute; inset: 0; background: rgba(7, 15, 22, 0.55); }
.report-dialog { position: relative; width: min(920px, calc(100vw - 32px)); height: min(92vh, 1100px); display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--panel-2); border-radius: 4px; box-shadow: var(--shadow-2); overflow: hidden; }
.report-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.report-bar-title { font-size: 14px; color: var(--ink-2); }
.report-actions { display: flex; gap: 8px; }
.report-scroll { overflow: auto; padding: 28px; }
.report-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet {
  width: 794px; min-height: 1123px; margin: 0 auto; padding: 56px 60px;
  background: #fff; color: #0b1b27; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 12px 32px -12px rgba(0,0,0,0.25);
  font-size: 13px; line-height: 1.5;
  --r-line: #d8dfe5; --r-ink-3: #55697a;
}
.sheet h1 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.sheet .s-top { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 18px; border-bottom: 2px solid #0b1b27; }
.sheet .s-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.sheet .s-brand svg { width: 22px; height: 22px; }
.sheet .s-meta { text-align: right; color: var(--r-ink-3); font-size: 13px; }
.sheet .s-title { margin-top: 22px; }
.sheet .s-sub { color: var(--r-ink-3); margin-top: 6px; font-size: 13px; }
.sheet .s-kpis { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0 26px; border: 1px solid var(--r-line); }
.sheet .s-kpis div { padding: 12px 14px; }
.sheet .s-kpis div + div { border-left: 1px solid var(--r-line); }
.sheet .s-kpis b { display: block; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sheet .s-kpis span { color: var(--r-ink-3); font-size: 13px; }
.sheet h2 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin: 24px 0 8px; }
.sheet table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet th { text-align: left; font-weight: 500; font-size: 13px; color: var(--r-ink-3); padding: 6px 8px 6px 0; border-bottom: 1px solid #0b1b27; }
.sheet td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--r-line); font-size: 13px; vertical-align: top; }
.sheet td small { display: block; font-size: 12px; color: var(--r-ink-3); white-space: nowrap; }
.sheet .s-page { white-space: nowrap; }
.sheet .r { text-align: right; }
.sheet .mono { font-family: var(--mono); font-size: 13px; }
.sheet .open { color: #b3271f; font-weight: 500; }
.sheet .s-note { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--r-line); color: var(--r-ink-3); font-size: 13px; display: flex; justify-content: space-between; gap: 24px; }
.sheet .s-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.sheet .s-sign div { border-top: 1px solid #0b1b27; padding-top: 6px; color: var(--r-ink-3); font-size: 13px; }

.selbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1379px) {
  .brand-text .site { display: none; }
  .by { display: none; }
  .divider { display: none; }
}
@media (max-width: 1279px) {
  .app { grid-template-columns: 272px minmax(0, 1fr) 336px; }
  .topbar { gap: 12px; }
  .topbar-right { gap: 10px; }
}
@media (max-width: 1180px) {
  .clock-day { display: none; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; }
  .topbar-right { flex: 1 1 100%; margin-left: 0; }
  .topbar-right .btn-primary { margin-left: auto; }
}
@media (max-width: 1080px) {
  .app {
    height: auto; min-height: 0;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: 'top top' 'left stage' 'right right';
  }
  .stage { grid-template-rows: 560px auto; }
  .rail-right { border-left: 0; border-top: 1px solid var(--line); }
  .foot { display: flex; }
}
@media (max-width: 900px) {
  .sheet { width: auto; min-height: 0; padding: 36px 32px; }
}
@media (max-width: 600px) {
  .sheet { padding: 24px 18px; }
  .sheet .s-top { flex-direction: column; gap: 10px; }
  .sheet .s-meta { text-align: left; }
  .sheet .s-kpis { grid-template-columns: 1fr 1fr; }
  .sheet .s-kpis div:nth-child(3) { border-left: 0; }
  .sheet .s-kpis div:nth-child(n+3) { border-top: 1px solid var(--r-line); }
  .sheet table, .sheet tbody, .sheet tr, .sheet td { display: block; width: 100%; }
  .sheet thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sheet tr { padding: 8px 0; border-bottom: 1px solid #0b1b27; }
  .sheet td { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 3px 0; border: 0; text-align: left; }
  .sheet td.r { text-align: left; }
  .sheet td::before { content: attr(data-label); color: var(--r-ink-3); }
  .sheet td small { grid-column: 2; }
  .sheet .s-note { flex-direction: column; gap: 8px; }
  .sheet .s-sign { gap: 20px; }
}
.by-phone { display: none; }
@media (max-width: 760px) {
  body { font-size: 14px; }
  .app { display: flex; flex-direction: column; }
  .topbar { order: 0; }
  .rail-left { display: contents; }
  .block-status { order: 1; }
  .stage { order: 2; }
  .block-cargo { order: 3; border-top: 1px solid var(--line); }
  .rail-right { order: 4; }
  .block-comp { order: 5; border-top: 1px solid var(--line); }
  .block-power { order: 6; }
  .foot { order: 7; }
  .block { background: var(--panel); }
  .brand { width: 100%; }
  .by-phone { display: inline-flex; align-items: center; margin-left: auto; height: 34px; padding: 0 2px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
  .by-phone:hover { color: var(--accent); }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px 12px; gap: 10px 8px; position: static; }
  .topbar-right { display: contents; }
  .brand { order: 1; flex: 1 1 100%; }
  .tag-concept { order: 2; flex: 1 1 0; justify-content: flex-start; height: 34px; }
  #themeBtn { order: 3; }
  .transport { order: 4; }
  .clock { order: 5; margin-left: auto; gap: 6px; }
  .clock-day { display: none; }
  .clock-time { min-width: 0; }
  .live { order: -1; }
  .live-delta { display: none !important; }
  .selbar:not([hidden]) {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 8px;
    padding: 10px 12px 10px 16px; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .selbar .sb-id { font: 500 15px/1 var(--mono); color: var(--ink); }
  .selbar .sb-c { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .selbar .sb-t { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .topbar-right .btn-primary { display: none; }
  .rail { overflow: visible; border: 0; }

  .block { padding: 16px; }
  .stage { display: block; }
  .viewport { height: 440px; }
  .vp-card > div { padding: 6px 9px 7px; }
  .legend { gap: 4px 10px; padding: 6px 8px; }
  .toasts { width: auto; left: 12px; top: 56px; }
  .btn-play-overlay { right: auto; left: 12px; top: 58px; }
  .timeline { padding: 12px 16px; }
  .tl-head { flex-wrap: wrap; gap: 8px 12px; }
  .tl-legend { margin-left: 0; }
  .rail-right { border-top: 1px solid var(--line); }
  .panel-head, .chart-block, .exc-block, .list-head { padding-left: 16px; padding-right: 16px; }
  .rd { padding-left: 16px; }
  .kv > div { padding-left: 16px; padding-right: 16px; }
  .panel-actions { padding: 14px 16px 18px; }
  .urow { padding-right: 16px; }
  .ulist-label { padding-left: 16px; padding-right: 16px; }
  .foot { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 18px 16px 28px; font-size: 13px; color: var(--ink-3); background: var(--panel); border-top: 1px solid var(--line); }
  .report-scroll { padding: 12px; }
  .report-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
}
.foot { align-items: center; gap: 8px 20px; padding: 18px 20px 24px; font-size: 13px; color: var(--ink-3); background: var(--panel); border-top: 1px solid var(--line); grid-column: 1 / -1; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; }
}

@media print {
  body > *:not(.report) { display: none !important; }
  .report { position: static; display: block; }
  .report-scrim, .report-bar { display: none; }
  .report-dialog { width: auto; height: auto; box-shadow: none; background: #fff; display: block; }
  .report-scroll { padding: 0; overflow: visible; }
  .sheet { box-shadow: none; width: auto; min-height: 0; padding: 0; }
  @page { size: A4; margin: 16mm; }
}
