:root {
    color-scheme: light;
    --ink: #1c1917;
    --muted: #44403c;
    --line: #d6d3d1;
    --paper: #fafaf9;
    --panel: #ffffff;
    --focus: #0b3a66;
    --alert: #7f1d1d;
    --ok: #14532d;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font: 16px/1.45 "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}
a { color: var(--focus); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}
.skip {
    position: absolute;
    left: 0.5rem;
    top: -4rem;
    background: #fff;
    padding: 0.5rem;
}
.skip:focus { top: 0.5rem; }
.top, main { padding: 1rem 1.25rem; }
.top { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav form { margin: 0; }
h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 1rem; margin: 0 0 1rem; }
.stack { display: grid; gap: 0.75rem; max-width: 40rem; }
label { display: grid; gap: 0.25rem; font-weight: 600; }
input, select, textarea, button {
    font: inherit;
    padding: 0.45rem 0.55rem;
}
button, .button { background: var(--focus); color: #fff; border: 0; min-height: 2.75rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; padding: 0.45rem 0.75rem; }
button.secondary, a.button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 0.45rem; vertical-align: top; }
.state { font-weight: 700; }
.state[data-state="confirmed_failure"] { color: var(--alert); }
.state[data-state="healthy"] { color: var(--ok); }
.alert { border: 1px solid var(--alert); background: #fef2f2; color: var(--alert); padding: 0.6rem; }
.empty, .note { color: var(--muted); }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }
.loading { margin: 0 0 0.75rem; color: var(--muted); }
fieldset { border: 1px solid var(--line); margin: 0; padding: 0.75rem; }
nav a { padding: 0.35rem 0; }
@media (max-width: 700px) {
    .top { display: block; }
    table, thead, tbody, tr, th, td { display: block; }
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    td { border-bottom: 0; padding-left: 0; }
    tr { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
    main { padding: 0.75rem; }
}

/* Operations surfaces: stable table structure, readable forms, clear states. */
:root { --focus: #164e52; --paper: #f4f5f2; --muted: #515c58; --line: #d7dfd9; }
body { line-height: 1.55; }
main { max-width: 1440px; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 3rem); }
.top { padding: 1rem clamp(1rem, 3vw, 3rem); align-items: center; border-top: 4px solid var(--focus); }
.brand { font-weight: 750; letter-spacing: -.02em; margin: 0; }
h1 { font-family: Georgia, serif; font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; }
h2 { font-size: 1.05rem; letter-spacing: .01em; margin: 0 0 1rem; }
.panel { padding: clamp(1rem, 2vw, 1.5rem); border-radius: 6px; }
input:not([type=radio]):not([type=checkbox]), select, textarea { width: 100%; min-width: 0; border: 1px solid #9daaa3; border-radius: 4px; background: white; }
textarea { min-height: 5rem; }
button, .button { border-radius: 4px; cursor: pointer; font-weight: 600; }
button:disabled { background: #dce2de; color: #4f5953; cursor: not-allowed; }
button:hover:not(:disabled), .button:hover { filter: brightness(.94); }
nav a[aria-current=page] { font-weight: 750; text-decoration-thickness: 2px; text-underline-offset: .3rem; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f5f7f4; }
th, td { padding: .85rem .7rem; }
.state { display: inline-flex; gap: .4rem; align-items: baseline; }
.state[data-state=unknown], .state[data-state=suspected], .state[data-state=needs_baseline_review] { color: #795214; }
.state[data-state=paused] { color: #515c58; }
.capture-choice { border: 1px solid var(--line); padding: .75rem; margin: .5rem 0; }
.capture-choice input { width: auto; }
.capture-choice img { border: 1px solid var(--line); }
.skip { z-index: 10; }
@media (max-width: 700px) {
    .top { display: grid; gap: .75rem; }
    nav { gap: .75rem; }
    main { padding: 1rem; }
    .table-scroll table { display: table; min-width: 36rem; }
    .table-scroll thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .table-scroll tbody { display: table-row-group; }
    .table-scroll tr { display: table-row; }
    .table-scroll th, .table-scroll td { display: table-cell; padding: .75rem; }
    .row > button, .row > .button { flex: 1 1 12rem; }
}
