/* Acceptance test page — same light look as /present and the landing page. */
:root {
  color-scheme: light;
  --bg: #f3f4f6; --panel: #fff; --line: #d3d8de; --line-strong: #9aa3ad; --text: #1b2129; --muted: #5d6874;
  --green: #1fae5a; --red: #e01f1f; --amber: #d99a06; --focus: #2b7fe0;
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: clamp(12px, 2vw, 28px); background: var(--bg); }
h1, h2, h3, p, dl, dd, dt { margin: 0; }
.eyebrow { font-size: .75rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.top h1 { font-size: clamp(26px, 3vw, 44px); font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.lead, .muted { color: var(--muted); }
.lead { margin-top: 6px; max-width: 70ch; }
.top-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; border: 1px solid var(--line); background: #f6f7f9; }
.pill.online { color: #0d6b35; border-color: #9fd8b5; background: #effbf3; }
.pill.offline { color: #a51616; border-color: #e9a3a3; background: #fff6f6; }
a.ghost, button.ghost, button.primary, button.danger {
  display: inline-block; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; cursor: pointer; font-family: inherit;
}
button.primary { background: #1b2129; color: #fff; border-color: #1b2129; }
button.danger { background: #fff6f6; color: #a51616; border-color: #e9a3a3; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

.live { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.live-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.live-item .k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.live-item strong { font-size: 1.2rem; }

.layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 2px 12px rgba(27,33,41,.06); }
.panel h2 { font-size: 1.15rem; margin-bottom: 8px; }
label { display: block; margin-top: 10px; font-weight: 600; font-size: .9rem; }
input[type=text], input[type=number], textarea { width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.error { color: #a51616; margin-top: 8px; min-height: 1.2em; font-size: .9rem; }
.banner { color: #7a2e00; background: #fff1e6; border: 2px solid #f0a36b; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-weight: 700; }
.warn { color: #7a5a00; background: #fffaf0; border: 1px solid #e6cf8f; border-radius: 10px; padding: 6px 10px; margin-top: 8px; font-size: .9rem; }
.fw { font-size: .85rem; margin-top: 6px; color: #2d3640; }

.test-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 4px; }
.block-head { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.test { display: grid; grid-template-columns: 56px 48px 1fr auto; grid-template-areas: "id step load status" "id step bits lamp"; gap: 1px 8px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; font-size: .85rem; }
.test:hover { border-color: var(--line-strong); }
.test.current { border: 2px solid var(--focus); }
.test.passed { background: #effbf3; } .test.failed { background: #fff6f6; } .test.skipped { background: #f6f7f9; color: var(--muted); }
.test.running { background: #fffaf0; } .test.extra { border-style: dashed; }
.tid { grid-area: id; font-family: ui-monospace, monospace; font-weight: 700; }
.tstep { grid-area: step; font-weight: 800; font-size: 1.1rem; }
.tload { grid-area: load; } .tbits { grid-area: bits; color: var(--muted); font-family: ui-monospace, monospace; }
.tstatus { grid-area: status; text-align: right; font-weight: 700; text-transform: uppercase; font-size: .75rem; }
.tlamp { grid-area: lamp; text-align: right; font-size: .75rem; }

.lamp { display: inline-flex; align-items: center; gap: 6px; }
.lamp::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; flex: none; }
.lamp.green::before { background: var(--green); border-color: var(--green); }
.lamp.blinking-green::before { background: var(--green); border-color: var(--green); animation: blink 1s steps(2, start) infinite; }
.lamp.red::before { background: var(--red); border-color: var(--red); }
.lamp.white::before { background: #fff; box-shadow: 0 0 6px 2px #ffe68a; }
.lamp.unknown::before { background: #ddd; }
@keyframes blink { to { visibility: hidden; } }

.current h2 { font-size: 1.5rem; margin: 4px 0 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.facts div { background: #f6f7f9; border-radius: 10px; padding: 6px 10px; }
.facts dt { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { font-weight: 700; }
.instruction { white-space: pre-line; background: #fffdf5; border-left: 4px solid #e6cf8f; padding: 10px 14px; border-radius: 6px; font-size: 1rem; }
.phase { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.phase h3 { font-size: 1.35rem; margin: 4px 0 6px; }
.countdown { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; }
.countdown span:first-child { font: 800 3rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.progress { height: 8px; background: #e7eaee; border-radius: 999px; overflow: hidden; margin-top: 8px; }
#progress-bar { height: 100%; width: 0; background: var(--green); transition: width 1s linear; }
.failure { margin-top: 14px; padding: 12px 14px; border: 2px solid var(--red); border-radius: 12px; background: #fff6f6; }
.failure .eyebrow { color: #a51616; }
.diag { font-weight: 600; margin-top: 4px; }
.increments { margin-top: 14px; }
.increments table, .runs-table, .detail-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 6px; }
.increments th, .increments td, .runs-table th, .runs-table td, .detail-table th, .detail-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.accepted td:nth-child(4) { color: #0d6b35; font-weight: 700; } tr.rejected td:nth-child(4) { color: #a51616; font-weight: 700; }
tr.passed td:nth-child(8) { color: #0d6b35; font-weight: 700; } tr.failed td:nth-child(8) { color: #a51616; font-weight: 700; }
.comment { margin-top: 14px; }
.log { margin-top: 12px; font-size: .85rem; }
.log ol { margin: 6px 0; padding-left: 20px; } .log li.done { color: var(--muted); text-decoration: line-through; } .log li.now { font-weight: 700; }
.log pre { white-space: pre-wrap; background: #f6f7f9; padding: 8px; border-radius: 8px; max-height: 240px; overflow: auto; font-size: .75rem; }
.runs { margin-top: 18px; } .runs .panel { margin-top: 18px; }

@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

/* "Suggest fix" (t_fdf5ddb2): card request + status inside the failure box and the run-history rows. */
.fix-row { align-items: center; }
.fix-status { font-size: .9rem; font-weight: 600; color: #2d3640; }
.fix-status .pill { margin-left: 6px; font-size: .75rem; padding: 3px 9px; }
.pill.st-done { color: #0d6b35; border-color: #9fd8b5; background: #effbf3; }
.pill.st-running, .pill.st-review { color: #7a5a00; border-color: #e6cf8f; background: #fffaf0; }
.pill.st-blocked { color: #a51616; border-color: #e9a3a3; background: #fff6f6; }
.fix-summary { margin-top: 8px; font-size: .9rem; white-space: pre-line; background: #f6f7f9; border-radius: 10px; padding: 8px 10px; }
.detail-table .fix-cell { white-space: nowrap; font-size: .8rem; }
.detail-table .fix-cell button { padding: 4px 10px; font-size: .8rem; }
