/* ---- tokens.css ---- */
/* Lookout design tokens: the prototype's token blocks (docs/design/prototype.html,
   "Design tokens"), copied verbatim. A test (internal/web/tokens_test.go) requires every
   token here to equal the prototype's: change both or neither. */
/* ===== Design tokens (doc 07 §5d) ===== */
:root{
  color-scheme: light;
  --bg-page:#f6f7f8; --bg-surface:#ffffff; --bg-surface-2:#f0f2f4;
  --border:#d8dee4; --border-muted:#e6e8eb;
  --text:#1f2328; --text-2:#59636e; --text-muted:#69727c;
  --focus-ring:#0969da; --link:#0969da;
  --btn-bg:#f6f8fa; --btn-hover:#eceff2; --btn-primary-bg:#1f2328; --btn-primary-fg:#ffffff;
  --chart-grid:#e6e8eb; --chart-axis:#c9ced4; --chart-crosshair:#59636e; --chart-band-alpha:0.18;
  --ok-fg:#1a7f37;  --ok-fill:#1f883d;  --ok-subtle:#dafbe1;  --ok-on:#ffffff;
  --warn-fg:#9a6700;--warn-fill:#bf8700;--warn-subtle:#fff8c5;--warn-on:#1f2328;
  --crit-fg:#cf222e;--crit-fill:#cf222e;--crit-subtle:#ffebe9;--crit-on:#ffffff;
  --unk-fg:#59636e; --unk-fill:#818b98; --unk-subtle:#eff2f5; --unk-on:#1f2328;
  --maint-fg:#0969da;--maint-fill:#0969da;--maint-subtle:#ddf4ff;--maint-on:#ffffff;
  --series-1:#2a78d6; --series-2:#eb6834; --series-3:#1baf7a; --series-4:#eda100;
  --series-5:#de729b; --series-6:#008300; --series-7:#6250d6; --series-8:#e34948;
  --series-muted:#8e959e;
  --shadow-pop:0 8px 24px rgba(66,74,83,.14),0 1px 3px rgba(31,35,40,.12);
  --scrim:rgba(31,35,40,.5);
  --phone-bezel:#16191d;
  --font-sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --space-1:2px;--space-2:4px;--space-3:8px;--space-4:12px;--space-5:16px;--space-6:24px;--space-7:32px;--space-8:48px;--space-9:64px;
  --pad:16px; --gap:16px; --row-h:40px;
  --topbar-h:52px; --tabbar-h:0px; --sticky-bottom:0px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme: dark;
    --bg-page:#0f1114; --bg-surface:#1a1d21; --bg-surface-2:#22262b;
    --border:#30363d; --border-muted:#2a2f36;
    --text:#e6edf3; --text-2:#9198a1; --text-muted:#8b939c;
    --focus-ring:#4493f8; --link:#4493f8;
    --btn-bg:#22262b; --btn-hover:#2a2f36; --btn-primary-bg:#e6edf3; --btn-primary-fg:#0f1114;
    --chart-grid:#2a2f36; --chart-axis:#3d444d; --chart-crosshair:#9198a1;
    --ok-fg:#3fb950;  --ok-fill:#2ea043;  --ok-subtle:#1e3527;  --ok-on:#0f1114;
    --warn-fg:#d29922;--warn-fill:#bb8009;--warn-subtle:#372f1d;--warn-on:#0f1114;
    --crit-fg:#ff7b72;--crit-fill:#da3633;--crit-subtle:#3d2224;--crit-on:#ffffff;
    --unk-fg:#9198a1; --unk-fill:#656c76; --unk-subtle:#282b30; --unk-on:#ffffff;
    --maint-fg:#4493f8;--maint-fill:#1f6feb;--maint-subtle:#1b2c45;--maint-on:#ffffff;
    --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500;
    --series-5:#d55181; --series-6:#008300; --series-7:#9085e9; --series-8:#e66767;
    --series-muted:#606973;
    --shadow-pop:0 8px 28px rgba(0,0,0,.55),0 0 0 1px #30363d;
    --scrim:rgba(0,0,0,.62);
    --phone-bezel:#000000;
  }
}
:root[data-theme="dark"]{
  color-scheme: dark;
  --bg-page:#0f1114; --bg-surface:#1a1d21; --bg-surface-2:#22262b;
  --border:#30363d; --border-muted:#2a2f36;
  --text:#e6edf3; --text-2:#9198a1; --text-muted:#8b939c;
  --focus-ring:#4493f8; --link:#4493f8;
  --btn-bg:#22262b; --btn-hover:#2a2f36; --btn-primary-bg:#e6edf3; --btn-primary-fg:#0f1114;
  --chart-grid:#2a2f36; --chart-axis:#3d444d; --chart-crosshair:#9198a1;
  --ok-fg:#3fb950;  --ok-fill:#2ea043;  --ok-subtle:#1e3527;  --ok-on:#0f1114;
  --warn-fg:#d29922;--warn-fill:#bb8009;--warn-subtle:#372f1d;--warn-on:#0f1114;
  --crit-fg:#ff7b72;--crit-fill:#da3633;--crit-subtle:#3d2224;--crit-on:#ffffff;
  --unk-fg:#9198a1; --unk-fill:#656c76; --unk-subtle:#282b30; --unk-on:#ffffff;
  --maint-fg:#4493f8;--maint-fill:#1f6feb;--maint-subtle:#1b2c45;--maint-on:#ffffff;
  --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500;
  --series-5:#d55181; --series-6:#008300; --series-7:#9085e9; --series-8:#e66767;
  --series-muted:#606973;
  --shadow-pop:0 8px 28px rgba(0,0,0,.55),0 0 0 1px #30363d;
  --scrim:rgba(0,0,0,.62);
  --phone-bezel:#000000;
}
/* Color-blind-safe status palette (validated all-pairs; maintenance becomes slate + hatch) */
:root[data-status="cvd"]{ --ok-fg:#0969da; --ok-fill:#0969da; --ok-subtle:#ddf4ff; --ok-on:#ffffff;
  --maint-fg:#59636e; --maint-fill:#818b98; --maint-subtle:#eff2f5; --maint-on:#1f2328; }
@media (prefers-color-scheme: dark){
  :root[data-status="cvd"]:not([data-theme="light"]){ --ok-fg:#388bfd; --ok-fill:#388bfd; --ok-subtle:#16263f; --ok-on:#0f1114;
    --warn-fill:#c98500; --crit-fg:#ed627e; --crit-fill:#ce4565; --crit-subtle:#3d2230;
    --maint-fg:#9198a1; --maint-fill:#656c76; --maint-subtle:#282b30; --maint-on:#ffffff; }
}
:root[data-status="cvd"][data-theme="dark"]{ --ok-fg:#388bfd; --ok-fill:#388bfd; --ok-subtle:#16263f; --ok-on:#0f1114;
  --warn-fill:#c98500; --crit-fg:#ed627e; --crit-fill:#ce4565; --crit-subtle:#3d2230;
  --maint-fg:#9198a1; --maint-fill:#656c76; --maint-subtle:#282b30; --maint-on:#ffffff; }
:root[data-density="compact"]{ --pad:12px; --gap:12px; --row-h:32px; }

/* ---- base.css ---- */
/* Base: the prototype's base, layout, buttons and inputs (docs/design/prototype.html),
   WP 0a. The parts are concatenated in this order into one served file: tokens.css,
   base.css, components.css, then every other part in name order (assets.go). */
/* ===== Base ===== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg-page);scroll-padding-top:calc(var(--topbar-h) + 16px);scroll-padding-bottom:calc(var(--sticky-bottom) + 16px)}
body{margin:0;min-height:100vh;background:var(--bg-page);color:var(--text);font:400 14px/20px var(--font-sans);-webkit-font-smoothing:antialiased;padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px));overflow-x:hidden}
h1,h2,h3,h4,p,ul,ol,dl,dd,figure{margin:0}
h1{font-size:20px;line-height:28px;font-weight:600;letter-spacing:-.005em}
h2{font-size:16px;line-height:24px;font-weight:600}
h3{font-size:14px;line-height:20px;font-weight:600}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
code,.mono{font-family:var(--font-mono);font-size:12.5px}
.tnum,.n,time,.tv,.ts{font-variant-numeric:tabular-nums}
.muted{color:var(--text-muted)} .t2{color:var(--text-2)} .small{font-size:12px;line-height:16px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}
.skip{position:absolute;left:8px;top:-80px;z-index:200;background:var(--bg-surface);color:var(--text);padding:8px 12px;border-radius:6px;border:1px solid var(--border)}
.skip:focus{top:8px}
.wrap{max-width:1440px;margin:0 auto;padding-left:max(16px, env(safe-area-inset-left, 0px));padding-right:max(16px, env(safe-area-inset-right, 0px))}
.i{width:16px;height:16px;flex:none;vertical-align:-3px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.i-sm{width:14px;height:14px;vertical-align:-2px} .i-lg{width:20px;height:20px} .i-xl{width:24px;height:24px}
.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ml-auto{margin-left:auto}
.hide{display:none!important}
kbd{font:600 11px/16px var(--font-mono);padding:0 5px;border:1px solid var(--border);border-bottom-width:2px;border-radius:4px;color:var(--text-2);background:var(--bg-surface)}
hr.sep{border:0;border-top:1px solid var(--border-muted);margin:12px 0}

/* ===== Buttons, inputs ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--btn-bg);color:var(--text);font-weight:500;font-size:14px;white-space:nowrap;text-decoration:none;line-height:1}
.btn:hover{background:var(--btn-hover);text-decoration:none}
.btn-primary{background:var(--btn-primary-bg);color:var(--btn-primary-fg);border-color:transparent}
.btn-primary:hover{background:var(--btn-primary-bg);opacity:.88}
.btn-sm{height:26px;padding:0 9px;font-size:13px}
.btn-lg{height:40px;padding:0 16px;font-size:15px}
.btn-block{width:100%}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn-ghost{background:transparent;border-color:transparent}
.btn-danger{color:var(--crit-fg)}
.btn.is-done{background:var(--bg-surface-2);color:var(--text-2)}
.input,.select{height:34px;padding:0 10px;border:1px solid var(--border);border-radius:6px;background:var(--bg-surface);color:var(--text);min-width:0;font-size:14px}
.select{padding-right:6px;max-width:100%}
textarea.input{height:auto;padding:8px 10px;min-height:76px;resize:vertical;line-height:20px}
.input:focus-visible,.select:focus-visible{outline:2px solid var(--focus-ring);outline-offset:0;border-color:var(--focus-ring)}
.input[aria-invalid="true"]{border-color:var(--crit-fg)}
.field{display:grid;gap:6px;margin-bottom:14px}
.field>label,.flabel{font-weight:600;font-size:13px}
.hint{font-size:12px;line-height:16px;color:var(--text-muted)}
.err{font-size:12px;line-height:16px;color:var(--crit-fg);display:flex;gap:4px;align-items:center}
.check{display:flex;gap:8px;align-items:flex-start;font-size:14px}
.check input{margin:3px 0 0;width:16px;height:16px;accent-color:var(--focus-ring)}
.sw{position:relative;width:36px;height:20px;border-radius:10px;border:1px solid var(--border);background:var(--bg-surface-2);padding:0;flex:none}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--text-muted)}
.sw[aria-checked="true"]{background:var(--focus-ring);border-color:var(--focus-ring)}
.sw[aria-checked="true"]::after{left:18px;background:#fff}

/* ===== Layout ===== */
main{display:block;outline:none}
.sec{margin-top:28px}
.sec-h{display:flex;align-items:baseline;gap:8px 12px;margin-bottom:10px;flex-wrap:wrap}
.sec-h .sub{color:var(--text-muted);font-size:12px}
.sec-h .ml-auto{font-size:13px}
.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap)}
.g21{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:var(--gap)}
.g12{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:var(--gap)}
@media (max-width: 980px){ .g2,.g3,.g21,.g12{grid-template-columns:minmax(0,1fr)} }
.stack{display:flex;flex-direction:column;gap:var(--gap)}
.card{background:var(--bg-surface);border:1px solid var(--border);border-radius:6px;min-width:0}
.card-h{display:flex;align-items:center;gap:8px;padding:8px var(--pad);border-bottom:1px solid var(--border-muted);min-height:44px;flex-wrap:wrap}
.card-h h2,.card-h h3{font-size:14px;line-height:20px;font-weight:600}
.card-h .agg{font-weight:400;color:var(--text-muted)}
.card-b{padding:var(--pad)}
.card-b.flush{padding:0}
.card-f{padding:8px var(--pad);border-top:1px solid var(--border-muted);font-size:12px;line-height:16px;color:var(--text-muted);display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.empty{display:flex;gap:10px;align-items:flex-start;padding:16px;color:var(--text-2)}
.inline-alert{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-radius:6px;border:1px solid var(--border);background:var(--bg-surface)}
.inline-alert.info{background:var(--maint-subtle);border-color:transparent;color:var(--text)}
.inline-alert.info>.i{color:var(--maint-fg)}
.inline-alert.warn{background:var(--warn-subtle);border-color:transparent;color:var(--text)}
.inline-alert.warn>.i{color:var(--warn-fg)}
.inline-alert.crit{background:var(--crit-subtle);border-color:transparent;color:var(--text)}
.inline-alert.crit>.i{color:var(--crit-fg)}
.inline-alert .i{margin-top:2px}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;font-size:13px}
.kv dt{color:var(--text-muted)}
.kv dd{min-width:0;overflow-wrap:anywhere}
.kv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px 24px;font-size:13px}
.kv-grid div{display:flex;flex-direction:column;min-width:0}
.kv-grid dt{color:var(--text-muted);font-size:12px}
.kv-grid dd{overflow-wrap:anywhere}
.jump{display:flex;gap:6px 14px;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--text-muted);padding:8px 0 0}
.jump a{font-weight:500}
.scope{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:16px;font-weight:600;letter-spacing:.02em;padding:1px 6px;border-radius:4px;border:1px solid var(--border);color:var(--text-2);white-space:nowrap}
.scope.shared{border-style:dashed;color:var(--text-2)}
.chip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 8px;border-radius:12px;border:1px solid var(--border);background:var(--bg-surface-2);font-size:12px;white-space:nowrap;color:var(--text)}
.chip button{border:0;background:none;padding:0;display:inline-grid;place-items:center;color:var(--text-muted);width:16px;height:16px;border-radius:50%}
.chip button:hover{color:var(--text);background:var(--border-muted)}
.chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.role{display:inline-flex;height:20px;align-items:center;padding:0 7px;border-radius:10px;font-size:12px;font-weight:600;border:1px solid var(--border);background:var(--bg-surface-2);color:var(--text)}
.role.owner{background:var(--text);color:var(--bg-surface);border-color:transparent}

/* ---- components.css ---- */
/* Components: the chrome and the UI kit's parts (docs/design/prototype.html), WP 0a.
   Changes from the prototype: no prototype badge or Screens index (screens.md C18); meters
   and bars are SVG (C20); the mail banner is new (C19). Page groups add their own parts
   (overview.css, alerts.css, …), owned by their work packages. */

/* The icon sprite, inline in each page, takes no room. */
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.hatch-r{fill:var(--maint-fill)}

/* ===== Top bar ===== */
.topbar{position:sticky;top:0;z-index:40;background:var(--bg-surface);border-bottom:1px solid var(--border)}
.topbar-in{display:flex;align-items:center;gap:12px;height:var(--topbar-h)}
.brand{display:flex;align-items:center;gap:8px;font-weight:650;font-size:15px;color:var(--text);white-space:nowrap;margin-right:8px}
.brand:hover{text-decoration:none}
.logo{width:26px;height:26px;border-radius:7px;background:var(--text);color:var(--bg-surface);display:grid;place-items:center;flex:none}
.logo .i{width:17px;height:17px;stroke-width:2.4}
.mainnav{display:flex;align-items:center;gap:2px;flex:1;min-width:0}
.nav-a{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border-radius:6px;color:var(--text-2);font-weight:500;background:none;border:0;white-space:nowrap;font-size:14px}
.nav-a:hover{background:var(--bg-surface-2);color:var(--text);text-decoration:none}
.nav-a[aria-current="page"]{color:var(--text);background:var(--bg-surface-2);font-weight:600}
.nav-a .i-sm{opacity:.7}
.badge{display:inline-block;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--crit-fill);color:var(--crit-on);font-size:11px;line-height:18px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.badge.zero{background:var(--bg-surface-2);color:var(--text-2)}
.tb-right{display:flex;align-items:center;gap:6px;margin-left:auto}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--bg-surface-2);border:1px solid var(--border);font-size:12px;font-weight:700;color:var(--text)}


/* ===== Menus & popovers ===== */
.dd{position:relative;display:inline-flex}
.menu{position:absolute;top:calc(100% + 6px);left:0;z-index:70;min-width:230px;background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow-pop);padding:6px;color:var(--text)}
.menu[hidden]{display:none}
.menu-r{left:auto;right:0}
.menu-up{top:auto;bottom:calc(100% + 6px)}
.mi{display:flex;align-items:center;gap:8px;width:100%;min-height:34px;padding:6px 10px;border:0;background:none;border-radius:6px;color:var(--text);text-align:left;font-size:14px;text-decoration:none;white-space:nowrap}
.mi:hover,.mi:focus-visible{background:var(--bg-surface-2);text-decoration:none;outline-offset:-2px}
.mi .sub{margin-left:auto;padding-left:16px;color:var(--text-muted);font-size:12px}
.mi[aria-checked="true"] .chk{visibility:visible} .mi .chk{visibility:hidden}
.mi[aria-checked] .chk{color:var(--text)}
.msep{height:1px;background:var(--border-muted);margin:6px 4px}
.mhead{padding:6px 10px 4px;font-size:12px;line-height:16px;color:var(--text-muted);font-weight:600}
.mwho{padding:8px 10px}
.mwho b{display:block}
.pop{padding:12px;min-width:260px}


/* ===== Global incident banner ===== */
.gbanner{border-bottom:1px solid var(--border)}
.gbanner.crit{background:var(--crit-fill);color:var(--crit-on);border-color:transparent}
.gbanner.acked{background:var(--warn-subtle);color:var(--text)}
.gb-in{display:flex;align-items:center;gap:8px 12px;min-height:44px;padding-top:6px;padding-bottom:6px;flex-wrap:wrap}
.gb-msg{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 320px}
.gb-msg strong{letter-spacing:.04em;font-size:12px}
.gb-acts{display:flex;gap:8px}
.gbanner.crit .btn{background:transparent;color:var(--crit-on);border-color:currentColor}
.gbanner.crit .btn:hover{background:rgba(255,255,255,.14)}
.gbanner.crit .btn-primary{background:var(--crit-on);color:var(--crit-fill);border-color:transparent}

/* The mail banner (new, screens.md "Chrome"): the mail path is failing. */
.gbanner.mail{background:var(--crit-subtle);color:var(--text);border-color:transparent}
.gbanner.mail .gb-msg>.i{color:var(--crit-fg)}

/* ===== Page header, time picker, freshness ===== */
.ph{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 20px;padding:20px 0 14px}
.ph-main{flex:1 1 380px;min-width:0}
.ph-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ph-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;max-width:100%}
.ph-tools>label{min-width:0;max-width:100%}
.ph-tools>label>.select{max-width:min(100%, 340px)}
.crumbs{display:flex;gap:6px;align-items:center;font-size:13px;color:var(--text-muted);margin-bottom:2px}
.crumbs a{color:var(--text-2)}
.facts{color:var(--text-2);margin-top:4px;display:flex;flex-wrap:wrap;gap:0 6px;font-size:13px}
.facts>span:not(:first-child)::before{content:"·";margin-right:6px;color:var(--text-muted)}
.fresh{flex-basis:100%;font-size:12px;line-height:16px;color:var(--text-muted);display:flex;gap:4px 6px;flex-wrap:wrap;align-items:center;min-height:22px}
.fdot{width:7px;height:7px;border-radius:50%;background:var(--ok-fill);display:inline-block}
.fdot.paused{background:var(--unk-fill)}
.seg{display:inline-flex;align-items:center;background:var(--bg-surface-2);border:1px solid var(--border);border-radius:6px;padding:2px;gap:2px}
.seg>button,.seg>.dd>button{height:26px;padding:0 9px;border:0;background:none;border-radius:4px;color:var(--text-2);font-weight:500;font-size:13px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.seg>button:hover,.seg>.dd>button:hover{color:var(--text)}
.seg>button[aria-pressed="true"],.seg>.dd>button[aria-pressed="true"],.seg>button[aria-selected="true"]{background:var(--bg-surface);color:var(--text);box-shadow:0 0 0 1px var(--border),0 1px 2px rgba(0,0,0,.08)}
.ibtn{width:30px;height:30px;display:inline-grid;place-items:center;border:1px solid var(--border);background:var(--bg-surface);border-radius:6px;color:var(--text-2);padding:0;flex:none}
.ibtn:hover{color:var(--text);background:var(--btn-hover)}
.ibtn:disabled{opacity:.4;cursor:not-allowed}
.ibtn-s{width:26px;height:26px;border-color:transparent;background:transparent}
.live{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--border);border-radius:6px;background:var(--bg-surface);font-weight:500;font-size:13px;white-space:nowrap}
.live .dot{width:8px;height:8px;border-radius:50%;background:var(--ok-fill)}
.live[aria-pressed="false"]{color:var(--text-2)}
.cform{display:grid;gap:10px}
.cform label{display:grid;gap:4px;font-size:12px;font-weight:600;color:var(--text-2)}


/* ===== Status ===== */
.pill{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px 0 6px;border-radius:4px;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;background:var(--unk-subtle);color:var(--unk-fg);vertical-align:middle}
.pill.ok{background:var(--ok-subtle);color:var(--ok-fg)}
.pill.warn{background:var(--warn-subtle);color:var(--warn-fg)}
.pill.crit{background:var(--crit-subtle);color:var(--crit-fg)}
.pill.maint{background:var(--maint-subtle);color:var(--maint-fg)}
.pill.acked{background:var(--warn-subtle);color:var(--text)}
.pill.solid.ok{background:var(--ok-fill);color:var(--ok-on)}
.pill.solid.warn{background:var(--warn-fill);color:var(--warn-on)}
.pill.solid.crit{background:var(--crit-fill);color:var(--crit-on)}
.pill.solid.maint{background:var(--maint-fill);color:var(--maint-on)}
.pill.lg{height:auto;min-height:26px;font-size:13px;padding:4px 10px 4px 8px;white-space:normal;line-height:16px;max-width:100%}
.si{display:inline-flex;align-items:center;vertical-align:middle}
.si.ok,.c-ok{color:var(--ok-fg)} .si.warn,.c-warn{color:var(--warn-fg)} .si.crit,.c-crit{color:var(--crit-fg)}
.si.unk,.c-unk{color:var(--unk-fg)} .si.maint,.c-maint{color:var(--maint-fg)} .si.acked{color:var(--text-2)}
.val-warn{color:var(--warn-fg);font-weight:600} .val-crit{color:var(--crit-fg);font-weight:600}
.gstat{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;padding:12px 16px;border-radius:6px;border:1px solid var(--border);background:var(--bg-surface);margin-bottom:var(--gap)}
.gstat.crit{border-color:var(--crit-fill);box-shadow:inset 4px 0 0 var(--crit-fill)}
.gstat.warn{border-color:var(--warn-fill);box-shadow:inset 4px 0 0 var(--warn-fill)}
.gstat.ok{box-shadow:inset 4px 0 0 var(--ok-fill)}
.gs-main{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;font-size:16px;line-height:24px;font-weight:600}
.gs-main>span{display:inline-flex;align-items:center;gap:6px}
.gs-sub{color:var(--text-2);font-size:13px}


/* ===== Stat tiles, sparklines, meters ===== */
.tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--gap)}
@media (max-width:1200px){.tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:560px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile .ts{white-space:normal}}
.tile{display:flex;flex-direction:column;gap:2px;padding:11px 13px 10px;background:var(--bg-surface);border:1px solid var(--border);border-radius:6px;color:var(--text);min-width:0;min-height:118px}
a.tile:hover{border-color:var(--text-muted);text-decoration:none}
.tile.is-warn{box-shadow:inset 3px 0 0 var(--warn-fill)}
.tile.is-crit{box-shadow:inset 3px 0 0 var(--crit-fill)}
.tl{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:600;letter-spacing:.02em;color:var(--text-2);text-transform:uppercase;min-height:16px}
.tl .si{margin-left:auto}
.tl .scope{text-transform:none;letter-spacing:0;margin-left:auto}
.tv{font-size:24px;line-height:32px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv small{font-size:13px;font-weight:500;color:var(--text-2);margin-left:3px}
.tv.c-crit,.tv.c-warn{color:inherit}
.tv .vc{color:var(--crit-fg)} .tv .vw{color:var(--warn-fg)}
.ts{font-size:12px;line-height:16px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tfoot{margin-top:auto;padding-top:6px}
.spark{display:block;width:100%;height:28px;overflow:visible}
.spark.sm{height:22px}
.spark .sl{fill:none;stroke:var(--series-1);stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.spark .sa{fill:var(--series-1);opacity:.14}
.spark .sl2{fill:none;stroke:var(--series-2);stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.spark .sa2{fill:var(--series-2);opacity:.14}
.spark .sref{stroke:var(--text-muted);stroke-width:1;vector-effect:non-scaling-stroke;stroke-dasharray:3 2}
.spark .s0{stroke:var(--chart-axis);stroke-width:1;vector-effect:non-scaling-stroke}
.spark .shatch{fill:url(#hatch-maint)}
.spark.s-crit .sl{stroke:var(--series-1)}
/* Meters and bars draw their fill as SVG, whose sizes are attributes: the CSP allows no
   style attributes (spec §4.8, screens.md C20). Same look as the prototype's. */
.meter{display:block;position:relative;height:8px;border-radius:4px;background:var(--bg-surface-2);box-shadow:inset 0 0 0 1px var(--border-muted)}
.meter>svg{display:block;width:100%;height:100%;overflow:visible;border-radius:4px}
.meter .m-bar{fill:var(--series-1)}
.meter.warn .m-bar{fill:var(--warn-fill)} .meter.crit .m-bar{fill:var(--crit-fill)}
.meter .m-tick{stroke:var(--warn-fg);stroke-width:2;vector-effect:non-scaling-stroke}
.meter .m-tick.c{stroke:var(--crit-fg)}
.meter.mini{height:6px;width:56px;display:inline-block;vertical-align:middle}
.mcell{display:inline-flex;align-items:center;gap:8px}
.hbar{display:block;height:8px;border-radius:2px;background:var(--bg-surface-2);min-width:60px;position:relative;overflow:hidden}
.hbar>svg{display:block;width:100%;height:100%}
.hbar .h-bar{fill:var(--series-1);opacity:.85}
.hbar .h-bar.ix{fill:var(--series-3)}


/* ===== Tables ===== */
.tw{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%;position:relative}
table.t{width:100%;border-collapse:collapse;font-size:13px;line-height:20px}
.t th{background:var(--bg-surface-2);color:var(--text-2);font-weight:600;font-size:12px;text-align:left;padding:6px 12px;border-bottom:1px solid var(--border);white-space:nowrap;height:34px}
.t thead th:first-child{border-top-left-radius:5px} .t thead th:last-child{border-top-right-radius:5px}
.t td{padding:4px 12px;height:var(--row-h);border-bottom:1px solid var(--border-muted);white-space:nowrap;vertical-align:middle}
.t tbody tr:last-child td{border-bottom:0}
.t .n{text-align:right;font-variant-numeric:tabular-nums}
.t th.n{text-align:right}
.t tbody tr:hover{background:var(--bg-surface-2)}
.t tr.rl{cursor:pointer}
.t tr.total td{font-weight:600;background:var(--bg-surface-2)}
.t tr.grp td{background:var(--bg-surface-2);font-weight:600;height:32px;font-size:12px;color:var(--text-2)}
.t td.wrap-cell{white-space:normal;min-width:260px}
.t .sub{display:block;font-size:12px;line-height:16px;color:var(--text-muted)}
.t .spark{width:110px}
.t .namecell{font-weight:600}
.t .namecell a{color:var(--text)}
.t .namecell a:hover{color:var(--link)}
.sortb{border:0;background:none;padding:0;font:inherit;color:inherit;display:inline-flex;gap:2px;align-items:center}
.sortb:hover{color:var(--text)}
.sql{font-family:var(--font-mono);font-size:12px;line-height:18px;color:var(--text);white-space:normal;word-break:break-word;display:block;max-width:520px}
.t td.sqlc{white-space:normal;min-width:280px}
@media (max-width:760px){
  .t-cards thead{display:none}
  .t-cards,.t-cards tbody{display:block}
  .t-cards tr{display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;padding:12px 14px;border-bottom:1px solid var(--border-muted)}
  .t-cards tr:last-child{border-bottom:0}
  .t-cards td{display:flex;justify-content:space-between;align-items:center;gap:8px;border:0;padding:0;height:auto;white-space:nowrap;min-width:0}
  /* A label is never broken, beside a value that wraps anywhere either (an address: "Em ail"). */
  .t-cards td::before{content:attr(data-label);color:var(--text-muted);font-size:12px;font-weight:400;white-space:nowrap;overflow-wrap:normal;flex-shrink:0}
  .t-cards td.c-head{grid-column:1/-1;justify-content:flex-start}
  .t-cards td.c-head::before{display:none}
  .t-cards td.c-wide{grid-column:1/-1}
  .t-cards .spark{width:120px}
}


/* ===== Charts ===== */
.cb-chart{padding:8px 12px 10px}
.legend{display:flex;flex-wrap:wrap;gap:2px 4px;min-height:26px;margin:0 0 4px}
.lg{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 6px;border:0;background:none;border-radius:4px;font-size:12px;color:var(--text-2)}
.lg:hover{background:var(--bg-surface-2)}
.lg[aria-pressed="false"]{opacity:.45}
.lg[aria-pressed="false"] .swc{background:transparent!important;box-shadow:inset 0 0 0 1.5px var(--text-muted)}
.lg b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums;min-width:3.5em;text-align:left}
.swc{display:inline-block;width:10px;height:10px;border-radius:2px;flex:none}
.swc.line{height:3px;border-radius:2px}
.chart{position:relative;width:100%;border-radius:4px}
.chart:focus-visible{outline-offset:4px}
.chart .uplot{width:100%}
.chart .u-select{background:color-mix(in srgb, var(--focus-ring) 14%, transparent)}
.chart .u-hz .u-cursor-x{border-right:1px solid var(--chart-crosshair)}
.chart .u-over{cursor:crosshair}
.chart-err{display:grid;place-items:center;height:100%;color:var(--text-muted);font-size:13px;text-align:center;padding:16px;border:1px dashed var(--border);border-radius:6px}
.ctip{position:absolute;z-index:6;pointer-events:none;background:var(--bg-surface);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow-pop);border-radius:6px;padding:6px 8px;font-size:12px;line-height:18px;min-width:150px;font-variant-numeric:tabular-nums}
.ctip[hidden]{display:none}
.ct-t{font-weight:600;color:var(--text-2);margin-bottom:2px}
.ct-r{display:flex;align-items:center;gap:6px}
.ct-r span{flex:1;color:var(--text-2)}
.ct-r b{font-weight:600}
.twin{margin-top:6px;font-size:12px}
.twin>summary{cursor:pointer;color:var(--text-muted);width:max-content;padding:2px 0;list-style:none}
.twin>summary::-webkit-details-marker{display:none}
.twin>summary::before{content:"▸ ";}
.twin[open]>summary::before{content:"▾ ";}
.twin>summary:hover{color:var(--text)}
.twin-b{max-height:260px;overflow:auto;margin-top:6px;border:1px solid var(--border-muted);border-radius:4px}
.twin-b .t td{height:28px}


/* ===== Uptime strips & heartbeat ===== */
.ur{display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr) auto;gap:6px 16px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-muted)}
.ur:last-child{border-bottom:0}
.ur-name{display:flex;flex-direction:column;min-width:0}
.ur-name a{font-weight:600;color:var(--text)}
.ur-name .url{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ur-stats{display:flex;gap:6px 16px;font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums;flex-wrap:wrap;justify-content:flex-end}
.ur-stats>span{display:flex;flex-direction:column;align-items:flex-end;min-width:56px}
.ur-stats small{font-size:11px;color:var(--text-muted)}
.ustrip{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:2px;list-style:none;margin:0;padding:0;height:30px}
.ustrip li{border-radius:2px;background:var(--ok-fill);min-width:2px;cursor:default}
.ustrip li.warn{background:var(--warn-fill)}
.ustrip li.crit{background:var(--crit-fill)}
.ustrip li.maint{background:repeating-linear-gradient(135deg,var(--maint-fill) 0 2px,transparent 2px 4px);box-shadow:inset 0 0 0 1px var(--maint-fill)}
.ustrip li.nodata{background:transparent;box-shadow:inset 0 0 0 1px var(--unk-fill)}
.ustrip li.today{opacity:.72}
.ustrip li:hover,.ustrip li:focus-visible{outline:2px solid var(--text);outline-offset:1px}
.ustrip.hb{height:22px}
.us-axis{display:flex;justify-content:space-between;font-size:11px;color:var(--text-muted);margin-top:4px}
.us-legend{display:flex;gap:6px 14px;flex-wrap:wrap;font-size:12px;color:var(--text-2);align-items:center}
.us-legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.us-30{display:none}
@media (max-width:640px){
  .ustrip.d90 li:nth-child(-n+60){display:none}
  .us-90{display:none} .us-30{display:inline}
  .ur{grid-template-columns:minmax(0,1fr) auto}
  .ur .ur-strip{grid-column:1/-1;grid-row:2}
  .ur.full .ur-stats{grid-column:1/-1;grid-row:3;justify-content:flex-start}
  .ur.full .ur-stats>span{align-items:flex-start;min-width:0}
}
#tip{position:fixed;z-index:120;pointer-events:none;background:var(--bg-surface);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow-pop);border-radius:6px;padding:6px 9px;font-size:12px;line-height:17px;max-width:280px}
#tip[hidden]{display:none}
#tip .tt-h{display:flex;align-items:center;gap:6px;font-weight:600}


/* ===== Lists: events, alerts, timeline ===== */
.list{list-style:none;margin:0;padding:0}
.list>li{display:flex;align-items:center;gap:10px;padding:9px var(--pad);border-bottom:1px solid var(--border-muted);min-height:44px}
.list>li:last-child{border-bottom:0}
.list .ltime{font-size:12px;color:var(--text-muted);width:44px;flex:none;font-variant-numeric:tabular-nums}
.list .lmain{flex:1;min-width:0}
.list .lmain .sub{display:block;font-size:12px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list .lmain a{color:var(--text);font-weight:600}
.tline{list-style:none;margin:0;padding:0}
.tline>li{display:grid;grid-template-columns:58px 22px minmax(0,1fr);gap:8px;padding:0 0 14px;position:relative}
.tline>li::before{content:"";position:absolute;left:76px;top:22px;bottom:2px;width:1px;background:var(--border)}
.tline>li:last-child::before{display:none}
.tline time{font-size:12px;color:var(--text-muted);padding-top:2px;text-align:right}
.tline .ti{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--bg-surface-2);color:var(--text-2)}
.tline .ti.crit{background:var(--crit-subtle);color:var(--crit-fg)} .tline .ti.warn{background:var(--warn-subtle);color:var(--warn-fg)}
.tline .ti.ok{background:var(--ok-subtle);color:var(--ok-fg)} .tline .ti.maint{background:var(--maint-subtle);color:var(--maint-fg)}
.tline .ti .i{width:13px;height:13px}
.tline .tx{min-width:0;padding-top:1px}
.tline .tx .sub{display:block;font-size:12px;color:var(--text-muted);overflow-wrap:anywhere}
.tline .tx blockquote{margin:4px 0 0;padding:6px 10px;border-left:3px solid var(--border);background:var(--bg-surface-2);border-radius:0 4px 4px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.tline li.future .ti{background:transparent;box-shadow:inset 0 0 0 1px var(--border);opacity:.8}


/* ===== Tabs ===== */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:16px;overflow-x:auto;scrollbar-width:none;position:relative}
.tabs::-webkit-scrollbar{display:none}
.tab-b{height:38px;padding:0 12px;border:0;background:none;color:var(--text-2);font-weight:500;font-size:14px;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.tab-b:hover{color:var(--text)}
.tab-b[aria-selected="true"]{color:var(--text);border-bottom-color:var(--text);font-weight:600}
.tab-b .cnt{font-size:12px;background:var(--bg-surface-2);border-radius:9px;padding:0 6px;color:var(--text-2);font-variant-numeric:tabular-nums}
.placeholder{display:grid;place-items:center;text-align:center;gap:8px;padding:48px 16px;color:var(--text-2);border:1px dashed var(--border);border-radius:6px;background:var(--bg-surface)}
.placeholder p{max-width:520px}


/* ===== Settings ===== */
.set{display:grid;grid-template-columns:210px minmax(0,1fr);gap:24px;align-items:start}
.set-nav{display:flex;flex-direction:column;gap:2px;position:sticky;top:calc(var(--topbar-h) + 16px)}
.set-nav a{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:6px;color:var(--text-2);font-weight:500}
.set-nav a:hover{background:var(--bg-surface-2);color:var(--text);text-decoration:none}
.set-nav a[aria-current="page"]{background:var(--bg-surface-2);color:var(--text);font-weight:600;box-shadow:inset 2px 0 0 var(--text)}
@media (max-width:860px){
  .set{grid-template-columns:minmax(0,1fr);gap:12px}
  .set-nav{flex-direction:row;overflow-x:auto;position:relative;top:auto;border-bottom:1px solid var(--border);padding-bottom:6px;scrollbar-width:none}
  .set-nav a{white-space:nowrap;flex:none}
  .set-nav a[aria-current="page"]{box-shadow:inset 0 -2px 0 var(--text)}
}
.chan{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:4px 14px;align-items:start;padding:var(--pad)}
.chan+.chan{border-top:1px solid var(--border-muted)}
.chan-ic{width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:var(--bg-surface-2);color:var(--text)}
.chan-acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.chan .result{grid-column:2/-1;margin-top:6px}
@media (max-width:640px){ .chan{grid-template-columns:40px minmax(0,1fr)} .chan-acts{grid-column:1/-1;justify-content:flex-start} }
.route{display:grid;grid-template-columns:120px minmax(0,1fr);gap:8px 16px;font-size:13px;align-items:baseline}
.route dt{display:flex;gap:6px;align-items:center;font-weight:600}
.matrix th,.matrix td{text-align:center}
.matrix th:first-child,.matrix td:first-child{text-align:left}
.radios{display:flex;gap:6px;flex-wrap:wrap}
.radio-card{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg-surface);font-size:14px}
.radio-card:has(input:checked){border-color:var(--focus-ring);box-shadow:0 0 0 1px var(--focus-ring)}
.radio-card input{accent-color:var(--focus-ring);margin:0}
.setrow{display:grid;grid-template-columns:220px minmax(0,1fr);gap:8px 24px;padding:16px var(--pad);border-bottom:1px solid var(--border-muted);align-items:start}
.setrow:last-child{border-bottom:0}
.setrow .hint{margin-top:2px}
@media (max-width:640px){ .setrow{grid-template-columns:minmax(0,1fr)} }


/* ===== Mobile tab bar ===== */
.tabbar{display:none}
.tbb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;line-height:14px;color:var(--text-2);background:none;border:0;position:relative;min-height:48px;text-decoration:none;padding:0}
.tbb:hover{text-decoration:none;color:var(--text)}
.tbb[aria-current="page"]{color:var(--text);font-weight:600}
.tbb[aria-current="page"] .i{stroke-width:2.4}
.tbb .i{width:20px;height:20px}
.tbb .badge{position:absolute;top:3px;left:calc(50% + 4px);min-width:16px;height:16px;line-height:16px;font-size:10px;padding:0 4px}


/* ===== Footer, toasts, dialogs ===== */
.foot{margin-top:48px;padding-top:16px;padding-bottom:28px;border-top:1px solid var(--border);color:var(--text-muted);font-size:12px;line-height:18px}
.foot nav{display:flex;flex-wrap:wrap;gap:4px 14px;margin:6px 0}
.foot nav b{color:var(--text-2);font-weight:600;margin-right:2px}
#toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(56px + var(--tabbar-h) + env(safe-area-inset-bottom,0px));z-index:130;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:max-content;max-width:calc(100vw - 32px)}
.toast{background:var(--text);color:var(--bg-surface);padding:9px 14px;border-radius:6px;font-size:13px;box-shadow:var(--shadow-pop);pointer-events:auto;display:flex;gap:8px;align-items:center}
dialog{border:1px solid var(--border);border-radius:8px;padding:0;background:var(--bg-surface);color:var(--text);box-shadow:var(--shadow-pop);width:min(560px, calc(100vw - 32px));max-height:calc(100vh - 48px)}
dialog::backdrop{background:var(--scrim)}
dialog.wide{width:min(760px, calc(100vw - 32px))}
.dlg{display:flex;flex-direction:column;max-height:calc(100vh - 50px)}
.dlg-h{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--border-muted)}
.dlg-h h2{font-size:16px}
.dlg-b{padding:16px;overflow:auto}
.dlg-f{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--border-muted);flex-wrap:wrap}
.sheet-list{display:grid;gap:2px}


/* ===== Responsive: phone width ===== */
@media (max-width:760px){
  :root{--tabbar-h:58px;--sticky-bottom:calc(58px + env(safe-area-inset-bottom, 0px));--topbar-h:50px}
  .mainnav,.hide-m{display:none!important}
  .tabbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--bg-surface);border-top:1px solid var(--border);padding:0 max(4px, env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(4px, env(safe-area-inset-left,0px));height:calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px))}
  .ph{padding:14px 0 10px}
  .ph-tools{width:100%}
  h1{font-size:18px;line-height:24px}
  .sec{margin-top:22px}
  .gs-main{font-size:15px}
  .foot{margin-top:32px}
  .abar .rule-link{display:none}
  .tb-right .ibtn{display:none}
}
@media (prefers-reduced-motion: no-preference){
  .toast{animation:tin .16s ease-out}
  @keyframes tin{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
  .btn,.ibtn,.nav-a,.lg,.mi{transition:background-color .12s ease,color .12s ease}
}
@media (forced-colors: active){ .si .i,.pill .i{forced-color-adjust:none} }

/* ===== The time picker as links (WP 0a): presets, shift and zoom are links, the custom range a
   <details> with a GET form, so the picker works without JavaScript (spec §6.1). ===== */
.seg>a,.seg>details>summary{height:26px;padding:0 9px;border-radius:4px;color:var(--text-2);font-weight:500;font-size:13px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap;text-decoration:none;cursor:pointer;list-style:none}
.seg>details>summary::-webkit-details-marker{display:none}
.seg>a:hover,.seg>details>summary:hover{color:var(--text);text-decoration:none}
.seg>a[aria-current="true"],.seg>details>summary[aria-current="true"]{background:var(--bg-surface);color:var(--text);box-shadow:0 0 0 1px var(--border),0 1px 2px rgba(0,0,0,.08)}
.seg>details{position:relative}
.seg>details>.menu{display:block}
a.ibtn:hover{text-decoration:none}
.ibtn[aria-disabled="true"]{opacity:.4;cursor:not-allowed}
a.live{color:var(--text);text-decoration:none}
.live-wrap{gap:8px}
.set-main{min-width:0}
/* ---- alerts.css ---- */
/* Alerts and Incident (screens.md "Alerts", "Incident"), owned by WP 4a-4, from the prototype's incident
   detail section. */
/* ===== Alerts: the tabs are links and the filters a GET form, so no JavaScript is needed ===== */
a.tab-b,a.tab-b:hover{text-decoration:none}
.tab-b[aria-current="page"]{color:var(--text);border-bottom-color:var(--text);font-weight:600}
.afilters{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-bottom:12px}
.afilters label{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;color:var(--text-2);min-width:0;max-width:100%}
.afilters .select{height:30px;max-width:min(100%,260px)}
.afilters .seg{margin-left:auto}
.alerts-t .namecell a{overflow-wrap:anywhere}
@media (max-width:760px){.alerts-t td{white-space:normal;overflow-wrap:anywhere}.alerts-t td.c-head{flex-wrap:wrap;gap:0 8px}}
/* ===== Incident detail (container-query driven) ===== */
.inc{container-type:inline-size}
.inc-head{padding:0 0 12px}
.inc-head .facts{margin-top:0}
.inc-states{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.abar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:10px 0 14px;border-bottom:1px solid var(--border-muted);margin-bottom:16px}
.abar-live{display:contents} /* a live section's wrapper (incident.html): its control is the bar's item */
.abar .rule-link{margin-left:auto;font-size:13px}
.abar.ro .rule-link{margin-left:0;display:inline}
.inc-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:var(--gap);align-items:start}
.inc-chart{grid-column:1;grid-row:1;min-width:0} .inc-tl-card{grid-column:2;grid-row:1 / span 2} .inc-details{grid-column:1;grid-row:2;min-width:0}
.chart-sum{margin-top:6px}
.note-form{margin:0 0 16px;display:grid;gap:8px;max-width:640px}
.note-form .row{justify-content:flex-end}
.hb-wrap{margin-top:12px;padding-top:0}
.hb-cap{margin-bottom:6px}
.inc-h3{margin:16px 0 6px}
.inc-note{margin-top:6px}
.inc-rel{margin:4px calc(-1 * var(--pad)) 0}
.inc-rel .lmain{overflow-wrap:anywhere}
.firststep{border-left:3px solid var(--text);padding:6px 0 6px 12px;margin-bottom:12px}
.codeblk{font-family:var(--font-mono);font-size:12px;line-height:18px;background:var(--bg-surface-2);border:1px solid var(--border-muted);border-radius:4px;padding:8px 10px;overflow-x:auto;white-space:pre;margin-top:6px}
@container (max-width: 760px){
  .inc-grid{grid-template-columns:minmax(0,1fr)}
  .inc-head{padding:0 0 8px}
  /* The sticky action bar (4b); 4a's read-only bar (.ro) holds only the rule link and stays in the flow. */
  .abar:not(.ro){position:sticky;bottom:var(--sticky-bottom);z-index:20;background:var(--bg-surface);border:1px solid var(--border);border-radius:10px;padding:8px;margin:0 0 12px;box-shadow:var(--shadow-pop);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;order:9}
  .abar:not(.ro) .btn{height:46px;padding:0 2px;font-size:12px;letter-spacing:-.01em;flex-direction:column;gap:2px;width:100%;min-width:0}
  .abar:not(.ro) .btn .i{width:16px;height:16px}
  .abar:not(.ro) .dd{display:block}
  .abar:not(.ro) .dd .menu{top:auto;bottom:calc(100% + 8px);right:0;left:auto}
  .abar:not(.ro) .rule-link{display:none}
  .inc-body{display:flex;flex-direction:column}
  .inc-chart,.inc-tl-card,.inc-details{grid-column:auto;grid-row:auto}
}
/* ---- apps.css ---- */
/* Apps and App (screens.md), WP 4a-3. The prototype's inline styles of scrApps and scrApp, as
   classes (the CSP, spec §4.8), and the App page's parts: the switcher, the chart section, the
   slow paths and errors. The Database page's header and tiles use the same classes. */
.apps-b{gap:10px}
.apps-figs{grid-template-columns:repeat(3,minmax(0,1fr))}
.apps-figs dd .si{vertical-align:-2px}

.sb-switch{gap:6px;flex-wrap:nowrap;min-width:0}
.sb-switch .select{height:30px;min-width:0;max-width:220px}
.facts a.mono,.facts .mono{font-size:12.5px}
.facts .val-warn,.facts .val-crit{display:inline-flex;align-items:center;gap:3px}

.sb-tile .tfoot{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.sb-tile .tfoot .meter{align-self:stretch}

.sb-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.sb-chart-card.tall{grid-column:1/-1}
.sb-chart-sum:not(.sr-only){display:grid;place-items:center;min-height:180px;margin:0;padding:16px;text-align:center;color:var(--text-muted);font-size:13px;border:1px dashed var(--border);border-radius:6px}
.sb-chart-card.tall .sb-chart-sum:not(.sr-only){min-height:240px}
@media (max-width:980px){.sb-charts{grid-template-columns:minmax(0,1fr)}}

.t th.sb-rowh{background:none;font-weight:400;color:var(--text);font-size:13px;height:auto;border-bottom:1px solid var(--border-muted)}
.t tbody tr:last-child th.sb-rowh{border-bottom:0}
.t td.sb-path{white-space:normal;min-width:160px}
.sb-top5xx{border-top:1px solid var(--border-muted);display:flex;flex-direction:column;gap:6px}
.sb-top5xx h3{font-size:13px;line-height:18px;font-weight:600}
.sb-paths{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:13px}
.sb-paths li{display:flex;gap:8px;align-items:baseline;justify-content:space-between}
.sb-paths .sql{min-width:0}
/* ---- auth.css ---- */
/* Sign-in, second step, welcome, step-up, Account and General (screens.md "Sign-in and account",
   "General"), owned by WP 4a-1. The prototype's "Login" section first, then what the new screens
   add, built from the existing components. No style attributes anywhere (the CSP). */
/* ===== Login ===== */
.auth-wrap{min-height:calc(100vh - 24px);display:grid;place-items:center;padding:40px 0}
.auth-card{width:min(400px,100%);background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;padding:28px 24px 24px}
.auth-brand{display:flex;align-items:center;gap:10px;font-weight:650;font-size:18px;margin-bottom:20px}
.auth-card h1{font-size:20px;margin-bottom:4px}
.auth-card .hint{margin-bottom:18px}
.pw{position:relative;display:flex}
.pw .input{flex:1;padding-right:64px}
.pw button{position:absolute;right:4px;top:4px;height:26px}
.otp{font-size:22px;letter-spacing:.35em;text-align:center;height:48px;font-variant-numeric:tabular-nums;font-family:var(--font-mono)}
.or{display:flex;align-items:center;gap:10px;color:var(--text-muted);font-size:12px;margin:14px 0}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--border-muted)}
.auth-links{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:16px;font-size:13px}
body.auth .topbar,body.auth .gbanner,body.auth .tabbar,body.auth .foot{display:none}
body.auth{--tabbar-h:0px}


/* ===== Sign-in additions ===== */
.auth-card .err:empty{display:none}
.auth-card .err{margin:-4px 0 12px}
.auth-note{display:flex;gap:6px;align-items:center;font-size:13px;color:var(--text-2);margin:0 0 14px}
.pk-status{margin-top:8px;min-height:16px}
.linkbtn{background:none;border:0;padding:0;color:var(--link);font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.auth-links .i{vertical-align:-2px}
.lost{margin-top:18px;font-size:13px;color:var(--text-2)}
.lost summary{cursor:pointer;color:var(--link);width:max-content;min-height:24px}
.lost-list{margin:8px 0;padding-left:18px;display:grid;gap:6px}
.lost code{overflow-wrap:anywhere}
/* ===== Welcome ===== */
.steps{display:flex;gap:6px;list-style:none;padding:0;margin:0 0 18px;font-size:12px;counter-reset:st}
.steps li{flex:1;padding:6px 0 0;border-top:3px solid var(--border);color:var(--text-muted);counter-increment:st}
.steps li::before{content:counter(st) ". "}
.steps li[aria-current="step"]{border-top-color:var(--focus-ring);color:var(--text);font-weight:600}
.factor{border-top:1px solid var(--border-muted);padding:14px 0;display:grid;gap:8px}
.factor h2{font-size:15px;display:flex;gap:6px;align-items:center}
.ok-line{display:flex;gap:6px;align-items:center;color:var(--ok-fg);font-size:13px}
.totp-setup{display:grid;gap:10px}
.qr{width:200px;height:200px;max-width:100%;justify-self:center;border-radius:4px}
.qr-bg{fill:#fff}
.qr-m{fill:#000}
.totp-key{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.totp-key code{font-size:14px;letter-spacing:.06em;overflow-wrap:anywhere}
.totp-confirm{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.totp-confirm .field{margin:0;flex:1;min-width:150px}
.totp-confirm .otp{height:40px;font-size:18px}
.codes{columns:2;column-gap:16px;padding:12px 16px 12px 36px;margin:0;background:var(--bg-surface-2);border:1px solid var(--border);border-radius:6px}
.codes li{padding:2px 0;font-variant-numeric:tabular-nums}
.codes code{font-size:13px}
.codes-acts{margin:10px 0 16px;gap:8px}
@media (max-width:420px){ .codes{columns:1} }
/* ===== Account ===== */
.acct-note{margin-bottom:16px}
.acct-form{max-width:420px}
.acct-form .check{margin-bottom:14px}
.factor-row{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:flex-start}
.t td.acts{display:flex;gap:6px;justify-content:flex-end;align-items:center}
.t td.acts form{display:inline}
.rename summary{list-style:none}
.rename summary::-webkit-details-marker{display:none}
.rename-form{display:grid;gap:6px;padding:10px;min-width:220px;font-size:13px}
/* ===== General: a checkbox drawn as the prototype's switch ===== */
.swl{position:relative;display:inline-flex;align-items:center;gap:8px;cursor:pointer;min-height:24px}
.swl input{position:absolute;opacity:0;width:36px;height:20px;margin:0}
.swl input:checked+.sw{background:var(--focus-ring);border-color:var(--focus-ring)}
.swl input:checked+.sw::after{left:18px;background:#fff}
.swl input:focus-visible+.sw{outline:2px solid var(--focus-ring);outline-offset:2px}
.sw-samples{gap:6px;margin-left:12px}
/* ---- dbs.css ---- */
/* Databases and Database (screens.md), WP 4a-3. The prototype's inline styles of scrDbs and scrDb,
   as classes (the CSP, spec §4.8). */
.ph-title h1 .mono{font-size:inherit}
.t th.sb-barcol{min-width:140px}
.t td .hbar{width:100%}
.sb-hint{margin-top:10px}
.sb-shapes .total td{white-space:nowrap}
.sb-shapes th .sortb{font-weight:600}
/* ---- email.css ---- */
/* Email (screens.md "Email", the prototype's channel card reworked: one channel), WP 4b-1. The card and
   the routing list are components.css's .chan and .route. */
.em-chan{grid-template-columns:40px minmax(0,1fr) auto}
.em-main{min-width:0}
.em-warn{margin-bottom:8px;color:var(--warn-fg);font-weight:600}
.em-kv{margin-bottom:4px}
.em-h3{margin:14px 0 6px;font-size:13px}
.em-err{white-space:normal;overflow-wrap:anywhere}
.em-result{margin-top:2px}
.em-hint{grid-column:2/-1}
.em-route dd{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
.em-groups{margin-top:12px}
@media (max-width:640px){
  .em-chan{grid-template-columns:minmax(0,1fr)}
  .em-chan .chan-ic{display:none}
  .em-hint{grid-column:1/-1}
  .em-kv{grid-template-columns:minmax(0,1fr);gap:0}
  .em-kv dt{margin-top:8px}
}
/* ---- health.css ---- */
/* Monitor health (screens.md "Monitor health"), WP 4a-2. Scoped to .mh; the shared parts are in
   components.css. Its five tiles fit any width (the prototype's inline grid, as a class). */
.mh-banner{margin-bottom:16px}
.mh .tiles.mh-tiles{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.mh-tiers{display:grid;gap:8px}
.mh-tiers>div{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr);gap:4px 12px;align-items:center}
.mh-tiers dd{display:flex;align-items:center;gap:10px}
.mh-tiers .hbar{flex:1}
.mh-tiers .tnum{min-width:64px;text-align:right}
.mh .mh-dash{margin-bottom:10px}
.mh .mh-bk h3{margin-bottom:4px}
@media (max-width:560px){ .mh-tiers>div{grid-template-columns:minmax(0,1fr)} }
/* ---- kiosk.css ---- */
/* The wall display (screens.md "Wall display (Kiosk)") and Display links, WP 4c-2.

   The wall display: body.kiosk (layout.html's kiosk layout), always dark. Its type is 25 % larger than the
   overview's: 14 px text becomes 17.5 px, and each part in step (a tile's value 24 → 30 px, its label 12 → 15 px).
   It fills the viewport and never scrolls, at 1920 × 1080 and 1280 × 720: the header, the status line and the
   tiles take what they need, and the sites and incidents share the rest, clipped rather than scrolled. Nothing
   moves but the clock's digits: a critical is a static red border and its icon. */
.kiosk{height:100vh;height:100dvh;overflow:hidden;padding-bottom:0;font-size:17.5px;line-height:25px}
.kiosk *,.kiosk *::before,.kiosk *::after{animation:none!important;transition:none!important}
.kiosk main,.kiosk main>.wrap{height:100%}
.kiosk main>.wrap{max-width:none;padding-top:16px;padding-bottom:16px}
.k{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:14px;height:100%}
.k h2{font-size:20px;line-height:28px}
.k h3{font-size:17.5px;line-height:24px}
.k .pill{height:auto;min-height:26px;font-size:15px;padding:2px 10px 2px 8px}
.k .pill .i-sm{width:16px;height:16px}

.k-head{display:flex;align-items:center;gap:6px 24px;flex-wrap:wrap;min-width:0}
.k-brand{display:flex;align-items:center;gap:10px;font-size:25px;line-height:34px;white-space:nowrap}
.k-brand .logo{width:32px;height:32px;border-radius:8px}
.k-brand .logo .i{width:21px;height:21px}
.k-host{font-size:17.5px;font-weight:500;color:var(--text-2);margin-left:4px}
.k .k-fresh{flex-basis:auto;font-size:15px;line-height:20px;min-height:0}
.k .fdot{width:9px;height:9px}
.k-clock{margin-left:auto;display:flex;align-items:baseline;gap:12px;white-space:nowrap}
.k-time{font-size:45px;line-height:48px;font-weight:650;letter-spacing:-.01em}
.k-day{font-size:17.5px;color:var(--text-2)}

.k .gstat{margin:0;padding:12px 20px}
.k .gstat.crit{border-width:2px}
.k .gs-main{font-size:20px;line-height:30px}
.k .gs-main .i-lg{width:25px;height:25px}

.k .k-tiles{list-style:none;margin:0;padding:0;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.k .tile{min-height:0;padding:12px 16px 12px}
.k .tile.is-crit{border:2px solid var(--crit-fill)}
.k .tile.is-warn{border-color:var(--warn-fill)}
.k .tl{font-size:15px;line-height:20px;min-height:20px}
.k .tv{font-size:30px;line-height:40px}
.k .tv small{font-size:16px}
.k .ts{font-size:15px;line-height:20px}
.k .tfoot{padding-top:6px}
.k .spark{height:34px}
.k .meter{height:10px}

.k-lower{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:14px;min-height:0}
.k-panel{display:flex;flex-direction:column;gap:10px;min-height:0;overflow:hidden}
.k-panel h2{display:flex;align-items:center;gap:10px}
.k-panel .badge{min-width:26px;height:26px;border-radius:13px;font-size:15px;line-height:26px}
.k-sites{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-content:start}
.k-sites.c3{grid-template-columns:repeat(3,minmax(0,1fr))}
.k-sites.c4{grid-template-columns:repeat(4,minmax(0,1fr))}
.k-site{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px 16px;background:var(--bg-surface);border:1px solid var(--border);border-radius:6px}
.k-site.is-crit{border:2px solid var(--crit-fill)}
.k-site-h{display:flex;align-items:center;gap:10px;min-width:0}
.k-site-h h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:auto}
.k-facts{display:grid;grid-template-columns:auto auto minmax(80px,1fr);gap:0 18px;margin:0}
.k-facts dt{font-size:15px;line-height:20px;color:var(--text-2)}
.k-facts dd{margin:0;font-size:22.5px;line-height:30px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.k-facts .k-spark dd{display:flex;align-items:center;height:30px}
.k-facts .spark{height:30px}
.k-incs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.k-inc{display:flex;align-items:flex-start;gap:12px;padding:8px 14px;background:var(--bg-surface);border:1px solid var(--border);border-radius:6px;min-width:0}
.k-inc.is-crit{border:2px solid var(--crit-fill)}
.k-inc .si{padding-top:3px}
.k-inc .i-lg{width:25px;height:25px}
.k-inc-m{display:flex;flex-direction:column;min-width:0}
.k-inc-t{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.k-inc-s{font-size:15px;line-height:20px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.k-inc-s b{font-weight:600;color:var(--text)}
.k-more{font-size:15px;color:var(--text-2)}
.k-none{display:flex;align-items:center;gap:10px;color:var(--text-2)}
.k-none.c-ok{color:var(--ok-fg)}
.k-none .i{width:22px;height:22px}
/* A smaller screen: the tiles in two rows, the panels one above the other, tighter. */
@media (max-width:1100px){
  .k .k-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
  .k-lower{grid-template-columns:minmax(0,1fr)}
}
@media (min-height:1000px) and (min-width:1600px){
  .k .spark{height:44px}
  .k-facts .k-spark dd,.k-facts .spark{height:44px}
}
@media (max-height:760px){
  .k{gap:10px}
  .kiosk main>.wrap{padding-top:10px;padding-bottom:10px}
  .k-time{font-size:38px;line-height:40px}
  .k .tile{padding:8px 14px}
  .k .spark{height:26px}
  .k-sites,.k-incs{gap:10px}
  .k-site{padding:8px 14px;gap:4px}
  .k-inc{padding:6px 12px}
}
@media (forced-colors:active){.k .tile.is-crit,.k-site.is-crit,.k-inc.is-crit{border-style:double;border-width:4px}}

/* Display links (screens.md "Display links"): the new link shown once, the table, the form. */
.dl-new .dl-copy{display:flex;gap:8px;align-items:center}
.dl-new .dl-copy .input{flex:1;min-width:0}
.dl-new .inline-alert{margin-bottom:12px}
.dl-t .dl-acts{display:flex;gap:6px;flex-wrap:wrap}
.dl-t .dl-acts form{margin:0}
.dl-make .field{max-width:420px}
.dl-make .card-f .btn{margin-left:auto}
.dl-note{margin-bottom:var(--gap)}
/* ---- maint.css ---- */
/* Maintenance windows (screens.md "Maintenance windows"), WP 4b-1; and 4b-1's action controls elsewhere,
   which have no part of their own: the forms in the banner, the Open alerts card and the incident's action
   bar, its Silence and Add note disclosures, and the result of an action (the "banners" partial). */
/* ===== Actions: a form that holds one button sits in its row as the button would ===== */
.act-f{display:flex;margin:0}
.act-res{margin-top:12px}
.act-res .inline-alert:focus{outline:2px solid var(--focus-ring);outline-offset:2px}
.inline-alert.ok{background:var(--ok-subtle);border-color:transparent;color:var(--text)}
.inline-alert.ok>.i{color:var(--ok-fg)}
.pills{display:inline-flex;flex-wrap:wrap;gap:4px}
.list>li>.act-f{margin-left:auto}
/* Silence and Add note: disclosures (details), so they work without JavaScript; the menu is the open part. */
.act-dd>summary{list-style:none;cursor:pointer}
.act-dd>summary::-webkit-details-marker{display:none}
.act-dd .act-menu{display:block;left:0;right:auto} /* the bar starts at the left: open rightwards (the phone's bar opens upwards, alerts.css) */
.act-dd .act-menu form{margin:0}
.act-note .act-menu{width:min(420px,calc(100vw - 32px))}
.act-note .note-form{margin:0;max-width:none}
@container (max-width: 760px){
  /* The phone's sticky bar: Acknowledge · Silence · Add note (the rule link is hidden there). */
  .inc .abar:not(.ro){grid-template-columns:repeat(3,minmax(0,1fr))}
  .inc .abar:not(.ro) .act-f .btn{flex:1}
}
@media (scripting: none){ .js-only{display:none} }
/* ===== Maintenance windows ===== */
.mw-note{margin-bottom:12px}
.mw-t td.mw-name,.mw-t td.mw-when,.mw-t td.mw-eff{white-space:normal;overflow-wrap:anywhere;height:auto;padding-top:8px;padding-bottom:8px}
.mw-t td.mw-name{min-width:120px;max-width:220px}
.mw-t td.mw-when{min-width:120px}
.mw-t td.mw-eff{min-width:150px;max-width:240px}
.mw-new form{margin:0}
.mw-dlg form{display:flex;flex-direction:column;min-height:0;margin:0}
.mw-f{justify-content:flex-end}
.mw-times{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 16px}
.mw-times .input{width:100%}
.mw-zone{margin:-6px 0 14px}
.mw-start{border:0;padding:0;margin:0 0 14px;min-width:0}
.mw-start legend{padding:0;margin-bottom:6px}
.mw-errs{margin-bottom:14px}
.mw-errs ul{margin:4px 0 0;padding-left:18px}
.mw-errs li a{display:inline-block;min-height:24px;line-height:24px}
.mw-dlg .select,.mw-new .select,.mw-dlg #mw-note,.mw-new #mw-note{width:100%}
@media (max-width:760px){
  .mw-t td.mw-name,.mw-t td.mw-when,.mw-t td.mw-eff{min-width:0;max-width:none;padding:0;overflow-wrap:normal;text-align:right}
  .mw-t td.mw-name{text-align:left}
  .mw-t td.mw-src>span{text-align:right}
  .mw-t td::before{flex:none}
}
/* ---- overview.css ---- */
/* Overview (screens.md "Overview"), WP 4a-2. Scoped to .ov; the shared parts are in components.css.
   Charts take their height from their slot's data-height (charts.js). */
.ov .tiles{margin-bottom:var(--gap)}
.ov .ov-db{display:block;white-space:nowrap}
.ov .list .lmain .ov-evl{font-weight:500}
.ov .ov-urn{gap:6px;flex-wrap:nowrap}
.ov .ov-ur{padding-top:4px;padding-bottom:4px}
@media (max-width:760px){
  .ov .t-cards td.ov-dbs{flex-direction:column;align-items:flex-start;gap:2px}
}
/* ---- rules.css ---- */
/* Alert rules (screens.md "Alert rules", proto scrRules), WP 4c-3: the shadow banner, and the read-only table
   (components.css's .t and, on a phone, .t-cards). The rule's name is the row's header cell. */
.shadow-banner,.ru-note{margin-bottom:16px}
.ru-t td,.ru-t tbody th{vertical-align:top;height:auto;padding-top:8px;padding-bottom:8px}
.ru-t tbody th{background:none;color:var(--text);font-size:13px;text-align:left;white-space:normal;min-width:150px;border-bottom:1px solid var(--border-muted)}
.ru-t tbody tr:last-child th{border-bottom:0}
.ru-t tr:target>:first-child{box-shadow:inset 3px 0 0 var(--focus-ring)}
.ru-t .mono{overflow-wrap:anywhere}
.ru-t th .mono{overflow-wrap:normal}
.ru-cell{display:block}
.ru-t td.ru-on,.ru-t td.ru-last{white-space:normal}
.ru-t td.ru-on{max-width:140px}
.ru-t td.ru-last{min-width:150px}
.ru-t td.ru-cond{min-width:280px;max-width:440px;color:var(--text-2)}
.ru-set{display:flex;gap:4px;align-items:flex-start;margin-top:4px}
.ru-set>.i{flex:none;margin-top:2px}
.ru-lvs{display:inline-flex;gap:4px}
.ru-eml{list-style:none;margin:0;padding:0}
.ru-l{display:inline-block;min-width:12px;margin-right:4px;font-weight:600;color:var(--text-2)}
@media (max-width:760px){
  .ru-t td,.ru-t tbody th{padding:0;white-space:normal;align-items:flex-start}
  .ru-t td.ru-on,.ru-t td.ru-last{max-width:none;min-width:0}
  .ru-t td::before{flex:none;white-space:nowrap}
  .ru-t tbody th{order:-1;grid-column:1/-1;display:block;min-width:0;border:0}
  .ru-t td.ru-cond{order:1;display:block;min-width:0;max-width:none}
  .ru-t td.ru-cond::before{display:block;margin-bottom:2px}
  .ru-cell,.ru-eml{text-align:right}
  .ru-t td.ru-cond .ru-cell{text-align:left}
  .ru-t tr:target{box-shadow:inset 3px 0 0 var(--focus-ring)}
  .ru-t tr:target>:first-child{box-shadow:none}
}
/* ---- server.css ---- */
/* Server (screens.md "Server"), WP 4a-2. Scoped to .srv; the shared parts are in components.css.
   Charts take their height from their slot's data-height (charts.js). */
.srv .srv-space{gap:14px}
.srv-line{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.srv .srv-space .hint{margin-top:4px}
.srv .srv-big{font-size:24px;line-height:32px;font-weight:600}
.srv .t tr.grp th{height:32px;text-align:left;border-top:1px solid var(--border-muted)}
@media (max-width:760px){
  .srv .t-cards tr.grp th{grid-column:1/-1;border:0;padding:0}
}
/* ---- uptime.css ---- */
/* Uptime & certificates (screens.md), WP 4a-3. The prototype's inline styles of scrUptime as
   classes (the CSP, spec §4.8): the rows' padding, the legend's swatches (the strip cells' look),
   the summary's spacing. */
.sb-urows{padding-top:4px;padding-bottom:8px}
.sb-urname{gap:6px;flex-wrap:nowrap}
.ur-stats>span>span{display:inline-flex;align-items:center;gap:3px}
.us-legend .sb-sw{background:var(--ok-fill)}
.us-legend .sb-sw.warn{background:var(--warn-fill)}
.us-legend .sb-sw.crit{background:var(--crit-fill)}
.us-legend .sb-sw.maint{background:repeating-linear-gradient(135deg,var(--maint-fill) 0 2px,transparent 2px 4px);box-shadow:inset 0 0 0 1px var(--maint-fill)}
.us-legend .sb-sw.nodata{background:transparent;box-shadow:inset 0 0 0 1px var(--unk-fill)}
.sb-summary{margin-top:14px}
/* ---- users.css ---- */
/* Users & roles and the Audit log (screens.md), WP 4c-1. */
/* ===== Users & roles ===== */
.um-res,.um-link,.um-confirm,.au-note,.au-detail{margin-bottom:16px}
.um-res:focus,.um-link:focus,.au-note:focus,.au-detail:focus{outline:2px solid var(--focus-ring);outline-offset:2px}
.um-url{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}
.um-url code{font-family:var(--font-mono);font-size:13px;line-height:20px;padding:6px 8px;border:1px solid var(--border);border-radius:6px;background:var(--bg-surface-2);overflow-wrap:anywhere;user-select:all;max-width:100%}
.um-f{justify-content:flex-end}
.um-stepup{display:flex;gap:6px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--border-muted);padding-top:8px;padding-bottom:8px}
.um-t td.um-email,.um-t td.um-name,.au-t td.au-target,.au-t td.au-actor{white-space:normal;overflow-wrap:anywhere;min-width:120px;max-width:260px}
.um-acts{text-align:right}
.um-dd{flex-direction:column;align-items:flex-end}
.um-dd>summary{list-style:none;cursor:pointer;gap:4px}
.um-dd>summary::-webkit-details-marker{display:none}
/* In the row, not over it: a table's wrapper scrolls, and would clip a menu that floats. */
.um-dd .um-menu{position:static;margin-top:6px;box-shadow:none;text-align:left}
.um-menu form{margin:0}
.um-danger{color:var(--crit-fg)}
.um-matrix td{white-space:normal;min-width:96px;height:auto;padding-top:6px;padding-bottom:6px}
.um-matrix td:first-child{min-width:220px}
.um-new form,.um-dlg form{margin:0}
.um-dlg form{display:flex;flex-direction:column;min-height:0}
.um-dlg .input,.um-new .input,.um-dlg .select,.um-new .select{width:100%}
.um-check{gap:2px}
.um-check .hint{margin-left:24px}
.um-errs{margin-bottom:14px}
.um-errs ul{margin:4px 0 0;padding-left:18px}
/* Each error's link is a target of 24 px, one under another (WCAG 2.5.8). */
.um-errs li a{display:inline-block;min-height:24px;line-height:24px}
/* ===== Audit log ===== */
.au-filters{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;padding:12px var(--pad);border-bottom:1px solid var(--border-muted)}
.au-filters .field{margin:0}
.au-range{border:0;padding:0;min-width:0}
.au-range legend{padding:0;margin-bottom:6px}
.au-range .radio-card{padding:6px 10px}
.au-apply{display:flex;gap:8px}
.au-t tr.au-cur td{background:var(--bg-surface-2)}
/* On the current row's tint, muted text would be 4.35:1: it takes --text-2. */
.au-t tr.au-cur{--text-muted:var(--text-2)}
/* A note's link is underlined and in the note's colour: on the tints, blue is
   too near the text around it, and on the warning's under 4.5:1 (WCAG 1.4.1, 1.4.3). */
.au-note a{color:inherit;text-decoration:underline}
.au-pager{justify-content:space-between}
.au-h3{font-size:13px;margin:16px 0 8px}
.au-chg dd{font-size:12px}
@media (max-width:760px){
  .um-t td.um-email,.um-t td.um-name,.au-t td.au-target,.au-t td.au-actor{min-width:0;max-width:none;text-align:right}
  .um-t td.um-name{text-align:left}
  .um-acts{text-align:left}
  .um-dd{align-items:stretch;width:100%}
  .t-cards td.um-acts::before{display:none}
  .au-filters .field,.au-filters .select{width:100%}
}
