:root {
  --paper: #E8EDF1; --panel: #F7F9FA; --ink: #16202A; --muted: #5A6773; --rule: #C9D2DA;
  --run: #B86200; --ok: #2E7D5B; --fail: #B42318; --queue: #5B4FB3; --ext: #2F6F9F; --accent: #1F4FD1;
  --h0: #D3DBE2; --h1: #9FB6C8; --h2: #E3A44A; --h3: #D9702C; --h4: #C2321F;
  --display: "Bahnschrift", "DIN Alternate", "DIN Next", "Roboto Condensed", "Avenir Next Condensed", sans-serif;
  --body: system-ui, "Segoe UI Variable Text", "Segoe UI", -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121A22; --panel: #18222C; --ink: #DCE3EA; --muted: #8996A3; --rule: #2A3642;
    --run: #F0A035; --ok: #4CB386; --fail: #F0645A; --queue: #9A8CF0; --ext: #6AA9D8; --accent: #7FA2FF;
    --h0: #24303B; --h1: #3D5A70; --h2: #B7782A; --h3: #D9702C; --h4: #F0645A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121A22; --panel: #18222C; --ink: #DCE3EA; --muted: #8996A3; --rule: #2A3642;
  --run: #F0A035; --ok: #4CB386; --fail: #F0645A; --queue: #9A8CF0; --ext: #6AA9D8; --accent: #7FA2FF;
  --h0: #24303B; --h1: #3D5A70; --h2: #B7782A; --h3: #D9702C; --h4: #F0645A; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 64px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: .01em; }
h2 { font-size: 1.25rem; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--rule); background: var(--panel); border-radius: 6px;
  padding: 6px 12px; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--panel); font-weight: 600; }
button.danger { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 45%, var(--rule)); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.boot { color: var(--muted); }
.bar { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.bar .grow { flex: 1; }
header.top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
header.top h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1; font-weight: 700; }
header.top .facts { color: var(--muted); }
header.top h1 .rename { font: 400 .85rem var(--body); margin-left: 10px; vertical-align: middle; }
header.top .who { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.strip { display: grid; grid-template-columns: repeat(var(--n, 32), 1fr); gap: 3px; height: 74px;
  padding: 8px; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px 8px 0 0; }
.core { position: relative; background: var(--h0); border-radius: 2px; overflow: hidden; }
.core i { position: absolute; left: 0; right: 0; bottom: 0; transition: height .6s ease; }
.core.c1 i { background: var(--h1); } .core.c2 i { background: var(--h2); }
.core.c3 i { background: var(--h3); } .core.c4 i { background: var(--h4); }
.stripnote { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 10px;
  border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 8px 8px; background: var(--panel);
  color: var(--muted); font-size: .9rem; }
.stripnote b { color: var(--ink); font-family: var(--display); font-size: 1.05rem; }
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 12px 0 28px; }
.gauge { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; }
.gauge h3 { font-size: .95rem; color: var(--muted); font-weight: 500; }
.gauge .value { font-family: var(--display); font-size: 1.6rem; line-height: 1.2; }
.gauge .meter { height: 6px; background: var(--h0); border-radius: 3px; margin: 6px 0; overflow: hidden; }
.gauge .meter i { display: block; height: 100%; background: var(--ink); }
.gauge.warning { border-color: var(--run); } .gauge.warning .meter i { background: var(--run); }
.gauge.critical { border-color: var(--fail); } .gauge.critical .meter i, .gauge.critical .value { color: var(--fail); background: var(--fail); }
.gauge.critical .value { background: none; }
.gauge p { margin: 0; font-size: .88rem; color: var(--muted); }
.tabs { display: flex; gap: 4px; }
.tabs button { border-radius: 999px; padding: 3px 12px; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.jobs { margin-top: 10px; display: grid; gap: 8px; }
.job { background: var(--panel); border: 1px solid var(--rule); border-left: 4px solid var(--st, var(--rule));
  border-radius: 6px; }
.job > summary { list-style: none; cursor: pointer; display: grid; padding: 10px 12px; gap: 2px 14px;
  grid-template-columns: 92px minmax(0, 1.4fr) minmax(0, 2fr) auto; align-items: baseline; }
.job > summary::-webkit-details-marker { display: none; }
.job .name { font-weight: 600; overflow-wrap: anywhere; }
.job .sub, .job .when { color: var(--muted); font-size: .88rem; }
.job .when { text-align: right; white-space: nowrap; }
.job .body { padding: 0 12px 12px; border-top: 1px solid var(--rule); }
.state { font-family: var(--display); font-weight: 600; color: var(--st); text-transform: capitalize; }
.st-running { --st: var(--run); } .st-finished { --st: var(--ok); } .st-failed { --st: var(--fail); }
.st-queued { --st: var(--queue); } .st-stopped, .st-cancelled, .st-ended { --st: var(--muted); }
.st-external { --st: var(--ext); }
.pill { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: .82rem; border: 1px solid currentColor; }
.d-improvement { color: var(--ok); } .d-regression { color: var(--fail); } .d-continue, .d-running { color: var(--run); }
.d-futile, .d-pending, .d-partial { color: var(--muted); } .d-inconclusive { color: var(--queue); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th { text-align: left; font-weight: 500; color: var(--muted); }
th, td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
td.num, th.num { text-align: right; }
.scroll { overflow-x: auto; margin: 10px 0; }
.track { position: relative; height: 10px; min-width: 90px; background: var(--h0); border-radius: 5px; }
.track .def { position: absolute; top: -2px; width: 2px; height: 14px; background: var(--muted); }
.track .cur { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: var(--run); }
pre { font: 12.5px/1.45 var(--mono); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  padding: 8px 10px; overflow: auto; max-height: 320px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.cmd { font: 12px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; margin: 8px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.empty { padding: 18px; border: 1px dashed var(--rule); border-radius: 8px; color: var(--muted); }
section { margin-top: 26px; }
dialog { border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); color: var(--ink);
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 18px; }
dialog::backdrop { background: rgb(10 16 22 / .45); }
dialog.wide { width: min(1100px, calc(100vw - 32px)); }
dialog pre { max-height: 60vh; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; margin: 12px 0; }
label { display: grid; gap: 3px; font-size: .9rem; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
input, select, textarea { border: 1px solid var(--rule); border-radius: 6px; padding: 6px 8px; background: var(--paper);
  color: var(--ink); min-width: 0; font: inherit; }
select[multiple] { min-height: 120px; }
.error { color: var(--fail); margin: 6px 0; }
.login { max-width: 360px; margin: 12vh auto 0; }
.login h1 { font-size: 2rem; margin-bottom: 4px; }
.login form { display: grid; gap: 12px; margin-top: 18px; }
@media (max-width: 720px) {
  .job > summary { grid-template-columns: 80px minmax(0, 1fr); }
  .job .prog { grid-column: 1 / -1; } .job .when { grid-column: 1 / -1; text-align: left; }
  .strip { grid-template-columns: repeat(16, 1fr); height: 96px; }
  header.top .who { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .core i { transition: none; } }
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.node { background: var(--panel); border: 1px solid var(--rule); border-top: 4px solid var(--ok); border-radius: 8px; padding: 10px 12px; }
.node.offline { border-top-color: var(--muted); opacity: .75; }
.node h3 { font-size: 1.05rem; }
.node .kv { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.node .meter { height: 6px; background: var(--h0); border-radius: 3px; margin: 2px 0 6px; overflow: hidden; }
.node .meter i { display: block; height: 100%; background: var(--run); }
.node .sub { color: var(--muted); font-size: .85rem; margin: 2px 0 6px; }
