:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1c2430; --muted: #667085; --line: #e3e7ee;
  --accent: #0f766e; --accent-ink: #ffffff; --attn: #b45309; --attn-bg: #fff4e5;
  --ok: #15803d; --ok-bg: #e8f6ed; --bad: #b42318; --bad-bg: #fdecea; --busy-bg: #e6f2f1;
  --code: #f1f3f6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a; --card: #171e26; --text: #e6e9ee; --muted: #94a0b2; --line: #2a3340;
    --accent: #2dd4bf; --accent-ink: #062320; --attn: #fbbf24; --attn-bg: #3a2a0c;
    --ok: #4ade80; --ok-bg: #12301d; --bad: #f87171; --bad-bg: #3b1616; --busy-bg: #11302d; --code: #10161d;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.45rem; margin: 0 0 4px; } h2 { font-size: 1.1rem; margin: 0 0 12px; } h3 { font-size: 1rem; margin: 18px 0 8px; }
code, pre { background: var(--code); border-radius: 4px; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
code { padding: 1px 4px; } pre { padding: 10px; overflow-x: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { font-weight: 650; color: var(--text); text-decoration: none; } .mark { color: var(--accent); }
.topbar nav { display: flex; align-items: center; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.narrow { max-width: 400px; margin: 48px auto; }
.row { display: flex; align-items: center; gap: 12px; } .grow { flex: 1; min-width: 0; } .right { text-align: right; }
.project-row { text-decoration: none; color: inherit; } .project-row:hover { border-color: var(--accent); }
.project-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-awaiting { border-left: 4px solid var(--attn); }
.muted { color: var(--muted); } .small { font-size: 0.85rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat .num { display: block; font-size: 1.4rem; font-weight: 650; } .stat .lbl { color: var(--muted); font-size: 0.85rem; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; background: var(--code); white-space: nowrap; }
.pill.attn { background: var(--attn-bg); color: var(--attn); font-weight: 600; } .pill.warn { background: var(--attn-bg); color: var(--attn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.busy { background: var(--busy-bg); color: var(--accent); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 7px;
  padding: 8px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--accent); } .btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-small { padding: 4px 10px; font-size: 0.85rem; }
.linkish { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline; } .inline-form { display: flex; gap: 8px; align-items: end; margin-bottom: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 0.92rem; }
input[type=text], input[type=password], input[type=number], textarea, select {
  font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; width: 100%; }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--busy-bg); }
.notice.ok { background: var(--ok-bg); } .notice.error { background: var(--bad-bg); color: var(--bad); } .notice.warn { background: var(--attn-bg); color: var(--attn); }
.crumbs { margin: 0 0 10px; font-size: 0.9rem; }
.empty { text-align: center; padding: 36px 16px; }
.head .spend { font-size: 1.15rem; font-weight: 650; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px 0 0; }
.stepper li { font-size: 0.78rem; padding: 3px 8px; border-radius: 6px; background: var(--code); color: var(--muted); }
.stepper li.done { background: var(--ok-bg); color: var(--ok); } .stepper li.current { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.action { border: 2px solid var(--attn); } .warnbox { border-color: var(--attn); }
details { border-top: 1px solid var(--line); padding: 8px 0; } details > summary { cursor: pointer; font-weight: 600; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .cols > .card { min-width: 0; }
.timeline { list-style: none; padding: 0; margin: 0; max-height: 520px; overflow-y: auto; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.timeline li.k-ben { color: var(--accent); } .timeline li.k-problem, .timeline li.k-paused { color: var(--attn); }
.log { max-height: 360px; overflow: auto; white-space: pre-wrap; font-size: 12px; }
.activity { list-style: none; padding: 0; margin: 0 0 12px; font-size: 0.88rem; }
.activity li { padding: 3px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.activity .tool { display: inline-block; min-width: 54px; font-weight: 600; color: var(--accent); font-size: 0.8rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.checks { width: 100%; border-collapse: collapse; } .checks td { border-top: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
.res { width: 24px; font-weight: 700; } .res.pass { color: var(--ok); } .res.fail { color: var(--bad); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.shots a { text-decoration: none; color: var(--muted); font-size: 0.8rem; } .shots img { width: 100%; border: 1px solid var(--line); border-radius: 6px; display: block; }
.findings { padding-left: 0; list-style: none; } .findings li { padding: 4px 0; }
.sev { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--code); }
.sev-critical, .sev-high { background: var(--bad-bg); color: var(--bad); } .sev-medium { background: var(--attn-bg); color: var(--attn); }
.downloads { padding-left: 0; list-style: none; } .downloads li { padding: 3px 0; }
.prose { overflow-wrap: anywhere; } .prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 4px 8px; } .prose img { max-width: 100%; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); } .cols, .grid2 { grid-template-columns: 1fr; }
  .row.head-row { flex-direction: column; align-items: flex-start; }
  .topbar .brand { font-size: 0.95rem; }
}
label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
label.check input { margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
legend { font-weight: 600; font-size: 0.92rem; padding: 0 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.jobs { list-style: none; padding: 0; margin: 0; }
.jobs .job { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.job.st-denied .pill, .job.st-failed .pill { background: var(--bad-bg); color: var(--bad); }
.job.st-done .pill { background: var(--ok-bg); color: var(--ok); }
.job.st-pending_approval .pill { background: var(--attn-bg); color: var(--attn); }
.approval { border-top: 1px solid var(--line); padding: 10px 0; }
.topbar nav .linkish { text-decoration: none; }
