/* InfraMonitor UI
   One stylesheet, no framework. Tokens first; dark ("wallboard") mode swaps
   the same tokens. Status colours are only used for status, always with a word. */

:root {
  color-scheme: light;
  --bg: #e9edf1;
  --panel: #ffffff;
  --panel-2: #f4f6f8;
  --ink: #17212b;
  --ink-2: #4e5b68;
  --ink-3: #5f6b77;
  --line: #d3d9df;
  --line-2: #e3e8ec;
  --accent: #1d5c96;
  --accent-ink: #ffffff;
  --focus: #1d5c96;

  --ok: #0ca30c;      --ok-ink: #0a6e0a;    --ok-bg: #e5f4e5;
  --warn: #fab219;    --warn-ink: #7a5000;  --warn-bg: #fff4d6;
  --crit: #d03b3b;    --crit-ink: #b02a2a;  --crit-bg: #fbe7e7;
  --unk: #8a94a0;     --unk-ink: #56616c;   --unk-bg: #eceff2;

  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --chart-muted: #b9c1c9;
  --grid: #e6eaee;
  --rail: #cfd6dd;
  --hole: #b3bcc5;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;

  --t-xs: 0.75rem; --t-sm: 0.8125rem; --t-md: 0.9375rem; --t-lg: 1.125rem;
  --t-xl: 1.5rem;  --t-2xl: 2rem;

  --r-sm: 4px; --r-md: 6px;
  --gap: 1rem;
  --rail-w: 13.5rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10171d;
  --panel: #18212a;
  --panel-2: #1e2933;
  --ink: #e6ebf0;
  --ink-2: #a9b4bf;
  --ink-3: #8794a1;
  --line: #2b3743;
  --line-2: #24303b;
  --accent: #6fa8dc;
  --accent-ink: #0d141a;
  --focus: #8dbbe6;
  --ok-ink: #5fd35f;   --ok-bg: #173320;
  --warn-ink: #ffcc5c; --warn-bg: #3a2f12;
  --crit-ink: #ff8a8a; --crit-bg: #3d1c1e;
  --unk-ink: #b3bdc7;  --unk-bg: #26313b;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --chart-muted: #3d4a57;
  --grid: #24303b;
  --rail: #26313b;
  --hole: #0f151a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 { font-size: 1.25rem; }
h2 { font-size: var(--t-lg); }
h3 { font-size: var(--t-md); }
p { margin: 0; }
code, .code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: var(--t-sm); }
.nowrap { white-space: nowrap; }
.delete-need { color: var(--warn-ink, var(--ink-2)); min-height: 1.2em; margin: 0.25rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* `hidden` always wins over a class's display (e.g. .field { display: flex }) */
[hidden] { display: none !important; }

/* ---------- shell: a slim top bar; the menu opens from the three lines ---------- */
.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.35rem;
  height: 3.25rem; padding: 0 clamp(0.6rem, 2.5vw, 2.25rem);
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.55rem; padding: 0 0.35rem; color: var(--ink); font-weight: 600; font-size: var(--t-lg); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 1.4rem; height: 1.4rem; display: grid; gap: 2px; grid-template-rows: repeat(3, 1fr); flex: none; }
.brand-mark i { background: var(--ink); border-radius: 1px; position: relative; }
.brand-mark i::after { content: ""; position: absolute; right: 3px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--ok); }
.brand-mark i:nth-child(2)::after { background: var(--warn); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 0.15rem; min-width: 0; }

/* "Find a server" in the top bar (pages other than the overview) */
.srv-find { position: relative; display: flex; align-items: center; margin-right: 0.5rem; }
.srv-find > svg { position: absolute; left: 0.6rem; width: 1rem; height: 1rem; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.srv-find input { width: 16rem; height: 2.1rem; padding: 0 2rem 0 2rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); color: var(--ink); font: inherit; font-size: var(--t-sm); }
.srv-find input:focus { outline: none; border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.srv-find input::-webkit-search-cancel-button { display: none; }
.srv-find kbd { position: absolute; right: 0.5rem; font: inherit; font-size: var(--t-xs); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 0.3rem; line-height: 1.2rem; pointer-events: none; }
.srv-find input:focus ~ kbd { display: none; }
.srv-find-list { position: absolute; top: calc(100% + 0.35rem); left: 0; right: 0; min-width: 20rem; max-height: min(24rem, 70vh); overflow: auto; z-index: 60; margin: 0; padding: 0.3rem; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14); }
.srv-find-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center; padding: 0.4rem 0.55rem; border-radius: var(--r-sm); cursor: pointer; }
.srv-find-list li .led { grid-row: 1 / 3; width: 0.6rem; height: 0.6rem; }
.srv-find-list li b { font-weight: 600; font-size: var(--t-sm); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-find-list li small { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-find-list li[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.srv-find-list .srv-find-none { display: block; color: var(--ink-3); font-size: var(--t-sm); cursor: default; }
/* the overview's top bar also holds the live status, layout and wallboard buttons */
.srv-find.on-overview input { width: 13rem; padding-right: 0.5rem; }
@media (max-width: 1180px) { .srv-find.on-overview input { width: 10rem; } }
@media (max-width: 760px) {
  .srv-find input, .srv-find.on-overview input { width: 9.5rem; padding-right: 0.5rem; }
  .srv-find kbd { display: none; }
  .srv-find-list { left: auto; right: -4rem; min-width: 17rem; }
}
/* overview on a phone: just the magnifier; tapping it opens the box across the top bar */
@media (max-width: 560px) {
  .srv-find.on-overview { margin-right: 0.1rem; }
  .srv-find.on-overview input { width: 2.25rem; padding: 0; cursor: pointer; color: transparent; }
  .srv-find.on-overview input::placeholder { color: transparent; }
  .srv-find.on-overview > svg { left: 0.62rem; }
  .srv-find.on-overview:focus-within { position: fixed; top: 0.55rem; left: 0.6rem; right: 0.6rem; z-index: 70; margin: 0; }
  .srv-find.on-overview:focus-within input { width: 100%; padding: 0 0.6rem 0 2rem; color: var(--ink); cursor: text; }
  .srv-find.on-overview:focus-within input::placeholder { color: var(--ink-3); }
  .srv-find.on-overview:focus-within .srv-find-list { left: 0; right: 0; min-width: 0; }
}
@media (max-width: 460px) { .srv-find:not(.on-overview) input { width: 7rem; } .topbar:has(.srv-find:not(.on-overview)) .brand-name { display: none; } }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 2.35rem; height: 2.35rem; padding: 0; border-radius: var(--r-md);
  border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn[aria-expanded="true"] { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* sun in dark mode (click for light), moon in light mode (click for dark) */
:root[data-theme="dark"] .i-moon, :root:not([data-theme="dark"]) .i-sun { display: none; }
#sound-btn .i-off, #sound-btn.sound-off .i-on { display: none; }
#sound-btn.sound-off .i-off { display: block; }
#sound-btn.sound-off { color: var(--ink-3); }
.bell .count {
  position: absolute; top: 0.05rem; right: 0.05rem; min-width: 1.1rem; height: 1.1rem; padding: 0 0.28rem;
  border-radius: 999px; font-size: 0.6875rem; font-weight: 600; line-height: 1.1rem; text-align: center;
  background: var(--warn); color: #241a00; box-shadow: 0 0 0 2px var(--panel);
}
.bell.has-crit { color: var(--crit-ink); }
.bell.has-crit .count { background: var(--crit); color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .bell.has-crit svg { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 15%; }
  @keyframes ring { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(14deg); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(8deg); } 96% { transform: rotate(-4deg); } }
}
[data-alert-count][hidden] { display: none; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 0.45rem); left: 0; z-index: 45;
  min-width: 15rem; max-height: calc(100vh - 4.5rem); overflow: auto;
  display: flex; flex-direction: column; gap: 1px; padding: 0.35rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 14px 36px rgb(15 23 31 / 0.2);
}
.menu[hidden] { display: none; }
.menu form { margin: 0; }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 0.3rem 0.25rem; }
.menu-link {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%;
  padding: 0.55rem 0.75rem; border-radius: var(--r-sm); border: 0; background: none;
  font: inherit; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer;
}
.menu-link:hover, .menu-link:focus-visible { background: var(--panel-2); text-decoration: none; }
.menu-link[aria-current="page"] { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.menu-link small { color: var(--ink-3); font-weight: 400; }
.menu .count { font-size: var(--t-xs); font-weight: 600; min-width: 1.4rem; text-align: center; padding: 0 0.35rem; border-radius: 999px; background: var(--crit-bg); color: var(--crit-ink); }
.show-on-wall { display: none !important; }
:root.wall .show-on-wall { display: inline-grid !important; }

.main { min-width: 0; max-width: 112rem; margin: 0 auto; padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.25rem; }
.page-head .sub { color: var(--ink-2); margin-top: 0.25rem; }
.crumbs { font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 0.35rem; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-weight: 500; font-size: var(--t-sm);
  padding: 0.45rem 0.85rem; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.btn-danger:hover { background: var(--crit-bg); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--panel-2); color: var(--ink); }
.btn-sm { padding: 0.25rem 0.6rem; font-size: var(--t-xs); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
form.inline { display: inline; margin: 0; }

.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.field label, .label { font-weight: 500; font-size: var(--t-sm); }
.field .hint { font-size: var(--t-xs); color: var(--ink-3); }
.field .err { font-size: var(--t-xs); color: var(--crit-ink); }
.input, select.input, textarea.input {
  font: inherit; font-size: var(--t-md); color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.5rem 0.65rem; width: 100%;
}
select.input.input-sm, .input.input-sm { width: auto; padding: 0.2rem 0.4rem; font-size: var(--t-xs); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.input[aria-invalid="true"] { border-color: var(--crit); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0 1rem; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.seg button, .seg a { font: inherit; font-size: var(--t-sm); font-weight: 500; padding: 0.35rem 0.75rem; border: 0; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.seg > * + * { border-left: 1px solid var(--line); }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--ink); color: var(--panel); }
/* the focus ring goes inside the segment: outside, .seg's rounded clip cut it down to one stray line */
.seg :focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
.seg [aria-pressed="true"]:focus-visible, .seg [aria-current="page"]:focus-visible { outline-color: var(--panel); box-shadow: inset 0 0 0 4px var(--focus); }

.flash { padding: 0.7rem 0.9rem; border-radius: var(--r-md); margin-bottom: 1rem; display: flex; gap: 0.75rem; align-items: flex-start; justify-content: space-between; font-size: var(--t-sm); }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-err { background: var(--crit-bg); color: var(--crit-ink); }
.flash button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0 0.25rem; font-size: 1.1rem; line-height: 1; }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel-pad { padding: 1rem 1.15rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--line-2); }
.panel-head .note { font-size: var(--t-xs); color: var(--ink-3); }
.cols { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); align-items: start; }
.stack > * + * { margin-top: var(--gap); }
.empty { padding: 2rem 1.15rem; text-align: center; color: var(--ink-2); }
.empty strong { display: block; color: var(--ink); font-size: var(--t-lg); margin-bottom: 0.25rem; }

/* status word + light */
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; font-size: var(--t-sm); white-space: nowrap; }
.led { width: 0.6rem; height: 0.6rem; border-radius: 2px; background: var(--unk); flex: none; }
.s-HEALTHY .led, .led.s-HEALTHY { background: var(--ok); }
.s-WARNING .led, .led.s-WARNING { background: var(--warn); }
.s-CRITICAL .led, .led.s-CRITICAL { background: var(--crit); }
.s-HEALTHY.status { color: var(--ok-ink); }
.s-WARNING.status { color: var(--warn-ink); }
.s-CRITICAL.status { color: var(--crit-ink); }
.s-UNKNOWN.status { color: var(--unk-ink); }
/* warning and critical stand out as chips everywhere a status is shown */
.s-WARNING.status, .s-CRITICAL.status { padding: 0.08rem 0.55rem 0.08rem 0.45rem; border-radius: 999px; border: 1px solid; font-weight: 600; line-height: 1.35; }
.s-WARNING.status { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.s-CRITICAL.status { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
/* a reading above its limit */
.v-hi, .facts b.v-hi { color: var(--crit-ink); font-weight: 700; }
.sev { display: inline-block; min-width: 4.4rem; text-align: center; font-size: var(--t-xs); font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid transparent; }
.sev-CRITICAL { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.sev-WARNING { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.sev-INFO { background: var(--unk-bg); color: var(--unk-ink); border-color: var(--line); }
.tag { display: inline-block; font-size: var(--t-xs); font-weight: 500; padding: 0.05rem 0.4rem; border-radius: var(--r-sm); background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); }

/* ---------- overview: status line ---------- */
.verdict { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.25rem; }
.verdict h1 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 600; letter-spacing: -0.01em; }
.verdict.v-ok h1 { color: var(--ink); }
.verdict.v-bad h1 { color: var(--crit-ink); }
.verdict.v-warn h1 { color: var(--warn-ink); }
.verdict .why { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--t-sm); font-weight: 500; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.chip:hover { text-decoration: none; border-color: var(--ink-3); }
.verdict-side { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-size: var(--t-sm); color: var(--ink-2); }
.view-seg button { display: inline-flex; align-items: center; gap: 0.35rem; }
.view-seg svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.live-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 0.35rem; }
.live-stale .live-dot { background: var(--warn); }
.live-down .live-dot { background: var(--crit); }

.fleet { margin-bottom: 1.5rem; }
.fleet-bar { display: flex; gap: 2px; height: 0.5rem; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.fleet-bar span { display: block; height: 100%; }
.fleet-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin-top: 0.55rem; font-size: var(--t-sm); color: var(--ink-2); }
.fleet-legend b { color: var(--ink); font-weight: 600; margin-right: 0.15rem; }

/* ---------- the rack ---------- */
.rack {
  --ear: 1.6rem;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 var(--ear);
}
/* rack ears with mounting holes, one pair per unit */
/* a continuous rail of mounting holes, like a real rack, so rows of any height sit on it */
.rack::before, .rack::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: var(--ear);
  background:
    radial-gradient(circle at 50% 50%, var(--hole) 0 2.5px, transparent 3px) 0 0.55rem / 100% 1.45rem repeat-y,
    var(--rail);
}
.rack::before { left: 0; border-radius: var(--r-md) 0 0 var(--r-md); border-right: 1px solid var(--line); }
.rack::after { right: 0; border-radius: 0 var(--r-md) var(--r-md) 0; border-left: 1px solid var(--line); }
.rack-head, .unit {
  display: grid;
  grid-template-columns: 0.7rem minmax(7rem, 1.5fr) repeat(3, minmax(4.25rem, 1fr)) minmax(6rem, 1.25fr) minmax(4.5rem, 0.6fr);
  gap: 0.75rem 1rem; align-items: center;
  padding: 0 1rem;
}
.rack-head { min-height: 2.25rem; font-size: var(--t-xs); color: var(--ink-3); border-bottom: 1px solid var(--line); }
.rack-head > :last-child, .unit > :last-child { text-align: right; }
.unit {
  height: var(--unit-h, 4.25rem);
  border-bottom: 1px solid var(--line-2);
  color: var(--ink); text-decoration: none;
  font-family: var(--font-cond);
  cursor: pointer;
}
.unit:last-child { border-bottom: 0; }
a.unit:hover, .unit:hover, .unit.hot { background: var(--panel-2); text-decoration: none; }
.unit:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
.unit.open { background: var(--panel-2); border-bottom-color: transparent; }
.unit-seen { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; }
.chev { width: 0.45rem; height: 0.45rem; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-2px) rotate(45deg); flex: none; }
.unit.open .chev { transform: translateY(2px) rotate(225deg); }
@media (prefers-reduced-motion: no-preference) { .chev { transition: transform 0.15s; } }
.unit .led { width: 0.7rem; height: 1.35rem; border-radius: 2px; }
.unit.s-CRITICAL .led { box-shadow: 0 0 0 3px var(--crit-bg); }
@media (prefers-reduced-motion: no-preference) {
  .unit.s-CRITICAL .led { animation: blink 1.6s steps(2, jump-none) infinite; }
  @keyframes blink { 50% { opacity: 0.35; } }
}
.unit-name { min-width: 0; }
.unit-name strong { display: block; font-size: var(--t-lg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-name span { display: block; font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font); }
/* the "not reachable" chip sits after the name on the same line, not as a full-width bar */
.unit-name .quiet-tag { display: inline-flex; margin-left: 0.5rem; vertical-align: 0.15em; font-family: var(--font); }
.tile-why .quiet-tag { margin-left: 0; }
.unit-name .reach-down { display: inline-block; vertical-align: 0.15em; margin-left: 0.5rem; color: var(--crit-ink); font-weight: 600; overflow: visible; }
.meter { min-width: 0; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem; }
.meter-top small { font-size: var(--t-xs); color: var(--ink-3); font-family: var(--font); }
@media (min-width: 52.01rem) { .unit .meter-top small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .meter-top { justify-content: flex-end; } }
.meter-top b { font-size: var(--t-lg); font-weight: 600; }
.meter-top b.na { color: var(--ink-3); font-weight: 500; }
.meter-bar { position: relative; height: 5px; margin-top: 0.3rem; border-radius: 3px; background: var(--line-2); }
.meter-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink-3); }
.meter-bar i.m-WARNING { background: var(--warn); }
.meter-bar i.m-CRITICAL { background: var(--crit); }
.meter-bar u { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--ink-3); opacity: 0.45; text-decoration: none; }
.unit-spark svg { display: block; width: 100%; height: 2.25rem; overflow: visible; }
.unit-seen { font-size: var(--t-sm); font-family: var(--font); color: var(--ink-2); }
.unit-seen .late { color: var(--crit-ink); font-weight: 600; }
.rack-empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-2); }

/* ---------- overview: summary tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.kpi {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.1rem; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.7rem 0.9rem 0.75rem;
}
.kpi:hover { border-color: var(--ink-3); }
.kpi small { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; }
.kpi b { font-family: var(--font-cond); font-size: 1.75rem; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.kpi .kpi-sub { font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.lv-CRITICAL { box-shadow: inset 3px 0 0 var(--crit); }
.kpi.lv-CRITICAL b { color: var(--crit-ink); }
.kpi.lv-WARNING { box-shadow: inset 3px 0 0 var(--warn); }
.kpi.lv-WARNING b { color: var(--warn-ink); }
.kpi .fleet-bar { margin-top: 0.45rem; height: 0.35rem; }
.kpi[data-act="none"] { cursor: default; }
.kpi[data-act="none"]:hover { border-color: var(--line); }
.verdict .why button.chip { font: inherit; font-size: var(--t-sm); font-weight: 500; cursor: pointer; }

/* ---------- overview: list tools, sortable head, 24 h strip ---------- */
.rack-tools { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin-bottom: 0.65rem; }
.rack-tools .seg button span { color: var(--ink-3); font-weight: 600; margin-left: 0.15rem; }
.rack-tools .seg [aria-pressed="true"] span { color: inherit; opacity: 0.75; }
.rack-tools .input { width: auto; padding: 0.35rem 0.6rem; font-size: var(--t-sm); }
.rack-tools input.input { flex: 1 1 12rem; max-width: 20rem; }
.rack-count { margin-left: auto; font-size: var(--t-sm); color: var(--ink-3); }
.rack-head button { font: inherit; font-size: var(--t-xs); color: var(--ink-3); background: none; border: 0; padding: 0.2rem 0; cursor: pointer; text-align: left; justify-self: start; }
.rack-head button:hover, .rack-head button.on { color: var(--ink); }
.rack-head button[data-sort="cpu"], .rack-head button[data-sort="mem"], .rack-head button[data-sort="disk"], .rack-head button[data-sort="seen"] { justify-self: end; }
.rack-head button[data-dir="ascending"]::after { content: " ↑"; }
.rack-head button[data-dir="descending"]::after { content: " ↓"; }
/* can't reach the server: say so, and grey out what may be out of date */
.verdict.v-stale h1 { color: var(--ink-2); font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
#board.is-stale .kpis, #board.is-stale .rack, #board.is-stale .tile-grid, #board.is-stale #trends-panel { opacity: 0.5; }
.strip-key { margin-left: 0.4rem; white-space: nowrap; }
.strip-key i { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 1px; margin: 0 0.15rem 0 0.35rem; vertical-align: -1px; }
.strip { display: flex; gap: 1px; height: 1.4rem; align-items: stretch; }
.strip i { flex: 1; border-radius: 1px; }
.strip i, .strip-key i { background: color-mix(in srgb, var(--ok) 38%, var(--panel)); }
.strip i.b-WARNING, .strip-key i.b-WARNING { background: var(--warn); }
.strip i.b-CRITICAL, .strip-key i.b-CRITICAL { background: var(--crit); }
.strip i.b-NONE, .strip-key i.b-NONE { background: repeating-linear-gradient(135deg, var(--line) 0 2px, var(--line-2) 2px 4px); }
.strip i:hover { outline: 1.5px solid var(--ink); }
.unit.s-PAUSED .unit-strip { opacity: 0.45; }
.rack-hint { font-size: var(--t-xs); color: var(--ink-3); margin: 0.5rem 0 1.5rem; }
kbd { font-family: inherit; font-size: 0.85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 0.3rem; background: var(--panel); }

/* ---------- overview: a server opened in place ---------- */
.drawer {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.75rem;
  padding: 0.35rem 1.25rem 1.25rem 2.7rem; background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-family: var(--font);
}
.drawer h3 { font-size: var(--t-sm); font-weight: 600; margin-bottom: 0.5rem; }
.dr-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.4rem; }
.dr-head h3 { margin: 0; }
.drawer .chart { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.5rem 0.6rem 0.25rem; }
.chart-sm { min-height: 11rem; }
.drawer .chart + p { margin-top: 0.4rem; }
.dfacts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 0.9rem; margin: 0; font-size: var(--t-sm); }
.dfacts dt { color: var(--ink-3); }
.dfacts dd { margin: 0; overflow-wrap: anywhere; }
.dfacts + .dr-block { margin-top: 1rem; }
.logs-sys { margin-top: 0.5rem; }
/* ---- grouped tables (Users: Admins / Viewers) ---- */
.t-group-head th { padding: 0.9rem 0.75rem 0.45rem; background: var(--panel-2); border-bottom: 1px solid var(--line-2); text-align: left; font-weight: 400; }
.t-group + .t-group .t-group-head th { border-top: 1px solid var(--line-2); }
.t-group-name { font-family: var(--font-cond); font-weight: 700; font-size: var(--t-lg); letter-spacing: 0.01em; margin-right: 0.5rem; }
.t-group-n { display: inline-block; min-width: 1.5rem; padding: 0 0.45rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 600; text-align: center; vertical-align: 0.15em; }
.t-group-sub { margin-left: 0.75rem; color: var(--ink-3); font-size: var(--t-sm); }
.t tr.is-off td { color: var(--ink-3); }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); }
.t tr.is-off td b { font-weight: 500; }
/* ---- alert sound and popup controls (partials/sound_settings: the dialog and the user form) ---- */
.snd { display: grid; gap: 0.7rem; }
.snd-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; flex-wrap: wrap; padding: 0.6rem 0.8rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.snd-vol { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 11rem; max-width: 16rem; }
.snd-vol svg { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.snd-vol input[type="range"] { flex: 1 1 auto; min-width: 5rem; accent-color: var(--accent); margin: 0; }
.snd-vol output { min-width: 2.6rem; text-align: right; font-size: var(--t-sm); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.snd-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.45rem 0.7rem; align-items: center; padding: 0.15rem 0.1rem; }
.snd-grid label { font-size: var(--t-sm); font-weight: 500; white-space: nowrap; }
.snd-grid select.input { padding: 0.38rem 0.55rem; font-size: var(--t-sm); }
.snd-play { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; }
.snd-play svg { width: 1rem; height: 1rem; fill: currentColor; }
.snd-opts { display: grid; gap: 0.3rem; }
.snd.is-off .snd-grid, .snd.is-off .snd-opts > .sw:not(:last-child), .snd.is-off .snd-vol { opacity: 0.5; }
.snd-fieldset { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.8rem 0.9rem 0.9rem; margin: 0.2rem 0 1.2rem; }
.snd-fieldset > legend { padding: 0 0.3rem; }
.snd-fieldset .snd { max-width: 40rem; }
/* a switch: the native checkbox stays for keyboard and forms, the track is drawn */
.sw { position: relative; display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: var(--t-sm); line-height: 1.3; padding: 0.3rem 0.1rem; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sw-track { position: relative; flex: none; width: 2.15rem; height: 1.25rem; border-radius: 999px; background: var(--line); transition: background 0.15s; }
.sw-track::after { content: ""; position: absolute; top: 0.15rem; left: 0.15rem; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); transition: transform 0.15s; }
.sw input:checked + .sw-track { background: var(--accent); }
.sw input:checked + .sw-track::after { transform: translateX(0.9rem); }
.sw input:focus-visible + .sw-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.sw input:disabled + .sw-track { opacity: 0.45; }
.sw-text { display: flex; flex-direction: column; gap: 0.05rem; }
.sw-text small { color: var(--ink-3); font-size: var(--t-xs); }
.sw-main .sw-text b { font-size: var(--t-md); }
.sw-main .sw-state { font-weight: 600; color: var(--ink-2); }
dialog.modal.modal-snd { width: min(46rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); }
/* ---- which alerts reach me (partials/notify_settings) ---- */
.ntf { margin-top: 0.9rem; padding: 0.6rem 0.8rem 0.5rem; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.snd-fieldset .ntf { margin-top: 0; border: 0; padding: 0; }
.ntf-head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.ntf-title { font-weight: 600; font-size: var(--t-sm); }
.ntf-all { margin-left: auto; display: flex; gap: 0.35rem; align-items: baseline; }
.ntf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.ntf-item { padding: 0.25rem 0.1rem; }
.ntf-item .sw-text { font-size: var(--t-sm); }
.ntf-item .sw-text small { line-height: 1.25; }
.ntf-note { margin: 0.4rem 0 0; }
.modal-snd .ntf-item .sw-text small { display: none; }           /* the dialog stays short: names only, the meaning as a tooltip */
@media (max-width: 480px) { .ntf-grid { grid-template-columns: minmax(0, 1fr); } }
.modal-snd .modal-head { margin-bottom: 0.6rem; }
.snd-intro { margin: 0.15rem 0 0; }
.snd-foot { align-items: center; gap: 0.6rem 0.9rem; }
.snd-foot #snd-state { margin-right: auto; color: var(--ink-2); }
.logs-sys ul { margin: 0; padding-left: 1.1rem; }
.logs-sys-bad { color: var(--crit-ink); }
/* (scoped to .drawer so they win over the list styles defined further down) */
.drawer .disks li { padding: 0.45rem 0; }
.drawer .alist li { padding: 0.6rem 0; grid-template-columns: auto minmax(0, 1fr); }
.drawer .alist .acts { grid-column: 2; }
.drawer .alist .meta { grid-column: 2; }
.dr-actions { margin-top: 1rem; }

/* ---------- overview: bottom panels ---------- */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--gap); align-items: start; }
.trend-head { align-items: center; flex-wrap: wrap; }
.seg-sm button { padding: 0.2rem 0.6rem; font-size: var(--t-xs); }
.legend-btns { gap: 0.25rem 0.35rem; }
.legend-btns .lg { font: inherit; font-size: var(--t-xs); color: var(--ink-2); background: none; border: 1px solid transparent; border-radius: 999px; padding: 0.1rem 0.5rem; cursor: pointer; }
.legend-btns .lg:hover { border-color: var(--line); color: var(--ink); }
.legend-btns .lg.on { border-color: var(--ink-3); color: var(--ink); background: var(--panel-2); }
.linkish { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; }
.linkish:hover { text-decoration: underline; }
.feed { list-style: none; margin: 0; padding: 0.35rem 0; }
.feed li { display: grid; grid-template-columns: 2.6rem 0.6rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.4rem 1.15rem; font-size: var(--t-sm); }
.feed time { color: var(--ink-3); font-size: var(--t-xs); }
.feed .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--unk); align-self: center; }
.feed .dot.k-opened.sev-CRITICAL { background: var(--crit); }
.feed .dot.k-opened.sev-WARNING { background: var(--warn); }
.feed .dot.k-resolved { background: var(--ok); }
.feed .dot.k-acknowledged { background: transparent; box-shadow: inset 0 0 0 2px var(--unk); }
.tip-float { position: fixed; z-index: 50; }
.tip .status { font-size: var(--t-xs); }
@media (prefers-reduced-motion: no-preference) {
  .flash-panel { animation: flash-panel 1.2s ease-out; }
  @keyframes flash-panel { 0% { box-shadow: 0 0 0 3px var(--focus); } 100% { box-shadow: 0 0 0 3px transparent; } }
}

/* ---------- alerts list ---------- */
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.35rem 0.75rem; align-items: start; padding: 0.75rem 1.15rem; border-bottom: 1px solid var(--line-2); }
.alist li:last-child { border-bottom: 0; }
.alist .msg { font-size: var(--t-sm); }
.alist .meta { grid-column: 2 / 4; font-size: var(--t-xs); color: var(--ink-3); }
.alist .acts { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
.alist li.acked { opacity: 0.72; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
table.t th { text-align: left; font-weight: 500; font-size: var(--t-xs); color: var(--ink-3); padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; }
table.t tbody tr:hover { background: var(--panel-2); }
table.t a.row-link { color: var(--ink); font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; padding: 0.75rem 1.15rem; border-bottom: 1px solid var(--line-2); }
.toolbar .input { width: auto; min-width: 12rem; flex: 1 1 14rem; max-width: 22rem; padding: 0.35rem 0.6rem; font-size: var(--t-sm); }
.toolbar select.input { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: 0.55rem 0.85rem; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font-size: var(--t-xs); color: var(--ink-3); margin-left: 0.25rem; }

/* ---------- charts ---------- */
.chart { position: relative; min-height: 13rem; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tick { font-size: 11px; fill: var(--ink-3); font-family: var(--font); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .thr { stroke-width: 1; stroke-dasharray: 4 3; }
.chart .thr-warn { stroke: var(--warn); }
.chart .thr-crit { stroke: var(--crit); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-muted { stroke: var(--chart-muted); stroke-width: 1.25; }
.chart .end-label { font-size: 11px; font-weight: 600; font-family: var(--font); fill: var(--ink-2); }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.chart .chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: var(--t-sm); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; display: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 6px 18px rgb(15 23 31 / 0.14);
  padding: 0.4rem 0.6rem; font-size: var(--t-xs); white-space: nowrap;
}
.tip .tip-t { color: var(--ink-3); margin-bottom: 0.15rem; }
.tip .tip-r { display: flex; align-items: center; gap: 0.4rem; }
.tip .tip-r i { width: 0.55rem; height: 0.55rem; border-radius: 50%; display: inline-block; }
.tip .tip-r b { margin-left: auto; padding-left: 0.75rem; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: var(--t-xs); color: var(--ink-2); margin-top: 0.5rem; }
.legend i { display: inline-block; width: 0.75rem; height: 2px; vertical-align: middle; margin-right: 0.35rem; border-radius: 1px; }

/* ---------- node detail ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); margin-bottom: var(--gap); }
.facts > div { padding: 0.75rem 1rem; border-right: 1px solid var(--line-2); }
.facts > div:last-child { border-right: 0; }
.facts small { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.facts b { display: block; font-family: var(--font-cond); font-size: var(--t-xl); font-weight: 600; line-height: 1.15; margin-top: 0.1rem; }
.facts b.na { color: var(--ink-3); font-weight: 500; }
.facts .bar { height: 3px; border-radius: 2px; background: var(--line-2); margin-top: 0.4rem; position: relative; }
.facts .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--ink-3); }
.facts .bar i.m-WARNING { background: var(--warn); }
.facts .bar i.m-CRITICAL { background: var(--crit); }
.disks { list-style: none; margin: 0; padding: 0; }
.disks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1rem; padding: 0.6rem 1.15rem; border-bottom: 1px solid var(--line-2); font-size: var(--t-sm); }
.disks li:last-child { border-bottom: 0; }
.disks .bar { grid-column: 1 / 3; height: 5px; border-radius: 3px; background: var(--line-2); position: relative; }
.disks .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ink-3); }
.disks .bar i.m-WARNING { background: var(--warn); }
.disks .bar i.m-CRITICAL { background: var(--crit); }
.token-box { display: flex; gap: 0.5rem; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.5rem 0.65rem; }
.token-box code { flex: 1; overflow-wrap: anywhere; font-size: var(--t-sm); }
.callout { border: 1px solid color-mix(in srgb, var(--warn) 60%, var(--line)); background: var(--warn-bg); color: var(--ink); border-radius: var(--r-md); padding: 1rem 1.15rem; margin-bottom: var(--gap); }
.callout h2 { color: var(--warn-ink); margin-bottom: 0.35rem; }
.callout-paused { border-color: var(--line); background: var(--unk-bg); }
.callout-paused h2 { color: var(--ink); }
.callout-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pause-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.pause-form .field { margin: 0; }
/* Paused: a hollow light, greyed readings. */
.s-PAUSED .led, .led.s-PAUSED { background: transparent; box-shadow: inset 0 0 0 2px var(--unk); }
.s-PAUSED.status { color: var(--unk-ink); }
.unit.s-PAUSED .meter, .unit.s-PAUSED .unit-spark { opacity: 0.45; }
pre.cmd { margin: 0.4rem 0 0.9rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.65rem 0.75rem; overflow-x: auto; font-size: var(--t-xs); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
pre.cmd .copy { position: absolute; top: 0.4rem; right: 0.4rem; }
details.setup summary { cursor: pointer; font-weight: 500; padding: 0.85rem 1.15rem; list-style: none; display: flex; justify-content: space-between; }
details.setup summary::-webkit-details-marker { display: none; }
details.setup summary::after { content: "Show"; color: var(--accent); font-size: var(--t-sm); }
details.setup[open] summary::after { content: "Hide"; }
details.setup .body { padding: 0 1.15rem 1rem; }
.danger-zone { border-color: color-mix(in srgb, var(--crit) 35%, var(--line)); }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.signin .panel { width: min(100%, 24rem); padding: 1.75rem 1.75rem 1.5rem; }
.signin .brand { padding: 0 0 1.25rem; }
.signin h1 { margin-bottom: 0.25rem; }
.signin .sub { color: var(--ink-2); margin-bottom: 1.25rem; font-size: var(--t-sm); }
.signin .btn-primary { width: 100%; justify-content: center; padding: 0.6rem; font-size: var(--t-md); }
.signin { grid-template-rows: 1fr auto; }
.signin-foot { align-self: end; text-align: center; padding-top: 1.25rem; }
.signin-foot a { color: var(--ink-2); }
/* public privacy policy page */
.legal { max-width: 46rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 1.5rem) 2rem; }
.legal > .brand { display: inline-flex; margin-bottom: 1rem; padding: 0; }
.legal-body { padding: 1.5rem clamp(1rem, 4vw, 2rem); line-height: 1.6; }
.legal-body h1 { margin-bottom: 0.25rem; }
.legal-body h2 { font-size: var(--t-lg); margin: 1.5rem 0 0.4rem; }
.legal-body p, .legal-body li { font-size: var(--t-sm); color: var(--ink); }
.legal-body p { margin: 0.5rem 0; }
.legal-body ul { margin: 0.4rem 0; padding-left: 1.25rem; }
.legal-body li { margin: 0.3rem 0; }
.legal-foot { text-align: center; margin-top: 1rem; }
/* server form: alert hours */
.hours-range { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0 1.6rem; }
.hours-range .input { width: 8rem; }
.hours-range .hint { flex-basis: 100%; }
.hours-days { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.hours-days .label { margin: 0 0.4rem 0 0; }
.hours-days .hint { flex-basis: 100%; margin: 0.1rem 0 0; }
.hours-days .hint.is-error { color: var(--crit-ink); }
.day-check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--t-sm); padding: 0.35rem 0.6rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); cursor: pointer; min-height: 2.25rem; }
.day-check input { margin: 0; width: 1rem; height: 1rem; }
.day-check:has(input:checked) { border-color: var(--accent); background: var(--panel); }
/* outside a server's alert hours: no alerts or messages */
.quiet-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.05rem 0.5rem; white-space: nowrap; }

/* ---------- wallboard (light or dark, as chosen) ---------- */
:root.wall { --unit-h: 5.25rem; }
:root.wall .hide-on-wall, :root.wall .drawer { display: none !important; }
:root.wall .unit { cursor: default; }
:root.wall .unit.open { background: none; }
:root.wall .chev { display: none; }
:root.wall .kpi b { font-size: 2.2rem; }
:root.wall .main { padding: 1.5rem 2rem; max-width: none; }
:root.wall .unit-name strong { font-size: var(--t-xl); }
:root.wall .meter-top b { font-size: var(--t-xl); }
:root.wall .verdict h1 { font-size: 2rem; }
:root.wall .tile-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
:root.wall .tile strong { font-size: var(--t-xl); }
:root.wall .mini b { font-size: var(--t-lg); }

/* ---------- small screens ---------- */
@media (max-width: 64rem) {
  .rack-head, .unit { grid-template-columns: 0.7rem minmax(6.5rem, 1.4fr) repeat(3, minmax(4rem, 1fr)) minmax(3.75rem, 0.6fr); gap: 0.75rem; }
  .rack-head .col-spark, .unit-spark, .rack-head .col-strip, .unit-strip { display: none; }
  .drawer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-left: 1.25rem; }
  .drawer .dr-main { grid-column: 1 / 3; }
}
@media (max-width: 52rem) {
  .main { padding: 1rem 1rem 2.5rem; }
  .rack { --ear: 0.6rem; }
  .rack::before, .rack::after { background: var(--rail); }
  .rack-head { display: none; }
  .unit { height: auto; padding: 0.7rem 0.75rem; grid-template-columns: 0.6rem repeat(3, minmax(0, 1fr)); gap: 0.45rem 0.9rem; }
  .unit .led { height: 1rem; }
  .unit-name { grid-column: 2 / 4; }
  .unit-seen { grid-column: 4; grid-row: 1; }
  .unit .m-cpu { grid-column: 2; grid-row: 2; }
  .unit .m-mem { grid-column: 3; grid-row: 2; }
  .unit .m-disk { grid-column: 4; grid-row: 2; }
  .unit .unit-strip { display: block; grid-column: 2 / 5; grid-row: 3; }
  .unit .strip { height: 0.8rem; }
  .drawer { grid-template-columns: minmax(0, 1fr); padding: 0.5rem 0.9rem 1rem; }
  .drawer .dr-main { grid-column: auto; }
  .rack-tools .seg { flex: 1 1 100%; overflow-x: auto; }
  .rack-tools .seg button { white-space: nowrap; }
  .rack-count { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
  .kpi { padding: 0.5rem 0.65rem 0.55rem; }
  .kpi small { font-size: 0.6875rem; }
  .kpi b { font-size: 1.3rem; }
  .kpi .kpi-sub { font-size: var(--t-xs); }
  .kpi .fleet-bar { height: 0.25rem; margin-top: 0.3rem; }
  .brand { font-size: var(--t-md); }
  .menu { position: fixed; left: 0.5rem; right: 0.5rem; top: 3.5rem; min-width: 0; }
  .verdict { margin-bottom: 1rem; }
  .view-seg span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  dialog.modal { padding: 0.9rem 0.9rem 0.8rem; }
  .unit .meter-top { flex-direction: column; gap: 0; }
  .unit .meter-top b { font-size: var(--t-md); }
  .unit .meter-bar u { display: none; }
  .alist li { padding: 0.75rem 1rem; grid-template-columns: auto minmax(0, 1fr); }
  .alist .acts { grid-column: 2; grid-row: 3; }
  .alist .meta { grid-column: 2; }
  .verdict-side { width: 100%; justify-content: space-between; }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--line-2); }
}
@media print {
  .topbar, .btn, .verdict-side { display: none !important; }
  .shell { display: block; }
}

/* ---------- popups (server page) ---------- */
dialog.modal {
  width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.25rem 1rem;
  background: var(--panel); color: var(--ink); box-shadow: 0 18px 48px rgb(15 23 31 / 0.28);
}
dialog.modal-wide { width: min(46rem, calc(100vw - 2rem)); }
dialog.modal::backdrop { background: rgb(15 23 31 / 0.45); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.modal-head h2 { font-size: var(--t-lg); }
.modal-x { font: inherit; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0 0.25rem; }
.modal-x:hover { color: var(--ink); }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.modal-list { margin: 0.4rem 0 0.9rem; padding-left: 1.1rem; color: var(--ink-2); }
.modal-list li + li { margin-top: 0.25rem; }
dialog.modal p + p, dialog.modal p + .modal-list { margin-top: 0.5rem; }
dialog.modal .field { margin: 0.9rem 0 0; }
dialog.modal .flash { margin-bottom: 0.75rem; }
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: var(--t-sm); padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); cursor: pointer; }
.check input { margin-top: 0.2rem; flex: none; width: 1rem; height: 1rem; }
.node-actions { gap: 0.4rem; }
.flash .linkish { color: inherit; text-decoration: underline; font-weight: 600; }

.s-ARCHIVED .led, .led.s-ARCHIVED { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.s-ARCHIVED.status { color: var(--ink-3); }
tr.row-archived td { opacity: 0.6; }

.btn-danger-solid { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn-danger-solid:hover { background: var(--crit); filter: brightness(0.92); }

pre.cmd { padding-right: 4.75rem; }

/* ---------- alert sound ---------- */
.sound-toast {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 0.6rem; max-width: calc(100vw - 2rem);
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.6rem 0.75rem 0.6rem 1rem; box-shadow: 0 10px 30px rgb(15 23 31 / 0.22); font-size: var(--t-sm);
}
.sound-toast.urgent { border-color: var(--crit); box-shadow: 0 0 0 3px var(--crit-bg), 0 10px 30px rgb(15 23 31 / 0.22); }
.sound-toast[hidden] { display: none; }


/* ---------- overview: compact view (a tile per server) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 0.6rem; margin-bottom: 1.5rem; }
.tile-grid[hidden] { display: none; }
.tile-grid .rack-empty { grid-column: 1 / -1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.tile {
  display: flex; flex-direction: column; min-width: 0; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.6rem 0.75rem 0.65rem 0.85rem; box-shadow: inset 3px 0 0 var(--ok);
}
a.tile:hover { text-decoration: none; border-color: var(--ink-3); }
.tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.tile.s-WARNING { box-shadow: inset 3px 0 0 var(--warn); }
.tile.s-CRITICAL { box-shadow: inset 3px 0 0 var(--crit); background: color-mix(in srgb, var(--crit-bg) 45%, var(--panel)); }
.tile.s-UNKNOWN { box-shadow: inset 3px 0 0 var(--unk); }
.tile.s-PAUSED { box-shadow: inset 3px 0 0 var(--line); }
.tile.s-PAUSED .tile-meters { opacity: 0.45; }
.tile-head { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.tile-head .led { width: 0.6rem; height: 0.6rem; }
.tile strong { font-family: var(--font-cond); font-size: var(--t-lg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tile-age { margin-left: auto; font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; }
.tile.s-UNKNOWN .tile-age { color: var(--crit-ink); font-weight: 600; }
/* ping signal next to the "last report" age (overview list and compact tiles) */
.ping-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; display: inline-block; background: var(--unk); }
.ping-dot.is-ok { background: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg, transparent); }
.ping-dot.is-down { background: var(--crit); box-shadow: 0 0 0 2px var(--crit-bg); }
.ping-dot.is-stale { background: var(--unk); }
.tile-head .tile-age + .ping-dot { margin-left: -0.1rem; }
.tile-sub { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0.1rem 0 0.45rem; }
.tile-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: auto; }
.mini { min-width: 0; display: flex; flex-direction: column; }
.mini span { font-size: 0.6875rem; color: var(--ink-3); }
.mini b { font-family: var(--font-cond); font-size: var(--t-md); font-weight: 600; line-height: 1.2; }
.mini b.na { color: var(--ink-3); font-weight: 500; }
.mini b.m-WARNING { color: var(--warn-ink); }
.mini b.m-CRITICAL { color: var(--crit-ink); }
.mini i { display: block; position: relative; height: 4px; border-radius: 2px; background: var(--line-2); margin-top: 0.2rem; }
.mini u { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--ink-3); }
.mini u.m-WARNING { background: var(--warn); }
.mini u.m-CRITICAL { background: var(--crit); }

/* ---------- alerts popup ---------- */
dialog.modal-lg { width: min(60rem, calc(100vw - 2rem)); }
dialog.modal-lg .alist li, dialog.modal-lg .feed li { padding-left: 0.25rem; padding-right: 0.25rem; }
dialog.modal-lg [role="tabpanel"] { min-height: 12rem; max-height: min(60vh, 36rem); overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.tabs-btn { margin-bottom: 0.75rem; }
.tabs-btn button { font: inherit; font-weight: 500; padding: 0.55rem 0.85rem; color: var(--ink-2); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs-btn button:hover { color: var(--ink); }
.tabs-btn button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs-btn .count { font-size: var(--t-xs); color: var(--ink-3); margin-left: 0.25rem; }
@media (max-width: 52rem) {
  dialog.modal-lg { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); }
  .tabs-btn button { padding: 0.5rem 0.6rem; }
}

/* ---------- pick one (server type, provider) ---------- */
fieldset.pick-field { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset.pick-field legend { padding: 0; margin-bottom: 0.4rem; }
.pick { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pick label { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem 0.4rem 0.55rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.pick label:hover { border-color: var(--ink-3); }
.pick input { margin: 0; accent-color: var(--accent); }
.pick label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.pick label:has(input:disabled) { opacity: 0.45; cursor: default; }
.pick label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
@media (max-width: 52rem) {
  .sound-toast { left: 0.75rem; right: 0.75rem; transform: none; max-width: none; flex-wrap: wrap; }
  .sound-toast > span { flex: 1 1 12rem; }
  /* compact view on a phone: two tiles per row */
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .tile { padding: 0.5rem 0.55rem 0.55rem 0.7rem; }
  .tile strong { font-size: var(--t-md); }
  .tile-age { font-size: 0.6875rem; }
  .tile-meters { gap: 0.3rem; }
  .mini b { font-size: var(--t-sm); }
}

/* ---------- button group with icons (server page actions), same shape as the range filter ---------- */
.head-tools { align-items: center; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.btn-group > * + * { border-left: 1px solid var(--line); }
.btn-group form { display: flex; margin: 0; }
.btn-group a, .btn-group button {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-size: var(--t-sm); font-weight: 500; line-height: 1.2;
  padding: 0.35rem 0.8rem; border: 0; background: none; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-group a:hover, .btn-group button:hover { background: var(--panel-2); text-decoration: none; }
.btn-group svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-group .danger { color: var(--crit-ink); }
.btn-group .danger:hover { background: var(--crit-bg); }
.btn-group :focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
@media (max-width: 52rem) {
  .head-tools { width: 100%; justify-content: space-between; }
  .btn-group a, .btn-group button { padding: 0.45rem 0.65rem; }
  .btn-group span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .btn-group svg { width: 1.15rem; height: 1.15rem; }
}

/* ---------- user form: server access ---------- */
fieldset.access { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.85rem 1rem 0.9rem; margin: 0 0 1rem; background: var(--panel-2); min-width: 0; }
fieldset.access[hidden] { display: none; }
fieldset.access legend { padding: 0 0.3rem; margin-left: -0.3rem; }
.acc-group + .acc-group { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line-2); }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.45rem; font-size: var(--t-sm); }
.acc-all { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; cursor: pointer; }
.acc-all input, .pick-check input { accent-color: var(--accent); }
.pick-check label { padding: 0.3rem 0.65rem 0.3rem 0.5rem; font-size: var(--t-xs); }
.acc-find { margin-bottom: 0.45rem; width: 100% !important; max-width: 18rem; }
.acc-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.35rem; max-height: 16rem; overflow: auto; }
.acc-nodes label { display: flex; align-items: flex-start; gap: 0.45rem; padding: 0.4rem 0.55rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); font-size: var(--t-sm); cursor: pointer; min-width: 0; }
.acc-nodes label[hidden] { display: none; }
.acc-nodes label:has(input:checked:not(:disabled)) { border-color: var(--accent); }
.acc-nodes label:has(input:disabled) { cursor: default; }
.acc-nodes input { margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.acc-nodes span { min-width: 0; overflow-wrap: anywhere; }
.acc-nodes small { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.acc-nodes label.acc-out { opacity: 0.45; }
.acc-nodes label.acc-out b { text-decoration: line-through; }
.acc-sum { margin-top: 0.8rem; font-size: var(--t-sm); font-weight: 500; color: var(--ok-ink); }
.acc-sum.acc-none { color: var(--crit-ink); }

.tag-mine { margin-left: 0.4rem; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tag-warn { margin-left: 0.4rem; background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
a.tag { text-decoration: none; }
a.tag:hover { text-decoration: underline; }
/* Servers list, Agent column: version, then one short card per agent */
.agent-cell { white-space: nowrap; }
.agent-line { display: flex; align-items: center; gap: 0.35rem; min-height: 1.4rem; }
.agv { font-variant-numeric: tabular-nums; }
.agent-cards { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }
.agc { display: inline-block; font-size: var(--t-xs); font-weight: 600; line-height: 1.35; padding: 0.05rem 0.45rem; border-radius: var(--r-sm); border: 1px solid transparent; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
a.agc:hover { text-decoration: underline; }
.agc-on { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.agc-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.agc-crit { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.agd-up { font-size: var(--t-xs); font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); border-radius: var(--r-sm); padding: 0 0.3rem; white-space: nowrap; }
.agc-off { background: transparent; color: var(--ink-3); border: 1px dashed var(--line-2); font-weight: 500; }
.agc-old { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn); font-size: var(--t-sm); }
.agent-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 1.35rem; margin: 0.8rem 0 0.2rem; padding: 0.55rem 0.8rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); line-height: 1.4; }
.agl-title { font-weight: 600; color: var(--ink-2); margin-right: 0.2rem; }
.agl-item { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.agl-item .agc { margin: 0; }
.agl-item { white-space: normal; min-width: 0; }   /* the long "3 / 5 agents" note wraps on a phone */
.agl-item > .agc { flex: none; }
.agl-sub { color: var(--ink-3); }

/* ---------- icons in buttons ---------- */
.btn svg.ic, .linkish svg.ic { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm svg.ic { width: 0.95rem; height: 0.95rem; }

/* ---------- overview: an open server's right-hand column ---------- */
.dr-alerts-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.alert-count[disabled] { cursor: default; opacity: 1; color: var(--ink-3); background: var(--panel); }
.alert-count.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); color: var(--warn-ink); background: var(--warn-bg); }
.alert-count.is-crit { border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); color: var(--crit-ink); background: var(--crit-bg); }
.alert-count.is-warn:hover, .alert-count.is-crit:hover { filter: brightness(0.97); }
.dr-alerts .alist { margin: 0; }
.dr-alerts .alist li:last-child { border-bottom: 0; }
.more-alerts { margin-top: 0.15rem; padding-left: 0.4rem; }
.dfacts-2 { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--line-2); }
.dr-actions { flex-wrap: wrap; }
#dlg-node-alerts .alist { max-height: min(60vh, 32rem); overflow: auto; }

/* ---------- what is using a server (Advanced agent) ---------- */
.chip { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.4rem; padding: 0.05rem 0.4rem; border-radius: 999px; font-size: var(--t-xs); font-weight: 500; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); color: var(--warn-ink); }
.chip-crit { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); color: var(--crit-ink); }
.usage { margin-top: var(--gap); }
.usage-head { align-items: center; }
.usage-body { padding: 0.9rem 1.15rem 1.1rem; }
.usage-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem 2rem; }
.usage-h3 { font-size: var(--t-sm); font-weight: 600; margin: 0 0 0.5rem; }
.usage-col + .usage-col { border-left: 1px solid var(--line-2); padding-left: 2rem; }
.proc-list, .job-list { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.proc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.1rem 0.9rem; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px solid var(--line-2); font-size: var(--t-sm); }
.proc-list li:last-child { border-bottom: 0; }
.proc-name { min-width: 0; overflow-wrap: anywhere; }
.proc-user { font-size: var(--t-xs); }
.proc-val { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; min-width: 4.5rem; }
.proc-list .bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--line-2); position: relative; margin-top: 0.15rem; }
.proc-list .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--ink-3); }
.proc-list .bar i.m-WARNING { background: var(--warn); }
.proc-list .bar i.m-CRITICAL { background: var(--crit); }
.job-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.5rem; margin-bottom: 0.9rem; }
.job-kpi { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.45rem 0.65rem; background: var(--panel); }
.job-kpi b { display: block; font-family: var(--font-cond); font-size: var(--t-xl); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.job-kpi span { font-size: var(--t-xs); color: var(--ink-3); }
.job-kpi.is-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.job-kpi.is-warn b, .job-kpi.is-warn span { color: var(--warn-ink); }
.job-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.9rem; padding: 0.5rem 0.6rem; margin: 0 -0.6rem; border-bottom: 1px solid var(--line-2); font-size: var(--t-sm); border-radius: var(--r-sm); }
.job-list li:last-child { border-bottom: 0; }
.job-list li.is-warn { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
.job-meta { grid-column: 1 / -1; font-size: var(--t-xs); color: var(--ink-3); }
.job-all { margin-top: 0.6rem; }
.job-all summary { cursor: pointer; font-size: var(--t-sm); font-weight: 500; padding: 0.35rem 0; }
.job-all code { font-size: var(--t-xs); background: var(--panel-2); padding: 0.05rem 0.3rem; border-radius: 3px; overflow-wrap: anywhere; }
table.t-sm th, table.t-sm td { padding: 0.4rem 0.6rem; font-size: var(--t-xs); }
.usage-basic { display: flex; gap: 1rem; align-items: flex-start; }
.usage-basic p { margin: 0 0 0.5rem; font-size: var(--t-sm); max-width: 46rem; }
.ic-lg { width: 2.2rem; height: 2.2rem; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* PHP-FPM panel (PHP-FPM agent) */
.fpm .chart { min-height: 10.5rem; }
.fpm-kpis { grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr)); }
.job-kpi.is-crit { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.job-kpi.is-crit b, .job-kpi.is-crit span { color: var(--crit-ink); }
.fpm-hints { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.4rem; }
.fpm-hint { font-size: var(--t-sm); padding: 0.5rem 0.75rem; border-radius: var(--r-md); border: 1px solid var(--line); border-left-width: 3px; background: var(--panel); }
.fpm-hint.is-crit { border-left-color: var(--crit); background: var(--crit-bg); }
.fpm-hint.is-warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn-bg) 70%, var(--panel)); }
.fpm-hint.is-info { border-left-color: var(--ink-3); }
.fpm-hint code { font-size: var(--t-xs); background: var(--panel-2); padding: 0.05rem 0.3rem; border-radius: 3px; overflow-wrap: anywhere; }
.fpm-charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 2rem; margin: 0.4rem 0 1.1rem; }
.fpm-sub { margin-top: 1rem; }
/* endpoint name: controller (quiet) / method */
.ep { min-width: 0; overflow-wrap: break-word; font-weight: 400; }
.ep-c { color: var(--ink-3); }
.ep-s { color: var(--ink-3); padding: 0 0.15rem; }
.ep-m { color: var(--ink); }
.ep-site { display: inline-block; margin-right: 0.45rem; padding: 0 0.4rem; border-radius: 4px; background: var(--panel-2); color: var(--ink-2); font-size: var(--t-xs); }
/* "View": a row's requests, numbered, below it (admins) */
.fpm-name { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.fpm-view-btn { font: inherit; font-size: var(--t-xs); font-weight: 500; color: var(--accent, var(--ink-2)); background: none; border: 1px solid var(--line); border-radius: 4px; padding: 0 0.4rem; line-height: 1.5; cursor: pointer; }
.fpm-view-btn:hover { background: var(--panel-2); }
.fpm-view-btn[aria-expanded="true"] { background: var(--panel-2); color: var(--ink); }
.fpm-items { grid-column: 1 / -1; margin: 0.1rem 0 0; padding: 0.45rem 0.6rem 0.45rem 2rem; background: var(--panel-2); border-radius: 6px; font-size: var(--t-xs); }
.fpm-items li, .fpm-list .fpm-items li { display: list-item; padding: 0.15rem 0; border: 0; font-size: var(--t-xs); }
.fpm-items li::marker { color: var(--ink-3); }
.fpm-item-path { color: var(--ink); overflow-wrap: anywhere; }
.fpm-item-meta { color: var(--ink-3); margin-left: 0.6rem; white-space: nowrap; }
.fpm-eps tr.is-open td { border-bottom: 0; }
.fpm-eps tr.fpm-items-row td { padding-top: 0; }
/* a thin bar under or beside a row */
.fpm-meter { display: block; height: 4px; border-radius: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.fpm-meter i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--s1, var(--ink-3)); opacity: 0.75; }
.fpm-meter i.m-WARNING { background: var(--warn); opacity: 1; }
.fpm-meter i.m-CRITICAL { background: var(--crit); opacity: 1; }
.fpm-list { list-style: none; margin: 0 0 0.4rem; padding: 0; }
.fpm-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 1rem; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid var(--line-2); font-size: var(--t-sm); }
.fpm-list li:last-child { border-bottom: 0; }
.fpm-list .fpm-meter { grid-column: 1 / -1; }
.fpm-v { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.fpm-v.is-warn { color: var(--warn-ink); }
.fpm-v.is-crit { color: var(--crit-ink); }
.fpm-sub-line { grid-column: 1 / -1; font-size: var(--t-xs); color: var(--ink-3); margin-top: -0.15rem; }
.fpm-empty { padding: 0.5rem 0; }
.fpm-eps td { font-variant-numeric: tabular-nums; }
.fpm-eps td.num { color: var(--ink-2); }
.fpm-eps td.is-warn { color: var(--warn-ink); }
.fpm-eps td.is-crit { color: var(--crit-ink); }
.fpm-eps .share { width: 7.5rem; }
.fpm-eps td.share { white-space: nowrap; }
.fpm-eps td.share .share-v { margin-left: 0.4rem; }
.fpm-eps td.share .fpm-meter { display: inline-block; width: 4.25rem; vertical-align: middle; }
.share-v { display: inline-block; min-width: 2.4rem; text-align: right; font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fpm-set th { width: 45%; color: var(--ink-3); font-weight: 400; }
.fpm-set td { color: var(--ink); }
.set-v { font-variant-numeric: tabular-nums; }
.set-k { margin-left: 0.6rem; font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.72rem; color: var(--ink-3); }
.fpm .note.is-stale { color: var(--warn-ink); }
@media (max-width: 52rem) { .fpm-charts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) {   /* endpoints table: one block per endpoint, figures on a line under it */
  .fpm-eps thead { display: none; }
  .fpm-eps tr { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line-2); }
  .fpm-eps td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  .fpm-eps td:first-child { flex: 1 0 100%; }
  .fpm-eps td[data-label]::after { content: " " attr(data-label); color: var(--ink-3); font-weight: 400; }
  .fpm-eps td.share { flex: 1 0 100%; width: auto; }
  .fpm-eps td.share .fpm-meter { width: calc(100% - 3rem); }
  .set-k { display: block; margin: 0.1rem 0 0; }
}
/* tabs under the charts: What's using this server | PHP-FPM | Disks | Alerts */
.tabs-panel { margin-top: var(--gap); }
.tabbar { display: flex; gap: 0.15rem; padding: 0 0.6rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar [role=tab] { font: inherit; font-size: var(--t-sm); font-weight: 500; color: var(--ink-3); background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 0.85rem 0.7rem 0.75rem; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.45rem; border-radius: 0; }
.tabbar [role=tab]:hover { color: var(--ink); }
.tabbar [role=tab][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabbar [role=tab]:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.tabbar [role=tab][hidden] { display: none; }
.seg[hidden] { display: none; }
.fpm-eps td.num { white-space: nowrap; }
.tab-count { display: inline-block; font-size: var(--t-xs); font-weight: 600; min-width: 1.3rem; text-align: center; padding: 0 0.4rem; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); line-height: 1.25rem; font-variant-numeric: tabular-nums; }
.tab-count[hidden] { display: none; }
.tab-count.is-on { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tab-count.is-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.tab-count.is-crit { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.ping-dot[hidden] { display: none; }
.tab-meta { font-size: var(--t-xs); font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tab-meta.m-WARNING { color: var(--warn-ink); }
.tab-meta.m-CRITICAL { color: var(--crit-ink); }
.tab-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-3); }
.tab-dot.is-warn { background: var(--warn); }
.tab-dot.is-crit { background: var(--crit); }
.tabpane.usage { margin-top: 0; }
.tabpane > .usage-head { border-bottom: 0; padding-bottom: 0; min-height: 0; }
.usage-col .disks li { padding-left: 0; padding-right: 0; }
.usage-col .disks li:first-child { padding-top: 0.2rem; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; min-height: 1.9rem; }
.col-head .usage-h3 { margin: 0; }
/* cron tab: what runs now beside the full list */
.cron-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.25rem 2rem; align-items: start; }
.cron-grid > .job-all { margin-top: 0; }
.cron-delay { display: block; margin-top: 0.1rem; font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 52rem) { .cron-grid { grid-template-columns: minmax(0, 1fr); } }
/* disks: mount, then the percentage and size, then the bar */
.disk-name { overflow-wrap: anywhere; }
.disk-val { display: inline-flex; gap: 0.6rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.disk-pct { color: var(--ink); }
.disks li.lv-WARNING .disk-pct { color: var(--warn-ink); }
.disks li.lv-CRITICAL .disk-pct { color: var(--crit-ink); }
@media (max-width: 52rem) {
  .usage-grid { grid-template-columns: minmax(0, 1fr); }
  .usage-col + .usage-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 1rem; }
  .usage-body { padding: 0.8rem 0.9rem 1rem; }
}

/* overview panel: three short lines */
.dr-usage { margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--line-2); }
.dr-usage-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.3rem; }
.dr-usage-head h3 { margin: 0; }
.dr-usage-row { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0.6rem; font-size: var(--t-sm); padding: 0.15rem 0; }
.dr-usage-k { color: var(--ink-3); }
.dr-usage-v { overflow-wrap: anywhere; }
.dr-usage-v .chip { margin-left: 0.5rem; }
.dr-usage-v .sep { color: var(--ink-3); margin: 0 0.45rem; }
.dd-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.dr-usage-basic { margin-top: 0.75rem; }

/* agent setup: edition cards */
.edition-pick { border: 0; padding: 0; margin: 0 0 0.9rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0.6rem; }
.edition-pick legend { margin-bottom: 0.4rem; }
.ed-card { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); cursor: pointer; }
.ed-card input { margin-top: 0.25rem; accent-color: var(--accent); }
.ed-card > span { display: flex; flex-direction: column; gap: 0.2rem; }
.ed-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* ---------- overview tools in the top bar ---------- */
.topbar-live { display: inline-flex; align-items: center; font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; margin-right: 0.6rem; }
.topbar-live #live { display: inline-flex; align-items: center; }
.topbar-tools .view-seg { margin-right: 0.4rem; }
.topbar-tools .wall-btn { margin-right: 0.5rem; }
:root.wall .wall-btn { border-color: var(--accent); color: var(--accent); }
@media (max-width: 64rem) {
  .topbar-tools .wall-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .topbar-tools .wall-btn { padding-left: 0.55rem; padding-right: 0.55rem; }
}
@media (max-width: 52rem) {
  .topbar-live #live > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .topbar-live { margin-right: 0.25rem; }
  .topbar-tools .view-seg button { padding: 0.35rem 0.5rem; }
}
@media (max-width: 26rem) {
  .brand-name { display: none; }
}

/* ---------- add / edit user: details left, server access right ---------- */
/* three equal columns (like col-sm-4 each): the person and their access | alert sound and popup | which alerts reach them */
.user-form { max-width: 82rem; }
.user-form-wide { max-width: 90rem; }
.user-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.user-form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.75rem; }
.user-form-col { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.user-form-col .snd-fieldset { margin: 0; }
.user-form-col fieldset.access { margin-top: 0; }
.user-form-col .ntf-grid { grid-template-columns: minmax(0, 1fr); }
.user-form-3 .user-form-main .grid-2 { grid-template-columns: minmax(0, 1fr); }     /* name and email one under the other in the narrow column */
.user-form-side { display: grid; gap: 1rem; align-content: start; }   /* the alert-rule form's right column */
.user-form-side .snd-fieldset { margin: 0; }
.user-form-side fieldset.access { margin-top: 0; }
.access-admin { display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--panel-2); }
.access-admin[hidden] { display: none; }
.access-admin p { margin: 0.25rem 0 0; }
@media (max-width: 72rem) {                      /* user form, two columns: the alert kinds go under, across the width */
  .user-form-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-form-3 > .user-form-col:nth-child(3) { grid-column: 1 / -1; }
  .user-form-3 > .user-form-col:nth-child(3) .ntf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 60rem) {
  .user-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 44rem) {
  .user-form-3 { grid-template-columns: minmax(0, 1fr); }
  .user-form-3 > .user-form-col:nth-child(3) .ntf-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- add / edit rule page ---------- */
.rule-preview { margin: 0.25rem 0 0.9rem; padding: 0.7rem 0.85rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-2); font-size: var(--t-sm); font-weight: 500; }
.rule-preview:empty { display: none; }
.tile-ip { font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; margin: -0.35rem 0 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- agent setup: settings panel ---------- */
dialog#dlg-agent { width: min(64rem, calc(100vw - 2rem)); }
.agent-opts { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); margin: 0 0 0.9rem; }
.agent-opts summary { cursor: pointer; padding: 0.6rem 0.8rem; font-weight: 500; font-size: var(--t-sm); display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; list-style: none; }
.agent-opts summary::-webkit-details-marker { display: none; }
.agent-opts summary::before { content: "▸"; color: var(--ink-3); transition: transform 0.15s; }
.agent-opts[open] summary::before { transform: rotate(90deg); }
.agent-opts-body { padding: 0.15rem 0.8rem 0.8rem; }
.agent-opts fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* left: Report every + what it collects; right: limits */
.ao-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 0 1.5rem; align-items: start; }
.ao-grid:not(:has(> .ao-limits:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.ao-left .field { margin-bottom: 0.9rem; }
.agent-opts .ao-collect { gap: 0.4rem; }
.agent-opts .ao-collect .check { background: var(--panel); padding: 0.45rem 0.6rem; }
.agent-opts .ao-collect .ao-sub { margin-left: 1.5rem; font-size: var(--t-xs); }
.agent-opts .ao-collect .is-off { opacity: 0.5; cursor: not-allowed; }
.agent-opts .ao-limits { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.agent-opts .ao-limits legend { float: left; width: 100%; margin-bottom: 0.55rem; font-weight: 500; font-size: var(--t-sm); }
.agent-opts .ao-limits .grid-2 { clear: both; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.agent-opts .ao-limits .field { margin-bottom: 0.8rem; }
.agent-opts #ao-cost { margin: 0.2rem 0 0.5rem; }
.agent-opts [hidden] { display: none !important; }
@media (max-width: 52rem) {
  .ao-grid { grid-template-columns: minmax(0, 1fr); }
  .agent-opts .ao-limits { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 0.5rem; }
}
@media (max-width: 30rem) { .agent-opts .ao-limits .grid-2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .agent-opts summary::before { transition: none; } }

/* ---------- new-alert popup (overview and wallboard) ---------- */
dialog.alert-pop { width: min(44rem, calc(100vw - 2rem)); padding: 0; overflow: hidden; border-width: 0; }
dialog.alert-pop::backdrop { background: rgb(15 23 31 / 0.6); }
.ap-band { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem; background: var(--unk); color: #fff; }
.ap-band.sev-critical { background: var(--crit); color: #fff; }
.ap-band.sev-warning { background: var(--warn); color: #2b1d00; }
.ap-band.sev-info { background: var(--accent); color: var(--accent-ink); }
.ap-band.sev-ok { background: var(--ok); color: #fff; }
.ap-sev { font-family: var(--font-cond); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; }
.ap-band.sev-critical .ap-sev::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.45em; border-radius: 50%; background: currentColor; vertical-align: 0.12em; animation: ap-pulse 1.2s ease-in-out infinite; }
@keyframes ap-pulse { 50% { opacity: 0.25; } }
.ap-count { margin-left: auto; font-weight: 600; font-size: var(--t-md); opacity: 0.95; }
.ap-x { color: inherit; opacity: 0.85; font-size: 1.8rem; }
.ap-x:hover { color: inherit; opacity: 1; }
.ap-count:empty + .ap-x { margin-left: auto; }
.ap-timer { height: 4px; background: var(--line-2); overflow: hidden; }
.ap-timer i { display: block; height: 100%; width: 100%; background: var(--ink-3); transform-origin: left center; animation: ap-timer 5s linear forwards; }
.ap-timer.is-paused i { animation-play-state: paused; }
.ap-timer.is-off { visibility: hidden; }
@keyframes ap-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .ap-timer i { animation: none; } }
.ap-body { padding: 1.1rem 1.25rem 0.4rem; }
.ap-kicker { color: var(--ink-3); font-size: var(--t-sm); margin: 0; }
.ap-server { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.15; margin: 0.1rem 0 0.15rem; overflow-wrap: anywhere; }
.ap-addr { color: var(--ink-2); font-size: var(--t-md); margin: 0 0 0.8rem; overflow-wrap: anywhere; }
.ap-addr:empty { display: none; }
.ap-msg { font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.4; font-weight: 500; margin: 0 0 0.7rem; overflow-wrap: anywhere; }
.ap-when { color: var(--ink-2); font-size: var(--t-md); margin: 0 0 0.6rem; }
.ap-note { font-size: var(--t-md); padding: 0.5rem 0.7rem; border-radius: var(--r-md); background: var(--panel-2); margin: 0 0 0.6rem; }
.ap-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1.25rem 1.1rem; }
.ap-spacer { flex: 1; }
.ap-foot [hidden] { display: none !important; }
.ap-foot .btn { font-size: var(--t-md); padding: 0.55rem 1.1rem; }
.ap-foot #ap-ok { min-width: 6.5rem; font-weight: 600; }
#ap-resolve.is-armed { background: var(--crit); border-color: var(--crit); color: #fff; }
/* the wallboard is read from across the room */
.wall dialog.alert-pop { width: min(60rem, calc(100vw - 3rem)); }
.wall .ap-sev { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.wall .ap-server { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
.wall .ap-msg { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.wall .ap-addr, .wall .ap-when, .wall .ap-note { font-size: clamp(1.05rem, 1.7vw, 1.35rem); }
.wall .ap-foot .btn { font-size: 1.15rem; padding: 0.7rem 1.4rem; }
@media (max-width: 30rem) { .ap-foot .ap-spacer { flex-basis: 100%; height: 0; } .ap-foot #ap-ok, .ap-foot #ap-resolve { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .ap-band.sev-critical .ap-sev::before { animation: none; } }

/* ---------- server page: compact header (server on the left, readings on the right) ---------- */
.node-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem 1.25rem; align-items: stretch; margin-bottom: var(--gap); }
.node-info { display: flex; flex-direction: column; justify-content: center; gap: 0.45rem; min-width: 0; }
.node-title { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.2; margin: 0; }
.node-meta { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); color: var(--ink-2); row-gap: 0.15rem; }
/* each item carries its | on the left; the one starting a line is clipped away */
.node-meta { margin-left: -1.2rem; clip-path: inset(0 0 0 1.2rem); }
.node-meta li { position: relative; white-space: nowrap; margin-left: 1.2rem; }
.node-meta li::before { content: "|"; position: absolute; left: -0.75rem; color: var(--ink-3); opacity: 0.7; }
.node-info .head-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-start; margin-top: 0.15rem; }
.node-top .facts { margin-bottom: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.node-top .facts > div { display: flex; flex-direction: column; justify-content: center; padding: 0.65rem 0.9rem; }
.node-top .facts .fact-note { margin-top: 0.35rem; color: var(--ink-3); }
@media (min-width: 72rem) {
  .node-top { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}
@media (max-width: 40rem) {
  .node-top .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .node-top .facts > div:nth-child(odd) { border-right: 1px solid var(--line-2); }
  .node-top .facts > div:nth-last-child(-n+2) { border-bottom: 0; }
  .node-meta li { white-space: normal; }
}

/* a reading above its limit, as a chip (overview list and tiles) */
.vchip { display: inline-block; width: max-content; padding: 0 0.4rem; border-radius: 999px; border: 1px solid; font-weight: 700; }
.vchip.chip-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.vchip.chip-crit { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.mini b.vchip { margin-left: -0.4rem; }
.tile-why { margin: -0.2rem 0 0.45rem; min-width: 0; }
.tile-why .chip { margin-left: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* server page actions: the same look as the 1 h / 6 h / 24 h / 7 d buttons */
.node-actions.btn-group { gap: 0; }
.node-actions.btn-group > * + * { border-left: 1px solid var(--line); }
.node-actions.btn-group a, .node-actions.btn-group button { gap: 0.35rem; padding: 0.35rem 0.75rem; color: var(--ink-2); font-weight: 500; }
.node-actions.btn-group .danger { color: var(--crit-ink); }
.node-actions.btn-group svg { width: 0.95rem; height: 0.95rem; }
.node-title .node-seen { display: inline-flex; flex-wrap: wrap; align-items: center; }
.node-title .node-seen > span + span::before, .node-title .node-seen::before { content: "|"; margin: 0 0.5rem; opacity: 0.7; }
.node-title .node-seen { margin-left: -0.6rem; }
.node-title .node-seen { font-size: var(--t-sm); font-weight: 400; color: var(--ink-3); }

/* compact tiles: last 24 hours as a thin strip at the bottom */
.tile-strip { margin-top: 0.5rem; }
.tile-strip .strip { height: 0.45rem; gap: 1px; }
.tile-strip .strip i { border-radius: 0; }
.tile-strip .strip i:hover { outline-width: 1px; }
:root.wall .tile-strip .strip { height: 0.6rem; }

/* ---------- server page: chart cards carry the reading (name + value, bar, chart) ---------- */
.node-top-1 { grid-template-columns: minmax(0, 1fr) !important; }
/* name, status and details on the left; buttons and range on the right */
/* one line: name, status | up | last report | type | provider | OS | address; actions and range on the right */
.node-top-1 .node-info { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }
.node-top-1 .node-title { flex: 1 1 32rem; min-width: 0; }
.node-top-1 .head-tools { flex: 0 0 auto; justify-content: flex-end; margin: 0 0 0 auto; flex-wrap: wrap; }
.node-top-1 .node-seen { row-gap: 0.15rem; }
.node-top-1 .node-seen > span { white-space: nowrap; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* four in a row on laptops too (a 13-15" MacBook is about 1280-1512 px wide); 2 x 2 on tablets */
@media (max-width: 62rem) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62.01rem) and (max-width: 100rem) {
  .cols-4 { gap: 0.75rem; }
  .cols-4 .mcard-head { padding: 0.7rem 0.85rem 0.35rem; }
  .cols-4 .mcard-head b { font-size: 1.35rem; }
  .cols-4 .mcard > .bar { margin-left: 0.85rem; margin-right: 0.85rem; }
  .cols-4 .mcard-foot { padding-left: 0.85rem; padding-right: 0.85rem; }
  .cols-4 .mcard > .panel-pad { padding-left: 0.6rem; padding-right: 0.7rem; }
}
@media (max-width: 44rem) { .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.mcard-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.15rem 0.6rem; padding: 0.8rem 1.1rem 0.45rem; }
.mcard-head h2 { font-size: var(--t-md); margin: 0; }
.mcard-head b { font-family: var(--font-cond); font-size: 1.6rem; font-weight: 600; line-height: 1; }
.mcard-head b.na { color: var(--ink-3); font-weight: 500; }
.mcard-head b.v-hi { color: var(--crit-ink); font-weight: 700; }
.mcard-sub { font-size: var(--t-xs); color: var(--ink-3); }
.mcard-head .note { margin-left: auto; font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; }
.mcard > .bar { height: 4px; margin: 0 1.1rem 0.6rem; border-radius: 2px; background: var(--line-2); position: relative; }
.mcard > .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--ink-3); }
.mcard > .bar i.m-WARNING { background: var(--warn); }
.mcard > .bar i.m-CRITICAL { background: var(--crit); }
.mcard > .bar-none { background: none; }
.mcard > .panel-pad { border-top: 1px solid var(--line-2); padding-top: 0.6rem; }
.mcard-head b.vchip { font-size: 1.35rem; padding: 0.05rem 0.5rem; line-height: 1.2; }
/* header details: a | between items, never at the start of a wrapped line */
.node-top-1 .node-title .node-seen { margin-left: -0.55rem; clip-path: inset(0 0 0 1.3rem); padding-left: 0.55rem; }
.node-top-1 .node-title .node-seen::before { content: none; }
.node-top-1 .node-title .node-seen > span { position: relative; margin-left: 1.2rem; }
.node-top-1 .node-title .node-seen > span::before { content: "|"; position: absolute; left: -0.75rem; margin: 0; opacity: 0.7; }
/* card: name left, value right; bar; then small grey details (used of total, limits) */
.mcard-head { flex-wrap: nowrap; justify-content: space-between; align-items: center; padding-bottom: 0.4rem; }
.mcard-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard > .bar { margin-bottom: 0.35rem; }
.mcard > .bar-none { height: 0; margin-bottom: 0; }
.mcard-foot { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0 1.1rem 0.55rem; font-size: var(--t-xs); color: var(--ink-3); }
.mcard-foot .note { margin-left: auto; text-align: right; }

/* critical: a blinking light in the compact view too (as in the list), and a
   red-tinted row in the list (as in the compact view) */
.tile.s-CRITICAL .led { box-shadow: 0 0 0 3px var(--crit-bg); }
@media (prefers-reduced-motion: no-preference) {
  .tile.s-CRITICAL .led { animation: blink 1.6s steps(2, jump-none) infinite; }
}
.unit.s-CRITICAL { background: color-mix(in srgb, var(--crit-bg) 45%, var(--panel)); box-shadow: inset 3px 0 0 var(--crit); }
.unit.s-CRITICAL:hover, .unit.s-CRITICAL.hot, .unit.s-CRITICAL.open { background: color-mix(in srgb, var(--crit-bg) 75%, var(--panel)); }

/* overview top: what needs attention (40%) beside the summary tiles (60%) */
@media (min-width: 72rem) {
  .board-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.25rem; align-items: stretch; margin-bottom: 1.25rem; }
  .board-top .verdict, .board-top .kpis { margin-bottom: 0; }
  .board-top .verdict { align-content: center; }
  .board-top .kpi { padding: 0.6rem 0.8rem 0.65rem; }
  .board-top .kpi b { font-size: 1.5rem; }
}

/* alert message: first line, then what was using the server as small rows */
.am-first { display: block; }
.am-ctx { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); gap: 0.05rem 0.9rem; margin-top: 0.35rem; font-size: var(--t-sm); color: var(--ink-2); }
.am-h { grid-column: 1 / -1; font-size: var(--t-xs); color: var(--ink-3); text-transform: none; }
.am-row { display: contents; }
.am-row b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.am-row .am-d { color: var(--ink-3); }
.alert-pop .am-ctx { font-size: 1rem; margin-top: 0.6rem; }
:root.wall .alert-pop .am-ctx { font-size: 1.25rem; }
.am-ctx { grid-template-columns: fit-content(60%) max-content minmax(0, 1fr); }
.am-ctx.am-long { grid-template-columns: max-content minmax(0, 1fr); }
.am-ctx.am-long .am-row b { grid-column: 1 / -1; font-family: var(--font-mono, ui-monospace, monospace); font-weight: 500; font-size: 0.95em; }
.am-ctx.am-long .am-row .am-d { padding-bottom: 0.2rem; }
.am-row .am-d { white-space: nowrap; }

/* servers list: critical rows red-tinted, warning rows amber-tinted (as on the overview) */
table.t tbody tr.row-crit { background: color-mix(in srgb, var(--crit-bg) 55%, var(--panel)); }
table.t tbody tr.row-crit td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
table.t tbody tr.row-warn { background: color-mix(in srgb, var(--warn-bg) 55%, var(--panel)); }
table.t tbody tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.t tbody tr.row-crit:hover { background: color-mix(in srgb, var(--crit-bg) 85%, var(--panel)); }
table.t tbody tr.row-warn:hover { background: color-mix(in srgb, var(--warn-bg) 85%, var(--panel)); }

/* alerts window (bell): 80 % of the screen; the list fills it */
dialog#dlg-alerts { width: 80vw; max-width: 80vw; height: 80vh; max-height: 80vh; }
dialog#dlg-alerts[open] { display: flex; flex-direction: column; }
dialog#dlg-alerts [role="tabpanel"]:not([hidden]) { flex: 1 1 auto; min-height: 0; max-height: none; }
@media (max-width: 52rem) { dialog#dlg-alerts { width: calc(100vw - 1rem); max-width: none; height: calc(100vh - 1rem); max-height: none; } }

/* last 24 hours: time, a chip for what happened, server and message */
.feed-v2 li { grid-template-columns: 4.2rem 6.6rem minmax(0, 1fr); gap: 0.9rem; align-items: start; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-2); }
.feed-v2 li:last-child { border-bottom: 0; }
.feed-v2 time { display: flex; flex-direction: column; line-height: 1.25; }
.feed-v2 time b { color: var(--ink); font-weight: 600; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.feed-v2 time small { color: var(--ink-3); font-size: var(--t-xs); }
.feed-v2 .sev { min-width: 0; width: 100%; }
.feed-v2 .feed-top { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; align-items: baseline; }
.feed-v2 .feed-top .linkish, .feed-v2 .feed-top a { font-weight: 600; }
.feed-v2 .meta { font-size: var(--t-xs); color: var(--ink-3); margin-top: 0.2rem; }
.feed-v2 li.k-resolved .feed-top > span, .feed-v2 li.k-acknowledged .feed-top > span { color: var(--ink-2); }
.sev-OK { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.sev-ACK { background: var(--panel-2); color: var(--ink-2); border-color: var(--line); }
@media (max-width: 40rem) { .feed-v2 li { grid-template-columns: 3.4rem minmax(0, 1fr); } .feed-v2 .sev { grid-column: 2; width: max-content; } .feed-v2 .feed-msg { grid-column: 2; } }
.am-first { display: inline; }
.alist .msg .linkish, .alist .msg > a { font-weight: 600; margin-right: 0.35rem; }
.chart-key { margin: 0.5rem 0 var(--gap); }

/* several open alerts of one server: one entry with each alert under it */
.alist > li.al-group { grid-template-columns: auto minmax(0, 1fr); }
.al-group > .al-sub { grid-column: 1 / -1; list-style: none; margin: 0.35rem 0 0; padding: 0 0 0 0.9rem; border-left: 2px solid var(--line); }
.al-sub > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: start; padding: 0.55rem 0; border-bottom: 1px solid var(--line-2); }
.al-sub > li:last-child { border-bottom: 0; padding-bottom: 0; }
.al-sub > li .meta { grid-column: 2 / -1; }
.al-sub > li.acked { opacity: 0.75; }
table.t tr.grp-first td { border-top: 1px solid var(--line); }
table.t tr.grp td { border-bottom-color: transparent; }
table.t td.grp-server { vertical-align: top; border-right: 1px solid var(--line-2); }
/* server form: health limits, a small grid (metric | warning | critical) */
.limits-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 7.5rem) minmax(0, 7.5rem); gap: 0.4rem 0.75rem; align-items: center; }
.limits-grid[hidden] { display: none; }
.limits-grid .lim-label { font-size: var(--t-sm); color: var(--ink); margin: 0; }
.limits-grid .lim-in { position: relative; display: block; }
.limits-grid .lim-in .input { width: 100%; padding-right: 1.6rem; font-variant-numeric: tabular-nums; }
.limits-grid .lim-unit { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: var(--t-sm); pointer-events: none; }
.limits-grid .lim-in .input::placeholder { color: var(--ink-3); opacity: 0.7; }
.rules-own { margin: 0.75rem 1rem 0.25rem; }
/* server add / edit: three equal columns (the server · health limits · alert hours and reachability),
   like Edit user; two on a laptop (the third under both), one on a phone */
.node-form { max-width: 90rem; }
.node-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.node-form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.75rem; }
.node-form-col { min-width: 0; }
.node-form-side, .node-form-when { display: grid; gap: 1rem; align-content: start; }
.node-form-col fieldset.access { margin-top: 0; }
@media (max-width: 72rem) {
  .node-form-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .node-form-3 > .node-form-when { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
  .node-form-grid, .node-form-3 { grid-template-columns: minmax(0, 1fr); }
  .node-form-3 > .node-form-when { grid-template-columns: minmax(0, 1fr); }
}
/* Agent setup > Log agent: its settings under the install steps */
.ag-logset { margin: 0.4rem 0 1rem 2.4rem; }
.ag-logset fieldset.access { margin: 0; }
.ag-logset [data-logset-out].is-ok { color: var(--ok-ink); }
.ag-logset [data-logset-out].is-err { color: var(--crit-ink); }
@media (max-width: 640px) { .ag-logset { margin-left: 0; } }
.ag-logset.ag-logset-after { margin: 1rem 0 0.4rem 2.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .ag-logset.ag-logset-after { margin-left: 0; } }
.cron-charts { margin: 0.75rem 0 0.25rem; }
/* agent setup: the separate agents (PHP-FPM, cron), each with its own Settings and command */
.agent-extra { border-top: 1px solid var(--line-2); margin-top: 1rem; padding-top: 0.85rem; }
.agent-extra-h { font-size: var(--t-md); font-weight: 600; margin: 0 0 0.5rem; }
.agent-extra-h .faint { font-weight: 400; margin-left: 0.35rem; }

/* ---------- Agent setup popup: one tab per agent, numbered steps ---------- */
dialog.agent-dlg { width: min(60rem, calc(100vw - 2rem)); padding-bottom: 0.6rem; }
.agent-dlg .modal-head { align-items: flex-start; }
.agent-dlg .ag-intro { margin: 0.2rem 0 0; }
.ag-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.6rem; margin: 0.9rem 0 1rem; }
.ag-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; text-align: left; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; }
.ag-tab:hover { border-color: var(--ink-3); }
.ag-tab[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--panel-2); }
.ag-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ag-tab-top { display: flex; align-items: flex-start; gap: 0.45rem; width: 100%; }
.ag-tab-top .ag-dot { margin-top: 0.45rem; }
/* installed version at the far right of the card; a newer one blinks under it */
.ag-tab-ver { margin-left: auto; padding-left: 0.5rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; font-size: var(--t-xs); font-weight: 500; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.5; }
.ag-tab-new { font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); border-radius: var(--r-sm); padding: 0 0.3rem; animation: ag-blink 1.4s ease-in-out infinite; }
@keyframes ag-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .ag-tab-new { animation: none; } }
.ag-tab-top b { font-weight: 600; font-size: var(--t-md); }
.ag-tab-what { font-size: var(--t-xs); color: var(--ink-3); }
.ag-tab-state { font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); }
.ag-tab-state.is-ok { color: var(--ok-ink, var(--ink-2)); }
.ag-tab-state.is-late { color: var(--warn-ink); }
.ag-tab-state.is-off { color: var(--ink-3); }
.ag-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line); flex: none; }
.ag-dot.is-ok { background: var(--ok); }
.ag-dot.is-late { background: var(--warn); }
.ag-dot.is-off { background: transparent; border: 1.5px solid var(--ink-3); }
.ag-pane[hidden] { display: none; }
.ag-lead { margin: 0 0 0.9rem; font-size: var(--t-sm); color: var(--ink-2); }
.ag-steps { list-style: none; counter-reset: agstep; margin: 0; padding: 0; }
.ag-steps > li { counter-increment: agstep; position: relative; padding: 0 0 1.1rem 2.4rem; }
.ag-steps > li::before { content: counter(agstep); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: var(--t-sm); font-weight: 600; display: grid; place-items: center; }
.ag-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 0.79rem; top: 1.9rem; bottom: 0.3rem; width: 1px; background: var(--line); }
.ag-h { font-size: var(--t-md); font-weight: 600; margin: 0.1rem 0 0.55rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; }
.ag-sum { font-weight: 400; }
.agent-dlg .edition-pick { margin-bottom: 0; }
.agent-opts.ag-box { margin: 0; }
.agent-opts.ag-box .agent-opts-body { padding: 0.8rem 0.9rem 0.6rem; }
.ag-box-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; border-top: 1px solid var(--line-2); margin-top: 0.2rem; padding-top: 0.5rem; }
.ag-box-foot #ao-cost { margin: 0; flex: 1 1 18rem; }
.ag-files { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0 0 0.5rem; }
.ag-files code { padding: 0.15rem 0.5rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: var(--t-xs); }
.ag-cmd { margin: 0 0 0.4rem; }
.ag-more { border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 0 0.8rem 2.4rem; }
.ag-more summary { cursor: pointer; padding: 0.55rem 0.8rem; font-size: var(--t-sm); font-weight: 500; }
.ag-cmds { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0.45rem 1rem; margin: 0; padding: 0.2rem 0.8rem 0.75rem; font-size: var(--t-sm); }
.ag-cmds dt { color: var(--ink-3); }
.ag-cmds dd { margin: 0; overflow-wrap: anywhere; }
.ag-cmds .cmd-line { display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; vertical-align: middle; }
.ag-cmds .cmd-line code { min-width: 0; overflow-wrap: anywhere; }
.ag-cmds .cmd-copy { flex: none; padding: 0.05rem 0.5rem; font-size: var(--t-xs); line-height: 1.5; }
.ag-facts { margin: 0 0 0.4rem 2.4rem; }
.ag-foot { border-top: 1px solid var(--line-2); padding-top: 0.7rem; }
.ag-spacer { flex: 1; }
@media (max-width: 40rem) {
  /* tabs stay side by side on a phone: just the name and its state */
  .ag-tabs { gap: 0.4rem; }
  .ag-tab { padding: 0.5rem 0.55rem; }
  .ag-tab-top b { font-size: var(--t-sm); }
  .ag-tab-what { display: none; }
  .ag-steps > li { padding-left: 2rem; }
  .ag-more, .ag-facts { margin-left: 0; }
  .ag-cmds { grid-template-columns: minmax(0, 1fr); }
  .ag-cmds dt { margin-top: 0.3rem; }
}
.agent-opts .ao-limits > .field { clear: both; }
/* Agent setup: 85% of the screen; the agents down the left, the chosen one on the right
   (its own scroll); on a phone the tabs go back across the top */
dialog.agent-dlg { width: 85vw; height: 85vh; max-width: none; max-height: none; padding-bottom: 0.6rem; }
dialog.agent-dlg[open] { display: flex; flex-direction: column; overflow: hidden; }
.agent-dlg .modal-head, .agent-dlg .ag-foot { flex: none; }
.ag-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr); gap: 0 1.5rem; margin-top: 0.4rem; }
.ag-layout .ag-tabs { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.5rem; margin: 0; padding: 0.15rem 1.25rem 0.5rem 0.15rem; border-right: 1px solid var(--line-2); overflow: auto; }
.ag-layout .ag-tab { padding: 0.75rem 0.85rem; position: relative; }
.ag-layout .ag-tab[aria-selected="true"]::before { content: ""; position: absolute; left: -1px; top: 0.6rem; bottom: 0.6rem; width: 3px; border-radius: 3px; background: var(--accent); }
.ag-panes { min-height: 0; overflow: auto; padding: 0.15rem 0.5rem 0.5rem 0.15rem; }
.agent-dlg .ag-foot { margin-top: 0.6rem; }
@media (max-width: 52rem) {
  dialog.agent-dlg { width: calc(100vw - 1rem); height: calc(100vh - 1rem); padding: 0.9rem 0.85rem 0.6rem; }
  .ag-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0.8rem 0; }
  .ag-layout .ag-tabs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; border-right: 0; padding: 0.15rem; overflow: visible; }
  .ag-layout .ag-tab[aria-selected="true"]::before { display: none; }
}
/* server page: does it answer the monitor (ping / port / web address) */
.reach-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--t-xs); font-weight: 500; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; vertical-align: middle; margin-left: 0.35rem; }
.reach-chip[hidden] { display: none; }
.reach-chip .led { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-3); }
.reach-chip.is-ok .led { background: var(--ok); }
.reach-chip.is-down { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.reach-chip.is-down .led { background: var(--crit); animation: blink 1.2s steps(2, start) infinite; }
.reach-chip:hover { border-color: var(--ink-3); }
.vchip-down { color: var(--crit-ink); font-weight: 600; }

/* ---- Logs tab (log agent) ------------------------------------------------------------------ */
.logs .usage-body { display: grid; gap: 0.8rem; }
.logs-off { margin: 0; }
.logs-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.5rem; }
.la-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.15rem 0.5rem; text-align: left; padding: 0.55rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; min-height: 3.6rem; }
.la-card b { font-weight: 600; font-size: var(--t-sm); line-height: 1.2; }
.la-card .small { grid-column: 2; color: var(--ink-3); }
.la-card:hover { border-color: var(--ink-3); }
.la-card.is-on { outline: 2px solid var(--accent); outline-offset: -1px; }
.la-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--ok); }
.la-card.is-warning .la-dot { background: var(--warn); }
.la-card.is-critical { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); background: var(--crit-bg); }
.la-card.is-critical .la-dot { background: var(--crit); }
.la-card.is-critical .small { color: var(--crit-ink); }
.la-card.is-off .la-dot, .la-card.is-unknown .la-dot { background: var(--unk); }
.la-card.is-off { opacity: 0.75; }
.logs-h { font-size: var(--t-md); margin: 0.2rem 0 0; }
.logs-listhead { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.lsev { display: inline-block; min-width: 4.2rem; text-align: center; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: var(--t-xs); font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); }
.lsev-crit { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.lsev-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.logs-list, .logs-inc { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.logs-list > li, .logs-inc > li { border-top: 1px solid var(--line-2); }
.logs-list > li:first-child, .logs-inc > li:first-child { border-top: 0; }
.logs-inc > li { padding: 0.6rem 0.75rem; }
.logs-inc p { margin: 0.3rem 0 0; }
.lf-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lf-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  padding: 0.5rem 0.75rem; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.lf-toggle:hover { background: var(--panel-2); }
.lf.is-open > .lf-toggle { background: var(--panel-2); }
.lf-text { display: grid; gap: 0.1rem; min-width: 0; }
.lf-title { overflow-wrap: anywhere; }
.lf-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf.is-closed .lf-title { color: var(--ink-3); }
.lf-meta { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.lf-state { display: inline-block; padding: 0 0.45rem; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; line-height: 1.5; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.lf-state.is-new { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lf-state.is-resolved { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.lf-state.is-unknown { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.lf-mark { font-size: var(--t-xs); color: var(--ink-3); }
.lf-bell { width: 0.95rem; height: 0.95rem; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.lf-mark.is-seen { color: var(--ok-ink); font-weight: 600; }
.lf-caret { width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); margin: 0 0.3rem 0.2rem 0; transition: transform 0.15s; }
.lf.is-open .lf-caret { transform: rotate(-135deg); margin-bottom: -0.2rem; }
.lf-body { padding: 0.2rem 0.75rem 0.8rem 5.6rem; display: grid; gap: 0.6rem; }
/* the headline, the toolbar, the severity chips, the activity strip, the empty state */
.logs-lead { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; flex-wrap: wrap; padding: 0.7rem 0.9rem; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--panel-2); border-left: 4px solid var(--ok); }
.logs-lead.is-warn { border-left-color: var(--warn); }
.logs-lead.is-crit { border-left-color: var(--crit); background: var(--crit-bg); }
.logs-lead-main { display: grid; gap: 0.1rem; }
.logs-lead-n { font-family: var(--font-cond); font-size: var(--t-lg); font-weight: 700; }
.logs-lead.is-crit .logs-lead-sub { color: var(--crit-ink); }
.logs-lead-when { color: var(--ink-3); display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.logs-tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.logs-search { width: 14rem; max-width: 100%; padding: 0.3rem 0.55rem; font: inherit; font-size: var(--t-sm); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); }
.logs-search:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.logs-sevs { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: -0.3rem; }
.logs-sev { cursor: pointer; font: inherit; font-size: var(--t-xs); font-weight: 600; min-width: 0; padding: 0.15rem 0.6rem; }
.logs-sev.is-off { background: transparent; color: var(--ink-3); border-style: dashed; text-decoration: line-through; }
.logs-expand { margin-left: auto; }
.logs-none { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.8rem 0.9rem; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--ink-2); font-size: var(--t-sm); }
.logs-none.is-ok { border-style: solid; border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: var(--ok-bg); color: var(--ok-ink); }
.logs-none-ico { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--panel); border: 1px solid currentColor; font-weight: 700; }
.logs-act { display: grid; gap: 0.25rem; padding: 0.55rem 0.75rem 0.45rem; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.logs-act-head { display: flex; justify-content: space-between; gap: 0.6rem; color: var(--ink-2); }
.logs-act-leg i, .logs-act-bar i { display: inline-block; }
.logs-act-leg i { width: 0.7rem; height: 0.7rem; border-radius: 2px; vertical-align: -0.05em; margin-left: 0.4rem; }
.logs-act-leg i.is-crit, .logs-act-bar i.is-crit { background: var(--crit); }
.logs-act-leg i.is-warn, .logs-act-bar i.is-warn { background: var(--warn); }
.logs-act-bars { display: flex; align-items: flex-end; gap: 2px; height: 2.6rem; }
.logs-act-bar { position: relative; flex: 1 1 0; min-width: 2px; height: 100%; background: var(--panel-2); border-radius: 2px 2px 0 0; }
.logs-act-bar.is-none { background: repeating-linear-gradient(135deg, var(--panel-2) 0 3px, transparent 3px 6px); }
.logs-act-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px 2px 0 0; min-height: 0; }
.logs-act-bar:hover { outline: 1px solid var(--ink-3); }
.logs-act-foot { display: flex; justify-content: space-between; }
.logs-moreblk { display: grid; gap: 0.35rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.logs-moreblk .logs-h { margin: 0 0 0.2rem; }
.logs-moreblk .logs-more summary { padding: 0.2rem 0; }
.lf-facts ul { margin: 0; padding-left: 1.1rem; }
/* Logs tab, 29 Oct 2026: a headline in words, three buckets (needs action / check soon / for information)
   grouped by topic, rows that say where and from which log, and the list of logs read */
.logs-lead-parts { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: var(--t-sm); }
.ld-n b { font-family: var(--font-cond); font-size: var(--t-lg); margin-right: 0.15rem; }
.ld-n.is-crit b { color: var(--crit-ink); }
.ld-n.is-warn b { color: var(--warn-ink); }
.ld-n.is-info b { color: var(--ink-2); }
.logs-tools { justify-content: space-between; align-items: flex-start; }
.logs-tools-r { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.logs-topics { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
.logs-topic { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; font: inherit; font-size: var(--t-xs); font-weight: 600; padding: 0.2rem 0.65rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); }
.logs-topic:hover { border-color: var(--ink-3); color: var(--ink); }
.logs-topic.is-on { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.logs-topic-n { font-variant-numeric: tabular-nums; opacity: 0.75; }
.lb { display: grid; gap: 0.55rem; padding: 0.7rem 0.8rem 0.8rem; border: 1px solid var(--line-2); border-left: 4px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.lb-crit { border-left-color: var(--crit); }
.lb-warn { border-left-color: var(--warn); }
.lb-info { border-left-color: var(--ink-3); }
.lb-ok { border-left-color: var(--ok); }
.lb-head { display: flex; align-items: baseline; gap: 0.3rem 0.6rem; flex-wrap: wrap; }
.lb-title { margin: 0; font-size: var(--t-md); }
.lb-count { font-family: var(--font-cond); font-weight: 700; font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.lb-crit .lb-count { color: var(--crit-ink); }
.lb-warn .lb-count { color: var(--warn-ink); }
.lb-sub { flex: 1 1 14rem; }
.lb-fold { margin-left: auto; }
.lg { display: grid; gap: 0.3rem; }
.lg-title { margin: 0.2rem 0 0; font-family: var(--font-cond); font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.lb .logs-list { border-color: var(--line-2); }
.lf-where { color: var(--ink-2); overflow-wrap: anywhere; }
.lf-from { display: flex; flex-wrap: wrap; gap: 0 0.9rem; overflow-wrap: anywhere; }
.lf-text { gap: 0.15rem; }
.lf-title { font-weight: 500; }
.lf-dobox { display: grid; gap: 0.15rem; padding: 0.55rem 0.7rem; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.lf-dobox b { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.lf-evblk { display: grid; gap: 0.25rem; }
.lf-rule { margin: 0; }
.logs-incblk { display: grid; gap: 0.4rem; }
.logs-srcblk { padding: 0.6rem 0.8rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel); scroll-margin-top: 4rem; }
.logs-srcblk > summary { cursor: pointer; }
.logs-srcblk[open] > summary { margin-bottom: 0.5rem; }
.logs-srcblk > p { margin: 0 0 0.5rem; }
.lsrc-wrap { border: 1px solid var(--line-2); border-radius: var(--r-sm); margin-bottom: 0.6rem; }
.lsrc td { vertical-align: top; }
.lsrc td:first-child code { overflow-wrap: anywhere; font-size: var(--t-xs); }
.lsrc tr.is-bad td { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
.lsrc-st { display: inline-block; padding: 0 0.45rem; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; }
.lsrc-st.is-ok { background: var(--ok-bg); color: var(--ok-ink); }
.lsrc-st.is-bad { background: var(--warn-bg); color: var(--warn-ink); }
.lsrc-st.is-none { background: var(--panel-2); color: var(--ink-3); }
@media (max-width: 640px) {
  .lf-body { padding-left: 0.75rem; }
  .logs-tools-r { width: 100%; }
  .lb { padding: 0.6rem 0.55rem 0.65rem; }
  .lf-toggle { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.25rem; padding-left: 0.6rem; padding-right: 0.6rem; }
  .lf-toggle > .lsev { grid-column: 1; grid-row: 1; justify-self: start; min-width: 0; }
  .lf-toggle > .lf-text { grid-column: 1; grid-row: 2; }
  .lf-toggle > .lf-meta { grid-column: 2; grid-row: 1; }
  .lf-toggle > .lf-caret { grid-column: 2; grid-row: 2; justify-self: end; }
}
.lf-ev { margin: 0; padding: 0.5rem 0.6rem; background: var(--panel-2); border-radius: var(--r-sm); font-size: var(--t-xs); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14rem; overflow: auto; }
.lf-do { margin: 0; }
.lf-body .btn { justify-self: start; }
.logs-more summary { cursor: pointer; font-size: var(--t-sm); color: var(--ink-2); }
.logs-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.8rem; margin-top: 0.6rem; }
.logs-res h4 { margin: 0 0 0.3rem; font-size: var(--t-sm); }
.logs-top { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.logs-top li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.4rem; padding: 0.15rem 0; border-bottom: 1px dashed var(--line-2); }
.logs-gaps { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.logs-empty { text-align: left; display: grid; gap: 0.6rem; justify-items: start; }
.log-groups { display: grid; gap: 0.25rem; }
@media (max-width: 640px) {
  .lf-toggle { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lf-meta { grid-column: 2; flex-wrap: wrap; white-space: normal; }
  .lf-caret { grid-column: 3; grid-row: 1; }
  .lf-body { padding-left: 0.75rem; }
  .logs-search { width: 100%; }
  .logs-act-bars { height: 2rem; }
}

/* ---- Config Audit / Peak Audit tabs (App\Libraries\Audits; im.js ".tabpane.audit") ---- */
.lsev-info { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.lsev-low { color: var(--ink-3); }
.audit .usage-body { display: block; min-width: 0; }
.audit .usage-body > * + * { margin-top: 0.9rem; }
.audit .usage-body > * { max-width: 100%; min-width: 0; }
.audit-flash { margin-bottom: 0; }
.audit-current { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.75rem 0.9rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.audit-current p { margin: 0.25rem 0 0; }
.audit-current .spin { width: 1.1rem; height: 1.1rem; flex: none; margin-top: 0.15rem; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: audit-spin 0.9s linear infinite; }
@keyframes audit-spin { to { transform: rotate(360deg); } }
.audit-last { display: flex; justify-content: space-between; gap: 0.8rem; align-items: flex-start; flex-wrap: wrap; }
.audit-last h3 { margin: 0; }
.audit-last p { margin: 0.2rem 0 0; }
.audit-err { margin: 0; color: var(--warn-ink); }
.audit-find { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); font-size: var(--t-sm); }
.audit-find li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: baseline; padding: 0.45rem 0.75rem; border-top: 1px solid var(--line-2); }
.audit-find li:first-child { border-top: 0; }
.audit-find li.is-new { background: color-mix(in srgb, var(--crit-bg) 55%, var(--panel)); }
.audit-find.is-fixed .audit-find-text { color: var(--ink-3); }
.audit-find-text { overflow-wrap: anywhere; }
.audit-dl { grid-template-columns: minmax(10rem, auto) minmax(0, 1fr); margin-top: 0.5rem; }
.audit-sum summary, .audit-hist summary, .audit-sec summary { cursor: pointer; font-size: var(--t-sm); color: var(--ink-2); }
.audit-sec { border-top: 1px solid var(--line-2); padding: 0.35rem 0; }
.audit-sec summary { font-weight: 600; color: var(--ink); }
.audit-pre { margin: 0.4rem 0 0; padding: 0.6rem 0.75rem; background: var(--panel-2); border-radius: var(--r-sm); font-size: var(--t-xs); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 32rem; }
.audit-report.is-nowrap .audit-pre { white-space: pre; overflow-wrap: normal; }
.audit-report { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.6rem 0.75rem; overflow: hidden; }
.audit-rep-tools { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.4rem; }
.audit-rep-tools .btn[aria-pressed="true"] { background: var(--accent-bg, var(--panel-2)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.audit-hist tr.is-shown td { background: var(--panel-2); }
.audit-hist .linkish.muted { color: var(--ink-3); }
/* the strip of counts, filters and the grouped findings */
.audit-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 14rem)); gap: 0.5rem; }
.audit-tools { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; margin-top: 0.5rem !important; }
.audit-tools .logs-sevs { margin-top: 0; }
.audit-tools .logs-search { margin-left: auto; }
.job-kpi.is-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.job-kpi.is-ok b, .job-kpi.is-ok span { color: var(--ok-ink); }
.audit-tools .logs-sev.is-on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.audit-tools .logs-sev.lsev-crit.is-on { background: var(--crit); color: #fff; border-color: var(--crit); }
.audit-group { margin-top: 0.7rem !important; }
.audit-group-h { margin: 0 0 0.35rem; font-family: var(--font-cond); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-2); }
.audit-group-h .faint { font-weight: 500; letter-spacing: 0; }
.audit-find li { line-height: 1.45; }
.audit-find-text b { font-weight: 600; }
.audit-find-rest { color: var(--ink-2); }
.audit-find li.is-new .audit-find-text b { color: var(--crit-ink); }
.audit-find .lsev { align-self: start; margin-top: 0.1rem; white-space: nowrap; }
/* the key values, in cards per part of the server */
.audit-sum summary { font-weight: 600; color: var(--ink); }
.audit-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.audit-vcard { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.55rem 0.75rem; background: var(--panel); min-width: 0; }
.audit-vcard .audit-group-h { margin-bottom: 0.3rem; }
.audit-vdl { display: grid; grid-template-columns: fit-content(60%) minmax(0, 1fr); gap: 0.2rem 0.8rem; margin: 0; font-size: var(--t-sm); }
.audit-vdl dt { color: var(--ink-3); overflow-wrap: anywhere; }
.audit-vdl dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.audit-vdl dt.is-long { grid-column: 1 / -1; margin-top: 0.15rem; }
.audit-vdl dd.is-long { grid-column: 1 / -1; padding: 0 0 0.2rem 0.75rem; border-left: 2px solid var(--line-2); color: var(--ink-2); }
.audit-vdl dd.is-changed { color: var(--warn-ink); font-weight: 600; }
.audit-vdl dd.is-changed::after { content: " changed"; font-size: var(--t-xs); font-weight: 500; color: var(--warn-ink); opacity: 0.8; white-space: nowrap; }
/* the full report: section chips, then one block per section */
.audit-nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; padding: 0.4rem 0 0.55rem; border-bottom: 1px solid var(--line-2); }
.audit-nav-b { cursor: pointer; font: inherit; font-size: var(--t-xs); font-weight: 600; padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--ink-2); }
.audit-nav-b:hover { color: var(--ink); border-color: var(--ink-3); }
.audit-nav-sp { flex: 1 1 auto; }
.audit-sec summary { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; padding: 0.3rem 0; }
.audit-sec-name { font-family: var(--font-cond); letter-spacing: 0.02em; text-transform: uppercase; }
.audit-sec-n { margin-left: auto; font-weight: 500; }
.audit-sec[open] > summary { color: var(--accent); }
@media (max-width: 640px) {
  .audit-find li { grid-template-columns: auto minmax(0, 1fr); }
  .audit-find-meta { grid-column: 2; }
  .audit-vals { grid-template-columns: 1fr; }
  .audit-tools .logs-search { width: 100%; }
}
/* Agent setup > Main agent: how every agent of the server delivers */
.ag-deliv { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.ag-deliv li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; border-bottom: 1px dashed var(--line-2); padding-bottom: 0.25rem; }
/* Logs tab: the same kind of problem in one row (× count), its places listed inside */
.lf-count { display: inline-block; margin-left: 0.35rem; padding: 0 0.45rem; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; line-height: 1.6;
  background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); vertical-align: 0.1em; white-space: nowrap; }
.lf-places > summary { cursor: pointer; padding: 0.2rem 0; }
.lf-items { list-style: none; margin: 0.35rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 32rem; overflow: auto; }
.lf-items > li + li { border-top: 1px solid var(--line-2); }
.lf-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0.65rem; cursor: pointer; font-size: var(--t-sm); list-style: none; }
.lf-item > summary::-webkit-details-marker { display: none; }
.lf-item > summary::before { content: "▸"; color: var(--ink-3); flex: none; }
.lf-item[open] > summary::before { content: "▾"; }
.lf-item > summary:hover, .lf-item[open] > summary { background: var(--panel-2); }
.lf-item-where { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lf-item.is-closed .lf-item-where { color: var(--ink-3); }
.lf-item-meta { display: flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.lf-item-body { display: grid; gap: 0.5rem; padding: 0.4rem 0.75rem 0.7rem 1.9rem; }
.lf-item-body .lf-ev { margin: 0; }
@media (max-width: 640px) {
  .lf-item > summary { flex-wrap: wrap; }
  .lf-item-meta { width: 100%; justify-content: flex-end; }
  .lf-item-body { padding-left: 0.75rem; }
}
/* Config / Peak Audit: "Changed since the previous run" grouped (System, PHP-FPM, Database…) */
.audit-chg-tools { margin: -0.3rem 0 0.35rem; text-align: right; }
.audit-chg .audit-chg-head td { padding: 0; background: var(--panel-2); }
.audit-chg-g { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.45rem 0.65rem; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; flex-wrap: wrap; }
.audit-chg-g:hover { background: var(--line-2); }
.audit-chg-caret { color: var(--ink-3); width: 0.8rem; }
.audit-chg-names { flex: 1 1 16rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-chg-grp.is-open .audit-chg-key { padding-left: 1.9rem; }
.audit-chg-grp + .audit-chg-grp .audit-chg-head td { border-top: 1px solid var(--line); }
/* server list: "3 / 5 agents", a click lists every agent (set up or not) */
.agd { margin-top: 0.25rem; position: relative; }
.agd > summary { list-style: none; cursor: pointer; display: inline-block; }
.agd > summary::-webkit-details-marker { display: none; }
.agd > summary::after { content: " ▸"; font-weight: 400; }
.agd[open] > summary::after { content: " ▾"; }
/* a dropdown over the table (the script places it on the screen, so the table's scroll box does not cut it) */
.agd-list { list-style: none; margin: 0; padding: 0.45rem 0.6rem; display: grid; gap: 0.25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel);
  font-size: var(--t-xs); white-space: normal; width: max-content; min-width: 15rem; max-width: min(22rem, calc(100vw - 1rem));
  position: absolute; top: calc(100% + 0.3rem); left: 0; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); }
.agd-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.4rem; align-items: baseline; }
.agd-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); grid-row: 1 / span 2; align-self: center; }
.agd-warn .agd-dot { background: var(--warn); }
.agd-off .agd-dot { background: transparent; border: 1px dashed var(--ink-3); }
.agd-name { font-weight: 600; color: var(--ink); }
.agd-off .agd-name, .agd-off .agd-name a { color: var(--ink-3); font-weight: 500; }
.agd-what { color: var(--ink-2); }
.agd-warn .agd-what { color: var(--warn-ink); }
.agd-off .agd-what { color: var(--ink-3); }
/* server list: the IP in bold, the host name under it */
.addr-cell .addr-ip { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* alerts popup: "Since …" on the right of the text (not a second line), then the buttons;
   the same kind of alert of one server in one row ("… inside the web root × 15"), opened to list them */
.alist-inline li, .alist-inline .al-sub > li { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; }
.alist-inline .meta, .alist-inline .al-sub > li .meta { grid-column: auto; white-space: nowrap; text-align: right; }
.alist-inline .sev { justify-self: start; }
.alist-inline > li.al-group { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.alist-inline .al-sub > li { padding-left: 0.35rem; padding-right: 0.35rem; }
.alist-inline .al-sub > li.al-kind-items { display: block; padding: 0 0 0.35rem 1.25rem; border-bottom: 1px solid var(--line-2); }
.al-kind-list { list-style: none; margin: 0; padding: 0 0 0 0.75rem; border-left: 2px solid var(--line); }
.alist .msg .al-kind-t { font-weight: 500; color: var(--ink); text-decoration: none; text-align: left; }
.alist .msg .al-kind-t:hover .am-first { text-decoration: underline; }
.al-kind-t .lf-count { margin-left: 0.15rem; }
.al-caret { color: var(--ink-3); }
.alist-inline .al-kind.is-open { background: var(--panel-2); border-bottom-color: transparent; }
@media (max-width: 760px) {
  .alist-inline li, .alist-inline .al-sub > li { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .alist-inline .meta, .alist-inline .al-sub > li .meta { grid-column: 2; text-align: left; white-space: normal; }
  .alist-inline .acts { grid-column: 2; }
  .alist-inline .al-sub > li.al-kind-items { padding-left: 0.4rem; }
}
.alist-inline .msg { overflow-wrap: anywhere; min-width: 0; }

/* Server Info (agents/server-info.sh) */
.lsev-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.si-chip { min-width: 0; margin-left: 0.3rem; white-space: nowrap; }
.si-tabs { margin: 0.4rem 0 0.8rem; }
.si-t td { vertical-align: top; }
.si-t tr.si-hot > td { background: color-mix(in srgb, var(--crit-bg) 55%, transparent); }
.si-t tr.si-new > td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.si-t tr.si-detail > td { background: var(--panel-2); padding: 0.6rem 0.8rem 0.9rem; }
.si-path { font-size: var(--t-xs); overflow-wrap: anywhere; }
.si-cmd { font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--t-xs); overflow-wrap: anywhere; white-space: pre-wrap; }
.si-list { margin: 0.2rem 0 0.6rem; padding-left: 1.1rem; font-size: var(--t-sm); }
.si-list li { margin: 0.15rem 0; }
.si-hist { max-height: 22rem; overflow: auto; }
.si-kv { grid-template-columns: max-content minmax(0, 1fr); margin-bottom: 0.6rem; }
.si-run { border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-bg); border-radius: var(--r-md); padding: 0.55rem 0.75rem; margin-bottom: 0.7rem; }
.si-run ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.si-run li { margin: 0.25rem 0; }
.si-run .si-chip { margin-left: 0; }
.si-acks { margin: 0.2rem 0 0.5rem; }
.si-more { margin: 0.3rem 0 0.9rem; }
.si-more > summary { cursor: pointer; font-size: var(--t-sm); color: var(--ink-2); }
.si-bad { color: var(--crit-ink); }
.si-sites td:nth-child(5) { min-width: 11rem; }
.si-tabs .logs-sev.is-on, .si-filter .logs-sev.is-on { background: var(--ink); color: var(--panel); border-color: var(--ink); }

/* ---- Server Info (item 102): sections, overview with grouped findings, lists with filters, details dialog ---- */
.si-nav { display: flex; flex-wrap: wrap; gap: 0.15rem; border-bottom: 1px solid var(--line); margin: 0.2rem 0 1rem; }
.si-nav button { font: inherit; font-size: var(--t-md); font-weight: 500; color: var(--ink-2); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0.6rem 0.75rem; min-height: 2.75rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.si-nav button:hover { color: var(--ink); }
.si-nav button.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.si-nav button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.si-nav-n { font-size: var(--t-xs); font-weight: 600; padding: 0 0.45rem; border-radius: 999px; line-height: 1.6; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.si-nav-n.is-crit { background: var(--crit-bg); color: var(--crit-ink); border-color: transparent; }
.si-nav-n.is-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.si-verdict { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; padding: 0.9rem 1.1rem; border-radius: var(--r-md); border: 1px solid var(--line); margin-bottom: 1rem; }
.si-verdict > div:first-child { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.si-verdict > div:first-child b { font-family: var(--font-cond); font-size: var(--t-lg); font-weight: 600; }
.si-verdict.is-crit { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); }
.si-verdict.is-crit > div:first-child b { color: var(--crit-ink); }
.si-verdict.is-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.si-verdict.is-warn > div:first-child b { color: var(--warn-ink); }
.si-verdict.is-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.si-verdict-n { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: var(--t-sm); }
.si-verdict-n b { font-family: var(--font-cond); font-size: var(--t-lg); margin-right: 0.15rem; }
.si-verdict-n b.is-crit { color: var(--crit-ink); } .si-verdict-n b.is-warn { color: var(--warn-ink); }
.si-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.si-card { font: inherit; text-align: left; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.85rem 0.95rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.si-card:hover { border-color: var(--accent); }
.si-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.si-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.si-card-name { font-size: var(--t-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.si-card-top .si-chip { margin-left: 0; }
.si-card-big { display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.si-card-big b { font-family: var(--font-cond); font-size: var(--t-2xl); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.si-card-big span, .si-card-line { font-size: var(--t-sm); color: var(--ink-2); }
.si-ov { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.25rem; }
.si-main { flex: 999 1 36rem; min-width: 0; }
.si-aside { flex: 1 1 19rem; min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.si-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.9rem 1rem; }
.si-box .usage-h3 { margin-top: 0; }
.si-box .si-kv { margin-bottom: 0.4rem; }
.si-warnv { color: var(--warn-ink); font-weight: 500; }
.si-today { background: var(--panel-2); }
.si-today-n { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.si-today-n button { font: inherit; text-align: left; background: none; border: 0; padding: 0.2rem 0; cursor: pointer; color: var(--ink-2); font-size: var(--t-xs); min-height: 2.75rem; }
.si-today-n button b { display: block; font-family: var(--font-cond); font-size: var(--t-xl); color: var(--ink); line-height: 1.1; }
.si-today-n button:hover b { color: var(--accent); }
.si-tools { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin: 0 0 0.6rem; }
.si-tools .usage-h3 { margin: 0; flex: 1 1 12rem; }
.si-tools .logs-search { width: 16rem; min-height: 2.25rem; }
.si-tools .btn-row { margin-left: auto; }
.si-sort { width: auto; min-height: 2.25rem; padding: 0.25rem 0.5rem; font-size: var(--t-sm); }
.si-main .logs-sevs { margin-bottom: 0.6rem; }
.si-main .logs-sev.is-on, .si-dlg .logs-sev.is-on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.si-groups { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 0.5rem; }
.si-g + .si-g { border-top: 1px solid var(--line-2); }
.si-g-line { display: flex; align-items: center; gap: 0.5rem; padding-right: 0.9rem; }
.si-g-head { flex: 1 1 auto; min-width: 0; font: inherit; text-align: left; color: var(--ink); background: none; border: 0; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; padding: 0.75rem 0.5rem 0.75rem 0.9rem; min-height: 2.75rem; }
.si-g-head:hover { background: var(--panel-2); }
.si-g-head.is-open { background: var(--panel-2); }
.si-g-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.si-g-line:has(.si-g-head.is-open) { background: var(--panel-2); }
.si-g-caret { flex: 0 0 0.9rem; color: var(--ink-3); font-size: var(--t-sm); }
.si-g-text { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.si-g-text b { font-weight: 600; }
.si-g-text .small { color: var(--ink-2); overflow-wrap: anywhere; }
.si-g-text .si-chip { align-self: flex-start; margin-left: 0; }
.si-g-folder { font-size: var(--t-sm); font-weight: 600; overflow-wrap: anywhere; }
.si-g-area { flex: none; }
.si-g-det { flex: none; white-space: nowrap; font-weight: 600; }
.si-sev { flex: 0 0 4.6rem; text-align: center; font-size: var(--t-xs); font-weight: 600; padding: 0.15rem 0; border-radius: var(--r-sm); border: 1px solid transparent; }
.si-sev-crit { background: var(--crit); color: #fff; }
.si-sev-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.si-sev-info { background: var(--unk-bg); color: var(--unk-ink); }
.si-g-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.si-g-rows li { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: baseline; padding: 0.45rem 0.9rem 0.45rem 7.6rem; font-size: var(--t-sm); }
.si-g-rows li + li { border-top: 1px solid var(--line-2); }
.si-g-rows li > b { flex: 0 1 17rem; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.si-g-rows li > .small { flex: 1 1 14rem; min-width: 0; color: var(--ink-2); }
.si-g-rows .si-chip { margin-left: 0; }
.si-g-fix { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.si-g-files li { padding-left: 2.6rem; align-items: center; }
.si-g-files .si-path { flex: 1 1 18rem; min-width: 0; }
.si-nocb { display: inline-block; width: 0.85rem; }
.si-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; }
.si-stat { font: inherit; text-align: left; cursor: pointer; color: var(--ink); min-height: 2.75rem; }
.si-stat:disabled { cursor: default; opacity: 1; }
.si-stat:not(:disabled):hover { border-color: var(--accent); }
.si-stat.is-on { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.si-stat:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.si-note { border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r-md); padding: 0.55rem 0.8rem; font-size: var(--t-sm); margin: 0 0 0.8rem; }
.si-site-n { font-weight: 600; color: var(--ink); text-align: left; }
.si-site-n:hover { color: var(--accent); }
.si-sites .si-chip { margin-left: 0; margin-right: 0.25rem; }
.si-sites td:nth-child(4) { min-width: 11rem; }
.si-verd { font-size: var(--t-sm); font-weight: 500; min-width: 10rem; }
.si-verd.is-crit { color: var(--crit-ink); } .si-verd.is-warn { color: var(--warn-ink); } .si-verd.is-ok { color: var(--ok-ink); } .si-verd.is-none, .si-verd.is-info { color: var(--ink-2); }
dialog.si-dlg { width: min(58rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); }
dialog.si-dlg[open] { display: flex; flex-direction: column; }
.si-dlg-h { display: flex; gap: 0.75rem; align-items: flex-start; min-width: 0; }
.si-dlg-h .si-sev { margin-top: 0.25rem; }
.si-dlg-h h2 { font-family: var(--font-cond); overflow-wrap: anywhere; }
.si-dlg-body { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 0.9rem; padding-right: 0.25rem; }
.si-dlg-body h3 { font-size: var(--t-md); font-weight: 600; margin: 0; }
.si-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.si-why > div { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.7rem 0.85rem; }
.si-why h3 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); margin-bottom: 0.3rem; }
.si-why p { font-size: var(--t-sm); }
.si-cmdbox-h { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.si-cmdbox pre.cmd { margin: 0; white-space: pre-wrap; }
.si-dlg-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; }
.si-dlg-t td:first-child { min-width: 12rem; overflow-wrap: anywhere; }
.si-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; }
.si-step { display: flex; gap: 0.6rem; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.65rem 0.75rem; min-width: 0; }
.si-step > div { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; overflow-wrap: anywhere; }
.si-step .si-chip { margin-left: 0; }
.si-step-n { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 600; display: flex; align-items: center; justify-content: center; }
@media (max-width: 40rem) { .si-g-rows li { padding-left: 2.4rem; } .si-g-area { display: none; } .si-tools .logs-search { width: 100%; } }
.si-dlg-nav { margin: 0; flex: none; }
.si-dlg-pane { min-height: 16rem; display: flex; flex-direction: column; gap: 0.6rem; }
.si-dlg-pane .si-hist { max-height: none; margin: 0; }
.si-okv { color: var(--ok-ink); }
.si-allow-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.6rem 1rem; align-items: start; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0.8rem 0.9rem; }
.si-allow-form .field { margin: 0; }
.si-allow-b { white-space: nowrap; }
.si-tools select.si-sort { max-width: 100%; }
.si-allow-form .field:first-child { grid-column: 1 / -1; }
.si-card.is-on { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.si-g-find li { padding-left: 2.6rem; align-items: baseline; }
.si-g-find .si-g-ftext { flex: 1 1 22rem; min-width: 0; }
.si-g-find .si-g-ftext b { font-weight: 600; }
.si-g-find .si-chip { flex: none; }
.si-g-find li > .small { flex: none; }
.si-g-find .si-g-ftext { flex: 1 1 28rem; }
.si-card-top { align-items: flex-start; }
.si-card-name { min-width: 0; overflow-wrap: anywhere; }
.si-card-top .si-chip { flex: none; }

/* the server's main disk (Edit page), in the Disks list */
.disk-main { margin-left: 0.5rem; padding: 0 0.4rem; border-radius: 4px; font-size: 0.72rem; font-weight: 600; background: var(--line-2); color: var(--ink-2, inherit); vertical-align: 1px; }

/* a newer agent version: the arrow and the new version blink (server list count, its dropdown) */
.ag-blink { animation: ag-blink 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ag-blink { animation: none; } }

/* Sign out, next to the light/dark button in the header */
.signout-form { display: contents; }
.icon-signout { color: var(--crit-ink); }
.icon-signout:hover { background: var(--crit-bg); color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }

/* ---------- new password boxes: show/hide, suggest, the rules (partials/password_new) ---------- */
.modal-pw { width: min(34rem, calc(100vw - 2rem)); }
.modal-pw .pw-who { font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); margin-left: 0.35rem; overflow-wrap: anywhere; }
.pw-row { display: flex; gap: 0.4rem; align-items: stretch; }
.pw-row .input { flex: 1; min-width: 0; }
.pw-eye { padding: 0 0.65rem; display: inline-flex; align-items: center; }
.pw-eye svg, .pw-suggest svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye.is-on { background: var(--panel-2); color: var(--accent); border-color: var(--accent); }
.pw-suggest { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; margin: 0 0 0.8rem; }
.pw-new .field { margin-bottom: 1rem; }
.pw-suggest svg circle { fill: currentColor; }
.pw-rules { list-style: none; margin: 0 0 0.9rem; padding: 0.7rem 0.9rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.3rem 1rem; background: var(--panel-2); border-radius: var(--r-md); font-size: var(--t-sm); color: var(--ink-2); }
.pw-rules li { display: flex; align-items: center; gap: 0.45rem; }
.pw-rules li::before { content: ""; flex: 0 0 auto; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1.5px solid var(--ink-3); box-sizing: border-box; }
.pw-rules li.is-ok { color: var(--ink); }
.pw-rules li.is-ok::before { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 2px var(--panel-2); }
.pw-block { margin: -0.3rem 0 0.9rem; font-size: var(--t-sm); color: var(--crit-ink); }

/* ---------- Domains module, first called Websites (app/Views/domains) ---------- */
.web-back { margin: -0.4rem 0 0.5rem; }
.web-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.web-stat { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.7rem 0.9rem; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); }
button.web-stat { cursor: pointer; }
button.web-stat:hover { border-color: var(--ink-3); }
button.web-stat[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.web-stat b { font-family: var(--font-cond); font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.web-stat span { font-size: var(--t-sm); color: var(--ink-2); }
.web-stat.is-crit { box-shadow: inset 3px 0 0 var(--crit); } .web-stat.is-crit b { color: var(--crit-ink); }
.web-stat.is-warn { box-shadow: inset 3px 0 0 var(--warn); } .web-stat.is-warn b { color: var(--warn-ink); }
.web-stat.is-ok b { color: var(--ok-ink); }
.web-banner { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: var(--r-md); background: var(--crit-bg); border: 1px solid color-mix(in srgb, var(--crit) 45%, var(--line)); }
.web-banner p { flex: 1 1 24rem; margin: 0; }
.web-banner a { font-weight: 600; color: var(--crit-ink); }
.web-high { background: var(--crit); color: #fff; font-weight: 600; }
.web-name { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.web-name a { overflow-wrap: anywhere; }
.web-note { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 0.1rem; overflow-wrap: anywhere; }
.web-table td:first-child .web-note { padding-left: 1.3rem; }
.web-note-down, .web-note-checking { color: var(--crit-ink); }
.web-note-slow { color: var(--warn-ink); }
.web-dot { flex: none; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--line); box-sizing: border-box; }
.web-dot-up { background: var(--ok); } .web-dot-down { background: var(--crit); } .web-dot-slow { background: var(--warn); }
.web-dot-checking { background: var(--panel); border: 3px solid var(--crit); }
.web-dot-paused, .web-dot-gone { background: var(--panel); border: 2px solid var(--ink-3); }
.web-dot-new { background: var(--panel); border: 2px dashed var(--ink-3); }
.web-dot-lg { width: 2.2rem; height: 2.2rem; }
.web-dot-lg.web-dot-checking { border-width: 6px; } .web-dot-lg.web-dot-paused, .web-dot-lg.web-dot-gone, .web-dot-lg.web-dot-new { border-width: 4px; }
.web-bars { display: flex; gap: 2px; height: 1.35rem; min-width: 11rem; }
.web-bars i { flex: 1; border-radius: 2px; }
.web-bars-lg { height: 1.9rem; gap: 3px; margin: 0.55rem 0 0.4rem; }
.web-b-u { background: var(--ok); } .web-b-s { background: var(--warn); } .web-b-d { background: var(--crit-ink); } .web-b-n { background: var(--line); }
.web-key { margin-left: 0.6rem; font-weight: 400; white-space: nowrap; }
.web-key i, .web-legend i { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 2px; margin: 0 0.25rem 0 0.5rem; }
.web-low { color: var(--warn-ink); font-weight: 600; }
.row-crit .web-low { color: var(--crit-ink); }
.web-foot { margin-top: 0.75rem; }
.web-head { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.web-head h1 { overflow-wrap: anywhere; }
.web-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.web-cards .panel { margin: 0; }
.web-k { font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); display: block; }
.web-v { font-family: var(--font-cond); font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin: 0.15rem 0; }
.web-v-up { color: var(--ok-ink); } .web-v-down, .web-v-checking { color: var(--crit-ink); } .web-v-slow { color: var(--warn-ink); } .web-v-paused, .web-v-gone, .web-v-new { color: var(--ink-2); }
.web-k-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.web-spans { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.25rem 1rem; padding: 0.8rem 1.15rem; margin-bottom: 0.75rem; }
.web-spans div { display: flex; flex-direction: column; }
.web-spans b { font-family: var(--font-cond); font-size: 1.4rem; font-weight: 600; }
.web-cols { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }
.web-main { flex: 999 1 34rem; min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.web-side { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.web-main .panel, .web-side .panel { margin: 0; }
.web-side h2 { margin-bottom: 0.5rem; }
.web-chart { display: block; width: 100%; height: auto; margin-top: 0.5rem; }
.web-grid { stroke: var(--line-2); stroke-width: 1; }
.web-axis { font-family: var(--font); font-size: 12px; fill: var(--ink-2); }
.web-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.web-pt { fill: var(--accent); }
.web-downarea { fill: var(--crit); opacity: 0.2; }
.web-slowline { stroke: var(--warn-ink); stroke-width: 1.3; stroke-dasharray: 6 5; }
.web-slowtext { fill: var(--warn-ink); }
.web-chart-x { display: flex; justify-content: space-between; padding-left: 3.2rem; }
.web-ms { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0.6rem 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.web-ms b { font-size: var(--t-lg); color: var(--ink); }
.web-checks { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.5rem 1rem; margin: 0; font-size: var(--t-sm); }
.web-checks dt { color: var(--ink-2); } .web-checks dd { margin: 0; overflow-wrap: anywhere; }
.web-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.web-found { margin-bottom: 0.75rem; }
.web-table td.num, .web-table td:last-child { white-space: nowrap; }
.web-groups { margin-bottom: 1rem; background: var(--panel); }
.web-g-body { border-top: 1px solid var(--line-2); overflow-x: auto; padding: 0 0.5rem 0.4rem 2.2rem; }
/* Add / Edit website: a narrow card, a third of the screen (never narrower than the form needs) */
/* (two columns since item 126: the domain on the left, "Check and alert" on the right) */
.web-form { width: 100%; max-width: max(66vw, 46rem); }
.web-form-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2rem; align-items: start; margin-bottom: 1rem; }
.web-form-col { min-width: 0; }
.web-form-side { margin: 0; }
.web-form-side .field:last-of-type { margin-bottom: 0.8rem; }
/* the header's alert dialog, Websites tab */
.web-al { display: flex; flex-direction: column; gap: 0.9rem; padding: 0.8rem 0.2rem 0.2rem; max-height: 60vh; overflow-y: auto; }
.web-al-g h3 { font-size: var(--t-md); font-weight: 600; margin: 0 0 0.35rem; }
.web-al-g ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.web-al-g li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0.7rem; font-size: var(--t-sm); }
.web-al-g li + li { border-top: 1px solid var(--line-2); }
.web-al-g .vchip { flex: none; font-size: var(--t-xs); }
.web-al-t { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.web-al-t a { font-weight: 600; }
.web-al-all { margin: 0.6rem 0.2rem 0; }
.web-table .web-name a { font-size: var(--t-lg); }
.web-table .web-dot { width: 0.9rem; height: 0.9rem; }
.web-table td:first-child .web-note { padding-left: 1.4rem; font-size: var(--t-sm); }
.web-g-hint { margin: 0; padding: 0.5rem 0.9rem 0.6rem 2.2rem; background: var(--warn-bg); color: var(--ink); border-top: 1px solid var(--line-2); }
/* Websites list as tabs: Down | Up | Slow | Paused | All */
.web-tabs-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.25rem 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.web-tabs { border-bottom: 0; margin-bottom: 0; flex-wrap: wrap; }
.web-tabs button { font-size: var(--t-md); padding: 0.6rem 1rem; min-height: 44px; }
.web-tabs button[aria-selected="true"] { font-weight: 600; }
.web-tabs .count { font-size: var(--t-sm); font-weight: 600; padding: 0 0.45rem; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); }
.web-tab-down:not(.is-zero) .count { background: var(--crit-bg); color: var(--crit-ink); }
.web-tab-up:not(.is-zero) .count { background: var(--ok-bg); color: var(--ok-ink); }
.web-tab-slow:not(.is-zero) .count { background: var(--warn-bg); color: var(--warn-ink); }
.web-figs { display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; margin: 0 0 0.6rem; color: var(--ink-2); }
.web-figs b { color: var(--ink); font-size: var(--t-md); }
.web-figs .web-low b { color: var(--warn-ink); }
.web-tab-issues:not(.is-zero) .count { background: var(--crit-bg); color: var(--crit-ink); }
.web-sev-info { background: var(--panel-2); color: var(--ink-2); border-color: var(--line); }
.web-i-what { margin: 0; padding: 0.6rem 0.4rem 0.5rem; color: var(--ink-2); }
.web-i-what b { color: var(--ink); }
/* open the website in a new tab; the DNS line under the server */
.web-open { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: var(--r-sm); color: var(--ink-3); }
.web-open:hover, .web-open:focus-visible { color: var(--accent); background: var(--panel-2); }
.web-open svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.web-dns { white-space: nowrap; }
.web-dns-ok { color: var(--ok-ink); } .web-dns-warn { color: var(--warn-ink); font-weight: 600; white-space: normal; } .web-dns-crit { color: var(--crit-ink); font-weight: 600; }
.web-table td:first-child { min-width: 17rem; }
.web-table td.web-status { min-width: 9rem; max-width: 16rem; }
.web-table td[data-l="Last 24 hours"] { width: 46%; }
.web-table td:nth-child(4) { min-width: 6rem; }
.web-table .web-chain { min-width: 8rem; }
.web-table th, .web-table td { padding-left: 0.6rem; padding-right: 0.6rem; }
.web-table .web-key { display: block; margin: 0.15rem 0 0; }
.web-dns { white-space: normal; overflow-wrap: anywhere; }
.web-bars { min-width: 9rem; }
/* Websites: the banner above the tabs, and the phone layout */
.web-top { margin-bottom: 0.75rem; }
@media (max-width: 760px) {
  .web-tabs-row { align-items: stretch; }
  .web-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; }
  .web-tabs::-webkit-scrollbar { display: none; }
  .web-tabs button { flex: none; white-space: nowrap; padding: 0.6rem 0.7rem; }
  .web-figs { width: 100%; }
  .page-head .btn-row { width: 100%; }
  .page-head .btn-row .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
  .toolbar .input, .toolbar select.input { flex: 1 1 100%; max-width: none; width: 100%; min-height: 44px; }
  /* the list: one card per website, each value with its name */
  .web-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .web-table, .web-table tbody { display: block; width: 100%; }
  .web-table tbody tr[data-search]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.45rem 0.9rem; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
  .web-table tbody tr[data-search] td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; white-space: normal; }
  .web-table td:first-child, .web-table td:nth-child(4), .web-table td.web-status { min-width: 0; max-width: none; }
  .web-table tbody tr[data-search] td:first-child, .web-table tbody tr[data-search] td[data-l="Last 24 hours"], .web-table tbody tr[data-search] td[data-l="Status"] { grid-column: 1 / -1; }
  .web-table tbody tr[data-search] td[data-l]::before { content: attr(data-l); display: block; font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 0.1rem; }
  table.t.web-table tbody tr.row-crit td:first-child, table.t.web-table tbody tr.row-warn td:first-child { box-shadow: none; }
  .web-table tbody tr.row-crit { box-shadow: inset 3px 0 0 var(--crit); } .web-table tbody tr.row-warn { box-shadow: inset 3px 0 0 var(--warn); }
  .web-table .web-bars { min-width: 0; }
  .web-table .no-match td { display: block; padding: 1rem; }
  .web-open { width: 2.75rem; height: 2.75rem; margin: -0.5rem 0; }
  /* the groups (Down, Issues found): the head stacks, the table scrolls in its box */
  .web-groups .si-g-line { flex-wrap: wrap; padding-right: 0; }
  .web-groups .si-g-head { flex: 1 1 100%; }
  .web-groups .si-g-det { padding: 0 0.9rem 0.7rem 2.6rem; }
  .web-g-body { padding-left: 0.5rem; }
  .web-g-body table { min-width: 34rem; }
  .web-g-hint, .web-i-what { padding-left: 0.9rem; }
  /* one website: the buttons take the width, the chart keeps its shape */
  .web-head { align-items: flex-start; }
  .web-chart-x { padding-left: 0; }
  .web-checks { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } .web-checks dd { margin-bottom: 0.5rem; }
  .web-form { max-width: none; }
  .web-form-cols { grid-template-columns: minmax(0, 1fr); }
  .web-form-side { margin-top: 0.5rem; }
}
.web-blocked { margin-bottom: 0.75rem; }
/* the time chain: 288 slots of 5 minutes, drawn as runs with no gaps (Domains::chain) */
.web-chain { gap: 0; border-radius: 3px; overflow: hidden; background: var(--line); }
.web-chain i { border-radius: 0; min-width: 0; flex-basis: 0; }
.web-chain .web-b-d { min-width: 2px; }                 /* one failed slot stays visible */
.web-chain-x { display: flex; justify-content: space-between; margin: -0.2rem 0 0.3rem; }
/* the status of a domain in its own column, in normal text */
.web-table td.web-status { font-size: var(--t-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.web-table td.web-status.web-note-down, .web-table td.web-status.web-note-checking { color: var(--crit-ink); }
.web-table td.web-status.web-note-slow { color: var(--warn-ink); }
@media (max-width: 760px) { .web-table td[data-l="Last 24 hours"] { width: auto; } .web-table th, .web-table td { padding-left: 0; padding-right: 0; } }
.web-name .web-open { margin: 0 -0.2rem; }
/* the list without Status / Answer / Certificate: a wide time chain, and its mouse-over tip */
.web-table .web-chain { min-width: 14rem; height: 1.6rem; }
.web-table .web-key { display: inline; margin-left: 0.6rem; }
.web-chain i { cursor: crosshair; }
.web-chain i:hover { filter: brightness(1.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
.web-tip { position: fixed; z-index: 60; pointer-events: none; padding: 0.3rem 0.55rem; border-radius: var(--r-sm); background: var(--ink); color: var(--panel); font-size: var(--t-sm); font-weight: 500; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.web-tip[hidden] { display: none; }
@media (max-width: 760px) { .web-table td[data-l="Last 24 hours"] { width: auto; } .web-table .web-chain { min-width: 0; } }
/* the time chain in the soft shades of the Camera Recording Monitor's time chain (item 131) */
:root { --chain-up: #7dc496; --chain-down: #e9b3ae; --chain-slow: #f2d08a; --chain-none: #e3e6ea; }
:root[data-theme="dark"] { --chain-up: #3f8f5c; --chain-down: #a8524c; --chain-slow: #a8853a; --chain-none: #33404c; }
.web-chain { background: var(--chain-none); }
.web-chain .web-b-u, .web-key .web-b-u { background: var(--chain-up); }
.web-chain .web-b-d, .web-key .web-b-d, .web-legend .web-b-d { background: var(--chain-down); }
.web-chain .web-b-s, .web-key .web-b-s { background: var(--chain-slow); }
.web-chain .web-b-n, .web-key .web-b-n { background: var(--chain-none); }
.web-chain i:hover { filter: brightness(0.93); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.web-downarea { fill: var(--chain-down); opacity: 0.55; }
/* Import a list of domains */
.web-import-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--t-sm); line-height: 1.5; min-height: 16rem; resize: vertical; }
.web-import-how { margin-top: 0.75rem; }
.web-import-how h2 { margin-bottom: 0.4rem; }
.web-import-how dd code { display: block; padding: 0.45rem 0.6rem; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow-x: auto; white-space: pre; font-size: var(--t-xs); user-select: all; }
.web-import-how .web-checks { margin: 0.6rem 0; }
/* Overview: the Domains tile (a fifth summary tile) */
.kpis.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.kpi.kpi-link { text-decoration: none; color: inherit; cursor: pointer; }
a.kpi.kpi-link:hover { text-decoration: none; border-color: var(--ink-3); }
@media (min-width: 72rem) {
  .board-top:has(.kpis-5) { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
  .board-top .kpis.kpis-5 { gap: 0.6rem; }
  .board-top .kpis.kpis-5 .kpi { padding: 0.55rem 0.7rem 0.6rem; min-width: 0; }
}
@media (max-width: 900px) { .kpis.kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* phone: three tiles to a line; "Domains status" takes two places beside the disk tile */
@media (max-width: 700px) {
  .kpis.kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  .kpis.kpis-5 .kpi { padding: 0.45rem 0.4rem 0.5rem; }
  .kpis.kpis-5 .kpi small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpis.kpis-5 .kpi b { font-size: 1.2rem; }
  .kpis.kpis-5 .kpi:last-child { grid-column: span 2; }
}

/* search box in the top bar: "Server" / "Domain" tag on the right of each row */
.srv-find-list { min-width: 24rem; }
.srv-find-list li b { grid-column: 2; grid-row: 1; }
.srv-find-list li small { grid-column: 2; grid-row: 2; }
.srv-find-list li .srv-find-tag { grid-column: 3; grid-row: 1 / 3; align-self: center; font-size: 0.6875rem; font-weight: 600; line-height: 1; padding: 0.25rem 0.45rem; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--panel-2); white-space: nowrap; }
.srv-find-list li .srv-find-tag.k-d { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.srv-find-list .srv-find-none { grid-template-columns: 1fr; }
@media (max-width: 760px) { .srv-find-list { min-width: 18rem; } }

/* a button that has started something slow ("Check now" on a domain): its icon becomes a turning circle */
.btn.is-busy { cursor: progress; opacity: 0.85; }
.btn.is-busy svg.ic { display: none; }
.btn.is-busy::before { content: ""; width: 0.9rem; height: 0.9rem; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: audit-spin 0.7s linear infinite; }

/* Domains tabs: an icon before each label; on a phone the icon and the count only */
.web-tabs button { display: inline-flex; align-items: center; gap: 0.4rem; }
.web-tabs button svg.ic { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.web-tab-up:not(.is-zero) svg.ic { color: var(--ok-ink); }
.web-tab-down:not(.is-zero) svg.ic, .web-tab-issues:not(.is-zero) svg.ic { color: var(--crit-ink); }
.web-tab-slow:not(.is-zero) svg.ic { color: var(--warn-ink); }
@media (max-width: 760px) {
  .web-tabs .web-tab-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .web-tabs button { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0.6rem 0.1rem; gap: 0.25rem; }
  .web-tabs button svg.ic { width: 1.25rem; height: 1.25rem; }
  .web-tabs .count { padding: 0 0.35rem; }
}

/* Domains > Issues found on a phone: the group line wraps, and an open group lists its domains
   as stacked lines (name; type and server; what the check saw; since) instead of a wide table */
@media (max-width: 760px) {
  .web-groups .si-g-head { align-items: flex-start; text-align: left; width: 100%; gap: 0.5rem; }
  .web-groups .si-g-text { min-width: 0; }
  .web-groups .si-g-text b { display: block; overflow-wrap: anywhere; }
  .web-g-body table.t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .web-g-body table.t, .web-g-body table.t tbody { display: block; width: 100%; }
  .web-g-body table.t tr { display: grid; grid-template-columns: auto 1fr auto; gap: 0.1rem 0.5rem; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line-2); }
  .web-g-body table.t td { display: block; padding: 0; border: 0; min-width: 0; font-size: var(--t-sm); white-space: normal; overflow-wrap: anywhere; }
  .web-g-body table.t td:nth-child(1) { grid-column: 1 / -1; font-size: var(--t-md); font-weight: 600; }
  .web-g-body table.t td:nth-child(2) { color: var(--ink-3); }
  .web-g-body table.t td:nth-child(3) { grid-column: 2 / -1; }
  .web-g-body table.t td:nth-child(4) { grid-column: 1 / -1; color: var(--ink-2); }
  .web-g-body table.t td:nth-child(5) { grid-column: 1 / 3; color: var(--ink-3); font-size: var(--t-xs); }
  .web-g-body table.t td:nth-child(6) { grid-column: 3; justify-self: end; }
  .web-g-body .web-i-what { padding: 0.6rem 0.75rem; margin: 0; }
}

/* Issues found: the open-in-browser icon before each domain, as in the Up / Down lists */
.web-i-name { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; }
.web-i-name .web-open { margin: -0.3rem 0 -0.3rem -0.35rem; }
@media (max-width: 760px) { .web-i-name .web-open { width: 2.25rem; height: 2.25rem; margin: -0.4rem 0 -0.4rem -0.5rem; } }

/* "Which alerts reach me": the two "wait 5 minutes" switches under the kinds */
.ntf-wait { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--line-2); }

/* "Wait before notifying": the switch, then its minutes */
.ntf-wait-item { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.ntf-wait-item .sw { width: 100%; }
.ntf-find-item { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.ntf-off-note { color: var(--warn-ink, #8a5a00); font-size: 0.8rem; line-height: 1.35; }
.ntf-wait-item .ntf-off-note { margin-left: 3rem; }
.ntf-item.ntf-needs-off > .sw, .ntf-item.ntf-needs-off > label, .ntf-item.ntf-needs-off > select { opacity: 0.5; }
.ntf-find-item select.ntf-wait-min { width: auto; min-width: 10rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.ntf-wait-item select.ntf-wait-min { width: auto; min-width: 8.5rem; margin-left: 3rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.ntf-wait-item:has(input[type="checkbox"]:not(:checked)) select.ntf-wait-min { opacity: 0.5; }

/* menu: Sign out in red, with its icon (item 172) */
.menu .menu-signout { display: flex; align-items: center; justify-content: flex-start; gap: 0.55rem; color: var(--crit-ink); }
.menu .menu-signout .ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu .menu-signout:hover, .menu .menu-signout:focus-visible { color: var(--crit-ink); background: var(--crit-bg); }

/* menu icons (item 173): an icon before each item; the counts stay at the right */
.menu-link { justify-content: flex-start; }
.menu .count { margin-left: auto; }
.menu .menu-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-3); }
.menu-link:hover .menu-ic, .menu-link[aria-current="page"] .menu-ic { color: var(--accent); }
.menu .menu-signout .menu-ic, .menu .menu-signout:hover .menu-ic { color: currentColor; }
.menu .menu-who { align-items: flex-start; }
.menu .menu-who .menu-ic { margin-top: 0.15rem; }
