/* HUMBLE dashboard — flight-recorder aesthetic. Colour is reserved for status. */

*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(14px, .79vw, 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1rem/1.5 "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; }
code, pre, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-ligatures: none; }
.mono { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.muted { color: var(--ink-3); }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.14em; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; border-radius: 3px; }
button { font: inherit; color: inherit; }

/* ------------------------------------------------------------ top bar */
.bar {
  position: sticky; top: 0; z-index: 30; height: 52px;
  display: flex; align-items: center; gap: 22px; padding: 0 32px;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.2rem/1 "IBM Plex Sans Condensed", sans-serif; letter-spacing: .01em; }
.brand svg { width: 26px; height: 26px; }
.brand .b-bg { fill: var(--panel-2); stroke: var(--rule-2); }
.brand .b-chev { stroke: var(--pass); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brand .b-cur { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; animation: blink 1.2s steps(1) infinite; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .9rem; min-width: 0; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 500; font-family: "IBM Plex Mono", monospace; font-size: .86rem; }
.crumbs .sep { color: var(--rule-2); }
.bar-r { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.bar-note { color: var(--ink-3); font-size: .85rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px;
  background: transparent; border: 1px solid var(--rule); cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule-2); }
.icon-btn .ic { width: 16px; height: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--rule-2); background: var(--panel-2); text-decoration: none; font-weight: 500; font-size: .92rem; white-space: nowrap;
}
.btn:hover { background: var(--raise); }

/* ------------------------------------------------------------ run header */
.run-head {
  display: grid; grid-template-columns: minmax(260px, auto) minmax(0, 1fr) auto; gap: 40px; align-items: center;
  padding: 22px 32px 18px; max-width: 1880px; margin: 0 auto;
}
.rh-repo { font: 600 2rem/1.05 "IBM Plex Sans Condensed", sans-serif; letter-spacing: -.01em; white-space: nowrap; }
.rh-repo .org { color: var(--ink-3); font-weight: 500; }
.rh-meta { display: flex; gap: 12px; margin-top: 6px; font: 400 .88rem "IBM Plex Mono", monospace; color: var(--ink-2); }
.rh-meta .img { color: var(--ink-3); }
.phase-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; min-width: 0; }
.ph { flex: 1; min-width: 0; }
.ph::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--rule); margin-bottom: 8px; }
.ph span { font: 500 .86rem/1 "IBM Plex Sans Condensed", sans-serif; color: var(--ink-3); white-space: nowrap; }
.ph-did::before { background: var(--ink-3); }
.ph-did span { color: var(--ink-2); }
.ph-now::before { background: linear-gradient(90deg, var(--live) 0 40%, color-mix(in srgb, var(--live) 35%, transparent) 50%, var(--live) 60% 100%); background-size: 250% 100%; animation: sweep 1.6s linear infinite; }
.ph-now span { color: var(--live); font-weight: 600; }
.ph-skip::before { background: repeating-linear-gradient(90deg, var(--rule) 0 5px, transparent 5px 9px); }
.ph-did.end::before { background: var(--pass); }
.ph-did.end span { color: var(--pass); }
.rh-gauges { display: flex; gap: 26px; align-items: center; }
.gauge { display: flex; flex-direction: column; gap: 3px; }
.gl { font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.gv { font-size: 1.3rem; line-height: 1.1; font-weight: 500; white-space: nowrap; }
.g-bob .gv { color: var(--bob); }
.g-pass .gv { color: var(--pass); }
.g-human .gv { color: var(--human); }
.g-verdict .gv { font: 700 1.3rem/1.1 "IBM Plex Sans Condensed", sans-serif; letter-spacing: .06em; }
.v-verified .gv, .vchip.v-verified { color: var(--pass); }
.v-partial .gv, .vchip.v-partial { color: var(--repair); }
.v-failed .gv, .vchip.v-failed { color: var(--fail); }
.v-no-setup-docs .gv, .vchip.v-no-setup-docs { color: var(--nodocs, var(--ink-3)); }
.g-live .gv { color: var(--ink-3); font-size: 1rem; }
.g-live.on .gv { color: var(--live); }
.g-live.on .gv::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 7px; vertical-align: 1px; animation: pulse 1.4s ease-out infinite; }

/* ------------------------------------------------------------ agent strip */
.agents {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0;
  max-width: 1880px; margin: 0 auto; padding: 0 32px;
}
.agent { padding: 10px 16px 12px 0; border-top: 2px solid var(--rule); margin-right: 14px; transition: border-color .4s; min-width: 0; }
.agent.has { border-top-color: var(--rule-2); }
.agent.on { border-top-color: var(--live); }
.ag-top { display: flex; align-items: center; gap: 10px; }
.ag-name { font: 600 1rem/1.2 "IBM Plex Sans Condensed", sans-serif; color: var(--ink-2); }
.agent.on .ag-name { color: var(--ink); }
.ag-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; opacity: .25; }
.ag-bars i { width: 3px; height: 4px; background: currentColor; border-radius: 1px; }
.agent.on .ag-bars { opacity: 1; color: var(--live); }
.agent.on .ag-bars i { animation: eq .9s ease-in-out infinite; }
.agent.on .ag-bars i:nth-child(2) { animation-delay: -.3s; }
.agent.on .ag-bars i:nth-child(3) { animation-delay: -.55s; }
.agent.on .ag-bars i:nth-child(4) { animation-delay: -.15s; }
.ag-line { margin-top: 3px; font-size: .84rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent.on .ag-line { color: var(--ink-2); }
.agent[data-agent="doctor"].on { border-top-color: var(--repair); }
.agent[data-agent="doctor"].on .ag-bars { color: var(--repair); }

/* ------------------------------------------------------------ body layout */
.run-body {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(400px, 29vw, 560px); gap: 40px;
  max-width: 1880px; margin: 0 auto; padding: 22px 32px 80px;
}
.tl-head { display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px 104px; flex-wrap: wrap; }
.tl-head h2 { font-size: 1.3rem; }
.tl-head p { margin: 0; color: var(--ink-3); font-size: .9rem; }

/* ------------------------------------------------------------ steps timeline */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.step { display: grid; grid-template-columns: 76px 28px minmax(0, 1fr); column-gap: 0; position: relative; padding-bottom: 10px; }
.step::before { content: ""; position: absolute; left: 89px; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.step:first-child::before { top: 18px; }
.step:last-child::before { bottom: calc(100% - 18px); }
.gut { padding-top: 12px; text-align: right; padding-right: 14px; }
.tplus { font: 400 .78rem "IBM Plex Mono", monospace; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.node { position: relative; z-index: 1; padding-top: 7px; display: flex; justify-content: center; }
.node i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ground); border: 2px solid var(--rule-2); color: var(--ink-3);
}
.node .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.st-passed .node i { border-color: var(--pass); color: var(--pass); }
.st-repaired .node i { border-color: var(--repair); color: var(--ground); background: var(--repair); }
.st-failed .node i { border-color: var(--fail); color: var(--ground); background: var(--fail); }
.st-needs-human .node i { border-color: var(--human); color: var(--human); }
.st-running .node i { border-color: var(--live); color: var(--live); box-shadow: 0 0 0 0 var(--live); animation: ring 1.6s ease-out infinite; }
.st-running .node .ic { fill: currentColor; }
.st-skipped .node i { border-style: dashed; }

.card { margin-left: 14px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); padding: 11px 16px 12px; min-width: 0; }
.st-passed .card, .st-skipped .card, .st-pending .card { background: transparent; }
.st-pending .card { border-style: dashed; opacity: .55; }
.st-skipped .card { opacity: .62; }
.st-repaired .card { border-left: 3px solid var(--repair); }
.st-failed .card { border-color: var(--fail-m); border-left: 3px solid var(--fail); }
.st-needs-human .card { border-left: 3px solid var(--human); }
.st-running .card { border-color: color-mix(in srgb, var(--live) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--live) 18%, transparent), 0 10px 30px -18px var(--live); }
.is-repair .card { border-left: 3px dashed var(--repair); }
.card-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sid { font: 500 .8rem "IBM Plex Mono", monospace; color: var(--ink-3); flex: none; width: 1.9rem; }
.cmd { font-size: 1.02rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.st-pending .cmd, .st-skipped .cmd { color: var(--ink-2); }
.chip {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 3px;
  font: 600 .8rem/1.5 "IBM Plex Sans Condensed", sans-serif; letter-spacing: .02em; background: var(--panel-2); color: var(--ink-2);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.c-passed { color: var(--pass); background: var(--pass-t); }
.c-repaired { color: var(--repair); background: var(--repair-t); }
.c-failed { color: var(--fail); background: var(--fail-t); }
.c-needs-human { color: var(--human); background: var(--human-t); }
.c-running { color: var(--live); background: var(--live-t); }
.c-running::before { animation: pulse 1.4s ease-out infinite; }
.c-skipped, .c-pending { color: var(--ink-3); background: transparent; border: 1px solid var(--rule); }
.card-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0 0 calc(1.9rem + 12px); font-size: .8rem; color: var(--ink-3); }
.card-sub .src { font-family: "IBM Plex Mono", monospace; }
.card-sub .sec::before { content: "“"; } .card-sub .sec::after { content: "”"; }
.card-sub .dur, .card-sub .att { font-family: "IBM Plex Mono", monospace; }
.card-sub .added { color: var(--repair); display: inline-flex; gap: 6px; align-items: center; }
.card-sub .skipwhy { color: var(--ink-2); font-style: italic; }
.rp { display: inline-flex; gap: 5px; align-items: center; font-family: "IBM Plex Mono", monospace; }
.rp-passed { color: var(--pass); }
.rp-failed { color: var(--fail); }
.rp-running { color: var(--live); }
.rp-running .ic { fill: currentColor; animation: pulse 1.2s infinite; }

/* repair chain: FAIL -> diagnosis -> fix -> PASS */
.chain {
  display: grid; grid-template-columns: minmax(130px, .85fr) minmax(0, 2fr) minmax(0, 1.25fr) minmax(112px, .7fr) 58px;
  gap: 14px; margin: 12px 0 2px calc(1.9rem + 12px); align-items: stretch;
}
.lnk { position: relative; border-radius: 4px; padding: 8px 11px 9px; min-width: 0; font-size: .86rem; }
.lnk:not(:nth-last-child(2))::after {
  content: ""; position: absolute; right: -11px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-top: 2px solid var(--rule-2); border-right: 2px solid var(--rule-2); transform: rotate(45deg);
}
.lnk p { margin: 3px 0 0; }
.lk { display: flex; align-items: center; gap: 6px; font: 600 .86rem/1.2 "IBM Plex Sans Condensed", sans-serif; letter-spacing: .02em; }
.lk .ic { stroke-width: 2.2; }
.l-fail { background: var(--fail-t); color: var(--fail); }
.l-fail p { color: var(--ink-2); font-size: .78rem; }
.sig { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font: .74rem/1.35 "IBM Plex Mono", monospace; color: var(--fail); quotes: none; word-break: break-word; }
.l-diag { background: var(--panel-2); border: 1px solid var(--rule); }
.l-diag.by-bob { border-color: color-mix(in srgb, var(--bob) 60%, transparent); background: var(--bob-t); }
.cls { display: inline-block; font: 600 .78rem/1.5 "IBM Plex Sans Condensed", sans-serif; letter-spacing: .03em; padding: 0 7px; border-radius: 3px; background: var(--raise); color: var(--ink); }
.by-bob .cls { background: var(--bob); color: #fff; }
.cause { color: var(--ink); line-height: 1.38; margin-top: 5px !important; }
.by { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: .76rem; color: var(--ink-3); }
.by code { font-size: .72rem; color: var(--ink-2); }
.by-bob .by { color: var(--bob); font-weight: 500; }
.conf { margin-left: auto; font: .72rem "IBM Plex Mono", monospace; color: var(--ink-3); }
.l-fix { background: var(--repair-t); color: var(--repair); }
.l-fix ul { margin: 4px 0 0; padding: 0; list-style: none; color: var(--ink); font-size: .82rem; line-height: 1.4; }
.l-fix code, .ev-actions code { font-size: .78rem; background: color-mix(in srgb, var(--ground) 55%, transparent); padding: 1px 5px; border-radius: 3px; word-break: break-word; }
.l-fix.pending { opacity: .5; }
.l-pass { background: var(--pass-t); color: var(--pass); }
.l-pass p { color: var(--ink-2); font-size: .78rem; }
.l-human { background: var(--human-t); color: var(--human); }
.l-human p { color: var(--ink); font-size: .8rem; }
.l-wait { border: 1px dashed var(--rule-2); color: var(--ink-3); }
.l-wait.live { color: var(--live); border-color: color-mix(in srgb, var(--live) 50%, transparent); }
.l-wait.live .ic { fill: currentColor; animation: pulse 1.2s infinite; }
.ev-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none;
  border: 1px solid var(--rule-2); border-radius: 4px; font: 600 1rem "IBM Plex Mono", monospace; color: var(--ink);
}
.ev-link span { font: 400 .68rem "IBM Plex Sans", sans-serif; color: var(--ink-3); }
.ev-link:hover { background: var(--raise); border-color: var(--ink-3); }
.ev-link.off { opacity: .35; }

pre.tail {
  margin: 12px 0 2px calc(1.9rem + 12px); padding: 10px 14px; background: var(--ground-2); border-left: 2px solid var(--live);
  border-radius: 0 4px 4px 0; font-size: .8rem; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; word-break: break-all;
  max-height: calc(14 * 1.5em + 20px); overflow: hidden;
}
pre.tail.replay { border-left-color: var(--pass); max-height: calc(8 * 1.5em + 20px); }
pre.tail.replay::after { color: var(--pass); }
pre.tail::after { content: "▍"; color: var(--live); animation: blink 1s steps(1) infinite; }
details.log { margin: 8px 0 0 calc(1.9rem + 12px); }
details.log summary { cursor: pointer; color: var(--ink-3); font-size: .8rem; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
details.log summary::before { content: "▸"; transition: transform .15s; display: inline-block; }
details.log[open] summary::before { transform: rotate(90deg); }
details.log summary:hover { color: var(--ink-2); }
details.log .lf { font-family: "IBM Plex Mono", monospace; opacity: .8; }
details.log pre { margin: 8px 0 0; padding: 10px 14px; background: var(--ground-2); border-radius: 4px; font-size: .78rem; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; max-height: 340px; overflow: auto; }
.le { color: var(--fail); }
.lfr { color: var(--live); }

/* motion for live state changes */
.enter { animation: linkIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.chain .enter:nth-child(2) { animation-delay: .05s; }
.flash .card { animation: flash 1.2s ease-out; }
.st-repaired.flash .card { --fc: var(--repair); }
.st-passed.flash .card { --fc: var(--pass); }
.st-failed.flash .card { --fc: var(--fail); }
.st-running.flash .card { --fc: var(--live); }
.st-needs-human.flash .card { --fc: var(--human); }
.arrive { animation: arrive .5s ease-out both; }

/* ------------------------------------------------------------ side column */
.side { display: flex; flex-direction: column; gap: 22px; min-width: 0; position: sticky; top: 68px; align-self: start; max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 8px; }
.side-top { position: relative; }
.panel h3, .replay-card h3 { font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.panel .count { font: 500 .8rem "IBM Plex Mono", monospace; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 3px; padding: 0 6px; }
.replay-card { border: 1px dashed var(--rule-2); border-radius: 10px; padding: 20px 22px; position: relative; overflow: hidden; min-height: 180px; }
.replay-card p { color: var(--ink-3); margin: 0; font-size: .9rem; max-width: 38ch; }
.replay-card.on { border-style: solid; border-color: color-mix(in srgb, var(--live) 50%, transparent); }
.replay-card.on h3 { color: var(--live); }
.pp-ghost { position: absolute; right: -30px; bottom: -40px; width: 170px; height: 170px; border-radius: 50%; border: 3px dashed var(--rule); opacity: .8; }
.rp-bar { margin-top: 18px; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: var(--live); transition: width .6s ease; }
.rp-count { margin-top: 6px; font-size: .8rem; color: var(--ink-3); }

.conflicts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.conflicts li { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; padding: 10px 14px; background: var(--ground); }
.conflicts .cw { grid-column: 1 / -1; font: 600 .86rem "IBM Plex Sans Condensed", sans-serif; color: var(--ink-2); }
.conflicts .says { display: block; font-size: .72rem; color: var(--ink-3); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conflicts code { font-size: .86rem; }
.conflicts .cd code { color: var(--fail); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--fail) 55%, transparent); }
.conflicts .ct code { color: var(--ink); }

.ledger ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.led {
  display: grid; grid-template-columns: 2.2rem 2.2rem minmax(0, 1fr) auto 1.2rem; gap: 10px; align-items: center;
  padding: 8px 12px; border-radius: 5px; border: 1px solid var(--rule); text-decoration: none; font-size: .88rem;
}
.led:hover { background: var(--panel); border-color: var(--rule-2); }
.led .eid { font: 600 .9rem "IBM Plex Mono", monospace; }
.led .estep { font: .8rem "IBM Plex Mono", monospace; color: var(--ink-3); }
.led .ecls { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led .erule { font-size: .75rem; color: var(--ink-3); }
.led .ebob { font-size: .75rem; color: var(--bob); display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.led .est { color: var(--pass); display: grid; place-items: center; }
.led-needs-human .est { color: var(--human); }
.led-needs-human { border-color: color-mix(in srgb, var(--human) 40%, transparent); }
.artifacts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.artifacts a { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; font: .8rem "IBM Plex Mono", monospace; color: var(--ink-2); }
.artifacts a:hover { color: var(--ink); border-color: var(--rule-2); }

/* ------------------------------------------------------------ passport */
.passport {
  position: relative; margin: 0; overflow: hidden; border-radius: 10px; color: var(--paper-ink);
  background: radial-gradient(120% 90% at 20% 0%, var(--paper-2), var(--paper) 60%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(22, 38, 58, .12);
  padding: 20px 22px 0; isolation: isolate;
}
.pp-guilloche { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .3; }
.pp-guilloche .g-waves { fill: none; stroke: var(--guil-a); stroke-width: .6; }
.pp-guilloche .g-rose { fill: none; stroke: var(--guil-b); stroke-width: .5; }
.pp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 3px double rgba(22, 38, 58, .35); flex-wrap: wrap; }
.pp-title { font: 500 1.5rem/1 "IBM Plex Serif", serif; letter-spacing: .01em; }
.pp-issuer { font-size: .72rem; color: var(--paper-mute); }
.pp-body { display: grid; grid-template-columns: 76px minmax(0, 1fr) 120px; gap: 16px; padding: 14px 0 14px; align-items: start; }
.pp-portrait { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.identicon { width: 76px; height: 92px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(22, 38, 58, .2); border-radius: 3px; fill: var(--paper-ink); padding: 6px; }
.pp-portrait span { font: .68rem "IBM Plex Mono", monospace; color: var(--paper-mute); }
.pp-fields { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; }
.pp-fields .f { min-width: 0; }
.pp-fields .f-wide { grid-column: span 2; }
.pp-fields dt { font-size: .68rem; color: var(--paper-mute); line-height: 1.2; }
.pp-fields dd { margin: 1px 0 0; font: 400 .98rem/1.25 "IBM Plex Serif", serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-fields dd.mono { font: 500 .86rem/1.4 "IBM Plex Mono", monospace; }
.pp-fields dd small { font: .72rem "IBM Plex Sans", sans-serif; color: var(--paper-mute); }
.pp-repo b { font-weight: 500; }
.f-hero dd { overflow: visible; }
.pp-time { font: 700 2.1rem/1 "IBM Plex Sans Condensed", sans-serif; letter-spacing: -.01em; }
.pp-time.pp-short { font-size: 1.6rem; }
.f-tally dd { font: 600 1.45rem/1.1 "IBM Plex Sans Condensed", sans-serif; display: flex; gap: 0; }
.f-tally dd span { display: flex; align-items: baseline; gap: 5px; padding-right: 14px; }
.f-tally dd span + span { border-left: 1px solid rgba(22, 38, 58, .2); padding-left: 12px; }
.f-tally dd b { font-weight: 600; }
.passport .c-pass { color: var(--stamp-pass); }
.passport .c-human { color: #7B3FB8; }
.passport .c-bob { color: #0F4FC7; font: 600 1.05rem "IBM Plex Mono", monospace; }
.pp-stamp { margin: 30px 0 0 -44px; transform: rotate(-13deg); mix-blend-mode: multiply; opacity: .9; pointer-events: none; }
.v-verified .pp-stamp, .g-stamp.v-verified { color: var(--stamp-pass); }
.v-partial .pp-stamp, .g-stamp.v-partial { color: var(--stamp-partial); }
.v-failed .pp-stamp, .g-stamp.v-failed { color: var(--stamp-failed); }
.v-no-setup-docs .pp-stamp, .g-stamp.v-no-setup-docs { color: var(--stamp-nodocs, var(--ink-3)); }
.mrz { display: grid; margin: 0 -22px; padding: 10px 22px 12px; background: rgba(255, 255, 255, .6); border-top: 1px solid rgba(22, 38, 58, .15); font: 500 .82rem/1.45 "IBM Plex Mono", monospace; letter-spacing: .14em; color: #22313f; white-space: pre; overflow: hidden; }
.pp-guide { margin-top: 12px; }
.passport.fresh { animation: ppIn .8s cubic-bezier(.2, .8, .2, 1) both; }
.passport.fresh .pp-stamp { animation: stamp .55s cubic-bezier(.3, 1.6, .5, 1) 1s both; }

/* ------------------------------------------------------------ README diff */
.diff-wrap { margin: 36px 0 0 104px; }
.diff-h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.diff-h h2 { font-size: 1.3rem; }
.diff-h p { margin: 0; color: var(--ink-3); font-size: .9rem; flex-basis: 100%; }
.diff-stat { font: 500 .9rem "IBM Plex Mono", monospace; }
.c-add { color: var(--pass); } .c-del { color: var(--fail); }
.diff { width: 100%; border-collapse: collapse; font: .84rem/1.6 "IBM Plex Mono", monospace; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; display: table; table-layout: fixed; }
.diff td { padding: 0 10px; vertical-align: top; }
.diff col.c-ln { width: 3.4rem; }
.diff col.c-sg { width: 1.8rem; }
.diff .ln { color: var(--ink-3); text-align: right; user-select: none; opacity: .75; }
.diff .sg { width: 1.6rem; text-align: center; user-select: none; }
.diff .tx { white-space: pre-wrap; word-break: break-word; }
.diff .tx { display: flex; align-items: flex-start; gap: 10px; }
.diff .tx span { flex: 1; min-width: 0; }
.d-ctx { color: var(--ink-2); }
.d-add { background: var(--pass-t); color: var(--ink); }
.d-add .sg { color: var(--pass); }
.d-del { background: var(--fail-t); color: var(--ink-2); }
.d-del .sg { color: var(--fail); }
.d-add mark { background: var(--pass-m); color: inherit; border-radius: 2px; }
.d-del mark { background: var(--fail-m); color: inherit; border-radius: 2px; }
.d-hunk td { background: var(--panel-2); color: var(--ink-3); padding: 3px 12px; font-size: .78rem; }
.ev-tag { flex: none; font: 600 .7rem/1.6 "IBM Plex Mono", monospace; padding: 0 6px; border-radius: 3px; background: var(--repair-t); color: var(--repair); text-decoration: none; border: 1px solid color-mix(in srgb, var(--repair) 40%, transparent); margin-top: 2px; }
.ev-tag:hover { background: var(--repair); color: var(--ground); }

/* ------------------------------------------------------------ evidence drawer */
.drawer-backdrop { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(2px); z-index: 40; animation: fade .25s ease both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(1540px, 94vw); z-index: 41; background: var(--ground);
  border-left: 1px solid var(--rule-2); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; padding: 22px 28px 24px; gap: 16px; animation: slideIn .35s cubic-bezier(.2, .8, .2, 1) both;
}
.dr-head { display: flex; align-items: center; justify-content: space-between; }
.dr-title { display: flex; align-items: center; gap: 16px; font-size: 1rem; color: var(--ink-2); }
.dr-id { font: 700 2rem/1 "IBM Plex Mono", monospace; color: var(--ink); }
.dr-title .chip { margin-left: 0; }
.dr-diag { border: 1px solid var(--rule); border-radius: 6px; padding: 14px 18px; background: var(--panel); }
.dr-diag.by-bob { border-color: color-mix(in srgb, var(--bob) 60%, transparent); background: var(--bob-t); }
.dr-diag .cause { font-size: 1.12rem; margin: 8px 0 0 !important; max-width: 90ch; }
.dr-diag .by { font-size: .84rem; gap: 10px; }
.meter { width: 90px; height: 5px; border-radius: 3px; background: var(--rule); overflow: hidden; display: inline-block; }
.meter i { display: block; height: 100%; background: currentColor; }
.dr-diag .at { margin-left: auto; color: var(--ink-3); }
.ev-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr) minmax(0, 1fr); gap: 16px; }
.ev-pane { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); overflow: hidden; }
.ev-pane > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: .8rem; color: var(--ink-3); }
.ev-before > header { box-shadow: inset 0 3px 0 var(--fail); } .ev-before .lk { color: var(--fail); }
.ev-after > header { box-shadow: inset 0 3px 0 var(--pass); } .ev-after .lk { color: var(--pass); }
.ev-fix > header { box-shadow: inset 0 3px 0 var(--repair); } .ev-fix .lk { color: var(--repair); }
.ev-none > header { box-shadow: inset 0 3px 0 var(--human); } .ev-none .lk { color: var(--human); }
.ev-cmd { display: block; padding: 10px 14px 0; color: var(--ink); font-size: .86rem; }
.ev-pane pre { flex: 1; min-height: 0; margin: 0; padding: 10px 14px 14px; overflow: auto; font-size: .78rem; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }
.ev-file { display: flex; gap: 6px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--rule); font: .75rem "IBM Plex Mono", monospace; color: var(--ink-3); text-decoration: none; }
.ev-file:hover { color: var(--ink); }
.ev-actions { margin: 0; padding: 14px 18px 0 34px; display: grid; gap: 10px; font-size: .92rem; }
.ev-doc { margin: 16px 14px; padding: 12px 14px; border-radius: 5px; background: var(--repair-t); display: grid; gap: 6px; }
.ev-doc span { font-size: .75rem; color: var(--repair); font-weight: 600; }
.ev-doc code { font-size: .84rem; white-space: pre-wrap; word-break: break-word; }
.ev-empty { padding: 18px; color: var(--ink-2); }
body.drawer-open { overflow: hidden; }

/* ------------------------------------------------------------ audit */
.audit { max-width: 1880px; margin: 0 auto; padding: 34px 32px 80px; }
.au-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 30px; }
.au-kicker { margin: 0 0 12px; color: var(--ink-3); font-size: .9rem; display: flex; gap: 14px; }
.au-headline { font: 600 clamp(2.6rem, 3.7vw, 4.6rem)/1.02 "IBM Plex Sans Condensed", sans-serif; letter-spacing: -.02em; max-width: 18ch; }
.au-headline .n { font-variant-numeric: tabular-nums; }
.au-headline .sofar { color: var(--ink-3); font-weight: 400; }
.au-sub { margin: 14px 0 0; font-size: 1.35rem; color: var(--ink-2); }
.au-live { color: var(--live); margin-left: 10px; font-size: 1.1rem; }
.au-live .ic { fill: currentColor; animation: pulse 1.2s infinite; }
.au-sub .n { font-weight: 600; color: var(--pass); }
.au-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; padding-bottom: 6px; }
.au-verdicts { grid-column: 1 / -1; display: flex; gap: 3px; height: 26px; }
.vb { display: grid; place-items: center; border-radius: 3px; min-width: 0; transition: flex .6s ease; font: 600 .8rem "IBM Plex Mono", monospace; color: var(--ground); }
.vb.v-verified { background: var(--pass); } .vb.v-partial { background: var(--repair); } .vb.v-failed { background: var(--fail); }
.vb.v-no-setup-docs { background: var(--nodocs, var(--ink-3)); color: var(--ground); }
.vb.v-pending { background: repeating-linear-gradient(135deg, var(--rule) 0 6px, transparent 6px 12px); }
.au-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; min-height: 250px;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); text-decoration: none; overflow: hidden;
}
a.tile[href]:hover { border-color: var(--ink-3); }
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rule); }
.tile.v-verified::before { background: var(--pass); } .tile.v-partial::before { background: var(--repair); } .tile.v-failed::before { background: var(--fail); }
.tile.v-no-setup-docs::before { background: var(--nodocs, var(--ink-3)); }
.tile.t-running::before { background: linear-gradient(90deg, transparent, var(--live), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: scan 1.8s linear infinite; }
.tile.t-running { border-color: color-mix(in srgb, var(--live) 45%, transparent); }
.tile.t-queued { background: transparent; border-style: dashed; }
.tile.t-queued .t-top, .tile.t-queued .t-meta { opacity: .55; }
.t-top { display: flex; flex-direction: column; min-width: 0; }
.t-org { font-size: .8rem; color: var(--ink-3); }
.t-name { font: 600 1.35rem/1.1 "IBM Plex Sans Condensed", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-meta { display: flex; gap: 10px; font: .76rem "IBM Plex Mono", monospace; color: var(--ink-3); min-height: 1.2em; }
.t-bob { color: var(--bob); display: inline-flex; gap: 4px; align-items: center; }
.t-strip { display: flex; gap: 3px; }
.t-strip i { flex: 1; height: 7px; border-radius: 1px; background: var(--rule); }
.t-strip .c-passed { background: var(--pass); } .t-strip .c-repaired { background: var(--repair); } .t-strip .c-failed { background: var(--fail); }
.t-strip .c-needs-human { background: var(--human); } .t-strip .c-skipped { background: var(--rule-2); opacity: .5; }
.t-strip .c-running { background: var(--live); animation: pulse-bg 1.2s ease-in-out infinite; }
.t-mid { flex: 1; min-width: 0; font-size: .88rem; }
.t-mid p { margin: 0; }
.t-wait { color: var(--ink-3); }
.t-phase { color: var(--live); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.t-phase .ic { fill: currentColor; animation: pulse 1.2s infinite; }
.t-phase .mono { color: var(--ink-3); margin-left: auto; font-weight: 400; }
.t-cmd { display: block; margin-top: 6px; font-size: .8rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cmd.dim { color: var(--ink-3); }
.t-result { color: var(--ink-2); }
.t-result.t-nodocs { color: var(--ink-3); font-style: italic; }
.t-reps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.t-reps li { font: 500 .72rem/1.6 "IBM Plex Sans Condensed", sans-serif; padding: 0 6px; border-radius: 3px; background: var(--repair-t); color: var(--repair); }
.t-reps li.r-needs-human { background: var(--human-t); color: var(--human); }
.t-reps li.r-bob { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bob) 70%, transparent); }
.t-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.t-verdict { font: 700 .95rem/1 "IBM Plex Sans Condensed", sans-serif; letter-spacing: .08em; padding: 5px 8px 4px; border: 2px solid currentColor; border-radius: 3px; transform: rotate(-3deg); }
.v-verified .t-verdict { color: var(--pass); } .v-partial .t-verdict { color: var(--repair); } .v-failed .t-verdict { color: var(--fail); }
.v-no-setup-docs .t-verdict { color: var(--nodocs, var(--ink-3)); }
.t-time { font-size: .76rem; color: var(--ink-3); }
.t-state { font-size: .78rem; color: var(--ink-3); }
.tile.landed .t-verdict { animation: stampSmall .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.tile.flash { animation: arrive .5s ease-out; }

/* ------------------------------------------------------------ guide */
.guide { max-width: 940px; margin: 0 auto; padding: 36px 32px 90px; }
.g-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-3); text-decoration: none; font-size: .88rem; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.guide h1 { font-size: 2.6rem; line-height: 1.05; letter-spacing: -.015em; }
.guide h1 .org { color: var(--ink-3); font-weight: 500; }
.g-lede { color: var(--ink-2); font-size: 1.05rem; max-width: 62ch; margin: 14px 0 0; }
.g-lede code { font-size: .92em; }
.g-stamp { transform: rotate(-10deg); margin-top: 18px; }
.g-progress { display: flex; align-items: center; gap: 14px; margin: 30px 0 26px; position: sticky; top: 52px; background: var(--ground); padding: 12px 0; z-index: 5; font-size: .88rem; color: var(--ink-2); }
.g-bar { flex: 1; height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--pass); transition: width .4s ease; }
.linkish { background: none; border: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 0; }
.g-pre { border: 1px solid var(--rule); border-radius: 6px; padding: 14px 18px; margin-bottom: 26px; }
.g-pre h2 { font-size: 1.05rem; margin-bottom: 6px; }
.g-pre ul { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 4px; }
.g-pre code { font-size: .9em; }
.g-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.g-check {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--rule-2); background: transparent; cursor: pointer;
  display: grid; place-items: center; color: transparent; margin-top: 2px; transition: background .2s, border-color .2s;
}
.g-check .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.g-check:hover { border-color: var(--pass); color: color-mix(in srgb, var(--pass) 50%, transparent); }
.g-step.done .g-check { background: var(--pass); border-color: var(--pass); color: var(--ground); }
.g-body { border: 1px solid var(--rule); border-radius: 6px; padding: 12px 16px 14px; background: var(--panel); min-width: 0; }
.g-step.done .g-body { opacity: .6; background: transparent; }
.g-n { display: flex; gap: 14px; align-items: center; font-size: .82rem; color: var(--ink-3); margin-bottom: 8px; }
.g-n > span:first-child { font: 600 .92rem "IBM Plex Sans Condensed", sans-serif; color: var(--ink-2); }
.g-new { color: var(--repair); display: inline-flex; gap: 5px; align-items: center; }
.g-cmd { display: flex; align-items: stretch; background: var(--ground-2); border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.g-cmd code { flex: 1; padding: 10px 14px; font-size: .98rem; white-space: pre-wrap; word-break: break-all; min-width: 0; }
.copy { display: inline-flex; align-items: center; gap: 6px; border: 0; border-left: 1px solid var(--rule); background: transparent; padding: 0 14px; cursor: pointer; color: var(--ink-2); font-size: .82rem; }
.copy:hover { background: var(--raise); color: var(--ink); }
.copy.ok { color: var(--pass); }
.g-why { margin: 8px 0 0; font-size: .88rem; color: var(--repair); }
.g-expect { margin: 10px 0 0; font-size: .92rem; color: var(--ink-2); }
.g-expect code { font-size: .86em; color: var(--ink); }
.lbl { font: 600 .78rem "IBM Plex Sans Condensed", sans-serif; color: var(--ink-3); margin-right: 6px; letter-spacing: .02em; }
.g-trouble { position: relative; margin-top: 10px; padding: 10px 14px; border-radius: 5px; background: var(--repair-t); border-left: 3px solid var(--repair); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; font-size: .9rem; }
.g-trouble .lbl { color: var(--repair); }
.g-trouble p { margin: 0; color: var(--ink); }
.g-sig-c { font-size: .82rem; color: var(--fail); word-break: break-word; }
.g-ev { position: absolute; right: 10px; top: 8px; font: 600 .72rem "IBM Plex Mono", monospace; color: var(--repair); text-decoration: none; }
.g-trouble.human { background: var(--human-t); border-left-color: var(--human); grid-template-columns: 1fr; }
.g-trouble.human .lbl { color: var(--human); display: inline-flex; gap: 5px; align-items: center; }
.g-sig { font-size: .82rem; color: var(--ink-2) !important; }
.g-finish { margin-top: 26px; padding: 16px 18px; border-radius: 6px; background: var(--pass-t); color: var(--pass); font-weight: 500; display: flex; gap: 10px; align-items: center; }

/* ------------------------------------------------------------ home */
.home { max-width: 1400px; margin: 0 auto; padding: 40px 32px 80px; }
.home-head h1 { font-size: 3rem; letter-spacing: -.02em; }
.home-head p { color: var(--ink-2); max-width: 64ch; margin: 10px 0 0; font-size: 1.05rem; }
.home-sec { margin-top: 38px; }
.home-sec h2 { font-size: 1.25rem; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; }
.audit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.audit-card { display: grid; gap: 10px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); text-decoration: none; }
.audit-card:hover { border-color: var(--ink-3); }
.ac-id { font: 500 .85rem "IBM Plex Mono", monospace; color: var(--ink-3); }
.ac-line { font: 600 1.4rem/1.15 "IBM Plex Sans Condensed", sans-serif; }
.ac-bar { display: flex; gap: 2px; height: 8px; }
.ac-bar i { border-radius: 2px; }
.ac-bar .v-verified { background: var(--pass); } .ac-bar .v-partial { background: var(--repair); } .ac-bar .v-failed { background: var(--fail); } .ac-bar .v-no-setup-docs { background: var(--nodocs, var(--ink-3)); } .ac-bar .v-pending { background: var(--rule); }
.ac-meta { font-size: .8rem; color: var(--ink-3); }
.runs { width: 100%; border-collapse: collapse; font-size: .95rem; }
.runs th { text-align: left; font: 500 .8rem "IBM Plex Sans", sans-serif; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.runs td { padding: 11px 12px; border-bottom: 1px solid var(--rule); }
.runs tr[data-href] { cursor: pointer; }
.runs tbody tr:hover td { background: var(--panel); }
.rr { text-decoration: none; font-weight: 500; }
.rr .org { color: var(--ink-3); font-weight: 400; }
.rid { color: var(--ink-3); font-size: .78rem; margin-left: 8px; }
.vchip { font: 700 .85rem "IBM Plex Sans Condensed", sans-serif; letter-spacing: .06em; }
.acts { text-align: right; white-space: nowrap; }
.acts a { margin-left: 14px; color: var(--ink-2); font-size: .88rem; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font-size: .85rem; font-weight: 500; }
.live-pill .ic { fill: currentColor; animation: pulse 1.2s infinite; }
.empty { border: 1px dashed var(--rule-2); border-radius: 6px; padding: 22px; color: var(--ink-2); }

/* ------------------------------------------------------------ keyframes */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: 1; } }
@keyframes pulse-bg { 50% { opacity: .45; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes scan { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@keyframes linkIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--fc, var(--live)); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes ppIn { from { transform: translateY(18px) rotate(1deg); opacity: 0; } }
@keyframes stamp { 0% { transform: scale(2.4) rotate(-2deg); opacity: 0; } 70% { opacity: .95; } 100% { transform: rotate(-13deg); opacity: .88; } }
@keyframes stampSmall { 0% { transform: scale(2) rotate(0); opacity: 0; } 100% { transform: rotate(-3deg); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1500px) {
  .pp-body { grid-template-columns: minmax(0, 1fr) 104px; }
  .pp-portrait { display: none; }
  .pp-stamp { margin-left: -30px; }
  .pp-stamp svg { width: 132px; height: 132px; }
  .passport { padding: 18px 18px 0; }
  .mrz { margin: 0 -18px; padding: 10px 18px 12px; font-size: .74rem; letter-spacing: .08em; }
  .au-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .run-head { grid-template-columns: auto minmax(0, 1fr); }
  .rh-gauges { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 1360px) {
  .chain { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .lnk::after { display: none; }
  .ev-link { flex-direction: row; gap: 8px; padding: 6px; }
  .bar-note { display: none; }
  .au-head { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 1100px) {
  .run-body { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; overflow: visible; }
  .au-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ev-grid { grid-template-columns: 1fr; overflow: auto; }
  .ev-pane pre { max-height: 40vh; }
  .run-head { grid-template-columns: 1fr; gap: 16px; }
  .agents { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .bar { padding: 0 16px; gap: 12px; }
  .crumbs { display: none; }
  .run-head, .agents, .run-body, .audit, .guide, .home { padding-left: 16px; padding-right: 16px; }
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { grid-template-columns: 0 22px minmax(0, 1fr); }
  .gut { display: none; }
  .step::before { left: 10px; }
  .tl-head, .diff-wrap { margin-left: 0; }
  .chain, .card-sub, pre.tail, details.log { margin-left: 0; }
  .chain { grid-template-columns: 1fr; }
  .cmd { white-space: normal; word-break: break-all; }
  .au-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .au-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-body { grid-template-columns: minmax(0, 1fr) 100px; }
  .pp-portrait { display: none; }
  .g-head { grid-template-columns: 1fr; }
  .guide h1 { font-size: 2rem; }
  .phase-track .ph span { font-size: .7rem; }
  .rh-repo { white-space: normal; }
  .drawer { width: 100vw; padding: 16px; }
  .runs th:nth-child(4), .runs td:nth-child(4) { display: none; }
}
@media (max-width: 460px) { .au-grid { grid-template-columns: 1fr; } }

/* Replay controls (?replay=): shown only while a recorded run is replayed */
#replay-bar { margin-bottom: 16px; }
.rp-control-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 10px 16px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 8px;
}
.rp-badge {
  display: flex; align-items: center; gap: 8px; color: var(--ink);
  font: 600 .8rem/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .06em;
}
.rp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.rp-dot.paused { background: var(--repair); }
.rp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-rp-toggle { min-width: 80px; font-weight: 600; }
.rp-speeds { display: flex; gap: 4px; padding: 3px; background: var(--raise); border: 1px solid var(--rule); border-radius: 6px; }
.btn-rp-speed {
  padding: 4px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 .8rem/1.2 "IBM Plex Mono", ui-monospace, monospace;
}
.btn-rp-speed:hover { color: var(--ink); }
.btn-rp-speed:focus-visible { outline: 2px solid var(--bob); outline-offset: 1px; }
.btn-rp-speed.active { background: var(--bob-t); color: var(--bob); font-weight: 600; }
.btn-rp-restart { font-size: .85rem; }
@media (prefers-reduced-motion: no-preference) {
  .rp-dot.playing { animation: rp-pulse 1.5s ease-in-out infinite; }
  .btn-rp-speed { transition: color .15s ease, background-color .15s ease; }
}
@keyframes rp-pulse { 50% { opacity: .4; transform: scale(.85); } }

/* Proof page: dark by default, black grounds (Karmanya, 27 Sep). Overrides theme.css's dark tokens for the app only;
   the landing's dark mode keeps its own palette. */
:root:not([data-theme="light"]) {
  --ground: #000000; --ground-2: #050505; --panel: #0d0d0d; --panel-2: #141414; --raise: #1b1b1b;
  --rule: #262626; --rule-2: #333333; --ink: #f2f2f2; --ink-2: #b3b3b3; --ink-3: #7a7a7a;
  --scrim: rgba(0, 0, 0, .7);
}
:root[data-theme="dark"] body, :root:not([data-theme]) body { background: #000; }
/* The HUMBLE wordmark (brand kit) in the header, in the current text colour. */
.brand svg.humble-logo { width: auto; height: 22px; fill: currentColor; }
