
:root {
  --bg:#F6F6F4; --card:#FFFFFF; --fg:#18181B; --muted:#5F5F66; --line:#E4E4E0; --line-soft:#F0F0ED;
  --field:#D4D4CF; --track:#E9E9E5; --hover:#1D4ED8; --code:#FAFAF8;
  --pass-fg:#17663F; --pass-bg:#EAF5EF; --pass-dot:#2E8B57;
  --fail-fg:#B3261E; --fail-bg:#FDEEEC; --fail-dot:#D14B3C;
  --run-fg:#1D4ED8;  --run-bg:#EAF0FE;  --run-dot:#3B6FE8;
  --wait-fg:#55555D; --wait-bg:#F1F1EE; --wait-dot:#A8A8A2;
  --appr-fg:#8A4B00; --appr-bg:#FCF1DE; --appr-dot:#C77A12;
  --pr-fg:#1E3A8A; --pr-bg:#EEF3FE; --ref-fg:#3F3F46; --ref-bg:#F1F1EE;
  --sans:'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg:#111113; --card:#19191C; --fg:#EDEDEF; --muted:#A1A1A8; --line:#2A2A2E; --line-soft:#222226;
  --field:#3A3A3F; --track:#2A2A2E; --hover:#8AB0FF; --code:#141416;
  --pass-fg:#6FD39A; --pass-bg:#15301F; --pass-dot:#3BA56A;
  --fail-fg:#FF8A80; --fail-bg:#3A1D1B; --fail-dot:#E5564A;
  --run-fg:#8AB0FF;  --run-bg:#1B2540;  --run-dot:#5B8CFF;
  --wait-fg:#B4B4BB; --wait-bg:#26262A; --wait-dot:#77777E;
  --appr-fg:#F2B860; --appr-bg:#3A2A12; --appr-dot:#D9952B;
  --pr-fg:#A9C2FF; --pr-bg:#1B2540; --ref-fg:#D4D4D8; --ref-bg:#26262A;
  color-scheme: dark;
} }

* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:14px/1.45 var(--sans); -webkit-font-smoothing:antialiased; }
a { color:var(--fg); text-decoration:none; } a:hover { color:var(--hover); text-decoration:underline; }
code, pre, .mono { font-family:var(--mono); font-size:12.5px; }
.muted { color:var(--muted); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.ico { flex:none; }
@keyframes spin { to { transform:rotate(360deg); } }
.spin { animation:spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spin { animation:none; } }

/* header */
header.top { background:var(--card); border-bottom:1px solid var(--line); }
header.top .wrap { max-width:1440px; margin:0 auto; padding:16px 32px; display:flex; flex-wrap:wrap; align-items:center; gap:12px 24px; }
.brandline { display:flex; align-items:baseline; gap:10px; min-width:0; }
.brand { font-size:20px; font-weight:600; letter-spacing:-.015em; }
.brand:hover { color:var(--fg); text-decoration:none; }
.repo { font-family:var(--mono); font-size:13px; color:var(--muted); }
.health { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.account { margin-left:auto; display:flex; align-items:center; gap:12px; font-size:13px; }
.user { color:var(--muted); }
header .btn, header button { min-height:40px; padding:0 16px; border-radius:8px; }

/* status dots */
.dot { display:inline-block; flex:none; width:8px; height:8px; border-radius:50%; background:var(--wait-dot); }
.dot.ok, .dot.passed { background:var(--pass-dot); }
.dot.down, .dot.failed { background:var(--fail-dot); }
.dot.partial, .dot.approval { background:var(--appr-dot); }
.dot.running { background:var(--run-dot); }
.dot.queued, .dot.muted { background:transparent; border:1.5px solid var(--wait-dot); }

/* buttons */
.btn, button { display:inline-flex; align-items:center; gap:4px; min-height:34px; padding:0 12px; border-radius:7px;
  border:1px solid var(--field); background:var(--card); color:var(--fg); font:inherit; font-size:13px; font-weight:500;
  white-space:nowrap; cursor:pointer; text-decoration:none; }
.btn:hover, button:hover { color:var(--fg); border-color:var(--muted); text-decoration:none; }
.btn.dark, button.dark { background:var(--fg); border-color:var(--fg); color:var(--card); }
.btn.dark:hover, button.dark:hover { color:var(--card); opacity:.86; }
button.link { min-height:0; padding:0; border:none; background:none; color:var(--hover); font-weight:400; }
form.inline { display:inline; margin:0; }

/* page */
main { max-width:1440px; margin:0 auto; padding:24px 32px 48px; }
.stack { display:flex; flex-direction:column; gap:20px; }
.stack h2 { margin-top:8px; }
h1 { font-size:20px; font-weight:600; letter-spacing:-.015em; margin:0 0 6px; }
h2 { font-size:15px; font-weight:600; margin:28px 0 10px; }
.pagehead { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 24px; }
.pagehead h1 { margin:0; }
.stats { display:flex; flex-wrap:wrap; gap:6px 20px; font-size:13px; color:var(--muted); }
.stats strong { font-family:var(--mono); font-weight:500; color:var(--fg); }
.notice { margin:0; padding:12px 16px; border-radius:10px; background:var(--appr-bg); color:var(--appr-fg); font-size:13px; }

/* filter tiles */
.tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; }
.tile { display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:14px 16px; border-radius:10px;
  border:1px solid var(--line); background:var(--card); color:var(--fg); }
.tile:hover { color:var(--fg); text-decoration:none; border-color:var(--field); }
.tile[aria-current] { border-color:var(--fg); box-shadow:0 0 0 1px var(--fg); }
.tile .lbl { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:500; color:var(--ref-fg); }
.tile.passed .lbl { color:var(--pass-fg); } .tile.failed .lbl { color:var(--fail-fg); }
.tile.running .lbl { color:var(--run-fg); } .tile.queued .lbl { color:var(--wait-fg); }
.tile.approval .lbl { color:var(--appr-fg); }
.tile .n { font-family:var(--mono); font-size:28px; font-weight:500; line-height:1.1; }

/* status pills */
.badge { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:12.5px;
  font-weight:600; line-height:1.3; white-space:nowrap; vertical-align:middle; color:var(--wait-fg); background:var(--wait-bg); }
.badge.passed { color:var(--pass-fg); background:var(--pass-bg); }
.badge.failed { color:var(--fail-fg); background:var(--fail-bg); }
.badge.running { color:var(--run-fg); background:var(--run-bg); }
.badge.approval { color:var(--appr-fg); background:var(--appr-bg); }

/* runs table */
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.scroll { overflow-x:auto; }
.grid { min-width:1080px; }
.row { display:grid; grid-template-columns:140px minmax(280px, 2.4fr) 92px 170px minmax(180px, 1.2fr) 96px 180px;
  gap:16px; padding:14px 20px; border-bottom:1px solid var(--line-soft); align-items:center; }
.row:last-child { border-bottom:none; }
.row.head { padding:11px 20px; border-bottom:1px solid var(--line); font-size:11.5px; font-weight:600; color:var(--muted);
  text-transform:uppercase; letter-spacing:.05em; }
.right { text-align:right; }
.what { display:flex; flex-direction:column; gap:2px; min-width:0; }
.what .title { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sub { display:flex; align-items:center; gap:8px; min-width:0; font-size:12.5px; color:var(--muted); }
.sub .txt { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chip { padding:0 6px; border-radius:4px; font-family:var(--mono); font-size:12px; white-space:nowrap;
  background:var(--ref-bg); color:var(--ref-fg); }
.chip.pr { background:var(--pr-bg); color:var(--pr-fg); }
a.chip:hover { color:var(--pr-fg); }
.chip.ext { font-family:var(--sans); font-weight:500; background:var(--appr-bg); color:var(--appr-fg); }
.sha { font-family:var(--mono); font-size:12.5px; }
.plats { display:flex; flex-wrap:wrap; gap:4px 12px; font-family:var(--mono); font-size:12px; color:var(--muted); }
.plat { display:inline-flex; align-items:center; gap:6px; }
.plat .dot { width:9px; height:9px; }
.prog { display:flex; flex-direction:column; gap:5px; min-width:0; }
.prog .line { display:flex; align-items:baseline; gap:8px; min-width:0; font-size:12.5px; }
.time { font-family:var(--mono); white-space:nowrap; }
.time.slow { color:var(--appr-fg); font-weight:600; }
.note { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.note.bad { color:var(--fail-fg); font-weight:500; } .note.warn { color:var(--appr-fg); font-weight:500; }
svg.bar { display:block; width:100%; height:4px; border-radius:2px; overflow:hidden; }
svg.bar .track { fill:var(--track); } svg.bar .fill { fill:var(--run-dot); } svg.bar.bad .fill { fill:var(--fail-dot); }
.when { font-size:12.5px; color:var(--muted); }
.acts { display:flex; justify-content:flex-end; align-items:center; gap:6px; }
.empty { padding:40px 20px; text-align:center; color:var(--muted); }

/* tables: runners, tasks */
table { width:100%; border-collapse:separate; border-spacing:0; background:var(--card); border:1px solid var(--line);
  border-radius:12px; overflow:hidden; }
td { padding:10px 16px; border-top:1px solid var(--line-soft); vertical-align:middle; }
tr:first-child td { border-top:none; }
td.dur { font-family:var(--mono); font-size:12.5px; white-space:nowrap; }
table.runners td:first-child { width:140px; }
table.runners td { white-space:nowrap; } table.runners td:last-child { width:100%; white-space:normal; }
.title { color:var(--fg); } .branch { font-family:var(--mono); font-size:13px; }

/* job and task pages */
.matrix { overflow-x:auto; margin-top:16px; }
.matrix table { width:100%; border:none; border-radius:0; }
.matrix th { padding:10px 14px; text-align:left; vertical-align:bottom; font-weight:400; border-bottom:1px solid var(--line); white-space:nowrap; }
.matrix th.name { font-size:11.5px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.matrix td { padding:5px 14px; border-top:1px solid var(--line-soft); white-space:nowrap; }
.matrix tbody tr:first-child td { border-top:none; }
.matrix td.name { width:1%; padding-right:32px; font-family:var(--mono); font-size:12.5px; }
.matrix tr.setup td.name { font-family:var(--sans); color:var(--muted); }
.matrix tr.bad td { background:var(--fail-bg); }
.matrix tr.bad td.name { color:var(--fail-fg); font-weight:600; }
.colhead { display:flex; align-items:center; gap:8px; font-size:14px; }
.colmeta { margin-top:3px; font-size:12px; color:var(--muted); }
.cell { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:6px; font-size:12.5px;
  color:var(--wait-fg); white-space:nowrap; }
a.cell:hover { text-decoration:none; background:var(--wait-bg); }
.cell .mono { font-size:12.5px; }
.cell.passed { color:var(--pass-fg); } .cell.failed { color:var(--fail-fg); font-weight:600; }
.cell.running { color:var(--run-fg); } .cell.approval { color:var(--appr-fg); }
.cell.muted, .cell.none { color:var(--muted); }
.cell .exit { font-weight:400; opacity:.85; }
.matrix tr.setup a.cell { color:var(--hover); }
.meta { color:var(--muted); } .warn { color:var(--appr-fg); }
.actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:10px; }
pre#log { background:var(--code); border:1px solid var(--line); border-radius:12px; padding:16px; overflow-x:auto;
  white-space:pre-wrap; word-break:break-all; min-height:200px; }
details { margin-top:24px; } ul.files { columns:2; font-size:12px; }
.crumbs { margin:0 0 8px; }

@media (max-width: 700px) {
  header.top .wrap { padding:12px 16px; }
  main { padding:16px 16px 32px; }
  .account { margin-left:0; }
  table.runners td:nth-child(n+4) { display:none; }
}
