/* Hallmark · Ink · draw: 242aaebe · hero: queue-led counter · signature: live music queue · surface: paper */
/* Hallmark · pre-emit critique: P5 H5 E4 S4 R5 V4 · weakest: execution, the dashboard must keep real jobs at the centre; the queue leads the first screen */
:root {
  color-scheme: light;
  --paper: oklch(99.5% 0.003 100);
  --paper-2: oklch(97% 0.004 100);
  --paper-3: oklch(94% 0.006 100);
  --ink: oklch(16% 0 0);
  --ink-2: oklch(28% 0 0);
  --muted: oklch(44% 0 0);
  --muted-2: oklch(44% 0.004 188);
  --rule: oklch(83% 0.004 100);
  --rule-2: oklch(93.5% 0.003 100);
  --accent: oklch(50% 0.095 188);
  --accent-ink: oklch(99.5% 0.003 100);
  --accent-soft: oklch(93% 0.05 190);
  --accent-soft-ink: oklch(27% 0.045 190);
  --danger-ink: oklch(35% 0.015 20);
  --focus: oklch(50% 0.095 188);
  --sidebar: oklch(16% 0 0);
  --sidebar-2: oklch(22% 0 0);
  --sidebar-text: oklch(94% 0.004 100);
  --sidebar-muted: oklch(70% 0.004 100);
  --font-display: "Epilogue", ui-sans-serif, system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-control: 9px;
  --sidebar-width: 248px;
  --gutter: clamp(20px, 3vw, 42px);
  --shadow-float: 0 22px 50px oklch(16% 0 0 / 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
::selection { background: var(--accent-soft); color: var(--accent-soft-ink); }

.boot-screen { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot-screen p { margin: 0; font-size: 14px; }
.boot-mark { width: 34px; height: 34px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: rotate 850ms linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 26px 17px 18px; background: var(--sidebar); color: var(--sidebar-text); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid oklch(45% 0 0); border-radius: 10px; color: var(--accent-soft); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { color: var(--sidebar-text); font-size: 17px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.brand-subtitle { display: block; margin-top: 5px; color: var(--sidebar-muted); font-size: 11px; line-height: 1.2; }
.nav-label { margin: 10px 12px 9px; color: var(--sidebar-muted); font-size: 12px; }
.nav-list { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; color: var(--sidebar-muted); text-decoration: none; font-size: 13px; font-weight: 500; transition: background-color 130ms ease, color 130ms ease, border-color 130ms ease; }
.nav-link svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.75; }
.nav-link:hover { color: var(--sidebar-text); background: var(--sidebar-2); }
.nav-link[aria-current="page"] { color: var(--sidebar-text); background: var(--sidebar-2); border-color: oklch(31% 0 0); }
.nav-link[aria-current="page"] .nav-icon { color: var(--accent-soft); }
.sidebar-spacer { flex: 1; }
.sidebar-note { padding: 15px 13px; border-top: 1px solid oklch(31% 0 0); color: var(--sidebar-muted); font-size: 11px; line-height: 1.5; }
.sidebar-note strong { display: block; margin-bottom: 3px; color: var(--sidebar-text); font-weight: 600; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 10px 0; border-top: 1px solid oklch(31% 0 0); }
.user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid oklch(43% 0 0); border-radius: 50%; color: var(--sidebar-text); font-size: 11px; font-weight: 600; }
.user-name { color: var(--sidebar-text); font-size: 12px; font-weight: 600; }
.user-role { color: var(--sidebar-muted); font-size: 11px; }

.main-column { grid-column: 2; min-width: 0; min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 var(--gutter); border-bottom: 1px solid var(--rule); background: color-mix(in oklab, var(--paper) 94%, transparent); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-tools { display: flex; align-items: center; gap: 12px; }
.connection { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.connection-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--paper-2); border-color: var(--rule); }
.icon-button svg { width: 18px; height: 18px; }
.mobile-brand, .mobile-menu { display: none; }
.bottom-nav { display: none; }
.page { width: min(100%, 1500px); margin-inline: auto; padding: 34px var(--gutter) 70px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-header h1 { margin: 0; color: var(--ink); font-size: clamp(28px, 3vw, 39px); font-weight: 700; letter-spacing: -0.055em; line-height: 1.08; overflow-wrap: break-word; min-width: 0; }
.page-header p { max-width: 58ch; margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--paper-2); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 130ms ease, border-color 130ms ease, transform 130ms ease; }
.button svg { width: 16px; height: 16px; }
.button:hover { border-color: oklch(72% 0.008 100); background: var(--paper-3); }
.button:active { transform: translateY(1px); }
.button-primary { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.button-primary:hover { border-color: var(--ink-2); background: var(--ink-2); }
.button-quiet { background: transparent; }
.button-danger { border-color: var(--rule); color: var(--danger-ink); background: transparent; }
.button-small { min-height: 44px; padding: 0 12px; font-size: 12px; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }

.hero-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr); align-items: center; gap: 28px; padding: 27px 29px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--rule); }
.hero-copy h2 { max-width: 18ch; margin: 0; color: var(--ink); font-size: clamp(26px, 2.7vw, 36px); font-weight: 700; letter-spacing: -0.055em; line-height: 1.08; }
.hero-copy p { max-width: 48ch; margin: 12px 0 19px; color: var(--muted); font-size: 13px; }
.hero-quick { padding: 17px 18px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.hero-quick label { display: block; margin-bottom: 8px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.input-row { display: flex; align-items: center; gap: 8px; }
.text-input, .select-input { width: 100%; min-width: 0; min-height: 44px; padding: 0 13px; border: 1px solid oklch(55% 0.006 100); border-radius: 8px; outline: 2px solid transparent; outline-offset: -3px; background: var(--paper); color: var(--ink); font-size: 13px; }
.text-input::placeholder { color: var(--muted-2); }
.text-input:focus-visible, .select-input:focus-visible { border-color: var(--ink-2); outline-color: var(--focus); }
.helper-text { min-height: 1.45em; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.field-error { color: var(--danger-ink); font-size: 12px; }

.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 26px 0 31px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stat-item { min-width: 0; padding: 18px 22px 17px 0; }
.stat-item + .stat-item { padding-left: 22px; border-left: 1px solid var(--rule); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { display: block; margin-top: 5px; color: var(--ink); font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -0.05em; line-height: 1.1; overflow-wrap: break-word; }
.stat-detail { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: 17px; font-weight: 700; letter-spacing: -0.035em; }
.text-link-button { display: inline; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.text-link-button:hover { color: var(--accent); }
.toggle-line { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; cursor: pointer; }
.toggle-line input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.text-link:hover { text-decoration-color: var(--accent); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr); gap: 34px; align-items: start; }
.flat-section { min-width: 0; }
.ruled-list { border-top: 1px solid var(--ink); }
.job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.job-main { min-width: 0; }
.job-title { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.job-side { display: flex; align-items: center; gap: 12px; }
.progress-track { width: 104px; height: 6px; appearance: none; border: 0; border-radius: 999px; background: var(--paper-3); }
.progress-track::-webkit-progress-bar { border-radius: 999px; background: var(--paper-3); }
.progress-track::-webkit-progress-value { border-radius: 999px; background: var(--accent); }
.progress-track::-moz-progress-bar { border-radius: 999px; background: var(--accent); }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 500; white-space: nowrap; }
.status-pill.active, .status-pill.completed { border-color: oklch(87% 0.025 190); background: var(--accent-soft); color: var(--accent-soft-ink); }
.status-pill.failed, .status-pill.partial { border-color: oklch(83% 0.006 20); color: var(--danger-ink); }
.status-pill.queued { background: var(--paper-2); color: var(--ink-2); }
.library-summary { padding: 18px 0 0; border-top: 1px solid var(--ink); }
.library-count { color: var(--ink); font-size: 42px; font-weight: 700; letter-spacing: -0.07em; line-height: 1; }
.library-count-caption { margin-top: 7px; color: var(--muted); font-size: 12px; }
.library-meter { height: 6px; margin: 18px 0 12px; overflow: clip; border-radius: 999px; background: var(--paper-3); }
.library-meter span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent); }
.summary-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
.summary-pair span { display: block; color: var(--muted); font-size: 11px; }
.summary-pair strong { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; font-weight: 600; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.search-field { position: relative; width: min(100%, 410px); }
.search-field svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-field .text-input { padding-left: 38px; }
.filter-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-2); }
.filter-tab { min-height: 44px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.filter-tab[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); font-weight: 600; }

.track-list { border-top: 1px solid var(--ink); }
.track-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; align-items: center; min-height: 74px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.track-primary { display: flex; align-items: center; gap: 13px; min-width: 0; }
.track-art { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid var(--rule); border-radius: 9px; background: var(--paper-2); color: var(--muted); }
.track-art svg { width: 19px; height: 19px; }
.track-copy { min-width: 0; }
.track-name { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.track-subtitle { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.track-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.track-meta span { white-space: nowrap; }
.library-cell-album { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.panel { padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); }
.panel h2, .panel h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -0.03em; }
.panel p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.panel + .panel { margin-top: 16px; }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.result-list { margin-top: 20px; border-top: 1px solid var(--ink); }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.result-provider { margin-top: 4px; color: var(--muted); font-size: 11px; }

.empty-state { display: grid; justify-items: center; padding: 38px 20px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border: 1px solid var(--rule); border-radius: 11px; color: var(--muted); }
.empty-icon svg { width: 19px; height: 19px; }
.empty-state strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.empty-state p { max-width: 42ch; margin: 5px 0 15px; color: var(--muted); font-size: 12px; }
.loading-state { display: flex; align-items: center; gap: 10px; min-height: 110px; color: var(--muted); font-size: 12px; }
.loading-state .spinner { width: 17px; height: 17px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: rotate 850ms linear infinite; }
.error-state { padding: 14px 16px; border: 1px solid var(--rule); border-radius: 9px; color: var(--danger-ink); background: var(--paper-2); font-size: 12px; }

.scan-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-2); }
.scan-banner[hidden] { display: none; }
.scan-spinner { width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: rotate 850ms linear infinite; }
.scan-banner strong { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.scan-banner span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.library-table { border-top: 1px solid var(--ink); }
.library-table-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.8fr) 88px 80px; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.library-table-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.8fr) 88px 80px; gap: 16px; align-items: center; min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 12px; }
.library-table-row > * { min-width: 0; }
.library-cell-title strong { display: block; overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.library-cell-title span { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; color: var(--muted); font-size: 11px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr); align-items: start; gap: 34px; }
.settings-list { margin-top: 14px; border-top: 1px solid var(--ink); }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 0.8fr); gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.setting-label { color: var(--muted); font-size: 12px; }
.setting-value { color: var(--ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.integration-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.integration-row strong { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.integration-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.dialog { width: min(680px, calc(100% - 30px)); max-height: min(82dvh, 760px); padding: 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); color: var(--ink-2); box-shadow: var(--shadow-float); }
.dialog::backdrop { background: oklch(16% 0 0 / 0.48); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--rule); }
.dialog-header h2 { margin: 0; color: var(--ink); font-size: 17px; letter-spacing: -0.03em; }
.dialog-body { padding: 18px 20px 22px; overflow-y: auto; }
.dialog-job-url { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100% - 40px)); }
.toast { padding: 12px 15px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-float); font-size: 12px; }
.toast.error { color: var(--danger-ink); }
.login-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr); background: var(--paper); }
.login-aside { display: flex; flex-direction: column; justify-content: space-between; min-height: 100dvh; padding: clamp(30px, 5vw, 66px); background: var(--sidebar); color: var(--sidebar-text); }
.login-mark { display: flex; align-items: center; gap: 12px; color: var(--sidebar-text); font-size: 18px; font-weight: 700; letter-spacing: -0.04em; }
.login-mark .brand-mark { border-color: oklch(45% 0 0); }
.login-statement { max-width: 620px; margin-block: auto; padding-block: 80px; }
.login-statement h1 { margin: 0; color: var(--sidebar-text); font-size: clamp(42px, 6vw, 76px); font-weight: 700; letter-spacing: -0.07em; line-height: 0.99; }
.login-statement p { max-width: 42ch; margin: 19px 0 0; color: var(--sidebar-muted); font-size: 15px; }
.login-footer { color: var(--sidebar-muted); font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 30px; }
.login-form { width: min(100%, 360px); }
.login-form h2 { margin: 0; color: var(--ink); font-size: 27px; font-weight: 700; letter-spacing: -0.05em; }
.login-form > p { margin: 8px 0 28px; color: var(--muted); font-size: 13px; }
.login-form .button { width: 100%; margin-top: 8px; }
.login-error { min-height: 1.5em; margin-top: 10px; color: var(--danger-ink); font-size: 12px; }

@media (max-width: 70rem) {
  :root { --sidebar-width: 220px; }
  .content-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .hero-panel { grid-template-columns: minmax(0, 1fr); }
  .hero-quick { max-width: 580px; }
}
@media (max-width: 52rem) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-column { min-height: 100dvh; }
  .topbar { min-height: 62px; padding-inline: 17px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: -0.04em; }
  .mobile-brand .brand-mark { width: 29px; height: 29px; border-color: var(--rule); color: var(--accent); }
  .mobile-brand .brand-mark svg { width: 17px; height: 17px; }
  .breadcrumb { display: none; }
  .mobile-menu { display: inline-grid; }
  .page { padding: 26px 20px calc(95px + env(safe-area-inset-bottom)); }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 21px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 20px 26px; }
  .stat-item { padding: 14px 13px 14px 0; }
  .stat-item + .stat-item { padding-left: 13px; }
  .stat-item:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--rule); }
  .hero-panel { gap: 19px; padding: 22px 19px; }
  .hero-copy h2 { max-width: 19ch; font-size: clamp(26px, 7vw, 34px); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .filter-tabs { width: max-content; max-width: 100%; overflow-x: auto; }
  .track-meta { gap: 8px; }
  .track-meta .hide-mobile { display: none; }
  .job-side { gap: 7px; }
  .progress-track { width: 62px; }
  .library-table-head { display: none; }
  .library-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 12px 0; }
  .library-table-row .library-cell-title { grid-column: 1; grid-row: 1 / span 2; }
  .library-table-row .library-cell-format { grid-column: 2; justify-self: end; }
  .library-table-row .library-cell-duration { grid-column: 2; justify-self: end; color: var(--muted); font-size: 11px; }
  .login-shell { display: block; }
  .login-aside { min-height: auto; padding: 27px 25px 28px; }
  .login-statement { padding-block: 54px 35px; }
  .login-statement h1 { max-width: 9ch; font-size: clamp(44px, 12vw, 64px); }
  .login-statement p { font-size: 13px; }
  .login-footer { display: none; }
  .login-panel { min-height: 55dvh; align-items: start; padding: 38px 25px 55px; }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--paper); }
  .bottom-nav a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 53px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 10px; }
  .bottom-nav a svg { width: 19px; height: 19px; }
  .bottom-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--ink); }
  .connection { padding: 6px 8px; font-size: 10px; }
}
@media (max-width: 35rem) {
  .page { padding-inline: 17px; }
  .topbar-tools { gap: 6px; }
  .connection { max-width: 122px; overflow: hidden; text-overflow: ellipsis; }
  .hero-quick { padding: 14px; }
  .input-row { align-items: stretch; flex-direction: column; }
  .input-row .button { width: 100%; }
  .stat-value { font-size: 27px; }
  .job-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .job-side { justify-content: space-between; }
  .track-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .track-row .button { justify-self: start; }
  .result-row { grid-template-columns: minmax(0, 1fr); }
  .result-row .button { justify-self: start; }
  .summary-pairs { gap: 8px; }
  .setting-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dialog-header, .dialog-body { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}


.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 13px; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.spaced-top { margin-top: 20px; }
.section-heading-spaced { margin-top: 25px; }
.flat-section-spaced { margin-top: 34px; }
.job-detail-meta { margin: 12px 0 18px; }
.system-section { margin-bottom: 32px; }
.health-list { border-top: 1px solid var(--rule); }
.health-row { display: grid; grid-template-columns: 9px minmax(130px, 0.35fr) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 42px; padding: 7px 0; border-bottom: 1px solid var(--rule-2); font-size: 12px; }
.health-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.health-ok { background: var(--accent); }
.health-warn { background: oklch(53% 0.11 75); }
.health-failed { background: oklch(48% 0.13 25); }
.health-name { color: var(--ink); font-weight: 600; }
.health-detail { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 35rem) { .health-row { grid-template-columns: 9px minmax(0, 1fr); gap: 8px; } .health-detail { grid-column: 2; } }
