:root {
  color-scheme: light dark;
  --font-ui: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.75rem;
  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 32px; --space-2xl: 48px;
  --radius: 10px; --radius-sm: 6px;

  --bg: light-dark(oklch(97.6% 0.004 280), oklch(16.5% 0.009 280));
  --surface: light-dark(oklch(99.4% 0.002 280), oklch(20.5% 0.011 280));
  --sunken: light-dark(oklch(95.2% 0.006 280), oklch(18% 0.01 280));
  --line: light-dark(oklch(90.5% 0.008 280), oklch(28.5% 0.012 280));
  --line-strong: light-dark(oklch(84% 0.01 280), oklch(36% 0.014 280));
  --text: light-dark(oklch(23% 0.016 280), oklch(93% 0.006 280));
  --muted: light-dark(oklch(47% 0.016 280), oklch(71% 0.014 280));
  --accent: light-dark(oklch(46% 0.13 280), oklch(76% 0.1 280));
  --accent-ink: light-dark(oklch(98% 0.01 280), oklch(18% 0.03 280));
  --accent-soft: light-dark(oklch(94% 0.025 280), oklch(29% 0.04 280));
  --ok: light-dark(oklch(50% 0.12 155), oklch(78% 0.12 155));   --ok-soft: light-dark(oklch(95% 0.03 155), oklch(28% 0.045 155));
  --fail: light-dark(oklch(52% 0.17 27), oklch(74% 0.14 27));  --fail-soft: light-dark(oklch(95.5% 0.026 27), oklch(29% 0.055 27));
  --warn: light-dark(oklch(55% 0.12 70), oklch(82% 0.11 80));  --warn-soft: light-dark(oklch(95.5% 0.04 85), oklch(30% 0.05 80));
  --shadow: 0 1px 2px light-dark(oklch(30% 0.02 280 / 0.06), transparent);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--text-sm)/1.5 var(--font-ui); font-kerning: normal;
}
.num { font-variant-numeric: tabular-nums; }
code, .code { font-family: var(--font-code); font-size: 0.92em; font-variant-ligatures: none; }
a { color: var(--accent); }
.login-page { max-width: 1180px; margin: 0 auto; padding: var(--space-xl) var(--space-md) var(--space-2xl); display: grid; gap: var(--space-lg); }

.brand { display: flex; align-items: baseline; gap: var(--space-xs); }
.health {
  display: flex; align-items: center; gap: var(--space-xs); padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); max-width: 100%;
}
.health .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.health.ok .dot { background: var(--ok); }
.health.warn { background: var(--warn-soft); border-color: transparent; }
.health.warn .dot { background: var(--warn); }
.health.fail { background: var(--fail-soft); border-color: transparent; }
.health.fail .dot { background: var(--fail); }
.health b { font-weight: 600; }

/* buttons and inputs */
button, input, select { font: inherit; color: inherit; }
.btn {
  appearance: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 550; line-height: 1.2;
  transition: background-color .15s ease-out, border-color .15s ease-out;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); padding-inline: 8px; }
.btn.quiet:hover { color: var(--text); }
.btn:disabled { opacity: .55; cursor: progress; }
.field {
  appearance: none; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm);
  padding: 7px 10px; min-width: 0; line-height: 1.3;
}
.field::placeholder { color: var(--muted); opacity: .85; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field:focus-visible { outline-offset: 0; border-color: var(--accent); }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding: var(--space-md) var(--space-lg) 0; }
.panel-head h2 { margin: 0; font-size: var(--text-md); font-weight: 620; }
.panel-head p { margin: 0; color: var(--muted); }
.panel-body { padding: var(--space-sm) var(--space-lg) var(--space-lg); }

/* worker capacity */
.slots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--space-xs); }
.slot { width: 14px; height: 14px; border-radius: 4px; background: var(--sunken); border: 1px solid var(--line-strong); transition: background-color .25s ease-out, border-color .25s ease-out; }
.slot.busy { background: var(--accent); border-color: var(--accent); }
.pools { display: grid; gap: 6px; margin-top: var(--space-xs); }
.pool { display: grid; grid-template-columns: minmax(0, 8.5rem) 1fr; gap: var(--space-xs); align-items: center; min-width: 0; }
.pool-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool .slots { margin-top: 0; }

/* scrape results */
.result { margin-top: var(--space-md); border-top: 1px solid var(--line); padding-top: var(--space-md); display: grid; gap: var(--space-sm); }
.result-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-md); }
.result-why { color: var(--fail); }
details > summary { cursor: pointer; color: var(--muted); width: fit-content; }
details > summary:hover { color: var(--text); }
pre.json {
  margin: var(--space-xs) 0 0; max-height: 380px; overflow: auto; padding: var(--space-sm) var(--space-md);
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 12px/1.55 var(--font-code); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* two-up */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: var(--space-lg); }

/* failure reasons */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reasons li { display: grid; grid-template-columns: 9.5rem 1fr 3rem; gap: var(--space-sm); align-items: center; }
.meter { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--fail); border-radius: 3px; transform-origin: left; transition: transform .4s cubic-bezier(.22,1,.36,1); }
.reasons .c { text-align: right; }
.reasons li.empty { display: block; padding: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; padding: 0 var(--space-sm) var(--space-xs); white-space: nowrap; }
td { padding: 10px var(--space-sm); border-top: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.r { text-align: right; white-space: nowrap; }
.rate { display: inline-flex; align-items: center; gap: var(--space-xs); justify-content: flex-end; }
.rate .meter { width: 56px; }
.rate .meter i { background: var(--ok); }

/* results */
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.fail { color: var(--fail); background: var(--fail-soft); }
.url { max-width: 440px; }
.url .host { color: var(--text); }
.url .path { color: var(--muted); overflow-wrap: anywhere; }
.why { color: var(--muted); max-width: 360px; overflow-wrap: anywhere; }
.when { color: var(--muted); white-space: nowrap; }

.empty { color: var(--muted); padding: var(--space-md) 0 var(--space-2xs); max-width: 62ch; }
.empty code { color: var(--text); }
.notice { color: var(--fail); }

@media (max-width: 560px) {
  .login-page { padding-top: var(--space-lg); }
  .panel-head, .panel-body { padding-inline: var(--space-md); }
  .reasons li { grid-template-columns: minmax(0, 7.5rem) 1fr 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Sign-in page */
.login-page { max-width: 1060px; min-height: 100svh; align-content: start; gap: 0; }
.login-page .brand { align-items: center; gap: var(--space-sm); font-weight: 650; }
.login-page .brand span { color: var(--text); }
.queue-mark { display: grid; grid-template-columns: repeat(2, 5px); gap: 3px; padding: 7px; background: var(--accent); border-radius: 6px; }
.queue-mark i { height: 5px; border-radius: 1px; background: var(--accent-ink); }
.queue-mark i:last-child { opacity: .48; }
.login-layout {
  margin-top: clamp(48px, 13vh, 144px); min-width: 0;
  display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.login-content { padding: clamp(24px, 5vw, 48px); }
.login-content h1 { margin: 0; font-size: 2rem; line-height: 1.15; font-weight: 650; letter-spacing: -.04em; }
.login-content > p { margin: var(--space-sm) 0 0; color: var(--muted); }
#login-form { margin-top: var(--space-xl); display: grid; gap: var(--space-xs); }
#login-form label { font-weight: 550; }
#login-form input { padding: 11px 12px; }
#login-form label + input + label { margin-top: var(--space-sm); }
#login-form button { margin-top: var(--space-sm); min-height: 42px; }
#login-error { margin: 0; }
.login-content .account-help { margin-top: var(--space-lg); font-size: var(--text-xs); }
.login-diagram {
  display: grid; place-items: center; padding: var(--space-xl);
  background: var(--sunken); border-inline-start: 1px solid var(--line);
}
.queue-diagram { display: flex; align-items: center; width: min(100%, 400px); }
.queue-node {
  flex: 1 1 0; min-width: 0; min-height: 82px; border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(2, minmax(0, 13px)); gap: 6px; justify-content: center; align-content: center;
  background: var(--surface); border: 1px solid var(--line);
}
.queue-node i { height: 13px; background: var(--sunken); border: 1px solid var(--line-strong); border-radius: 3px; }
.queue-node.processing { flex-grow: 1.4; min-height: 112px; background: var(--accent-soft); }
.queue-node.processing i:nth-child(-n+2) { background: var(--accent); border-color: var(--accent); }
.queue-node.completed i { background: var(--ok-soft); border-color: var(--ok); }
.queue-track { flex: .32 1 0; border-top: 1px dashed var(--line-strong); }
@media (max-width: 640px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); margin-top: var(--space-2xl); }
  .login-diagram { display: none; }
}

/* Console layout */
.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100svh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; min-height: 0; overflow: auto;
  display: flex; flex-direction: column; gap: var(--space-xl); padding: var(--space-lg) var(--space-md) var(--space-md);
  background: var(--surface); border-inline-end: 1px solid var(--line);
}
.workspace-brand {
  display: inline-flex; align-items: center; gap: var(--space-sm); width: fit-content;
  color: var(--text); font-size: var(--text-md); font-weight: 700; text-decoration: none; line-height: 1.25;
}
.sidebar-brand { padding-inline: var(--space-xs); }
.workspace-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-xs); font-weight: 500; }
.sidebar-nav { display: grid; gap: var(--space-lg); }
.nav-group { display: grid; gap: var(--space-2xs); }
.nav-group p {
  margin: 0 var(--space-xs) var(--space-2xs); color: var(--muted);
  font-weight: 600; font-size: var(--text-xs); letter-spacing: .04em;
}
.nav-group a {
  display: flex; gap: var(--space-xs); align-items: center; min-height: 40px; padding: 6px var(--space-xs);
  color: var(--text); text-decoration: none; font-weight: 530; border-radius: var(--radius-sm);
}
.nav-group a:hover { background: var(--sunken); }
.nav-group a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-icon { position: relative; width: 16px; height: 16px; flex: none; color: var(--muted); }
.nav-group a[aria-current="page"] .nav-icon { color: var(--accent); }
.nav-icon::before, .nav-icon::after { content: ""; position: absolute; }
.i-overview::before { inset: 2px auto auto 2px; width: 4px; height: 4px; background: currentColor; box-shadow: 7px 0, 0 7px, 7px 7px; border-radius: 1px; }
.i-scrape::before { inset: 2px 2px 2px 4px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.i-jobs::before { inset: 2px; border: 1px solid; border-radius: 2px; }
.i-jobs::after { top: 6px; left: 5px; width: 6px; height: 1px; background: currentColor; box-shadow: 0 3px; }
.i-workers::before { inset: 2px 1px 9px; border: 1px solid; border-radius: 2px; }
.i-workers::after { inset: 9px 1px 2px; border: 1px solid; border-radius: 2px; }
.i-keys::before { top: 3px; left: 1px; width: 7px; height: 7px; border: 1px solid; border-radius: 50%; }
.i-keys::after { top: 7px; left: 9px; width: 6px; height: 4px; border-top: 1px solid; border-right: 1px solid; }
.i-users::before { top: 2px; left: 5px; width: 6px; height: 6px; border: 1px solid; border-radius: 50%; }
.i-users::after { inset: 9px 2px 1px; border: 1px solid; border-radius: 6px 6px 2px 2px; }
.i-settings::before { inset: 2px; border: 1px solid; border-radius: 4px; transform: rotate(45deg); }
.i-settings::after { inset: 6px; border: 1px solid; border-radius: 50%; }
.sidebar-profile {
  position: relative; margin-top: auto; padding-top: var(--space-xs); border-top: 1px solid var(--line);
}
.profile-toggle {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs);
  width: 100%; padding: var(--space-xs); background: transparent; border: 0; border-radius: var(--radius-sm);
  cursor: pointer; text-align: start;
}
.profile-toggle:hover, .profile-toggle[aria-expanded="true"] { background: var(--sunken); }
.profile-chevron {
  width: 7px; height: 7px; margin-inline: var(--space-2xs); color: var(--muted);
  border-top: 1px solid; border-left: 1px solid; transform: translateY(2px) rotate(45deg);
}
.profile-actions {
  position: absolute; z-index: 1; inset-inline: 0; bottom: calc(100% + var(--space-2xs)); display: grid;
  padding: var(--space-2xs); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.profile-actions a, .profile-actions button {
  display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs);
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text);
  text-align: start; text-decoration: none; cursor: pointer;
}
.profile-actions a:hover, .profile-actions button:hover { background: var(--sunken); }
#worker-concurrency-form > label { flex-grow: 0; flex-basis: 220px; }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--accent-soft); color: var(--accent); font-weight: 650; border-radius: var(--radius-sm);
}
.sidebar-profile strong, .sidebar-profile small { display: block; overflow-wrap: anywhere; }
.sidebar-profile small { color: var(--muted); font-size: var(--text-xs); }
.mobile-bar { display: none; }
.workspace-main { min-width: 0; }
.workspace-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); flex-wrap: wrap;
  min-height: 65px; padding: var(--space-xs) clamp(16px, 3vw, 40px);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.workspace-path { display: flex; gap: var(--space-xs); align-items: baseline; color: var(--muted); }
.workspace-path strong { color: var(--text); font-weight: 600; }
.workspace-bar .health { font-size: var(--text-xs); overflow-wrap: anywhere; }
.workspace-content { max-width: 1440px; margin-inline: auto; padding: var(--space-xl) clamp(16px, 3vw, 40px) var(--space-2xl); container-type: inline-size; }
.skip-link { position: fixed; z-index: 2; top: var(--space-xs); left: var(--space-xs); padding: var(--space-xs); background: var(--surface); }
.skip-link:not(:focus) { position: absolute; clip-path: inset(50%); }
.view { display: grid; gap: var(--space-lg); min-width: 0; }
.view-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); }
.view-heading h1 { margin: 0; font-size: 2rem; font-weight: 660; letter-spacing: -.038em; line-height: 1.15; }
.view-heading p { margin: var(--space-xs) 0 0; color: var(--muted); }
.view-heading h1:focus, .detail-heading h2:focus { outline: none; }
.btn[href] { display: inline-block; text-decoration: none; }
.quiet-link { font-size: var(--text-sm); font-weight: 580; text-decoration: none; text-align: end; }
.quiet-link:hover { text-decoration: underline; }
.queue-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); overflow: hidden;
}
.queue-metric {
  display: grid; grid-template-rows: auto auto 1fr; gap: var(--space-2xs);
  padding: var(--space-md) var(--space-lg); background: var(--surface); color: var(--text); text-decoration: none;
}
.queue-metric:hover { background: var(--sunken); }
.queue-metric:focus-visible { outline-offset: -3px; }
.queue-metric > span { font-weight: 550; }
.queue-metric strong { font: 590 2rem/1.25 var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.queue-metric small { color: var(--muted); font-size: var(--text-xs); }
.queue-metric.succeeded strong { color: var(--ok); }
.queue-metric.failed strong { color: var(--fail); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
.capacity-summary, .account-fields, .job-fields, .job-lifecycle { margin: 0; display: grid; gap: var(--space-sm) var(--space-xl); }
.capacity-summary { grid-template-columns: 1fr 1fr; margin-top: var(--space-xs); }
.capacity-summary dt, .account-fields dt, .job-fields dt, .job-lifecycle dt { color: var(--muted); font-size: var(--text-xs); }
.capacity-summary dd, .account-fields dd, .job-fields dd, .job-lifecycle dd { margin: var(--space-2xs) 0 0; font-weight: 580; overflow-wrap: anywhere; }
.capacity-summary dd { font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.capacity-panel .pools { margin-block: var(--space-md); }
.capacity-panel .pool { grid-template-columns: minmax(0, 1fr); }
.capacity-panel .pools:empty { display: none; }
.queue-summary { display: grid; gap: var(--space-xs); border-top: 1px solid var(--line); margin-top: var(--space-md); padding-top: var(--space-sm); color: var(--muted); font-size: var(--text-xs); }
.queue-summary div { display: flex; justify-content: space-between; gap: var(--space-xs); flex-wrap: wrap; }
.queue-summary b { color: var(--text); font-weight: 600; }
.workspace .panel-head { padding-bottom: var(--space-xs); }
.panel-head:has(> div) { align-items: center; }
.panel-head h2 + p { margin-top: var(--space-2xs); }
.form-panel { padding: var(--space-lg); }
.form-panel h2 { margin: 0; font-size: var(--text-md); font-weight: 650; }
.form-panel p { margin: var(--space-2xs) 0 0; }
.form-panel h2 + form, .form-panel p + form, .form-panel p + label { margin-top: var(--space-md); }
.screen-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); max-width: 700px; }
.screen-form label, .access-form label, .new-key label, .theme-label { display: grid; gap: var(--space-2xs); min-width: 0; font-weight: 550; }
.screen-form .field, .access-form .field, .theme-label .field { min-height: 38px; }
.wide-field { grid-column: 1 / -1; }
.form-actions { display: flex; margin-top: var(--space-2xs); }
.view input, .view select { width: 100%; }
.view select.field { appearance: auto; }
.muted { color: var(--muted); }
.access-form { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: end; }
.access-form > label { flex: 0 1 190px; }
.access-form > button { min-height: 38px; }
.form-panel .form-status { margin-top: var(--space-sm); }
.form-status:empty { display: none; }
.new-key {
  display: grid; gap: var(--space-xs); margin-top: var(--space-md); padding: var(--space-md);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--sunken);
}
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-md); }
.account-fields { grid-template-columns: repeat(2, minmax(0, 240px)); }
.account-fields dd { font-size: var(--text-md); }
.job-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 162px), 1fr)); }
.job-fields .wide-field { grid-column: 1 / -1; }
.job-filters { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: end; }
.job-filters label { display: grid; flex: 1 1 112px; min-width: 0; gap: var(--space-2xs); font-weight: 550; }
.job-filters label:first-child { flex-basis: 200px; }
.job-filters .field, .job-filters button { min-height: 38px; }
.job-filters > a { align-self: end; line-height: 38px; }
.job-pages { display: flex; justify-content: space-between; gap: var(--space-sm); }
.job-pages #older-jobs { margin-inline-start: auto; }
.key-actions { white-space: nowrap; }
.key-actions button { margin-inline-start: var(--space-xs); }
.job-lifecycle { grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); margin-top: var(--space-md); }
.job-lifecycle > div { border-inline-start: 2px solid var(--line-strong); padding-inline-start: var(--space-sm); }
.job-lifecycle dd { font-variant-numeric: tabular-nums; }
.trend-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs); }
.trend-scale {
  display: flex; flex-direction: column; justify-content: space-between; align-items: end;
  color: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; line-height: 1;
}
.trend-chart { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: clamp(2px, .5vw, 8px); }
.trend-hour {
  display: flex; flex-direction: column; justify-content: end; height: 96px;
  background: var(--sunken); border: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0; min-width: 0; cursor: pointer; overflow: hidden;
}
.trend-hour:hover { background: var(--accent-soft); }
.trend-hour[aria-pressed="true"], .trend-hour:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.trend-ok { background: var(--ok); }
.trend-fail { background: var(--fail); }
.trend-labels, .trend-key {
  display: flex; gap: var(--space-xs); color: var(--muted); font-size: var(--text-xs);
}
.trend-labels { grid-column: 2; justify-content: space-between; font-variant-numeric: tabular-nums; }
.trend-key { gap: var(--space-md); margin-top: var(--space-sm); }
.trend-key span { display: flex; align-items: center; gap: var(--space-xs); }
.trend-key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.trend-details {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: var(--space-xs); margin-top: var(--space-sm);
}
.trend-details p { margin: 0; text-align: center; font-variant-numeric: tabular-nums; }
.trend-details button { min-height: 36px; min-width: 36px; padding-inline: var(--space-xs); }
.theme-label { max-width: 225px; }
.source { min-width: 86px; white-space: nowrap; }
.source .code { display: block; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.job-link { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.job-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.job-link .host { color: inherit; }
.job-link .path { display: block; }
.pill.neutral { color: var(--accent); background: var(--accent-soft); }
.workspace table tr:last-child td { padding-bottom: 0; }
.workspace .table-wrap:focus-visible { outline-offset: -2px; }

@container (max-width: 880px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 645px) {
  .queue-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 430px) {
  .view-heading h1 { font-size: var(--text-xl); }
  .queue-metric, .form-panel { padding: var(--space-md); }
  .screen-form { grid-template-columns: minmax(0, 1fr); }
  .access-form > label { flex-basis: 100%; }
}
@media (max-width: 840px) {
  .workspace { grid-template-columns: 164px minmax(0, 1fr); }
  .sidebar { padding-inline: var(--space-xs); }
}
@media (max-width: 620px) {
  .workspace { display: block; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md);
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .menu-icon { display: inline-block; width: 13px; height: 8px; margin-right: var(--space-2xs); border-block: 1px solid currentColor; }
  .sidebar { position: static; height: auto; padding: var(--space-md); border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .sidebar:not(.is-open), .sidebar-brand, .workspace-path { display: none; }
  .profile-actions { position: static; margin-top: var(--space-2xs); }
  .workspace-bar { min-height: 0; justify-content: flex-start; background: var(--bg); border-bottom: 0; padding-top: var(--space-md); }
  .workspace-content { padding-top: var(--space-md); }
}
