/* run page */
.run-page { padding-top: 26px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 550; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); text-decoration: none; }
.rh { margin-bottom: 18px; }
.rh-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.rh-l { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.rh-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rh-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; align-items: center; }
.rh-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 10px; border-radius: 13px; font: 600 12px var(--sans); background: var(--sunk); color: var(--ink-2); }
.pill-live { background: var(--accent-soft); color: var(--accent); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-info { background: var(--info-soft); color: var(--info); }
.run-banners { display: grid; gap: 8px; margin-bottom: 16px; }
.run-banners:empty { display: none; }
.run-banners a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* the decision, always first when pending */
.decide { border: 1.5px solid var(--gate); border-radius: 14px; background: var(--surface); margin-bottom: 18px; overflow: hidden; box-shadow: 0 0 0 4px var(--warn-soft); }
.decide-h { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px; background: var(--warn-soft); color: var(--warn); }
.decide-h .ic { margin-top: 3px; }
.decide-h b { display: block; font-size: 15px; }
.decide-h span { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.decide-b { padding: 4px 4px; }
.decide-b .gate { border: 0; }
.decide-b .gate-head { display: none; }
.pred-h { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }

/* graph */
.run-flow { margin-bottom: 18px; }
.run-flow .flow-cap { position: static; padding: 0 18px 14px; min-height: 44px; }
.run-flow .flow-cap:empty { display: none; }
.run-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.ph2 { display: flex; align-items: center; gap: 8px; padding: 14px 18px 0; flex-wrap: wrap; }
.ph2 h2 { font-size: 15px; }
.ph2 .grow { flex: 1; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend span, .who { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend i, .who i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.intro { color: var(--muted); font-size: 13px; padding: 6px 18px 4px; max-width: 70ch; }

/* steps */
.steps2 { list-style: none; margin: 8px 0 0; padding: 0 18px 8px; position: relative; }
.st { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 0; position: relative; }
.st + .st { border-top: 1px solid var(--line); }
.st-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); flex: none; }
.st.done .st-ic, .st-ic.done { background: var(--ok-soft); color: var(--ok); }
.st.running .st-ic { background: var(--accent-soft); }
.st.awaiting .st-ic, .st-ic.awaiting { background: var(--warn-soft); color: var(--warn); }
.st.failed .st-ic, .st.rejected .st-ic, .st-ic.failed, .st-ic.rejected { background: var(--bad-soft); color: var(--bad); }
.st.skipped { opacity: .55; }
.st.waiting .st-name { color: var(--faint); }
.pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.st-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 24px; }
.st-name { border: 0; background: none; padding: 0; font: 550 14px var(--sans); color: var(--ink); text-align: left; cursor: pointer; }
.st-name:hover:not([disabled]) { text-decoration: underline; text-underline-offset: 3px; }
.st-name[disabled] { cursor: default; }
.st.running .st-name { font-weight: 650; }
.st .who { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.st-time { font-size: 12px; color: var(--muted); min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.st-act { color: var(--muted); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st.running .st-act:last-of-type { color: var(--ink-2); }
.st-err { margin-top: 6px; color: var(--bad); font-size: 13px; }
.st-res { margin-top: 10px; }
.rv { display: flex; align-items: flex-start; gap: 7px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.rv i { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; }
.rv.sent { color: var(--ink-2); }
.run-end { display: flex; align-items: center; gap: 10px; margin: 4px 18px 16px; padding: 12px 14px; border-radius: 10px; background: var(--sunk); font-size: 13.5px; }
.run-end .grow { flex: 1; }

/* activity feed */
.feed-panel { position: sticky; top: 18px; }
.feed { max-height: 640px; overflow: auto; padding: 8px 6px 10px; }
.fi { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-radius: 8px; animation: feedin .35s ease-out; }
.fi:first-child { background: var(--sunk); }
.fi-ic { display: grid; place-items: center; height: 20px; }
.fi-t { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.45; }
.fi-m { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.fi.warn .fi-t { color: var(--warn); } .fi.bad .fi-t { color: var(--bad); }
@keyframes feedin { from { opacity: 0; transform: translateY(-4px); } }

/* results */
.results { display: grid; gap: 10px; }
.res { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.res > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; }
.res > summary::-webkit-details-marker { display: none; }
.res-t { font-weight: 600; font-size: 14px; }
.res > summary .who { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.res .caret { color: var(--muted); transition: transform .15s; }
.res[open] .caret { transform: rotate(180deg); }
.res-b { padding: 0 16px 16px; }
.res-b > .card, .res-b > .gate { border-color: var(--line); }
.res-b > .card { border: 0; padding: 4px 0 0; }

/* sources */
.src-intro p { color: var(--ink-2); max-width: 72ch; }
.src-stats { display: flex; gap: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); flex-wrap: wrap; overflow: hidden; }
.src-stats > div { flex: 1; min-width: 120px; padding: 14px 16px; display: grid; gap: 2px; }
.src-stats > div + div { border-left: 1px solid var(--line); }
.src-stats b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.src-stats span { color: var(--muted); font-size: 12.5px; }
.lab-groups { display: grid; gap: 8px; }
.lab > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 16px; cursor: pointer; }
.lab > summary::-webkit-details-marker { display: none; }
.lab > summary .caret { margin-left: auto; color: var(--muted); }
.lab[open] > summary .caret { transform: rotate(180deg); }
.lab ul { list-style: none; margin: 0; padding: 0 16px 10px; }
.lab li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.lab li > :nth-child(2) { grid-column: 1; font-size: 12.5px; overflow-wrap: anywhere; }
.lab li > :last-child { grid-column: 2; grid-row: 1; white-space: nowrap; }
.q-list { margin: 0; padding: 0 0 0 20px; display: grid; gap: 0; }
ul.q-list { list-style: none; padding: 0; }
.q-list li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.q-list li span:first-child { overflow-wrap: anywhere; }
.q-list li .muted { white-space: nowrap; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; }
.cites a { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.evlog { font: 11.5px/1.65 var(--mono); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; max-height: 560px; overflow: auto; white-space: pre-wrap; margin: 0; }

@media (max-width: 980px) {
  .run-grid { grid-template-columns: 1fr; }
  .feed-panel { position: static; }
  .feed { max-height: 360px; }
}
@media (max-width: 760px) {
  .st .who { margin-left: 0; }
  .legend { display: none; }
  .src-stats > div + div { border-left: 0; }
  .lab li { grid-template-columns: 1fr; } .lab li > :last-child { grid-column: 1; grid-row: auto; }
}
