:root { --bg: #f6f6f4; --card: #fff; --ink: #1d1d1b; --muted: #6b6b66; --line: #e2e2dd; --accent: #1f5f8b; --ok: #2f7d32; --warn: #b07500; --bad: #b3261e;
  --on-accent: #fff; --soft: #eee; --ok-bg: #dff0df; --ok-line: #b7dbb7; --warn-bg: #fff0cc; --bad-bg: #f8dcdc; --accent-bg: #e6eef5;
  --button2-bg: #e9e9e4; --pre-bg: #f2f2ee; --env-bg: #fff3cd; --env-ink: #7a5a00; color-scheme: light; }
:root[data-theme="dark"] { --bg: #14151a; --card: #1c1e24; --ink: #e7e7e4; --muted: #9a9a95; --line: #2e313a; --accent: #6cb2e0; --ok: #79c47c; --warn: #e0a83c; --bad: #ef7d75;
  --on-accent: #10161c; --soft: #2a2d35; --ok-bg: #1f3524; --ok-line: #2f5c38; --warn-bg: #3a2f16; --bad-bg: #3d201e; --accent-bg: #1e2c39;
  --button2-bg: #2a2d35; --pre-bg: #22252c; --env-bg: #3a2f16; --env-ink: #e0a83c; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
header.top { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { font-weight: 600; color: var(--ink); text-decoration: none; }
header nav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
header nav a { color: var(--accent); text-decoration: none; }
header nav a.right { margin-left: auto; color: var(--muted); }
.env { font-size: .8rem; padding: .1rem .5rem; border-radius: 4px; background: var(--env-bg); color: var(--env-ink); }
main { max-width: 1400px; margin: 0 auto; padding: 1.2rem; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.card.narrow { max-width: 420px; margin: 4rem auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.2rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.error { color: var(--bad); }
label { display: block; margin: .6rem 0; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea { width: 100%; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
button { padding: .5rem 1rem; border: 0; border-radius: 6px; background: var(--accent); color: var(--on-accent); font: inherit; cursor: pointer; }
button.secondary { background: var(--button2-bg); color: var(--ink); }
form.inline { display: inline; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filters label { margin: 0; }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .8rem; background: var(--soft); }
.badge.in_scope { background: var(--ok-bg); color: var(--ok); } .badge.watch { background: var(--warn-bg); color: var(--warn); } .badge.out { background: var(--soft); color: var(--muted); }
.badge.unjudged { background: var(--accent-bg); color: var(--accent); }
.badge.liveness-live { background: var(--ok-bg); color: var(--ok); }
.badge.liveness-dead, .badge.liveness-error_page { background: var(--bad-bg); color: var(--bad); }
.badge.liveness-blocked, .badge.liveness-parked { background: var(--warn-bg); color: var(--warn); }
.badge.liveness-unknown { background: var(--soft); color: var(--muted); }
.pager { display: flex; gap: 1rem; margin-top: .8rem; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--pre-bg); padding: .6rem; border-radius: 6px; font-size: .85rem; }
.flash { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); padding: .5rem .8rem; border-radius: 6px; margin: 0 0 1rem; }
.tabs { display: flex; gap: 1rem; margin: 0 0 .8rem; flex-wrap: wrap; }
.tabs a { color: var(--accent); text-decoration: none; }
.tabs a.current { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.filters a { align-self: center; }
table.kv th { width: 9rem; white-space: nowrap; }
.small { font-size: .85rem; }
.big { font-size: 2rem; font-weight: 600; margin: 0; }
details summary { cursor: pointer; color: var(--accent); }
details pre { margin: .4rem 0 0; }
td form.inline button { padding: .25rem .6rem; font-size: .82rem; }
td form.inline button + button { margin-left: .2rem; }
td form.inline + form.inline { margin-left: .3rem; }
textarea { min-height: 4rem; }
.theme-toggle { margin-left: .8rem; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; line-height: 1.4; }
.theme-toggle:hover { color: var(--ink); }
/* ---- pipeline admin ---- */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #8e5bd6; --s6: #d63c8a; --grid: #ececE7; --tip-shadow: 0 6px 20px rgba(0, 0, 0, .12); --hint: #7a5a00; --hint-bg: #fff8e1; }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #a27fe0; --s6: #e06aa8; --grid: #262931; --tip-shadow: 0 6px 20px rgba(0, 0, 0, .5); --hint: #e0c470; --hint-bg: #2e2914; }

main { max-width: 1440px; }
a { color: var(--accent); }
h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
h1 .badge, h1 .pill { font-size: .8rem; font-weight: 500; }
h3 { font-size: .95rem; margin: .8rem 0 .4rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .82rem; }
.scroll-x { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.muted a { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: .4rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row .spacer, .spacer { flex: 1; }
.page-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .updated { color: var(--muted); font-size: .85rem; }
.lede { font-size: 1rem; margin: -.4rem 0 1.1rem; max-width: 72rem; color: var(--muted); }
.card { min-width: 0; overflow-x: auto; }
.card h2 .hint-inline { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: .5rem; }
.card-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.card-head .spacer { flex: 1; }
.card-head .sub { color: var(--muted); font-size: .85rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.2rem; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.cols > *, .cols-3 > * { min-width: 0; }
.cols .card, .cols-3 .card { margin-bottom: 0; }
section.cols, section.cols-3 { margin-bottom: 1.2rem; }
table td, table th { padding: .38rem .5rem; }
table.compact td, table.compact th { padding: .25rem .45rem; font-size: .86rem; }
table tr.clickable { cursor: pointer; }
table tr.clickable:hover td { background: var(--pre-bg); }
table tr.selected td { background: var(--accent-bg); }
td .sub, .sub { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
td.num .sub { white-space: nowrap; }
.zero { color: var(--muted); opacity: .5; }
.bar { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; }
.bar.big { height: 12px; }
.trend { color: var(--muted); font-size: .8rem; }

/* Buttons */
button.sm, a.sm, .btn { padding: .28rem .7rem; font-size: .84rem; border-radius: 6px; line-height: 1.4; }
a.btn, .btn { display: inline-block; text-decoration: none; background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer; font: inherit; font-size: .84rem; }
.btn.secondary, a.btn.secondary { background: var(--button2-bg); color: var(--ink); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.ok { background: var(--ok-bg); color: var(--ok); }
.btn:hover { filter: brightness(.96); }
button.ghost { background: transparent; color: var(--accent); padding: .22rem .3rem; }
button.ghost:hover { text-decoration: underline; }
.actions { margin-top: .6rem; }

/* Switches */
.switch { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .86rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 32px; height: 18px; border-radius: 9px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { left: 16px; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Status marks: icon + label, never colour alone */
.flag { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; font-size: .72rem; font-weight: 700; line-height: 1; flex: none; }
.flag.bad { background: var(--bad-bg); color: var(--bad); }
.flag.warn { background: var(--warn-bg); color: var(--warn); }
.flag.ok { background: var(--ok-bg); color: var(--ok); }
.flag.info, .flag.accent { background: var(--accent-bg); color: var(--accent); }
.flag.muted { background: var(--soft); color: var(--muted); }
.pill { display: inline-block; padding: .02rem .5rem; border-radius: 999px; font-size: .78rem; background: var(--soft); color: var(--muted); white-space: nowrap; line-height: 1.5; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.accent { background: var(--accent-bg); color: var(--accent); }
.pill.ink { background: var(--ink); color: var(--bg); }
.badge.running, .badge.open, .badge.live, .badge.verified, .badge.reviewed, .badge.done, .badge.ok, .badge.confirmed { background: var(--ok-bg); color: var(--ok); }
.badge.upcoming, .badge.candidate, .badge.draft, .badge.validated, .badge.paused, .badge.brand_only { background: var(--warn-bg); color: var(--warn); }
.badge.closed, .badge.withdrawn, .badge.cancelled, .badge.not_found, .badge.rejected, .badge.unresolved { background: var(--soft); color: var(--muted); }
.badge.failed, .badge.dead, .badge.blocked { background: var(--bad-bg); color: var(--bad); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .45rem; vertical-align: 1px; flex: none; }
.dot.s1 { background: var(--s1); } .dot.s2 { background: var(--s2); } .dot.s3 { background: var(--s3); } .dot.s4 { background: var(--s4); } .dot.s5 { background: var(--s5); } .dot.s6 { background: var(--s6); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.muted { background: var(--line); }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
table.wide { min-width: 1080px; }
td.why { max-width: 15rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem .75rem; display: flex; flex-direction: column; gap: .12rem; text-align: left; color: var(--ink); font: inherit; text-decoration: none; min-width: 0; }
a.tile:hover, button.tile:hover { border-color: var(--accent); }
.tile .label { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: .4rem; }
.tile .value { font-size: 1.7rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .value small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.tile .sub { font-size: .8rem; color: var(--muted); display: block; }
.tile .spark { margin-top: .25rem; }
.tile.bad { border-left: 4px solid var(--bad); } .tile.warn { border-left: 4px solid var(--warn); } .tile.ok { border-left: 4px solid var(--ok); }

/* Attention list */
.attn { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.attn-item { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: 8px; padding: .65rem .9rem; }
.attn-item.warn { border-left-color: var(--warn); }
.attn-item.info { border-left-color: var(--accent); }
.attn-item.ok { border-left-color: var(--ok); }
.attn-item h3 { margin: 0; font-size: .95rem; }
.attn-item p { margin: .15rem 0 0; font-size: .88rem; }
.attn-item .flag { margin-top: .1rem; }
.attn-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

/* Key-value lists */
dl.kv { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .2rem .9rem; font-size: .88rem; }
dl.kv dt { color: var(--muted); white-space: nowrap; }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
dl.kv dd.mono { font-size: .8rem; }

/* Relation chips (upstream / downstream of an entity) */
.relations { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 1rem; }
.relations a, .relations span.rel { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .85rem; }
.relations a:hover { border-color: var(--accent); color: var(--accent); }
.relations b { font-variant-numeric: tabular-nums; }
.relations .arrow { color: var(--muted); font-size: .8rem; padding: 0 .1rem; align-self: center; }
.relations .rel.here { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }

/* Hints */
.hint { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: .68rem; font-weight: 600; line-height: 1; cursor: help; vertical-align: 1px; margin-left: .3rem; background: transparent; padding: 0; font-family: inherit; }
.hint:hover, .hint:focus-visible { border-color: var(--accent); color: var(--accent); }
.tip { position: fixed; z-index: 40; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--tip-shadow); border-radius: 6px; padding: .5rem .7rem; font-size: .82rem; max-width: 360px; line-height: 1.45; }
.tip.hover { pointer-events: none; }
.tip b { display: block; margin-bottom: .15rem; }
.tip .t-row { display: flex; align-items: center; gap: .45rem; }
.tip .t-key { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.about { background: var(--hint-bg); border: 1px solid color-mix(in srgb, var(--hint) 35%, transparent); color: var(--ink); border-radius: 8px; padding: .6rem .9rem; margin: 0 0 1rem; font-size: .88rem; display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; }
.about .flag { background: var(--hint); color: var(--hint-bg); }
.about p { margin: 0; }
.about p + p { margin-top: .3rem; }
.about .close { background: none; color: var(--muted); padding: 0 .3rem; font-size: 1rem; line-height: 1; }
.about ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.about li { margin: .1rem 0; }
.glossary dt { font-weight: 600; margin-top: .5rem; }
.glossary dd { margin: 0; color: var(--muted); font-size: .88rem; }
.note { color: var(--muted); font-size: .82rem; margin: .5rem 0 0; }

/* Tabs */
.tabs { gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a, .tabs button { padding: .4rem .7rem; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.current, .tabs button.current, .tabs a[aria-current], .tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.tabs .n { color: var(--muted); margin-left: .3rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
a.chip, button.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .15rem .65rem; font-size: .84rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.chip .n { color: var(--muted); margin-left: .3rem; font-variant-numeric: tabular-nums; }
.chip.current, .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip.current .n, .chip[aria-pressed="true"] .n { color: inherit; opacity: .85; }
.filters-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .7rem; }
.filters-row select, .filters-row input[type=search], .filters-row input[type=text] { width: auto; min-width: 10rem; padding: .3rem .5rem; font-size: .88rem; background: var(--card); color: var(--ink); }
.filters-row input[type=search] { min-width: 14rem; }
.filters-row label { margin: 0; display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; }

/* Sparklines and small charts */
svg.spark { display: block; overflow: visible; }
svg.spark .base { stroke: var(--line); }
svg.spark .hit { fill: transparent; }
svg.spark .hit:hover + .sb, svg.spark .sb.hl { opacity: .7; }
.minibars { display: flex; align-items: flex-end; gap: 1px; height: 22px; }
.minibars span { flex: 1; background: var(--s1); min-width: 2px; border-radius: 1px 1px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }

/* Funnel / flow */
.flow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: .5rem; align-items: stretch; overflow-x: auto; padding-bottom: .3rem; }
.flow .step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem .7rem .95rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.flow .step:hover { border-color: var(--accent); }
.flow .step.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.flow .step .k { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: .35rem; }
.flow .step .v { font-size: 1.45rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.flow .step .s { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow .step .edge { position: absolute; left: -.35rem; top: 50%; transform: translateY(-50%); width: .7rem; height: .7rem; border-radius: 50%; background: var(--line); }
.flow .step .health { position: absolute; top: .5rem; right: .6rem; }
.flow .step.bad .health { color: var(--bad); }
.flow .step.warn .health { color: var(--warn); }


.empty { color: var(--muted); padding: .6rem 0; }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; background: var(--soft); display: inline-block; vertical-align: middle; }
.thumb.ph { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: .7rem; }
.kbd { font-family: ui-monospace, monospace; font-size: .75rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .8rem; padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { color: var(--muted); white-space: nowrap; }
.progress { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: center; font-size: .84rem; }
.progress .bar { grid-column: 1 / -1; }

@media (max-width: 720px) {
  main { padding: .8rem; }
  .attn-item { grid-template-columns: auto 1fr; }
  .attn-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .tile .value { font-size: 1.45rem; }
  .flow { grid-auto-columns: minmax(130px, 1fr); }
  dl.kv { grid-template-columns: 1fr; gap: 0 }
  dl.kv dt { margin-top: .4rem; }
}

/* The pipeline is the navigation: a slim header, then a sticky strip with one step per stage. */
header.top { gap: 1rem; padding: .45rem 1.2rem; flex-wrap: wrap; }
header.top nav { gap: .8rem; align-items: center; }
header.top nav a.util { color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
header.top nav a.util.current { color: var(--ink); font-weight: 600; }
header.top nav a.util .pill { font-size: .72rem; }
.search { position: relative; margin-left: auto; }
.search input { width: 20rem; padding: .35rem .6rem .35rem 1.9rem; font-size: .9rem; background: var(--bg); color: var(--ink); }
.search::before { content: "\2315"; position: absolute; left: .6rem; top: .3rem; color: var(--muted); font-size: 1rem; }
.search .results { position: absolute; top: 2.3rem; left: 0; width: 26rem; max-width: 92vw; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--tip-shadow); z-index: 20; overflow: hidden; }
.search .results a { display: grid; grid-template-columns: 6.5rem 1fr; gap: .6rem; padding: .4rem .7rem; color: var(--ink); text-decoration: none; font-size: .88rem; align-items: baseline; }
.search .results a .k { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.search .results a.active, .search .results a:hover { background: var(--accent-bg); }
.search .results .none { padding: .5rem .7rem; color: var(--muted); font-size: .86rem; }
.stagebar { position: sticky; top: 2.75rem; z-index: 1; background: var(--bg); padding: .55rem 1.2rem .35rem; border-bottom: 1px solid var(--line); }
.stagebar .flow { grid-auto-columns: minmax(120px, 1fr); gap: .35rem; max-width: 1440px; margin: 0 auto; }
.stagebar .flow .step { padding: .35rem .6rem .4rem .8rem; border-radius: 6px; }
.stagebar .flow .step .v { font-size: 1.05rem; }
.stagebar .flow .step .k { font-size: .7rem; }
.stagebar .flow .step .s { font-size: .72rem; }
.stagebar .flow .step .edge { width: .5rem; height: .5rem; left: -.28rem; }
.stagebar .flow .step.current { background: var(--accent-bg); }
.stage-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.2rem; align-items: start; }
.stage-card { position: sticky; top: 8.6rem; }
.stage-card .card { margin-bottom: .8rem; }
.stage-card h2 { font-size: .95rem; }
.stage-card p { font-size: .88rem; margin: 0 0 .5rem; }
.stage-card .updown { display: flex; flex-direction: column; gap: .35rem; font-size: .86rem; }
.stage-card .updown a { display: flex; gap: .5rem; align-items: baseline; color: var(--ink); text-decoration: none; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 6px; }
.stage-card .updown a:hover { border-color: var(--accent); }
.stage-card .updown a .dir { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; width: 5.2rem; flex: none; }
.stage-card .updown a b { font-variant-numeric: tabular-nums; }
.stage-card ul { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .85rem; }
.stage-card li { margin: .15rem 0; }
.crumbs { color: var(--muted); font-size: .85rem; margin: 0 0 .3rem; }
.crumbs a { color: var(--muted); }
.flow-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.flow-home .fstep { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem .75rem; text-decoration: none; color: var(--ink); }
.flow-home .fstep:hover { border-color: var(--accent); }
.flow-home .fstep > span { display: block; }
.flow-home .fstep .k { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; }
.flow-home .fstep .v { font-size: 1.6rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.flow-home .fstep .s { font-size: .78rem; color: var(--muted); min-height: 2.3em; }
.flow-home .fstep .delta { font-size: .78rem; color: var(--ok); margin-top: .25rem; display: block; }
.flow-home .fstep .delta.warn { color: var(--warn); }
.engine-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.engine-bar a { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .85rem; }
.engine-bar a:hover { border-color: var(--accent); }
.engine-bar a .k { color: var(--muted); font-size: .76rem; }
.engine-bar a b { font-size: 1.05rem; }

/* Small forms that sit inside a card or a table cell. */
form.line { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin: .4rem 0; }
form.line label { margin: 0; font-size: .84rem; color: var(--muted); display: flex; flex-direction: column; gap: .15rem; }
form.line input, form.line select, form.line textarea { width: auto; min-width: 7rem; padding: .3rem .5rem; font-size: .88rem; }
form.line input[type=number] { width: 7rem; min-width: 0; }
form.line input.wide, form.line textarea.wide { min-width: 22rem; }
form.line button { padding: .32rem .8rem; font-size: .86rem; }
form.switchform { display: inline; }
input[type=number], input[type=url] { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
input, select, textarea { background: var(--card); color: var(--ink); }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem 1.2rem; }
.controls .ctl { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; min-width: 0; }
.controls .ctl h3 { margin: 0 0 .2rem; font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.controls .ctl p { margin: 0 0 .4rem; font-size: .82rem; color: var(--muted); }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.setting:last-child { border-bottom: 0; }
.setting .what b { font-weight: 600; font-size: .92rem; }
.setting .what p { margin: .1rem 0 0; color: var(--muted); font-size: .82rem; }
.setting form { display: flex; gap: .4rem; align-items: center; }
.setting form input[type=number], .setting form input[type=text], .setting form select { width: 9rem; padding: .3rem .5rem; font-size: .88rem; }
.setting .unit { color: var(--muted); font-size: .8rem; }
.setting .changed { color: var(--muted); font-size: .76rem; grid-column: 1 / -1; }
details.more { margin-top: .5rem; }
details.more > summary { font-size: .86rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.cards .card { margin: 0; }
.site-card h3 { margin: 0 0 .2rem; font-size: 1rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.site-card .why { font-size: .82rem; color: var(--muted); margin: .2rem 0 .5rem; }
.anchor { scroll-margin-top: 9rem; }
.flash.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
@media (max-width: 1100px) { .stage-layout { grid-template-columns: 1fr; } .stage-card { position: static; } }
@media (max-width: 720px) { .search input { width: 9rem; } .stagebar { position: static; } header.top { position: static; } }
form.line label { max-width: 100%; min-width: 0; }
form.line select, form.line input, form.line textarea { max-width: 100%; }
.controls .ctl form.line label { flex: 1 1 8rem; }
.controls .ctl form.line select, .controls .ctl form.line input:not([type=checkbox]):not([type=hidden]) { width: 100%; min-width: 0; }
.stage-layout > * { min-width: 0; }
h1, .lede, .relations a, .relations .rel { overflow-wrap: anywhere; }
@media (max-width: 720px) { .relations a, .relations span.rel { white-space: normal; } .search { margin-left: 0; } }
