:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #607086;
  --line: #dce2ea;
  --surface: #fff;
  --canvas: #f4f6f8;
  --brand: #0876c9;
  --brand-dark: #07568f;
  --navy: #13253f;
  --danger: #b42318;
  --success: #087443;
  --warning: #8a5700;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.55; }
a { color: #075da8; text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 44px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 20; background: #fff; padding: 10px; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 72px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px max(18px, calc((100vw - 1180px) / 2)); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; }
.brand small { color: #a8d8ff; font-size: 12px; font-weight: 700; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
nav a, .link-button { color: #fff; background: none; border: 0; padding: 8px 0; text-decoration: none; cursor: pointer; min-height: auto; }
nav a:hover, .link-button:hover { text-decoration: underline; }
.inline-form { display: inline; margin: 0; }
.flash-region { max-width: 1180px; margin: 18px auto 0; padding: 0 18px; }
.flash { border-radius: 9px; padding: 12px 15px; margin-bottom: 10px; border: 1px solid var(--line); background: #fff; }
.flash-success { border-color: #87d9b3; background: #ebfff4; color: #075c36; }
.flash-error { border-color: #efaaa4; background: #fff1f0; color: #8d1d14; }
.flash-warning { border-color: #efd08c; background: #fff8e7; color: #714800; }
.page-shell { width: min(1180px, calc(100% - 36px)); margin: 34px auto 60px; min-height: calc(100vh - 190px); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 20px; padding: 22px max(18px, calc((100vw - 1180px) / 2)); font-size: 13px; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(30px, 4vw, 46px); margin: 0 0 12px; letter-spacing: -.025em; }
h2 { margin: 0 0 14px; }
.eyebrow { color: var(--brand-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 18px; max-width: 720px; margin: 0; }
.muted, .field-hint { color: var(--muted); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading.compact { align-items: center; }
.panel, .auth-card, .narrow-panel, .alert-card, .result-card, .empty-state { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(28, 43, 64, .06); }
.panel, .narrow-panel { padding: clamp(20px, 4vw, 34px); }
.auth-card { max-width: 500px; margin: 8vh auto; padding: clamp(24px, 6vw, 46px); }
.narrow-panel { max-width: 650px; margin: 0 auto; }
.field { margin-bottom: 20px; }
.field > label, fieldset legend { display: block; font-weight: 750; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="time"], input[type="number"], select, textarea { width: 100%; min-height: 46px; border: 1px solid #aeb9c7; border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 12px; }
textarea { min-height: 116px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #85caff; outline-offset: 2px; }
.field-hint { display: block; font-size: 13px; margin-top: 5px; }
.field-errors { color: var(--danger); margin: 6px 0 0; padding-left: 21px; }
.check-row, .check-stack label { display: flex; align-items: center; gap: 9px; min-height: 44px; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); }
.button, button, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; padding: 10px 15px; font-weight: 750; text-decoration: none; cursor: pointer; }
.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-dark); }
.secondary { background: #fff; color: var(--ink); border-color: #9daabc; }
.quiet { background: transparent; color: var(--muted); }
.danger { background: #fff; color: var(--danger); border-color: #e4aaa6; }
.full-width { width: 100%; margin-top: 12px; }
form[aria-busy="true"] { opacity: .72; }
.alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; margin-bottom: 34px; }
.alert-card { padding: 22px; }
.alert-card h2 { font-size: 23px; margin-top: 12px; }
.card-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.status { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; background: #edf0f4; color: #46556a; padding: 3px 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.status-active, .status-succeeded, .status-new { background: #e4f8ee; color: #09643c; }
.status-paused, .status-cancelled, .status-seen { background: #eef0f3; color: #546174; }
.status-pending, .status-running, .status-changed { background: #e5f3ff; color: #07578f; }
.status-failed, .status-uncertain { background: #fff0ef; color: #98241b; }
.query { color: var(--muted); min-height: 48px; overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 20px 0; }
.metrics div { border-left: 3px solid #dce8f4; padding-left: 10px; }
.metrics dt { color: var(--muted); font-size: 12px; }
.metrics dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.card-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.card-actions form { margin: 0; }
.inline-error { color: var(--danger); background: #fff3f2; border-radius: 8px; padding: 9px; font-size: 13px; }
.empty-state { text-align: center; padding: 48px 24px; margin-bottom: 30px; }
.empty-state.compact { padding: 22px; }
.table-panel { margin-top: 30px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.alert-form section { border-bottom: 1px solid var(--line); margin-bottom: 25px; padding-bottom: 15px; }
.two-columns, .form-grid, .admin-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.form-grid { grid-template-columns: repeat(3, 1fr); }
details { border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 800; }
details > :not(summary) { margin-left: 16px; margin-right: 16px; }
fieldset { border: 0; padding: 10px 0 18px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; max-height: 330px; overflow: auto; padding: 10px 2px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.important-check { margin: 20px 0; font-weight: 800; }
.run-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.run-summary div { display: flex; flex-direction: column; gap: 3px; }
.run-summary strong { font-size: 19px; }
.progress-note { color: var(--brand-dark); font-weight: 700; }
.results-list { margin-top: 30px; }
.result-card { padding: 21px; margin-bottom: 13px; }
.result-card h3 { margin: 11px 0 8px; font-size: 20px; }
.result-card p { margin: 7px 0; }
.result-meta { color: var(--muted); font-size: 13px; }
.error-page { max-width: 760px; margin: 8vh auto; }
@media (max-width: 820px) {
  .site-header, .page-heading, .site-footer { align-items: flex-start; flex-direction: column; }
  .two-columns, .form-grid, .admin-layout { grid-template-columns: 1fr; }
  .run-summary { grid-template-columns: repeat(2, 1fr); }
  .page-heading .button { width: 100%; }
}
@media (max-width: 520px) {
  nav { gap: 6px 14px; }
  .metrics { grid-template-columns: 1fr; }
  .card-actions > *, .card-actions form, .card-actions button, .form-actions > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

