:root {
  color-scheme: light;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --font-display: var(--font-ui);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --bg: #e6e9ec;
  --surface: #f2f4f5;
  --surface-raised: #f7f8f9;
  --surface-soft: #dde2e6;
  --line: #c8d0d6;
  --line-strong: #75838f;
  --text: #252b31;
  --muted: #596571;
  --subtle: #5b6772;
  --accent: #c8473c;
  --accent-strong: #9e342c;
  --link: #b13a31;
  --good: #27724c;
  --good-bg: #dfeee5;
  --warn: #8d620f;
  --warn-bg: #f4ead0;
  --danger: #b63544;
  --danger-bg: #f3dfe2;
  --unknown: #63707b;
  --unknown-bg: #e2e6e9;
  --shadow: 0 18px 44px rgba(51, 61, 70, .14);
  --page-glow: radial-gradient(900px 420px at 48% -170px, rgba(91, 105, 119, .16), transparent 72%);
  --page-texture: linear-gradient(transparent, transparent);
  --card-shadow: -5px -5px 13px rgba(255, 255, 255, .86), 6px 6px 16px rgba(137, 147, 157, .44);
  --control-shadow: -2px -2px 5px rgba(255, 255, 255, .88), 3px 3px 7px rgba(137, 147, 157, .36);
  --inset-shadow: inset -2px -2px 4px rgba(255, 255, 255, .68), inset 3px 3px 7px rgba(137, 147, 157, .34);
  --data-font: var(--font-mono);
  --summary-shell: linear-gradient(145deg, #30383e, #1d2429);
  --summary-border: #4a555d;
  --summary-shadow: -6px -6px 15px rgba(255, 255, 255, .82), 7px 7px 18px rgba(122, 132, 141, .48), inset 0 0 0 1px rgba(255, 255, 255, .06);
  --summary-card: #0d1317;
  --summary-card-line: #3a464d;
  --summary-card-text: #e9f2ed;
  --summary-card-muted: #93a39b;
  --button-text: #ffffff;
  --radius: 18px;
  --topbar-height: 68px;
  --anchor-offset: 96px;
  --font-xs: 12px;
  --font-sm: 13px;
  --font-base: 14px;
}

:root[data-theme="industrial"] {
  color-scheme: light;
  --bg: #e7e9ec;
  --surface: #e7e9ec;
  --surface-raised: #eff1f3;
  --surface-soft: #d9dde1;
  --line: #b8c0c7;
  --line-strong: #76818a;
  --text: #2b3036;
  --muted: #515b64;
  --subtle: #59636c;
  --accent: #ea580c;
  --accent-strong: #c2410c;
  --link: #c2410c;
  --good: #26734c;
  --good-bg: #dcebe2;
  --warn: #94620d;
  --warn-bg: #f2e6c7;
  --danger: #b53843;
  --danger-bg: #f0dadd;
  --unknown: #66727c;
  --unknown-bg: #dce1e5;
  --shadow: 0 8px 24px rgba(48, 58, 66, .12);
  --page-glow: radial-gradient(980px 470px at 48% -180px, rgba(111, 123, 133, .2), transparent 72%);
  --page-texture: linear-gradient(transparent, transparent);
  --card-shadow: 0 1px 2px rgba(30, 38, 44, .10);
  --control-shadow: none;
  --inset-shadow: inset 0 0 0 1px rgba(70, 82, 91, .12);
  --radius: 8px;
}

:root[data-theme="editorial"] {
  color-scheme: light;
  --font-display: Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", serif;
  --bg: #f6f3ea;
  --surface: #fbf9f2;
  --surface-raised: #fffdf7;
  --surface-soft: #efebdf;
  --line: #bdb5a7;
  --line-strong: #1a1a1a;
  --text: #1a1a1a;
  --muted: #5d584f;
  --subtle: #686158;
  --accent: #b1170f;
  --accent-strong: #84110c;
  --link: var(--accent);
  --good: #376d4d;
  --good-bg: #e1eadf;
  --warn: #865d17;
  --warn-bg: #f3e8cd;
  --danger: #a83240;
  --danger-bg: #f1dddf;
  --unknown: #70675c;
  --unknown-bg: #e8e0d4;
  --shadow: none;
  --page-glow: radial-gradient(880px 430px at 48% -180px, rgba(143, 112, 76, .1), transparent 72%);
  --page-texture: repeating-linear-gradient(0deg, rgba(52, 42, 25, .018) 0 1px, transparent 1px 4px);
  --card-shadow: none;
  --control-shadow: none;
  --inset-shadow: none;
  --data-font: var(--font-mono);
  --summary-shell: transparent;
  --summary-border: var(--line-strong);
  --summary-shadow: none;
  --summary-card: transparent;
  --summary-card-line: var(--line-strong);
  --summary-card-text: var(--text);
  --summary-card-muted: var(--muted);
  --button-text: #ffffff;
  --radius: 0px;
}

:root[data-theme="control-room"] {
  color-scheme: dark;
  --bg: #0b1119;
  --surface: #121a25;
  --surface-raised: #182230;
  --surface-soft: #0f1620;
  --line: #2b394b;
  --line-strong: #5c718a;
  --text: #edf2f7;
  --muted: #a2afbd;
  --subtle: #7f8ea0;
  --accent: #73a8e8;
  --accent-strong: #a9c9ef;
  --link: var(--accent);
  --good: #4ac590;
  --good-bg: rgba(74, 197, 144, .12);
  --warn: #e5b75d;
  --warn-bg: rgba(229, 183, 93, .13);
  --danger: #ef7585;
  --danger-bg: rgba(239, 117, 133, .13);
  --unknown: #a3afbd;
  --unknown-bg: rgba(163, 175, 189, .11);
  --shadow: 0 20px 54px rgba(0, 0, 0, .28);
  --page-glow: radial-gradient(900px 420px at 48% -160px, rgba(69, 117, 181, .18), transparent 72%);
  --page-texture: linear-gradient(rgba(115, 168, 232, .026) 1px, transparent 1px), linear-gradient(90deg, rgba(115, 168, 232, .026) 1px, transparent 1px);
  --card-shadow: 0 0 0 1px rgba(115, 168, 232, .035), 0 14px 34px rgba(0, 0, 0, .2);
  --control-shadow: inset 0 0 0 1px rgba(115, 168, 232, .05);
  --inset-shadow: inset 0 0 0 1px rgba(115, 168, 232, .34), inset 0 0 18px rgba(44, 104, 170, .12);
  --data-font: var(--font-mono);
  --summary-shell: linear-gradient(145deg, #151f2b, #0c121a);
  --summary-border: #34465a;
  --summary-shadow: 0 18px 42px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(115, 168, 232, .04);
  --summary-card: #0b121a;
  --summary-card-line: #2d4053;
  --summary-card-text: #edf6ff;
  --summary-card-muted: #8ea3b7;
  --button-text: #09111b;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  background-image: var(--page-texture), var(--page-glow);
  background-size: auto, auto;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--font-base);
  line-height: 1.55;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: var(--link); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--topbar-height);
  display: grid;
  grid-template-columns: minmax(185px, .8fr) auto auto minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px max(24px, calc((100vw - 1380px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}
.section-nav { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.section-nav a { padding: 5px 8px; border-radius: 7px; color: var(--muted); font-size: var(--font-xs); text-decoration: none; white-space: nowrap; }
.section-nav a:hover { background: var(--surface-raised); color: var(--text); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--accent-strong);
  background: var(--surface-raised);
  box-shadow: var(--control-shadow);
  font: 700 15px/1 var(--font-mono);
}
.brand > div strong, .brand > div span { display: block; white-space: nowrap; }
.brand > div strong { font-size: 13px; letter-spacing: .01em; }
.brand > div span { color: var(--subtle); font-size: 11px; }
.overall {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: var(--inset-shadow);
  font-size: 12px;
}
.overall strong { font-size: 12px; }
.overall > span:last-child { display: none; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--unknown); }
[data-state="healthy"] .status-dot, .status-pill.healthy::before, .node-state.healthy::before { background: var(--good); }
[data-state="degraded"] .status-dot, .status-pill.degraded::before, .node-state.degraded::before { background: var(--warn); }
[data-state="critical"] .status-dot, .status-pill.critical::before, .node-state.critical::before { background: var(--danger); }
.top-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.top-actions form { display: contents; }
.tool-link, .text-button, .icon-button, .primary-button, .external-link {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--control-shadow);
}
.tool-link, .text-button { padding: 7px 10px; font-size: 12px; }
.text-button { appearance: none; white-space: nowrap; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; font-size: 17px; }
.external-link { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.tool-link:hover, .text-button:hover, .icon-button:hover, .external-link:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.refresh-control, .theme-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.refresh-timing {
  flex: 0 0 auto;
  display: grid;
  gap: 1px;
  padding: 0 3px;
  color: var(--subtle);
  font: var(--font-xs)/1.45 var(--font-ui);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.refresh-compact { min-width: 54px; color: var(--subtle); font: 11px/1.2 var(--font-mono); text-align: center; white-space: nowrap; }
.utility-menu { position: relative; flex: 0 0 auto; }
.utility-menu > summary { min-height: 36px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-raised); box-shadow: var(--control-shadow); cursor: pointer; list-style: none; }
.utility-menu > summary::-webkit-details-marker { display: none; }
.utility-menu > summary::after { content: "⌄"; margin-left: 7px; color: var(--subtle); }
.utility-menu[open] > summary::after { transform: rotate(180deg); }
.utility-popover { position: absolute; top: calc(100% + 9px); right: 0; z-index: 50; width: min(310px, calc(100vw - 24px)); display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); box-shadow: var(--shadow); }
.utility-links { display: flex; flex-wrap: wrap; gap: 7px; }
.utility-popover .theme-control { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.utility-popover .text-button { width: 100%; }
select, input {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--control-shadow);
}
select { padding: 0 30px 0 10px; }
input { padding: 8px 11px; }

.source-banner {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line));
  background: var(--warn-bg);
  color: var(--text);
  font-size: 12px;
}
.source-banner span { color: var(--muted); }

main { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 80px; }
.section, .hero { scroll-margin-top: var(--anchor-offset); }
.hero {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(580px, 1.6fr);
  align-items: end;
  gap: 42px;
  padding: 12px 0 32px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--subtle);
  font: 650 11px/1.4 var(--font-ui);
  letter-spacing: .12em;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--font-display); }
h1 { margin-bottom: 10px; font-size: clamp(30px, 3.3vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
.hero > div > p:last-child { max-width: 560px; margin: 0; color: var(--muted); }
.summary-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--summary-border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--summary-shell);
  box-shadow: var(--summary-shadow);
}
.summary-card {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  padding: 15px;
  border: 1px solid var(--summary-card-line);
  border-radius: max(0px, calc(var(--radius) - 8px));
  background: var(--summary-card);
  color: var(--summary-card-text);
  text-decoration: none;
}
.summary-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--summary-card-line)); }
.summary-card > * { position: relative; z-index: 1; }
.summary-card .label { display: flex; align-items: center; gap: 7px; color: var(--summary-card-muted); font-size: 11px; }
.summary-card .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--unknown); }
.summary-card.critical .label::before { background: var(--danger); }
.summary-card.warning .label::before { background: var(--warn); }
.summary-card.healthy .label::before { background: var(--good); }
.summary-card strong { display: block; margin-top: 15px; font: 700 29px/1 var(--data-font); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.summary-card small { display: block; margin-top: 8px; color: var(--summary-card-muted); font-size: 11px; }

.section { padding-top: 44px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.section-note { color: var(--muted); font-size: 12px; }
.section-actions { display: flex; align-items: center; gap: 10px; }
.quiet-button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font-size: var(--font-xs); }
.quiet-button:hover { background: var(--surface-soft); }

.site-ops-heading { align-items: center; }
.site-ops-heading .eyebrow { margin-bottom: 4px; }
.ops-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.privacy-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line));
  border-radius: 999px;
  background: var(--good-bg);
  color: var(--good);
  font-size: 11px;
  white-space: nowrap;
}
.privacy-badge[data-state="warning"] {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
  background: var(--warn-bg);
  color: var(--warn);
}
.source-disclosure { margin: -4px 0 10px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface-soft) 55%, transparent); }
.source-disclosure > summary { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 11px; color: var(--muted); font-size: var(--font-xs); cursor: pointer; list-style: none; }
.source-disclosure > summary::-webkit-details-marker { display: none; }
.source-disclosure > summary > span:last-child { color: var(--link); }
.ops-source-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0 10px 10px; }
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font: var(--font-xs)/1.3 var(--font-ui);
}
.source-chip > span { width: 6px; height: 6px; border-radius: 50%; background: var(--unknown); }
.source-chip.ok > span { background: var(--good); }
.source-chip.stale > span { background: var(--warn); }
.source-chip.error > span { background: var(--danger); }
.ops-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 10px; }
.ops-kpi {
  min-height: 86px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.ops-kpi.healthy { border-top-color: var(--good); }
.ops-kpi.warning { border-top-color: var(--warn); }
.ops-kpi.critical { border-top-color: var(--danger); }
.ops-kpi > span, .ops-kpi small { display: block; color: var(--subtle); font-size: var(--font-xs); }
.ops-kpi strong { display: block; margin: 8px 0 5px; overflow-wrap: anywhere; font: 700 clamp(18px, 1.7vw, 23px)/1.05 var(--data-font); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.site-ops-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 10px; }
.ops-panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.ops-health-panel { grid-column: span 7; }
.ops-reliability-panel { grid-column: span 5; }
.ops-rank-panel { grid-column: span 6; }
.ops-rank-panel.compact { grid-column: span 6; }
.ops-rank-panel.compact.wide { grid-column: 1 / -1; }
.ops-profile-panel { grid-column: span 6; }
.ops-backup-panel, .ops-business-panel { grid-column: 1 / -1; }
.ops-disclosure { grid-column: 1 / -1; overflow: clip; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--card-shadow); }
.ops-disclosure > summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 15px; cursor: pointer; list-style: none; }
.ops-disclosure > summary::-webkit-details-marker { display: none; }
.ops-disclosure > summary > span:first-child { display: grid; gap: 2px; }
.ops-disclosure > summary strong { font-size: var(--font-sm); }
.ops-disclosure > summary small, .ops-disclosure > summary > span:last-child { color: var(--subtle); font-size: var(--font-xs); }
.ops-disclosure > summary::after { content: "+"; width: 20px; color: var(--muted); font-size: 18px; text-align: center; }
.ops-disclosure[open] > summary::after { content: "−"; }
.ops-disclosure[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.ops-disclosure > .ops-panel { border: 0; border-radius: 0; box-shadow: none; }
.ops-disclosure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.ops-disclosure-grid .ops-panel { grid-column: auto; box-shadow: none; }
.ops-disclosure-grid .ops-panel.wide { grid-column: 1 / -1; }
.ops-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ops-panel-heading h3 { margin: 0 0 3px; font-size: 14px; }
.ops-panel-heading p, .ops-panel-heading > span { margin: 0; color: var(--subtle); font-size: var(--font-xs); }
.ops-panel-heading p a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 2px; }
.ops-panel-heading p a:hover { color: var(--link); }
.healthy-sites { margin-top: 2px; }
.healthy-sites > summary { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--good) 34%, var(--line)); border-radius: 8px; color: var(--good); cursor: pointer; list-style: none; }
.healthy-sites > summary::-webkit-details-marker { display: none; }
.healthy-sites > summary span { color: var(--subtle); font-size: var(--font-xs); }
.healthy-sites[open] > summary { margin-bottom: 4px; }
.attention-sites { margin-bottom: 10px; }
.unconfigured-sites { margin: 9px 2px 0; color: var(--subtle); font-size: var(--font-xs); }
.site-health-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }
.site-health-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: var(--font-xs);
}
.site-health-state { width: 8px; height: 8px; border-radius: 50%; background: var(--unknown); }
.site-health-state.healthy { background: var(--good); }
.site-health-state.degraded { background: var(--warn); }
.site-health-state.critical { background: var(--danger); }
.site-health-name { min-width: 0; }
.site-health-name a, .site-health-name > span { display: block; overflow: hidden; color: var(--text); font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.site-health-name a:hover { color: var(--link); }
.site-health-code, .site-health-latency { color: var(--muted); font: 11px/1.2 var(--font-mono); white-space: nowrap; }
.rank-list { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 7px 9px; }
.rank-index { color: var(--subtle); font: 11px var(--font-mono); text-align: right; }
.rank-label { overflow: hidden; font-size: var(--font-xs); text-overflow: ellipsis; white-space: nowrap; }
.rank-value { color: var(--muted); font: var(--font-xs) var(--font-mono); font-variant-numeric: tabular-nums; }
.rank-track { width: 100%; grid-column: 2 / -1; height: 3px; overflow: hidden; border: 0; border-radius: 999px; background: var(--surface-soft); appearance: none; }
.rank-track::-webkit-progress-bar { border-radius: inherit; background: var(--surface-soft); }
.rank-track::-webkit-progress-value { border-radius: inherit; background: var(--accent); opacity: .8; }
.rank-track::-moz-progress-bar { border-radius: inherit; background: var(--accent); opacity: .8; }
.request-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.request-profile-grid h4 { margin: 0 0 9px; color: var(--subtle); font-size: var(--font-xs); font-weight: 600; }
.rank-list.compact { gap: 6px; }
.rank-list.compact .rank-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; }
.rank-list.compact .rank-index { display: none; }
.rank-list.compact .rank-track { grid-column: 1 / -1; }
.panel-link { color: var(--link); font-size: var(--font-xs); text-decoration: none; white-space: nowrap; }
.panel-link:hover { text-decoration: underline; }
.access-log { overflow: hidden; border: 1px solid var(--line); border-radius: max(0px, calc(var(--radius) - 8px)); }
.access-log-row { display: grid; grid-template-columns: 72px minmax(110px, .8fr) 96px minmax(180px, 2fr) 72px; align-items: center; gap: 9px; min-height: 36px; padding: 5px 10px; border-top: 1px solid var(--line); font-size: var(--font-xs); }
.access-log-row:first-child { border-top: 0; }
.access-log-row:not(.access-log-head):hover { background: var(--surface-soft); }
.access-log-head { min-height: 30px; color: var(--subtle); background: var(--surface-soft); }
.access-log-row time, .access-log-latency { color: var(--muted); font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.access-log-site, .access-log-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-log-row code { color: var(--text); font: 11px var(--font-mono); }
.access-log-request { display: inline-flex; align-items: center; gap: 7px; }
.access-log-request b { min-width: 38px; font: 600 10px var(--font-mono); }
.access-log-request i { min-width: 33px; padding: 2px 5px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font: 600 10px var(--font-mono); text-align: center; }
.access-log-request i.healthy { color: var(--good); }
.access-log-request i.redirect { color: var(--accent); }
.access-log-request i.warning { color: var(--warn); }
.access-log-request i.critical { color: var(--danger); }
.status-stack { height: 10px; display: flex; overflow: hidden; margin: 5px 0 12px; border-radius: 999px; background: var(--surface-soft); }
.status-stack > span { min-width: 0; }
.status-2 { background: var(--good); }
.status-3 { background: var(--accent); }
.status-4 { background: var(--warn); }
.status-5 { background: var(--danger); }
.status-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 20px; }
.status-legend span { color: var(--subtle); font-size: var(--font-xs); }
.status-legend i { width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; }
.status-legend strong { display: block; margin: 4px 0 0 11px; color: var(--text); font: 650 13px var(--data-font); }
.latency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.latency-grid > div { padding: 12px; border: 1px solid var(--line); border-radius: max(0px, calc(var(--radius) - 8px)); background: var(--surface-soft); box-shadow: var(--inset-shadow); }
.latency-grid small { display: block; color: var(--subtle); font-size: var(--font-xs); }
.latency-grid strong { display: block; margin-top: 7px; font: 650 15px var(--data-font); font-variant-numeric: tabular-nums; }
.business-list { display: grid; }
.business-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(0, 3.1fr);
  align-items: stretch;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.business-row:first-child { border-top: 0; }
.business-row.degraded, .business-row.stale { border-left-color: var(--warn); }
.business-row.critical { border-left-color: var(--danger); }
.business-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 4px 8px;
  padding: 5px 8px 5px 10px;
}
.business-identity > strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.business-identity > small { grid-column: 1 / -1; overflow: hidden; color: var(--subtle); font-size: var(--font-xs); text-overflow: ellipsis; white-space: nowrap; }
.business-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font: 11px/1.2 var(--font-mono);
  white-space: nowrap;
}
.business-state > span { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--unknown); }
.business-state.healthy > span { background: var(--good); }
.business-state.degraded > span, .business-state.stale > span { background: var(--warn); }
.business-state.critical > span { background: var(--danger); }
.business-metrics { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.business-metric { min-width: 0; padding: 7px 11px; border-left: 1px solid var(--line); }
.business-metric > span, .business-metric > small { display: block; overflow: hidden; color: var(--subtle); font-size: var(--font-xs); text-overflow: ellipsis; white-space: nowrap; }
.business-metric > strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font: 650 clamp(13px, 1.15vw, 16px)/1.05 var(--data-font); font-variant-numeric: tabular-nums; }
.business-metric > small { margin-top: 3px; }
.backup-overview { display: grid; grid-template-columns: repeat(5, minmax(82px, 110px)) minmax(210px, 1fr); align-items: center; gap: 7px; margin-bottom: 9px; padding: 10px; border: 1px solid var(--line); border-radius: max(0px, calc(var(--radius) - 2px)); background: var(--surface-soft); box-shadow: var(--inset-shadow); }
.backup-overview > div { min-width: 0; padding: 1px 6px; border-left: 2px solid var(--good); }
.backup-overview > div.warning { border-left-color: var(--warn); }
.backup-overview strong, .backup-overview span { display: block; }
.backup-overview strong { font: 700 14px/1.1 var(--data-font); font-variant-numeric: tabular-nums; }
.backup-overview span { margin-top: 3px; color: var(--subtle); font-size: var(--font-xs); white-space: nowrap; }
.backup-overview p { margin: 0; padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: var(--font-xs); line-height: 1.45; }
.backup-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.backup-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: max(0px, calc(var(--radius) - 8px)); background: color-mix(in srgb, var(--surface-soft) 45%, var(--surface)); }
.backup-item.has-gap { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.backup-item > summary { min-height: 79px; display: grid; grid-template-columns: 8px minmax(0, 1fr) 14px; align-items: start; gap: 8px; padding: 10px; list-style: none; cursor: pointer; }
.backup-item > summary::-webkit-details-marker { display: none; }
.backup-item > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.backup-item[open] > summary { background: var(--surface-soft); }
.backup-state { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--unknown); }
.backup-state.healthy { background: var(--good); }
.backup-state.warning { background: var(--warn); }
.backup-state.critical { background: var(--danger); }
.backup-copy { min-width: 0; display: block; }
.backup-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.backup-title strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.backup-title > span { flex: none; color: var(--muted); font: 11px/1.2 var(--font-mono); white-space: nowrap; }
.backup-copy small { display: block; margin-top: 4px; overflow: hidden; color: var(--subtle); font-size: var(--font-xs); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.backup-copy .backup-gap { color: var(--warn); }
.backup-toggle { color: var(--subtle); font: 14px/1 var(--font-mono); transition: transform .16s ease; }
.backup-item[open] .backup-toggle { transform: rotate(180deg); }
.backup-details { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 9px 10px 10px 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--font-xs); }
.backup-details span { white-space: nowrap; }
.backup-details .backup-gap-detail { flex-basis: 100%; color: var(--warn); white-space: normal; }
.backup-footnote { margin: 9px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--subtle); font-size: var(--font-xs); line-height: 1.45; }
.ops-anomaly-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ops-anomaly { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 11px; border: 1px solid var(--line); border-left: 3px solid var(--unknown); border-radius: max(0px, calc(var(--radius) - 8px)); background: var(--surface-soft); }
.ops-anomaly.critical { border-left-color: var(--danger); }
.ops-anomaly.warning { border-left-color: var(--warn); }
.ops-anomaly > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--unknown-bg); color: var(--unknown); font-weight: 750; }
.ops-anomaly.critical > span { background: var(--danger-bg); color: var(--danger); }
.ops-anomaly.warning > span { background: var(--warn-bg); color: var(--warn); }
.ops-anomaly strong, .ops-anomaly small { display: block; }
.ops-anomaly strong { font-size: 11px; }
.ops-anomaly small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.ops-empty { padding: 18px 12px; border: 1px dashed var(--line); border-radius: max(0px, calc(var(--radius) - 3px)); color: var(--subtle); font-size: var(--font-xs); text-align: center; }
.ops-empty.wide { grid-column: 1 / -1; }
.ops-empty.healthy strong, .ops-empty.healthy span { display: block; }
.ops-empty.healthy strong { color: var(--good); }

.issue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.issue {
  min-height: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.issue.critical { border-left-color: var(--danger); }
.issue.warning { border-left-color: var(--warn); }
.issue.unknown { border-left-color: var(--unknown); }
.issue-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; }
.critical .issue-icon { color: var(--danger); background: var(--danger-bg); }
.warning .issue-icon { color: var(--warn); background: var(--warn-bg); }
.unknown .issue-icon { color: var(--unknown); background: var(--unknown-bg); }
.issue h3 { margin: 1px 0 5px; font-size: 14px; line-height: 1.35; }
.issue p { margin: 0; color: var(--muted); font-size: 12px; }
.issue-severity { display: inline-flex; margin-left: 5px; padding: 2px 5px; border: 1px solid currentColor; border-radius: 999px; color: var(--muted); font: 11px/1.2 var(--font-ui); vertical-align: .1em; }
.issue.critical .issue-severity { color: var(--danger); }
.issue.warning .issue-severity { color: var(--warn); }
.issue-meta { display: block; margin-top: 8px; color: var(--subtle); font: var(--font-xs)/1.3 var(--font-ui); }
.empty-state {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.empty-state strong { display: block; margin-bottom: 4px; color: var(--good); }
.empty-state.compact { padding: 14px 18px; text-align: left; }
.coverage-panel { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface-soft) 45%, transparent); }
.coverage-panel > summary { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px; color: var(--muted); cursor: pointer; list-style: none; }
.coverage-panel > summary::-webkit-details-marker { display: none; }
.coverage-panel > summary > span:first-child { color: var(--text); font-weight: 650; }
.coverage-panel > summary > span:last-child { font-size: var(--font-xs); }
.coverage-list { display: grid; gap: 0; padding: 0 12px 9px; }
.coverage-row { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 2.2fr); gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.coverage-row strong { font-size: var(--font-xs); }
.coverage-row span { color: var(--muted); font-size: var(--font-xs); }

.fleet-capacity { margin-bottom: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.capacity-heading { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.capacity-heading strong { color: var(--text); font: 700 12px var(--font-mono); }
.capacity-row { display: grid; grid-template-columns: 118px repeat(3, minmax(120px, 1fr)); margin: 0; }
.capacity-row + .capacity-row { border-top: 1px solid var(--line); }
.capacity-row.compute { grid-template-columns: 118px repeat(4, minmax(105px, .7fr)) minmax(260px, 1.5fr); }
.capacity-row > dt { display: flex; align-items: center; padding: 12px 14px; color: var(--text); font-weight: 650; }
.capacity-row > dd { min-width: 0; margin: 0; padding: 10px 14px; border-left: 1px solid var(--line); }
.capacity-row small { display: block; margin-bottom: 3px; color: var(--subtle); font-size: 10px; }
.capacity-row strong { display: block; overflow-wrap: anywhere; font: 650 13px/1.35 var(--font-mono); }
.node-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 10px; }
.node-card {
  position: relative;
  width: 100%;
  min-height: 218px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.node-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.node-card[data-selected="true"] { border-color: var(--accent); box-shadow: var(--inset-shadow), inset 0 0 0 1px var(--accent); }
.node-select { width: 100%; min-height: 184px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 10px 12px; padding: 14px 14px 11px; border: 0; background: transparent; color: var(--text); text-align: left; }
.node-head, .node-reading, .node-compute { grid-column: 1 / -1; }
.node-head { min-width: 0; display: flex; align-items: start; justify-content: space-between; gap: 7px; }
.node-name { min-width: 0; display: block; overflow: hidden; font-weight: 650; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.node-reading { color: var(--subtle); font: 11px/1.35 var(--font-mono); white-space: nowrap; }
.node-resource { min-width: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.node-resource small, .node-compute small { display: block; margin-bottom: 4px; color: var(--subtle); font-size: 10px; }
.node-resource strong { display: block; overflow-wrap: anywhere; font: 650 12px/1.3 var(--font-mono); }
.node-compute { min-width: 0; padding-top: 9px; border-top: 1px solid var(--line); }
.node-compute strong { display: block; overflow-wrap: anywhere; font: 650 12px/1.4 var(--font-ui); }
.node-compute em { display: block; margin-top: 3px; color: var(--subtle); font: normal 10px/1.45 var(--font-mono); }
.node-detail { width: 100%; min-height: 31px; padding: 5px 12px; border: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-soft) 55%, transparent); color: var(--link); font-size: var(--font-xs); text-align: right; }
.node-detail:hover { background: var(--surface-soft); }
.node-state, .status-pill { display: inline-flex; align-items: center; gap: 6px; }
.node-state { margin-top: 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.node-state::before, .status-pill::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--unknown); }
.node-state.stale::before { background: var(--warn); }
.node-state.unreachable::before { background: var(--danger); }
.node-state.unconfigured::before, .node-state.unknown::before { background: var(--unknown); }

.trend-heading-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; }
.history-range { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.history-range button { min-width: 47px; min-height: 30px; padding: 4px 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: 11px/1 var(--font-ui); white-space: nowrap; }
.history-range button:last-child { border-right: 0; }
.history-range button:hover { background: var(--surface-soft); color: var(--text); }
.history-range button[aria-pressed="true"] { background: var(--accent); color: var(--button-text); }
.history-range button:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chart-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--card-shadow); }
.chart-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.chart-heading h3 { margin-bottom: 3px; font-size: 14px; }
.chart-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.chart-value { font: 700 25px/1 var(--data-font); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.chart { min-height: 210px; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: 210px; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-label { fill: var(--subtle); font: 11px var(--font-mono); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.chart-warning { fill: color-mix(in srgb, var(--warn) 7%, transparent); }
.chart-danger { fill: color-mix(in srgb, var(--danger) 8%, transparent); }
.chart-empty { min-height: 210px; display: grid; place-items: center; color: var(--muted); text-align: center; }

.services-heading { margin-bottom: 13px; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 9px; margin-bottom: 12px; }
.search-field input { width: 100%; }
.app-list { display: grid; gap: 9px; }
.app-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--card-shadow); overflow: clip; }
.app-group > summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.app-group > summary::-webkit-details-marker { display: none; }
.app-group > summary::after { content: "+"; width: 24px; color: var(--muted); font-size: 20px; text-align: center; }
.app-group[open] > summary::after { content: "−"; }
.app-name { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 650; }
.app-name span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-counts { color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-pill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-pill.critical { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); background: var(--danger-bg); }
.status-pill.degraded { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); background: var(--warn-bg); }
.status-pill.healthy { color: var(--good); }
.status-pill.unknown { color: var(--unknown); }
.app-body { border-top: 1px solid var(--line); }
.app-link-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.app-link-strip > span:first-child { color: var(--subtle); font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
.app-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.service-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(105px, .6fr) minmax(0, 2fr);
  align-items: start;
  gap: 16px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-name { min-width: 0; }
.service-name strong { display: block; overflow-wrap: anywhere; }
.service-name small { color: var(--subtle); }
.replica-state { color: var(--muted); font-size: 12px; }
.container-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.container-table caption { text-align: left; color: var(--subtle); margin-bottom: 5px; }
.container-table th, .container-table td { padding: 6px 7px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.container-table tr:last-child td { border-bottom: 0; }
.container-table th { color: var(--subtle); font-size: 11px; letter-spacing: .04em; }
.container-table td:nth-last-child(-n+3), .container-table th:nth-last-child(-n+3) { text-align: right; }
.container-name { max-width: 240px; overflow-wrap: anywhere; }
.container-state { font-weight: 650; }
.container-state.bad { color: var(--danger); }
.container-state.warn { color: var(--warn); }
.mobile-containers { display: none; }

.node-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow);
}
.node-dialog::backdrop { background: rgba(2, 6, 12, .7); backdrop-filter: blur(5px); }
.dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); background: var(--surface-raised); }
.dialog-head h2 { margin: 0; }
#dialog-content { padding: 20px; }
.detail-status { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.detail-status p { color: var(--muted); }
.metric-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 22px; }
.metric-box { padding: 13px; border: 1px solid var(--line); border-radius: max(0px, calc(var(--radius) - 7px)); background: var(--surface-soft); box-shadow: var(--inset-shadow); }
.metric-box small { display: block; color: var(--subtle); }
.metric-box strong { display: block; margin-top: 6px; font: 700 18px/1.2 var(--data-font); font-variant-numeric: tabular-nums; }
.disk-table { width: 100%; border-collapse: collapse; }
.disk-table caption { margin-bottom: 8px; text-align: left; font-weight: 650; }
.disk-table th, .disk-table td { padding: 9px 7px; border-bottom: 1px solid var(--line); text-align: left; }
.disk-table th { color: var(--subtle); font-size: 11px; text-transform: uppercase; }
.disk-table td:last-child, .disk-table th:last-child { text-align: right; }
.disk-detail { display: block; margin-top: 3px; color: var(--subtle); font-size: 11px; line-height: 1.35; }

.toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; max-width: 360px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow); color: var(--text); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(410px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 22px; }
.login-card h1 { font-size: 29px; }
.login-copy { margin-bottom: 25px; color: var(--muted); }
.login-card label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 12px; }
.login-card input { width: 100%; }
.primary-button { width: 100%; margin-top: 22px; padding: 10px 14px; background: var(--accent); color: var(--button-text); font-weight: 750; }
.form-error { min-height: 20px; margin: 13px 0 0; color: var(--danger); font-size: 12px; }

/* Industrial: soft-machined panels around a high-contrast instrument readout. */
[data-theme="industrial"] .topbar {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom-color: rgba(118, 129, 138, .48);
  box-shadow: 0 8px 24px rgba(74, 84, 93, .08);
}
[data-theme="industrial"] .brand-mark {
  border-color: #424c53;
  background: linear-gradient(145deg, #31383e, #20262b);
  color: #ff7a32;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), var(--control-shadow);
}
[data-theme="industrial"] .eyebrow { color: var(--accent-strong); }
[data-theme="industrial"] :is(.eyebrow, .summary-card .label) {
  font-family: var(--font-mono);
  letter-spacing: .08em;
}
[data-theme="industrial"] .summary-grid::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 4px;
  right: 29px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef6a5b;
  box-shadow: 10px 0 #e7b44e, 20px 0 #64bb84;
  pointer-events: none;
}
[data-theme="industrial"] .summary-card {
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .66), inset 0 0 0 1px rgba(255, 255, 255, .035);
}
[data-theme="industrial"] .summary-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(143, 192, 158, .035) 4px 5px);
}
[data-theme="industrial"] :is(.node-card, .chart-card, .app-group) {
  border-color: rgba(118, 129, 138, .2);
}
[data-theme="industrial"] .issue {
  border-top-color: rgba(118, 129, 138, .2);
  border-right-color: rgba(118, 129, 138, .2);
  border-bottom-color: rgba(118, 129, 138, .2);
}
[data-theme="industrial"] .node-card { box-shadow: var(--control-shadow); }
[data-theme="industrial"] .node-card[data-selected="true"] {
  box-shadow: var(--inset-shadow), inset 0 0 0 1px var(--accent);
}
[data-theme="industrial"] .node-card:not([data-selected="true"]):hover {
  box-shadow: 0 5px 14px rgba(58, 68, 76, .14);
}
[data-theme="industrial"] .node-card[data-selected="true"]:hover {
  box-shadow: var(--inset-shadow), inset 0 0 0 1px var(--accent);
}
[data-theme="industrial"] .app-group[open] > summary,
[data-theme="industrial"] select:focus,
[data-theme="industrial"] input:focus {
  box-shadow: var(--inset-shadow);
}
[data-theme="industrial"] .chart-value,
[data-theme="industrial"] .metric-box strong { color: var(--accent-strong); }

/* Editorial: restrained newsprint rules, square modules and serif display type. */
[data-theme="editorial"] .topbar {
  border-bottom: 3px double var(--line-strong);
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  backdrop-filter: none;
}
[data-theme="editorial"] .brand-mark,
[data-theme="editorial"] .overall,
[data-theme="editorial"] :is(.tool-link, .text-button, .icon-button, .primary-button, .external-link, select, input) {
  border-radius: 0;
}
[data-theme="editorial"] .brand-mark {
  border-width: 2px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-display);
}
[data-theme="editorial"] .overall { background: transparent; }
[data-theme="editorial"] .eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
}
[data-theme="editorial"] :is(h1, h2) { letter-spacing: 0; }
[data-theme="editorial"] :is(.issue h3, .chart-heading h3, .ops-panel-heading h3, .brand strong, .disk-table caption) {
  font-family: var(--font-display);
}
[data-theme="editorial"] .hero { border-bottom: 3px double var(--line-strong); }
[data-theme="editorial"] .summary-grid {
  gap: 0;
  padding: 8px 0;
  border-width: 3px 0;
  border-style: double;
  border-radius: 0;
}
[data-theme="editorial"] .summary-card {
  border: 0;
  border-right: 1px solid var(--summary-card-line);
  border-radius: 0;
}
[data-theme="editorial"] .summary-card:last-child { border-right: 0; }
[data-theme="editorial"] .summary-card.critical strong { color: var(--danger); }
[data-theme="editorial"] .summary-card.warning strong { color: var(--warn); }
[data-theme="editorial"] .summary-card.healthy strong { color: var(--good); }
[data-theme="editorial"] .ops-summary-grid {
  gap: 0;
  padding: 5px 0;
  border-top: 3px double var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
[data-theme="editorial"] .ops-kpi {
  min-height: 72px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
[data-theme="editorial"] .ops-kpi:last-child { border-right: 0; }
[data-theme="editorial"] .ops-kpi.warning strong { color: var(--warn); }
[data-theme="editorial"] .backup-item { background: transparent; }
[data-theme="editorial"] .section-heading {
  padding-top: 11px;
  border-top: 2px solid var(--line-strong);
}
[data-theme="editorial"] .section-heading h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  background: var(--accent);
  vertical-align: .13em;
}
[data-theme="editorial"] :is(.node-card, .chart-card, .app-group) {
  border-color: var(--line-strong);
}
[data-theme="editorial"] .issue {
  border-top-color: var(--line-strong);
  border-right-color: var(--line-strong);
  border-bottom-color: var(--line-strong);
  border-left-width: 5px;
}
[data-theme="editorial"] .node-card[data-selected="true"] { background: var(--surface-soft); }
[data-theme="editorial"] .app-group[open] > summary { background: var(--surface-soft); }
[data-theme="editorial"] .app-link-strip { border-bottom-color: var(--line-strong); background: transparent; }
[data-theme="editorial"] :is(.skip-link, .status-pill, .issue-icon, .metric-box, .container-card, .node-dialog, .toast, .login-card, .privacy-badge, .source-chip, .business-state) {
  border-radius: 0;
}
[data-theme="editorial"] :is(.rank-track, .status-stack, .rank-track > span) { border-radius: 0; }
[data-theme="editorial"] .chart-line { stroke-width: 2.5; }
[data-theme="editorial"] .history-range { border-radius: 0; }

[data-theme="control-room"] body { background-size: 32px 32px, 32px 32px, auto; }
[data-theme="control-room"] .topbar { background: rgba(11, 17, 25, .94); }
[data-theme="control-room"] .brand-mark { box-shadow: inset 0 0 18px rgba(115, 168, 232, .12); }
[data-theme="control-room"] .summary-card {
  box-shadow: inset 0 0 18px rgba(20, 69, 111, .2), inset 0 0 0 1px rgba(115, 168, 232, .03);
}
[data-theme="control-room"] .summary-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(115, 168, 232, .025), transparent);
}

@media (max-width: 1260px) {
  :root { --anchor-offset: 142px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .overall { justify-self: end; }
  .top-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .hero { grid-template-columns: 1fr; }
  .ops-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .backup-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capacity-row.compute { grid-template-columns: 100px repeat(4, minmax(90px, .7fr)) minmax(210px, 1.3fr); }
}

@media (max-width: 1000px) {
  .ops-health-panel, .ops-reliability-panel { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --topbar-height: 62px; --anchor-offset: 136px; }
  .topbar { display: flex; flex-wrap: wrap; gap: 9px 14px; padding: 10px 16px; }
  .brand { flex: 1; }
  .brand > div span { display: none; }
  .overall { min-width: 0; padding: 7px 10px; }
  .section-nav { order: 4; width: 100%; justify-content: space-between; overflow-x: auto; }
  .section-nav a { flex: 1 0 auto; text-align: center; }
  .top-actions { width: 100%; justify-content: flex-end; padding-bottom: 1px; }
  .refresh-control span, .theme-control span { display: none; }
  .utility-popover .tool-link { display: inline-flex; }
  main { width: min(100% - 28px, 1380px); padding-top: 34px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-heading-actions { align-items: flex-end; flex-direction: column; }
  .site-health-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-health-panel, .ops-reliability-panel { grid-column: 1 / -1; }
  .ops-disclosure-grid { grid-template-columns: 1fr; }
  .ops-rank-panel, .ops-rank-panel.compact, .ops-profile-panel { grid-column: span 6; }
  .ops-backup-panel { grid-column: 1 / -1; }
  [data-theme="editorial"] .ops-kpi:nth-child(2n) { border-right: 0; }
  [data-theme="editorial"] .ops-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  [data-theme="editorial"] .summary-card:nth-child(2n) { border-right: 0; }
  [data-theme="editorial"] .summary-card:nth-child(-n+2) { border-bottom: 1px solid var(--summary-card-line); }
  .issue-list { grid-template-columns: 1fr; }
  .issue { min-height: auto; }
  .node-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capacity-row, .capacity-row.compute { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capacity-row > dt { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .capacity-row.compute > dd.capacity-models { grid-column: span 2; }
  .trend-grid { grid-template-columns: 1fr; }
  .trend-heading-actions { max-width: 62%; }
  .section-heading { align-items: start; }
  .section-note { max-width: 45%; text-align: right; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .service-row { grid-template-columns: 1fr auto; }
  .service-row > :last-child { grid-column: 1 / -1; }
  .business-row { grid-template-columns: minmax(150px, .8fr) minmax(0, 2.2fr); }
}

@media (max-width: 700px) {
  .access-log-row { grid-template-columns: 62px minmax(88px, .8fr) 84px minmax(140px, 1.6fr); }
  .access-log-row > :last-child { display: none; }
  .backup-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .backup-overview p { grid-column: 1 / -1; padding: 7px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 560px) {
  .request-profile-grid { grid-template-columns: 1fr; }
  .access-log { overflow-x: auto; }
  .access-log-row { min-width: 570px; }
  h1 { font-size: 34px; }
  .overall #data-age { display: none; }
  .text-button { padding-inline: 8px; }
  .hero { padding-bottom: 32px; }
  .summary-card { min-height: 98px; }
  .site-ops-heading { display: block; }
  .ops-heading-actions { max-width: none; margin-top: 12px; align-items: center; flex-direction: row; justify-content: space-between; }
  .privacy-badge { max-width: 58%; white-space: normal; text-align: left; }
  .ops-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-kpi { min-height: 84px; }
  .ops-rank-panel, .ops-rank-panel.compact, .ops-backup-panel { grid-column: 1 / -1; }
  .site-health-list, .backup-list { grid-template-columns: 1fr; }
  .ops-anomaly-list { grid-template-columns: 1fr; }
  .business-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .business-identity { padding-inline: 8px; }
  .business-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-metric { border-top: 1px solid var(--line); }
  .site-health-row { grid-template-columns: 9px minmax(0, 1fr) auto; }
  .site-health-latency { display: none; }
  .refresh-timing { font-size: var(--font-xs); }
  .section { padding-top: 36px; }
  .section-heading { display: block; }
  .section-heading.site-ops-heading { display: block; }
  .section-note { display: block; max-width: none; margin-top: 6px; text-align: left; }
  .trend-heading-actions { max-width: none; margin-top: 10px; align-items: flex-start; }
  .trend-heading-actions .section-note { margin-top: 0; }
  .history-range { width: 100%; }
  .history-range button { flex: 1 1 auto; min-width: 0; padding-inline: 6px; }
  .node-grid { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; }
  [data-theme="industrial"] .node-grid { padding: 8px 8px 12px; }
  .node-card { flex: 0 0 min(84vw, 280px); scroll-snap-align: start; }
  .chart-card { padding: 14px; }
  .chart, .chart svg, .chart-empty { min-height: 180px; height: 180px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .app-group > summary { grid-template-columns: minmax(0, 1fr) auto 20px; gap: 9px; padding-inline: 12px; }
  .app-counts { display: none; }
  .service-row { padding: 13px 12px; }
  .app-link-strip { align-items: flex-start; padding-inline: 12px; }
  .app-links { justify-content: flex-start; }
  .external-link { min-height: 32px; }
  .container-table { display: none; }
  .mobile-containers { display: grid; gap: 7px; grid-column: 1 / -1; }
  .container-card { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
  .container-card strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
  .container-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 12px; margin: 9px 0 0; }
  .container-card dt { color: var(--subtle); font-size: 11px; }
  .container-card dd { margin: 0; font-size: 11px; text-align: right; }
  .node-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .metric-list { grid-template-columns: repeat(2, 1fr); }
  .source-banner { display: block; padding-inline: 14px; }
  .source-banner strong, .source-banner span { display: block; }
}

@media (pointer: coarse) {
  :is(button, select, input, .tool-link, .external-link, .utility-menu > summary, .section-nav a) { min-height: 44px; }
}

.storage-search { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(150px, .3fr) auto auto; gap: 10px; align-items: end; margin: 18px 0; }
.storage-search label { display: grid; gap: 6px; color: var(--subtle); font-size: 12px; }
.storage-search input, .storage-search select { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: var(--text); background: var(--surface); }
.storage-volume-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.storage-volume { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.storage-volume strong, .storage-volume code { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.storage-volume code { color: var(--subtle); font-size: 11px; }
.storage-volume dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.storage-volume dl div { border-top: 1px solid var(--line); padding-top: 8px; }
.storage-volume dt { color: var(--subtle); font-size: 11px; }.storage-volume dd { margin: 3px 0 0; font-size: 12px; }
.storage-volume button { border: 0; padding: 0; color: var(--accent); background: transparent; cursor: pointer; }
.storage-search-results { margin-top: 14px; }.storage-search-results article { display: grid; gap: 3px; padding: 10px 4px; border-bottom: 1px solid var(--line); }.storage-search-results article span { color: var(--subtle); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .storage-search { grid-template-columns: 1fr 1fr; }.storage-search label:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
