/* Attestra — Carbon Mono layout, light theme (v24).
   Layers: A.1 fonts -> A.2 tokens -> base (recoloured from the old inline layout <style> + attestra.css) -> Carbon Mono shell/components -> A.3 -> A.4 (F1-F9).
   Page layers W-A..W-E are merged at the end of this file (Phase 7). */

/* ======== A.1 Font faces — navy light theme (L33): Inter UI + controls, Manrope login headings/branding, JetBrains Mono code. Self-hosted, OFL-1.1 (docs/uiux/fonts/) ======== */
@font-face{font-family:"Inter";src:url("/static/fonts/Inter.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Manrope";src:url("/static/fonts/Manrope-VF.woff2") format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("/static/fonts/JetBrainsMono-VF.woff2") format("woff2");font-weight:100 800;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Sans";src:url("/static/fonts/IBMPlexSans-VF.woff2") format("woff2");font-weight:100 700;font-style:normal;font-display:swap} /* fallback face after Inter (fetched only for glyphs Inter lacks) */

/* ======== A.2 :root token block — LIGHT theme, Deep Navy + Steel Blue (user decision 2026-12-03 01:56 IST, L30–L38) ======== */
/* Values from docs/uiux/light/02-light-theme-design-system.md §10. Token NAMES are the Carbon Mono A.2 names (L23).
   --accent = Deep Navy action colour (white text on it); --steel = selected / secondary emphasis; --brand = muted cyan, decorative only;
   --logo-* = the official green Attestra mark, frozen (L35). Green is used only for semantic success/pass. */
:root{
/* surfaces (soft cool grey app, white cards, blue-tinted supporting surfaces) */
--bg:#F4F6F8; --card:#FFFFFF; --field:#FFFFFF; --field-focus:#FFFFFF; --tile:#EEF2F6;
--surface-2:#EAF2F8; --surface-elev:#FAFBFD;
--rule:#D7E0E8; --rule-2:#E4EAF0; --rule-3:#B9C7D5; --field-line:#687789;
/* text (charcoal navy) */
--title:#203247; --ink:#203247; --ink-2:#3A4A5C; --quiet:#526171; --quiet-2:#5F6E80;
--disabled-ink:#687789; --disabled-bg:#EEF2F6;
/* action (navy), selected / secondary emphasis (steel), decorative (muted cyan) */
--accent:#244A73; --accent-hover:#1B3B5E; --accent-soft:#EAF2F8; --accent-line:#2D6FA8;
--accent-ink:#FFFFFF; --on-accent:#FFFFFF; --avatar-bg:#244A73;
--steel:#2D6FA8; --brand:#276678; --brand-soft:#EAF2F8;
--logo-bg:#84CC16; --logo-ink:#202923; /* official Attestra mark: unchanged, not recoloured (L35) */
/* status (semantic — kept; text/icon inks pass 4.5:1 on their tint) */
--ok:#15803D; --pass:#166534; --ok-ink:#166534; --ok-bg:#DCFCE7; --pass-bg:#DCFCE7;
--warn:#B54708; --warnp:#92400E; --warn-ink:#92400E; --med:#93370D; --warn-bg:#FEF3C7; --warnp-bg:#FEF3C7; --p-med-bg:#FEF0C7;
--bad:#B42318; --danger:#B42318; --fail:#B42318; --crit:#7A271A; --err-ink:#B42318; --fail-bg:#FEE4E2; --err-bg:#FEE4E2; --p-crit-bg:#FEE4E2;
--high:#B93815; --p-high-bg:#FFEDD5;
--info:#475467; --low:#1D4ED8; --run:#1D4ED8; --neu:#475467; --run-bg:#E0EAFF; --neu-bg:#EEF2F6;
--p-low-bg:#E0EAFF; --p-info-bg:#EEF2F6;
/* severity Set A (L17): dots, bars, legends — always paired with a text label; info/low dot = Information #1D4ED8, staging dot amber (navy audit) */
--dot-crit:#7A271A; --dot-high:#E8590C; --dot-med:#B54708; --dot-low:#1D4ED8; --dot-info:#667085; --dot-prod:#B42318; --dot-stg:#B54708;
/* shape + layout (unchanged geometry) */
--pillr:3px; --radius:4px; --radius-sm:3px; --radius-xs:2px; --shadow:0 1px 2px rgba(32,50,71,.05), 0 4px 12px rgba(32,50,71,.06);
--cmd-h:65px; --dock-h:81px; /* D1: measured shell 65/81 (A.2 said 78/96) */ --control-h:40px; --rail-w:0px; --topbar-h:0px;
/* type (L33): Inter for UI, controls and app headings; Manrope for login headings and branding; mono for IDs, code, logs, kbd, numerals */
--font:Inter, "IBM Plex Sans", system-ui, sans-serif; --display:Inter, "IBM Plex Sans", system-ui, sans-serif; --brand-font:Manrope, Inter, system-ui, sans-serif; --mono:"JetBrains Mono", ui-monospace, monospace;
/* Lead additions (Phase 2): tokens used by the base layer but missing from A.2 */
--accent-bg:#EAF2F8; --chip:#EEF2F6; --placeholder:#5F6E80; --ax:50%;
--space-1:6px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:28px; --space-7:36px;
/* D28 radius scale */
--r-ctl:3px; --r-kbd:6px; --r-pill:8px; --r-pop:10px; --r-input:11px; --r-menu:12px; --r-icon:14px; --r-card:16px; --r-wiz:18px; --r-dock:22px;
/* shell + z-index map */
--z-grid:0; --z-content:1; --z-wfoot:6; --z-tabs:30; --z-chrome:200; --z-cmdk:400; --z-pop:450; --z-confirm:800; --z-tip:9999;
/* overlays, popovers, tooltips (inverse surface, L28), focus halo, grid texture, technical surfaces (L18) */
--pop-bg:#FFFFFF; --pop-line:#D7E0E8; --pop-shadow:0 12px 32px rgba(32,50,71,.14), 0 2px 6px rgba(32,50,71,.08);
--scrim:rgba(32,50,71,.32); --tip-bg:#203247; --tip-ink:#FFFFFF; --focus-ring:rgba(36,74,115,.22); --grid-line:rgba(32,50,71,.035);
--code-bg:#EEF3F7; --code-ink:#203247;
color-scheme:light;
}

/* ======== Base layer (recoloured) ======== */
/* ===== BASE A: formerly the inline <style> in _layout.html (dead sidebar/topbar rules removed, recoloured) ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.menu-hint { font-size: 11px; color: var(--quiet); margin-left: 6px; }
main { max-width: 1240px; width: 100%; margin: 0 auto; padding: var(--space-7) 40px 48px; display: flex; flex-direction: column; gap: var(--space-6); }
main > form, .stack { display: flex; flex-direction: column; gap: var(--space-5); width: 100%; min-width: 0; }
main > form > .row:last-child, .stack > .row:last-child, .form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: 0; }
body.is-auth { background: var(--bg); }
body.is-auth .auth-top { display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: var(--card); border-bottom: 1px solid var(--rule); }
body.is-auth .auth-top a.brand { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
body.is-auth .auth-top a.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--logo-bg); color: var(--logo-ink); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
body.is-auth main { padding: 40px 20px 64px; gap: 0; }
@media (max-width: 900px) {
  main { padding: 24px 16px 48px; gap: 20px; }
}
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 0; }
.page-head > div:first-child { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--accent); margin: 0; }
h1 { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
@media (max-width: 640px) {
  h1 { font-size: 26px; }
}
h2 { margin: 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 15px; font-weight: 600; margin: 16px 0 8px; }
.lede { margin: 0; max-width: 680px; font-size: 15px; line-height: 1.55; color: var(--quiet-2); }
.meta, .hint { color: var(--quiet); font-size: 13px; }
.hint { font-size: 12px; margin-top: 4px; line-height: 1.45; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0; }
.stat-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-card .label { font-size: 13px; color: var(--quiet); font-weight: 500; display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; }
.stat-card .label .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stat-card .label .dot.crit { background: var(--dot-crit); }
.stat-card .label .dot.high { background: var(--dot-high); }
.stat-card .value { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.stat-card .value.is-crit { color: var(--crit); }
.stat-card .value.is-high { color: var(--high); }
.stat-card .note { font-size: 13px; color: var(--quiet); }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 24px 24px; margin: 0; overflow: hidden; scroll-margin-top: calc(var(--topbar-h) + 12px); }
.card > h2:first-child, .card-head { margin: -20px -24px 16px; padding: 18px 24px; border-bottom: 1px solid var(--rule); background: transparent; border-radius: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); }
.auth-card { padding: 28px 26px; }
.auth-card > h2:first-child { margin: 0 0 8px; padding: 0; border: 0; }
.table-wrap { overflow-x: auto; position: relative; } /* containing block: .sr-only cells stay inside the scroller (W4-A/W4-C) */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 16px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
th { padding: 12px; color: var(--quiet); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--field); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tbody tr:hover { background: var(--card); }
tbody tr:last-child td { border-bottom: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.row-title { font-weight: 600; color: var(--ink); line-height: 1.4; display: block; }
a.row-title:hover { color: var(--accent); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.critical, .pill.critical { background: var(--p-crit-bg); color: var(--crit); }
.high, .pill.high { background: var(--p-high-bg); color: var(--high); }
.medium, .pill.medium { background: var(--p-med-bg); color: var(--med); }
.low, .pill.low { background: var(--p-low-bg); color: var(--low); }
.info, .pill.info { background: var(--p-info-bg); color: var(--info); }
.chip { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--tile); color: var(--ink-2); margin: 1px 3px 1px 0; white-space: nowrap; border: 0; }
.chip.done { background: var(--ok-bg); color: var(--ok-ink); }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--warn-bg); color: var(--warn-ink); }
.env { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; letter-spacing: 0; border: 1px solid var(--rule-3); background: var(--card); color: var(--ink-2); }
.env::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); }
.env-production::before { background: var(--dot-prod); }
.env-staging::before, .env-uat::before { background: var(--dot-stg); }
.env-dev::before, .env-demo::before { background: var(--dot-low); }
.env-list, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-met { color: var(--pass); }
.st-no_exceptions { color: var(--accent); }
.st-partial { color: var(--med); }
.st-not_met { color: var(--crit); }
.st-not_assessed, .st-not_applicable { color: var(--quiet); }
.st-queued { color: var(--warn-ink); } .st-running { color: var(--run); }
.st-succeeded, .st-completed, .st-done { color: var(--pass); }
.st-failed, .st-refused, .st-error, .st-halted { color: var(--crit); }
.st-cancelled { color: var(--quiet); }
.st { font-weight: 600; text-transform: capitalize; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; color: var(--quiet); }
.kpi { min-width: 88px; padding: 12px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--rule); }
.kpi b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-bar, .card-toolbar, form.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.filter-bar > label, form.row > label.meta { margin: 0; align-self: center; white-space: nowrap; }
.filter-bar .field, .filter-bar > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-bar input:where(:not([type=checkbox], [type=radio])), .filter-bar select, form.row input:where(:not([type=checkbox], [type=radio])), form.row select { min-width: 180px; height: var(--control-h); min-height: var(--control-h); }
.filter-bar .search-field { flex: 1 1 240px; min-width: 220px; max-width: 420px; }
.filter-bar .search-field input { width: 100%; min-width: 0; }
.flash { border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; font-size: 14px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok-ink) 35%, transparent); }
.flash.err { background: var(--err-bg); color: var(--err-ink); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent); }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin: var(--space-2) 0; border: 1px solid color-mix(in srgb, var(--warn-ink) 35%, transparent); }
.card > form:not(:first-child):not(.form-follow):not(.filter-bar):not(.row), details > form:not(:first-child):not(.form-follow):not(.row) { margin-top: var(--space-4); }
.card > form:first-child, details > form:first-child { margin-top: 0; }
.card > table + form, .card > .table-wrap + form, .form-follow, .card > form.form-follow { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.form-follow > .fields:last-child, .card > form > .fields:last-of-type { margin-bottom: var(--space-4); }
.form-follow > .form-actions, .card > form > .form-actions { margin-top: 0; }
.action-stack { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; padding-bottom: var(--space-2); }
.action-stack form { margin: 0; width: 100%; }
.action-stack .row { gap: var(--space-2); width: 100%; }
td .action-stack { min-width: 180px; }
td .action-stack > form > button, td .action-stack > form > .btn { margin-bottom: 0; }
.status-cell { display: flex; flex-direction: column; gap: 10px; min-width: 220px; max-width: 280px; }
.status-move { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--field); }
.status-move label { margin: 0; font-size: 12px; font-weight: 500; color: var(--quiet); }
.status-move select, .status-move input[type=text], .status-move input:not([type]) { width: 100%; min-width: 0; height: 36px; min-height: 36px; font-size: 13px; }
.status-move .form-actions { margin-top: 2px; }
.status-move .form-actions button { height: 36px; min-height: 36px; padding: 0 14px; font-size: 13px; }
details > form, details > .fields { padding-top: var(--space-3); }
details[open] > summary { margin-bottom: var(--space-4); }
input, select, textarea { font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--ink); background: var(--card); border: 1px solid var(--rule-3); border-radius: var(--radius-sm); padding: 0 14px; height: var(--control-h); min-height: var(--control-h); text-align: left; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--quiet); opacity: 1; text-align: left; }
select { padding-right: 36px; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235F6E80' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: var(--quiet); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--field-focus); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
label { display: block; font-size: 13px; color: var(--quiet-2); font-weight: 500; margin-bottom: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.fields input[type=text], .fields input[type=email], .fields input[type=url], .fields input[type=date], .fields select, .fields input[type=number], .fields input[type=file], .fields input[type=password], .fields input:not([type]), .fields textarea { width: 100%; }
.fields input[type=file] { padding-top: 10px; padding-bottom: 10px; height: auto; min-height: var(--control-h); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); font-size: 14px; margin: 0; cursor: pointer; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-xs); background: var(--field); }
.checks label small { color: var(--quiet); display: block; font-weight: 400; font-size: 12px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 2px; min-height: 0; height: auto; padding: 0; }
button, .btn { font-family: var(--font); font-size: 14px; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius-sm); padding: 0 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-h); height: var(--control-h); white-space: nowrap; transition: background .15s, box-shadow .15s; }
button:hover, .btn:hover { background: var(--accent-hover); color: var(--accent-ink); text-decoration: none; }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, .btn.secondary { background: var(--card); color: var(--ink-2); border: 1px solid var(--rule-3); }
button.secondary:hover, .btn.secondary:hover { background: var(--field); color: var(--ink); }
button.danger { background: var(--card); color: var(--danger); border: 1px solid color-mix(in srgb, var(--err-ink) 35%, transparent); min-height: 36px; height: 36px; padding: 0 12px; font-size: 13px; }
button.danger:hover { background: var(--err-bg); }
.confirm-backdrop { position: fixed; inset: 0; z-index: 200; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.confirm-backdrop[hidden] { display: none !important; }
.confirm-dialog { background: var(--card); border-radius: var(--radius); box-shadow: var(--pop-shadow); max-width: 440px; width: 100%; padding: 24px; }
.confirm-dialog h2 { margin: 0 0 8px; font-size: 18px; font-weight: 650; }
.confirm-dialog p { margin: 0 0 20px; color: var(--ink-2); line-height: 1.5; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
button.ghost, .btn.ghost { background: var(--card); color: var(--ink-2); border: 1px solid var(--rule-3); }
button.ghost:hover, .btn.ghost:hover { background: var(--field); color: var(--ink); }
.btn.ghost.danger, button.ghost.danger { color: var(--danger); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent); }
.actions-split { display: flex; gap: 8px; align-items: center; }
.actions-split .danger { margin-left: auto; }
details summary { cursor: pointer; font-weight: 600; color: var(--accent); margin: 12px 0; list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-xs); background: var(--accent-soft); }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; width: 0; height: 0; border-left: 5px solid var(--accent); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
details[open] > summary::before { transform: rotate(90deg); }
details[open] > summary { margin-bottom: 14px; }
.steps a.done::before { background: var(--accent); }
.step-rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
@media (max-width: 720px) {
  .step-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.step-rail .step { display: flex; flex-direction: column; gap: 8px; }
.step-rail .bar { height: 4px; border-radius: 2px; background: var(--rule); }
.step-rail .step.on .bar { background: var(--accent); }
.step-rail .step span { font-size: 12px; font-weight: 500; color: var(--quiet); line-height: 1.3; }
.step-rail .step.on span { font-weight: 600; color: var(--accent-hover); }
.sev-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.sev-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sev-card .value { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.status-pill.overdue { background: var(--p-crit-bg); color: var(--crit); }
.status-pill.due { background: var(--p-med-bg); color: var(--med); }
.status-pill.done, .status-pill.passed, .status-pill.active { background: var(--ok-bg); color: var(--ok-ink); }
.status-pill.disabled, .status-pill.inactive { background: var(--tile); color: var(--quiet); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.legend-row { display: flex; gap: 14px; font-size: 13px; color: var(--quiet-2); flex-wrap: wrap; }
.legend-row .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: middle; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--accent-soft); color: var(--accent-hover); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.user-cell .meta { display: block; }
.role-chip { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--tile); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.source-chip { display: inline-block; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--rule-3); font-size: 12px; font-weight: 500; color: var(--quiet-2); }
.count-soft { font-size: 13px; font-weight: 500; color: var(--quiet); margin-left: 6px; }
.empty-block { padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border-top: 1px solid var(--rule-2); }
.empty-block .icon { width: 40px; height: 40px; border-radius: 50%; background: var(--tile); color: var(--quiet); display: grid; place-items: center; }
.checks.label-chips label { min-height: 44px; align-items: center; padding: 0 16px; border-radius: 10px; border-color: var(--rule-3); background: var(--card); font-weight: 500; }
.checks.label-chips label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.logo-drop { min-height: 88px; box-sizing: border-box; border: 1.5px dashed var(--accent-line); background: var(--accent-soft); border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--quiet-2); font-size: 14px; padding: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin: 0; padding: 0; background: transparent; }
.tabs a { padding: 12px 16px; text-decoration: none; color: var(--quiet); font-weight: 500; font-size: 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); background: transparent; text-decoration: none; }
.tabs a[aria-current=page] { background: transparent; border-color: transparent; border-bottom-color: var(--accent); color: var(--accent-hover); font-weight: 600; }
.empty { text-align: center; padding: 40px 20px; color: var(--quiet); }
.empty a { font-weight: 600; }
.back-link, .breadcrumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--quiet); margin-bottom: 4px; }
.breadcrumb a { color: var(--quiet); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--ink); font-weight: 500; }
.grid:has(> #reports), .grid:has(> .card table td .action-stack) { grid-template-columns: minmax(0, 1fr); }
.grid > .card { min-width: 0; }
.card { overflow-x: auto; overflow-y: visible; }
.card > table, .card .table-wrap > table { min-width: 100%; }
td { overflow-wrap: break-word; }
td .st, td .pill, td .chip, td .env, td .status-pill, td .badge, td button, td .btn { white-space: nowrap; overflow-wrap: normal; }
td .action-stack { min-width: 180px; max-width: 240px; padding: 2px 0 4px; gap: 8px; }
td .action-stack .meta { white-space: normal; overflow-wrap: break-word; display: block; }
td .action-stack button, td .action-stack .btn { min-height: 34px; height: 34px; padding: 0 14px; font-size: 13px; }
td .action-stack form.row { flex-wrap: wrap; gap: 8px; }
td .action-stack form.row input { width: 100% !important; min-width: 0 !important; height: 34px; min-height: 34px; font-size: 13px; }
@media (max-width: 1180px) {
  td .action-stack { min-width: 150px; max-width: 190px; }
}
@media (max-width: 1400px) {
  main { padding-left: 24px; padding-right: 24px; }
}
.card { scrollbar-width: thin; scrollbar-color: var(--rule-3) transparent; }

/* ===== BASE B: formerly attestra.css "Option M" (rail shell removed, recoloured) ===== */
body, body.is-app, body.is-auth { background: var(--bg); font-size: 14px; color: var(--ink); font-family: var(--font); }
::selection { background: var(--accent-soft); }
.brand .mark, .auth-top a.brand .mark, .trust-top .mark { width: 42px; height: 42px; border-radius: 10px; background: var(--logo-bg) !important; color: var(--logo-ink); box-shadow: none !important; display: grid; place-items: center; flex: none; font-weight: 600; }
.ri-ico { width: 20px; height: 20px; }
.topnav-more > summary { cursor: pointer; user-select: none; }
.topnav-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-pop { position: absolute; min-width: 230px; z-index: 130; background: var(--pop-bg); border: 1px solid var(--pop-line); border-radius: 12px; box-shadow: var(--pop-shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.menu-pop a { padding: 9px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 14px; text-decoration: none; }
.menu-pop a:hover { background: var(--accent-soft); text-decoration: none; color: var(--title); }
.menu-pop a[aria-current=page] { background: var(--accent-soft); color: var(--accent); }
.menu-pop .menu-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); padding: 8px 12px 4px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; border: 1px solid var(--accent-line); }
.menu-user { padding: 10px 12px 12px; border-bottom: 1px solid var(--rule-2); margin-bottom: 6px; }
.menu-user strong { display: block; font-weight: 600; }
.menu-user span { color: var(--quiet); font-size: 13px; }
.menu-pop form { margin: 0; }
.menu-pop form button { width: 100%; justify-content: flex-start; background: transparent; color: var(--fail); box-shadow: none; height: 38px; min-height: 38px; padding: 0 12px; border-radius: 8px !important; font-weight: 500; }
.menu-pop form button:hover { background: var(--err-bg); color: var(--fail); }
main { max-width: 1360px; width: 100%; margin: 0 auto; padding: 36px 48px 72px; display: flex; flex-direction: column; gap: 26px; }
@media (max-width: 900px) {
  main { padding: 24px 16px 56px; gap: 20px; }
}
body.is-auth .auth-top { background: transparent; border-bottom: 1px solid var(--rule); padding: 18px 48px; }
body.is-auth .auth-top a.brand { font-family: var(--brand-font); font-size: 21px; font-weight: 600; }
body.is-auth main { max-width: 560px; padding-top: 56px; }
h1 { font-family: var(--display); font-weight: 500; font-size: 36px; letter-spacing: -.012em; line-height: 1.15; color: var(--ink); }
h2 { font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.lede { color: var(--quiet-2); font-size: 15.5px; line-height: 1.6; max-width: 760px; }
.meta, .hint { color: var(--quiet); }
.mono, code, pre { font-family: var(--mono); }
.mono { font-size: 12.5px; color: var(--quiet); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a.row-title { color: var(--ink); font-weight: 600; }
a.row-title:hover { color: var(--accent); text-decoration: none; }
.page-head { align-items: flex-end; gap: 20px; }
.page-head > div:first-child { gap: 10px; }
.page-head .actions { gap: 10px; }
.back-link, .breadcrumb { font-size: 13.5px; color: var(--quiet); margin: 0; }
.breadcrumb a, .back-link a { color: var(--quiet); }
.breadcrumb .current { color: var(--ink); font-weight: 500; }
.id-tag { font-family: var(--mono); font-size: 12.5px; color: var(--quiet); }
.card, .stat-card, .sev-card, .steps { background: var(--card); border: 1px solid var(--rule) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow); }
.card { padding: 22px 26px 26px; }
.card > h2:first-child, .card-head { margin: -22px -26px 18px; padding: 20px 26px 14px; border-bottom: 0; font-size: 16px; }
.card > h2:first-child + .meta, .card > h2:first-child + p.meta { margin-top: -8px; }
.card > table, .card > .table-wrap { margin-left: -26px; margin-right: -26px; width: calc(100% + 52px); max-width: none; }
.card > table:last-child, .card > .table-wrap:last-child { margin-bottom: -26px; }
.card > table th:first-child, .card > table td:first-child, .card > .table-wrap th:first-child, .card > .table-wrap td:first-child { padding-left: 26px; }
.card > table th:last-child, .card > table td:last-child, .card > .table-wrap th:last-child, .card > .table-wrap td:last-child { padding-right: 26px; }
.grid { gap: 22px; }
.stack { gap: 22px; }
.stat-strip { gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat-strip .stat-card:nth-child(n) { background: var(--card); }
.stat-card { padding: 22px 24px; gap: 4px; }
.stat-card .label { font-size: 13.5px; color: var(--quiet); }
.stat-card .value { font-family: var(--display); font-weight: 500; font-size: 42px; letter-spacing: -.01em; line-height: 1.1; margin-top: 6px; }
.stat-card .value.is-crit { color: var(--dot-crit); }
.stat-card .value.is-high { color: var(--dot-high); }
.stat-card .note { font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.crit, .stat-card .label .dot.crit { background: var(--dot-crit); }
.dot.high, .stat-card .label .dot.high { background: var(--dot-high); }
.dot.med { background: var(--dot-med); }
.dot.low { background: var(--dot-low); }
.dot.info { background: var(--dot-info); }
.sev-strip { gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .sev-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sev-card { padding: 16px 20px; }
.sev-card .value { font-family: var(--display); font-weight: 500; font-size: 30px; }
.kpi { background: var(--field) !important; border: 1px solid var(--rule) !important; border-radius: 14px; }
.kpi b { font-family: var(--display); font-weight: 500; }
table { font-size: 14px; }
thead th { background: var(--surface-2); }
th { color: var(--quiet); font-weight: 600; font-size: 12.5px; text-transform: none; letter-spacing: 0; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
td { padding: 15px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
tbody tr:hover, tr:hover > td { background: var(--card); }
tr:last-child > td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.critical, .pill.critical { background: var(--p-crit-bg); color: var(--crit); }
.high, .pill.high { background: var(--p-high-bg); color: var(--high); }
.medium, .pill.medium { background: var(--p-med-bg); color: var(--med); }
.low, .pill.low { background: var(--p-low-bg); color: var(--low); }
.info, .pill.info { background: var(--p-info-bg); color: var(--info); }
.chip, .role-chip, .source-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 8px; background: var(--tile); color: var(--ink-2); border: 0; font-size: 12.5px; font-weight: 500; }
.chip.done { background: var(--ok-bg); color: var(--ok-ink); }
.source-chip { background: transparent; border: 1px solid var(--rule-3); }
.badge { border-radius: 8px; padding: 3px 11px; background: var(--warn-bg); color: var(--warn-ink); border: 0 !important; }
.env { border-radius: 8px; padding: 3px 11px; border: 0; background: var(--tile); color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
.env::before { width: 7px; height: 7px; }
.env-production::before { background: var(--dot-crit); }
.env-staging::before, .env-uat::before { background: var(--dot-med); }
.env-dev::before, .env-demo::before { background: var(--dot-low); }
.status-pill { border-radius: 8px !important; border: 0 !important; padding: 4px 12px; }
.status-pill.done, .status-pill.passed, .status-pill.active { background: var(--ok-bg) !important; color: var(--ok-ink) !important; }
.status-pill.overdue { background: var(--p-crit-bg); color: var(--crit); }
.status-pill.due { background: var(--p-med-bg); color: var(--med); }
.status-pill.disabled, .status-pill.inactive { background: var(--tile) !important; color: var(--quiet) !important; }
.st { font-weight: 500; }
.st-met, .st-succeeded, .st-completed, .st-done { color: var(--pass); }
.st-no_exceptions { color: var(--accent); }
.st-partial, .st-queued { color: var(--warn-ink); } .st-running { color: var(--run); }
.st-not_met, .st-failed, .st-refused, .st-error, .st-halted { color: var(--crit); }
.fs { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; text-transform: capitalize; }
.fs::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .8; }
.fs-new { color: var(--warnp); }
.fs-triaged { color: var(--neu); }
.fs-validated { color: var(--neu); }
.fs-fixed { color: var(--accent-hover); }
.fs-retest_passed { color: var(--pass); }
.fs-risk_accepted, .fs-false_positive { color: var(--quiet); }
.user-avatar { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
input, select, textarea { border-radius: 12px; border-color: var(--rule-3); background: var(--card); font-family: var(--font); }
input:hover, select:hover, textarea:hover { border-color: var(--quiet); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
label { color: var(--ink-2); font-weight: 500; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.checks label { border-radius: 12px; background: var(--card); border-color: var(--rule); }
.checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); }
.checks.label-chips label { border-radius: 8px; }
.logo-drop { border-color: var(--accent-line); background: var(--field); border-radius: 16px; }
button, .btn { border-radius: 8px !important; height: var(--control-h); min-height: var(--control-h); padding: 0 20px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; box-shadow: none !important; }
button:hover, .btn:hover { background: var(--accent-hover); color: var(--on-accent); }
button.secondary, .btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--rule-3); }
button.secondary:hover, .btn.secondary:hover { background: var(--field); color: var(--ink); }
button.danger { background: var(--card); color: var(--danger); border: 1px solid color-mix(in srgb, var(--err-ink) 35%, transparent) !important; }
button.danger:hover { background: var(--err-bg); }
.flash { border-radius: 14px; padding: 14px 18px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok-ink) 35%, transparent) !important; }
.flash.err { background: var(--err-bg); color: var(--err-ink); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent) !important; }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 35%, transparent) !important; border-radius: 14px; }
details summary { background: transparent; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 8px; padding: 8px 16px; font-size: 13.5px; }
details summary:hover { background: var(--accent-soft); }
details summary::before { border-left-color: var(--accent); }
.status-move { background: var(--field); border-color: var(--rule); border-radius: 14px; }
pre { background: var(--field) !important; border: 1px solid var(--rule) !important; border-radius: 14px !important; }
.empty-block .icon { background: var(--field); border: 1px solid var(--rule); }
.empty { color: var(--quiet); }
.tabs { border-bottom: 0; gap: 6px; }
.tabs a { padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; margin: 0; color: var(--quiet-2); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.tabs a:hover { background: var(--tile); color: var(--ink); }
.tabs a[aria-current=page] { background: var(--card); border-color: var(--rule); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.tabs .n { font-size: 12px; color: var(--quiet); font-weight: 500; }
.steps a::before { content: ""; height: 4px; border-radius: 2px; background: var(--rule); display: none; }
.steps a:last-child::after { display: none; }
.steps a.done::after { background: var(--accent); opacity: .7; }
.steps a .step-row { align-items: center; gap: 8px; display: block; }
.steps a .step-meta { display: block; padding-left: 0; font-size: 12.5px; font-weight: 400; color: var(--quiet); }
.eng-tabs { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 30; background: var(--bg); padding: 6px 0; border-radius: 8px; }
.tab-panels > .tp { display: none; flex-direction: column; gap: 22px; scroll-margin-top: 150px; }
.tab-panels > .tp:target, .tab-panels > .tp:has(:target) { display: flex; }
.tab-panels:not(:has(:target)) > .tp.tp-default { display: flex; }
.card { scroll-margin-top: 150px; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.subnav a { font-size: 13px; padding: 5px 13px; border-radius: 8px; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2); font-weight: 500; }
.subnav a:hover { text-decoration: none; border-color: var(--rule-3); }
.subnav a[aria-current=page] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; vertical-align: middle; font-family: var(--font); text-transform: capitalize; letter-spacing: 0; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--quiet); font-size: 13.5px; }
.meta-row .sep { color: var(--rule-3); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
.donut-wrap { display: flex; align-items: center; gap: 26px; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar { display: flex; flex-direction: column; gap: 14px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr) 44px; align-items: center; gap: 14px; font-size: 13.5px; }
.hbar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--ink); }
.hbar-row .tot { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sbar { height: 10px; border-radius: 8px; background: var(--tile); display: flex; overflow: hidden; }
.sbar span { display: block; height: 100%; }
.sbar .c { background: var(--dot-crit); }
.sbar .h { background: var(--dot-high); }
.sbar .m { background: var(--dot-med); }
.sbar .l { background: var(--dot-low); }
.sbar .i { background: var(--dot-info); }
.sevcounts { display: flex; gap: 5px; flex-wrap: wrap; }
.sevcounts .pill { padding: 2px 9px; font-size: 12px; }
.sevcounts .pill::before { display: none; }
.eng-name { display: flex; flex-direction: column; gap: 2px; }
.grade-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 17px; }
.wf { display: flex; gap: 6px; padding: 16px 20px !important; }
.wf .wf-step { flex: 1; text-align: center; font-size: 12.5px; color: var(--quiet); font-weight: 500; }
.wf .wf-step::before { content: ""; display: block; height: 4px; border-radius: 8px; background: var(--tile); margin-bottom: 9px; }
.wf .wf-step.done { color: var(--ink-2); }
.wf .wf-step.done::before { background: var(--accent); }
.wf .wf-step.cur { color: var(--ink); font-weight: 700; }
.wf .wf-step.cur::before { background: var(--accent); }
.wf .wf-step.side::before { background: var(--quiet); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.split > .col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.split > .side { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .side { position: static; }
}
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-2); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv .k { width: 118px; flex: none; color: var(--quiet); font-size: 13px; }
.kv .v { min-width: 0; overflow-wrap: anywhere; }
.prose { color: var(--ink-2); line-height: 1.7; white-space: pre-wrap; margin: 0; }
.proof { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; background: var(--field); color: var(--ink); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ev { border: 1px solid var(--rule); border-radius: 14px; padding: 14px; background: var(--field); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev.ev-annotated { border-color: color-mix(in srgb, var(--err-ink) 35%, transparent); background: var(--err-bg); }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.ev-fail { margin: 0 0 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--err-ink) 35%, transparent); border-radius: 14px; background: var(--err-bg); color: var(--ink-2); font-size: 13.5px; }
.ev .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule-2); }
.comment:first-child { border-top: 0; }
.comment .avatar { width: 32px; height: 32px; font-size: 12px; }
.snips > .snip-panel { display: none; }
.snips:not(:has(.snip-panel:target)) > .snip-panel:first-child, .snips > .snip-panel:target { display: block; }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; max-width: 560px; }
.flow div { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.flow b { display: block; font-family: var(--display); font-weight: 500; font-size: 22px; color: var(--accent); }
.flow span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
body.public { background: var(--bg); font-family: var(--font); }
body.public .trust-top { max-width: 960px; padding: 22px 24px; font-family: var(--brand-font); font-size: 20px; font-weight: 600; border-bottom: 1px solid var(--rule); }
body.public main { max-width: 960px; padding: 40px 24px 64px; }
body.public h1 { font-size: 40px; margin-bottom: 12px; }
body.public h2 { font-size: 17px; margin: 34px 0 12px; }
body.public .card { padding: 22px 24px; margin: 14px 0; }
body.public .badge { background: var(--accent-soft) !important; color: var(--accent) !important; border-radius: 8px !important; padding: 6px 14px; }
body.public input, body.public textarea { border-radius: 12px; border-color: var(--rule-3); }
body.public button { margin-top: 14px; }
body.public code { background: var(--field); border-color: var(--rule); }
body.public footer { border-color: var(--rule); }
.side .fields { grid-template-columns: minmax(0, 1fr); }
.side .fields > div { grid-column: 1 / -1 !important; }
.status-details > summary { margin: 4px 0 0; padding: 4px 12px; font-size: 12.5px; font-weight: 500; }
.status-details[open] > summary { margin-bottom: 8px; }
.card > form + table, .card > form + .table-wrap, .card > .row + table { margin-top: 18px; }
.steps a.done .step-num::after { width: 9px; height: 5px; border-left: 2px solid var(--rule); border-bottom: 2px solid var(--rule); transform: rotate(-45deg) translate(1px, -1px); content: none; display: none; }
.topnav-more > summary { cursor: pointer; list-style: none; user-select: none; }
.topnav-more > summary::-webkit-details-marker { display: none; }
.topnav-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topnav-more[open] > summary { background: var(--tile); color: var(--ink); }
.topnav-more.is-current[open] > summary { background: var(--accent-soft); color: var(--accent); }
.topnav-more .menu-pop { z-index: 100; }
.topnav { z-index: 90; }
.steps a { text-decoration: none; border: 0; background: transparent; padding: 0; border-radius: 0; line-height: 1.25; display: flex; flex-direction: row; align-items: center; color: var(--ink); font-weight: 600; font-size: 14px; position: relative; flex: 1 1 auto; min-width: 0; gap: 12px; padding-right: 12px; }
.steps a:last-child { flex: 0 0 auto; padding-right: 0; }
.steps a .step-num, .steps .step-text { flex: 0 0 auto; }
@media (max-width: 1100px) {
  .steps { flex-wrap: wrap; row-gap: 14px; column-gap: 20px; overflow: visible; }
  .steps a, .steps a:last-child { flex: 0 1 auto; padding-right: 0; }
  .steps a::after { display: none; }
}
select[multiple] { background-image: none; padding: 8px; height: auto; border-radius: 14px; }
select[multiple] option { padding: 6px 10px; border-radius: 8px; }
select[multiple] option:checked { background: var(--accent-soft); color: var(--accent); }
.asel { position: relative; display: inline-block; min-width: 180px; max-width: 100%; vertical-align: middle; }
.fields .asel, .status-move .asel { display: block; width: 100%; }
.asel select.asel-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; }
.asel-trigger { width: 100%; height: var(--control-h); min-height: var(--control-h); display: flex !important; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px 0 16px !important; background: var(--card) !important; color: var(--ink) !important; border: 1px solid var(--rule-3) !important; border-radius: 8px !important; font: 500 14px/1.2 var(--font); text-align: left; cursor: pointer; box-shadow: none !important; transition: border-color .15s, box-shadow .15s; }
.asel-trigger:hover { border-color: var(--quiet-2) !important; background: var(--card) !important; }
.asel-trigger:focus-visible, .asel.is-open .asel-trigger { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--focus-ring) !important; }
.asel-trigger:disabled { opacity: .55; cursor: not-allowed; }
.asel-trigger.is-placeholder .asel-value { color: var(--quiet); }
.asel-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.asel-caret { width: 8px; height: 8px; flex: none; border-right: 1.6px solid var(--quiet-2); border-bottom: 1.6px solid var(--quiet-2); transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.asel.is-open .asel-caret { transform: translateY(2px) rotate(-135deg); }
.asel-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 120; min-width: 100%; width: max-content; max-width: min(440px, 92vw); background: var(--card); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--pop-shadow); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.asel-pop[hidden] { display: none; }
/* Open list: placed by attestra.js against the viewport (top-layer popover, or position:fixed as a fallback), so cards, tables, the
   wizard step body and the workspace never clip it and never switch overflow (no jump). Reset the UA popover box. */
.asel-pop[popover] { position: fixed; inset: auto; margin: 0; color: inherit; overflow: hidden; }
.asel-pop::backdrop { display: none; }
.asel-search { width: 100%; height: 36px !important; min-height: 36px !important; border-radius: 10px !important; padding: 0 12px !important; font-size: 13.5px; }
.asel-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; scrollbar-width: thin; outline: none; }
.asel-opt { position: relative; padding: 9px 36px 9px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.asel-opt.is-active { background: var(--accent-soft); color: var(--ink); }
.asel-opt:active { background: var(--accent-soft); }
.asel-opt.is-selected { color: var(--accent); font-weight: 600; }
.asel-opt.is-selected::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6E80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.asel-opt.is-disabled { color: var(--quiet); opacity: .55; cursor: not-allowed; }
.asel-group { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
main { max-width: none; padding: 20px 24px 40px; gap: 18px; margin: 0; }
body.is-auth main { max-width: 560px; margin: 0 auto; }
h1 { font-family: var(--font); font-weight: 600; font-size: 26px; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); }
h2 { font-size: 16px; font-weight: 600; }
.eyebrow { color: var(--accent); font-size: 12px; }
.lede { font-size: 14px; color: var(--quiet); }
.mono, .id-tag { font-family: var(--mono); font-size: 12.5px; }
.card, .stat-card, .sev-card, .steps { border-radius: 12px !important; box-shadow: none; border: 1px solid var(--rule) !important; }
.card { padding: 18px 20px 20px; }
.card > h2:first-child, .card-head { margin: -18px -20px 14px; padding: 18px 20px 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card > h2:first-child::before, .card-head::before, .tile-head::before { content: ""; width: 36px; height: 36px; border-radius: 10px; flex: none; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / 20px no-repeat; }
.card-head h2 { margin: 0 !important; }
.card-head .meta { margin-left: auto; }
.card > table, .card > .table-wrap { margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); }
.card > table:last-child, .card > .table-wrap:last-child { margin-bottom: -20px; }
.card > table th:first-child, .card > table td:first-child, .card > .table-wrap th:first-child, .card > .table-wrap td:first-child { padding-left: 20px; }
.card > table th:last-child, .card > table td:last-child, .card > .table-wrap th:last-child, .card > .table-wrap td:last-child { padding-right: 20px; }
.grid, .stack { gap: 16px; }
.stat-strip { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-card { padding: 16px 18px; }
.stat-card .label { font-size: 13px; color: var(--quiet); display: flex; align-items: center; gap: 8px; }
.stat-card .value { font-family: var(--font); font-weight: 600; font-size: 30px; line-height: 1.15; margin-top: 4px; color: var(--ink); }
.stat-card .value.is-crit, .stat-card .value.is-high { color: var(--fail); }
.stat-card .value.is-ok { color: var(--pass); }
.sev-card .value { font-family: var(--font); font-weight: 600; font-size: 24px; }
.kpi { background: var(--field) !important; border-radius: 10px; }
.kpi b { font-family: var(--font); font-weight: 600; }
th { color: var(--quiet); font-size: 12px; font-weight: 500; }
td { padding: 12px; border-bottom: 1px solid var(--rule-2); }
tbody tr:hover, tr:hover > td { background: var(--card); }
.pill { border-radius: 7px; padding: 4px 10px; font-size: 12px; font-weight: 500; gap: 6px; }
.pill::before { display: none; }
.critical, .pill.critical, .high, .pill.high { background: var(--fail-bg); color: var(--fail); }
.medium, .pill.medium { background: var(--warnp-bg); color: var(--warnp); }
.low, .pill.low, .info, .pill.info { background: var(--neu-bg); color: var(--neu); }
.pill.pass, .chip.done { background: var(--pass-bg); color: var(--pass); }
.pill.fail { background: var(--fail-bg); color: var(--fail); }
.pill.warn { background: var(--warnp-bg); color: var(--warnp); }
.pill.run { background: var(--run-bg); color: var(--run); }
.pill.neu { background: var(--neu-bg); color: var(--neu); }
.chip, .role-chip, .source-chip, .env { border-radius: 7px; background: var(--neu-bg); color: var(--neu); font-size: 12px; padding: 3px 9px; }
.badge { border-radius: 7px; background: var(--warnp-bg); color: var(--warnp); font-size: 12px; padding: 3px 9px; }
.status-pill { border-radius: 7px !important; }
.status-pill.done, .status-pill.passed, .status-pill.active { background: var(--pass-bg) !important; color: var(--pass) !important; }
.status-pill.overdue { background: var(--fail-bg); color: var(--fail); }
.status-pill.due { background: var(--warnp-bg); color: var(--warnp); }
.status-chip { border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 500; }
.st-met, .st-succeeded, .st-completed, .st-done { color: var(--pass); }
.st-partial { color: var(--warnp); }
.st-queued, .st-running { color: var(--run); }
.st-no_exceptions { color: var(--run); }
.st-not_met, .st-failed, .st-refused, .st-error, .st-halted { color: var(--fail); }
.fs { padding: 4px 10px; border-radius: 7px; font-size: 12px; font-weight: 500; }
.fs::before { display: none; }
.fs-new { background: var(--fail-bg); color: var(--fail); }
.fs-triaged, .fs-validated { background: var(--run-bg); color: var(--run); }
.fs-fixed, .fs-retest_passed { background: var(--pass-bg); color: var(--pass); }
.fs-risk_accepted, .fs-false_positive { background: var(--neu-bg); color: var(--neu); }
input, select, textarea { border-radius: 8px; border-color: var(--rule); }
input:hover, select:hover, textarea:hover { border-color: var(--quiet); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
button, .btn { border-radius: 8px !important; height: var(--control-h); min-height: var(--control-h); padding: 0 16px; font-weight: 500; background: var(--accent); color: var(--on-accent); }
button.secondary, .btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--rule); }
.btn.block, button.block { width: 100%; height: 46px; justify-content: center; display: flex; align-items: center; }
details summary { border-radius: 8px; border-color: var(--rule); color: var(--accent); }
.flash { border-radius: 10px; }
.warn { border-radius: 10px; }
pre, .proof { background: var(--field) !important; border: 1px solid var(--rule) !important; border-radius: 8px !important; color: var(--ink); font-family: var(--mono); }
.asel-trigger { border-radius: 8px !important; border-color: var(--rule) !important; }
.asel-pop { border-radius: 10px; }
.asel-opt { border-radius: 6px; }
.tabs { gap: 2px; border-bottom: 1px solid var(--rule); }
.tabs a { border-radius: 8px 8px 0 0; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; }
.tabs a:hover { background: var(--tile); }
.tabs a[aria-current=page] { background: transparent; color: var(--accent); border-bottom-color: var(--accent); box-shadow: none; }
.eng-tabs { top: 0; background: var(--bg); border-radius: 0; }
.subnav a { border-radius: 8px; }
.subnav a[aria-current=page] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.steps { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); align-items: center; row-gap: 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 14px; overflow: visible; }
.steps a, .steps a:last-child { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; min-width: 0; color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.steps a::after { content: ""; height: 2px; background: var(--rule); border-radius: 2px; flex: 1 1 24px; min-width: 24px; margin: 0; position: static; display: none !important; }
.steps a:hover { text-decoration: none; border-color: var(--accent-line); color: var(--ink); background: var(--card); }
.steps a.next { background: var(--accent-soft); border-color: var(--accent); }
.steps .step-text { display: flex; flex-direction: column; line-height: 1.25; white-space: normal; min-width: 0; }
.steps a .step-num { font-weight: 600; place-items: center; line-height: 1; padding: 0; box-sizing: border-box; font-variant-numeric: tabular-nums; width: 28px; height: 28px; border-radius: 50%; background: var(--tile); color: var(--quiet-2); font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: none; }
.steps a.done .step-num { color: var(--on-accent); font-size: 0; background: var(--pass-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px 14px no-repeat; }
.steps a.next .step-num { background: var(--accent); color: var(--on-accent); box-shadow: none; }
@media (max-width: 1250px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
}
.wf .wf-step::before { background: var(--tile); }
.wf .wf-step.done::before, .wf .wf-step.cur::before { background: var(--accent); }
.sbar { background: var(--tile); border-radius: 6px; }
.sbar .c { background: var(--dot-crit); }
.sbar .h { background: var(--dot-high); }
.sbar .m { background: var(--dot-med); }
.sbar .l { background: var(--dot-low); }
.sbar .i { background: var(--dot-info); }
.md { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.md-list { position: sticky; top: 20px; max-height: calc(100dvh - var(--cmd-h) - var(--dock-h) - 40px); display: flex; flex-direction: column; padding: 18px 0 8px !important; overflow: hidden; }
.md-list > .card-head, .md-list > h2:first-child { margin: 0 0 8px; padding: 0 18px; }
.md-list .md-filter { margin: 0 18px 8px; }
.md-scroll { overflow-y: auto; scrollbar-width: thin; flex: 1; }
.md-detail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lr { display: flex; gap: 12px; align-items: flex-start; padding: 11px 18px; border-top: 1px solid var(--rule-2); color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.lr:hover { background: var(--card); text-decoration: none; color: var(--ink); }
.lr[aria-current=page], .lr.on { background: var(--accent-soft); border-left-color: var(--accent); }
.lr .tile { width: 36px; height: 36px; border-radius: 8px; background: var(--tile); color: var(--quiet-2); display: grid; place-items: center; flex: none; }
.lr .tile svg { width: 18px; height: 18px; }
.lr .lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lr .lt b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.lr .lt .meta { font-size: 12.5px; }
.lr .pills .pill { padding: 2px 8px; font-size: 11.5px; }
.lr .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mix { display: grid; grid-template-columns: 70px minmax(0, 1fr) 32px; gap: 12px; align-items: center; margin: 9px 0; font-size: 13.5px; }
.mix b { text-align: right; font-weight: 600; }
.mix .bar { height: 8px; border-radius: 6px; background: var(--tile); overflow: hidden; }
.mix .bar span { display: block; height: 100%; border-radius: 6px; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: stretch; }
.dash-cols > .col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash-cols > .col > .card:last-child { flex: 1; }
@media (max-width: 1100px) {
  .md { grid-template-columns: minmax(0, 1fr); }
  .md-list { position: static; max-height: 420px; }
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
}
.split { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.split > .side { top: 20px; }
.kv > div { border-bottom: 1px solid var(--rule-2); }
.flow div { border-radius: 12px; box-shadow: none; }
.flow b { font-family: var(--mono); font-size: 13px; color: var(--accent); }
body.public .trust-top { font-family: var(--font); font-size: 17px; }
body.public h1 { font-family: var(--font); font-weight: 600; font-size: 28px; }
.dash-cols .card { display: flex; flex-direction: column; }
.hbar-row { grid-template-columns: minmax(0, 180px) minmax(0, 1fr) 36px; }
.card > h2:first-child, .card-head { justify-content: flex-start; text-align: left; }
.card-head > h2 { margin: 0; }
.card-head > :not(h2):last-child { margin-left: auto; }
.lr .pills { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1600px) {
  .md-detail .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.asel { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.asel-trigger { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden; }
.asel-trigger > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asel-pop { box-sizing: border-box; max-width: min(360px,calc(100vw - 24px)); }
form .asel, details .asel, td .asel { max-width: 100%; }
td form, details form, form { min-width: 0; }
td form input, td form textarea, details form input, details form textarea { max-width: 100%; box-sizing: border-box; }
.md-list .lr { min-width: 0; }
.md-list .lt { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.md-list .pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
.md-list .pills > * { flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.md-list .chip { max-width: 220px; }
.chip-more { background: var(--accent-bg,var(--accent-soft)); color: var(--accent); font-weight: 600; }
.atip { position: absolute; z-index: 9999; max-width: 340px; padding: 8px 11px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-ink); font: 500 12.5px/1.45 var(--font); box-shadow: var(--pop-shadow); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease,transform .12s ease; white-space: normal; word-wrap: break-word; }
.atip.show { opacity: 1; transform: translateY(0); }
.atip::after { content: ""; position: absolute; left: var(--ax,50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--tip-bg); transform: rotate(45deg); border-radius: 2px; }
.atip.below::after { bottom: auto; top: -5px; }
[data-ico="doc"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6v18h12V7z'/%3E%3Cpath d='M14 3v4h4M9 13h6M9 17h4'/%3E%3C/svg%3E") !important; }
[data-ico="list"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1'/%3E%3Ccircle cx='4.5' cy='12' r='1'/%3E%3Ccircle cx='4.5' cy='18' r='1'/%3E%3C/svg%3E") !important; }
[data-ico="bug"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='7' width='8' height='13' rx='4'/%3E%3Cpath d='M12 7V5M9 4l1.5 2M15 4l-1.5 2M4 12h4M16 12h4M5 18l3-2M19 18l-3-2M5 7l3 2M19 7l-3 2'/%3E%3C/svg%3E") !important; }
[data-ico="bars"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16'/%3E%3Crect x='5' y='11' width='3' height='7' rx='1'/%3E%3Crect x='10.5' y='6' width='3' height='12' rx='1'/%3E%3Crect x='16' y='14' width='3' height='4' rx='1'/%3E%3C/svg%3E") !important; }
[data-ico="pen"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E") !important; }
[data-ico="target"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='12' cy='12' r='.8'/%3E%3C/svg%3E") !important; }
[data-ico="clip"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='12' height='17' rx='2'/%3E%3Cpath d='M9 4h6v3H9zM9 12l2 2 4-4'/%3E%3C/svg%3E") !important; }
[data-ico="radar"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 12l5-5M12 4v2M4 12h2'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") !important; }
[data-ico="upload"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5'/%3E%3Cpath d='M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3'/%3E%3C/svg%3E") !important; }
[data-ico="report"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6v18h12V7z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cpath d='M9 17v-3M12 17v-5M15 17v-2'/%3E%3C/svg%3E") !important; }
[data-ico="check"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E") !important; }
[data-ico="cal"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E") !important; }
[data-ico="clock"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") !important; }
[data-ico="link"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E") !important; }
[data-ico="users"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M21 20c0-2.8-1.8-5.1-4.3-5.8'/%3E%3C/svg%3E") !important; }
[data-ico="chat"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E") !important; }
[data-ico="globe"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M3.5 12h17M12 3.5c2.5 2.6 2.5 14.4 0 17M12 3.5c-2.5 2.6-2.5 14.4 0 17'/%3E%3C/svg%3E") !important; }
[data-ico="award"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='5.5'/%3E%3Cpath d='M8.5 13.5L7 21l5-2.5 5 2.5-1.5-7.5'/%3E%3C/svg%3E") !important; }
[data-ico="wrench"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 6.5a4 4 0 0 0-5.3 5.3L4 17l3 3 5.2-5.2a4 4 0 0 0 5.3-5.3l-2.5 2.5-2.5-2.5z'/%3E%3C/svg%3E") !important; }
[data-ico="img"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.6'/%3E%3Cpath d='M20 16l-5-5-8 8'/%3E%3C/svg%3E") !important; }
[data-ico="warn"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l9 16H3z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E") !important; }
[data-ico="gear"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 3v2.5M12 18.5V21M3 12h2.5M18.5 12H21M5.6 5.6l1.8 1.8M16.6 16.6l1.8 1.8M5.6 18.4l1.8-1.8M16.6 7.4l1.8-1.8'/%3E%3C/svg%3E") !important; }
[data-ico="lock"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") !important; }
[data-ico="grid"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='4' y='13' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='13' width='7' height='7' rx='1.5'/%3E%3C/svg%3E") !important; }
[data-ico="book"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h10a3 3 0 0 1 3 3v13H8a3 3 0 0 1-3-3z'/%3E%3Cpath d='M5 17a3 3 0 0 1 3-3h10'/%3E%3C/svg%3E") !important; }
[data-ico="mail"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5.5' width='17' height='13' rx='2'/%3E%3Cpath d='M4 7l8 6 8-6'/%3E%3C/svg%3E") !important; }
[data-ico="plus"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") !important; }
[data-ico="search"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E") !important; }
[data-ico="info"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") !important; }
[data-ico="brief"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='7' width='16' height='12' rx='2'/%3E%3Cpath d='M9 7V5h6v2M4 12h16'/%3E%3C/svg%3E") !important; }
[data-ico="layers"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23244A73' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l8 4-8 4-8-4z'/%3E%3Cpath d='M4 12l8 4 8-4M4 16l8 4 8-4'/%3E%3C/svg%3E") !important; }
.eng.md-detail { container-type: inline-size; container-name: engdetail; }
.ov-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 16px; align-items: stretch; }
@container engdetail (min-width: 940px) {
  .ov-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) !important; }
}
.ov-grid > .ov-card { display: flex; flex-direction: column; min-width: 0; height: 100%; margin: 0; box-sizing: border-box; }
.ov-fw .ov-fw-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px !important; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--field); }
.ov-fw .ov-fw-form > label { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--quiet); white-space: nowrap; }
.ov-fw .ov-fw-form select, .ov-fw .ov-fw-form .asel { flex: 1 1 180px; min-width: 0 !important; height: 38px; min-height: 38px; background-color: var(--card); }
.ov-fw .ov-fw-form button { height: 38px; min-height: 38px; flex: none; }
.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.ov-kpi { --k: var(--quiet); --kb: var(--field); --kl: var(--rule-3); position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; min-height: 84px; padding: 12px 12px 12px 15px; box-sizing: border-box; border-radius: 10px; overflow: hidden; background: var(--kb) !important; border: 1px solid var(--kl) !important; }
.ov-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--k); }
.ov-kpi .st { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--k); white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: normal; word-break: normal; hyphens: none; }
.ov-kpi .st::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--k); flex: none; }
.ov-kpi b { display: block; margin: 0 !important; font-family: var(--font); font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ov-kpi-met { --k: var(--ok-ink); --kb: var(--field); --kl: var(--rule); }
.ov-kpi-no_exceptions { --k: var(--accent); --kb: var(--field); --kl: var(--rule); }
.ov-kpi-partial { --k: var(--warn-ink); --kb: var(--field); --kl: var(--rule); }
.ov-kpi-not_met { --k: var(--err-ink); --kb: var(--field); --kl: var(--rule); }
.ov-kpi-not_assessed { --k: var(--quiet); --kb: var(--field); --kl: var(--rule); }
.ov-client .ov-client-name { font-size: 18px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; margin: 0 0 12px; }
.ov-client .ov-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--field); overflow: hidden; }
.ov-client .ov-fact { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 14px; }
.ov-client .ov-fact + .ov-fact { border-top: 1px solid var(--rule); }
.ov-client .ov-fact dt { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--quiet); }
.ov-client .ov-fact dd { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.ov-client .ov-fact dd .chip { margin: 2px 4px 2px 0; }
.ov-client .ov-fact dd .ov-line { display: block; }
@container engdetail (max-width: 939px) {
  .ov-client .ov-facts { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .ov-client .ov-fact + .ov-fact { border-top: 0; }
}
.ov-client > #edit { margin-top: auto; padding-top: 14px; }
.ov-client > #edit > summary { display: inline-flex; align-items: center; margin: 0; height: 36px; padding: 0 14px; background: var(--card); color: var(--ink-2); border: 1px solid var(--rule-3); border-radius: 8px; box-shadow: var(--shadow); font-size: 13.5px; }
.ov-client > #edit > summary:hover { background: var(--field); color: var(--ink); }
.ov-client > #edit[open] > summary { margin-bottom: 16px; }
.eng .sev-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.eng .sev-card { min-width: 0; padding: 14px 16px; gap: 8px; }
.eng .sev-card .pill { white-space: nowrap; }
@container engdetail (max-width: 700px) {
  .eng .sev-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container engdetail (max-width: 440px) {
  .eng .sev-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.eng .steps .step-text { min-width: 0; }
.eng .steps .step-row, .eng .steps .step-meta { overflow-wrap: anywhere; }
@container engdetail (max-width: 560px) {
  .eng .steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.md-list .md-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 6px 18px 12px; }
.md-list .md-empty b { font-size: 14px; color: var(--ink); }
.md-list .md-empty .meta { margin: 0; line-height: 1.5; }
.md-list .md-empty .btn { margin-top: 6px; }
@media (max-width: 1100px) {
  .md > .md-list.is-empty { display: none; }
  .md:has(> .eng) > .md-list { order: 2; }
}
.ov-client .ov-facts, .ov-client .ov-fact, .ov-client .ov-fact dt, .ov-client .ov-fact dd { min-width: 0; }
.ov-client .ov-fact { grid-template-columns: minmax(88px, 104px) minmax(0, 1fr); }
.ov-client .ov-fact dd:has(> .chip) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; overflow-wrap: anywhere; }
.ov-client .ov-fact dd:has(> .chip) > .chip { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; word-break: break-word; margin: 0; }
/* ======== Carbon Mono shell (Phase 3) ========
   .app (100dvh column) = .gridbg (fixed, z0) + .cmd-slot (65px) + .workspace (only scroller) + .dock-slot (81px).
   Fixed layers: .cmdk (400), .confirm-backdrop (800), .atip (9999). Nothing else is position:fixed. */
html { scroll-behavior: auto; }
body.is-app { height: 100vh; height: 100dvh; overflow: hidden; margin: 0; }
.app { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; background: var(--bg); }
.gridbg { position: fixed; inset: 0; z-index: var(--z-grid); pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: var(--z-tip); padding: 8px 14px; border-radius: var(--r-ctl); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 10px; outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only, .sr, .rail-label { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Command slot + command bar */
.cmd-slot { position: relative; z-index: var(--z-chrome); flex: 0 0 var(--cmd-h); height: var(--cmd-h); box-sizing: border-box; padding: 10px 16px 8px; display: flex; align-items: center; justify-content: center; background: var(--bg); border-bottom: 1px solid var(--rule); }
.cmd-slot .p-cmd { display: flex; align-items: center; gap: 10px; width: 680px; max-width: calc(100vw - 32px); height: 46px; min-height: 46px; padding: 0 12px 0 14px; border-radius: var(--r-ctl) !important; background: var(--card); border: 1px solid var(--rule); color: var(--quiet); font: 500 13.5px/1 var(--font); cursor: pointer; text-align: left; transition: border-color .15s, color .15s, background .15s; box-shadow: var(--shadow); }
.p-cmd .ico { width: 18px; height: 18px; flex: 0 0 18px; }
.p-cmd-ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-cmd kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: var(--r-kbd); background: var(--code-bg); border: 1px solid var(--rule); color: var(--accent); }
.cmd-slot .p-cmd:hover, .cmd-slot .p-cmd[aria-expanded=true] { background: var(--card); border-color: var(--accent); color: var(--title); }

/* Workspace: the only scroll container */
.workspace { position: relative; z-index: var(--z-content); flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 0 8px; scroll-behavior: smooth; overscroll-behavior: contain; }
.workspace > main { position: relative; z-index: var(--z-content); max-width: 1360px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 20px 40px 32px; display: flex; flex-direction: column; gap: 18px; }
.workspace > main:focus { outline: none; }
.eng-tabs { position: sticky; top: 0; z-index: var(--z-tabs); }

/* Dock slot + dock */
.dock-slot { position: relative; z-index: var(--z-chrome); flex: 0 0 var(--dock-h); height: var(--dock-h); box-sizing: border-box; padding: 8px 12px 12px; display: flex; align-items: center; justify-content: center; background: var(--bg); border-top: 1px solid var(--rule); }
.dock { display: flex; align-items: center; gap: 6px; height: 60px; box-sizing: border-box; padding: 8px 10px; border-radius: var(--r-dock); background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); max-width: calc(100vw - 16px); }
.dock-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--r-icon); color: var(--ink-2); background: transparent; border: 0; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; list-style: none; }
.dock-btn::-webkit-details-marker { display: none; }
.dock-btn .ico { width: 20px; height: 20px; }
.dock-btn:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.dock-btn[aria-current=page], .dock-menu.is-current > .dock-btn, .dock-menu[open] > .dock-btn { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px var(--accent-line); }
.dock-new { background: var(--accent); color: var(--on-accent); }
.dock-new:hover { background: var(--accent-hover); color: var(--on-accent); }
.dock-new.is-locked { background: var(--tile); color: var(--quiet); border: 1px dashed var(--rule-3); }
.dock-new.is-locked:hover { color: var(--accent-hover); border-color: var(--accent-line); }
.dock-sep { width: 1px; height: 22px; background: var(--rule-3); flex: 0 0 1px; margin: 0 2px; }
.dock-menu { position: relative; }
.dock .dock-menu > summary { list-style: none; margin: 0; padding: 0; border: 0; font-weight: 600; gap: 0; }
.dock .dock-menu > summary.dock-btn { background: transparent; color: var(--ink-2); }
.dock .dock-menu > summary.dock-btn:hover, .dock .dock-menu.is-current > summary.dock-btn, .dock .dock-menu[open] > summary.dock-btn { background: var(--accent-soft); color: var(--accent); }
.dock .dock-menu > summary::before { content: none; display: none; }
.dock-menu > summary::-webkit-details-marker { display: none; }
.dock-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: 2px; border-radius: var(--r-ctl); background: var(--avatar-bg); color: var(--on-accent); font: 700 11px/1 var(--font); letter-spacing: .02em; cursor: pointer; }
.dock-menu[open] > .dock-avatar { box-shadow: 0 0 0 1px var(--accent-line), 0 0 0 3px var(--focus-ring); }

/* Dock menus (More / account): open ABOVE the trigger (F1 lives in A.4) */
.dock .menu-pop { position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%); z-index: var(--z-pop); display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--r-menu); background: var(--pop-bg); border: 1px solid var(--pop-line); box-shadow: var(--pop-shadow); max-height: min(calc(100dvh - var(--cmd-h) - var(--dock-h) - 16px), 640px); overflow-y: auto; text-align: left; }
.dock .menu-pop.menu-pop-end { left: auto; right: -10px; transform: none; }
.menu-label { padding: 10px 12px 4px; font: 600 11px/16.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--rule); }
.menu-user { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.menu-user strong { color: var(--title); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.menu-user span { color: var(--quiet); font-size: 12px; }
.menu-credits { font-family: var(--mono) !important; font-size: 12.5px !important; }
.menu-credits.is-exhausted { color: var(--err-ink) !important; }
.menu-pop form { margin: 0; }
.menu-pop .menu-signout { display: block; width: 100%; min-height: 0; height: auto; padding: 9px 12px; border-radius: var(--r-pill); background: transparent; border: 0; color: var(--err-ink); font: 500 14px/1.4 var(--font); text-align: left; cursor: pointer; box-shadow: none; }
.menu-pop .menu-signout:hover { background: var(--err-bg); color: var(--err-ink); }

/* Command palette (.cmdk) */
.cmdk { position: fixed; inset: 0; z-index: var(--z-cmdk); display: flex; justify-content: center; align-items: flex-start; padding: 72px 12px 12px; }
.cmdk[hidden] { display: none; }
.cmdk-back { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cmdk-box { position: relative; width: min(680px, calc(100vw - 24px)); max-height: min(630px, calc(100dvh - 96px)); display: flex; flex-direction: column; border-radius: var(--r-wiz); background: var(--pop-bg); border: 1px solid var(--pop-line); box-shadow: var(--pop-shadow); overflow: hidden; }
.cmdk-q { display: flex; align-items: center; gap: 10px; min-height: 57px; box-sizing: border-box; padding: 12px 16px; border-bottom: 1px solid var(--rule); color: var(--quiet); }
.cmdk-q .ico { width: 18px; height: 18px; flex: 0 0 18px; }
.cmdk-q input, .cmdk-q input:hover, .cmdk-q input:focus { flex: 1; min-width: 0; height: 32px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; outline: none; color: var(--title); font: 400 14px/1.4 var(--font); }
.cmdk-q kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: var(--r-kbd); background: var(--code-bg); border: 1px solid var(--rule); color: var(--quiet); }
.cmdk-clear { min-height: 0; height: 26px; width: 26px; padding: 0; border-radius: var(--r-kbd); background: transparent; border: 0; color: var(--quiet); font-size: 18px; line-height: 1; cursor: pointer; }
.cmdk-clear:hover { color: var(--title); background: var(--tile); }
.cmdk-list { overflow-y: auto; padding: 6px 0 8px; }
.cmdk-group { padding: 10px 16px 4px; font: 600 10.5px/15.75px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--quiet); }
.cmdk-item { display: flex; align-items: center; gap: 12px; min-height: 39px; box-sizing: border-box; padding: 9px 16px; color: var(--title); font: 550 14px/21px var(--font); text-decoration: none; cursor: pointer; }
.cmdk-item:hover, .cmdk-item.is-active, .cmdk-item[aria-selected=true] { background: var(--accent-soft); color: var(--title); text-decoration: none; }
.cmdk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-hint { flex: 0 0 auto; font: 400 12px/1 var(--mono); color: var(--quiet); }
.cmdk-empty { padding: 22px 16px; color: var(--quiet); font-size: 14px; text-align: center; }
body.cmdk-open { overflow: hidden; }

/* Confirm dialog (z 800; F5 in A.4) */
.confirm-backdrop { position: fixed; inset: 0; z-index: var(--z-confirm); display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
.confirm-backdrop[hidden] { display: none; }
.confirm-dialog { width: 100%; max-width: 440px; box-sizing: border-box; padding: 24px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--pop-line); box-shadow: var(--pop-shadow); }
.confirm-dialog h2 { margin: 0 0 8px; font: 600 18px/1.3 var(--display); color: var(--title); }
.confirm-dialog p { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Tooltip: viewport coordinates (fixed), z 9999 */
.atip { position: fixed; z-index: var(--z-tip); max-width: 340px; padding: 8px 11px; border-radius: var(--r-pill); background: var(--tip-bg); color: var(--tip-ink); border: 1px solid var(--tip-bg); font: 500 12.5px/1.45 var(--font); box-shadow: var(--pop-shadow); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; white-space: normal; overflow-wrap: anywhere; }
.atip::after { background: var(--tip-bg); border-right: 1px solid var(--tip-bg); border-bottom: 1px solid var(--tip-bg); }
.atip.below::after { border: 0; border-left: 1px solid var(--tip-bg); border-top: 1px solid var(--tip-bg); }

/* Leftover dark-on-ink rules from the old theme */
.steps a.next .step-num { background: var(--accent); color: var(--on-accent); }

/* Responsive shell (spec p.6) */
@media (max-width: 900px) {
  .cmd-slot { padding: 8px 12px; }
  .dock-slot { padding: 6px 8px 10px; }
  .dock { gap: 4px; padding: 8px; }
  .dock-btn { width: 38px; height: 38px; }
  .workspace > main { padding: 16px; }
}
@media (max-width: 768px) {
  .cmdk { padding-top: 12vh; }
  .p-cmd kbd { display: none; }
}
@media (max-width: 420px) {
  .dock { gap: 2px; padding: 8px 6px; }
  .dock-btn { width: 34px; height: 34px; border-radius: 12px; }
  .dock-avatar { width: 32px; height: 32px; }
}

/* ======== Carbon Mono components (Phase 4) — states D/H/F/A/S/X/L/E per spec §7 ======== */
/* Type */
body { font-family: var(--font); color: var(--ink); background: var(--bg); }
h1 { font-family: var(--display); color: var(--title); }
h2, h3 { color: var(--title); }
code, kbd, samp, .mono, .id-tag { font-family: var(--mono); }
::selection { background: var(--accent-line); color: var(--title); }

/* Focus (D49): 2px accent (navy) outline on everything interactive; fields use the border + ring instead */
:focus { outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
.dock-btn:focus-visible, .dock-avatar:focus-visible, .cmd-slot .p-cmd:focus-visible, .asel-trigger:focus-visible,
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; }
.workspace > main:focus-visible { outline: none !important; }
/* Navy/red filled controls: an inner white ring keeps focus visible on the dark fill as well as the outer navy outline on the page (navy audit) */
:is(button.primary, .btn.primary, button.danger, .btn.danger, .dock-avatar):focus-visible { box-shadow: inset 0 0 0 2px var(--card) !important; }
/* Scrollable table containers are keyboard-focusable in Chromium: show where focus is */
.table-wrap:focus-visible, input[type=file]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workspace:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Buttons (§7.5–7.6): radius 3, flat */
button, .btn { border-radius: var(--r-ctl) !important; box-shadow: none; transition: background .15s, box-shadow .15s, border-color .15s, color .15s; gap: 8px; }
button:hover, .btn:hover { filter: none; }
button.secondary, .btn.secondary { background: var(--card); color: var(--title); border: 1px solid var(--field-line); font-weight: 600; }
button.secondary:hover, .btn.secondary:hover { background: var(--accent-soft); color: var(--title); }
button.danger, .btn.danger { height: 36px; min-height: 36px; padding: 0 12px; background: var(--danger); color: var(--on-accent); border: 1px solid var(--danger) !important; font-size: 13px; font-weight: 600; }
button.danger:hover, .btn.danger:hover { background: color-mix(in srgb, var(--danger) 88%, var(--title)); color: var(--on-accent); }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--rule-3); }
button.ghost:hover, .btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn.ghost.danger, button.ghost.danger { background: transparent; color: var(--err-ink); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent) !important; }
button.linkbtn { background: none; border: 0; color: var(--accent); padding: 0; height: auto; min-height: 0; font-weight: 600; }
button.linkbtn:hover { background: none; color: var(--accent-hover); text-decoration: underline; }
button:disabled, .btn[aria-disabled=true], button[aria-busy=true] { opacity: .5; cursor: not-allowed; filter: none !important; } /* disabled colours: Light theme block after A.4 */
button.small, .btn.small { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }

/* Text inputs / textarea (§7.7): radius 11, --field-line border, field fill; F = accent border + 3px ring; E = aria-invalid */
input, select, textarea {
  border-radius: var(--r-input); border: 1px solid var(--field-line); background: var(--field); color: var(--title); font-family: var(--font); font-size: 14px;
  transition: border-color .15s, box-shadow .15s, background .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--quiet); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); background: var(--field-focus); }
input[type=checkbox], input[type=radio], input[type=range], input[type=file] { border: 0; background: none; box-shadow: none; border-radius: 0; }
input[type=checkbox]:focus, input[type=radio]:focus, input[type=file]:focus { box-shadow: none; background: none; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
input[type=date], input[type=datetime-local], input[type=time], input[type=month] { color-scheme: light; }
input:disabled, select:disabled, textarea:disabled, .asel.is-disabled { opacity: .55; cursor: not-allowed; }
[aria-invalid=true], input:user-invalid, textarea:user-invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--err-ink) 22%, transparent) !important; }
.field-error, .error-text, [aria-invalid=true] + .hint { color: var(--err-ink); }
label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.hint, .meta, small { color: var(--quiet); }
/* File inputs (D16) */
input[type=file] { color: var(--quiet); font-size: 13px; max-width: 100%; }
input[type=file]::file-selector-button { margin-right: 12px; height: 36px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--field-line); background: var(--card); color: var(--title); font: 600 13px var(--font); cursor: pointer; transition: background .15s; }
input[type=file]::file-selector-button:hover { background: var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

/* Custom select (§7.8; F4 in A.4) */
.asel-trigger { height: 40px; min-height: 40px; padding: 0 14px 0 16px; border-radius: var(--r-input) !important; border: 1px solid var(--field-line) !important; background: var(--field) !important; color: var(--title) !important; font: 500 14px var(--font); filter: none !important; }
.asel-trigger.is-placeholder .asel-value { color: var(--placeholder); }
.asel-pop { z-index: var(--z-pop); background: var(--pop-bg); border: 1px solid var(--pop-line); border-radius: var(--r-pop); padding: 6px; box-shadow: var(--pop-shadow); max-height: 300px; }
.asel-search { height: 36px !important; min-height: 36px !important; margin-bottom: 4px; }
.asel-opt { min-height: 39px; box-sizing: border-box; padding: 9px 36px 9px 12px; border-radius: var(--r-kbd); color: var(--ink-2); font-size: 14px; position: relative; }
.asel-opt.is-active { background: var(--accent-soft); color: var(--title); font-weight: 600; }
.asel-opt.is-selected { background: var(--accent-soft); color: var(--title); }
.asel-opt.is-selected::after { content: ""; position: absolute; right: 14px; top: 50%; width: 10px; height: 5px; margin-top: -4px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.asel-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.asel-group { padding: 8px 12px 4px; font: 600 11px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
/* Popover anti-clip (spec §2.2) */

/* Checkbox chips (§7.9) */
.checks label { min-height: 40px; padding: 10px 12px; border-radius: var(--r-menu); background: var(--field); border: 1px solid var(--rule); color: var(--title); }
.checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); }

/* Pills / chips / env / finding status (§7.10; D15, D18) */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; text-transform: capitalize; line-height: 1.5; background: var(--neu-bg); color: var(--ink-2); }
.pill.critical, .pill.fail { background: var(--p-crit-bg); color: var(--crit); }
.pill.high { background: var(--p-high-bg); color: var(--high); }
.pill.medium, .pill.warn { background: var(--p-med-bg); color: var(--med); }
.pill.low { background: var(--p-low-bg); color: var(--low); } .pill.neu { background: var(--neu-bg); color: var(--neu); } .pill.run { background: var(--run-bg); color: var(--run); }
.pill.info { background: var(--p-info-bg); color: var(--info); } /* D18: info is neutral, not accent */
.pill.pass { background: var(--pass-bg); color: var(--pass); }
.pill.critical::before, .pill.high::before, .pill.medium::before, .pill.low::before, .pill.info::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; flex: none; }
.pill.info::before { background: var(--dot-info); opacity: 1; }
.chip { border-radius: var(--r-pill); padding: 3px 9px; background: var(--chip); color: var(--ink-2); font-weight: 500; }
.env { border-radius: var(--r-pill); background: var(--neu-bg); color: var(--ink-2); font-weight: 500; }
.env-staging, .env-uat { background: var(--accent-soft); color: var(--accent); }
.env-production { background: var(--p-crit-bg); color: var(--crit); }
.env::before { width: 7px; height: 7px; }
.fs { padding: 2px 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; gap: 6px; background: var(--neu-bg); }
.fs::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.fs-new { color: var(--warnp); background: var(--warn-bg); }                       /* D15 New = orange */
.fs-triaged, .fs-validated { color: var(--ink-2); background: var(--neu-bg); }      /* neutral */
.fs-fixed, .fs-retest_passed { color: var(--pass); background: var(--pass-bg); }    /* emerald */
.fs-risk_accepted, .fs-false_positive { color: var(--quiet); background: var(--neu-bg); }
.status-pill { border-radius: var(--r-pill) !important; font-weight: 600; font-size: 12px; text-transform: capitalize; }
.status-pill.overdue { background: var(--p-crit-bg) !important; color: var(--crit) !important; }
.status-pill.due { background: var(--p-med-bg) !important; color: var(--med) !important; }
/* Swatches (D37): use these classes instead of inline light colours */
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--rule-3); vertical-align: -1px; }
.swatch.sw-crit, .swatch.sw-overdue { background: var(--err-bg); border-color: var(--err-ink); }
.swatch.sw-med, .swatch.sw-due { background: var(--warn-bg); border-color: var(--warn); }
.swatch.sw-ok, .swatch.sw-done { background: var(--ok-bg); border-color: var(--ok); }
.swatch.sw-neu { background: var(--neu-bg); border-color: var(--dot-info); }
.swatch.sw-accent { background: var(--accent-soft); border-color: var(--accent); }

/* Cards & stat tiles (§7.11) */
.card, .tile, .md-list { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card) !important; box-shadow: none; }
.card { padding: 18px 20px 20px; }
.card > h2:first-child, .card-head { margin: -18px -20px 12px; padding: 18px 20px 6px; border-bottom: 0; }
.card > table, .card > .table-wrap { margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); }
.card > table:last-child, .card > .table-wrap:last-child { margin-bottom: -20px; }
.card > table th:first-child, .card > table td:first-child, .card > .table-wrap th:first-child, .card > .table-wrap td:first-child { padding-left: 20px; }
.card > table th:last-child, .card > table td:last-child, .card > .table-wrap th:last-child, .card > .table-wrap td:last-child { padding-right: 20px; }
.card-head[data-ico]::before, .card > h2[data-ico]::before { border-radius: var(--r-pop); }
.stat-card, .stat { border-radius: var(--r-card) !important; padding: 16px 18px; gap: 4px; }
.sev-card { border-radius: var(--r-card) !important; box-shadow: none; }
.sev-strip { gap: 12px; }

/* Tables (§7.12) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--quiet); background: var(--surface-2); border-bottom: 1px solid var(--rule-3); }
td { padding: 12px; font-size: 14px; line-height: 21px; color: var(--ink); border-bottom: 1px solid var(--rule-2); vertical-align: top; }
tbody tr:hover > td { background: var(--brand-soft); }
td.mono, td code, td .mono { font-family: var(--mono); font-size: 12.5px; color: var(--quiet); }
td.empty, tr.empty td { text-align: center; color: var(--quiet); padding: 28px 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.wrap-any, code, .mono { overflow-wrap: anywhere; }

/* Engagement tabs & sub-nav (§7.13; F2 in A.4) */
.eng-tabs { background: var(--bg); padding: 6px 0; gap: 2px; border-radius: 0; }
.eng-tabs a { padding: 10px 14px; border-radius: var(--r-pill); color: var(--quiet); font-weight: 500; text-decoration: none; }
.eng-tabs a:hover { color: var(--ink); background: var(--tile); }
.eng-tabs a[aria-current=page], .eng-tabs a.on, .eng-tabs a[aria-selected=true] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); background: transparent; }
.subnav a { padding: 5px 13px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; text-decoration: none; }

/* Flash (§7.17; D3 emerald; F7 in A.4) */
.flash { border-radius: var(--r-menu); padding: 12px 14px; font-size: 14px; border: 1px solid transparent; }
.flash.ok, .flash.success { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok-ink) 35%, transparent); }
.flash.err, .flash.error { background: var(--err-bg); color: var(--err-ink); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent); }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 35%, transparent); }
.flash.info { background: var(--neu-bg); color: var(--ink-2); border-color: var(--rule-3); }

/* Empty state (§7.19) */
.empty, .empty-state { text-align: center; padding: 40px 20px; color: var(--quiet); font-size: 14px; line-height: 21px; }

/* Evidence / code block (§7.22) */
pre, .proof, .code-block { background: var(--field) !important; border: 1px solid var(--rule) !important; border-radius: var(--r-pill) !important; padding: 14px 16px; font: 400 12.5px/21.25px var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }
:not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--tile); color: var(--ink); font-size: .92em; }

/* Generic <details> disclosure (not menus) */
details:not(.dock-menu):not([data-menu]) > summary { border-radius: var(--r-pill); }

/* Error / 404 card (D2) */
.err-card { max-width: 560px; margin: 40px auto; text-align: center; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--rule-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule-3); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .workspace { scroll-behavior: auto; }
}
@media (max-width: 700px) {
  .card > table, .card > .table-wrap { display: block; overflow-x: auto; }
}

/* ======== Phase 7 integration fixes (Lead) ======== */
/* B-3: the HTML hidden attribute always wins over component display rules */
[hidden] { display: none !important; }
/* D51: eyebrows are muted mono caps (renders W4 A15); the accent is reserved for active/selected */
.eyebrow { color: var(--quiet); font-family: var(--mono); font-weight: 500; font-size: 12px; }
/* D-4 (W-D): Met / Passed / Verified is emerald everywhere */
.st-met { color: var(--pass); }
/* E-1: layout grids go single column at <=1000 (stat strips keep their own 2-col rule) */
@media (max-width: 1000px) {
  .split, .dash-grid, .grid.cols-2, .grid.cols-3, .cols-2, .cols-3, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr) !important; }
}
/* D52: the finding page side column falls back to static when taller than the workspace (.is-tall, W-D section of attestra.js) */
/* signed-out auth-top "Sign in" link (was an inline style) */
body.is-auth .auth-top .auth-signin { margin-left: auto; font-weight: 600; color: var(--accent); }
/* D53: tabs inside the horizontally scrolling .eng-tabs strip use an inset focus ring (-2px) so the
   2px ring is not clipped by the scroll container; every other control keeps D49 (2px outside) */
.eng-tabs a:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: -2px; }

/* ======== A.3 Carbon Mono overrides on the base stylesheet (PDF p.254) ======== */
/* Carbon Mono overrides (applied after the base stylesheet) */
.gridbg{background-image:linear-gradient(to right,var(--grid-line) 1px,transparent 1px),linear-gradient(to bottom,var(--grid-line) 1px,transparent 1px)!important;background-size:32px 32px!important}
h1,h2,.display,.eyebrow{letter-spacing:-.02em}
h1{font-weight:600}
.eyebrow{text-transform:uppercase;letter-spacing:.14em}
.card,.wiz,.stat-card,.stat,.md-list,.tile{box-shadow:none!important;border-color:var(--rule)!important}
.p-cmd,.dock{box-shadow:var(--shadow)!important;border-color:var(--rule)!important}
.p-cmd{background:var(--card)!important;color:var(--quiet)!important;border:1px solid var(--rule)!important}
.p-cmd:hover{border-color:var(--accent)!important;color:var(--title)!important}
.p-cmd kbd{background:var(--code-bg)!important;border:1px solid var(--rule)!important;color:var(--accent)!important}
button.primary,.btn.primary,.primary,.dock .dock-new{box-shadow:none!important}

/* ======== A.4 Corrections F1-F9 (PDF pp.254-255) ======== */
/* ===== Carbon Mono corrections (target design) — appended AFTER the recoloured attestra.css =====
Each block replaces a leftover light-theme / unthemed rule found in the reference build. */
/* F1 Dock "More" menu: .dock a (42x42 icon button) leaked onto menu links */
.dock .menu-pop a { width: auto; height: auto; display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px;
font-weight: 500; white-space: nowrap; color: var(--ink-2); }
.dock .menu-pop a:hover { background: var(--accent-soft); color: var(--title); }
.dock .menu-pop a[aria-current=page] { background: var(--accent-soft); color: var(--accent-hover); box-shadow: none; }
.dock .menu-pop { min-width: 230px; width: max-content; }
/* F2 Engagement sub-navigation chips were white */
.subnav a { background: var(--field); border: 1px solid var(--rule-3); color: var(--ink-2); }
.subnav a:hover { border-color: var(--accent-line); color: var(--title); background: var(--accent-soft); }
.subnav a[aria-current=page] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
/* F3 Framework control-status tiles (overview) were pastel light */
.ov-kpi { background: var(--field) !important; border: 1px solid var(--rule) !important; }
.ov-kpi-met { --k: var(--ok-ink); } .ov-kpi-no_exceptions { --k: var(--accent); } .ov-kpi-partial { --k: var(--warn-ink); }
.ov-kpi-not_met { --k: var(--err-ink); } .ov-kpi-not_assessed { --k: var(--quiet); }
/* F4 Custom select hover/focus: no white flash, accent focus ring */
.asel-trigger:hover { background: var(--field) !important; border-color: var(--quiet) !important; color: var(--title) !important; }
.asel-trigger:focus-visible, .asel.is-open .asel-trigger { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--focus-ring) !important; }
/* F5 Confirm dialog had a transparent background (undefined --surface2) and a navy shadow */
.confirm-dialog { background: var(--card) !important; box-shadow: var(--pop-shadow); }
.confirm-dialog h2 { font-family: var(--display); color: var(--title); }
/* F6 Register page light cards, logo drop zone, public grade chip, calendar legend swatches */
.ls-card, .login-c .note { background: var(--card); border-color: var(--rule); color: var(--ink-2); }
.ls-card li, .ls-card p { color: var(--ink-2); }
.ls-card li b, .ls-card li strong { color: var(--title); }
.logo-drop { background: var(--surface-2); border: 1.5px dashed var(--field-line); }
.grade { background: var(--accent-soft) !important; color: var(--title) !important; border-color: var(--accent-line) !important; }
.swatch { opacity: 1; }
/* F7 Success flash border and tooltip font */
.flash, .flash.ok { border-color: color-mix(in srgb, var(--ok-ink) 35%, transparent) !important; }
.flash.err, .flash.error { border-color: color-mix(in srgb, var(--err-ink) 35%, transparent) !important; }
.flash.warn { border-color: color-mix(in srgb, var(--warn-ink) 35%, transparent) !important; }
.status-pill.disabled, .status-pill.inactive { background: var(--neu-bg) !important; color: var(--quiet) !important; }
.atip { font-family: var(--font); }
/* F8 Native controls must inherit the UI font (login/register buttons rendered in Arial) */
button, input, select, textarea { font-family: var(--font); }
.swatch[style*="FEE4E2"] { background: var(--err-bg) !important; border-color: var(--err-ink) !important; }
.swatch[style*="FEF0C7"] { background: var(--warn-bg) !important; border-color: var(--warn) !important; }
.swatch[style*="DCFAE6"] { background: var(--ok-bg) !important; border-color: var(--ok) !important; }
/* F9 Step-number badges: idle --surface-2 + --ink-2, current --accent + white */
.wstep-link b, .ws .n { color: var(--ink-2); }
.wstep-link.on b, .ws.on .n { color: var(--on-accent); }

/* ======== Light theme component states (W3) — final word on shared components, after A.4 and before the page layers ======== */
/* L5: headings are IBM Plex Sans 600 */
h1, h2, h3, h4, .display { font-family: var(--display); font-weight: 600; }
/* links: --accent, underlined on hover and always inside running copy */
p a:not(.btn):not(.row-title), .lede a, .hint a, .meta a, li > a:not(.btn):not(.row-title):not([class]) { text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a.btn:hover, a.btn.primary:hover { color: inherit; }
/* technical surfaces (L18): light code panels */
pre, .proof, .code-block { background: var(--code-bg) !important; color: var(--code-ink) !important; border: 1px solid var(--rule) !important; }
:not(pre) > code { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--rule-2); }
kbd { background: var(--code-bg); border: 1px solid var(--rule); color: var(--code-ink); border-radius: var(--r-kbd); padding: 1px 6px; }
/* disabled controls (L27): flat fill + muted ink + not-allowed, no hover change */
button:disabled, .btn[aria-disabled=true], input[type=submit]:disabled { background: var(--disabled-bg) !important; color: var(--disabled-ink) !important; border: 1px solid var(--rule-3) !important; opacity: 1 !important; cursor: not-allowed; }
button.linkbtn:disabled { background: none !important; border: 0 !important; }
button[aria-busy=true] { cursor: progress; }
input:disabled, select:disabled, textarea:disabled, .asel.is-disabled .asel-trigger { background: var(--disabled-bg) !important; color: var(--disabled-ink) !important; border-color: var(--rule-3) !important; opacity: 1; cursor: not-allowed; -webkit-text-fill-color: var(--disabled-ink); }
input[type=checkbox]:disabled, input[type=radio]:disabled { background: none !important; opacity: .55; }
/* success state on a field (valid after interaction) keeps the neutral border; error text carries an icon-free label via .field-error */
/* severity / status pills: tint + ink pairs from 02 §5 (text label always present, SC 1.4.1) */
.pill { background: var(--neu-bg); color: var(--neu); }
.pill.critical, .pill.fail { background: var(--p-crit-bg); color: var(--crit); }
.pill.high { background: var(--p-high-bg); color: var(--high); }
.pill.medium { background: var(--p-med-bg); color: var(--med); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.low { background: var(--p-low-bg); color: var(--low); }
.pill.run { background: var(--run-bg); color: var(--run); }
.pill.neu { background: var(--neu-bg); color: var(--neu); }
.pill.info { background: var(--p-info-bg); color: var(--info); }
.pill.pass { background: var(--pass-bg); color: var(--pass); }
.pill.critical::before { background: var(--dot-crit); opacity: 1; } .pill.high::before { background: var(--dot-high); opacity: 1; }
.pill.medium::before { background: var(--dot-med); opacity: 1; } .pill.low::before { background: var(--dot-low); opacity: 1; }
.chip.done { background: var(--ok-bg); color: var(--ok-ink); }
.badge { background: var(--warn-bg); color: var(--warn-ink); }
.env-production { background: var(--p-crit-bg); color: var(--crit); }
/* finding workflow (D15 map re-pointed, 02 §3): open/new neutral · triaged blue · validated/accepted amber · fixed/passed green · false positive neutral */
.fs-new { color: var(--neu); background: var(--neu-bg); }
.fs-triaged { color: var(--run); background: var(--run-bg); }
.fs-validated, .fs-risk_accepted { color: var(--warn-ink); background: var(--warn-bg); }
.fs-fixed, .fs-retest_passed { color: var(--pass); background: var(--pass-bg); }
.fs-false_positive { color: var(--neu); background: var(--neu-bg); }
.status-pill.done, .status-pill.passed, .status-pill.active { background: var(--pass-bg) !important; color: var(--pass) !important; }
.status-pill.overdue { background: var(--err-bg) !important; color: var(--err-ink) !important; }
.status-pill.due { background: var(--warn-bg) !important; color: var(--warn-ink) !important; }
/* control / scan status text */
.st-met, .st-succeeded, .st-completed, .st-done { color: var(--pass); }
.st-no_exceptions { color: var(--accent); }
.st-partial, .st-queued { color: var(--warn-ink); }
.st-running { color: var(--run); }
.st-not_met, .st-failed, .st-refused, .st-error, .st-halted { color: var(--err-ink); }
.st-not_assessed, .st-not_applicable, .st-cancelled { color: var(--quiet); }
/* tabs: selected = soft fill + accent text + bottom bar (never colour alone); sub-nav chips stay F2 */
.eng-tabs a[aria-current=page], .eng-tabs a.on, .eng-tabs a[aria-selected=true] { background: var(--accent-soft); }
.eng-tabs a:hover { background: var(--accent-soft); color: var(--title); }
/* tables: selected rows */
tbody tr[aria-selected=true] > td, tbody tr.is-selected > td { background: var(--accent-soft); }
/* focus (L21): 2 px --accent outline offset 2 on cards and tinted surfaces too */
.asel-trigger:focus-visible, .asel.is-open .asel-trigger { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--focus-ring) !important; }
/* B1 (360 px): the closed dock More/account panel was laid out 5 px past the right edge; keep closed panels out of layout and cap open ones to the viewport */
.dock .dock-menu:not([open]) > .menu-pop { display: none; }
.dock .menu-pop { max-width: calc(100vw - 16px); }
@media (max-width: 420px) {
  .dock .menu-pop.menu-pop-end { right: 0; max-width: calc(100vw - 16px); min-width: min(230px, calc(100vw - 16px)); }
  /* Lead QA (360 px, short role docks): anchor both dock menus to the centred dock, not to the trigger, so a 230 px panel never leaves the viewport */
  .dock { position: relative; }
  .dock .dock-menu { position: static; }
  .dock .menu-pop, .dock .menu-pop.menu-pop-end { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(100% + 4px); }
}


/* ======== Page layer W-A (merged from carbon-pages-a.css in Phase 7) ======== */
/* W-A page styles (written in Phase 5 as carbon-pages-a.css).
   Scope every rule under a page hook (body/main class or a page root id) so it cannot leak to other workers' pages.
   W-A hooks: body.cm-public (login, register, share, _public, verify 404), .pg-login, .pg-register, .pg-share, .pg-public,
   main.pg-auth (invite/reset), main.pg-404, main.pg-home, main.pg-dash, main.pg-sites, main.pg-tuning, main.pg-cal.
   Shared includes owned by W-A (used on other workers' pages too): .locked-feature, .sub-banner. */

/* ======== Public chrome (no shell): grid background on --bg ======== */
body.cm-public {
  min-height: 100vh; min-height: 100dvh; margin: 0; background-color: var(--bg);
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}
body.cm-public h1 { margin: 0; font: 600 26px/1.25 var(--display); letter-spacing: -.02em; color: var(--title); }
body.cm-public .flash { margin: 0; }

/* Logo tile (P01/P02): official green Attestra mark (--logo-*), unchanged (L35) */
.cm-public .lp-logo { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--logo-bg); color: var(--logo-ink); box-shadow: none; }
.cm-public .lp-logo svg { width: 22px; height: 22px; }

/* Shared auth form pieces (login, register, invite, reset) */
.cm-public .reg-form, .pg-auth .auth-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.cm-public .lp-field, .pg-auth .lp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-public .lp-field label, .pg-auth .lp-field label { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-2); }
.cm-public .lp-field input, .pg-auth .lp-field input { width: 100%; height: 40px; min-height: 40px; margin: 0; padding: 0 14px; font: 400 14px/1.4 var(--font); } /* F8 */
.cm-public .lp-field .hint, .pg-auth .lp-field .hint { margin: 0; }
.cm-public .lp-submit { width: 100%; height: 44px; min-height: 44px; margin: 4px 0 0; font: 600 14px var(--font); }
.cm-public .req, .pg-auth .req { color: var(--err-ink); }
.cm-public .lp-foot { margin: 0; font-size: 12px; color: var(--quiet); text-align: center; }

/* ======== P02 Register (.reg-c: 1fr 440, gap 28, pad 28; story hidden <=1000, D24) ======== */
.pg-register main.reg-c { max-width: none; width: 100%; min-height: 100vh; min-height: 100dvh; margin: 0; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 28px; padding: 28px; align-items: start; }
.pg-register .reg-story { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 34px 38px; box-sizing: border-box; min-height: calc(100dvh - 56px);
  border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--card); }
.pg-register .reg-brand { display: inline-flex; align-items: center; gap: 10px; font: 600 15px var(--brand-font); color: var(--title); }
.pg-register .reg-brand .lp-logo { width: 32px; height: 32px; box-shadow: none; }
.pg-register .reg-brand .lp-logo svg { width: 18px; height: 18px; }
.pg-register .reg-headline { display: block; margin: 10px 0 0; font: 600 26px/1.2 var(--brand-font); letter-spacing: -.02em; color: var(--title); }
.pg-register .reg-intro { margin: 0; max-width: 720px; font-size: 14px; line-height: 1.55; color: var(--quiet); }
.pg-register .reg-get { max-width: 600px; margin: 6px 0 0; padding: 16px 18px; background: var(--card); border-color: var(--rule); } /* F6 */
.pg-register .reg-get-title { margin: 0 0 6px; font: 600 12px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pg-register .reg-steps { list-style: none; margin: 0; padding: 0; }
.pg-register .reg-steps li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.pg-register .reg-steps li:first-child { border-top: 0; }
.pg-register .reg-steps b { width: 22px; flex: none; font: 500 13px/1.5 var(--mono); color: var(--accent); }
.pg-register .reg-steps strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--title); }
.pg-register .reg-steps span { display: block; font-size: 13px; line-height: 1.45; color: var(--quiet); }
.pg-register .reg-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pg-register .reg-card { margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 16px; overflow: visible; }
.pg-register .reg-top { margin: 0; text-align: right; font-size: 12.5px; color: var(--quiet); }
.pg-register .reg-head h1 { font-size: 22px; }
.pg-register .reg-sub { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--quiet); }
.pg-register .reg-note { margin: 0; padding: 12px 14px; border-radius: var(--r-menu); background: var(--field); border: 1px solid var(--rule); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); } /* F6: dark note */
.pg-register .reg-note b { color: var(--title); }
.pg-register .reg-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1000px) {
  .pg-register main.reg-c { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .pg-register .reg-story { display: none; }
}

/* ======== Public pages: P03 share, P04 verify (+ invalid-link 404, D10), X02 trust center ======== */
body.cm-public.public .trust-top { max-width: 880px; margin: 0 auto; box-sizing: border-box; padding: 24px 24px 16px; display: flex; align-items: center; gap: 10px;
  font: 600 15px var(--display); color: var(--title); border-bottom: 1px solid var(--rule); }
body.cm-public.public .trust-top .mark { width: 32px; height: 32px; border-radius: var(--r-ctl); }
body.cm-public.public .trust-top .mark svg { width: 18px; height: 18px; }
body.cm-public.public main { max-width: 960px; width: 100%; margin: 0 auto; box-sizing: border-box; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 18px; }
body.cm-public.pg-public main { max-width: 880px; }
body.cm-public.public .card { margin: 0; padding: 22px 24px; }
body.cm-public.public .card > h2:first-child, body.cm-public.public .card-head { margin: -22px -24px 12px; padding: 18px 24px 6px; }
body.cm-public.public .card > .table-wrap { margin-left: -24px; margin-right: -24px; width: calc(100% + 48px); }
body.cm-public.public .card > .table-wrap:last-child { margin-bottom: -22px; }
body.cm-public.public .card > .table-wrap th:first-child, body.cm-public.public .card > .table-wrap td:first-child { padding-left: 24px; }
body.cm-public.public .card > .table-wrap th:last-child, body.cm-public.public .card > .table-wrap td:last-child { padding-right: 24px; }
body.cm-public.public h2 { margin: 0; font: 600 16px/1.3 var(--display); color: var(--title); }
body.cm-public.public p { margin: 0; }
body.cm-public.public .card p + p, body.cm-public.public .card p + dl, body.cm-public.public .card p + .qr-tile { margin-top: 8px; }
body.cm-public.public .meta { color: var(--quiet); font-size: 13px; }
body.cm-public.public code { padding: 1px 5px; border-radius: 4px; background: var(--tile); border: 0; color: var(--ink); font: 400 12.5px/1.5 var(--mono); }
body.cm-public.public .ok { color: var(--pass); font-weight: 600; }
body.cm-public.public .bad { color: var(--err-ink); font-weight: 600; }
body.cm-public .pub-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
body.cm-public .pub-head .eyebrow { color: var(--quiet); font-size: 12px; }
body.cm-public .pub-head .lede { color: var(--quiet); }
body.cm-public .empty { margin: 0; }
body.cm-public .pub-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--quiet); }
body.cm-public .pub-foot p { margin: 0 0 8px; }
body.cm-public .pub-foot summary { cursor: pointer; color: var(--accent); font-weight: 600; }
body.cm-public .pub-foot summary:hover { color: var(--accent-hover); }
body.cm-public .pub-foot details p { margin: 8px 0 0; line-height: 1.55; }

/* P03 grade chip (F6: accent-soft, text label) */
.pg-share .grade { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--accent-line); font: 600 20px/1.2 var(--display); }
.pg-share .grade.grade-untested { background: var(--neu-bg) !important; color: var(--ink-2) !important; border-color: var(--rule-3) !important; } /* overrides A.4 F6 for the untested state */
.pg-share td.reason, .pg-share td.ttl { min-width: 220px; overflow-wrap: anywhere; }
.pg-share td.mono { color: var(--ink-2); white-space: nowrap; }
.pg-share .res { font: 500 12.5px/1.5 var(--mono); color: var(--quiet); white-space: nowrap; }
.pg-share .res-pass, .pg-share .res-passed, .pg-share .res-ok { color: var(--pass); }
.pg-share .res-fail, .pg-share .res-failed { color: var(--err-ink); }
.pg-share .res-partial, .pg-share .res-warn { color: var(--warnp); }

/* P04 verify */
.pg-public .vr-result { font-size: 15px; }
.pg-public .vr-result + .kv { margin-top: 12px; }
.pg-public .kv { margin: 0; display: flex; flex-direction: column; }
.pg-public .kv > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule-2); }
.pg-public .kv > div:first-child { border-top: 0; }
.pg-public .kv dt { font-size: 13px; color: var(--quiet); }
.pg-public .kv dd { margin: 0; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.pg-public .qr-tile { display: inline-block; width: 196px; max-width: 100%; margin: 12px 0; padding: 8px; box-sizing: border-box; border-radius: var(--r-menu); background: var(--card); border: 1px solid var(--rule); } /* white quiet zone keeps the QR scannable */
.pg-public .qr-tile svg { display: block; width: 100%; height: auto; }
.pg-public .vr-link { overflow-wrap: anywhere; }
@media (max-width: 600px) { .pg-public .kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* X02 trust center */
.pg-public .pub-sec { display: flex; flex-direction: column; gap: 10px; }
.pg-public .pub-sec > h2 { margin-top: 8px; }
.pg-public .pub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-public .pub-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); line-height: 1.55; }
.pg-public .pub-list strong { color: var(--title); }
.pg-public .pub-item { display: flex; flex-direction: column; gap: 8px; }
.pg-public .pub-item .card + .card { margin-top: 0; }
.pg-public .pub-item-title { font-size: 15px; color: var(--title); }
.pg-public .pub-sec .card + .card { margin-top: 0; }
.pg-public .pub-item > a.btn { align-self: flex-start; }
.pg-public .trust-req > summary { display: inline-block; padding: 4px 0; cursor: pointer; color: var(--accent); font-weight: 600; }
.pg-public .trust-req > summary:hover { color: var(--accent-hover); }
.pg-public .trust-req form { display: flex; flex-direction: column; gap: 6px; max-width: 460px; padding-top: 10px; }
.pg-public .trust-req label { display: block; margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pg-public .trust-req input:not([type=checkbox]), .pg-public .trust-req textarea { width: 100%; box-sizing: border-box; height: 40px; padding: 0 14px; border-radius: var(--r-input); font-size: 14px; }
.pg-public .trust-req textarea { height: auto; min-height: 88px; padding: 10px 14px; resize: vertical; }
.pg-public .trust-req .trust-nda { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--ink-2); }
.pg-public .trust-req button { align-self: flex-start; margin-top: 8px; }

/* ======== P05 error / 404 card (D2: 560, width-32 on small screens) and the P04 invalid-link card ======== */
.pg-404 .err-card, body.cm-public .pub-err { width: 100%; max-width: 560px; box-sizing: border-box; margin: 24px auto 0; padding: 26px 24px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pg-404 .err-code, body.cm-public .err-code { margin: 0; font: 600 13px/1 var(--mono); letter-spacing: .12em; color: var(--quiet); }
.pg-404 .err-card h1, body.cm-public .pub-err h1 { margin: 0; font: 600 26px/1.25 var(--brand-font); color: var(--title); }
.pg-404 .err-msg, body.cm-public .err-msg { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.pg-404 .err-detail { margin: 0; }
.pg-404 .err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
@media (max-width: 600px) { .pg-404 .err-card { margin-top: 8px; } }

/* ======== X01 invite accept / password reset (auth card like P01) ======== */
main.pg-auth { align-items: center; }
.pg-auth .auth-p { width: min(460px, 100%); box-sizing: border-box; margin: 24px auto 0; padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: visible; }
.pg-auth .auth-p h1 { margin: 0; font: 600 22px/1.25 var(--brand-font); color: var(--title); }
.pg-auth .auth-sub { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--quiet); }
.pg-auth .auth-sub b { color: var(--title); }
.pg-auth .auth-form button[type=submit] { width: 100%; height: 44px; min-height: 44px; margin-top: 4px; }
.pg-auth .flash { margin: 0; }

/* ======== Shared includes (W-A): locked paid feature, subscription banner ======== */
.locked-feature { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px dashed var(--rule-3); border-radius: var(--r-menu); background: var(--surface-elev); text-align: left; }
.locked-feature .lock-ico { flex: none; margin-top: 2px; color: var(--quiet); }
.locked-feature strong { color: var(--title); font-size: 14px; }
.locked-feature .meta { margin: 2px 0 10px; font-size: 13px; line-height: 1.5; color: var(--quiet); }
.locked-feature .lf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r-menu);
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink); font-size: 14px; line-height: 1.5; }
.sub-banner strong { color: var(--accent-hover); }

/* Numeric cells and severity counts on W-A tables */
:is(.pg-home, .pg-dash, .pg-sites, .pg-tuning, .pg-share) :is(th, td).num { text-align: right; font-variant-numeric: tabular-nums; }
:is(.pg-dash, .pg-sites) td.n-crit { color: var(--crit); font-weight: 600; }
:is(.pg-dash, .pg-sites) td.n-high { color: var(--high); font-weight: 600; }
:is(.pg-dash, .pg-sites) td.n-med { color: var(--med); font-weight: 600; }
:is(.pg-dash, .pg-sites) td.n-low { color: var(--ink-2); font-weight: 600; }
:is(.pg-dash, .pg-sites) td.n-zero { color: var(--quiet); }
/* Grade chip (W4 A17 / F6): accent-soft, accent line, text label */
:is(.pg-dash, .pg-sites) .grade-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--title); font: 600 12.5px/1.4 var(--mono); white-space: nowrap; }

/* ======== P06 Home (Command Studio) ======== */
.pg-home .home-head { justify-content: space-between; }
.pg-home .home-head .lede { max-width: 760px; color: var(--quiet); }
.pg-home .lede kbd { padding: 1px 6px; border-radius: var(--r-kbd); background: var(--tile); border: 1px solid var(--rule-3); color: var(--accent); font: 500 11.5px/1.5 var(--mono); }
.pg-home .home-new { height: 40px; min-height: 40px; gap: 6px; }
.pg-home .home-new.is-locked { border-style: dashed; color: var(--quiet); }
.pg-home .home-new.is-locked:hover { color: var(--accent-hover); border-color: var(--accent-line); }
.pg-home .home-new .ico { width: 16px; height: 16px; }
.pg-home .home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } /* D25 */
.pg-home .home-stats .value { font-size: 30px; line-height: 34px; }
.pg-home .home-stats .value.is-high { color: var(--high); }
.pg-home .home-stats .note { font-size: 12.5px; }
.pg-home .home-cols { grid-template-columns: minmax(0, .77fr) minmax(0, 1fr); gap: 18px; }
.pg-home .sev-bars { display: flex; flex-direction: column; }
.pg-home .mix .bar span.c { background: var(--dot-crit); }
.pg-home .mix .bar span.h { background: var(--dot-high); }
.pg-home .mix .bar span.m { background: var(--dot-med); }
.pg-home .mix .bar span.l { background: var(--dot-low); }
.pg-home .mix .bar span.i { background: var(--dot-info); }
.pg-home .home-foot { margin: 12px 0 0; }
.pg-home .auth-rows { margin: 0 -20px -8px; }
.pg-home .auth-rows .lr { align-items: center; border-left: 0; }
.pg-home .auth-rows .lr:first-child { border-top: 0; }
.pg-home .auth-rows .lr:hover { background: transparent; }
.pg-home .hbar-row .nm { color: var(--ink); text-decoration: none; }
.pg-home .hbar-row .nm:hover { color: var(--accent-hover); }
.pg-home .sbar-track { height: 10px; min-width: 0; border-radius: var(--r-pill); background: var(--tile); overflow: hidden; }
.pg-home .sbar-track .sbar { height: 100%; background: transparent; border-radius: var(--r-pill); }
.pg-home .hbar > .meta { margin: 0; }
.pg-home .home-all .card-head .meta { margin-left: auto; }
.pg-home .home-table td { vertical-align: top; }
.pg-home .home-table .eng-name { display: block; font-weight: 600; color: var(--accent); }
.pg-home .home-table .eng-name:hover { color: var(--accent-hover); }
.pg-home .home-table .eng-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--quiet); }
.pg-home .home-table .cell-sub { display: block; font-size: 12.5px; }
.pg-home .home-table .cell-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-home .home-table .chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-home .home-table .c-eng { min-width: 220px; }
.pg-home .home-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; color: var(--quiet); }
.pg-home .home-empty b { font-size: 16px; color: var(--title); }
.pg-home .home-empty .locked-feature { max-width: 520px; }
@media (max-width: 1100px) { .pg-home .home-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .pg-home .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .pg-home .home-head { flex-direction: column; align-items: stretch; }
  .pg-home .home-head .actions { margin-left: 0; }
  .pg-home .home-table .c-type, .pg-home .home-table .c-fw { display: none; }
}

/* ======== P37 Metrics dashboard ======== */
.pg-dash .dash-sev { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } /* D33 */
.pg-dash .dash-sev .sev-card { min-width: 0; min-height: 60px; box-sizing: border-box; padding: 12px 16px; gap: 8px; box-shadow: none; }
.pg-dash .dash-sev .value { font: 600 24px/24px var(--font); color: var(--title); }
.pg-dash .dash-sev .sev-critical .value { color: var(--crit); }
.pg-dash .dash-sev .sev-high .value { color: var(--high); }
.pg-dash .dash-sev .pill { white-space: nowrap; }
.pg-dash .dash-sla { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pg-dash .dash-sla .label { min-height: 26px; }
.pg-dash .dash-sla .value { font-size: 30px; line-height: 34px; }
.pg-dash .dash-sla .value.is-crit { color: var(--crit); }
.pg-dash .dash-sla .note { font-size: 12.5px; }
.pg-dash .value.is-due, .pg-cal .value.is-due { color: var(--warnp); }
.pg-dash .dash-grid { grid-template-columns: minmax(0, 774fr) minmax(0, 482fr); gap: 18px; align-items: start; }
.pg-dash .dash-help { margin: 0 0 10px; }
.pg-dash .trend-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-dash .trend-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; align-items: center; gap: 14px; min-height: 34px; }
.pg-dash .trend-week { font-size: 12.5px; color: var(--ink-2); }
.pg-dash .trend-track { display: flex; align-items: center; height: 8px; min-width: 0; }
.pg-dash .trend-fill { display: block; height: 8px; border-radius: var(--r-kbd); background: var(--dot-med); }
.pg-dash .trend-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--dot-med); }
.pg-dash .trend-n { text-align: right; font-size: 12.5px; color: var(--ink); }
.pg-dash .trend-rows .empty { padding: 20px; }
.pg-dash .dash-cap { margin: 14px 0 4px; font: 600 12px/18px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--quiet); }
.pg-dash .dash-grades .card-head + .dash-cap { margin-top: 4px; }
.pg-dash .dash-grades td.empty { padding: 28px 20px; }
@media (max-width: 1100px) { .pg-dash .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1024px) {
  .pg-dash .dash-sev { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-dash .dash-sla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .pg-dash .dash-sev { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-dash .trend-row { grid-template-columns: 84px minmax(0, 1fr) 32px; gap: 10px; }
}

/* ======== P38 Sites ======== */
.pg-sites .card-head { flex-wrap: wrap; row-gap: 10px; }
.pg-sites .sites-filter { margin: 0 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pg-sites .sites-filter label { margin: 0; font-size: 13px; color: var(--quiet); }
.pg-sites .sites-filter input[type=search] { width: 14rem; max-width: 100%; height: 40px; padding: 0 14px; }
.pg-sites .sites-filter .asel, .pg-sites .sites-filter select { min-width: 12rem; }
.pg-sites .sites-filter button { height: 40px; min-height: 40px; margin: 0; }
.pg-sites .sites-table .c-target { min-width: 220px; }
.pg-sites .sites-table td .meta { font-size: 12px; }
.pg-sites .trend { font-weight: 600; }
.pg-sites .trend.up { color: var(--pass); }
.pg-sites .trend.down { color: var(--err-ink); }
.pg-sites .trend.same { color: var(--quiet); }
.pg-sites .sites-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (max-width: 700px) {
  .pg-sites .sites-filter { margin-left: 0; width: 100%; }
  .pg-sites .sites-filter input[type=search] { flex: 1 1 10rem; width: auto; }
}

/* ======== P39 / P40 False-positive rates ======== */
.pg-tuning td a.mono, .pg-tuning a.tool-link, .pg-tuning a.id-link { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.pg-tuning td a.mono:hover { color: var(--accent-hover); }
.pg-tuning .rate-cell { min-width: 180px; }
.pg-tuning .rate-val { display: block; }
.pg-tuning .rate-bar { display: block; max-width: 200px; height: 8px; margin-top: 6px; border-radius: var(--r-kbd); background: var(--tile); overflow: hidden; }
.pg-tuning .rate-bar > span { display: block; height: 100%; border-radius: var(--r-kbd); background: var(--dot-med); }
.pg-tuning .back-link a { color: var(--accent); font-size: 13px; }
.pg-tuning .back-link a:hover { color: var(--accent-hover); }
.pg-tuning .st { color: var(--ink); white-space: nowrap; }
.pg-tuning > .hint { margin: 0; }

/* ======== P41 PCI quarterly scan calendar (D37 swatch classes, D36 existing href) ======== */
.pg-cal .cal-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pg-cal .cal-stats .value { font-size: 30px; line-height: 34px; }
.pg-cal .cal-stats .value.is-crit { color: var(--crit); }
.pg-cal .legend-row { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--quiet); }
.pg-cal .legend-row li { display: inline-flex; align-items: center; gap: 6px; }
.pg-cal .legend-row .swatch { width: 12px; height: 12px; margin: 0; }
.pg-cal td .row-title { display: block; }
.pg-cal td .mono { display: block; margin-top: 2px; font-size: 12px; }
@media (max-width: 1000px) { .pg-cal .cal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pg-cal .cal-stats { grid-template-columns: minmax(0, 1fr); } }

/* ======== Page layer W-B (merged from carbon-pages-b.css in Phase 7) ======== */
/* W-B page styles (written in Phase 5 as carbon-pages-b.css).
   Scope every rule under a page hook (body/main class or a page root id) so it cannot leak to other workers' pages. */

/* ======== New-engagement wizard (P09–P18) — main.pg-wiz, form.wiz (.wiz-js once attestra.js (W-B section) runs) ======== */

/* `hidden` must win over component display rules (button / .checks label set display). */
.pg-wiz [hidden] { display: none !important; }

/* Page: fill the workspace so the wizard card can take the remaining height (spec: main padding 20/40/12). */
.workspace > main.pg-wiz { min-height: calc(100dvh - var(--cmd-h) - var(--dock-h) - 8px); padding-bottom: 12px; }
.pg-wiz .page-head > div:first-child { gap: 8px; }
.pg-wiz .page-head .lede { max-width: 760px; }
.pg-wiz > noscript .flash { display: block; }

/* Card */
.pg-wiz .wiz { display: flex; flex-direction: column; gap: 0; width: 100%; min-width: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-wiz); box-shadow: none; }
.pg-wiz .wiz.wiz-js { flex-direction: row; flex: 1 1 0; min-height: 440px; overflow: hidden; }

/* Rail */
.pg-wiz .wrail { flex: none; width: 236px; padding: 16px 12px; background: var(--surface-elev); border-right: 1px solid var(--rule); border-radius: var(--r-wiz) 0 0 var(--r-wiz); }
.pg-wiz .wrail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pg-wiz .wstep-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: var(--r-menu); border: 1px solid transparent; color: var(--quiet); font: 500 13.5px/1.3 var(--font); text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.pg-wiz .wstep-link b { flex: none; display: grid; place-items: center; width: 26px; height: 22px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule-3); font: 600 11.5px/1 var(--mono); font-variant-numeric: tabular-nums; } /* F9: text colour from A.4 (--ink-2) */
.pg-wiz .wstep-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.pg-wiz .wstep-link.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--title); font-weight: 600; }
.pg-wiz .wstep-link.on b { background: var(--accent); box-shadow: none; } /* F9: white text on --accent (A.4) */
.pg-wiz .wstep-link.done:not(.on) b { background: var(--ok-bg); color: var(--ok-ink); box-shadow: none; } /* D29 emerald done badge (≈9:1) */
.pg-wiz .wstep-link.done:not(.on) { color: var(--ink-2); }
.pg-wiz .wstep-link[aria-disabled=true] { color: var(--quiet-2); cursor: default; }
.pg-wiz .wstep-link[aria-disabled=true]:hover { background: transparent; color: var(--quiet-2); }
.pg-wiz .wstep-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Form column */
.pg-wiz .wform { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pg-wiz .wiz-js .wform { min-height: 0; padding: 0 0 8px; }
.pg-wiz .wsteps { display: flex; flex-direction: column; min-width: 0; }
.pg-wiz .wiz-js .wsteps { flex: 1 1 auto; min-height: 0; }
.pg-wiz .wstep { display: flex; flex-direction: column; min-width: 0; }
.pg-wiz .wiz:not(.wiz-js) .wstep + .wstep { border-top: 1px solid var(--rule); }
.pg-wiz .wiz-js .wstep { display: none; }
.pg-wiz .wiz-js .wstep.is-current { display: flex; flex: 1 1 auto; min-height: 0; }
.pg-wiz .wiz:not(.wiz-js) .wiz-extra { display: none; }

.pg-wiz .whead { flex: none; padding: 14px 22px; display: flex; flex-direction: column; gap: 4px; }
.pg-wiz .whead h2 { margin: 0; font: 600 18px/1.3 var(--display); color: var(--title); }
.pg-wiz .whead h2:focus { outline: none; }
.pg-wiz .whead h2:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-wiz .whead .hint { margin: 0; font-size: 12.5px; max-width: 920px; }
.pg-wiz .wbody { padding: 10px 22px 8px; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.pg-wiz .wiz-js .wbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* The step body stays scrollable while a custom select is open: the list is positioned against the viewport (shared .asel code), so nothing switches overflow and nothing jumps. */
.pg-wiz .wbody > label, .pg-wiz .wtarget > label { margin-top: 4px; }
.pg-wiz .wbody > textarea, .pg-wiz .wtarget > textarea { width: 100%; min-height: 88px; padding: 10px 14px; resize: vertical; margin-bottom: 14px; }
.pg-wiz .wbody > .hint, .pg-wiz .wbody > .meta { margin: 0 0 12px; }
.pg-wiz .wsub { margin: 10px 0 4px; font: 600 15px/1.35 var(--display); color: var(--title); }

/* Error banner (P10): top of the step body, wraps, never under the chrome. */
.pg-wiz .wiz-err { flex: none; margin: 0 0 14px; padding: 14px 18px; border-radius: var(--r-menu); background: var(--err-bg); color: var(--err-ink); border: 1px solid color-mix(in srgb, var(--err-ink) 35%, transparent); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.pg-wiz .wiz-err:focus { outline: none; }
.pg-wiz .asel:has(> select[aria-invalid=true]) .asel-trigger { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--err-ink) 22%, transparent) !important; }
.pg-wiz .checks:has(input[aria-invalid=true]) label { border-color: color-mix(in srgb, var(--err-ink) 55%, transparent); }

/* Fields (D12) */
.pg-wiz .wgrid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.pg-wiz .wgrid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-wiz .wgrid .hint { margin-top: 4px; }
.pg-wiz .wgrid input, .pg-wiz .wgrid select { height: 40px; min-height: 40px; }
.pg-wiz .wgrid input[type=file] { height: auto; padding-top: 6px; padding-bottom: 6px; }
.pg-wiz input[type=date] { color-scheme: light; }
.pg-wiz input[readonly] { color: var(--ink-2); background: var(--tile); }
.pg-wiz .req { color: var(--danger); font-weight: 600; }
.pg-wiz .wspan-2 { grid-column: span 2; }

/* Chips (D11): accent-soft fill, 1 px accent border, accent check */
.pg-wiz .checks { gap: 10px; margin-bottom: 14px; }
.pg-wiz .checks label { border-radius: var(--r-menu); }
.pg-wiz .checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--title); }
.pg-wiz .checks input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; flex: none; }
.pg-wiz .checks label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.pg-wiz .checks label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-wiz .wtests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-wiz .wtests label small { margin-top: 2px; }

/* Frameworks (P13) */
.pg-wiz .wfw-actions { margin: 10px 0 14px; }
.pg-wiz .wfw-recs { margin: 0 0 12px; overflow-x: auto; }
.pg-wiz .wfw-recs table { min-width: 560px; }
.pg-wiz .wfw-recs td .meta { font-family: var(--mono); font-size: 12px; }
.pg-wiz .wfw-all { margin: 0 0 12px; }
.pg-wiz #fw_rec_error { margin: 0 0 12px; }

/* Targets (P14) */
.pg-wiz .wtargets { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.pg-wiz .wtarget { padding: 16px; border-radius: var(--r-card); border: 1px solid var(--rule); background: var(--surface-elev); min-width: 0; }
.pg-wiz .wtarget-head { padding: 0 6px; margin: 0 0 10px -6px; font: 600 12.5px/1.3 var(--mono); color: var(--quiet); }
.pg-wiz .wtarget-actions { justify-content: flex-end; }

/* Review (P18) */
.pg-wiz .wreview { margin: 0; display: flex; flex-direction: column; }
.pg-wiz .wreview > div { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.pg-wiz .wreview dt { margin: 0; font: 600 12px/1.5 var(--font); color: var(--quiet); }
.pg-wiz .wreview dd { margin: 0; color: var(--title); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.pg-wiz .wprogress { margin: 12px 0 0; min-height: 1.4em; }

/* Footer: 61 px, inside the card (never fixed). Without JS it sticks to the bottom of the workspace. */
.pg-wiz .wfoot { flex: none; position: relative; z-index: var(--z-wfoot); display: flex; align-items: center; gap: 10px; min-height: 61px; padding: 10px 22px; border-top: 1px solid var(--rule); background: var(--card); border-radius: 0 0 var(--r-wiz) 0; }
.pg-wiz .wiz:not(.wiz-js) .wfoot { position: sticky; bottom: 0; border-radius: 0 0 var(--r-wiz) var(--r-wiz); }
.pg-wiz .wfoot-sp { flex: 1 1 auto; }
.pg-wiz .wfoot button, .pg-wiz .wfoot .btn { flex: none; }

/* No-JS long form: rail becomes a row of jump links above the sections. */
.pg-wiz .wiz:not(.wiz-js) .wrail { width: auto; border-right: 0; border-bottom: 1px solid var(--rule); border-radius: var(--r-wiz) var(--r-wiz) 0 0; overflow-x: auto; }
.pg-wiz .wiz:not(.wiz-js) .wrail ol { flex-direction: row; }
.pg-wiz .wiz:not(.wiz-js) .wstep-link { white-space: nowrap; }

/* ≤900: the wizard stacks; the rail is a single-row horizontal scroller above the form. */
@media (max-width: 900px) {
  .pg-wiz .wiz.wiz-js { flex-direction: column; }
  .pg-wiz .wrail { width: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--rule); border-radius: var(--r-wiz) var(--r-wiz) 0 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .pg-wiz .wrail ol { flex-direction: row; gap: 6px; }
  .pg-wiz .wstep-link { white-space: nowrap; min-height: 38px; }
  .pg-wiz .whead { padding: 16px 16px 8px; }
  .pg-wiz .wbody { padding: 8px 16px; }
  .pg-wiz .wfoot { padding: 10px 16px; border-radius: 0 0 var(--r-wiz) var(--r-wiz); }
  .pg-wiz .wreview > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pg-wiz .wgrid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 640px) {
  .pg-wiz .wtests { grid-template-columns: minmax(0, 1fr); }
  .pg-wiz .wspan-2 { grid-column: auto; }
  .pg-wiz .wgrid-2 { grid-template-columns: minmax(0, 1fr); }
  .pg-wiz .wfoot { gap: 8px; }
  .pg-wiz .wfoot button, .pg-wiz .wfoot .btn { padding: 0 14px; }
}
@media (max-width: 420px) {
  .pg-wiz .wstep-link span { display: none; }
  .pg-wiz .wstep-link.on span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-wiz .wstep-link { transition: none; }
}

/* ======== Page layer W-C (merged from carbon-pages-c.css in Phase 7) ======== */
/* W-C page styles (written in Phase 5 as carbon-pages-c.css).
   Scope every rule under a page hook (body/main class or a page root id) so it cannot leak to other workers' pages.
   W-C: engagement workspace (P19–P24, P26, P27) — engagement.html sets <main class="pg-eng">.
   The _findings_list.html rules are scoped to .md-list because W-D's finding page includes the same partial. */

/* ---------- Findings list partial (shared by engagement + finding pages) ---------- */
.md-list .lr { border-top: 1px solid var(--rule); border-left: 0; }
.md-list .lr:hover, .md-list .lr[aria-current=page], .md-list .lr.on { background: var(--accent-soft); color: var(--ink); }
.md-list .lr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.md-list .lr .lt b { display: block; white-space: nowrap; color: var(--ink); }
.md-list .lr-sub { min-width: 0; font-size: 12px; color: var(--quiet); }
.md-list .lr-fs { flex: none; padding: 2px 8px; font-size: 11.5px; }
.md-list .lr-tool { font-size: 11.5px; }
.md-list .card-head .meta { margin-left: auto; font-family: var(--mono); font-size: 12px; white-space: nowrap; }

/* ---------- Master–detail layout (§3.1: 360 / 902, gap 18) ---------- */
.pg-eng .md { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.pg-eng .md-list { position: sticky; top: 20px; max-height: calc(100vh - var(--cmd-h) - var(--dock-h) - 40px); max-height: calc(100dvh - var(--cmd-h) - var(--dock-h) - 40px); }
.pg-eng .md-detail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pg-eng .md-detail > * { min-width: 0; }

/* Page head */
.pg-eng .breadcrumb { font-size: 13.5px; }
.pg-eng .page-head { align-items: flex-start; }
.pg-eng .page-head h1 { font-family: var(--display); margin: 0; overflow-wrap: anywhere; }
.pg-eng .page-head .meta-row { font-family: var(--mono); font-size: 12.5px; }

/* ---------- Progress steps (.steps 3×2, radius 12, gap 10, padding 14) ---------- */
.pg-eng .steps { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; margin: 0; overflow: visible;
  background: var(--card); border: 1px solid var(--rule) !important; border-radius: var(--r-menu) !important; box-shadow: none; }
.pg-eng .steps a, .pg-eng .steps a:last-child { display: flex; flex-direction: row; align-items: center; gap: 10px; min-width: 0; min-height: 54px; box-sizing: border-box;
  padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--r-pop); background: transparent; color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.pg-eng .steps a::before, .pg-eng .steps a::after { display: none !important; content: none; }
.pg-eng .steps a:hover { border-color: var(--accent-line); background: var(--tile); color: var(--title); }
.pg-eng .steps a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-eng .steps a.next { background: var(--accent-soft); border-color: var(--accent); }
.pg-eng .steps a .step-num { width: 28px; height: 28px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--tile); color: var(--ink-2); font: 600 12px/1 var(--mono); box-shadow: inset 0 0 0 1px var(--rule-3); }
.pg-eng .steps a.done .step-num { font-size: 0; box-shadow: none;
  background: var(--ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px 14px no-repeat; }
.pg-eng .steps a.next .step-num { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.pg-eng .steps .step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; white-space: normal; line-height: 1.25; }
.pg-eng .steps .step-row { display: block; color: var(--title); font-weight: 500; overflow-wrap: anywhere; }
.pg-eng .steps .step-meta { padding: 0; font-size: 12px; font-weight: 400; color: var(--quiet); }

/* ---------- Severity strip (5 cols, gap 12; tile padding 16/20, count 24/24 600) ---------- */
.pg-eng .sev-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pg-eng .sev-card { min-width: 0; padding: 14px 20px; gap: 8px; display: flex; align-items: center; justify-content: space-between; }
.pg-eng .sev-card .pill { white-space: nowrap; }
.pg-eng .sev-card .value { font: 600 24px/24px var(--mono); color: var(--title); font-variant-numeric: tabular-nums; }

/* ---------- Sub-nav chips (F2 colours live in attestra.css A.4) ---------- */
.pg-eng .subnav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-eng .subnav a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; box-sizing: border-box; }
.pg-eng .subnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-eng .subnav .chip { padding: 1px 6px; font-size: 11px; }

/* ---------- Engagement tabs (sticky in .workspace, z 30, --bg, 6/0, gap 2) ---------- */
.pg-eng .eng-tabs { position: sticky; top: 0; z-index: var(--z-tabs); display: flex; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 6px 0;
  background: var(--bg); border-radius: 0; border-bottom: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pg-eng .eng-tabs::-webkit-scrollbar { display: none; }
.pg-eng .eng-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 44px; box-sizing: border-box; padding: 0 12px; white-space: nowrap;
  border: 0; border-radius: var(--r-pill) var(--r-pill) 0 0; background: transparent; box-shadow: none; color: var(--quiet); font-size: 14px; font-weight: 500; text-decoration: none; }
.pg-eng .eng-tabs a:hover { color: var(--ink); background: var(--tile); }
.pg-eng .eng-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pg-eng .eng-tabs .n { font: 500 12px/1 var(--mono); color: var(--quiet); }
/* Current tab: set by attestra.js (W-C section) (aria-current) with a CSS-only :target fallback */
.pg-eng .eng #eng-tabs.eng-tabs a[aria-current=page],
.pg-eng .eng:not(:has(.tp:target, .tp :target)) .eng-tabs:not(:has(a[aria-current])) a[href="#p-findings"],
.pg-eng .eng:has(#p-findings:target, #p-findings :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-findings"],
.pg-eng .eng:has(#p-overview:target, #p-overview :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-overview"],
.pg-eng .eng:has(#p-scope:target, #p-scope :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-scope"],
.pg-eng .eng:has(#p-plan:target, #p-plan :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-plan"],
.pg-eng .eng:has(#p-scans:target, #p-scans :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-scans"],
.pg-eng .eng:has(#p-compliance:target, #p-compliance :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-compliance"],
.pg-eng .eng:has(#p-reports:target, #p-reports :target) .eng-tabs:not(:has(a[aria-current])) a[href="#p-reports"] {
  color: var(--accent); font-weight: 600; background: transparent; box-shadow: inset 0 -2px 0 var(--accent); border-color: transparent; }
/* Old unscoped :has() highlight (attestra.css) must not paint a second tab once JS has set aria-current */
.pg-eng #eng-tabs:has(a[aria-current]) a:not([aria-current]) { color: var(--quiet); font-weight: 500; box-shadow: none; background: transparent; }
.pg-eng #eng-tabs:has(a[aria-current]) a:not([aria-current]):hover { color: var(--ink); background: var(--tile); }

/* Panels: anchors land below the sticky tab bar */
.pg-eng .tab-panels > .tp { gap: 18px; scroll-margin-top: 64px; }
.pg-eng .tab-panels .tp [id], .pg-eng .tab-panels .card { scroll-margin-top: 72px; }
.pg-eng .tp .card, .pg-eng .tp .grid > .card { min-width: 0; }
.pg-eng .tp > .grid, .pg-eng .rep-grid { gap: 18px; }
.pg-eng .rep-grid { display: grid; grid-template-columns: minmax(0, 1fr); }

/* Shared bits that replaced inline styles */
.pg-eng .inline-form { display: inline-flex; margin: 0; }
.pg-eng .inline-label { display: inline; margin: 0 0 0 4px; }
.pg-eng .inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.pg-eng .inline-fields > label { margin: 0; }
.pg-eng td .inline-fields { margin: 0; }
.pg-eng td .inline-fields select, .pg-eng td .inline-fields input[type=date], .pg-eng td .inline-fields .asel { width: auto; min-width: 130px; height: 36px; min-height: 36px; font-size: 13px; }
.pg-eng .fields > .span-2 { grid-column: span 2; }
.pg-eng .card h3 { margin: 0 0 8px; font: 600 14px/1.4 var(--font); color: var(--title); letter-spacing: 0; }
.pg-eng td .chip { margin: 2px 4px 2px 0; }
.pg-eng .pill.exposure { background: var(--p-high-bg); color: var(--high); }
.pg-eng .pill.warn { background: var(--warn-bg); color: var(--warnp); }
.pg-eng .chk { font-weight: 600; }
.pg-eng td .badge { margin-left: 4px; }

/* ---------- P21 Findings tab ---------- */
.pg-eng .eng-exports { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pg-eng .eng-exports .btn, .pg-eng .eng-exports button { height: 36px; min-height: 36px; padding: 0 12px; font-size: 13px; }
.pg-eng .ff-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 12px; }
.pg-eng .ff-bar > div { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pg-eng .ff-label { display: block; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pg-eng .ff-bar select { width: 100%; min-width: 0; height: 40px; min-height: 40px; }
.pg-eng .ff-count { flex: none; align-self: center; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
/* Column rules (replace the unscoped #findings rules in attestra.css) */
.pg-eng #findings-table th, .pg-eng #findings-table td { padding-left: 8px; padding-right: 8px; }
.pg-eng #findings-table th:first-child, .pg-eng #findings-table td:first-child { padding-left: 20px; }
.pg-eng #findings-table th:last-child, .pg-eng #findings-table td:last-child { padding-right: 20px; }
.pg-eng #findings-table td:nth-child(1) { white-space: nowrap; font: 500 12.5px/21px var(--mono); }
.pg-eng #findings-table td:nth-child(2) .pill { display: flex; width: max-content; white-space: nowrap; font-size: 11.5px; padding: 2px 8px; }
.pg-eng #findings-table td:nth-child(2) .pill + .pill { margin-top: 6px; }
.pg-eng #findings-table td.risk { white-space: nowrap; font: 500 12.5px/21px var(--mono); color: var(--ink); }
.pg-eng #findings-table td.risk b { display: block; width: max-content; margin-top: 4px; padding: 0 8px; border-radius: var(--r-pill); font: 600 11px/18px var(--font); letter-spacing: .04em; background: var(--p-crit-bg); color: var(--crit); }
.pg-eng #findings-table td.ftitle { min-width: 140px; max-width: 260px; }
.pg-eng #findings-table td.ftitle .ftitle-t { display: block; color: var(--ink); overflow-wrap: anywhere; }
.pg-eng #findings-table td.ftitle .mono { display: block; margin-top: 2px; font-size: 11.5px; }
.pg-eng #findings-table .finding-tools, .pg-eng #findings-table .cross-sources { margin-top: 4px; font-size: 12px; }
.pg-eng #findings-table td.ftarget { min-width: 90px; max-width: 150px; }
.pg-eng #findings-table td.ftarget .meta { display: block; margin-top: 4px; }
/* Truncated lines must not widen the auto-sized column: zero intrinsic width, then fill the cell (ellipsis + tooltip from title) */
.pg-eng #findings-table td .truncate { width: 0; min-width: 100%; box-sizing: border-box; }
.pg-eng #findings-table td:nth-child(6) { min-width: 80px; font-size: 12.5px; overflow-wrap: anywhere; }
.pg-eng #findings-table td:nth-child(7) { white-space: nowrap; }
/* Change-status disclosure: fits its cell, never clipped (W3 A5a). The table scrolls in .table-wrap if the card is narrow. */
.pg-eng #findings .status-cell { min-width: 166px; max-width: 220px; gap: 6px; }
.pg-eng #findings .status-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pg-eng #findings .status-head .fix-by { white-space: nowrap; font-size: 12px; }
.pg-eng #findings .status-details > summary { margin: 2px 0 0; padding: 2px 0; height: auto; border: 0; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 500; }
.pg-eng #findings .status-details > summary:hover { color: var(--accent-hover); background: transparent; text-decoration: underline; }
.pg-eng #findings .status-details[open] > summary { margin-bottom: 8px; }
.pg-eng #findings .status-move { width: 100%; box-sizing: border-box; padding: 10px; gap: 6px; border: 1px solid var(--rule-3); border-radius: var(--r-pop); background: var(--field); }
.pg-eng #findings .status-move label { margin: 0 0 2px; font-size: 12px; color: var(--ink-2); }
.pg-eng #findings .status-move select, .pg-eng #findings .status-move input, .pg-eng #findings .status-move .asel { width: 100%; min-width: 0; height: 36px; min-height: 36px; font-size: 13px; }
.pg-eng #findings .status-move .form-actions button { height: 36px; min-height: 36px; padding: 0 14px; font-size: 13px; }
.pg-eng #findings-table tr:has(.status-details[open]) > td { background: var(--accent-soft); }

/* ---------- P22 Authorization & targets ---------- */
.pg-eng .auth-table td:nth-child(6) { white-space: nowrap; }
.pg-eng .auth-table td:nth-child(5) { min-width: 160px; }
.pg-eng .targets-table th, .pg-eng .targets-table td { padding-left: 8px; padding-right: 8px; }
.pg-eng .targets-table th:first-child, .pg-eng .targets-table td:first-child { padding-left: 20px; }
.pg-eng .targets-table th:last-child, .pg-eng .targets-table td:last-child { padding-right: 20px; }
.pg-eng #targets .targets-table td:first-child { min-width: 130px; max-width: 200px; }
.pg-eng .targets-table td:first-child a.mono { overflow-wrap: anywhere; }
.pg-eng .targets-table td:nth-child(4) { min-width: 130px; }
.pg-eng .targets-table td:nth-child(4) .chip { white-space: normal; }
.pg-eng .targets-table td:nth-child(7) { overflow-wrap: anywhere; }
/* Ownership column: wraps inside its own width, never cut at the card edge (W3 A5b) */
.pg-eng .targets-table td.own-cell { min-width: 170px; max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
.pg-eng .own-cell .own-help { margin-top: 4px; }
.pg-eng .own-cell details.ownership { max-width: 100%; margin-top: 8px; }
.pg-eng .own-cell details.ownership > summary { margin: 0; padding: 4px 0; height: auto; border: 0; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 500; white-space: normal; }
.pg-eng .own-cell details.ownership > summary:hover { background: transparent; text-decoration: underline; }
.pg-eng .own-cell .own-form { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 8px 0 0; }
.pg-eng .own-cell .own-form input[type=text] { width: 100%; }
.pg-eng .own-cell .flash { margin: 6px 0; }
.pg-eng .env-note { margin-top: 4px; font-size: 12px; }
.pg-eng .ct-suggest { margin-top: 16px; }

/* ---------- P23 Test plan ---------- */
.pg-eng .plan-table td:first-child { min-width: 160px; }
.pg-eng .plan-table td:nth-child(5) { min-width: 140px; }
.pg-eng .plan-table td:last-child { white-space: nowrap; }

/* ---------- P24 Scans & imports ---------- */
.pg-eng .scan-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.pg-eng .scan-ctl form { margin: 0; }
.pg-eng #scan-runs-table td:nth-child(1), .pg-eng #scan-runs-table td:nth-child(6) { white-space: nowrap; }
.pg-eng #scan-runs-table td:nth-child(3) { max-width: 220px; }
.pg-eng #scan_tools > label small, .pg-eng #test-types label small { display: block; }
.pg-eng .sched-table td:nth-child(4) { min-width: 300px; }
/* Automated testing run history (moved from the page <style>, dark tokens) */
.pg-eng #automated-testing .av-run { border-top: 1px solid var(--rule); padding: 10px 0; }
.pg-eng #automated-testing .av-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-eng #automated-testing .av-target { overflow-wrap: anywhere; margin: 4px 0; }
.pg-eng #automated-testing .av-badge { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neu-bg); color: var(--neu); }
.pg-eng #automated-testing .av-ok { background: var(--pass-bg); color: var(--pass); }
.pg-eng #automated-testing .av-bad { background: var(--fail-bg); color: var(--crit); }
.pg-eng #automated-testing .av-muted { background: var(--neu-bg); color: var(--quiet); }
.pg-eng #automated-testing .av-warn { background: var(--warn-bg); color: var(--warnp); }
.pg-eng #automated-testing .av-cases { width: 100%; table-layout: auto; }
.pg-eng #automated-testing .av-cases td { vertical-align: top; }
.pg-eng #automated-testing .av-detail { overflow-wrap: anywhere; min-width: 12em; }
.pg-eng #automated-testing .av-thumb { max-width: 160px; max-height: 110px; border: 1px solid var(--rule-3); border-radius: 6px; margin: 2px; vertical-align: top; }
.pg-eng #automated-testing pre.av-raw { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; max-height: 420px; overflow-y: auto; max-width: 100%; }
.pg-eng #av-failed-only:checked ~ .av-runs .av-case-pass { display: none; }

/* ---------- P26 Compliance ---------- */
.pg-eng .controls-table td.ref { white-space: nowrap; color: var(--ink); }
.pg-eng .controls-table td:nth-child(2) { min-width: 200px; }
.pg-eng .controls-table td:nth-child(3) .st { white-space: nowrap; font-weight: 600; }
.pg-eng .controls-table td:nth-child(5) a { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.pg-eng .pci-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.pg-eng .pci-mini > div { min-width: 0; }

/* ---------- P27 Reports (render wins, D5: branding select + Open ↗ + Download without branding) ---------- */
.pg-eng #reports > .meta { margin: 0 0 12px; }
.pg-eng #reports th, .pg-eng #reports td { padding-left: 10px; padding-right: 10px; }
.pg-eng #reports th:first-child, .pg-eng #reports td:first-child { padding-left: 20px; }
.pg-eng #reports th:last-child, .pg-eng #reports td:last-child { padding-right: 20px; }
.pg-eng #reports .reports-table td:nth-child(2) { min-width: 160px; }
.pg-eng #reports .reports-table td:nth-child(3) { min-width: 170px; white-space: normal; }
.pg-eng .reports-table .rep-open { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.pg-eng .reports-table .rep-open select, .pg-eng .reports-table .rep-open .asel { width: 170px; max-width: 100%; height: 36px; min-height: 36px; font-size: 13px; }
.pg-eng .reports-table .rep-open button { height: 36px; min-height: 36px; padding: 0 12px; font-size: 13px; }
.pg-eng .reports-table .rep-dl { margin-top: 6px; white-space: normal; }
.pg-eng .reports-table td:nth-child(4) { white-space: nowrap; }
.pg-eng .rep-gen .form-actions { margin-top: 0; }

/* ---------- Overview (P20): F3 tiles (3 px --k bar from base .ov-kpi::before), client card ---------- */
.pg-eng .ov-kpi::before { width: 3px; background: var(--k); }
.pg-eng .ov-kpi .st { text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.pg-eng .ov-kpi b { font: 600 26px/1 var(--mono); color: var(--title); letter-spacing: -.02em; }
.pg-eng .ov-client > #edit > summary { box-shadow: none; background: var(--card); border: 1px solid var(--field-line); color: var(--title); font-weight: 600; }
.pg-eng .ov-client > #edit > summary::before { content: none; display: none; }
.pg-eng .ov-client > #edit > summary:hover { background: var(--accent-soft); }

/* ---------- Responsive (§3.2) ---------- */
@media (max-width: 1250px) {
  .pg-eng .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  /* D8: detail first, findings list below (max-h 420, hidden when empty) */
  .pg-eng .md { grid-template-columns: minmax(0, 1fr); }
  .pg-eng .md > .md-list { order: 2; position: static; max-height: 420px; }
  .pg-eng .md > .md-list.is-empty { display: none; }
  .pg-eng .md > .md-detail { order: 1; }
}
@media (max-width: 900px) {
  .pg-eng .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .pg-eng .page-head .actions { margin-left: 0; }
  .pg-eng .fields > .span-2 { grid-column: auto; }
  .pg-eng .ff-bar > div { flex-basis: 150px; }
}
@media (max-width: 700px) {
  .pg-eng .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-eng .sev-card { padding: 12px 14px; }
  .pg-eng .eng-tabs a { padding: 0 12px; }
}
@container engdetail (max-width: 700px) {
  .pg-eng .sev-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container engdetail (max-width: 440px) {
  .pg-eng .sev-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ======== Page layer W-D (merged from carbon-pages-d.css in Phase 7) ======== */
/* W-D page styles (written in Phase 5 as carbon-pages-d.css).
   Scope every rule under a page hook (body/main class or a page root id) so it cannot leak to other workers' pages.
   Hooks: .pg-find (finding detail P33–P36), .pg-asset (target detail P32), .pg-sub (PCI P28, ISO P29, AI drafts P30, SEBI P31,
   scan X04, auth coverage X03) with .pg-pci / .pg-iso / .pg-ai / .pg-ai-off / .pg-sebi / .pg-scan / .pg-authcov sub-hooks. */

/* ============ Shared: page head, sub-nav, tables, forms, states ============ */
:is(.pg-find, .pg-asset, .pg-sub) .page-head h1 { font-family: var(--display); font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; color: var(--title); overflow-wrap: anywhere; }
:is(.pg-find, .pg-asset, .pg-sub) .lede { max-width: 760px; font-size: 14px; line-height: 22.4px; color: var(--quiet); }
:is(.pg-find, .pg-asset, .pg-sub) .lede a { color: var(--accent); }
:is(.pg-asset, .pg-sub) .subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
:is(.pg-asset, .pg-sub) .subnav .chip { padding: 0 6px; font-size: 11px; margin-left: 2px; }
:is(.pg-find, .pg-asset, .pg-sub) .card { scroll-margin-top: 20px; }
:is(.pg-find, .pg-asset, .pg-sub) .card > .table-wrap + form,
:is(.pg-find, .pg-asset, .pg-sub) .card > .table-wrap + p { margin-top: var(--space-4); }
:is(.pg-find, .pg-asset, .pg-sub) .card > .table-wrap:last-child { margin-bottom: -20px; }
:is(.pg-find, .pg-asset, .pg-sub) td.empty { text-align: center; color: var(--quiet); padding: 28px 12px; }
:is(.pg-find, .pg-asset, .pg-sub) .warn { margin: 0; border-radius: var(--r-menu); }
:is(.pg-find, .pg-asset, .pg-sub) .form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* D5: content-width buttons in cards (render wins) */
:is(.pg-find, .pg-asset, .pg-sub) .card .form-actions > button,
:is(.pg-find, .pg-asset, .pg-sub) .card .form-actions > .btn { width: auto; flex: none; }
:is(.pg-find, .pg-asset, .pg-sub) input[type=date] { color-scheme: light; }
:is(.pg-find, .pg-asset, .pg-sub) button[aria-busy=true] { cursor: progress; }
/* Status text (spec §3.7: Met/Passed emerald, Partial orange, Not met red; never colour-only — the text carries it) */
/* .st-met emerald is global now (Phase 7) */
:is(.pg-asset, .pg-sub) .st-partial { color: var(--med); }
:is(.pg-asset, .pg-sub) .st-not_met { color: var(--crit); }
/* Generic disclosures inside W-D cards: accent caret, named summary */
:is(.pg-find, .pg-asset, .pg-sub) details:not([data-menu]):not(.dock-menu) > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
:is(.pg-find, .pg-asset, .pg-sub) details:not([data-menu]):not(.dock-menu) > summary::-webkit-details-marker { display: none; }
:is(.pg-find, .pg-asset, .pg-sub) details:not([data-menu]):not(.dock-menu) > summary::before { content: ""; width: 0; height: 0; border-left: 5px solid var(--accent); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; flex: none; }
:is(.pg-find, .pg-asset, .pg-sub) details[open]:not([data-menu]):not(.dock-menu) > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) {
  :is(.pg-find, .pg-asset, .pg-sub) details > summary::before { transition: none; }
}

/* ============ P33–P36 Finding detail (.pg-find) ============ */
/* Master-detail 360 / 902, gap 18 (D8 handles the mobile order below) */
.pg-find .md { grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.pg-find .md-list { position: sticky; top: 20px; max-height: calc(100dvh - var(--cmd-h) - var(--dock-h) - 40px); }
.pg-find .md-list .lr[aria-current=page], .pg-find .md-list .lr:hover { background: var(--accent-soft); }
.pg-find .md-list .lr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pg-find .md-detail { gap: 18px; }
.pg-find .breadcrumb { font-size: 13.5px; }
.pg-find .breadcrumb .current { color: var(--title); }
.pg-find .page-head { align-items: flex-start; gap: 16px; }
.pg-find .page-head .title-row { gap: 12px; align-items: center; }
.pg-find .page-head .title-row h1 { flex: 1 1 280px; min-width: 0; font-size: 22px; line-height: 1.3; }
.pg-find .page-head .meta-row .id-tag { font-family: var(--mono); font-size: 12.5px; }
.pg-find .page-head .lede { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pg-find .page-head .actions { gap: 8px; }

/* Lifecycle bar: 5 equal 4 px segments, radius 2, 11 px labels; done accent, current darker accent + bold label, future --rule-3 */
.pg-find ol.wf { list-style: none; margin: 0; display: flex; gap: 6px; }
.pg-find .wf .wf-step { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; line-height: 16px; font-weight: 500; color: var(--quiet); overflow-wrap: anywhere; }
.pg-find .wf .wf-step::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--rule-3); margin-bottom: 8px; }
.pg-find .wf .wf-step.done { color: var(--ink-2); }
.pg-find .wf .wf-step.done::before { background: var(--accent); }
.pg-find .wf .wf-step.cur { color: var(--title); font-weight: 700; }
.pg-find .wf .wf-step.cur::before { background: var(--accent-hover); box-shadow: 0 0 0 1px var(--accent-line); }
.pg-find .wf .wf-step.cur.side::before { background: var(--quiet); box-shadow: none; }

/* Content split: main ≈522 + side 360 (522 + 18 + 360 = 900 of 902) */
.pg-find .split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.pg-find .split > .col, .pg-find .split > .side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pg-find .split > .side { position: sticky; top: 20px; }
.pg-find .split > .side.is-tall { position: static; } /* set by attestra.js (W-D section) when the column is taller than the workspace */
.pg-find .h2-count { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--quiet); letter-spacing: 0; }
.pg-find .prose { color: var(--ink-2); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.pg-find h3 { font-size: 14px; font-weight: 600; margin: 14px 0 8px; color: var(--title); }

/* Key-value rows (Finding card, tool observations) */
.pg-find .kv > div { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.pg-find .kv > div:last-child { border-bottom: 0; }
.pg-find .kv .k { width: 112px; flex: none; color: var(--quiet); font-size: 12.5px; line-height: 19px; }
.pg-find .kv .v { flex: 1 1 auto; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.pg-find .kv .v.mono, .pg-find .kv .v .mono { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.pg-find .side .kv .v.mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Evidence */
.pg-find .ev-location { margin: 0 0 14px; }
.pg-find .ev-fail-list { margin: 8px 0 0; padding-left: 18px; }
.pg-find .ev-fail-note { margin: 8px 0 0; }
.pg-find .ev-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pg-find .ev { background: var(--field); border: 1px solid var(--rule); border-radius: var(--r-menu); padding: 12px 14px; gap: 6px; }
.pg-find .ev .mono { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.pg-find .ev-note { font-size: 13.5px; color: var(--ink); }
.pg-find .ev > .btn { align-self: flex-start; }
.pg-find .ev-preview > summary { width: auto; }
.pg-find .ev-preview-body { margin-top: 8px; max-height: 280px; overflow: auto; }
.pg-find .ev-replay { margin-top: 4px; }
.pg-find .empty-line { margin: 0; }
.pg-find .ev-library { margin: 14px 0 0; }
.pg-find .ev-library a, .pg-find .card .meta a { color: var(--accent); }

/* Tool observations: pill-style disclosure header */
.pg-find .obs { margin-top: 10px; }
.pg-find .obs > summary { flex-wrap: wrap; padding: 6px 12px; border: 1px solid var(--rule-3); border-radius: var(--r-pill); background: var(--field); font-size: 13px; max-width: 100%; }
.pg-find .obs > summary b { color: var(--accent); font-weight: 600; }
.pg-find .obs > summary:hover { border-color: var(--quiet-2); }
.pg-find .obs-kv { margin-top: 8px; }

/* How to fix: importance chips + snippet tabs */
.pg-find .fix-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pg-find .snip-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 0; margin: 0 0 10px; }
.pg-find .snip-tabs a { padding: 5px 13px; border-radius: var(--r-pill); border: 1px solid var(--rule-3); background: var(--field); color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.pg-find .snip-tabs a:hover { border-color: var(--accent-line); color: var(--title); background: var(--accent-soft); }
.pg-find .snip-tabs a[aria-current=page], .pg-find .snip-tabs a[aria-selected=true] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); box-shadow: none; }
.pg-find .snips.is-js > .snip-panel { display: block; }
.pg-find .snips.is-js > .snip-panel.snip-panel[hidden] { display: none; }

/* Comments */
.pg-find .comment-list { list-style: none; padding: 0; margin: 0 0 16px; }
.pg-find .comment { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.pg-find .comment:first-child { border-top: 0; }
.pg-find .comment-body { flex: 1; min-width: 0; }
.pg-find .comment-text { white-space: pre-wrap; margin: 6px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.pg-find .comment-del { margin-top: 8px; }
.pg-find #comments textarea { min-height: 88px; width: 100%; resize: vertical; }

/* Side forms: Assign, Change status (#status), Risk acceptance (#accept-risk) */
.pg-find .side .fields { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.pg-find .side .fields > div { grid-column: 1 / -1; min-width: 0; }
.pg-find .side .card > p.meta { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; }
.pg-find #status-help { margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--quiet); }
.pg-find #status-help b { color: var(--ink-2); }
.pg-find .field-error { margin: 6px 0 0; font-size: 12px; color: var(--err-ink); }
.pg-find .field-error[hidden] { display: none; }
.pg-find #status, .pg-find #accept-risk, .pg-find #assign, .pg-find #comments { scroll-margin-top: 20px; }

/* Responsive (spec boilerplate: 1100 / 1000 / 900; D8 detail first, list below) */
@media (max-width: 1250px) {
  .pg-find .split { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  .pg-find .md { grid-template-columns: minmax(0, 1fr); }
  .pg-find .md > .md-list { order: 2; position: static; max-height: 420px; }
  .pg-find .md > .md-list.is-empty { display: none; }
}
@media (max-width: 1000px) {
  .pg-find .split { grid-template-columns: minmax(0, 1fr); }
  .pg-find .split > .side { position: static; }
}
@media (max-width: 900px) {
  .pg-find .page-head { flex-direction: column; align-items: stretch; }
  .pg-find .page-head .actions { margin-left: 0; }
  .pg-find .page-head .title-row h1 { font-size: 20px; }
}
@media (max-width: 560px) {
  .pg-find .wf { gap: 4px; }
  .pg-find .wf .wf-step { font-size: 10.5px; }
  .pg-find .kv > div { flex-direction: column; gap: 2px; }
  .pg-find .kv .k { width: auto; }
  .pg-find .side .kv .v.mono { white-space: normal; }
}

/* ============ P32 Target detail (.pg-asset) ============ */
.pg-asset .asset-head .back-link { margin: 0; font-size: 13.5px; }
.pg-asset .asset-head .back-link a { color: var(--accent); }
.pg-asset .asset-meta { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--quiet); overflow-wrap: anywhere; }
.pg-asset .asset-head .actions { align-self: flex-end; }
.pg-asset .txt-label { margin: 10px 0 6px; font-size: 13px; color: var(--ink-2); }
.pg-asset .txt-label b { color: var(--title); font-weight: 600; }
.pg-asset .txt-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-asset .txt-value { flex: 1 1 260px; min-width: 0; padding: 9px 12px; background: var(--field); border: 1px solid var(--rule); border-radius: var(--r-pill); font-family: var(--mono); font-size: 12.5px; line-height: 19px; color: var(--ink); word-break: break-all; }
.pg-asset .own-actions { margin: 12px 0 0; gap: 8px; }
.pg-asset .own-verify { margin-top: 10px; }
.pg-asset #crawl form > label { display: block; margin: 0 0 6px; }
.pg-asset #crawl form > textarea, .pg-asset #crawl form > input[type=url] { display: block; width: 100%; max-width: 100%; box-sizing: border-box; margin-bottom: 4px; }
.pg-asset #crawl form > .fields { margin-top: 14px; }
.pg-asset #crawl form > .hint { margin-bottom: 14px; }
.pg-asset #crawl form > label[for=api_base_url] { margin-top: 2px; }
.pg-asset #api-spec form > label { display: block; margin: 0 0 6px; }
.pg-asset #api-spec form > .hint { margin-bottom: 14px; }
/* F6 / A17: site grade as an accent-soft chip */
.pg-asset .site-grade { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.pg-asset .site-grade-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 6px 14px; border: 1px solid var(--accent-line); border-radius: var(--r-pill); font: 600 34px/1.1 var(--display); letter-spacing: .02em; }
.pg-asset .site-grade-score { font-size: 15px; font-weight: 600; color: var(--quiet); }
.pg-asset .ap-actions { gap: 6px; flex-wrap: wrap; }
.pg-asset .ap-actions form.inline { margin: 0; }
.pg-asset .ap-more { margin-top: 6px; }
.pg-asset .ap-more > summary, .pg-asset .ap-add > summary { font-size: 13px; color: var(--ink-2); }
.pg-asset .ap-more > summary:hover, .pg-asset .ap-add > summary:hover { color: var(--title); }
.pg-asset .ap-add { margin-top: 14px; }
.pg-asset .ap-add > summary { font-weight: 600; }
.pg-asset td details form { min-width: 280px; }
.pg-asset #scan-history h3 { font-size: 14px; margin: 16px 0 4px; color: var(--title); }
.pg-asset #scan-history svg { max-width: 100%; height: auto; }
@media (max-width: 900px) {
  .pg-asset .asset-head { flex-direction: column; align-items: stretch; }
  .pg-asset .asset-head .actions { margin-left: 0; align-self: flex-start; }
  .pg-asset .own-actions .btn, .pg-asset .own-verify button { width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
  .pg-asset .txt-row > button { width: 100%; }
}

/* ============ P28 PCI DSS (.pg-pci) ============ */
.pg-pci .pci-internal { margin: 12px 0 0; font-size: 13.5px; color: var(--med); }
.pg-pci td .status-pill + .meta { margin-left: 6px; font-size: 12.5px; }

/* ============ P29 ISO 27001 (.pg-iso) ============ */
.pg-iso #soa > form.iso-generate { margin: 0 0 14px; }
.pg-iso form.iso-row-form { gap: 6px 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.pg-iso form.iso-row-form > label.meta { margin: 0; font-size: 12px; white-space: nowrap; }
.pg-iso form.iso-row-form input, .pg-iso form.iso-row-form select, .pg-iso form.iso-row-form .asel { min-width: 140px; width: auto; flex: 1 1 140px; }
.pg-iso #nc > .hint { margin: 0 0 12px; font-size: 12.5px; }

/* ============ P30 AI drafts on (.pg-ai) and off (.pg-ai-off) ============ */
.pg-ai .ai-st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; text-transform: capitalize; background: var(--neu-bg); color: var(--ink-2); }
.pg-ai .ai-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.pg-ai .ai-st-draft { background: var(--p-med-bg); color: var(--med); }
.pg-ai .ai-st-approved { background: var(--pass-bg); color: var(--pass); }
.pg-ai .ai-st-rejected { background: var(--p-crit-bg); color: var(--crit); }
.pg-ai .draft-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pg-ai .draft-head h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pg-ai .draft-head h2 a { color: var(--accent); }
.pg-ai .draft textarea { width: 100%; min-height: 280px; line-height: 1.55; resize: vertical; font-family: var(--mono); font-size: 13px; }
.pg-ai .draft .text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--field); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 12px 14px; color: var(--ink); font-size: 14px; line-height: 1.6; }
.pg-ai .draft .ai-writeup-sec { margin: 0 0 12px; }
.pg-ai .draft .ai-writeup-sec:last-child { margin-bottom: 0; }
.pg-ai .draft-actions { margin-top: var(--space-4); }
.pg-ai .ai-finding-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 8px; }
.pg-ai #ai_finding_count, .pg-ai #ai_create_hint { margin: 0; }
.pg-ai .ai-mode-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.pg-ai .ai-mode-row label { display: flex; gap: 6px; align-items: center; font-weight: 500; margin: 0; color: var(--ink-2); }
.pg-ai .ai-mode-row input { accent-color: var(--accent); }
.pg-ai .ai-finding-list { max-height: 280px; overflow: auto; border: 1px solid var(--rule); border-radius: var(--r-menu); background: var(--field); padding: 4px 0; }
.pg-ai .ai-finding-list[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.pg-ai .ai-finding-row { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 8px 12px; font-weight: 500; color: var(--ink-2); border-left: 3px solid transparent; cursor: pointer; }
.pg-ai .ai-finding-row:hover { background: var(--accent-soft); color: var(--title); }
.pg-ai .ai-finding-row input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--accent); }
.pg-ai .ai-finding-row .ai-finding-meta { flex: 1 1 auto; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.pg-ai .ai-finding-row.ai-finding-approved { background: color-mix(in srgb, var(--ok-bg) 55%, var(--card)); border-left-color: var(--ok); }
.pg-ai .ai-finding-row.ai-finding-approved:hover { background: var(--ok-bg); }
.pg-ai .ai-in-report { margin-left: 6px; padding: 1px 8px; font-size: 11px; vertical-align: middle; }
.pg-ai .ai-finding-empty { margin: 10px 12px; }
.pg-ai .ai-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 6px 0 0; }
.pg-ai .ai-legend-swatch { margin-right: 4px; }
.pg-ai .drafts-head { margin-top: 0; }
.pg-ai .drafts-title { margin: 0; padding: 0; border: 0; font-family: var(--display); font-size: 17px; }
.pg-ai .ai-empty { text-align: center; padding: 28px 16px; }
.pg-ai .ai-empty-title { margin: 0 0 4px; color: var(--title); }
.pg-ai .ai-empty .hint { margin: 0; }
.pg-ai-off .ai-off-card { width: 100%; max-width: 680px; margin: 24px auto 0; align-self: center; display: flex; flex-direction: column; gap: 12px; }
.pg-ai-off .ai-off-card h1 { font-family: var(--display); font-size: 24px; line-height: 1.3; margin: 0; }
.pg-ai-off .ai-off-card p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.pg-ai-off .ai-off-card p.meta { color: var(--quiet); }
.pg-ai-off .ai-off-sub { font-family: var(--display); font-size: 16px; margin: 4px 0 0; }
.pg-ai-off .ai-off-steps { margin: 0; padding-left: 20px; color: var(--ink-2); line-height: 1.6; }
.pg-ai-off .ai-off-steps li { margin: 4px 0; }
.pg-ai-off .ai-off-steps ul { padding-left: 18px; margin: 4px 0; }
.pg-ai-off .ai-off-card .mono { font-family: var(--mono); font-size: 12.5px; color: var(--accent-hover); overflow-wrap: anywhere; }
.pg-ai-off .ai-off-actions { margin-top: 4px; }

/* ============ P31 SEBI CSCRF timeline (.pg-sebi) ============ */
.pg-sebi #expectation .prose { white-space: normal; margin: 0 0 8px; }
.pg-sebi .status-pill.sp-in_progress, .pg-sebi .status-pill.sp-pending, .pg-sebi .status-pill.sp-na { background: var(--neu-bg); color: var(--ink-2); }
.pg-sebi .status-pill.sp-pending, .pg-sebi .status-pill.sp-na { color: var(--quiet); }
@media (max-width: 700px) {
  .pg-sebi .page-head .actions { margin-left: 0; }
}

/* ============ X04 Scan detail (.pg-scan) ============ */
.pg-scan .back-link a { color: var(--accent); }
.pg-scan .lede .st { font-weight: 600; }
.pg-scan .kv-table th { width: 200px; white-space: nowrap; vertical-align: top; border-bottom: 1px solid var(--rule-2); color: var(--quiet); font-size: 12.5px; padding: 12px; }
.pg-scan .kv-table td.mono { overflow-wrap: anywhere; color: var(--ink-2); }
@media (max-width: 700px) {
  .pg-scan .kv-table, .pg-scan .kv-table tbody, .pg-scan .kv-table tr, .pg-scan .kv-table th, .pg-scan .kv-table td { display: block; width: auto; }
  .pg-scan .kv-table th { border-bottom: 0; padding-bottom: 2px; }
  .pg-scan .kv-table td { padding-top: 2px; }
}

/* ============ X03 Auth coverage (.pg-authcov) + _auth_profiles_section ============ */
.pg-authcov .cov-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pg-authcov .cov-strip .sev-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card); box-shadow: none; }
.pg-authcov .cov-strip .value { font-size: 24px; line-height: 1; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pg-authcov #summary .pill { margin: 2px 4px 2px 0; }
.pg-authcov #summary h3 { font-size: 14px; margin: 14px 0 8px; color: var(--title); }
.pg-authcov #checklist > .hint { margin: 0 0 12px; }
.pg-authcov td.mono { overflow-wrap: anywhere; }
.pg-authcov .auth-profiles-card > .hint { margin: 0 0 10px; }
.pg-authcov .auth-profiles-card > .warn { margin: 0 0 4px; }
@media (max-width: 1000px) {
  .pg-authcov .cov-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .pg-authcov .cov-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ======== Page layer W-E (merged from carbon-pages-e.css in Phase 7) ======== */
/* W-E page styles (written in Phase 5 as carbon-pages-e.css).
   Scope every rule under a page hook (body/main class or a page root id) so it cannot leak to other workers' pages.
   W-E hooks: .pg-set (library, shares, settings, users, credits), .pg-admin (pricing, subscription, billing admin),
   .pg-portal (client portal, portal finding, auditor) — each page also has its own .pg-<page> hook. */

/* ---------- Shared W-E utilities (replace the old inline style="" attributes) ---------- */
:is(.pg-set, .pg-admin, .pg-portal) .fields.fields-1 { grid-template-columns: minmax(0, 1fr); }
:is(.pg-set, .pg-admin, .pg-portal) .fields.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:is(.pg-set, .pg-admin, .pg-portal) .fields > .span-all { grid-column: 1 / -1; }
:is(.pg-set, .pg-admin, .pg-portal) .fields > .span-2 { grid-column: span 2; }
:is(.pg-set, .pg-admin, .pg-portal) .req { color: var(--danger); margin-left: 2px; }
:is(.pg-set, .pg-admin, .pg-portal) .text-danger { color: var(--danger); }
:is(.pg-set, .pg-admin, .pg-portal) .inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
:is(.pg-set, .pg-admin, .pg-portal) .form-actions { margin-top: var(--space-2); }
/* A form that is the first thing in a card should not get the generic "form after heading" top margin. */
:is(.pg-set, .pg-admin, .pg-portal) .card > form:first-child:first-child:first-child { margin-top: 0; }

/* Checkbox / radio rows with a title and helper text */
:is(.pg-set, .pg-admin, .pg-portal) .check-row { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--ink); cursor: pointer; }
:is(.pg-set, .pg-admin, .pg-portal) .check-row > input { width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
:is(.pg-set, .pg-admin, .pg-portal) .check-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:is(.pg-set, .pg-admin, .pg-portal) .check-row strong { font-weight: 600; color: var(--title); }
:is(.pg-set, .pg-admin, .pg-portal) .check-row:has(input:disabled) { opacity: .55; cursor: not-allowed; }
:is(.pg-set, .pg-admin, .pg-portal) .check-inline { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
:is(.pg-set, .pg-admin, .pg-portal) .check-inline > input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); }
:is(.pg-set, .pg-admin, .pg-portal) .check-list { display: flex; flex-direction: column; gap: 10px; }

/* Mono value boxes (tokens, TXT values) */
:is(.pg-set, .pg-admin, .pg-portal) .code-inline { display: inline-block; min-width: 0; max-width: 100%; padding: 8px 10px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--title); background: var(--field); border: 1px solid var(--rule-3); border-radius: var(--r-pill); overflow-wrap: anywhere; user-select: all; }

/* Table helpers */
:is(.pg-set, .pg-admin, .pg-portal) td.empty-row { color: var(--quiet); padding-top: 18px; padding-bottom: 18px; }
:is(.pg-set, .pg-admin, .pg-portal) td.cell-actions { text-align: right; }
:is(.pg-set, .pg-admin, .pg-portal) td.cell-actions .inline-form + .inline-form { margin-left: 6px; }

/* Section titles inside a single settings form card */
:is(.pg-set, .pg-admin) .set-sub { margin: 4px 0 10px; padding: 0; font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--title); }
:is(.pg-set, .pg-admin) .set-group { margin: 0 0 16px; padding: 14px 16px 2px; border: 1px solid var(--rule); border-radius: var(--r-menu); background: transparent; min-width: 0; }
:is(.pg-set, .pg-admin) .set-group > legend { margin: 0 0 0 -6px; padding: 0 6px; }

/* Logo drop zone (F6) — the zone itself is styled in attestra.css; these replace the inline styles */
:is(.pg-set, .pg-admin) .logo-drop .logo-drop-ico { color: var(--accent); flex: none; }
:is(.pg-set, .pg-admin) .logo-drop input[type=file] { width: auto; max-width: min(100%, 340px); min-height: 0; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--quiet-2); }
:is(.pg-set, .pg-admin) .logo-drop input[type=file]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:is(.pg-set, .pg-admin) .logo-current { margin-top: 10px; gap: 12px; }
:is(.pg-set, .pg-admin) .logo-preview { max-height: 48px; max-width: 220px; object-fit: contain; padding: 4px; background: var(--field); border: 1px solid var(--rule); border-radius: var(--r-pop); }

/* ---------- P42 / X09 Findings library ---------- */
.pg-lib .lib-seed { margin-top: 12px; }
.pg-lib .fields.lf-meta { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pg-lib .fields.lf-meta > .lf-rules { grid-column: 1 / span 2; }
.pg-lib .lf-snippets textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.pg-lib .lib-apply select, .pg-lib .lib-apply input { flex: 1 1 320px; min-width: 0; max-width: 560px; }
.pg-lib .lib-apply .asel { flex: 1 1 320px; min-width: 0; max-width: 560px; }

/* ---------- P43 Report templates ---------- */
.pg-rt .rt-saved { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pg-rt .card-head .check-inline { margin-left: auto; }
.pg-rt textarea.mono { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.pg-rt .rt-default { margin: 0; }

/* ---------- P44 Share links ---------- */
.pg-shares .share-form .fields { margin-bottom: 16px; }
.pg-shares [data-share-kind][hidden] { display: none; }
.pg-shares .share-token-row { gap: 8px; margin: 8px 0 10px; }
.pg-shares .share-token p { margin: 0 0 6px; }

/* ---------- P45 AI provider / P46 Email alerts / P48 Ownership validity ---------- */
.pg-ai .fields, .pg-alerts .fields { margin-bottom: 14px; }
.pg-own .fields.own-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

/* ---------- P47 Domain ownership ---------- */
.pg-dom .fields.dom-org { margin: 0; }
.pg-dom .fields.dom-add { grid-template-columns: minmax(0, 1fr) auto; align-items: start; margin-bottom: 0; }
.pg-dom .dom-add-btn { padding-top: 25px; }
.pg-dom .empty-note { margin: 0; }
.pg-dom .dom-status { margin: 0 0 6px; }
.pg-dom .dom-sub { margin: 16px 0 6px; font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--title); }
.pg-dom .dom-txt { gap: 8px; margin-bottom: 6px; }
.pg-dom .dom-actions { gap: 8px; margin-top: 8px; }
.pg-dom .dom-confirm { margin-top: 14px; }
.pg-dom .dom-confirm > summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.pg-dom .dom-confirm > form { margin-top: 10px; margin-bottom: 0; }

/* ---------- P49 Certification Authority ---------- */
.pg-ca .ca-actions { padding-bottom: 4px; }
.pg-ca .ca-actions .meta { margin-left: auto; }

/* ---------- P50 Users / X08 one-time link ---------- */
.pg-users .fields.invite-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-users .invite-actions { gap: 12px; }
.pg-users .card-head .people-filter { margin-left: auto; }
.pg-users .user-name { display: block; font-weight: 600; color: var(--title); }
.pg-users .row-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; min-width: 300px; }
.pg-users .role-form select { min-width: 140px; height: 32px; min-height: 32px; }
.pg-users .role-form .asel { width: auto; min-width: 150px; }
.pg-users .role-form .asel-trigger { height: 32px; min-height: 32px; }
.pg-users .empty-title { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.pg-ulink .ulink-card { max-width: 720px; }
.pg-ulink .ulink-card h1 { margin: 0 0 8px; }
.pg-ulink .ulink-row { margin: 6px 0 14px; }
.pg-ulink .ulink-row input { flex: 1 1 240px; min-width: 0; font-family: var(--mono); }

/* ---------- P51 Organization credits ---------- */
.pg-credits .credits-card h1 { margin: 0 0 8px; }
.pg-credits .credits-card .flash { margin: 12px 0 0; }
.pg-credits .credits-org { display: flex; flex-direction: column; gap: 6px; max-width: 360px; margin-top: 12px; }
.pg-credits .credits-balance { margin: 12px 0 0; }
.pg-credits .resolve-form { gap: 6px; justify-content: flex-end; }
.pg-credits .resolve-form input[type=text] { min-width: 160px; height: 32px; min-height: 32px; }

/* ---------- P52 Plans & pricing (was a page <style>) ---------- */
.pg-pricing .current-plan { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pg-pricing .plans-empty p { margin: 0; }
.pg-pricing .plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pg-pricing .plan-card { display: flex; flex-direction: column; gap: 10px; }
.pg-pricing .plan-card.is-current { border-color: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent) !important; } /* overrides A.3 card border */
.pg-pricing .plan-card .price strong { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--title); }
.pg-pricing .plan-card .limits { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.pg-pricing .plan-card .plan-action { margin-top: auto; }
.pg-pricing .page-head .actions .btn[aria-current] { pointer-events: none; }
.pg-pricing table.compare td { text-align: center; }
.pg-pricing table.compare th[scope=row] { text-align: left; font-size: 14px; font-weight: 400; color: var(--ink); }
.pg-pricing table.compare tr.group th { background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); text-align: left; }
.pg-pricing table.compare .yes { color: var(--pass); font-weight: 700; }
.pg-pricing table.compare .no { color: var(--quiet); }

/* ---------- X06 Subscription & billing, checkout return, subscription required ---------- */
:is(.pg-acct, .pg-tsub) .stat-card .value.value-sm { font-size: 18px; }
:is(.pg-acct, .pg-tsub) .acct-grid table th[scope=row] { width: 40%; text-align: left; font-size: 13px; font-weight: 500; color: var(--quiet); }
.pg-acct .acct-actions { gap: 10px; }
.pg-acct .feature-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pg-acct .feature-cols h3 { margin: 0 0 6px; font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.pg-acct .feat-list { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.8; color: var(--ink); }
.pg-acct .feat-list li.on > span[aria-hidden] { color: var(--pass); }
.pg-acct .feat-list li.off { color: var(--quiet); }
.pg-acct .cancel-box { margin-top: 16px; }
.pg-acct .cancel-box > summary { cursor: pointer; font-weight: 600; color: var(--danger); }
.pg-acct .cancel-box fieldset { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-menu); }
.pg-bret .bret-card { max-width: 760px; }
.pg-subreq .locked-page { max-width: 760px; text-align: left; }
.pg-subreq .locked-page .lock-big { margin-bottom: 8px; color: var(--quiet-2); }
:is(.pg-bret, .pg-subreq) .card > h1 { margin: 0 0 10px; }

/* ---------- P53–P55, X07 Billing administration ---------- */
.pg-admin .admin-filter { gap: 6px; }
.pg-admin .admin-filter select, .pg-admin .admin-filter .asel { min-width: 180px; }
.pg-plan-edit .flash-list { margin: 4px 0 0; padding-left: 18px; }
.pg-plan-edit .feature-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pg-plan-edit .feature-cols fieldset { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--rule); border-radius: var(--r-menu); min-width: 0; }
.pg-plan-edit .feature-cols legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--title); }
.pg-plan-edit .card > textarea { width: 100%; margin-bottom: 12px; }
.pg-tsub .admin-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--space-3); }
.pg-tsub .admin-act input[name=reason] { flex: 1 1 200px; min-width: 0; }
.pg-tsub details > summary { cursor: pointer; }

/* ---------- P56–P58, X05 Client portal and auditor ---------- */
.pg-portal .portal-brand { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card); }
.pg-portal .portal-brand-logo { max-height: 40px; max-width: 180px; object-fit: contain; }
.pg-portal .portal-brand-title { font-size: 15px; font-weight: 600; color: var(--title); }
.pg-portal .st { font-weight: 600; color: var(--title); }
.pg-portal .portal-counts { margin: 0 0 12px; }
.pg-portal-home .stat-strip.portal-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-portal-home .sev-cell { white-space: nowrap; }
.pg-portal-home .sev-cell .pill { text-transform: capitalize; }
.pg-portal-eng .stat-strip.sev-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pg-portal-eng .sev-tiles .label { text-transform: capitalize; }
.pg-portal-eng .sev-tiles .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot-info); flex: none; }
.pg-portal-eng .sev-tiles .sev-critical .dot { background: var(--dot-crit); }
.pg-portal-eng .sev-tiles .sev-high .dot { background: var(--dot-high); }
.pg-portal-eng .sev-tiles .sev-medium .dot { background: var(--dot-med); }
.pg-portal-eng .sev-tiles .sev-low .dot { background: var(--dot-low); }
.pg-portal-eng .cell-title a { font-weight: 500; }
.pg-portal-eng td.cell-loc { max-width: 420px; font-size: 12.5px; }
/* Phase 8 (Lead): keep portal findings columns readable after the unscoped #findings rules were removed */
.pg-portal-eng #findings td:nth-child(1), .pg-portal-eng #findings td:nth-child(2), .pg-portal-eng #findings td:nth-child(5), .pg-portal-eng #findings td:nth-child(6) { white-space: nowrap; }
.pg-portal-eng #findings td.cell-loc { min-width: 160px; }
.pg-portal-eng #findings td.cell-title { min-width: 120px; }
.pg-portal-eng .report-open { gap: 6px; flex-wrap: nowrap; margin: 0; }
.pg-portal-eng .report-open select, .pg-portal-eng .report-open .asel { min-width: 200px; }
.pg-portal-eng .report-plain { margin-top: 6px; }
.pg-portal-find .ev-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.pg-portal-find .ev-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: var(--field); border: 1px solid var(--rule); border-radius: var(--r-menu); }
.pg-portal-find .ev-body, .pg-portal-find .comment-body { flex: 1; min-width: 0; }
.pg-portal-find .ev-name { font-size: 13px; color: var(--title); }
.pg-portal-find .ev-meta { margin: 4px 0 0; }
.pg-portal-find .comment-list { margin: 0 0 16px; padding: 0; list-style: none; }
.pg-portal-find .comment-text { margin: 6px 0 0; white-space: pre-wrap; color: var(--ink-2); overflow-wrap: anywhere; }
.pg-portal-find .retest-list { margin: 0 0 16px; padding-left: 18px; }
.pg-audit .chain-status { margin: 0 0 6px; font-weight: 600; }
.pg-audit .audit-counts { margin: 0; color: var(--ink-2); }
.pg-audit td.hash-cell { min-width: 280px; max-width: 560px; font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }

/* ---------- Responsive (spec breakpoints 1100 / 1000 / 900 / 820 / 768 / 700) ---------- */
@media (max-width: 1100px) {
  .pg-lib .fields.lf-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-lib .fields.lf-meta > .lf-rules { grid-column: span 3; }
  .pg-users .fields.invite-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  :is(.pg-set, .pg-admin, .pg-portal) .fields.cols-3 { grid-template-columns: minmax(0, 1fr); }
  :is(.pg-set, .pg-admin, .pg-portal) .fields > .span-2 { grid-column: auto; }
  .pg-portal-eng .stat-strip.sev-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .pg-portal-home .stat-strip.portal-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .pg-users .card-head .people-filter { margin-left: 0; width: 100%; }
  .pg-ca .ca-actions { flex-wrap: wrap; }
  .pg-ca .ca-actions .meta { margin-left: 0; }
}
@media (max-width: 768px) {
  .pg-own .fields.own-row { grid-template-columns: minmax(0, 1fr); }
  .pg-rt .card-head .check-inline { margin-left: 0; }
  .pg-users .row-acts { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .pg-lib .fields.lf-meta, .pg-users .fields.invite-fields { grid-template-columns: minmax(0, 1fr); }
  .pg-lib .fields.lf-meta > .lf-rules { grid-column: auto; }
  .pg-dom .fields.dom-add { grid-template-columns: minmax(0, 1fr); }
  .pg-dom .dom-add-btn { padding-top: 0; }
  .pg-portal-eng .stat-strip.sev-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-portal-eng .report-open { flex-wrap: wrap; }
  .pg-lib .lib-apply select, .pg-lib .lib-apply input, .pg-lib .lib-apply .asel { flex-basis: 100%; max-width: none; }
}

/* ======== Light page layers L-A / L-B / L-C (merged by the Lead from light-pages-a/b/c.css, v23) — kept last so the cascade order is unchanged ======== */
/* Shared table additions (Lead merge, W4-B/W4-C requests): table-first cards sit flush; subtle edge shadows show that a wide table scrolls at narrow widths. */
.card:has(> .table-wrap:first-child) { padding-top: 0; }
@media (max-width: 768px) {
  .card .table-wrap {
    background:
      linear-gradient(to right, var(--card) 40%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(to left, var(--card) 40%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--title) 16%, transparent), transparent) left center / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--title) 16%, transparent), transparent) right center / 12px 100% no-repeat scroll;
  }
}

/* ---- L-A ---- */
/* Light theme page layer — group W4-A: auth, public, ops pages (login, register, invite/reset, share, verify, trust centre, home, dashboard, sites, tuning, calendar). Temporary file (W3 stub): write only rules scoped under your page hooks, tokens only (var(--token)); the Lead merges it into attestra.css after QA. */

/* ======== P01 Sign in — light split screen (.lg-*), benchmark: Attestra Cybersecurity Login Portal.png ======== */
body.pg-login { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background-color: var(--bg); background-image: none; }
body.pg-login main.lg-page { flex: 1 0 auto; width: 100%; max-width: none; margin: 0; padding: 0; box-sizing: border-box; display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); gap: 0; align-items: stretch; }

/* Brand panel */
body.pg-login .lg-brand { position: relative; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 48px 40px 48px max(56px, calc((100vw - 1440px) / 2 + 56px)); overflow: hidden;
  background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); }
body.pg-login .lg-logo-row { display: flex; align-items: center; gap: 12px; margin: 0 0 40px; }
body.pg-login .lg-logo { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--logo-bg); color: var(--logo-ink); }
body.pg-login .lg-logo svg { width: 24px; height: 24px; }
body.pg-login .lg-wordmark { display: flex; flex-direction: column; gap: 2px; }
body.pg-login .lg-name { font: 600 26px/1.1 var(--brand-font); letter-spacing: -.02em; color: var(--title); }
body.pg-login .lg-sub { font: 500 12px/1.3 var(--font); letter-spacing: .02em; color: var(--accent); }
body.pg-login .lg-headline { margin: 0; max-width: 11.2em; font: 600 34px/1.15 var(--brand-font); letter-spacing: -.02em; color: var(--title); }
body.pg-login .lg-tagline { margin: 14px 0 0; font: 500 20px/1.3 var(--brand-font); color: var(--accent); }
body.pg-login .lg-desc { margin: 16px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
body.pg-login .lg-features { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
body.pg-login .lg-features li { display: flex; align-items: center; gap: 14px; font-size: 15px; line-height: 1.4; color: var(--ink); }
body.pg-login .lg-fico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
body.pg-login .lg-fico svg { width: 18px; height: 18px; }
body.pg-login .lg-fw { margin: 18px 0 0; max-width: 46ch; font-size: 13px; line-height: 1.5; color: var(--quiet); }

/* Decorative illustration (inline SVG, tokens only, no animation) */
body.pg-login .lg-art { display: block; width: min(60%, 260px); height: auto; margin: 28px 0 0; opacity: .85; pointer-events: none; }
body.pg-login .lg-art .a-arc { fill: none; stroke: var(--brand); stroke-width: 2; opacity: .35; }
body.pg-login .lg-art .a-trace path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
body.pg-login .lg-art .a-node circle { fill: var(--brand); }
body.pg-login .lg-art .a-shield { fill: var(--brand-soft); stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
body.pg-login .lg-art .a-shield-in { fill: var(--accent-soft); stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; opacity: .9; }
body.pg-login .lg-art .a-shackle { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
body.pg-login .lg-art .a-lock { fill: var(--accent); }
body.pg-login .lg-art .a-key { fill: var(--brand-soft); }

/* Card column */
body.pg-login .lg-panel { min-width: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: var(--bg); }
body.pg-login .lg-card { width: 100%; max-width: 440px; margin: 0; box-sizing: border-box; padding: 36px 40px; display: flex; flex-direction: column; gap: 0; overflow: visible;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card); box-shadow: var(--shadow); }
body.pg-login .lg-card h1 { margin: 0; font: 600 26px/1.25 var(--brand-font); letter-spacing: -.02em; color: var(--title); }
body.pg-login .lg-lede { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--quiet); }
body.pg-login .lg-rule { display: block; width: 40px; height: 3px; margin: 16px 0 22px; border-radius: 2px; background: var(--brand); }
body.pg-login .lg-card .flash { margin: 0 0 16px; }
body.pg-login .lg-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
body.pg-login .lg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body.pg-login .lg-field label { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--title); }
body.pg-login .lg-field .req { color: var(--err-ink); }
body.pg-login .lg-input { position: relative; display: block; }
body.pg-login .lg-in-ico { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--quiet); pointer-events: none; }
body.pg-login .lg-input input.field { width: 100%; height: 44px; min-height: 44px; margin: 0; box-sizing: border-box; padding: 0 14px 0 40px; font: 400 14px/1.4 var(--font);
  color: var(--title); background: var(--field); border: 1px solid var(--field-line); border-radius: 10px; }
body.pg-login .lg-input input.field::placeholder { color: var(--placeholder); opacity: 1; }
body.pg-login .lg-input input.field:hover { border-color: var(--quiet); }
body.pg-login .lg-input input.field:focus { background: var(--field-focus); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); outline: none; }
body.pg-login .lg-input input#password { padding-right: 46px; }
body.pg-login .lg-eye { position: absolute; right: 4px; top: 50%; width: 36px; height: 36px; margin: -18px 0 0; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--quiet); box-shadow: none; cursor: pointer; }
body.pg-login .lg-eye:hover { background: var(--accent-soft); color: var(--accent); }
body.pg-login .lg-eye svg { width: 18px; height: 18px; }
body.pg-login .lg-eye .eye-off { display: none; }
body.pg-login .lg-eye.is-shown .eye { display: none; }
body.pg-login .lg-eye.is-shown .eye-off { display: block; }
body.pg-login .lg-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--quiet); }
body.pg-login .lg-submit { width: 100%; height: 44px; min-height: 44px; margin: 4px 0 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 15px var(--font); border-radius: 10px; }
body.pg-login .lg-submit svg { width: 18px; height: 18px; flex: none; }
body.pg-login .lg-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font-size: 12.5px; color: var(--quiet); }
body.pg-login .lg-or::before, body.pg-login .lg-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
body.pg-login .lg-note { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
body.pg-login .lg-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--quiet); }
body.pg-login .lg-note a, body.pg-login .lg-support a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
body.pg-login .lg-note a:hover, body.pg-login .lg-support a:hover { color: var(--accent-hover); }
body.pg-login .lg-support { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--rule-2); text-align: center; font-size: 13px; line-height: 1.6; color: var(--quiet); }

/* Footer bar */
body.pg-login .lg-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; box-sizing: border-box;
  padding: 14px max(24px, calc((100vw - 1440px) / 2 + 56px)); background: var(--card); border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--quiet); }
body.pg-login .lg-foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
body.pg-login .lg-foot a:hover { color: var(--accent-hover); }

/* Wide: art sits beside the text (never over it) */
@media (min-width: 1280px) {
  body.pg-login .lg-brand { padding-right: 56px; }
  body.pg-login .lg-art { position: absolute; right: 24px; top: 50%; width: min(330px, 42%); margin: 0; transform: translateY(-50%); }
  body.pg-login .lg-desc, body.pg-login .lg-fw { max-width: 40ch; }
}
/* Tablet: narrower brand panel, illustration at ~60 % */
@media (max-width: 1023px) {
  body.pg-login main.lg-page { grid-template-columns: minmax(0, 1fr) minmax(392px, 1.1fr); }
  body.pg-login .lg-brand { padding: 40px 28px 40px 28px; }
  body.pg-login .lg-logo-row { margin-bottom: 28px; }
  body.pg-login .lg-headline { font-size: 28px; }
  body.pg-login .lg-tagline { font-size: 18px; }
  body.pg-login .lg-panel { padding: 32px 20px; }
  body.pg-login .lg-card { padding: 32px 28px; }
  body.pg-login .lg-art { width: 60%; }
}
/* Phone: single column, compact brand header, card first */
@media (max-width: 767px) {
  body.pg-login main.lg-page { display: block; }
  body.pg-login .lg-brand { padding: 24px 20px 20px; align-items: center; text-align: center; background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); }
  body.pg-login .lg-logo-row { margin: 0; }
  body.pg-login .lg-headline, body.pg-login .lg-desc, body.pg-login .lg-features, body.pg-login .lg-fw, body.pg-login .lg-art { display: none; }
  body.pg-login .lg-tagline { margin: 10px 0 0; font-size: 16px; }
  body.pg-login .lg-panel { display: block; padding: 4px 16px 28px; }
  body.pg-login .lg-card { max-width: none; padding: 24px 20px; }
  body.pg-login .lg-card h1 { font-size: 22px; }
  body.pg-login .lg-foot { flex-direction: column; align-items: center; text-align: center; padding: 14px 16px; }
}
body.pg-login .lg-fw-i { white-space: nowrap; }

/* ======== P02 Register — brand-soft story panel + login-style card ======== */
body.pg-register { background-image: none; }
.pg-register main.reg-c { gap: 24px; padding: 24px; align-items: stretch; grid-template-columns: minmax(0, 1fr) minmax(400px, 460px); max-width: 1440px; margin: 0 auto; }
.pg-register .reg-story { gap: 16px; padding: 40px 44px; background: var(--brand-soft); border: 1px solid var(--rule); border-radius: var(--r-card); box-shadow: none; }
.pg-register .reg-brand { gap: 12px; font: 600 22px/1.1 var(--brand-font); letter-spacing: -.02em; }
.pg-register .reg-brand .lp-logo { width: 40px; height: 40px; border-radius: 11px; }
.pg-register .reg-brand .lp-logo svg { width: 22px; height: 22px; }
.pg-register .reg-headline { margin-top: 28px; font-size: 32px; line-height: 1.15; max-width: 16em; }
.pg-register .reg-intro { max-width: 52ch; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.pg-register .reg-get { max-width: 560px; margin-top: 10px; padding: 18px 22px; background: var(--card); border: 1px solid var(--rule); box-shadow: none; }
.pg-register .reg-get-title { color: var(--accent); }
.pg-register .reg-steps li { gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule-2); align-items: flex-start; }
.pg-register .reg-steps b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font: 600 12px/1 var(--mono); }
.pg-register .reg-steps strong { color: var(--title); }
.pg-register .reg-steps span { color: var(--quiet); }
.pg-register .reg-side { align-self: center; width: 100%; }
.pg-register .reg-card { gap: 14px; padding: 32px 36px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card); box-shadow: var(--shadow); }
.pg-register .reg-top { font-size: 13px; color: var(--quiet); }
.pg-register .reg-top a, .pg-register .reg-foot a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pg-register .reg-head h1 { margin: 0; font: 600 26px/1.25 var(--brand-font); letter-spacing: -.02em; color: var(--title); }
.pg-register .reg-rule { display: block; width: 40px; height: 3px; margin: 14px 0 0; border-radius: 2px; background: var(--brand); }
.pg-register .reg-sub { margin-top: 12px; font-size: 14px; color: var(--quiet); }
.pg-register .reg-form { gap: 16px; }
.pg-register .lp-field label { color: var(--title); font-size: 14px; }
.pg-register .lp-field input { height: 44px; min-height: 44px; border-radius: 10px; }
.pg-register .reg-pw { position: relative; display: block; }
.pg-register .reg-pw input { padding-right: 46px; }
.pg-register .lg-eye { position: absolute; right: 4px; top: 50%; width: 36px; height: 36px; margin: -18px 0 0; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--quiet); box-shadow: none; cursor: pointer; }
.pg-register .lg-eye:hover { background: var(--accent-soft); color: var(--accent); }
.pg-register .lg-eye svg { width: 18px; height: 18px; }
.pg-register .lg-eye .eye-off { display: none; }
.pg-register .lg-eye.is-shown .eye { display: none; }
.pg-register .lg-eye.is-shown .eye-off { display: block; }
.pg-register .reg-note { background: var(--brand-soft); border: 1px solid var(--rule); color: var(--ink-2); }
.pg-register .reg-foot { padding: 0 4px; font-size: 12.5px; color: var(--quiet); }
@media (max-width: 1000px) {
  .pg-register main.reg-c { grid-template-columns: minmax(0, 1fr); padding: 16px; max-width: 560px; }
  .pg-register .reg-side { align-self: stretch; }
}
@media (max-width: 480px) {
  .pg-register .reg-card { padding: 24px 20px; }
  .pg-register .reg-head h1 { font-size: 22px; }
  .pg-register main.reg-c { padding: 12px; }
}

/* ======== Invite accept / password reset (.pg-auth) — same card language as the login ======== */
.pg-auth .auth-p { width: min(440px, 100%); margin: 24px auto 0; padding: 36px 40px; gap: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card); box-shadow: var(--shadow); }
.pg-auth .auth-p h1 { font: 600 26px/1.25 var(--brand-font); letter-spacing: -.02em; }
.pg-auth .auth-p h1::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 14px; border-radius: 2px; background: var(--brand); }
.pg-auth .auth-sub { font-size: 14px; color: var(--quiet); }
.pg-auth .auth-form { gap: 16px; }
.pg-auth .lp-field label { color: var(--title); font-size: 14px; }
.pg-auth .lp-field input { height: 44px; min-height: 44px; border-radius: 10px; }
.pg-auth .lp-field .hint { font-size: 12.5px; color: var(--quiet); }
.pg-auth .auth-form button.block { height: 44px; min-height: 44px; margin-top: 4px; border-radius: 10px; font-size: 15px; }
@media (max-width: 480px) {
  .pg-auth .auth-p { padding: 24px 20px; margin-top: 8px; }
  .pg-auth .auth-p h1 { font-size: 22px; }
}

/* ======== Error page (.pg-404) ======== */
.pg-404 .err-card { max-width: 520px; padding: 36px 32px 32px; gap: 10px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-card); box-shadow: var(--shadow); }
.pg-404 .err-code { display: inline-flex; align-items: center; justify-content: center; align-self: center; padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--rule); font: 600 13px/1 var(--mono); letter-spacing: .12em; color: var(--quiet); }
.pg-404 .err-card h1 { font-size: 26px; }
.pg-404 .err-msg { align-self: center; }

/* ======== Public pages (share P03, verify P04, trust centre X02) ======== */
.pg-public .trust-req > summary { display: inline-flex; align-items: center; gap: 8px; } /* the ::before triangle needs a flex parent, else its border renders as a bar */
.pg-public .vr-result { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid transparent; border-radius: var(--r-menu); font-size: 15px; font-weight: 600; }
.pg-public .vr-result.is-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok-ink) 35%, transparent); color: var(--ok-ink); }
.pg-public .vr-result.is-bad { background: var(--err-bg); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent); color: var(--err-ink); }
.pg-public .vr-result .ok, .pg-public .vr-result .bad { color: inherit; }
.pg-public .vr-result + .kv { margin-top: 14px; }
.pg-public .pub-head h1 { font-size: 28px; }
.pg-public .pub-item { background: var(--card); border: 1px solid var(--rule); box-shadow: none; }

/* ======== Home / dashboard / sites / tuning / calendar ======== */
.pg-sites .sites-filter .asel { width: 12rem; min-width: 12rem; }
@media (max-width: 767px) {
  .pg-sites .sites-filter .asel { width: 100%; flex: 1 1 100%; }
  .pg-sites .sites-filter input[type=search] { flex: 1 1 100%; }
  .pg-sites .sites-filter label { flex: 0 0 100%; }
}

/* ---- L-B ---- */
/* Light theme page layer — group W4-B: engagement workspace (new-engagement wizard, engagement detail tabs, findings, targets, scans, reports).
   Temporary file (W3 stub): rules scoped under page hooks, tokens only (var(--token)); the Lead merges it into attestra.css after QA.
   Hooks: .pg-wiz .pg-eng .pg-find .pg-asset .pg-sub (.pg-scan .pg-authcov .pg-pci .pg-iso .pg-sebi .pg-ai .pg-ai-off). Loaded after attestra.css (equal specificity wins by order). */

/* ===== 1. Wizard rail (W3 known issue 1): no off-screen scrolling rail; the steps wrap inside the card ===== */
.pg-wiz .wiz:not(.wiz-js) .wrail,
.pg-wiz .wrail { overflow: visible; }
.pg-wiz .wiz:not(.wiz-js) .wrail ol { flex-wrap: wrap; }
.pg-wiz .wstep-link { position: relative; }
/* Done badge: the number gets a tick (shape, not colour alone). Mask uses currentColor, so no colour literal is needed. */
.pg-wiz .wstep-link.done:not(.on) b::after {
  content: ""; flex: none; display: block; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pg-wiz .wstep-link.done:not(.on) b { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: auto; min-width: 26px; padding: 0 6px; }
@media (max-width: 900px) {
  .pg-wiz .wrail { padding: 10px 12px; }
  .pg-wiz .wrail ol { flex-wrap: wrap; gap: 6px; }
  .pg-wiz .wstep-link { padding: 6px 10px; min-height: 40px; }
}
/* ≤640: only the current step shows its label; the others keep their name for assistive tech (visually hidden, not display:none). */
@media (max-width: 640px) {
  .pg-wiz .wrail ol { gap: 4px; }
  .pg-wiz .wstep-link { gap: 6px; padding: 6px 4px; }
  .pg-wiz .wstep-link.on { padding: 6px 8px; }
  /* done = tick only (same pattern as the engagement step tiles); the number stays in the DOM for assistive tech */
  .pg-wiz .wstep-link.done:not(.on) b { width: 26px; min-width: 0; padding: 0; font-size: 0; }
  .pg-wiz .wstep-link.done:not(.on) b::after { margin: 0; width: 12px; height: 12px; vertical-align: middle; }
  .pg-wiz .wstep-link:not(.on) span {
    display: inline; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .pg-wiz .wstep-link.on span { display: inline; }
  .pg-wiz .wfoot { flex-wrap: wrap; }
}

/* Wizard: framework chips / test chips selected state reads without colour (tick + fill + border) */
.pg-wiz .checks label { background: var(--card); border: 1px solid var(--rule-3); color: var(--ink-2); }
.pg-wiz .checks label:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.pg-wiz .checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--title); font-weight: 600; }
.pg-wiz .wtarget { background: var(--surface-elev); }

/* ===== 2. Engagement detail ===== */
/* Step tiles (W3 known issue 2): the text column must shrink inside its tile instead of overflowing the edge */
.pg-eng .steps .step-text { flex: 1 1 0; min-width: 0; }
.pg-eng .steps a.done { background: var(--card); }
.pg-eng .steps a.done .step-num { background-color: var(--pass-bg); }
@media (max-width: 560px) {
  .pg-eng .steps { gap: 8px; padding: 10px; }
  .pg-eng .steps a, .pg-eng .steps a:last-child { padding: 8px 10px; gap: 8px; min-height: 52px; }
  .pg-eng .steps a .step-num { width: 24px; height: 24px; }
  .pg-eng .steps .step-row { font-size: 12.5px; }
  .pg-eng .steps .step-meta { font-size: 11.5px; }
}

/* Mutation-approval form: even rhythm; the long inputs span the card */
.pg-eng #mutation-approvals form > div:not(.fields):not(.form-actions) { margin-top: 12px; }
.pg-eng #mutation-approvals form textarea,
.pg-eng #mutation-approvals form > div > input { width: 100%; }
.pg-eng #mutation-approvals .form-actions { margin: 14px 0 20px; }
.pg-eng #mutation-approvals h3 { margin: 4px 0 8px; }

/* ===== 3. Breadcrumbs on the workspace pages wrap instead of stacking a single word ===== */
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .breadcrumb { display: flex; flex-wrap: wrap; row-gap: 2px; max-width: 100%; }
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .breadcrumb > a { min-width: 0; overflow-wrap: anywhere; }
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .breadcrumb .current { white-space: nowrap; }

/* ===== 4. Finding detail: lifecycle bar (done / current / side), proof and raw output ===== */
.pg-find .wf .wf-step.done::before { background: var(--accent); }
.pg-find .wf .wf-step.cur::before { height: 6px; margin-bottom: 6px; background: var(--accent-hover); box-shadow: 0 0 0 1px var(--accent-line); }
.pg-find .wf .wf-step.cur.side::before { background: var(--quiet); box-shadow: none; }
.pg-find .wf .wf-step:not(.done):not(.cur)::before { background: var(--rule-3); }
.pg-find pre, .pg-find .proof-box, .pg-find .code-box,
.pg-asset pre, .pg-sub pre, .pg-eng pre {
  background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--rule); font-family: var(--mono);
  max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-find pre code, .pg-asset pre code, .pg-sub pre code, .pg-eng pre code { background: transparent; border: 0; padding: 0; }
.pg-find pre:focus-visible, .pg-asset pre:focus-visible, .pg-sub pre:focus-visible, .pg-eng pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== 5. Tables on the workspace pages: head --surface-2, hover --brand-soft, never wider than the card ===== */
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .table-wrap { max-width: 100%; }
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .table tbody tr:hover > td,
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .targets-table tbody tr:hover > td { background: var(--brand-soft); }

/* ===== 6. Small details ===== */
:is(.pg-eng, .pg-find, .pg-asset, .pg-sub) .meta-row .sep { color: var(--quiet-2); }
/* File inputs: the shared rule drops the field ring; give the native control a visible keyboard focus (2 px --accent) */
:is(.pg-wiz, .pg-eng, .pg-find, .pg-asset, .pg-sub) input[type=file]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- L-C ---- */
/* Light theme page layer — group W4-C: library, settings, admin, portal. Temporary file (W3 stub): write only rules scoped under your page hooks, tokens only (var(--token)); the Lead merges it into attestra.css after QA. */

/* ---- Table-first cards: header row flush with the card top (no empty strip), corners clipped ---- */
:is(.pg-set, .pg-admin, .pg-portal) .card:has(> .table-wrap:first-child) { overflow: hidden; } /* padding-top:0 is global now */

/* ---- Pricing compare table: row headers share the card surface; only the group rows and header are tinted ---- */
.pg-pricing table.compare tbody th[scope=row] { background: transparent; }

/* ---- Credits: the organisation picker sits under the lede without a truncated divider ---- */
.pg-credits .credits-card form.credits-org { border-top: 0; padding-top: 0; }

/* ---- Portal finding: breadcrumb separators and metadata dots are decorative but still meet text contrast ---- */
.pg-portal .sep { color: var(--quiet); }

/* ======== Wizard scroll range: one scroller on short or narrow viewports (QA dd-b) ======== */
/* On <=820px-high or <=900px-wide screens the card (min-height 440) + page head are taller than the workspace, so the workspace AND .wbody both
   scrolled, the Continue/Create footer started under the dock, and .wbody's overscroll-behavior:contain stopped the wheel from reaching it.
   There the step body grows with its content, the workspace is the only scroller and the footer sticks to its bottom edge.
   overflow:clip (not hidden) keeps position:sticky working; -8px = .workspace padding-bottom, so no content shows under the footer. */
@media (max-width: 900px), (max-height: 820px) {
  .pg-wiz .wiz.wiz-js { flex: none; min-height: 0; overflow: clip; }
  .pg-wiz .wiz-js .wform { min-height: 0; }
  .pg-wiz .wiz-js .wsteps, .pg-wiz .wiz-js .wstep.is-current { flex: none; min-height: 0; }
  .pg-wiz .wiz-js .wbody { overflow: visible; }
  .pg-wiz .wiz-js .wfoot { position: sticky; bottom: -8px; }
}
.pg-wiz .wiz-err, .pg-wiz .whead { scroll-margin-top: 16px; }
