:root { --bg:#f7f7f5; --card:#fff; --ink:#1d1d1b; --muted:#6b6b66; --line:#e3e3de;
        --ok:#2f7d4a; --bad:#b3261e; --warn:#a15c00; --accent:#2b59c3; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.5 system-ui, sans-serif; background:var(--bg); color:var(--ink); }
nav.top { display:flex; gap:16px; align-items:center; padding:10px 16px; background:var(--card); border-bottom:1px solid var(--line); flex-wrap:wrap; }
nav.top a { color:var(--accent); text-decoration:none; }
main { max-width:1100px; margin:0 auto; padding:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; }
.narrow { max-width:380px; margin:48px auto; }
label { display:block; margin:8px 0; }
input, select { width:100%; padding:6px 8px; border:1px solid var(--line); border-radius:6px; font:inherit; }
input[type=checkbox], input[type=radio] { width:auto; }
button { padding:6px 14px; border:0; border-radius:6px; background:var(--accent); color:#fff; font:inherit; cursor:pointer; }
button.link { background:none; color:var(--accent); padding:0; }
form.inline { display:inline; margin-left:auto; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
.error { color:var(--bad); }
.badge { display:inline-block; padding:1px 8px; border-radius:10px; font-size:13px; background:var(--line); }
.badge.healthy { background:#dcefe2; color:var(--ok); }
.badge.errors, .badge.missed { background:#f6dcda; color:var(--bad); }
.badge.notsetup, .badge.waiting { background:#f3e6d1; color:var(--warn); }
.tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; }
.tile .num { font-size:26px; font-weight:600; }
.muted { color:var(--muted); }
.banner { background:#fff6e0; border:1px solid #f0d58a; padding:8px 12px; border-radius:6px; margin-bottom:12px; }
.row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }

/* Schedule form: either/or choices side by side, follow-up questions stacked. */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.step h2 { margin: 0 0 14px; font-size: 18px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }
.choice-card { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 14px 16px;
               border: 2px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.choice-card:hover { border-color: #b9c6e8; }
.choice-card.selected, .choice-card:has(input[type=radio]:checked) { border-color: var(--accent); background: #f3f6fd; }
.choice-card > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.choice-title { font-weight: 600; }
.choice-title::before { content: "○ "; color: var(--muted); }
.choice-card.selected .choice-title::before, .choice-card:has(input[type=radio]:checked) .choice-title::before { content: "◉ "; color: var(--accent); }
.sub { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.field { margin: 0 0 20px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label { display: block; font-weight: 600; margin: 0 0 8px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.inline-inputs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-inputs input[type=number] { width: 90px; }
.inline-inputs input[type=time], .inline-inputs select { width: auto; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: 7px 16px; cursor: pointer; border-right: 1px solid var(--line); }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--accent); color: #fff; }
.check { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 400; }
.check input[type=number] { width: 80px; }
.actions { display: flex; justify-content: flex-end; margin: 4px 0 16px; }
fieldset[disabled] .choice-card, fieldset[disabled] .segmented span { cursor: not-allowed; opacity: .75; }
[hidden] { display: none !important; }

/* Error details on the run page */
.detail { white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; background: #f4f4f1;
          padding: 8px 10px; border-radius: 6px; font-size: 13px; margin: 4px 0 10px; }
.error-details h3 { font-size: 13px; margin: 8px 0 2px; color: var(--muted); }
