/* labdash: the merge lab's dashboard (2026-11-12). Ink-teal "lab bench"; colour means state, always with an icon
   and a word: blue running, green done/good, amber caution, coral problem, hollow grey waiting. */
:root {
  color-scheme: dark;
  --bench: #0f1a1c; --tray: #16252a; --raised: #1d3036; --line: #29424a; --line-soft: #213840;
  --chalk: #e6efe8; --muted: #9ab0ad; --faint: #7f9894;
  --run: #5d9cf5; --good: #4fc27a; --warn: #e8b13a; --bad: #f2705a;
  --run-soft: rgba(93, 156, 245, .14); --good-soft: rgba(79, 194, 122, .13); --warn-soft: rgba(232, 177, 58, .13); --bad-soft: rgba(242, 112, 90, .13);
  --r: 8px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bench); color: var(--chalk); }
body { font: 15px/1.55 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--run); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }

/* ---- frame ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 10px 28px; background: rgba(15, 26, 28, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: baseline; gap: 10px; font: 700 19px/1 var(--sans); white-space: nowrap; }
.brand small { font: 400 13px var(--sans); color: var(--muted); }
.brand .mark { width: 11px; height: 11px; border-radius: 3px; background: var(--good); align-self: center; }
.tabs { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.tabs a { color: var(--muted); padding: 7px 13px; border-radius: 6px; font-weight: 600; font-size: 14.5px; }
.tabs a:hover { color: var(--chalk); background: var(--raised); text-decoration: none; }
.tabs a.on { color: var(--chalk); background: var(--raised); box-shadow: inset 0 -2px 0 var(--chalk); }
.live { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
form.inline { display: inline; margin: 0; }
main { max-width: 1440px; margin: 0 auto; padding: 22px 28px 90px; }
h2 { font: 600 19px/1.3 var(--sans); margin: 0 0 4px; }
h3 { font: 600 16px/1.3 var(--sans); margin: 0 0 4px; }
.intro { color: var(--muted); margin: 0 0 14px; max-width: 78ch; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.loading { color: var(--muted); padding: 40px 0; }
.sec { margin: 0 0 30px; }
.panel { background: var(--tray); border-radius: var(--r); padding: 18px 20px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 30px; }
.cols > .panel { min-width: 0; }
.note { border-left: 3px solid var(--warn); padding: 9px 14px; background: var(--tray); margin: 0 0 18px; border-radius: 0 6px 6px 0; }
.note.bad { border-color: var(--bad); }
.up { color: var(--good); } .down { color: var(--bad); }

/* ---- controls ---- */
.btn { background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.quiet { background: none; }
.btn.primary { background: var(--chalk); border-color: var(--chalk); color: #10191b; font-weight: 700; }
select, input[type=password] { background: var(--bench); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; }
label.f { display: block; margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }
label.f > input { display: block; width: 100%; margin-top: 5px; color: var(--chalk); font-size: 15px; }
label.chk { display: inline-flex; gap: 7px; align-items: center; font-size: 14px; color: var(--muted); }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }

/* ---- state: icon + word + colour ---- */
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.st i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; }
.st.run { color: var(--run); } .st.run i { background: var(--run); color: #0b1620; }
.st.good { color: var(--good); } .st.good i { background: var(--good); color: #0b1a10; }
.st.warn { color: var(--warn); } .st.warn i { background: var(--warn); color: #1d1404; }
.st.bad { color: var(--bad); } .st.bad i { background: var(--bad); color: #200b07; }
.st.wait { color: var(--muted); } .st.wait i { border: 2px solid var(--faint); }
.st.run i { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(93, 156, 245, .18); } }

/* ---- the "now" summary ---- */
.summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin: 0 0 22px; }
.say { padding: 22px 24px; }
.say .lead { font: 600 24px/1.3 var(--sans); margin: 0 0 10px; max-width: 34ch; }
.say p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.say b { color: var(--chalk); font-weight: 600; }
.verdict { padding: 18px 20px; border-left: 4px solid var(--warn); }
.verdict.good { border-left-color: var(--good); } .verdict.bad { border-left-color: var(--bad); }
.verdict .head { font-weight: 600; font-size: 16px; margin: 0 0 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-soft); border-radius: var(--r); overflow: hidden; margin: 0 0 30px; }
.facts > div { background: var(--tray); padding: 12px 16px; }
.facts b { display: block; font: 600 20px/1.2 var(--sans); }
.facts span { font-size: 12.5px; color: var(--muted); }

/* ---- the round track (the page's one bold element) ---- */
.track { padding: 20px 20px 16px; margin: 0 0 30px; }
.track-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; margin: 0 0 16px; }
.rail { display: flex; align-items: stretch; overflow-x: auto; padding: 4px 2px 8px; }
.node { position: relative; flex: 1 0 78px; min-width: 78px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 4px; }
.node::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.node:first-child::before { display: none; }
.node.done::before, .node.run::before { background: var(--good); }
.dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--bench); border: 3px solid var(--faint); color: var(--faint); }
.node.done .dot { background: var(--good); border-color: var(--good); color: #0b1a10; }
.node.run .dot { background: var(--run); border-color: var(--run); color: #0b1620; animation: pulse 1.8s ease-in-out infinite; }
.node.bad .dot { background: var(--bad); border-color: var(--bad); color: #200b07; }
.node.warn .dot { background: var(--warn); border-color: var(--warn); color: #1d1404; }
.node .nm { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.node .sub { font-size: 12px; color: var(--muted); line-height: 1.25; }
.node .sub.up { color: var(--good); } .node .sub.down { color: var(--bad); }
.group-row { display: flex; margin: 0 0 6px; }
.group-row span { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0 4px 3px; margin: 0 3px; text-align: center; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---- jobs ---- */
.job + .job { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.job-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.bar { height: 10px; background: var(--raised); border-radius: 5px; margin: 10px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--run); }
.logline { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bench); padding: 5px 8px; border-radius: 5px; margin-top: 8px; }
.logline.multi { white-space: normal; overflow: visible; }

/* ---- lists and tables ---- */
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.items li:first-child { border-top: 0; }
.items .r { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font: 600 12.5px var(--sans); color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
tr.hl td { background: rgba(93, 156, 245, .06); }
.hf { color: var(--chalk); border-bottom: 1px dotted var(--faint); }
.hf:hover { text-decoration: none; border-bottom-color: var(--chalk); }
.rate { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.rate .bar { flex: 1; margin: 0; height: 8px; }
.rate .bar i { background: var(--good); }
.rate span { font-size: 13px; white-space: nowrap; color: var(--muted); }
.lat { display: flex; gap: 8px; align-items: center; min-width: 140px; }
.lat .bar { flex: 1; margin: 0; height: 6px; position: relative; overflow: visible; }
.lat .bar .lim { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--chalk); opacity: .55; }
.lat span { white-space: nowrap; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
.chip.good { color: var(--good); border-color: rgba(79, 194, 122, .5); }
.chip.warn { color: var(--warn); border-color: rgba(232, 177, 58, .5); }
.chip.bad { color: var(--bad); border-color: rgba(242, 112, 90, .5); }
.vrow { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.vrow .why { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

/* ---- plan steps ---- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(220px, auto); gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.step:first-child { border-top: 0; }
.step .num { font: 600 15px var(--sans); color: var(--faint); text-align: right; padding-top: 1px; }
.step.done .num { color: var(--good); } .step.run .num { color: var(--run); }
.step .what p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; max-width: 72ch; }
.step .res { text-align: right; font-size: 13.5px; }
.step .res b { font-size: 15px; }
.stage { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }

/* ---- strategies ---- */
.family { margin: 0 0 22px; }
.family h3 { display: flex; gap: 10px; align-items: baseline; }
.reading { margin: 0 0 22px; }
.reading li { margin: 4px 0; }

/* ---- events ---- */
.ev { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.ev li { padding: 7px 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 110px auto minmax(0, 1fr); gap: 10px; align-items: baseline; }
.ev .when { font-size: 13px; color: var(--muted); }
.count { font-size: 12.5px; color: var(--warn); font-weight: 600; }
.old { opacity: .55; }

/* ---- sign-in ---- */
body.login { display: grid; place-items: center; min-height: 100vh; }
.login-box { width: min(380px, 92vw); padding: 28px 28px 24px; background: var(--tray); border-radius: var(--r); }
.login-box h1 { margin: 0 0 4px; font: 700 26px var(--sans); }
.note.crit { border-color: var(--bad); }

@media (max-width: 1100px) { .summary, .cols { grid-template-columns: 1fr; } .step { grid-template-columns: 34px minmax(0, 1fr); } .step .res { grid-column: 2; text-align: left; } }
@media (max-width: 700px) { .top, main { padding-left: 14px; padding-right: 14px; } .say .lead { font-size: 20px; } .ev li { grid-template-columns: 1fr; } }
table.strat { table-layout: fixed; min-width: 900px; }
.node .nm { overflow-wrap: anywhere; }
