:root {
  --bg: #f6f6f3; --panel: #fff; --ink: #1c1c1a; --muted: #6a6a64; --line: #deded8;
  --accent: #2f3e2b; --accent-ink: #fff; --warn: #a3340f; --warn-bg: #fdeee8; --ok: #2d6a3a; --soft: #eceee8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151614; --panel: #1f201d; --ink: #ecece6; --muted: #a0a099; --line: #34352f;
    --accent: #9fbf8f; --accent-ink: #12150f; --warn: #ff9a78; --warn-bg: #3a211a; --ok: #8fd19e; --soft: #272823; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
header h1 { font-size: 16px; margin: 0 12px 0 0; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav button { background: none; border: 0; padding: 6px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; font: inherit; }
nav button.on { background: var(--soft); color: var(--ink); font-weight: 600; }
.who { margin-left: auto; color: var(--muted); font-size: 13px; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h2 { font-size: 15px; margin: 28px 0 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
h2:first-child { margin-top: 0; }
.bar { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.bar b { font-variant-numeric: tabular-nums; }
.note { padding: 10px 14px; background: var(--warn-bg); color: var(--warn); border-radius: 8px; margin: 10px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 10px 0; }
.card .top { display: flex; gap: 8px 12px; justify-content: space-between; flex-wrap: wrap; }
.card .name { font-weight: 650; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 14px; }
.why { font-size: 13px; color: var(--ok); margin: 4px 0 10px; }
textarea, input, select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
.count { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.count.over { color: var(--warn); font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.row > input, .row > select { width: auto; flex: 1 1 160px; }
button.btn, a.btn { display: inline-block; font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--warn); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); margin-left: 6px; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.empty { color: var(--muted); padding: 14px 0; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; }
th, td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--soft); padding: 10px; border-radius: 6px; font-size: 12px; max-height: 240px; overflow: auto; }
.login { max-width: 340px; margin: 14vh auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.login h1 { font-size: 18px; margin: 0 0 16px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 8px; z-index: 20; max-width: 90vw; }
.toast.err { background: var(--warn); color: #fff; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 520px) { main { padding: 10px; } .card { padding: 12px; } }
[hidden] { display: none !important; }
a { color: inherit; }
.who a { color: var(--muted); }
.progress { height: 14px; background: var(--soft); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s ease; min-width: 2px; }
.progress-fill.done { background: var(--ok); }
.progress-fill.failed { background: var(--warn); }
.progress-label { font-size: 14px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }

/* John's working pages use the whole window; Jason's queue keeps a readable column. */
main.wide { max-width: none; padding: 16px clamp(16px, 3vw, 48px); }
main.wide .card { max-width: none; }
table.people { overflow: visible; }
.people th, .people td { text-align: left; }
.people th:nth-child(1), .people td:nth-child(1) { width: 3.5em; color: var(--muted); }
.people th:nth-child(5), .people td:nth-child(5) { text-align: right; width: 5em; }
.people th.link, .people td.link { text-align: right; white-space: nowrap; width: 8em; }
.people td { padding-top: 5px; padding-bottom: 5px; }

/* Dropdowns in action rows keep a sensible width instead of stretching across the card. */
.row > select { flex: 0 0 auto; width: 190px; max-width: 100%; }

/* Pipeline strip: one hue, thin marks, count with each stage. Fits in about an inch. */
.pipecard { padding: 8px 14px 8px; margin: 0 0 10px; }
.pipehead { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 14px; }
.pcell { padding: 2px 4px; border-radius: 6px; }
.pcell:hover { background: var(--soft); }
.pcell.zero .plabel, .pcell.zero .pval { opacity: .55; }
.pcell-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.plabel { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pval { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pcell-track { height: 8px; margin-top: 2px; }
.pbar { height: 8px; background: var(--accent); border-radius: 0 4px 4px 0; }
.pdetail { margin-top: 10px; }
.stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 1px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 16px; font-weight: 650; }
.stat-sub { font-size: 12px; color: var(--muted); }
button.btn.small { padding: 2px 10px; font-size: 12px; }
.charttip { position: fixed; z-index: 30; display: none; pointer-events: none; padding: 6px 10px; border-radius: 6px; font-size: 12px; background: var(--ink); color: var(--bg); max-width: 280px; }
@media (max-width: 900px) { .pstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { display: block; border-radius: 50%; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 14px; }
.login-brand h1 { margin: 0; text-align: center; }

.linkicon { display: inline-flex; vertical-align: -3px; margin-left: 8px; padding: 2px 3px; border-radius: 4px; color: var(--muted); }
.linkicon:hover { color: var(--ink); background: var(--soft); }

.dq-label { color: var(--warn); font-weight: 600; font-size: 14px; margin-left: 14px; padding-right: 2px; cursor: default; user-select: none; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action { font: inherit; font-weight: 600; background: none; border: 1px solid currentColor; color: inherit; border-radius: 6px; padding: 2px 10px; cursor: pointer; }

.sectionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-top: 28px; }
.sectionbar h2 { margin: 0; }
.sectionbar + .card, .sectionbar + .empty { margin-top: 10px; }

.pcell { cursor: pointer; }
.pcell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.psub { font-size: 11px; color: var(--muted); height: 13px; margin-top: 1px; white-space: nowrap; }
h2[id], .sectionbar[id] { scroll-margin-top: 84px; }
.card.compact { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 9px 16px; margin: 6px 0; }
.compact .info { flex: 1 1 320px; min-width: 0; }
.meta.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70ch; }

.pwform { max-width: 420px; }
.pwform label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
