/* Sentinel — design tokens first, components after. No inline styles anywhere (strict CSP).
   Idée directrice : la veille de nuit. Les sauvegardes tournent la nuit, on fait le point le matin :
   l'en-tête et le bandeau « 24 h » sont la nuit (minuit / clair de lune), le reste est une page calme. */

@font-face {
  font-family: "Atkinson Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/atkinson-next-latin.woff2") format("woff2");
  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: "Atkinson Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/atkinson-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --page: #f2f3f7;            /* brume */
  --panel: #ffffff;
  --panel-2: #f6f7fa;
  --line: #e2e5ec;
  --line-strong: #c9cedb;
  --ink: #141a2e;             /* encre de nuit */
  --ink-2: #4a5068;
  --ink-3: #6b7189;
  --accent: #2b3a78;          /* minuit */
  --accent-wash: rgba(43, 58, 120, .08);
  --on-accent: #ffffff;

  --ok: #17915a;      --ok-ink: #0e6b41;     --ok-wash: rgba(23, 145, 90, .10);
  --warn: #e09a12;    --warn-ink: #8a5a00;   --warn-wash: rgba(224, 154, 18, .14);
  --crit: #d2423b;    --crit-ink: #a82b25;   --crit-wash: rgba(210, 66, 59, .10);
  --run: #2f7fd6;     --run-ink: #1f5fa8;    --run-wash: rgba(47, 127, 214, .10);
  --idle: #dadde6;

  --series-1: #2b3a78;
  --series-2: #d9772b;
  --series-3: #17915a;

  /* the night: header + 24 h band, identical in both themes */
  --night: #172040;
  --night-deep: #10172f;
  --night-day: #2a3a72;       /* daytime hours inside the band */
  --night-line: rgba(220, 227, 255, .14);
  --moon: #dce3ff;
  --moon-2: #a3add3;
  --moon-3: #7a85b0;
  --dawn: #f2b46b;

  --radius: 7px;
  --font: "Atkinson Next", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --shadow-pop: 0 14px 40px rgba(16, 23, 47, .22);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* Dark values are declared twice on purpose: OS preference and the manual toggle (the toggle wins both ways). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d1120; --panel: #141a2c; --panel-2: #1a2136; --line: #252d45; --line-strong: #36405e;
    --ink: #e7eaf5; --ink-2: #b3b9cf; --ink-3: #8a91aa;
    --accent: #aebbff; --accent-wash: rgba(174, 187, 255, .12); --on-accent: #10152a;
    --ok: #2fb873; --ok-ink: #5ed597; --ok-wash: rgba(47, 184, 115, .15);
    --warn: #eda524; --warn-ink: #f3bc55; --warn-wash: rgba(237, 165, 36, .14);
    --crit: #e5534b; --crit-ink: #ff8a82; --crit-wash: rgba(229, 83, 75, .16);
    --run: #4a95ea; --run-ink: #8cbdf5; --run-wash: rgba(74, 149, 234, .15);
    --idle: #2a3249;
    --series-1: #aebbff; --series-2: #f0955a; --series-3: #2fb873;
    --night: #10162c; --night-deep: #0a0f20; --night-day: #1f2b57;
    --shadow-pop: 0 14px 40px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d1120; --panel: #141a2c; --panel-2: #1a2136; --line: #252d45; --line-strong: #36405e;
  --ink: #e7eaf5; --ink-2: #b3b9cf; --ink-3: #8a91aa;
  --accent: #aebbff; --accent-wash: rgba(174, 187, 255, .12); --on-accent: #10152a;
  --ok: #2fb873; --ok-ink: #5ed597; --ok-wash: rgba(47, 184, 115, .15);
  --warn: #eda524; --warn-ink: #f3bc55; --warn-wash: rgba(237, 165, 36, .14);
  --crit: #e5534b; --crit-ink: #ff8a82; --crit-wash: rgba(229, 83, 75, .16);
  --run: #4a95ea; --run-ink: #8cbdf5; --run-wash: rgba(74, 149, 234, .15);
  --idle: #2a3249;
  --series-1: #aebbff; --series-2: #f0955a; --series-3: #2fb873;
  --night: #10162c; --night-deep: #0a0f20; --night-day: #1f2b57;
  --shadow-pop: 0 14px 40px rgba(0, 0, 0, .55);
}

/* Anything sitting on the night (top bar, 24 h band, login) uses the dark set whatever the theme. */
.on-night {
  color-scheme: dark;
  --panel: #1c2650; --panel-2: #222d5c; --line: rgba(220, 227, 255, .16); --line-strong: rgba(220, 227, 255, .28);
  --ink: #eef1ff; --ink-2: var(--moon-2); --ink-3: var(--moon-3);
  --accent: var(--moon); --accent-wash: rgba(220, 227, 255, .12); --on-accent: var(--night);
  --ok: #34c27c; --ok-ink: #6fe0a6; --ok-wash: rgba(52, 194, 124, .16);
  --warn: #f0ab2c; --warn-ink: #f6c46a; --warn-wash: rgba(240, 171, 44, .16);
  --crit: #ef5a51; --crit-ink: #ff958e; --crit-wash: rgba(239, 90, 81, .18);
  --run: #5aa2f0; --run-ink: #9cc8f7; --run-wash: rgba(90, 162, 240, .16);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 0 28px; height: 58px; background: var(--night); border-bottom: 1px solid var(--night-line);
}
.topbar .search { background: rgba(220, 227, 255, .07); border-color: transparent; }
.topbar .search:focus { background: rgba(220, 227, 255, .12); outline: 2px solid var(--moon-2); outline-offset: 0; }
.topbar .icon-btn:hover { background: rgba(220, 227, 255, .08); border-color: transparent; }
.topbar .nav a[aria-current="page"] { border-bottom-color: var(--moon); }
.topbar .nav a[aria-current="page"] svg { color: var(--moon); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.015em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.nav { display: flex; gap: 4px; align-self: stretch; }
.nav a {
  white-space: nowrap; display: flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--ink-2); font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav a svg { flex: none; opacity: .8; }
.nav a[aria-current="page"] svg { color: var(--accent); opacity: 1; }
.nav .count {
  margin-left: 7px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--crit); color: #fff;
  font-size: 12px; font-weight: 700; text-align: center; line-height: 20px;
}
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  width: 240px; height: 34px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-2) no-repeat 11px 50% / 15px; color: var(--ink);
}
.search::placeholder { color: var(--ink-3); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 11px; top: 10px; color: var(--ink-3); pointer-events: none; }
.search-wrap .search { background-image: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.user { color: var(--ink-2); font-size: 13px; padding: 0 4px; }

/* ------------------------------------------------------------------ layout */
.page { max-width: 1280px; margin: 0 auto; padding: 28px 28px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.crumbs { color: var(--ink-3); font-size: 13px; margin-bottom: 6px; }
h1.title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 650; }
.panel-body { padding: 18px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ buttons & forms */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); font-weight: 550; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--crit-ink); border-color: var(--crit); }
.btn.danger:hover { background: var(--crit-wash); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--line); }

label.field { display: grid; gap: 6px; font-weight: 550; font-size: 13px; color: var(--ink-2); }
label.field small { font-weight: 400; color: var(--ink-3); }
input.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); color: var(--ink);
}
textarea.input { height: auto; padding: 8px 12px; resize: vertical; min-height: 70px; }
input.input:focus, select.input:focus, textarea.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.input.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .02em; }
.form-error { color: var(--crit-ink); background: var(--crit-wash); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }
.form-hint { color: var(--ink-3); font-size: 13px; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 0 14px; height: 32px; color: var(--ink-2); font-weight: 550; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-wash); color: var(--accent); }
.seg button:hover { color: var(--ink); }

/* ------------------------------------------------------------------ status language (icon + label, never colour alone) */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.pill svg { flex: none; }
.pill.lv-ok { background: var(--ok-wash); color: var(--ok-ink); }
.pill.lv-warn { background: var(--warn-wash); color: var(--warn-ink); }
.pill.lv-crit, .pill.lv-offline { background: var(--crit-wash); color: var(--crit-ink); }
.pill.lv-run { background: var(--run-wash); color: var(--run-ink); }
.pill.lv-pending, .pill.lv-muted, .pill.lv-unknown { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.ink-ok { color: var(--ok-ink); } .ink-warn { color: var(--warn-ink); } .ink-crit { color: var(--crit-ink); } .ink-run { color: var(--run-ink); }

/* ------------------------------------------------------------------ overview: headline */
.headline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; margin-bottom: 26px; }
.headline h1 { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; max-width: 28ch; text-wrap: balance; }
.headline .sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.fleet-side { display: flex; gap: 34px; }
.fleet-side .fig { display: grid; gap: 2px; }
.fleet-side .fig b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fleet-side .fig span { color: var(--ink-3); font-size: 13px; }

.fleetbar { display: flex; gap: 2px; height: 10px; margin-bottom: 10px; }
.fleetbar i { display: block; border-radius: 2px; min-width: 3px; }
.fleetbar .ok { background: var(--ok); } .fleetbar .warn { background: var(--warn); }
.fleetbar .crit { background: var(--crit); } .fleetbar .run { background: var(--run); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 26px; color: var(--ink-2); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .hint { margin-left: auto; color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------------ NAS fleet rows */
.fleet { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.fleet-head, .nas-row {
  display: grid; align-items: center; column-gap: 24px; padding: 0 18px 0 22px;
  grid-template-columns: minmax(220px, 1.7fr) 128px minmax(120px, .8fr) minmax(170px, 1fr) 84px 16px;
}
.fleet-head { height: 38px; background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.nas-row { position: relative; min-height: 76px; padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: inherit; cursor: pointer; }
.nas-row:last-child { border-bottom: 0; }
.nas-row:hover { background: var(--panel-2); text-decoration: none; }
.nas-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--idle); }
.nas-row.lv-ok::before { background: var(--ok); }
.nas-row.lv-warn::before { background: var(--warn); }
.nas-row.lv-crit::before, .nas-row.lv-offline::before { background: var(--crit); }
.nas-row.lv-pending::before, .nas-row.lv-muted::before { background: var(--idle); }
.nas-main { min-width: 0; }
.nas-name { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; }
.nas-name .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nas-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nas-sub span + span::before { content: "/"; margin: 0 8px; color: var(--line-strong); }
.nas-issue { margin-top: 5px; font-size: 13px; font-weight: 550; display: flex; gap: 6px; align-items: flex-start; }
.nas-issue > span:not(.more-issues) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.nas-issue > span[aria-hidden] { padding-top: 2px; flex: none; }
.nas-issue.acked { color: var(--ink-3); text-decoration: line-through; }
.more-issues { color: var(--ink-3); font-weight: 500; }
.tasks-sum { font-size: 13px; color: var(--ink-2); display: grid; gap: 2px; }
.tasks-sum b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.tasks-sum .bad { font-weight: 600; }
.seen { font-size: 12.5px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.seen.stale { color: var(--crit-ink); font-weight: 600; }
.chev { color: var(--ink-3); }

/* run ribbon — the signature element: one tick per day (fleet) or per run (task) */
.ribbon { display: flex; gap: 2px; align-items: center; height: 24px; }
.tick { width: 6px; height: 24px; border-radius: 2px; background: var(--idle); flex: none; }
.tick.ok { background: var(--ok); } .tick.warn { background: var(--warn); } .tick.crit { background: var(--crit); }
.tick.run { background: var(--run); }
.tick.none { height: 6px; opacity: .8; }
.ribbon.big { height: 30px; gap: 3px; } .ribbon.big .tick { width: 8px; height: 30px; }
.ribbon.big .tick.none { height: 8px; }
.ribbon-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* gauge */
.gauge-cell { display: grid; gap: 5px; }
.gauge { height: 8px; border-radius: 4px; background: var(--idle); overflow: hidden; }
.gauge i { display: block; height: 100%; border-radius: 4px; background: var(--series-1); }
.gauge i.warn { background: var(--warn); } .gauge i.crit { background: var(--crit); }
.gauge.lg { height: 14px; border-radius: 7px; } .gauge.lg i { border-radius: 7px; }
.gauge-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gauge-label .fc { color: var(--ink-3); }
.gauge-label .fc.warn { color: var(--warn-ink); font-weight: 600; } .gauge-label .fc.crit { color: var(--crit-ink); font-weight: 600; }

.empty { padding: 56px 24px; text-align: center; color: var(--ink-2); }
.empty h3 { font-size: 17px; margin-bottom: 6px; color: var(--ink); }

/* ------------------------------------------------------------------ NAS detail */
.nas-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 26px; color: var(--ink-2); font-size: 13px; margin-top: 8px; }
.facts b { color: var(--ink); font-weight: 600; }
.issues { border-left: 4px solid var(--crit); }
.issue-row { display: flex; gap: 12px; align-items: baseline; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.issue-row:last-child { border-bottom: 0; }
.issue-row .t { font-weight: 600; } .issue-row .m { color: var(--ink-2); }
.issue-row.acked { opacity: .55; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 22px 0 16px; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.task { border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-row { display: grid; align-items: center; column-gap: 22px; padding: 14px 18px; cursor: pointer; width: 100%; text-align: left; background: none; border: 0;
  grid-template-columns: minmax(200px, 1.5fr) minmax(210px, 250px) minmax(150px, 1fr) minmax(110px, .6fr) 16px; }
.task-row:hover { background: var(--panel-2); }
.task-name { font-weight: 650; display: flex; gap: 10px; align-items: center; }
.task-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.task-reason { font-size: 13px; color: var(--ink-2); }
.task-detail { padding: 4px 18px 20px 18px; background: var(--panel-2); border-top: 1px solid var(--line); }
.task-controls { display: flex; gap: 18px; align-items: end; flex-wrap: wrap; padding: 14px 0; }
.task-controls label.field { width: 190px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-weight: 600; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; white-space: nowrap; }
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.r, table.tbl th.r { text-align: right; }
table.tbl .num { font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* storage */
.vol { padding: 18px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.vol:last-child { border-bottom: 0; }
.vol-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.vol-top h3 { font-size: 15px; } .vol-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bays { display: flex; flex-wrap: wrap; gap: 10px; }
.bay { width: 148px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); position: relative; display: grid; gap: 3px; font-size: 12.5px; }
.bay::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 5px 0 0 5px; background: var(--ok); }
.bay.lv-warn::before { background: var(--warn); } .bay.lv-crit::before { background: var(--crit); }
.bay b { font-size: 13.5px; } .bay .m { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bay .temp { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bay .why { font-weight: 600; font-size: 12px; }

/* line chart */
.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--ink-3); font: 11.5px var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .s1 { stroke: var(--series-1); } .chart .s2 { stroke: var(--series-2); } .chart .s3 { stroke: var(--series-3); }
.chart .dot { stroke: var(--panel); stroke-width: 2; }
.chart .d1 { fill: var(--series-1); } .chart .d2 { fill: var(--series-2); } .chart .d3 { fill: var(--series-3); }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .lbl { fill: var(--ink); font-weight: 600; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 5px; background: var(--ink); color: var(--page); font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-pop); white-space: nowrap; transform: translate(-50%, -110%); }
.chart-tip b { font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 20px; margin: 4px 0 10px; font-size: 13px; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.chart-legend .l1 i { background: var(--series-1); } .chart-legend .l2 i { background: var(--series-2); } .chart-legend .l3 i { background: var(--series-3); }

/* ------------------------------------------------------------------ compact page header + stat tiles */
.page-head.compact { align-items: center; margin-bottom: 16px; }
/* ledger: one continuous strip of figures (not a row of cards). A 3 px top edge carries the tone, only when the
   figure is non-zero; the small icon keeps the meaning without colour. Cells that filter are buttons. */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; margin-bottom: 18px;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.stat {
  position: relative; display: grid; align-content: start; gap: 3px; padding: 15px 18px 13px; border: 0; background: var(--panel);
  text-align: left; color: inherit; font: inherit; min-width: 0;
}
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: transparent; }
.stat.t-ok::before { background: var(--ok); } .stat.t-warn::before { background: var(--warn); }
.stat.t-crit::before { background: var(--crit); } .stat.t-run::before { background: var(--run); }
button.stat { cursor: pointer; transition: background-color .15s; }
button.stat:hover { background: var(--panel-2); }
button.stat[aria-pressed="true"] { background: var(--accent-wash); box-shadow: inset 0 -2px 0 var(--accent); }
button.stat:focus-visible { outline-offset: -3px; }
.stat-num { font-size: 30px; line-height: 1.05; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-num.zero { color: var(--ink-3); font-weight: 500; }
.stat-lbl { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; min-width: 0; }
.stat-lbl svg { flex: none; color: var(--ink-3); }
.stat-lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.t-ok .stat-lbl svg { color: var(--ok); } .stat.t-warn .stat-lbl svg { color: var(--warn); }
.stat.t-crit .stat-lbl svg { color: var(--crit); } .stat.t-run .stat-lbl svg { color: var(--run); }

/* ------------------------------------------------------------------ hero: the night band under the top bar */
.hero { background: var(--night); border-bottom: 1px solid var(--night-line); }
.hero-in { max-width: 1280px; margin: 0 auto; padding: 22px 28px 22px; }
.hero .page-head { margin-bottom: 8px; }
.hero h1.title { font-size: 28px; font-weight: 750; letter-spacing: -.025em; }
.hero .tabs { margin: 4px 0 0; border-bottom-color: var(--night-line); }
.hero .tabs button { color: var(--moon-2); }
.hero .tabs button:hover { color: var(--ink); }
.hero .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--moon); }
.hero .tabs .tab-count { color: var(--moon-3); }
.hero .btn.ghost { color: var(--moon-2); }
.hero .btn.ghost:hover { color: var(--ink); background: rgba(220, 227, 255, .08); border-color: transparent; }
.icon-btn.flip svg { transform: scaleX(-1); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn[disabled]:hover { background: transparent; }

.band { padding-top: 20px; }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.band-title { font-size: 23px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; max-width: 46ch; text-wrap: balance; }
.band-when { color: var(--moon-2); font-size: 14px; margin-top: 3px; }
.band-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.band-nav .icon-btn { color: var(--moon); }
.band-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--warn-ink); font-size: 13.5px; }
.band-note svg { flex: none; }
.band-issues { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.band-issue {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(220, 227, 255, .05); color: var(--ink); font-size: 13px; max-width: 100%;
}
.band-issue:hover { background: rgba(220, 227, 255, .1); }
.band-issue b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-issue span { color: var(--moon-2); white-space: nowrap; }
.band-issue.lv-crit { border-color: rgba(239, 90, 81, .55); } .band-issue.lv-crit svg { color: var(--crit-ink); }
.band-issue.lv-warn { border-color: rgba(240, 171, 44, .45); } .band-issue.lv-warn svg { color: var(--warn-ink); }
.band-more { color: var(--moon-3); font-size: 13px; }

.sky-wrap { position: relative; }
.sky-inner { position: relative; }
.sky { display: block; width: 100%; height: auto; overflow: hidden; }
.sky .star { fill: #e8ecff; opacity: .55; }
.sky .hgrid { stroke: rgba(220, 227, 255, .22); stroke-width: 1; }
.sky .hgrid.mid { stroke: rgba(220, 227, 255, .3); stroke-dasharray: 2 4; }
.sky .hbase { stroke: rgba(220, 227, 255, .35); stroke-width: 1; }
.sky .hlbl { fill: var(--moon-2); font: 500 13px var(--font); }
.sky .hlbl.mid { fill: var(--ink); font-weight: 650; }
.sky .now { stroke: var(--moon); stroke-width: 1.5; stroke-dasharray: 3 3; }
.sky .now-lbl { fill: var(--moon); font: 600 12px var(--font); }
.sky .mk { cursor: pointer; outline: none; }
.sky .mk .stem { stroke: rgba(220, 227, 255, .28); stroke-width: 1; }
.sky .mk .dot { stroke: var(--night-deep); stroke-width: 1.5; transition: r .15s; }
.sky .mk.ok .dot { fill: var(--ok); } .sky .mk.warn .dot { fill: var(--warn); }
.sky .mk.crit .dot { fill: var(--crit); } .sky .mk.run .dot { fill: var(--run); }
.sky .mk .halo { fill: none; stroke: var(--crit); stroke-width: 1.5; opacity: .55; }
.sky .mk:hover .dot, .sky .mk:focus-visible .dot { r: 8; }
.sky .mk:focus-visible .stem { stroke: var(--moon); }
.sky .mk-plan circle { fill: none; stroke: var(--moon-2); stroke-width: 1.4; stroke-dasharray: 2.2 2; }
.sky .sky-empty { fill: var(--moon-2); font: 500 14px var(--font); }
.sky-tip {
  position: absolute; z-index: 6; pointer-events: none; transform: translate(-50%, calc(-100% - 14px));
  display: grid; gap: 1px; padding: 8px 11px; border-radius: 7px; background: #f4f6ff; color: #141a2e; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); white-space: nowrap;
}
.sky-tip b { font-weight: 700; }
.sky-tip .ink-ok { color: #0e6b41; } .sky-tip .ink-warn { color: #8a5a00; } .sky-tip .ink-crit { color: #a82b25; } .sky-tip .ink-run { color: #1f5fa8; }
.sky-tip .muted { color: #6b7189; }

/* ------------------------------------------------------------------ backups (main tab) */
.tabs .tab-count { margin-left: 8px; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.tabs .count { margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--crit); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; display: inline-block; text-align: center; }
.clients { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.client-head-row, .client-row {
  display: grid; align-items: center; column-gap: 22px; padding: 0 18px 0 22px;
  grid-template-columns: minmax(240px, 1.8fr) 128px minmax(150px, .8fr) minmax(120px, .6fr) 16px;
}
.client-head-row { height: 38px; background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.client { position: relative; border-bottom: 1px solid var(--line); }
.client:last-child { border-bottom: 0; }
.client::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--idle); }
.client.lv-ok::before { background: var(--ok); }
.client.lv-warn::before, .client.lv-unknown::before { background: var(--warn); }
.client.lv-crit::before, .client.lv-offline::before { background: var(--crit); }
.client.lv-run::before { background: var(--run); }
.client-row { min-height: 66px; padding-top: 10px; padding-bottom: 10px; }
.client-row:hover { background: var(--panel-2); }
.client-toggle { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 2px 10px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; min-width: 0; }
.client-name { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-nas { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-nas span + span::before { content: "/"; margin: 0 8px; color: var(--line-strong); }
.client-toggle[aria-expanded="true"] ~ .chev svg { transform: rotate(90deg); }
.client-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-note svg { flex: none; color: var(--ink-3); }
.problems { display: flex; flex-wrap: wrap; gap: 0 10px; }
.client-actions { gap: 8px; }
.tasks-tbl tr.clickable { cursor: pointer; }
.tasks-tbl tr.clickable:hover td { background: var(--panel); }
.tasks-tbl tr.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.seen-cell { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 2px; }
input.input.note { height: 30px; font-size: 13px; background: var(--panel-2); border-color: var(--line); }
input.input.note:hover { border-color: var(--line-strong); }
.note-text { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-body { padding: 0 18px 14px 22px; background: var(--panel-2); border-top: 1px solid var(--line); }
.tasks-tbl td { vertical-align: top; }
.tasks-tbl tr.stale td { opacity: .7; }
/* Machine families (PC, physical server…) inside a client, as in DSM. */
.tasks-tbl tr.task-group th { padding: 16px 10px 7px; background: none; border-bottom: 1px solid var(--line-2, var(--line)); text-align: left; font-weight: 400; white-space: normal; }
.tasks-tbl tbody.task-grp:first-of-type tr.task-group th { padding-top: 8px; }
.task-group-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-2); }
.task-group-in svg { color: var(--accent); flex: none; }
.task-group-name { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.task-group-count { font-size: 12px; font-weight: 650; color: var(--ink-3); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.task-group-bad { display: inline-flex; gap: 10px; font-size: 12.5px; font-weight: 650; margin-left: 4px; }
.task-msg { font-size: 12.5px; color: var(--ink-3); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-msg.wrap { white-space: normal; max-width: 52ch; }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stale-mark { display: inline-flex; cursor: help; }
.client-actions { display: flex; justify-content: flex-end; padding-top: 10px; }

/* ------------------------------------------------------------------ fleet storage */
.st-card { border-left: 4px solid var(--idle); }
.st-card.lv-ok { border-left-color: var(--ok); }
.st-card.lv-warn { border-left-color: var(--warn); }
.st-card.lv-crit, .st-card.lv-offline { border-left-color: var(--crit); }
.st-card + .st-card { margin-top: 0; }
.st-name { font-weight: 650; font-size: 15px; color: var(--ink); }
.st-total { font-weight: 600; }
.st-issues { padding: 12px 18px 0; display: grid; gap: 4px; }
.st-vols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 28px; padding: 16px 18px; }
.st-vol { display: grid; gap: 8px; }
.st-vol .vol-big { font-size: 18px; }
.st-hw { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: 12.5px; white-space: nowrap; }
.chip.lv-warn { border-color: var(--warn); } .chip.lv-crit { border-color: var(--crit); }

/* ------------------------------------------------------------------ alerts, admin */
.alert-row { display: grid; grid-template-columns: 110px minmax(200px, 1fr) minmax(0, 1.4fr) 150px 150px; gap: 18px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .btn { justify-self: end; }
.alert-row .who { font-weight: 650; } .alert-row .when { color: var(--ink-3); font-size: 12.5px; }
.token-box { display: flex; gap: 8px; align-items: stretch; }
.token-box textarea { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.callout { border: 1px solid var(--warn); background: var(--warn-wash); color: var(--ink); padding: 10px 14px; border-radius: var(--radius); font-size: 13px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.steps code, code.inline { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--ink); }
pre.snippet { margin: 0; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); font: 12.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; }

/* ------------------------------------------------------------------ dialog, toast */
dialog { border: 1px solid var(--line-strong); border-radius: 10px; padding: 0; background: var(--panel); color: var(--ink); width: min(620px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(8, 12, 18, .55); }
dialog form, dialog .dlg { display: grid; }
.dlg-head { padding: 18px 22px 0; } .dlg-head h2 { font-size: 18px; letter-spacing: -.01em; }
.dlg-body { padding: 16px 22px; display: grid; gap: 14px; max-height: min(70vh, 640px); overflow: auto; }
.dlg-foot { padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 6px; box-shadow: var(--shadow-pop); font-weight: 550; max-width: 360px; }
.toast.err { background: var(--crit); color: #fff; }

/* ------------------------------------------------------------------ login */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
  background: radial-gradient(120% 90% at 0% 0%, #1d2856 0%, var(--night) 45%, var(--night-deep) 100%);
}
.auth-side { padding: 48px 56px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-width: 0; }
.auth-side .brand { font-size: 19px; }
.auth-pitch h2 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -.035em; font-weight: 750; max-width: 15ch; text-wrap: balance; }
.auth-pitch h2 span { display: block; }
.auth-pitch p { color: var(--moon-2); margin-top: 18px; max-width: 46ch; font-size: 16px; line-height: 1.55; }
.auth-scene { max-width: 680px; }
.scene-svg { overflow: hidden; }
.scene-moon { fill: var(--moon); }
.auth-main { display: grid; place-items: center; padding: 40px 32px; }
.auth-box {
  width: min(400px, 100%); padding: 34px 32px 30px; border-radius: 16px;
  background: rgba(28, 38, 80, .72); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.auth-card { display: grid; gap: 18px; }
.auth-card h1 { font-size: 26px; letter-spacing: -.025em; font-weight: 750; }
.auth-card .muted { color: var(--moon-2); }
.auth .input { background: rgba(10, 15, 32, .55); border-color: var(--line-strong); height: 42px; }
.auth .input:focus { outline-color: var(--moon); border-color: var(--moon); }
.auth .btn.primary { height: 42px; justify-content: center; font-weight: 700; background: var(--moon); border-color: var(--moon); color: var(--night); }
.auth .btn.primary:hover { filter: none; background: #fff; }
.auth .btn.ghost { justify-content: center; color: var(--moon-2); }
.qr { display: grid; place-items: center; padding: 10px; background: #fff; border-radius: 8px; border: 1px solid var(--line); justify-self: start; }
.qr img { display: block; width: 176px; height: 176px; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; word-break: break-all; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) { .search { width: 170px; } .nav a { padding: 0 9px; } .topbar { gap: 18px; } }
@media (max-width: 1120px) { .nav-label { display: none; } .nav a { padding: 0 12px; } }
@media (max-width: 1020px) {
  .fleet-head { display: none; }
  .nas-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; padding-left: 20px; }
  .nas-row .ribbon, .nas-row .tasks-sum, .nas-row .gauge-cell { grid-column: 1 / -1; }
  .nas-row .seen { grid-row: 1; grid-column: 2; }
  .nas-row .chev { display: none; }
  .headline { grid-template-columns: 1fr; gap: 18px; }
  .task-row { grid-template-columns: 1fr; row-gap: 8px; }
  .task-row .chev { display: none; }
  .alert-row { grid-template-columns: 1fr; gap: 6px; }
  .client-head-row { display: none; }
  .client-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; padding-left: 20px; }
  .client-row .ribbon, .client-row .tasks-sum, .client-row .seen-cell { grid-column: 1 / -1; }
  .client-row .chev { grid-row: 1; grid-column: 2; }
  .client-body { padding-left: 14px; padding-right: 14px; }
  .auth { grid-template-columns: 1fr; } .auth-side { padding: 28px 24px 0; gap: 18px; } .auth-pitch h2 { font-size: 30px; } .auth-pitch p, .auth-scene { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 14px; gap: 14px; overflow-x: auto; } .page { padding: 20px 14px 60px; }
  .search { display: none; } .user { display: none; } .nav-label { display: none; } .nav a { padding: 0 9px; } .nav { gap: 0; } .brand span { display: none; } .nas-name { flex-wrap: wrap; row-gap: 4px; } .headline h1 { font-size: 27px; }
  .fleet-side { gap: 22px; flex-wrap: wrap; }
  .search-wrap { display: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; } .tabs button { white-space: nowrap; padding: 10px 10px; } .tabs .tab-count { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .stat { padding: 12px 12px 10px; } .stat-num { font-size: 24px; }
  .page-head.compact { flex-wrap: nowrap; } .page-head.compact .btn { padding: 0 8px; }
  .tasks-tbl tr:not(.task-group) > th:nth-last-child(1), .tasks-tbl td:nth-last-child(1) { display: none; }
  .tasks-tbl .task-sub { overflow-wrap: anywhere; }
  .client-body { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 720px) {
  .hero-in { padding: 16px 14px 18px; }
  .hero h1.title { font-size: 24px; }
  .hero .page-head .btn { font-size: 0; gap: 0; padding: 0 8px; }
  .band-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .band-title { font-size: 19px; }
  .band-nav { justify-content: flex-end; margin-top: -4px; }
  .sky-wrap { overflow-x: auto; scrollbar-width: thin; margin: 0 -14px; padding: 0 14px; }
  .sky-inner { min-width: 760px; }
  .band-issue span { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .gauge i, .fleetbar i { transition: width .5s ease; }
  .toast { animation: toast-in .18s ease-out; }
  @keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* the one orchestrated moment: a lantern sweeps the 24 h band and each run lights up as it passes */
  .sky.animate .mk { animation: mk-in .5s var(--ease-out) both; }
  .sky.animate .sweep { animation: sweep 1.7s cubic-bezier(.45, .05, .35, 1) .1s both; }
  @keyframes mk-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes sweep { from { transform: translateX(0); } to { transform: translateX(1460px); } }
  .sky .star.tw { animation: twinkle 5s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: .15; } to { opacity: .8; } }
  .sky .mk.crit .halo { animation: halo 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes halo { 0% { transform: scale(.6); opacity: .7; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

  /* responses to the user's own actions */
  .chev svg { transition: transform .2s var(--ease-out); }
  .client-body:not([hidden]) { animation: open-down .22s var(--ease-out); }
  @keyframes open-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  dialog[open] { animation: dlg-in .2s var(--ease-out); }
  @keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
}
.print-only { display: none; }
@media print {
  .topbar, .toolbar, .btn, .no-print, .chev { display: none !important; }
  .print-only { display: block; }
  .hero.on-night { background: none; border: 0; color: #000; --ink: #000; --ink-3: #555; }
  .hero-in { padding: 0 0 12px; }
  body { background: #fff; } .page { padding: 0; max-width: none; }
  .stat { border-color: #ccc; } .client, .panel { break-inside: avoid; }
  .client-body { display: block !important; background: #fff; }
}
