/* ==========================================================================
   checkpoint console: production-only additions to checkpoint.css.
   Built from tokens.css only (var(--cp-*)); no raw colour, radius, shadow,
   duration or easing. Each block names the component it extends. Small
   internal geometry may be literal, as in checkpoint.css. A block that turns
   out to be general belongs in checkpoint.css instead.
   ========================================================================== */

/* ---------- Renderer wrappers (lib/ui.js): a wrapper that adds no box ---------- */
.cp-h { display: contents; }

/* ---------- Data handed to CSS as custom properties (no presentational style="") ---------- */
/* Meter: fill and threshold ticks */
.cp-meter > i { width: var(--cp-fill, 0%); }
.cp-meter > b { left: var(--cp-at, 0%); }
/* Table: column widths come from the column model */
.cp-table col { width: var(--cp-col-w, auto); }
.cp-table col.cp-colw-rail { width: 10px; }
.cp-table col.cp-colw-check { width: 40px; }
.cp-table[data-auto] { table-layout: auto; }
.cp-table th .cp-sortmark { fill: none; stroke: currentColor; stroke-width: 1.5; }
/* Tooltip and menu: position computed from the anchor */
.cp-tip { left: var(--cp-x, 0); top: var(--cp-y, 0); }
.cp-menu-wrap { display: inline-flex; }
.cp-menu[data-fixed] { position: fixed; left: var(--cp-x, 0); top: var(--cp-y, auto); bottom: var(--cp-yb, auto); }
.cp-menu .cp-menu-gap { width: var(--cp-icon); flex: none; }
/* Split pane: the fixed pane's width */
.cp-pane[data-fixed] { width: var(--cp-pane-w); }
/* Lane flow: grid placement of heads, labels and cells */
.cp-lanes-head { grid-column: var(--cp-col, 1) / span var(--cp-span, 1); }
.cp-lanes-corner { position: sticky; left: 0; z-index: 3; background: var(--cp-bg-0); padding: 0 var(--cp-gutter); border-right: var(--cp-hair) solid var(--cp-line-2); }
.cp-lanes-label, .cp-lanes-cell { grid-row: var(--cp-row, auto); }
.cp-lanes-cell { grid-column: var(--cp-col, auto); }

/* ---------- Staggered motion: the index comes from document order ---------- */
.cp-flow-step:nth-child(1), .cp-stake:nth-child(1), .cp-stakes-lg > button:nth-child(1), .cp-skel tr:nth-child(1) { --i: 0; }
.cp-flow-step:nth-child(2), .cp-stake:nth-child(2), .cp-stakes-lg > button:nth-child(2), .cp-skel tr:nth-child(2) { --i: 1; }
.cp-flow-step:nth-child(3), .cp-stake:nth-child(3), .cp-stakes-lg > button:nth-child(3), .cp-skel tr:nth-child(3) { --i: 2; }
.cp-flow-step:nth-child(4), .cp-stake:nth-child(4), .cp-stakes-lg > button:nth-child(4), .cp-skel tr:nth-child(4) { --i: 3; }
.cp-flow-step:nth-child(5), .cp-stake:nth-child(5), .cp-stakes-lg > button:nth-child(5), .cp-skel tr:nth-child(5) { --i: 4; }
.cp-flow-step:nth-child(6), .cp-stake:nth-child(6), .cp-stakes-lg > button:nth-child(6), .cp-skel tr:nth-child(6) { --i: 5; }
.cp-flow-step:nth-child(7), .cp-stake:nth-child(7), .cp-stakes-lg > button:nth-child(7), .cp-skel tr:nth-child(7) { --i: 6; }
.cp-flow-step:nth-child(8), .cp-stake:nth-child(8), .cp-stakes-lg > button:nth-child(8), .cp-skel tr:nth-child(8) { --i: 7; }
.cp-flow-step:nth-child(9) { --i: 8; } .cp-flow-step:nth-child(10) { --i: 9; }
.cp-flow-step:nth-child(11) { --i: 10; } .cp-flow-step:nth-child(12) { --i: 11; }
.cp-flow-step:nth-child(n+13) { --i: 12; }
.cp-stakes-lg > button .cp-stake { --i: inherit; }

/* ---------- Shell: account menu in the sidebar foot; collapsed foot stacks ---------- */
.cp-who-role { font-size: var(--cp-fs-label); }
.cp-app[data-sidebar="collapsed"] .cp-side-foot { flex-direction: column; height: auto; gap: var(--cp-s-1); padding: var(--cp-s-2) 0 var(--cp-s-3); }
.cp-iconbtn[disabled] { color: var(--cp-ink-4); cursor: not-allowed; }
.cp-iconbtn[disabled]:hover { background: transparent; color: var(--cp-ink-4); }
/* Refreshing: the sweep sits on the top edge of the sheet */
.cp-sweep-top { position: absolute; left: 0; right: 0; top: 0; z-index: var(--cp-z-sticky); }
.cp-banner-top { margin-top: var(--cp-s-3); }
/* Breadcrumb: a long current item (a session id) truncates instead of running under the top-bar controls */
.cp-crumbs { flex: 0 1 auto; overflow: hidden; }
.cp-crumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cp-top-right { flex: none; padding-left: var(--cp-s-3); }
/* The route outlet holds one page; a page's own root is a .cp-page too */
#cp-page:focus-visible { outline-offset: -2px; }


/* ---------- Login (BLUEPRINT 8.8): the form sits where page content sits after sign-in ---------- */
.cp-login { height: 100vh; overflow: auto; background: var(--cp-frame); padding: 14vh var(--cp-gutter) var(--cp-s-12) calc(var(--cp-sidebar-w) + var(--cp-s-1)); }
.cp-login-col { width: 360px; max-width: 100%; display: grid; gap: var(--cp-s-5); justify-items: start; }
.cp-login-col > .cp-form, .cp-login-col > .cp-btn { width: 100%; }
.cp-login-col > .cp-form > .cp-btn { justify-self: stretch; }
.cp-login-brand { display: flex; align-items: center; gap: var(--cp-s-3); color: var(--cp-ink-1); }
.cp-login h1 { font-family: var(--cp-font-display); font-size: var(--cp-fs-page); line-height: 36px; font-weight: var(--cp-fw-bold); letter-spacing: var(--cp-tracking-tight); margin-top: var(--cp-s-6); }
.cp-login-msg { display: flex; align-items: flex-start; gap: var(--cp-s-2); color: var(--cp-ink-2); font-size: var(--cp-fs-body); line-height: var(--cp-lh-body); }
.cp-login-msg .cp-icon { margin-top: 3px; }
.cp-login-msg[data-kind="error"] { color: var(--cp-ink-1); font-weight: var(--cp-fw-semibold); padding: var(--cp-s-3) var(--cp-s-4); border: var(--cp-rule) solid var(--cp-ink-1); border-radius: var(--cp-r-1); width: 100%; }
.cp-login-pass { display: flex; align-items: center; gap: var(--cp-s-3); }
.cp-login-pass .cp-input { flex: 1; }
.cp-linkbtn { color: var(--cp-accent); border-radius: var(--cp-r-xs); }
.cp-linkbtn:hover { color: var(--cp-accent-strong); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .cp-login { padding-left: var(--cp-gutter); } }
/* first paint and a failed session check: frame colour, content where the sheet will be */
.cp-boot { height: 100vh; background: var(--cp-frame); padding-left: var(--cp-sidebar-w); padding-top: var(--cp-bar-h); }

/* ---------- Dialog: typed confirm, shortcuts list ---------- */
.cp-typed-name { color: var(--cp-ink-1); }
.cp-kv[data-cols="keys"] { grid-template-columns: 200px minmax(0, 1fr); }
.cp-kv[data-cols="keys"] dt { gap: 3px; }
.cp-kv[data-cols="keys"] dd > span { white-space: normal; color: var(--cp-ink-1); }
.cp-keys-label { margin-bottom: var(--cp-s-1); }
.cp-help-switch { color: var(--cp-ink-1); flex-wrap: wrap; }
.cp-palette li[aria-disabled="true"] { cursor: default; }

/* ---------- Drawer: context line, shortcut keycap inside the primary action ---------- */
.cp-drawer-context { margin-top: var(--cp-s-2); }
.cp-section > p + p, .cp-section > .cp-flow + p { margin-top: var(--cp-s-3); }
.cp-btn[data-kind="primary"] .cp-kbd { background: transparent; border-color: currentColor; color: inherit; }
.cp-tabs[data-flush] { padding: 0; }

/* ---------- Detail head ---------- */
.cp-detailhead-main { min-width: 0; }
.cp-detailhead h1.cp-detail-mono { font-family: var(--cp-font-mono); }

/* ---------- Pipeline progress (COMPONENTS 12) ---------- */
.cp-pipeline-status { display: flex; align-items: center; gap: var(--cp-s-4); padding: var(--cp-s-2) 0; min-width: 0; }
.cp-progress { flex: 0 0 260px; height: 5px; border-radius: 3px; overflow: hidden; background: var(--cp-line-2); position: relative; }
.cp-progress > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--cp-fill, 0%); background: var(--cp-ink-1); transition: width var(--cp-t-2) var(--cp-ease); }
.cp-progress-sweep { flex: 0 0 260px; }

/* ---------- Loading state: skeleton rows in the proportions of a list ---------- */
.cp-skel td:nth-child(1) { width: 76px; } .cp-skel td:nth-child(1) > span { width: 52px; }
.cp-skel td:nth-child(2) { width: 94px; } .cp-skel td:nth-child(2) > span { width: 60px; }
.cp-skel td:nth-child(3) { width: 230px; } .cp-skel td:nth-child(3) > span { width: calc(120px + var(--i, 0) * 22px); }
.cp-skel td:nth-child(4) > span { width: calc(60% - var(--i, 0) * 9%); }

/* ---------- Timeline row: tool names are machine data ---------- */
.cp-tl-name { color: var(--cp-ink-1); }

/* ---------- List row: tags that stay at the end of line 1 (CpLines #tags) ---------- */
.cp-l1[data-tags] { display: flex; align-items: center; gap: var(--cp-s-2); }
.cp-l1[data-tags] > .cp-tag { flex: none; }

/* ---------- Captured content (CpCaptured): evidence with masking and audited reveal ---------- */
.cp-captured { display: grid; gap: var(--cp-s-2); min-width: 0; }
.cp-captured + .cp-captured, .cp-gap-top { margin-top: var(--cp-s-3); }
.cp-evidence-head .cp-btn { height: 26px; }
.cp-evidence-empty { padding: var(--cp-s-3) var(--cp-s-4); color: var(--cp-ink-3); font-family: var(--cp-font-ui); font-size: var(--cp-fs-meta); }
.cp-captured > .cp-error { display: flex; align-items: center; gap: 6px; color: var(--cp-ink-1); font-weight: var(--cp-fw-semibold); font-size: var(--cp-fs-meta); }
.cp-captured > .cp-error .cp-icon { width: 14px; height: 14px; flex: none; }

/* ---------- Facts: a value with a second line (LLM score and its explanation) ---------- */
.cp-kv dd > span.cp-fact-score { display: grid; gap: 2px; white-space: normal; padding: var(--cp-s-1) 0; overflow: visible; }
.cp-kv dd > span.cp-fact-score > span { white-space: normal; }
.cp-kv dd > .cp-status, .cp-kv dd > .cp-sev { flex: none; overflow: visible; }

/* ---------- Alert detail (pages/alerts.js): flow host, gate panel ---------- */
.cp-flow-host { padding-bottom: var(--cp-s-2); overflow-x: auto; }
.cp-gatepanel { border-top: var(--cp-hair) solid var(--cp-line-2); }
.cp-gatepanel:focus-visible, [role="tabpanel"]:focus-visible { outline-offset: -2px; }
.cp-gatebody { gap: var(--cp-s-3); }
/* a link inside a sentence is told apart by more than colour (WCAG 1.4.1) */
.cp-prose a { text-decoration: underline; text-underline-offset: 3px; }
.cp-nowrap { white-space: nowrap; }
.cp-grow { flex: 1; }
.cp-section > ul + p, .cp-section > ol + p { margin-top: var(--cp-s-2); }

/* ---------- Sessions (pages/sessions.js): turn strip cell, lane flow block, timeline, event pane ---------- */
.cp-turnline { display: flex; align-items: center; gap: var(--cp-s-2); line-height: 22px; height: 22px; }
.cp-session-flow { flex: none; border-bottom: var(--cp-hair) solid var(--cp-line-2); }
.cp-session-flow .cp-lanes { max-height: 34vh; }
/* sticky lane labels stay above the marks and wires that scroll under them */
.cp-lanes-label { z-index: 4; }
.cp-lanes-corner { z-index: 5; }
.cp-tl-what > .cp-tag { flex: none; }
.cp-tl-turnname { width: 96px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-tl-row[data-quiet] { color: var(--cp-ink-3); }
.cp-tl-rule { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-eventpane { background: var(--cp-bg-1); }
.cp-eventpane > .cp-tabs { flex: none; }
.cp-pane-title { font-size: var(--cp-fs-title); overflow: hidden; text-overflow: ellipsis; }
.cp-section.cp-section-first { border-top: 0; }
.cp-section > .cp-sweepbar { margin-top: var(--cp-s-3); }
.cp-touched code, .cp-list-row > code.cp-trunc { min-width: 0; }
.cp-chip .cp-icon { width: 14px; height: 14px; }

/* ---------- Overview (pages/overview.js): two columns under the enforcement path ---------- */
.cp-ovw-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.cp-ovw-col { min-width: 0; }
.cp-ovw-col + .cp-ovw-col { border-left: var(--cp-hair) solid var(--cp-line-2); }
.cp-ovw-sentence { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cp-ink-2); }
.cp-ovw-note { padding-top: var(--cp-s-3); }
@media (max-width: 1100px) { .cp-ovw-cols { grid-template-columns: minmax(0, 1fr); } .cp-ovw-col + .cp-ovw-col { border-left: 0; } }

/* ==========================================================================
   Component gallery (pages/gallery.js): layout of the page itself
   ========================================================================== */
.cpg-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); flex: 1; min-height: 0; border-top: var(--cp-hair) solid var(--cp-line-2); }
.cpg-toc { border-right: var(--cp-hair) solid var(--cp-line-2); overflow: auto; padding: var(--cp-s-3) 0; }
.cpg-toc .cp-nav-item { padding-left: var(--cp-s-4); display: block; overflow: hidden; text-overflow: ellipsis; }
.cpg-sec > .cp-panehead { background: var(--cp-bg-0); position: sticky; top: 0; z-index: 5; }
.cpg-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.cpg-ex { padding: var(--cp-s-4) var(--cp-gutter) var(--cp-s-5); border-bottom: var(--cp-hair) solid var(--cp-line-1); border-right: var(--cp-hair) solid var(--cp-line-1); min-width: 0; }
.cpg-ex[data-wide] { grid-column: 1 / -1; }
.cpg-demo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cp-s-3); margin-top: var(--cp-s-3); min-width: 0; }
.cpg-demo > .cp-table, .cpg-demo > .cp-tabs, .cpg-demo > .cp-toolbar, .cpg-demo > .cp-tablefoot, .cpg-demo > .cp-banner,
.cpg-demo > .cp-evidence, .cpg-demo > .cp-form, .cpg-demo > .cp-tl, .cpg-demo > .cp-lanes, .cpg-demo > .cp-pipeline, .cpg-demo > .cp-loading, .cpg-fill { width: 100%; min-width: 0; }
.cpg-demo > .cp-banner { margin: 0; }
.cpg-demo > .cp-state { padding: var(--cp-s-4) 0; }
.cpg-frame { border: var(--cp-hair) solid var(--cp-line-2); }
.cpg-sws { display: flex; flex-wrap: wrap; gap: var(--cp-s-3); width: 100%; }
.cpg-sw { width: 136px; display: grid; gap: 2px; }
.cpg-sw i { display: block; height: 48px; border-radius: var(--cp-r-1); border: var(--cp-hair) solid var(--cp-line-2); margin-bottom: var(--cp-s-1); background: var(--cpg-c); }
.cpg-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-column: 1 / -1; }
.cpg-icons > div { display: flex; align-items: center; gap: var(--cp-s-2); height: 36px; padding: 0 var(--cp-gutter); border-bottom: var(--cp-hair) solid var(--cp-line-1); color: var(--cp-ink-1); }
.cpg-icons code { color: var(--cp-ink-3); }
.cpg-keys { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cp-s-5); padding: var(--cp-s-4) var(--cp-gutter); }
.cpg-scale { display: grid; gap: var(--cp-s-2); width: 100%; }
.cpg-scale > div { display: flex; align-items: baseline; gap: var(--cp-s-4); min-width: 0; }
.cpg-scale code:first-child { width: 120px; flex: none; color: var(--cp-ink-3); }
.cpg-scale span { line-height: 1.3; min-width: 0; }
.cpg-t-page { font-size: var(--cp-fs-page); font-weight: var(--cp-fw-bold); font-family: var(--cp-font-display); letter-spacing: var(--cp-tracking-tight); }
.cpg-t-drawer { font-size: var(--cp-fs-drawer); font-weight: 650; font-family: var(--cp-font-display); }
.cpg-detail-title { font-family: var(--cp-font-display); font-size: 26px; line-height: 32px; font-weight: var(--cp-fw-bold); letter-spacing: var(--cp-tracking-tight); }
.cpg-t-title { font-size: var(--cp-fs-title); font-weight: var(--cp-fw-semibold); }
.cpg-t-lead { font-size: var(--cp-fs-lead); }
.cpg-t-body { font-size: var(--cp-fs-body); }
.cpg-t-dense { font-size: var(--cp-fs-dense); }
.cpg-t-label { font-size: var(--cp-fs-label); color: var(--cp-ink-3); font-weight: var(--cp-fw-medium); white-space: pre; }
.cpg-row { display: flex; align-items: center; gap: var(--cp-s-4); min-width: 0; }
.cpg-row[data-gap="wide"] { gap: var(--cp-s-6); flex-wrap: wrap; }
.cpg-row[data-align="end"] { align-items: flex-end; gap: var(--cp-s-5); }
.cpg-cap { display: grid; gap: var(--cp-s-2); justify-items: center; }
.cpg-name { width: 120px; }
.cpg-rails { display: flex; gap: var(--cp-s-3); height: 28px; }
.cpg-w-200 { width: 200px; display: flex; } .cpg-w-200 > * { flex: 1; }
.cpg-w-240 { width: 240px; } .cpg-w-420 { width: 420px; max-width: 100%; } .cpg-w-440 { width: 440px; max-width: 100%; } .cpg-w-600 { width: 600px; max-width: 100%; }
.cpg-split { height: 220px; width: 100%; border: var(--cp-hair) solid var(--cp-line-2); }
.cpg-pad { padding: var(--cp-s-4) var(--cp-gutter); }
.cpg-gap-top { margin-top: var(--cp-s-2); }
/* row states that only a pointer or the keyboard can produce, shown side by side */
.cp-table tbody tr.cpg-hover { background: var(--cp-bg-1); }
.cp-table tbody tr.cpg-cursor { background: var(--cp-bg-1); outline: var(--cp-rule) solid var(--cp-accent); outline-offset: -2px; }
@media (max-width: 1100px) { .cpg-body, .cpg-keys { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .cpg-wrap { grid-template-columns: minmax(0, 1fr); } .cpg-toc { display: none; } }

/* ---------- Stage 4: AI inventory, Devices, one device ---------- */
/* Form dialog (CpFormDialog) and the one-time secret (CpSecretDialog) */
.cp-dialog.cp-dialog-wide { width: 640px; }
.cp-form-dialog { display: grid; gap: var(--cp-s-4); }
.cp-secret { background: var(--cp-bg-0); border: var(--cp-hair) solid var(--cp-line-2); border-radius: var(--cp-r-1); padding: var(--cp-s-3) var(--cp-s-4); }
.cp-secret code { overflow-wrap: anywhere; user-select: all; }
/* Table helpers: right-aligned action cells, centred gate columns, fixed columns by width class */
.cp-end { justify-content: flex-end; }
.cp-center { text-align: center; }
.cp-ink { color: var(--cp-ink-1); }
.cp-indent { padding-left: var(--cp-s-6); }
.cp-pad { padding: var(--cp-s-3) var(--cp-gutter); }
.cp-caption { padding: var(--cp-s-2) var(--cp-gutter) 0; margin: 0; }
.cp-table col.cp-w-80 { width: 80px; } .cp-table col.cp-w-90 { width: 90px; } .cp-table col.cp-w-100 { width: 100px; } .cp-table col.cp-w-110 { width: 110px; }
.cp-table col.cp-w-120 { width: 120px; } .cp-table col.cp-w-130 { width: 130px; } .cp-table col.cp-w-150 { width: 150px; } .cp-table col.cp-w-160 { width: 160px; }
.cp-table col.cp-w-190 { width: 190px; } .cp-table col.cp-w-200 { width: 200px; } .cp-table col.cp-w-220 { width: 220px; }
.cp-table col.cp-col-tool { width: 200px; } .cp-table col.cp-col-result { width: 230px; }
.cp-table-fixed { table-layout: fixed; }
.cp-table td.cp-cov-cell { padding: 0; }
.cp-table tbody tr.cp-grouprow th { position: static; background: var(--cp-bg-1); color: var(--cp-ink-1); font-weight: var(--cp-fw-semibold); text-align: left; }
.cp-risk-num { width: 22px; text-align: right; }
/* Device page: risk figure, risk line, config blocks */
.cp-risk-big { font-family: var(--cp-font-display); font-size: var(--cp-fs-page); font-weight: var(--cp-fw-bold); line-height: 1; }
.cp-riskline { width: 100%; height: 56px; margin-top: var(--cp-s-2); }
.cp-riskline-tick { stroke: var(--cp-line-3); stroke-dasharray: 2 4; fill: none; }
.cp-riskline-path { stroke: var(--cp-ink-1); stroke-width: 1.5; fill: none; }
.cp-form-block { max-width: 760px; padding: var(--cp-s-4) var(--cp-gutter); }
.cp-form-wide { max-width: none; }
.cp-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--cp-s-2); }
.cp-fieldset legend { padding: 0; margin-bottom: var(--cp-s-2); font-weight: var(--cp-fw-semibold); color: var(--cp-ink-1); }
.cp-pre { background: var(--cp-bg-0); border: var(--cp-hair) solid var(--cp-line-2); border-radius: var(--cp-r-1); padding: var(--cp-s-3); max-height: 26rem; overflow: auto; white-space: pre-wrap; color: var(--cp-ink-2); }
.cp-details { margin-top: var(--cp-s-3); }
.cp-details > summary { cursor: pointer; color: var(--cp-ink-2); }
/* Menu: a long list (every device of a fleet) scrolls instead of leaving the window */
.cp-menu[data-fixed] { max-height: min(60vh, 420px); overflow-y: auto; }
/* Palisade pages (Stage 5): the scan report's bands and split, the finding rows, file list, forms, save bar */
.cp-pal-pad { padding: var(--cp-s-3) var(--cp-gutter); }
.cp-pal-legend { white-space: nowrap; }
.cp-pal-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cp-s-2) var(--cp-s-4); padding: var(--cp-s-2) var(--cp-gutter) var(--cp-s-3); color: var(--cp-ink-2); min-width: 0; flex: none; border-bottom: var(--cp-hair) solid var(--cp-line-2); }
.cp-pal-facts > code.cp-trunc { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-pal-detail > .cp-detail-main { display: flex; flex-direction: column; }
.cp-pal-band { flex: none; border-bottom: var(--cp-hair) solid var(--cp-line-2); }
.cp-pal-band .cp-panehead { border-bottom: 0; }
.cp-pal-strip { max-width: 820px; }
.cp-split.cp-pal-split { min-height: 440px; }
.cp-pal-pane { background: var(--cp-bg-1); }
.cp-pal-tab { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cp-tl-row.cp-pal-frow { grid-template-columns: 20px 76px minmax(0, 1fr) minmax(0, 120px); cursor: pointer; }
.cp-tl-row.cp-pal-frow .cp-tl-what > code { max-width: none; flex: 0 1 auto; }
.cp-tl-row.cp-pal-frow > .cp-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.cp-pal-class { font-size: var(--cp-fs-micro); font-weight: var(--cp-fw-semibold); color: var(--cp-ink-2); letter-spacing: 0.02em; }
.cp-pal-class[data-v="block"] { color: var(--cp-block); }
.cp-pal-panel { border: var(--cp-hair) solid var(--cp-line-2); border-radius: var(--cp-r-1); margin-top: var(--cp-s-3); overflow: hidden; }
.cp-pal-panel > .cp-panehead { background: var(--cp-bg-2); padding: 0 var(--cp-s-4); }
.cp-pal-panel > .cp-pal-pad { padding: var(--cp-s-3) var(--cp-s-4); margin: 0; }
.cp-pal-finding { padding: var(--cp-s-2) var(--cp-s-4) var(--cp-s-3); border-top: var(--cp-hair) solid var(--cp-line-1); display: grid; gap: var(--cp-s-2); min-width: 0; }
.cp-pal-finding-head { display: flex; align-items: center; gap: var(--cp-s-3); min-height: var(--cp-row-compact); min-width: 0; }
.cp-pal-finding-head > code.cp-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 45%; }
.cp-pal-finding > p { margin: 0; }
.cp-pal-list { margin: 0; padding-left: var(--cp-s-5); display: grid; gap: var(--cp-s-1); max-height: 14rem; overflow: auto; }
.cp-pal-list code { overflow-wrap: anywhere; }
.cp-pal-caprow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cp-s-2); margin: 0 0 var(--cp-s-2); }
.cp-pal-caprow > .cp-dim { width: 84px; flex: none; }
a.cp-tag:hover { color: var(--cp-ink-1); border-color: var(--cp-line-3); }
.cp-pal-files { list-style: none; margin: 0; padding: 0; }
.cp-pal-file { display: flex; align-items: center; gap: var(--cp-s-3); width: 100%; min-height: var(--cp-row-compact); padding: 0 var(--cp-gutter); text-align: left; border-bottom: var(--cp-hair) solid var(--cp-line-1); min-width: 0; }
.cp-pal-file:hover { background: var(--cp-bg-1); }
.cp-pal-file[aria-pressed="true"] { background: var(--cp-bg-2); }
.cp-pal-file > code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cp-ink-1); }
.cp-pal-form { padding: var(--cp-s-4) var(--cp-gutter) var(--cp-s-6); max-width: 760px; }
.cp-pal-block { border: 0; padding: 0; margin: 0; display: grid; gap: var(--cp-s-3); min-width: 0; }
.cp-pal-block > legend { padding: 0; margin-bottom: var(--cp-s-2); }
.cp-input.cp-pal-num { width: 110px; }
.cp-pal-savebar { display: flex; align-items: center; gap: var(--cp-s-3); flex: none; min-height: 56px; padding: 0 var(--cp-gutter); border-top: var(--cp-hair) solid var(--cp-line-3); background: var(--cp-bg-2); }
.cp-wrap { flex-wrap: wrap; }
.cp-pal-form .cp-seg { justify-self: start; }
.cp-table col.cp-w-80 { width: 80px; }

/* Stage 6 settings pages (scoring, managed settings, API keys, extension): extends .cp-meter with a width for
   the two-threshold meter, and the JSON editor / diff panes. */
.cp-meter[data-wide] { display: block; width: 100%; max-width: 360px; height: 5px; }
.cp-set-editor { font-family: var(--cp-font-mono); font-size: var(--cp-fs-mono-m); line-height: 1.5; min-height: 220px; width: 100%; resize: vertical; }
.cp-set-diff { margin: 0; padding: var(--cp-s-3); border: var(--cp-hair) solid var(--cp-line-2); border-radius: var(--cp-r-2); max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-set-diff > [data-d="add"] { color: var(--cp-ink-1); font-weight: 600; }
.cp-set-diff > [data-d="del"] { color: var(--cp-ink-3); text-decoration: line-through; }
.cp-status[data-strike] { text-decoration: line-through; }
.cp-steps { margin: 0; padding-left: var(--cp-s-5); display: grid; gap: var(--cp-s-2); color: var(--cp-ink-2); }

/* Stage 6 Policy > Rules (pages/rules.js): tester and builder panes, drag-to-reorder markers on .cp-table rows,
   the 30-day hit bars of the rule drawer, builder drafts. */
.cp-rules-pane { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: var(--cp-s-4); padding: var(--cp-s-4) var(--cp-gutter) var(--cp-s-5); }
.cp-rules-pane > .cp-row { flex-wrap: wrap; }
.cp-rules-pane .cp-textarea { width: 100%; }
.cp-rules-plist { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--cp-s-2); }
.cp-rules-note { padding: var(--cp-s-3) var(--cp-gutter); }
.cp-rules-grip[draggable="true"] { cursor: grab; }
.cp-table tbody tr[data-drop="above"] { box-shadow: inset 0 2px 0 var(--cp-accent); }
.cp-table tbody tr[data-drop="below"] { box-shadow: inset 0 -2px 0 var(--cp-accent); }
.cp-table tbody tr[data-dragging] { opacity: 0.5; }
.cp-rules-days { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.cp-rules-days > i { flex: 1; min-height: 2px; height: var(--cp-fill, 0%); background: var(--cp-ink-3); }
.cp-rules-draft { display: grid; gap: var(--cp-s-3); padding: var(--cp-s-4) 0; }
.cp-rules-draft .cp-pre { margin: 0; }

/* ---------- Stage 6: Install and connect, Users, Tenants ---------- */
/* Install tab: the path of one enrollment as five marks (reached = ink, running = accent, not reached = hollow) */
.cp-pathstrip { display: inline-flex; align-items: center; gap: var(--cp-s-1); height: 18px; vertical-align: middle; }
.cp-pathstrip i { width: 10px; height: 8px; border-radius: 1px; box-sizing: border-box; border: var(--cp-hair) solid var(--cp-ink-3); background: transparent; }
.cp-pathstrip i[data-r="1"] { background: var(--cp-ink-1); border-color: var(--cp-ink-1); }
.cp-pathstrip i[data-r="run"] { background: linear-gradient(90deg, var(--cp-ink-2) 50%, transparent 50%); border-color: var(--cp-ink-2); }
/* one-time panel and a command block inside a section */
.cp-secret .cp-pre { margin-bottom: var(--cp-s-3); }
.cp-section > .cp-pre, .cp-section > .cp-row, .cp-section > .cp-form { max-width: 960px; }
.cp-details > .cp-pre { margin-top: var(--cp-s-3); }

/* Stage 6 policy pages (hooks, runtime, destinations): the reorder grip of the hook rule list extends .cp-iconbtn,
   the drop marker extends .cp-table rows while a rule is dragged; .cp-pad indents a line above a table. */
.cp-grip { cursor: grab; letter-spacing: -0.2em; font-size: var(--cp-fs-mono-m); width: var(--cp-s-6); }
.cp-grip[data-dragging] { cursor: grabbing; }
.cp-table tbody tr[data-drop="before"] { box-shadow: inset 0 2px 0 var(--cp-accent); }
.cp-table tbody tr[data-drop="after"] { box-shadow: inset 0 -2px 0 var(--cp-accent); }
.cp-pad { padding: var(--cp-s-2) var(--cp-s-4) 0; margin: 0; }
/* a link inside a sentence is underlined (WCAG 1.4.1: not told apart by colour alone) */
.cp-error a, .cp-faint a, .cp-dim a, .cp-hint a { text-decoration: underline; text-underline-offset: 3px; }

/* Alert "Why this fired" (pages/alert-why.js): the plain-language lead, then the module table, the rationale and the related list */
.cp-why-lead { font-size: var(--cp-fs-body); color: var(--cp-ink-1); margin-bottom: var(--cp-s-3); }
.cp-why .cp-table { margin: var(--cp-s-3) 0; }
.cp-why .cp-table tr[data-fired="yes"] td { background: var(--cp-bg-1); }
.cp-why-sub { font-size: var(--cp-fs-label); font-weight: var(--cp-fw-semibold); color: var(--cp-ink-2); margin-bottom: var(--cp-s-2); }

/* Inventory drawer "Where it lives" (pages/inventory-locations.js): the device rows and the path rows under the gates flow */
.cp-inv-loc-panel { margin-top: var(--cp-s-3); }
.cp-inv-loc-row { padding: var(--cp-s-2) 0; border-top: var(--cp-hair) solid var(--cp-line-2); display: grid; gap: var(--cp-s-1); }
.cp-inv-loc-row:first-child { border-top: 0; }
.cp-inv-loc-path { overflow-wrap: anywhere; }
.cp-inv-loc-row[data-state="not_in_latest_report"] .cp-inv-loc-path { color: var(--cp-ink-3); }
/* Alerts: Runtime | Operational switch above the status tabs */
.cp-alerts-cat { display: flex; align-items: center; gap: var(--cp-s-4, 16px); flex-wrap: wrap; margin: 0 0 var(--cp-s-3, 12px); }
.cp-alerts-cat p { margin: 0; }

/* ---------- Overview, 2026-11-29 refresh (owner's pick "A"): raised panes on the sheet, KPI strip,
   activity chart, latest-activity list. Tokens only; data reaches CSS as --cp-* properties. ---------- */
[data-page="overview"] .cp-pagehead .cp-actions { align-items: center; }
.ov-scroll { padding: 0 0 var(--cp-s-12); }
.ov-wrap { padding: var(--cp-s-2) var(--cp-gutter) 0; display: flex; flex-direction: column; gap: var(--cp-s-5); }
.ov-pane { background: var(--cp-bg-1); border: var(--cp-hair) solid var(--cp-line-2); border-radius: var(--cp-r-2); box-shadow: inset 0 var(--cp-hair) 0 var(--cp-sheen); min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.ov-pane-head { display: flex; align-items: center; gap: var(--cp-s-3); min-height: 56px; padding: 0 var(--cp-s-5); border-bottom: var(--cp-hair) solid var(--cp-line-1); min-width: 0; }
.ov-pane-head h2 { font-size: var(--cp-fs-body); font-weight: var(--cp-fw-semibold); white-space: nowrap; }
.ov-pane-sub { padding: var(--cp-s-3) var(--cp-s-5) 0; }
.ov-sp { flex: 1; }
.ov-pane-body { padding: var(--cp-s-4) var(--cp-s-5) var(--cp-s-5); }
.ov-pane .cp-table thead th:first-child, .ov-pane .cp-table tbody td:first-child { padding-left: var(--cp-s-5); }
.ov-link { color: var(--cp-accent); font-size: var(--cp-fs-dense); white-space: nowrap; }
.ov-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--cp-r-xs); background: var(--cp-bg-3); color: var(--cp-ink-2); font-size: var(--cp-fs-micro); font-weight: var(--cp-fw-semibold); }
.ov-empty { padding-top: var(--cp-s-3); }
.ov-g2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--cp-s-5); }
.ov-g3 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--cp-s-5); align-items: start; }
.ov-stack { display: flex; flex-direction: column; gap: var(--cp-s-5); min-width: 0; }
@media (max-width: 1280px) { .ov-g2, .ov-g3 { grid-template-columns: minmax(0, 1fr); } }

/* Live toggle: a control, so it may carry the accent; the ring is still in reduced motion */
.ov-live { display: inline-flex; align-items: center; gap: var(--cp-s-2); height: var(--cp-control-h); padding: 0 var(--cp-s-3); border-radius: var(--cp-r-1);
  border: var(--cp-hair) solid var(--cp-line-2); background: var(--cp-bg-1); color: var(--cp-ink-1); font-weight: var(--cp-fw-semibold); white-space: nowrap; }
.ov-live:hover { background: var(--cp-bg-2); border-color: var(--cp-line-3); }
.ov-live .cp-faint { font-weight: var(--cp-fw-regular); }
.ov-live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--cp-ink-3); }
.ov-live[aria-pressed="true"] .ov-live-dot { background: var(--cp-accent); }
.ov-live[aria-pressed="true"] .ov-live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: var(--cp-hair) solid var(--cp-accent); animation: ov-ping var(--cp-sweep) var(--cp-ease) infinite; }
@keyframes ov-ping { from { transform: scale(.6); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ov-live-dot::after { animation: none !important; opacity: .5; } }

/* KPI strip: one pane, cells divided by hairlines (not a card grid); each cell opens its list */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex-direction: row; }
.ov-kpi { position: relative; padding: var(--cp-s-5) var(--cp-s-5) 0; display: flex; flex-direction: column; gap: var(--cp-s-1); min-width: 0; overflow: hidden; color: inherit;
  transition: background var(--cp-t-1) var(--cp-ease); }
.ov-kpi:hover { background: var(--cp-bg-2); text-decoration: none; color: inherit; }
.ov-kpi:focus-visible { outline-offset: -2px; }
.ov-kpi + .ov-kpi { border-left: var(--cp-hair) solid var(--cp-line-1); }
.ov-kpi-wide { grid-column: span 3; padding-bottom: var(--cp-s-5); }
.ov-kpi-label { display: flex; align-items: center; gap: var(--cp-s-2); color: var(--cp-ink-2); font-size: var(--cp-fs-dense); font-weight: var(--cp-fw-medium); white-space: nowrap; }
.ov-kpi-label .cp-icon { color: var(--cp-ink-3); }
.ov-kpi-range { margin-left: auto; font-weight: var(--cp-fw-regular); font-size: var(--cp-fs-meta); }
.ov-kpi-num { font-family: var(--cp-font-display); font-size: 38px; line-height: 46px; font-weight: var(--cp-fw-bold); letter-spacing: var(--cp-tracking-tight); font-variant-numeric: var(--cp-numeric); color: var(--cp-ink-1); }
.ov-kpi-num small { font-size: 20px; color: var(--cp-ink-3); font-weight: var(--cp-fw-semibold); margin-left: var(--cp-s-1); }
.ov-kpi[data-v="block"] .ov-kpi-num { color: var(--cp-block); }
.ov-kpi[data-v="warn"] .ov-kpi-num { color: var(--cp-warn); }
.ov-delta { display: flex; align-items: center; gap: var(--cp-s-2); font-size: var(--cp-fs-meta); color: var(--cp-ink-3); min-width: 0; }
.ov-delta b { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: var(--cp-r-xs); background: var(--cp-bg-3); color: var(--cp-ink-1); font-weight: var(--cp-fw-semibold); font-variant-numeric: var(--cp-numeric); }
.ov-delta b[data-dir="up"]::before { content: "\25B2"; font-size: 8px; }
.ov-delta b[data-dir="down"]::before { content: "\25BC"; font-size: 8px; }
.ov-spark { display: block; width: calc(100% + 2 * var(--cp-s-5)); height: 46px; margin: var(--cp-s-3) calc(-1 * var(--cp-s-5)) 0; }
.ov-spark-line { fill: none; stroke: var(--cp-ink-2); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ov-spark-area { fill: var(--cp-ink-1); opacity: .06; }
.ov-spark[data-v="block"] .ov-spark-line { stroke: var(--cp-block); } .ov-spark[data-v="block"] .ov-spark-area { fill: var(--cp-block); opacity: .14; }
.ov-spark[data-v="warn"] .ov-spark-line { stroke: var(--cp-warn); } .ov-spark[data-v="warn"] .ov-spark-area { fill: var(--cp-warn); opacity: .12; }
.ov-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: var(--cp-s-3); padding-bottom: var(--cp-s-5); align-items: center; }
.ov-dots i { width: 14px; height: 14px; border-radius: 3px; background: var(--cp-ink-2); }
.ov-dots i[data-off] { background: transparent; box-shadow: inset 0 0 0 var(--cp-hair) var(--cp-ink-3); }

/* Activity chart: HTML columns so labels never stretch; prompts and tool calls stacked, blocks and warns as marks */
.ov-chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 var(--cp-s-2); }
.ov-yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 300px; text-align: right; color: var(--cp-ink-3); font-size: var(--cp-fs-micro); font-family: var(--cp-font-mono); margin-top: -6px; margin-bottom: -6px; }
.ov-plot { position: relative; height: 300px; display: flex; align-items: stretch; gap: 3px; border-bottom: var(--cp-hair) solid var(--cp-line-3);
  background: linear-gradient(to bottom, var(--cp-line-1) var(--cp-hair), transparent var(--cp-hair)) 0 0 / 100% 25%; border-radius: var(--cp-r-xs); }
.ov-plot:focus-visible { outline-offset: 4px; }
.ov-col { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-radius: 4px 4px 0 0; }
.ov-col:hover { text-decoration: none; }
.ov-col > i { display: block; width: 100%; }
.ov-col > i.t { height: calc(var(--cp-h1) * 100%); background: var(--cp-ink-4); border-radius: 3px 3px 0 0; transition: background var(--cp-t-1) var(--cp-ease); }
.ov-col > i.h { height: calc(var(--cp-h2) * 100%); background: var(--cp-ink-3); }
.ov-col > i.ov-mark { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-bottom: 3px; box-shadow: 0 0 0 2px var(--cp-bg-1); }
.ov-mark[data-v="block"] { background: var(--cp-block); } .ov-mark[data-v="warn"] { background: var(--cp-warn); }
.ov-col[data-hover]::before { content: ""; position: absolute; inset: 0 -1px; background: var(--cp-accent-wash); border-radius: 4px; z-index: 0; }
.ov-col > * { position: relative; z-index: 1; }
.ov-col[data-hover] > i.t { background: var(--cp-ink-3); }
.ov-col[data-hover] > i.h { background: var(--cp-ink-2); }
.ov-xaxis { grid-column: 2; display: flex; gap: 3px; color: var(--cp-ink-3); font-size: var(--cp-fs-micro); font-family: var(--cp-font-mono); padding-top: var(--cp-s-2); }
.ov-xaxis span { flex: 1; min-width: 0; white-space: nowrap; overflow: visible; }
.ov-legend { display: flex; gap: var(--cp-s-4); color: var(--cp-ink-2); font-size: var(--cp-fs-meta); white-space: nowrap; }
.ov-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ov-legend i, .ov-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--cp-ink-4); }
.ov-legend i[data-k="h"], .ov-key[data-k="h"] { background: var(--cp-ink-3); }
.ov-legend i[data-k="w"], .ov-key[data-k="w"] { background: var(--cp-warn); box-shadow: none; border-radius: 50%; }
.ov-legend i[data-k="b"], .ov-key[data-k="b"] { background: var(--cp-block); box-shadow: none; border-radius: 50%; }
.ov-tip { position: absolute; z-index: 3; top: var(--cp-s-2); left: calc(var(--cp-x) * 100%); min-width: 230px; padding: var(--cp-s-3) var(--cp-s-4); border-radius: var(--cp-r-2);
  background: var(--cp-bg-2); box-shadow: var(--cp-shadow-pop); font-size: var(--cp-fs-dense); pointer-events: none; transform: translateX(var(--cp-s-4)); }
.ov-tip[data-side="left"] { transform: translateX(calc(-100% - var(--cp-s-4))); }
.ov-tip h4 { font-family: var(--cp-font-mono); font-size: var(--cp-fs-mono-s); color: var(--cp-ink-3); font-weight: var(--cp-fw-regular); margin-bottom: var(--cp-s-2); white-space: nowrap; }
.ov-tip dl { display: grid; grid-template-columns: 1fr auto; gap: var(--cp-s-1) var(--cp-s-4); margin: 0; }
.ov-tip dt { display: flex; align-items: center; gap: 6px; color: var(--cp-ink-2); }
.ov-tip dd { text-align: right; margin: 0; font-variant-numeric: var(--cp-numeric); font-weight: var(--cp-fw-semibold); }
.ov-tip-foot { margin-top: var(--cp-s-2); padding-top: var(--cp-s-2); border-top: var(--cp-hair) solid var(--cp-line-2); color: var(--cp-accent); font-size: var(--cp-fs-meta); }

/* Latest activity: rows arrive from upstream (the top) and settle */
.ov-stream { list-style: none; margin: 0; padding: 0; overflow: auto; }
.ov-ev { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px var(--cp-s-3); align-items: center; padding: 10px var(--cp-s-5); border-bottom: var(--cp-hair) solid var(--cp-line-1); }
.ov-ev:last-child { border-bottom: 0; }
.ov-ev:hover { background: var(--cp-bg-2); }
.ov-ev[data-new] { background: linear-gradient(90deg, var(--cp-accent-wash), transparent 70%); animation: ov-in var(--cp-t-2) var(--cp-ease) both; }
@keyframes ov-in { from { opacity: 0; transform: translateY(calc(-1 * var(--cp-travel))); } }
.ov-ev .ov-vt { grid-row: span 2; } .ov-ev .ov-vt > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ov-ev .ov-vt i { width: 26px; height: 26px; border-radius: 7px; } .ov-ev .ov-vt svg { width: 13px; height: 13px; }
.ov-ev-line1 { display: flex; gap: var(--cp-s-2); align-items: baseline; min-width: 0; white-space: nowrap; }
.ov-ev-line1 .cp-strong { flex: none; color: var(--cp-ink-1); }
.ov-ev-line2 { grid-column: 2; color: var(--cp-ink-2); font-size: var(--cp-fs-mono-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ov-ev time { justify-self: end; color: var(--cp-ink-3); font-size: var(--cp-fs-mono-s); white-space: nowrap; }
.ov-ev .ov-rule { justify-self: end; font-size: var(--cp-fs-meta); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-ev[data-v="block"] .ov-rule { color: var(--cp-block); } .ov-ev[data-v="warn"] .ov-rule { color: var(--cp-warn); }

/* Ranked bars (AI tools) */
.ov-rank { list-style: none; margin: 0; padding-top: var(--cp-s-1); }
.ov-rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--cp-s-3); padding: 9px 0; }
.ov-rank li + li { border-top: var(--cp-hair) solid var(--cp-line-1); }
.ov-rank .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cp-ink-1); }
.ov-rank .vl { text-align: right; font-family: var(--cp-font-mono); font-size: var(--cp-fs-mono-s); color: var(--cp-ink-2); }
.ov-rank .br { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--cp-bg-3); overflow: hidden; }
.ov-rank .br > i { display: block; height: 100%; width: calc(var(--cp-fill) * 100%); background: var(--cp-ink-2); border-radius: 2px; }

/* the enforcement path inside its pane */
.ov-path .cp-flow-host { padding: var(--cp-s-4) var(--cp-s-5) var(--cp-s-3); }
.ov-path .cp-gatepanel { border-top-color: var(--cp-line-1); }
.ov-path .cp-gatepanel .cp-panehead, .ov-path .cp-gatepanel .cp-block-body { padding-left: var(--cp-s-5); padding-right: var(--cp-s-5); }

/* ---------- Session graph and trace (2026-11-29, owner's pick: both, switchable). One selection with the
   timeline and the event pane; verdict colour only on blocked and asked steps. ---------- */
#session-view .cp-panehead .cp-seg { margin-left: var(--cp-s-3); }
.cp-sgraph, .cp-strace { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--cp-line-2) transparent; }
.cp-sgraph { padding: var(--cp-s-4) var(--cp-gutter); display: flex; flex-direction: column; gap: var(--cp-s-3);
  background: radial-gradient(circle, var(--cp-line-1) 1px, transparent 1.2px) 0 0 / 22px 22px; }
.cp-sgraph-turn { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--cp-s-4); padding: var(--cp-s-3) var(--cp-s-4); border-radius: var(--cp-r-2);
  border: var(--cp-hair) dashed var(--cp-line-2); background: var(--cp-bg-0); }
.cp-sgraph-turn[data-v="block"] { border-color: var(--cp-block-wash); }
.cp-sgraph-head { display: flex; flex-direction: column; gap: 2px; padding-top: var(--cp-s-2); }
.cp-sgraph-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--cp-s-3) 26px; min-width: 0; }
.cp-sg-node { position: relative; display: flex; align-items: center; gap: var(--cp-s-2); width: 168px; height: 52px; padding: 0 var(--cp-s-3) 0 var(--cp-s-2); text-align: left;
  border-radius: 12px; background: var(--cp-bg-2); border: var(--cp-hair) solid var(--cp-line-2); color: var(--cp-ink-1);
  transition: border-color var(--cp-t-1) var(--cp-ease), background var(--cp-t-1) var(--cp-ease); }
.cp-sg-node::before { content: ""; position: absolute; right: 100%; top: 50%; width: 26px; border-top: var(--cp-rule) solid var(--cp-line-3); }
.cp-sgraph-body > .cp-sg-node:first-child::before, .cp-sgraph-sub > .cp-sg-node:first-of-type::before { display: none; }
.cp-sg-node:hover { border-color: var(--cp-line-3); background: var(--cp-bg-3); }
.cp-sg-node:focus-visible { outline-offset: 2px; }
.cp-sg-node[aria-pressed="true"] { border-color: var(--cp-accent); box-shadow: 0 0 0 var(--cp-rule) var(--cp-accent-dim); }
.cp-sg-node[data-reached="false"] { border-style: dashed; background: transparent; color: var(--cp-ink-2); }
.cp-sg-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--cp-bg-3); color: var(--cp-ink-2); }
.cp-sg-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: var(--cp-icon-stroke); stroke-linecap: square; }
.cp-sg-node[data-lane="prompt"] .cp-sg-ic, .cp-strace-row[data-lane="prompt"] .cp-sg-ic { background: var(--cp-accent-wash); color: var(--cp-accent); }
.cp-sg-node[data-lane="response"] .cp-sg-ic, .cp-strace-row[data-lane="response"] .cp-sg-ic { background: var(--cp-bg-1); box-shadow: inset 0 0 0 var(--cp-hair) var(--cp-line-3); }
.cp-sg-node[data-v="warn"] { border-color: var(--cp-warn); background: var(--cp-warn-wash); }
.cp-sg-node[data-v="block"] { border-color: var(--cp-block); background: var(--cp-block-wash); }
.cp-sg-node[data-v="warn"] .cp-sg-ic, .cp-strace-row[data-v="warn"] .cp-sg-ic { background: var(--cp-warn); color: var(--cp-on-warn); }
.cp-sg-node[data-v="block"] .cp-sg-ic, .cp-strace-row[data-v="block"] .cp-sg-ic { background: var(--cp-block); color: var(--cp-on-block); }
.cp-sg-node[data-v="block"]::before { border-top-color: var(--cp-block); } .cp-sg-node[data-v="warn"]::before { border-top-color: var(--cp-warn); }
.cp-sg-tx { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.cp-sg-tx b { font-weight: var(--cp-fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sg-tx span { font-family: var(--cp-font-mono); font-size: var(--cp-fs-micro); color: var(--cp-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sg-rule { position: absolute; left: var(--cp-s-2); top: calc(100% + 4px); max-width: 160px; padding: 0 6px; border-radius: var(--cp-r-xs); border: var(--cp-hair) solid currentColor;
  background: var(--cp-bg-1); font-family: var(--cp-font-mono); font-size: var(--cp-fs-micro); line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sg-node[data-v="block"] .cp-sg-rule { color: var(--cp-block); } .cp-sg-node[data-v="warn"] .cp-sg-rule { color: var(--cp-warn); }
.cp-sg-node:has(.cp-sg-rule) { margin-bottom: 22px; }
.cp-sgraph-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--cp-s-3) 26px; padding: var(--cp-s-3) var(--cp-s-3) var(--cp-s-3) var(--cp-s-3);
  border-radius: var(--cp-r-1); border: var(--cp-hair) dashed var(--cp-line-3); }
.cp-sgraph-sublabel { flex-basis: 100%; }
.cp-sgraph-sub .cp-sg-node::before { border-top-style: dashed; }

.cp-strace { padding-bottom: var(--cp-s-3); }
.cp-strace-axis, .cp-strace-row { display: grid; grid-template-columns: minmax(260px, 38%) minmax(0, 1fr) 84px; align-items: center; }
.cp-strace-axis { position: sticky; top: 0; z-index: 2; height: 34px; padding: 0 var(--cp-gutter); background: var(--cp-bg-0); border-bottom: var(--cp-hair) solid var(--cp-line-1); }
.cp-strace-axis > .cp-label:last-child { text-align: right; }
.cp-strace-ticks { position: relative; height: 100%; }
.cp-strace-ticks span { position: absolute; top: 10px; left: calc(var(--cp-x) * 100%); transform: translateX(-50%); font-family: var(--cp-font-mono); font-size: var(--cp-fs-micro); color: var(--cp-ink-3); white-space: nowrap; }
.cp-strace-ticks span:first-child { transform: none; } .cp-strace-ticks span:last-child { transform: translateX(-100%); }
.cp-strace-turn { display: flex; gap: var(--cp-s-3); align-items: baseline; padding: var(--cp-s-3) var(--cp-gutter) var(--cp-s-1); border-top: var(--cp-hair) solid var(--cp-line-1); min-width: 0; }
.cp-strace-row { width: 100%; height: var(--cp-row-compact); padding: 0 var(--cp-gutter); text-align: left; color: var(--cp-ink-1); }
.cp-strace-row:hover { background: var(--cp-bg-2); }
.cp-strace-row:focus-visible { outline-offset: -2px; }
.cp-strace-row[aria-pressed="true"] { background: var(--cp-bg-3); box-shadow: inset var(--cp-rule) 0 0 var(--cp-accent); }
.cp-strace-row[data-reached="false"] { color: var(--cp-ink-3); }
.cp-strace-name { display: flex; align-items: center; gap: var(--cp-s-2); min-width: 0; padding-left: calc(var(--cp-depth) * 24px); white-space: nowrap; }
.cp-strace-name .cp-sg-ic { width: 22px; height: 22px; border-radius: 6px; } .cp-strace-name .cp-sg-ic svg { width: 12px; height: 12px; }
.cp-strace-name b { font-weight: var(--cp-fw-semibold); }
.cp-strace-track { position: relative; height: 100%; background: linear-gradient(90deg, var(--cp-line-1) var(--cp-hair), transparent var(--cp-hair)) 0 0 / 25% 100%; }
.cp-strace-bar { position: absolute; top: 10px; height: 14px; left: calc(var(--cp-x) * 100%); width: max(4px, calc(var(--cp-w) * 100%)); border-radius: 4px; background: var(--cp-ink-3); }
.cp-strace-row[data-lane="prompt"] .cp-strace-bar { background: var(--cp-accent); }
.cp-strace-row[data-lane="sub"] .cp-strace-bar { background: repeating-linear-gradient(135deg, var(--cp-ink-3) 0 4px, var(--cp-bg-3) 4px 8px); }
.cp-strace-row[data-v="warn"] .cp-strace-bar { background: var(--cp-warn); } .cp-strace-row[data-v="block"] .cp-strace-bar { background: var(--cp-block); }
.cp-strace-rule { position: absolute; top: 8px; left: calc((var(--cp-x) + var(--cp-w)) * 100% + 8px); font-family: var(--cp-font-mono); font-size: var(--cp-fs-micro); white-space: nowrap; }
.cp-strace-rule[data-side="left"] { left: auto; right: calc((1 - var(--cp-x)) * 100% + 8px); }
.cp-strace-row[data-v="warn"] .cp-strace-rule { color: var(--cp-warn); } .cp-strace-row[data-v="block"] .cp-strace-rule { color: var(--cp-block); }
.cp-strace-len { text-align: right; color: var(--cp-ink-3); font-size: var(--cp-fs-mono-s); }
@media (prefers-reduced-motion: reduce) { .cp-sg-node { transition: none; } }

/* CpPulse: the Overview's KPI strip, smaller, between a list's head and its toolbar */
.cp-pulse { margin: 0 var(--cp-gutter) var(--cp-s-4); flex: none; }
.ov-kpi-sm .ov-kpi-num { font-size: 28px; line-height: 34px; }
.ov-kpi-sm .ov-spark { height: 34px; margin-top: var(--cp-s-2); }
.ov-spark-gap { display: block; height: calc(34px + var(--cp-s-2)); }

/* the session view fills the page; its details open in the drawer */
#session-view { flex: 1; min-height: 0; display: flex; flex-direction: column; border-bottom: 0; }
#session-view > .cp-lanes { flex: 1; max-height: none; }
#session-view .cp-panehead .cp-btn { flex: none; }
[data-page="session"] .cp-drawer .cp-drawer-head .cp-tabs { border-bottom: 0; }

/* Empty-state art (generated with Higgsfield, 2026-11-29; local files, drawn through a mask so the colour is a token) */
.cp-art { display: block; flex: none; width: 220px; aspect-ratio: 1344 / 752; background: var(--cp-ink-3); opacity: .7;
  -webkit-mask: var(--cp-art) center / contain no-repeat; mask: var(--cp-art) center / contain no-repeat; }
.cp-art[data-art="gates"] { --cp-art: url("/static/console/art/gates.svg"); }
.cp-art[data-art="graph"] { --cp-art: url("/static/console/art/graph.svg"); }
.cp-art[data-art="tray"] { --cp-art: url("/static/console/art/tray.svg"); }
.cp-art[data-art="devices"] { --cp-art: url("/static/console/art/devices.svg"); }
.cp-art[data-art="inventory"] { --cp-art: url("/static/console/art/inventory.svg"); }
.cp-art[data-art="palisade"] { --cp-art: url("/static/console/art/palisade.svg"); }
.cp-art[data-art="crawler"] { --cp-art: url("/static/console/art/crawler.svg"); }
.cp-art[data-art="rules"] { --cp-art: url("/static/console/art/rules.svg"); }
.cp-art[data-art="webhooks"] { --cp-art: url("/static/console/art/webhooks.svg"); }
.cp-art[data-art="keys"] { --cp-art: url("/static/console/art/keys.svg"); }
.cp-art[data-art="audit"] { --cp-art: url("/static/console/art/audit.svg"); }
.cp-art[data-art="deploy"] { --cp-art: url("/static/console/art/deploy.svg"); }
.cp-art[data-art="search"] { --cp-art: url("/static/console/art/search.svg"); }
.cp-state .cp-art { margin-bottom: var(--cp-s-2); }
.ov-allclear { display: flex; flex-direction: column; align-items: center; gap: var(--cp-s-3); padding: var(--cp-s-8) var(--cp-s-5); text-align: center; }
.cp-state:has(.cp-art) { grid-template-columns: 220px minmax(0, 460px); align-items: center; }
.cp-sg-review { margin-left: var(--cp-s-2); padding: 0 5px; border-radius: var(--cp-r-xs); background: var(--cp-bg-3); color: var(--cp-ink-2); font-size: var(--cp-fs-micro); font-weight: var(--cp-fw-semibold); }

/* the session's details: a docked side panel (the head and the view stay reachable) */
.cp-session-body { flex: 1; min-height: 0; display: flex; }
.cp-session-body > #session-view { min-width: 0; }
.cp-session-side { flex: none; width: min(560px, 46%); display: flex; flex-direction: column; min-height: 0; background: var(--cp-bg-1);
  border-left: var(--cp-hair) solid var(--cp-line-2); box-shadow: -24px 0 48px -24px var(--cp-scrim); animation: cp-side-in var(--cp-t-3) var(--cp-ease) both; }
@keyframes cp-side-in { from { transform: translateX(var(--cp-travel)); opacity: 0; } }
.cp-session-side-head { display: flex; align-items: center; gap: var(--cp-s-1); min-height: var(--cp-bar-h); padding: 0 var(--cp-s-3) 0 var(--cp-s-4); border-bottom: var(--cp-hair) solid var(--cp-line-2); }
.cp-session-side-head .cp-tabs { border-bottom: 0; }
.cp-session-side-body { flex: 1; min-height: 0; overflow: auto; }

/* CpFlow cards (2026-11-29, the Overview as in mockup A): each step a card on a dashed path; a gate tile,
   its name, its state and the range's blocks and warns. Same buttons, roles and keys as the flow. */
.cp-flow[data-cards] { gap: var(--cp-s-3); padding: var(--cp-s-1) 2px var(--cp-s-2); }
.cp-flow[data-cards] .cp-flow-step { position: relative; flex: 1 1 0; min-width: 128px; display: grid; grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto auto auto auto;
  align-content: start; align-items: center; gap: 6px 10px; padding: var(--cp-s-3) var(--cp-s-4) var(--cp-s-4); text-align: left;
  border-radius: var(--cp-r-2); background: var(--cp-bg-0); border: var(--cp-hair) solid var(--cp-line-2); box-shadow: none; }
.cp-flow[data-cards] .cp-flow-step:hover { background: var(--cp-bg-2); border-color: var(--cp-line-3); }
.cp-flow[data-cards] .cp-flow-step[aria-selected="true"] { border-color: var(--cp-accent); box-shadow: 0 0 0 var(--cp-hair) var(--cp-accent-dim); background: var(--cp-bg-2); }
.cp-flow[data-cards] .cp-flow-step[data-v="block"], .cp-flow[data-cards] .cp-flow-step[data-v="warn"] { flex-grow: 1; }
.cp-flow[data-cards] .cp-flow-step:not(:last-child)::after { content: ""; position: absolute; left: 100%; top: 23px; width: var(--cp-s-3); border-top: var(--cp-rule) dashed var(--cp-line-3); }
.cp-flow[data-cards] .cp-flow-gate { grid-row: 1; grid-column: 1; width: 24px; height: 24px; border-radius: 7px; background: var(--cp-bg-3); --cp-gate-gap: 6px; }
.cp-flow[data-cards] .cp-flow-gate::before { display: none; }
.cp-flow[data-cards] .cp-flow-gate i:first-child { top: 4px; height: calc(50% - 4px - var(--cp-gate-gap) / 2); }
.cp-flow[data-cards] .cp-flow-gate i:last-child { bottom: 4px; height: calc(50% - 4px - var(--cp-gate-gap) / 2); }
.cp-flow[data-cards] .cp-flow-step[data-v="closed"] .cp-flow-gate i:first-child, .cp-flow[data-cards] .cp-flow-step[data-v="block"] .cp-flow-gate i:first-child { top: 4px; height: calc(100% - 8px); }
.cp-flow[data-cards] .cp-flow-step[data-kind="station"] .cp-flow-gate i:first-child { top: 50%; height: 10px; }
.cp-flow[data-cards] .cp-flow-nth { grid-row: 1; grid-column: 2; font-family: var(--cp-font-mono); font-size: var(--cp-fs-micro); color: var(--cp-ink-3); }
.cp-flow[data-cards] .cp-flow-name { grid-row: 2; grid-column: 1 / -1; align-self: start; padding: var(--cp-s-1) 0 0; font-size: var(--cp-fs-body); line-height: var(--cp-lh-dense); }
.cp-flow[data-cards] .cp-flow-meta { grid-row: 3; grid-column: 1 / -1; padding: 0; font-family: var(--cp-font-ui); font-size: var(--cp-fs-meta); line-height: 17px; }
.cp-flow[data-cards] .cp-flow-counts { grid-row: 4; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px var(--cp-s-3); padding-top: 2px; font-family: var(--cp-font-mono); font-size: var(--cp-fs-mono-s); white-space: nowrap; }
.cp-flow-counts [data-v="block"] { color: var(--cp-block); } .cp-flow-counts [data-v="warn"] { color: var(--cp-warn); }
.cp-flow-counts .cp-faint { font-family: var(--cp-font-ui); font-size: var(--cp-fs-meta); white-space: normal; }
/* the selected gate's panel, compact: sentence and facts on the left, its actions on the right */
.ov-path .cp-gatepanel .cp-panehead { min-height: 48px; }
.ov-path .cp-gatebody { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--cp-s-2) var(--cp-s-6); align-items: start; padding-top: var(--cp-s-3); padding-bottom: var(--cp-s-4); }
.ov-path .cp-gatebody > * { margin: 0; }
.ov-path .cp-gatebody > .cp-prose { grid-column: 1; }
.ov-path .cp-gatebody > .cp-kv { grid-column: 1; display: flex; flex-wrap: wrap; column-gap: var(--cp-s-2); }
.ov-path .cp-gatebody > .cp-kv dt { min-height: 24px; } .ov-path .cp-gatebody > .cp-kv dt::after { content: ":"; }
.ov-path .cp-gatebody > .cp-kv dd { min-height: 24px; margin-right: var(--cp-s-4); color: var(--cp-ink-1); }
.ov-path .cp-gatebody > .cp-row { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; }
.cp-flow[data-cards] .cp-flow-step { justify-items: start; text-align: left; }
.cp-flow[data-cards] .cp-flow-name, .cp-flow[data-cards] .cp-flow-meta { justify-self: start; text-align: left; }
#overview-attention .cp-ovw-sentence { white-space: normal; overflow: visible; line-height: var(--cp-lh-dense); padding: var(--cp-s-2) 0; }

/* the session's numbers under its head (approved mockup) */
#session-kpis { margin: var(--cp-s-4) var(--cp-gutter); flex: none; grid-template-columns: repeat(6, minmax(0, 1fr)); }
#session-kpis .ov-kpi { padding-bottom: var(--cp-s-4); }
#session-kpis .ov-kpi:hover { background: transparent; }
#session-view > .cp-panehead > .cp-dim { flex: 1 1 0; min-width: 0; }
#session-view > .cp-panehead > .cp-seg { flex: none; }
.cp-strace-track { overflow: hidden; }
.cp-session-body:has(.cp-session-side) .cp-strace-ticks span:nth-child(2n) { display: none; }
.cp-session-body:has(.cp-session-side) .cp-strace-axis, .cp-session-body:has(.cp-session-side) .cp-strace-row { grid-template-columns: minmax(200px, 42%) minmax(0, 1fr) 64px; }

/* a folded run of same-tool steps: a stacked card, "Bash x9"; opened, a small fold chip leads its steps */
.cp-sg-run { box-shadow: 4px 4px 0 calc(-1 * var(--cp-hair)) var(--cp-bg-2), 4px 4px 0 0 var(--cp-line-2), 8px 8px 0 calc(-1 * var(--cp-hair)) var(--cp-bg-2), 8px 8px 0 0 var(--cp-line-2); margin-right: 8px; }
.cp-sg-run[data-v="block"] { box-shadow: 4px 4px 0 calc(-1 * var(--cp-hair)) var(--cp-block-wash), 4px 4px 0 0 var(--cp-block), 8px 8px 0 calc(-1 * var(--cp-hair)) var(--cp-block-wash), 8px 8px 0 0 var(--cp-block); }
.cp-sg-run[data-v="warn"] { box-shadow: 4px 4px 0 calc(-1 * var(--cp-hair)) var(--cp-warn-wash), 4px 4px 0 0 var(--cp-warn), 8px 8px 0 calc(-1 * var(--cp-hair)) var(--cp-warn-wash), 8px 8px 0 0 var(--cp-warn); }
.cp-sg-times { margin-left: 2px; padding: 0 6px; border-radius: var(--cp-r-xs); background: var(--cp-bg-3); color: var(--cp-ink-1); font-family: var(--cp-font-mono); font-size: var(--cp-fs-mono-s); font-weight: var(--cp-fw-semibold); }
.cp-sg-fold { align-self: center; height: 26px; padding: 0 var(--cp-s-2); border-radius: 13px; border: var(--cp-hair) dashed var(--cp-line-3); color: var(--cp-ink-2); font-size: var(--cp-fs-meta); font-weight: var(--cp-fw-semibold); white-space: nowrap; }
.cp-sg-fold:hover { color: var(--cp-ink-1); border-color: var(--cp-ink-3); }
.cp-sg-fold + .cp-sg-node::before { display: none; }
.cp-sg-failed { position: absolute; right: var(--cp-s-2); top: 6px; padding: 0 5px; border-radius: var(--cp-r-xs); background: var(--cp-bg-3); color: var(--cp-ink-2); font-size: var(--cp-fs-micro); font-weight: var(--cp-fw-semibold); }
.cp-sg-run .cp-sg-tx b { display: flex; align-items: center; gap: 4px; } .cp-sg-run .cp-sg-times { flex: none; }

/* loading: the gate animation (Higgsfield, local GIF; a still frame under reduced motion) above the skeleton */
.cp-loading-anim { display: flex; justify-content: center; padding: var(--cp-s-6) 0 var(--cp-s-2); opacity: .9; }
.cp-loading-anim img { width: 250px; height: auto; }
/* sidebar: the current item carries an accent bar on its leading edge */
.cp-nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cp-accent); }
.cp-app[data-sidebar="collapsed"] .cp-nav-item[aria-current="page"]::before { left: -4px; }
.ov-allclear-anim img { width: 200px; height: auto; }
