:root {
  --fg: #1f2328; --muted: #59636e; --line: #d1d9e0; --bg: #ffffff; --bg-alt: #f6f8fa;
  --pass-fg: #1a7f37; --pass-bg: #dafbe1; --pass-br: #aceebb;
  --fail-fg: #cf222e; --fail-bg: #ffebe9; --fail-br: #ffc1bc;
  --incon-fg: #59636e; --incon-bg: #eef1f4; --incon-br: #d1d9e0;
  --stale-fg: #9a6700; --stale-bg: #fff8c5; --stale-br: #eac54f;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; color: var(--fg);
       max-width: 1100px; margin: 0 auto; padding: 1.5rem; line-height: 1.45; }
h1 { font-size: 1.4rem; margin: 0 0 .15rem; }
.sub { color: var(--muted); font-size: .85rem; margin-bottom: .6rem; }
.sub code { font-family: var(--mono); background: var(--bg-alt); padding: 0 4px; border-radius: 4px; }

/* Archive toggle controls */
.controls { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem;
            font-size: .83rem; color: var(--muted); }
.controls button { font-size: .8rem; padding: .2rem .6rem; border: 1px solid var(--line);
                   border-radius: 6px; background: var(--bg-alt); color: var(--muted);
                   cursor: pointer; }
.controls button:hover { background: var(--line); }

/* Board grid */
.board { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.row { display: grid; grid-template-columns: 1.6rem 9rem 6.5rem 1fr 9.5rem 5.5rem;
       gap: .75rem; align-items: center; padding: .6rem .9rem; border-top: 1px solid var(--line);
       border-left: 3px solid transparent; background: var(--bg); cursor: pointer; }
.row:first-child { border-top: none; }
.row.stale { border-left-color: var(--stale-br); background: #fffdf2; }
.row.stale .prov, .row.stale .summary, .row.stale .name { color: #8a7b3a; }
.row.head { background: var(--bg-alt); cursor: default; font-size: .72rem; letter-spacing: .04em;
            text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .5rem .9rem; }
.row.clickable:hover { background: #f3f6fb; }
.row.clickable:focus { outline: 2px solid #0969da; outline-offset: -2px; }
.row.muted { cursor: default; color: var(--muted); }
.row.muted:hover { background: var(--bg); }

/* Chain rail: number + connector line */
.rail { position: relative; text-align: center; font-family: var(--mono);
        font-size: .7rem; color: var(--muted); }
.rail::before { content: ""; position: absolute; left: 50%; top: -1.2rem; bottom: 50%;
                width: 2px; background: var(--line); transform: translateX(-50%); }
.row:nth-child(2) .rail::before { display: none; }

.name { font-weight: 600; }
.name small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); }
.summary { color: var(--muted); font-size: .82rem; overflow: hidden;
           text-overflow: ellipsis; white-space: nowrap; }
.prov { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.prov small { display: block; color: #8c959f; font-size: .72rem; margin-top: .1rem; }

/* Verdict chips */
.chip { display: inline-block; font-size: .74rem; font-weight: 600; padding: .12rem .5rem;
        border-radius: 999px; border: 1px solid transparent; }
.chip.pass  { color: var(--pass-fg); background: var(--pass-bg); border-color: var(--pass-br); }
.chip.fail  { color: var(--fail-fg); background: var(--fail-bg); border-color: var(--fail-br); }
.chip.incon { color: var(--incon-fg); background: var(--incon-bg); border-color: var(--incon-br); }
.chip.none  { color: var(--muted); background: transparent; border: 1px dashed var(--line); }
.dash { color: #b0b8c1; }

/* State badges */
.status { text-align: right; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem;
         font-weight: 600; padding: .12rem .45rem; border-radius: 6px; }
.badge.stale { color: var(--stale-fg); background: var(--stale-bg);
               border: 1px solid var(--stale-br); }
.badge.fresh { color: #1a7f37; background: transparent; }
.badge.fresh::before { content: "\25CF"; font-size: .6rem; }
.gated { font-size: .74rem; color: var(--muted); font-style: italic; }

/* Legend */
.legend { margin-top: 1.1rem; font-size: .78rem; color: var(--muted);
          display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: center; }
.legend .chip { font-size: .68rem; }
.legend b { color: var(--fg); font-weight: 600; margin-right: .2rem; }

/* Run report pane */
.pane { margin-top: 1.2rem; border: 1px solid var(--line); border-radius: 10px;
        padding: 1rem 1.2rem; background: var(--bg); }
.pane h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
           color: var(--muted); margin: 0 0 .4rem; }
.pane .placeholder { color: var(--muted); font-size: .85rem; }

/* Markdown content styles for rendered run reports */
#run-pane table { border-collapse: collapse; width: 100%; margin: .5rem 0; }
#run-pane th, #run-pane td { border: 1px solid var(--line); padding: 4px 8px; text-align: right; }
#run-pane th:first-child, #run-pane td:first-child { text-align: left; }
#run-pane blockquote { background: #fff8c5; border-left: 4px solid var(--stale-br);
                       padding: .5rem 1rem; margin: .5rem 0; }
#run-pane code { font-family: var(--mono); background: var(--bg-alt);
                 padding: 0 3px; border-radius: 3px; }
#run-pane pre { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px;
               padding: .75rem 1rem; overflow-x: auto; }
#run-pane pre code { background: none; padding: 0; }
