:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1d212a;
  --line: #262b36;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --accent: #5b8cff;
  --good: #35c98a;
  --warn: #e0a83c;
  --bad: #e5615e;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 650; letter-spacing: -0.01em; }
.brand span { color: var(--muted); font-weight: 400; }
.topbar nav { display: flex; gap: 4px; margin-left: 8px; }
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
}
.topbar nav a:hover { color: var(--text); background: var(--panel-2); }
.topbar nav a.on { color: var(--text); background: var(--panel-2); }
.topbar .logout { margin-left: auto; }
.topbar .logout .btn { font-size: 13px; padding: 6px 12px; }

#live {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 10px 28px 12px;
  display: grid;
  gap: 8px;
}
.live-row {
  display: grid;
  grid-template-columns: 10px 118px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
}
.live-row .dot { margin-top: 6px; }
.live-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.live-label b { font-size: 13px; }
.live-state { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.live-row.running .live-state { color: var(--good); }
.live-row.paused .live-state { color: var(--warn); }
.live-rate { font-size: 11px; color: var(--muted); }
.live-headline { font-weight: 600; font-size: 14px; }
.live-detail {
  color: var(--muted);
  font-size: 12px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-why { color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 90ch; }
.live-meta {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12px;
  max-width: 260px;
}
.pill b { font-weight: 600; }
.pill em {
  font-style: normal; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.running .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
.paused .dot { background: var(--warn); }

.workers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 6px; }
/* minmax(0, 1fr) instead of 1fr: a bare 1fr cannot shrink below the content's
   min width, so a long product URL would widen the middle card on every fetch
   and make the whole grid jump. Capping the minimum at 0 keeps the columns
   equal and lets the URL truncate with an ellipsis instead. */
.workers.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.worker { min-width: 0; }
@media (max-width: 980px) { .workers.three { grid-template-columns: 1fr; } }
.worker {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.worker.running { border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.worker.waiting { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.worker-head { display: flex; align-items: center; gap: 9px; }
.worker-head b { font-size: 15px; }
.worker-head .rate { margin-left: auto; color: var(--muted); font-size: 12px; }
/* Reserved height so the card doesn't grow and shrink as activity lines
   (URL, batch progress, explanation) come and go between poll refreshes. */
.worker-activity { min-height: 108px; }
.worker-stage { color: var(--text); font-size: 14px; font-weight: 600; margin: 10px 0 0; min-height: 20px; }
.worker-detail {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.worker-progress { color: var(--muted); font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.worker-why { color: var(--muted); font-size: 12px; margin-top: 6px; }
.worker-reason { color: var(--warn); font-size: 12px; margin-top: 4px; }
.worker-retry {
  color: var(--warn);
  font-size: 13px;
  font-weight: 650;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.worker-btns { display: flex; gap: 8px; margin-top: 14px; }
.btn.small { padding: 5px 14px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }
.note.standalone { border-top: 0; padding-top: 0; margin: 0 0 18px; }
.finder-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 0;
}

.alert {
  display: flex;
  gap: 16px;
  background: color-mix(in srgb, var(--bad) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line));
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.alert.ok {
  background: color-mix(in srgb, var(--good) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--good) 40%, var(--line));
}
.alert-icon {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bad);
  color: #fff; font-weight: 700;
}
.alert.ok .alert-icon { background: var(--good); }
.alert-body h2 { font-size: 16px; margin: 2px 0 6px; }
.alert-reason {
  margin: 0 0 10px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--bad);
}
.alert-retry {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.alert-retry b { color: var(--text); }
.alert.ok .alert-reason { color: var(--text); font-family: inherit; font-size: 14px; }
.alert-detail { margin: 0 0 12px; font-size: 13px; color: var(--muted); max-width: 70ch; }
.alert-ip { font-size: 13px; margin-bottom: 14px; }
.alert-ip code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; }
.alert-btns { display: flex; gap: 8px; }

main { max-width: 1400px; margin: 0 auto; padding: 28px; }

.page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
h1 { font-size: 22px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 0; letter-spacing: -0.01em; }
.actions { margin-left: auto; display: flex; gap: 8px; }

.btn {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { border-color: #39404f; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
button.link {
  background: none; border: 0; color: var(--accent);
  cursor: pointer; font-size: 12px; padding: 0 0 0 8px;
}

.stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 20px 18px;
  margin-bottom: 16px;
}

/* Full-bleed header bar. The section title and the figures underneath were
   previously similar in size and weight, so the eye had to work out which was
   which; separating them onto their own band removes the ambiguity. */
.stage header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 -20px 16px;
  padding: 13px 20px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.stage h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .01em;
  color: var(--text);
}
.step {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pct { margin-left: auto; color: var(--muted); font-size: 12px; }
.now {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.stage.busy header .pct { margin-left: 10px; }
.stage.busy {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.stage.busy header {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-2));
}

.bar {
  height: 6px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.bar i { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }

dl { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
dl > div { min-width: 110px; }
dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
dd { margin: 2px 0 0; font-size: 20px; font-variant-numeric: tabular-nums; }
dd.good { color: var(--good); }
dd.bad { color: var(--bad); }
dd.muted { color: var(--muted); }

.note {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.note code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filters input, .filters select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.filters input[type=search] { flex: 1; min-width: 240px; }
.filters input:focus, .filters select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

table.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}
.grid th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.grid td { padding: 9px 14px; border-bottom: 1px solid var(--line); }
.grid tr:last-child td { border-bottom: 0; }
.grid tr:hover td { background: var(--panel-2); }
.grid a { color: var(--text); text-decoration: none; }
.grid a:hover { color: var(--accent); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tick { width: 64px; text-align: center; }
.title { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.pad { padding: 24px 14px; text-align: center; }
.count { margin: 0 0 8px; font-size: 13px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }

.pager { display: flex; gap: 8px; margin-top: 14px; }
.pager button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.settings { display: grid; gap: 16px; max-width: 720px; }
fieldset {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 20px;
}
legend { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 0 6px; }
.settings label { display: block; margin-bottom: 14px; font-size: 14px; }
.settings label small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.settings input[type=number] {
  display: block;
  margin-top: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 7px 11px;
  border-radius: 8px;
  width: 180px;
}
.settings label.check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.settings label.check small { flex-basis: 100%; margin-left: 0; }
fieldset.readonly { margin-top: 22px; max-width: 720px; }
fieldset.readonly dl > div { min-width: 100%; display: flex; gap: 12px; align-items: baseline; }
fieldset.readonly dt { min-width: 130px; }
fieldset.readonly dd { font-size: 13px; }

input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.proxy-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.proxy-actions form { margin: 0; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 14%, var(--panel)); }

.proxy-now {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px 16px;
  margin-bottom: 18px;
  text-decoration: none;
  color: inherit;
}
.proxy-now:hover { border-color: #39404f; }
.proxy-now.in_use { border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.proxy-now.in_use .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
.proxy-now.waiting, .proxy-now.blocked, .proxy-now.down {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
}
.proxy-now.waiting .dot, .proxy-now.blocked .dot, .proxy-now.down .dot { background: var(--warn); }
.proxy-now.none { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.proxy-now.none .dot { background: var(--bad); }
.proxy-now .dot { margin-top: 8px; }
.proxy-now-body { min-width: 0; flex: 1; }
.proxy-now-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.proxy-now-main { min-width: 0; flex: 1; }
.proxy-now-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.proxy-now-name { font-weight: 650; font-size: 15px; }
.proxy-now-url {
  color: var(--muted);
  font-size: 12px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proxy-now-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.proxy-now-facts > div { min-width: 96px; }
.proxy-now-facts dt {
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 10px;
  color: var(--muted);
}
.proxy-now-facts dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.proxy-now-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}
.nowrap { white-space: nowrap; }

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 9px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab-count {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.tab.on .tab-count { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs-meta { margin-left: auto; color: var(--muted); font-size: 12px; padding-right: 4px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] {
  flex: 1;
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.toolbar input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.toolbar-gap { flex: 0 0 auto; }
.toolbar-hint { color: var(--muted); font-size: 12px; max-width: 420px; }
.toolbar-hint strong { color: var(--text); font-weight: 600; }

.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.crumb {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: 3px 4px;
  font-size: 13px;
}
.crumb:hover { text-decoration: underline; }
.crumb.on { color: var(--text); cursor: default; }
.crumb-sep { color: var(--muted); }

.col-read { width: 60px; }
.col-act { width: 120px; white-space: nowrap; text-align: right; }
.grid tr.is-on td { background: color-mix(in srgb, var(--good) 7%, var(--panel)); }
.grid tr.is-on:hover td { background: color-mix(in srgb, var(--good) 12%, var(--panel)); }
.grid tr.is-skip td { background: color-mix(in srgb, var(--warn) 7%, var(--panel)); }
.grid tr.is-skip:hover td { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }

.switch {
  width: 38px;
  height: 21px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background .12s, border-color .12s;
}
.switch .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .12s, background .12s;
}
.switch:hover { border-color: #39404f; }
.switch.on { background: var(--good); border-color: var(--good); }
.switch.on .knob { transform: translateX(17px); background: #fff; }
.switch.dim { opacity: 0.45; }

.cat-drill {
  background: none;
  border: 0;
  color: var(--text);
  font-size: 14px;
  padding: 0;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-drill:hover { color: var(--accent); }
.drill-arrow { color: var(--muted); font-size: 16px; }
.cat-drill:hover .drill-arrow { color: var(--accent); }
.cat-leaf { font-size: 14px; }
.cat-path { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.cat-meta { display: flex; gap: 10px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.cat-meta .meta-on { color: var(--good); }
.cat-meta .meta-id { font-variant-numeric: tabular-nums; }

#issues { margin: 16px 0 18px; }
.stage.issues.has-open {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
}
.pct.bad { color: var(--bad); }
.issue-open {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.issue {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bad) 10%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line));
}
.issue.warning {
  background: color-mix(in srgb, var(--warn) 10%, var(--panel-2));
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
}
.issue-level {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 56px;
  padding-top: 3px;
}
.issue.error .issue-level, .issue-log .error .issue-level { color: var(--bad); }
.issue.warning .issue-level, .issue-log .warning .issue-level { color: var(--warn); }
.issue-log .ok .issue-level { color: var(--good); }
.issue-log .info .issue-level { color: var(--muted); }
.issue-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.issue-detail {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  word-break: break-word;
}
.issue-url {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70ch;
}
.issue-log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.issue-log li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.issue-when { color: var(--muted); font-size: 12px; min-width: 72px; }
.issue-title { font-weight: 600; }
.issue-count { color: var(--muted); font-size: 12px; }
.issue-who { margin-left: auto; color: var(--muted); font-size: 12px; }

/* -- Overview: worker cards, run history, totals -------------------------- */

.state-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.worker.running .state-label { color: var(--good); }
.worker.paused .state-label { color: var(--warn); }
.worker.waiting .state-label { color: var(--warn); }
.waiting .dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chips-label {
  margin: 12px 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stage.runs, .stage.totals { padding-bottom: 0; }
.stage.runs { padding: 0; }
.stage.runs header, .stage.totals header { margin-bottom: 0; }
.stage.runs header { margin: 0; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.runs-grid { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.runs-grid td { vertical-align: top; }
.run-worker { font-weight: 600; white-space: nowrap; }
.run-live td { background: color-mix(in srgb, var(--good) 5%, var(--panel)); }
.run-error, .run-note {
  margin-top: 4px;
  color: var(--bad);
  font-size: 11px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  max-width: 36ch;
  word-break: break-word;
}
.run-note { color: var(--muted); font-family: inherit; }
.stage.runs .pad { margin: 0; }

.worker-stats {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.worker-stats dl.mini { display: grid; gap: 5px; margin: 0 0 10px; }
.worker-stats dl.mini > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.worker-stats dt {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--muted);
}
.worker-stats dd { font-size: 15px; margin: 0; font-variant-numeric: tabular-nums; }
.worker-stats dd small { color: var(--muted); font-size: 11px; font-weight: 400; }
.worker-stats dd.warn { color: var(--warn); }
.worker-stats .bar { height: 5px; margin: 0 0 6px; }
.bar-caption { color: var(--muted); font-size: 11px; }

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.login-window {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 40px 36px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.login-window .brand { font-size: 18px; margin-bottom: 28px; }
.login-window h1 { font-size: 28px; margin: 0 0 6px; }
.login-window .muted { margin: 0 0 24px; color: var(--muted); }
.login-error {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bad) 14%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line));
  color: var(--bad);
}
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 6px; font-size: 14px; }
.login-form input[type=text],
.login-form input[type=password] {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
}
.login-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.login-form .btn { width: 100%; padding: 12px 16px; font-size: 16px; margin-top: 8px; }
