:root {
  color-scheme: light;
  --canvas:#e6dac3;
  --paper:#f7f0e3;
  --paper-strong:#fffaf0;
  --ink:#17202b;
  /* Phase 0 accessibility fix: the spec value (DESIGN.md --atlas-slate
     #64707A, ~= the prior #687077 here) measures 4.44-4.47:1 on --paper -
     under the 4.5:1 AA floor for the secondary/body-adjacent text color
     used throughout the app. Darkened to clear AA with headroom toward the
     AAA target; see the accessibility contrast note in the Phase 0 block
     near the end of this file. */
  --muted:#485059;
  --night:#07182d;
  --navy:#102d56;
  --orange:#e77e18;
  --orange-soft:#f3d7b7;
  --rule:#cec0a8;
  --moss:#3d745b;
  --clay:#a95638;
  --risk:#923d45;
  --violet:#62517f;
  --blue:#2e6d8c;
  --shadow:0 18px 50px rgba(23,31,39,.13);
  --ui:"IBM Plex Sans","Avenir Next",Aptos,"Segoe UI",sans-serif;
  --serif:"Source Serif 4","Iowan Old Style",Baskerville,Georgia,serif;
  --mono:"IBM Plex Mono",Menlo,Consolas,monospace;
  /* Phase 0 legibility baseline (DESIGN.md "Atlas accessibility and visual
     language"): body 17px min, operational rows/nav 15px min, compact
     metadata/chips 14px min, control labels 15px min with 44px targets. */
  --type-caption:.875rem;
  --type-control:.9375rem;
  --type-body:1.0625rem;
  --type-emphasis:1.125rem;
  /* Bridge v3 (issue #153) dark-surface semantic tokens (DESIGN.md "v3
     amendments after adversarial review"). Only the dark scope below needs
     the lightened, contrast-verified hexes; the light theme already clears
     AA/AAA with the base --moss/--clay/--risk/--violet/--blue tokens, so
     these simply alias them here so both themes can share one CSS variable
     name in the Bridge component rules. */
  --atlas-moss-on-dark:var(--moss);
  --atlas-clay-on-dark:var(--clay);
  --atlas-oxblood-on-dark:var(--risk);
  --atlas-violet-on-dark:var(--violet);
  --atlas-blue-on-dark:var(--blue);
}

/* Slack Connection Studio fields remain readable and bounded on narrow owner screens. */
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.form-grid label { display:grid; gap:6px; color:var(--muted); font-size:13px; line-height:1.3; }
.form-grid input, .form-grid select { width:100%; min-height:44px; padding:10px 12px; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:5px; font:inherit; font-size:14px; }
.slack-channel-discovery { margin-top:14px; padding-top:14px; border-top:1px solid var(--rule); }
.slack-discovery-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; color:var(--muted); font-size:13px; }
.slack-discovery-meta strong { color:var(--ink); font-size:14px; }
.slack-discovery-meta span { font-size:13px; }
@media (max-width: 620px) {
  .form-grid { grid-template-columns:minmax(0,1fr); }
  .slack-discovery-meta { display:grid; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas:#07121f;
  --paper:#0b1b2d;
  --paper-strong:#10243a;
  --ink:#edf1ed;
  --muted:#a9b6c0;
  --night:#030c16;
  --navy:#183e69;
  --orange:#f19a42;
  --orange-soft:#3b2a1d;
  --rule:#294158;
  --moss:#75bd96;
  --clay:#e29a73;
  --risk:#ed868c;
  --violet:#b7a7d7;
  --blue:#80bad3;
  --shadow:0 18px 50px rgba(0,0,0,.28);
  /* Bridge v3 (issue #153) dark-surface semantic tokens (DESIGN.md "v3
     amendments after adversarial review"): the base semantic tokens were
     sampled for light surfaces and fail AA as text/icon color on the dark
     shell, so Bridge uses these lightened, contrast-verified variants
     instead. Checked against every dark surface Bridge content actually
     sits on - --paper #0b1b2d, --paper-strong #10243a, --night #030c16,
     --canvas #07121f (WCAG relative-luminance contrast, computed, not by
     eye): moss 8.53/7.72/9.65/9.24, clay 7.58/6.86/8.58/8.22, oxblood
     6.92/6.27/7.84/7.50, violet 6.96/6.30/7.88/7.54, blue 7.86/7.12/8.90/
     8.52 (paper/paper-strong/night/canvas order). All clear AA (4.5:1) with
     large headroom; oxblood and violet sit at 6.27-6.30 on paper-strong
     specifically (AAA is 7:1) - already far above the 4.5:1 floor and not
     further lightened because doing so pushes them toward orange/pink and
     breaks the entity-color distinction from --orange/--risk. */
  --atlas-moss-on-dark:#74C69D;
  --atlas-clay-on-dark:#E39B6B;
  --atlas-oxblood-on-dark:#E58A90;
  --atlas-violet-on-dark:#AC9BD6;
  --atlas-blue-on-dark:#7FB4E0;
}

/* Wave A (docs/plans/ATLAS_UX_OVERHAUL_SPEC.md "color titles, not just
   bold"): section/record titles carry a semantic color, not only weight.
   coloredTitle()/titleClass() in atlas.js pick one of these; the base
   tokens already flip with the light/dark toggle, so they read correctly
   on every themed paper/canvas surface. The small set of always-dark
   shell bands (.record-hero and its compact variants: .wave-hero-compact,
   .event-hero) re-point the same classes at the contrast-verified
   *-on-dark aliases below, exactly like .agent-hero-glyph already does. */
/* !important is deliberate here, not a specificity shortcut taken lightly:
   these classes are applied to h1/h2/h3/strong headings inside many
   pre-existing containers (.sec-head h3, .section-title h2, .record-
   section-title h2, ...) that already set their own `color` with equal or
   higher compound specificity than a bare class. The one job of a
   .title-* class is to win that color regardless of which heading
   context it lands in, so every title stays a stable, predictable
   semantic color no matter where coloredTitle() is used. */
.title-agent { color:var(--violet) !important; }
.title-human, .title-owner { color:var(--orange) !important; }
.title-verified { color:var(--moss) !important; }
.title-wait { color:var(--clay) !important; }
.title-risk { color:var(--risk) !important; }
.title-bank { color:var(--blue) !important; }
.title-ink { color:var(--ink) !important; }
.record-hero .title-agent { color:var(--atlas-violet-on-dark) !important; }
.record-hero .title-verified { color:var(--atlas-moss-on-dark) !important; }
.record-hero .title-wait { color:var(--atlas-clay-on-dark) !important; }
.record-hero .title-risk { color:var(--atlas-oxblood-on-dark) !important; }
.record-hero .title-bank { color:var(--atlas-blue-on-dark) !important; }

* { box-sizing:border-box; }
html { font-size:16px; text-size-adjust:100%; -webkit-text-size-adjust:100%; }
html, body { margin:0; min-height:100%; overflow-x:clip; background:var(--canvas); color:var(--ink); font-family:var(--ui); }
body { min-width:320px; }
button, input, textarea, select { font:inherit; }
button { cursor:pointer; }
img { display:block; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible, [role="button"]:focus-visible { outline:3px solid var(--orange); outline-offset:3px; box-shadow:0 0 0 5px color-mix(in srgb, var(--night) 60%, transparent); }

.atlas-app { min-height:100vh; display:grid; }
.atlas-rail { position:fixed; inset:0 auto 0 0; width:218px; padding:22px 16px 16px; display:flex; flex-direction:column; z-index:30; overflow-y:auto; color:#f9f6ed; background:var(--night); border-right:1px solid rgba(255,255,255,.12); }
.atlas-mark { min-height:58px; display:flex; align-items:center; gap:12px; padding:0 5px 18px; color:inherit; border-bottom:1px solid rgba(255,255,255,.13); text-decoration:none; }
.atlas-mark:hover .mark-name strong { color:#f6c86f; }
.atlas-mark:focus-visible { outline:3px solid #e6b24f; outline-offset:3px; border-radius:7px; }
.mark-logo { width:76px; height:40px; display:grid; place-items:center; padding:5px; overflow:hidden; background:#fff; border-radius:7px; }
.mark-logo img { width:67px; height:auto; }
.mark-name strong { display:block; font:600 20px/1 var(--serif); }
.mark-name span { display:block; margin-top:4px; color:#9eacb9; font-size:9px; letter-spacing:.14em; text-transform:uppercase; }
.active-programme { margin:18px 5px 14px; }
.active-programme small { color:#8ea0b0; font-size:9px; letter-spacing:.11em; text-transform:uppercase; }
.active-programme strong { display:block; margin-top:5px; font-size:12px; line-height:1.35; }
.programme-pulse { display:flex; align-items:center; gap:7px; margin-top:9px; color:#a8b7c4; font-size:10px; }
.programme-pulse i { width:7px; height:7px; flex:none; border-radius:50%; background:#68b18b; box-shadow:0 0 0 4px rgba(95,170,132,.13); }
.atlas-menu { display:grid; gap:3px; }
.atlas-menu button { min-height:42px; padding:0 11px; display:flex; align-items:center; gap:11px; position:relative; border:0; border-radius:7px; color:#b8c5d0; background:transparent; text-align:left; font-size:12px; font-weight:700; }
.atlas-menu button img { width:18px; height:18px; filter:invert(1); opacity:.84; }
.atlas-menu button:hover { color:#fff; background:#0d243e; }
.atlas-menu button.active { color:#fff; background:#143459; }
.atlas-menu button.active::before { content:""; position:absolute; left:-16px; top:7px; bottom:7px; width:3px; background:var(--orange); }
.atlas-menu button.active img { opacity:1; }
.atlas-menu em { min-width:18px; margin-left:auto; color:#8093a5; font:700 9px var(--mono); font-style:normal; text-align:right; }
.atlas-menu button.active em { color:#f6b66f; }
.atlas-owner { margin-top:auto; padding:15px 6px 0; border-top:1px solid rgba(255,255,255,.13); }
.owner-line { display:grid; grid-template-columns:34px 1fr; gap:9px; align-items:center; }
.owner-avatar, .top-owner { display:grid; place-items:center; border-radius:8px; color:#231505; background:var(--orange); font-size:13px; font-weight:900; }
.owner-avatar { width:34px; height:34px; }
.owner-line strong { font-size:11px; }
.owner-line span { display:block; margin-top:2px; color:#8fa2b2; font-size:9px; }
.private-note { display:flex; align-items:center; gap:6px; margin-top:12px; color:#8598a8; font-size:9px; }
.private-note img { width:14px; height:14px; filter:invert(1); opacity:.65; }
.rail-close { display:none; }

.atlas-stage { grid-column:2; min-width:0; }
.atlas-topbar { height:66px; padding:0 26px; display:grid; grid-template-columns:minmax(180px,.65fr) minmax(280px,520px) auto; gap:20px; align-items:center; position:sticky; top:0; z-index:20; border-bottom:1px solid var(--rule); background:color-mix(in srgb,var(--paper) 94%,transparent); backdrop-filter:blur(18px); }
/* Slim persistent keyboard-shortcut status line under the topbar (desktop only:
   a keyboard hint earns no space on touch, where these keys do not apply). */
.atlas-shortcut-bar { position:sticky; top:66px; z-index:19; display:flex; flex-wrap:wrap; align-items:center; gap:5px 18px; padding:6px 26px; border-bottom:1px solid var(--rule); background:color-mix(in srgb,var(--paper) 92%,transparent); backdrop-filter:blur(12px); color:var(--muted); font-size:var(--type-caption); }
.atlas-shortcut-bar .shortcut-lead { font-weight:800; letter-spacing:.09em; text-transform:uppercase; font-size:.7rem; }
.atlas-shortcut-bar > span { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.atlas-shortcut-bar kbd { min-width:17px; padding:1px 5px; display:inline-flex; align-items:center; justify-content:center; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:5px; font:700 .7rem var(--mono); }
@media (max-width:900px) { .atlas-shortcut-bar { display:none; } }
.operating-horizon small { color:var(--muted); font-size:8px; letter-spacing:.12em; text-transform:uppercase; }
.operating-horizon strong { display:block; margin-top:2px; font:600 16px var(--serif); }
.atlas-query { height:40px; min-width:0; padding:0 11px; display:flex; align-items:center; gap:9px; color:var(--muted); background:var(--paper-strong); border:1px solid var(--rule); border-radius:8px; text-align:left; font-size:11px; }
.atlas-query:hover { border-color:var(--orange); color:var(--ink); }
.atlas-query img { width:17px; height:17px; opacity:.72; }
html[data-theme="dark"] .atlas-query img, html[data-theme="dark"] .icon-button img, html[data-theme="dark"] .section-title img, html[data-theme="dark"] .button img { filter:invert(1); }
.atlas-query span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.atlas-query kbd { margin-left:auto; padding:2px 5px; color:var(--muted); border:1px solid var(--rule); border-radius:4px; font:700 9px var(--mono); }
.topbar-controls { display:flex; gap:7px; align-items:center; }
.walkthrough-launch { min-height:40px; padding:0 12px; display:flex; align-items:center; gap:7px; color:var(--ink); background:color-mix(in srgb,var(--orange) 10%,var(--paper-strong)); border:1px solid color-mix(in srgb,var(--orange) 55%,var(--rule)); border-radius:8px; font-size:12px; font-weight:800; }
.walkthrough-launch:hover { background:color-mix(in srgb,var(--orange) 18%,var(--paper-strong)); border-color:var(--orange); }
.walkthrough-launch img { width:17px; height:17px; }
html[data-theme="dark"] .walkthrough-launch img { filter:invert(1); }
.icon-button { width:40px; height:40px; display:grid; place-items:center; position:relative; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:8px; }
.icon-button:hover { border-color:var(--orange); }
.icon-button img { width:18px; height:18px; }
.attention-count { width:17px; height:17px; display:grid; place-items:center; position:absolute; right:-4px; top:-4px; color:#fff; background:var(--risk); border:2px solid var(--paper); border-radius:50%; font:700 8px var(--mono); }
.top-owner { width:40px; height:40px; }
.theme-toggle img { position:absolute; transition:opacity .15s ease; }
.theme-sun { opacity:0; }
html[data-theme="dark"] .theme-moon { opacity:0; }
html[data-theme="dark"] .theme-sun { opacity:1; }
.mobile-open { display:none; }

.atlas-workbench { width:100%; min-height:calc(100vh - 66px); margin:0 auto; padding:22px 26px 52px; }
.atlas-loading, .atlas-error, .atlas-empty { min-height:430px; display:grid; place-items:center; align-content:center; text-align:center; }
.atlas-loading strong, .atlas-error strong, .atlas-empty strong { margin-top:14px; font:600 24px var(--serif); }
.atlas-loading p, .atlas-error p, .atlas-empty p { max-width:480px; margin:8px auto 0; color:var(--muted); font-size:13px; line-height:1.5; }
.loading-mark { width:34px; height:34px; border:3px solid var(--rule); border-top-color:var(--orange); border-radius:50%; animation:atlas-spin .8s linear infinite; }
@keyframes atlas-spin { to { transform:rotate(360deg); } }

.overline { color:var(--clay); font-size:9px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.dayline, .page-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:28px; align-items:end; padding:7px 0 18px; border-bottom:1px solid var(--rule); }
.page-head { border-bottom:2px solid var(--ink); }
.dayline h1, .page-head h1 { margin:5px 0; font:600 clamp(31px,3vw,46px)/1.02 var(--serif); letter-spacing:-.025em; }
.dayline p, .page-head p { max-width:760px; margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.reconciled { min-width:152px; padding-left:13px; border-left:2px solid var(--orange); }
.reconciled span, .headline-stat small { display:block; color:var(--muted); font-size:9px; letter-spacing:.1em; text-transform:uppercase; }
.reconciled strong { display:block; margin-top:4px; font:600 17px var(--serif); }
.headline-stat { text-align:right; }
.headline-stat strong { display:block; margin-top:4px; font:600 25px var(--serif); }

.owner-desk { margin-top:20px; display:grid; grid-template-columns:minmax(0,1.55fr) minmax(310px,.7fr); background:var(--paper-strong); border:1px solid var(--rule); box-shadow:var(--shadow); }
/* .next-result is shared by the owner-desk pattern on the Security and QA
   views (renderContract/renderQA still emit it - see grep in the Bridge v3
   CSS agent's report); Bridge v3 replaces its OWN usage with .next-strip but
   this class stays. Consolidated to its single effective padding value (the
   two later overrides at the old v2-shell and whitespace-compaction passes
   agreed on 18px/22px; both are removed below as dead duplicates). */
.next-result { padding:18px 22px; position:relative; }
.next-result::before { content:""; position:absolute; left:0; top:0; width:4px; height:86px; background:var(--orange); }
.next-result h2 { max-width:730px; margin:7px 0 11px; font:600 clamp(25px,2.4vw,37px)/1.08 var(--serif); letter-spacing:-.02em; }
.next-result p { max-width:760px; margin:0; color:var(--muted); font-size:12px; line-height:1.55; }
.track { height:5px; overflow:hidden; background:var(--canvas); }
.track i { display:block; width:0; height:100%; background:var(--moss); transition:width .25s ease; }
.release-path { padding:20px; background:color-mix(in srgb,var(--paper) 80%,var(--canvas)); border-left:1px solid var(--rule); }
.release-path h3 { margin:5px 0 13px; font:600 19px var(--serif); }
.gate { padding:10px 0; display:grid; grid-template-columns:20px 1fr auto auto; gap:8px; align-items:start; border-bottom:1px solid var(--rule); }
.gate:last-child { border-bottom:0; }
.gate-icon { width:20px; height:20px; display:grid; place-items:center; border-radius:5px; color:var(--moss); background:color-mix(in srgb,var(--moss) 18%,transparent); font-size:13px; font-weight:900; }
.gate-icon.wait { color:var(--clay); background:color-mix(in srgb,var(--clay) 18%,transparent); }
.gate-icon.fail { color:var(--risk); background:color-mix(in srgb,var(--risk) 18%,transparent); }
.gate strong { font-size:10px; }
.gate small { display:block; margin-top:2px; color:var(--muted); font-size:9px; line-height:1.35; }
.gate time { color:var(--muted); font:700 8px var(--mono); white-space:nowrap; }
.release-detail { margin-top:10px; display:inline-flex; align-items:center; gap:6px; min-height:34px; }
.release-detail img { width:14px; height:14px; }
html[data-theme="dark"] .release-detail img { filter:invert(1); }

.attention, .programme-spine, .lower, .data-section { margin-top:20px; }
.section-title { padding-bottom:9px; display:flex; align-items:end; justify-content:space-between; gap:18px; border-bottom:2px solid var(--ink); }
.section-title h2 { margin:0; font:600 23px var(--serif); }
.section-title p { margin:0; color:var(--muted); font-size:10px; }
.section-title button { padding:5px 0; display:flex; align-items:center; gap:5px; color:var(--ink); background:transparent; border:0; font-size:10px; font-weight:800; }
.section-title button img { width:15px; height:15px; }
.decision-list, .ledger, .waiting, .record-list, .connection-list { background:var(--paper-strong); border:1px solid var(--rule); border-top:0; }
.decision { padding:18px 20px; display:grid; grid-template-columns:110px minmax(220px,1.15fr) minmax(220px,.9fr) 150px; gap:15px; align-items:center; border-bottom:1px solid var(--rule); }
.decision:last-child { border-bottom:0; }
.decision .kind { font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.decision strong { font-size:13px; line-height:1.35; }
.decision p { margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.button, .decision button, .row-action { min-height:36px; padding:0 11px; display:inline-flex; align-items:center; justify-content:center; gap:6px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:7px; font-size:9px; font-weight:800; text-decoration:none; }
.button img, .decision button img, .row-action img { width:15px; height:15px; }
.button.primary, .decision button.primary, .row-action.primary { color:#fff; background:var(--night); border-color:var(--night); }
.button.primary img, .decision button.primary img, .row-action.primary img { filter:invert(1); }
.button.secondary { background:transparent; }
.button.danger { color:#fff; background:var(--risk); border-color:var(--risk); }
.button[disabled], .decision button[disabled], .row-action[disabled] { cursor:not-allowed; opacity:.55; }

.programme-spine { display:grid; grid-template-columns:48px minmax(0,1fr); }
.spine-line { position:relative; }
.spine-line::before { content:""; position:absolute; left:21px; top:15px; bottom:20px; width:1px; background:var(--rule); }
.spine-row { padding:14px 0; display:grid; grid-template-columns:48px minmax(190px,.85fr) minmax(200px,1.2fr) 94px; gap:13px; align-items:center; position:relative; border-bottom:1px solid var(--rule); }
.spine-dot { width:19px; height:19px; margin-left:-37px; z-index:2; border:5px solid var(--moss); border-radius:50%; background:var(--paper); }
.spine-dot.warn { border-color:var(--clay); }
.spine-dot.future { border-color:var(--violet); }
.spine-row strong { font-size:11px; }
.spine-row small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.spine-row p { margin:0; color:var(--muted); font-size:10px; line-height:1.4; }
.spine-progress { display:flex; align-items:center; gap:8px; }
.spine-progress .track { flex:1; }
.spine-progress b { font:700 9px var(--mono); }
.dark-note { margin-top:18px; padding:19px 20px; display:grid; grid-template-columns:28px 1fr; gap:10px; color:#fff; background:var(--night); border-left:4px solid var(--orange); }
.dark-note img { width:18px; filter:invert(1); }
.dark-note strong { font-size:11px; }
.dark-note p { margin:4px 0 0; color:#b8c5cf; font-size:9px; line-height:1.45; }

.lower { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(310px,.75fr); gap:20px; }
.ledger-row { padding:13px 14px; display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:10px; align-items:start; border-bottom:1px solid var(--rule); }
.ledger-row:last-child { border-bottom:0; }
.actor { width:32px; height:32px; display:grid; place-items:center; color:var(--blue); background:color-mix(in srgb,var(--blue) 14%,transparent); border-radius:7px; font-size:13px; font-weight:900; }
.actor.agent { color:var(--violet); background:color-mix(in srgb,var(--violet) 16%,transparent); }
.ledger-row strong { font-size:13px; }
.ledger-row p { margin:3px 0; color:var(--muted); font-size:12px; line-height:1.45; }
.ledger-row span, .ledger-row time { color:var(--muted); font:600 12px var(--mono); }
.wait-row { padding:13px 0; border-bottom:1px solid var(--rule); }
.wait-row:last-child { border-bottom:0; }
.waiting { padding:0 14px; }
.wait-row header { display:flex; justify-content:space-between; gap:10px; }
.wait-row small { color:var(--clay); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.wait-row time { color:var(--muted); font:700 8px var(--mono); }
.wait-row strong { display:block; margin-top:5px; font-size:10px; }
.wait-row p { margin:4px 0 9px; color:var(--muted); font-size:9px; line-height:1.4; }
.text-action { padding:4px 0; color:var(--navy); background:transparent; border:0; font-size:9px; font-weight:800; }
html[data-theme="dark"] .text-action { color:#b5d5ee; }

.roster, .client-ledger { margin-top:18px; border-top:1px solid var(--rule); }
.roster { display:grid; gap:24px; border-top:0; }
.roster-group { border-top:1px solid var(--rule); }
.roster-group > header { min-height:70px; padding:13px 0; display:flex; align-items:center; justify-content:space-between; gap:18px; border-bottom:1px solid var(--rule); }
.roster-group > header h3 { margin:4px 0 0; font:600 1.15rem/1.2 var(--serif); }
.authority-key { min-height:32px; padding:6px 9px; display:inline-flex; align-items:center; gap:7px; border:1px solid var(--rule); border-radius:6px; color:var(--muted); font-size:.75rem; font-weight:800; }
.authority-key img { width:15px; height:15px; }
.authority-key.human { color:var(--clay); border-color:color-mix(in srgb,var(--orange) 48%,var(--rule)); background:color-mix(in srgb,var(--orange) 8%,transparent); }
.authority-key.agent { color:var(--violet); border-color:color-mix(in srgb,var(--violet) 44%,var(--rule)); background:color-mix(in srgb,var(--violet) 8%,transparent); }
html[data-theme="dark"] .authority-key img { filter:invert(1); }
.roster-row { padding:14px 0; display:grid; grid-template-columns:44px minmax(140px,.7fr) minmax(210px,1.35fr) 130px 95px 110px; gap:13px; align-items:center; border-bottom:1px solid var(--rule); }
.portrait { width:36px; height:36px; display:grid; place-items:center; color:var(--blue); background:color-mix(in srgb,var(--blue) 15%,transparent); border-radius:8px; font-size:10px; font-weight:900; }
.portrait.agent { color:var(--violet); background:color-mix(in srgb,var(--violet) 16%,transparent); }
.roster-row strong { font-size:.78rem; }
.roster-row small { display:block; margin-top:3px; color:var(--muted); font-size:.75rem; line-height:1.4; }
.mission b { display:block; font-size:.78rem; }
.mission span { color:var(--muted); font-size:.75rem; line-height:1.4; }
.state { display:inline-flex; align-items:center; gap:6px; color:var(--moss); font-size:.75rem; font-weight:800; }
.state::before { content:""; width:7px; height:7px; flex:none; border:2px solid currentColor; border-radius:50%; background:transparent; }
.state.wait { color:var(--clay); }
.state.agent.running, .state.agent.active { color:var(--violet); }
.state.agent.running::before, .state.agent.active::before { background:var(--violet); }
.state.agent.idle { color:var(--muted); }
.state.agent.paused { color:var(--clay); }
.state.human { color:var(--clay); }
.boundary { color:var(--muted); font-size:.72rem; line-height:1.45; }

.agent-command { margin-top:20px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:end; padding:22px 24px; color:#fff; background:var(--night); border-left:4px solid var(--violet); box-shadow:var(--shadow); }
.agent-command h2 { margin:6px 0 8px; font:600 29px/1.06 var(--serif); }
.agent-command p { max-width:760px; margin:0; color:#b8c5cf; font-size:12px; line-height:1.5; }
.agent-command-stats { display:grid; grid-template-columns:repeat(3,96px); border:1px solid rgba(255,255,255,.16); }
.agent-command-stats span { min-height:76px; padding:12px; border-right:1px solid rgba(255,255,255,.16); }
.agent-command-stats span:last-child { border-right:0; }
.agent-command-stats small { display:block; color:#9dafbd; font-size:9px; text-transform:uppercase; letter-spacing:.07em; }
.agent-command-stats b { display:block; margin-top:8px; font:600 23px var(--serif); }
.delivery-chain { margin-top:18px; display:grid; grid-template-columns:repeat(6,minmax(145px,1fr)); position:relative; border:1px solid var(--rule); background:var(--paper-strong); box-shadow:var(--shadow); }
.delivery-chain::before { content:""; height:2px; position:absolute; left:7%; right:7%; top:38px; z-index:0; background:var(--rule); }
.delivery-stage { min-width:0; padding:17px 15px 15px; position:relative; z-index:1; border-right:1px solid var(--rule); }
.delivery-stage:last-child { border-right:0; }
.stage-sequence { width:34px; height:34px; display:grid; place-items:center; color:#fff; background:var(--violet); border:5px solid var(--paper-strong); border-radius:50%; font:800 9px var(--mono); }
.delivery-stage.wait .stage-sequence, .delivery-stage.waiting .stage-sequence { background:var(--clay); }
.delivery-stage.locked .stage-sequence { color:var(--muted); background:var(--canvas); }
.delivery-stage.complete .stage-sequence { background:var(--moss); }
.delivery-stage.active { box-shadow:inset 0 4px 0 var(--violet); background:color-mix(in srgb,var(--violet) 5%,var(--paper-strong)); }
.delivery-stage.locked { background:color-mix(in srgb,var(--canvas) 72%,var(--paper-strong)); }
.delivery-stage.complete { background:color-mix(in srgb,var(--moss) 4%,var(--paper-strong)); }
.delivery-stage.human-gate { box-shadow:inset 0 4px 0 var(--orange); }
.delivery-stage.human-gate .stage-sequence { color:var(--night); background:var(--sand); border-color:var(--paper-strong); outline:2px solid var(--orange); outline-offset:-3px; }
.stage-labels { min-height:30px; margin-top:10px; display:flex; align-items:flex-start; flex-wrap:wrap; gap:5px; }
.stage-status { display:block; color:var(--muted); font-size:.7rem; line-height:1.4; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.human-gate-label { padding:2px 5px; color:var(--clay); border:1px solid color-mix(in srgb,var(--orange) 58%,var(--rule)); border-radius:4px; font-size:.65rem; line-height:1.35; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }
.delivery-stage h3 { margin:5px 0 7px; font:600 17px/1.12 var(--serif); }
.delivery-stage p { min-height:66px; margin:0; color:var(--muted); font-size:.75rem; line-height:1.5; }
.stage-actor { min-height:42px; margin-top:12px; padding-top:10px; display:flex; align-items:flex-start; gap:7px; border-top:1px solid var(--rule); color:var(--ink); font-size:10px; font-weight:700; }
.stage-actor img { width:15px; height:15px; flex:none; }
html[data-theme="dark"] .stage-actor img { filter:invert(1); }
.stage-evidence { min-height:34px; display:flex; align-items:flex-start; gap:6px; color:var(--muted); font:600 .7rem/1.45 var(--mono); }
.stage-evidence img { width:13px; height:13px; flex:none; margin-top:1px; opacity:.75; }
html[data-theme="dark"] .stage-evidence img { filter:invert(1); }
.delivery-stage.locked .stage-status, .delivery-stage.locked .stage-evidence { color:color-mix(in srgb,var(--muted) 82%,var(--ink)); }
.source-mode-note { min-height:42px; padding:10px 12px; display:flex; align-items:center; gap:9px; color:var(--muted); background:color-mix(in srgb,var(--blue) 7%,var(--paper-strong)); border:1px solid var(--rule); border-bottom:0; font-size:.75rem; line-height:1.4; }
.source-mode-note img { width:15px; height:15px; }
html[data-theme="dark"] .source-mode-note img { filter:invert(1); }
.run-ledger { background:var(--paper-strong); border:1px solid var(--rule); border-top:0; }
.run-ledger article { padding:15px 16px; display:grid; grid-template-columns:150px minmax(280px,1.2fr) minmax(230px,.86fr) 110px; gap:15px; align-items:center; border-bottom:1px solid var(--rule); }
.run-ledger article:last-child { border-bottom:0; }
.run-provider span, .run-handoff small { display:block; color:var(--muted); font-size:.7rem; line-height:1.4; text-transform:uppercase; letter-spacing:.06em; }
.run-provider strong, .run-handoff b { display:block; margin-top:4px; font-size:.75rem; line-height:1.45; }
.run-provider em { display:block; margin-top:5px; color:var(--muted); font:600 .68rem/1.35 var(--mono); font-style:normal; }
.run-handoff { min-height:64px; padding:10px 11px; display:flex; align-items:flex-start; gap:9px; color:var(--ink); background:color-mix(in srgb,var(--orange) 8%,var(--paper)); border-left:3px solid var(--orange); }
.run-handoff.quiet { background:color-mix(in srgb,var(--moss) 7%,var(--paper)); border-left-color:var(--moss); }
.run-handoff > img { width:16px; height:16px; flex:none; }
html[data-theme="dark"] .run-handoff > img { filter:invert(1); }
.run-ledger article > div:nth-child(2) > strong { font-size:13px; }
.run-ledger p { margin:4px 0; color:var(--muted); font-size:12px; line-height:1.45; }
.run-ledger article > div:nth-child(2) > small { color:var(--muted); font:600 .7rem/1.45 var(--mono); }
.run-tools { margin-top:7px; display:flex; align-items:flex-start; gap:6px; color:var(--muted); font:600 .7rem/1.45 var(--mono); }
.run-tools img { width:13px; height:13px; flex:none; opacity:.7; }
html[data-theme="dark"] .run-tools img { filter:invert(1); }
.agent-scope { margin-top:7px; }
.agent-scope summary { width:max-content; max-width:100%; min-height:36px; display:flex; align-items:center; gap:5px; color:var(--action); font-size:.75rem; font-weight:800; cursor:pointer; list-style:none; }
.agent-scope summary::-webkit-details-marker { display:none; }
.agent-scope summary img { width:12px; height:12px; }
html[data-theme="dark"] .agent-scope summary img { filter:invert(1); }
.agent-scope > div { margin-top:8px; padding:9px 10px; display:grid; grid-template-columns:74px minmax(0,1fr); gap:5px 8px; background:var(--canvas); border-left:2px solid var(--violet); }
.agent-scope small { margin:0; color:var(--muted); font-size:.7rem; line-height:1.4; text-transform:uppercase; letter-spacing:.05em; }
.agent-scope b { color:var(--ink); font:600 .75rem/1.45 var(--sans); }

.client-row, .connection-row { padding:14px 0; display:grid; grid-template-columns:minmax(210px,1.3fr) minmax(130px,.6fr) 105px 120px minmax(130px,.7fr) 96px; gap:12px; align-items:center; border-bottom:1px solid var(--rule); }
.client-row strong, .connection-row strong { font-size:10px; }
.client-row small, .connection-row small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.client-row div, .connection-row div { font-size:9px; }
.label { min-height:23px; padding:3px 8px; display:inline-flex; align-items:center; width:max-content; max-width:100%; color:var(--moss); background:color-mix(in srgb,var(--moss) 15%,transparent); border-radius:6px; font-size:8px; font-weight:800; }
.label.wait { color:var(--clay); background:color-mix(in srgb,var(--clay) 15%,transparent); }
.label.risk { color:var(--risk); background:color-mix(in srgb,var(--risk) 15%,transparent); }
.client-actions { display:flex; justify-content:flex-end; }

.infra-field { margin-top:18px; display:grid; grid-template-columns:repeat(3,1fr); background:var(--paper-strong); border:1px solid var(--rule); }
.environment { padding:17px; border-right:1px solid var(--rule); }
.environment:last-child { border-right:0; }
.environment header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.environment h3 { margin:0; font:600 18px var(--serif); }
.status-dot { width:9px; height:9px; border-radius:50%; background:var(--moss); box-shadow:0 0 0 4px color-mix(in srgb,var(--moss) 15%,transparent); }
.status-dot.warn { background:var(--clay); }
.status-dot.risk { background:var(--risk); }
.environment > p { margin:5px 0 13px; color:var(--muted); font:600 8px var(--mono); }
.service { padding:10px 0; border-top:1px solid var(--rule); }
.service strong { font-size:9px; }
.service span { float:right; font-weight:700; }
.service small { display:block; margin-top:3px; color:var(--muted); font-size:8px; }

.audit-toolbar { margin-top:18px; display:flex; justify-content:flex-end; }
.metadata { font:600 8px var(--mono); color:var(--muted); }

.baseline-compare { margin-top:20px; display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--rule); background:var(--paper-strong); box-shadow:var(--shadow); }
.baseline-compare article { padding:22px 24px; }
.baseline-compare article + article { border-left:1px solid var(--rule); background:color-mix(in srgb,var(--paper) 78%,var(--canvas)); }
.baseline-compare h2 { margin:7px 0 8px; font:600 27px/1.05 var(--serif); }
.baseline-compare p { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.baseline-compare dl { margin:18px 0 0; padding-top:14px; display:grid; grid-template-columns:auto 1fr; gap:8px 14px; border-top:1px solid var(--rule); font-size:9px; }
.baseline-compare dt { color:var(--muted); }
.baseline-compare dd { margin:0; text-align:right; font-weight:800; }
.truth-ledger, .source-ledger { border:1px solid var(--rule); border-top:0; background:var(--paper-strong); }
.truth-row { padding:15px 16px; display:grid; grid-template-columns:34px minmax(260px,1fr) 164px 145px; gap:15px; align-items:center; border-bottom:1px solid var(--rule); }
.truth-row:last-child, .milestone-row:last-child, .payment-row:last-child, .control-row:last-child, .source-ledger article:last-child { border-bottom:0; }
.row-number { color:var(--clay); font:800 9px var(--mono); }
.truth-row strong, .milestone-row strong, .payment-row strong, .control-row strong, .source-ledger strong { font-size:13px; }
.truth-row p, .milestone-row p, .payment-row p, .control-row p, .source-ledger p { margin:3px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.source-cell small, .milestone-row small, .control-row small, .source-ledger small { display:block; color:var(--muted); font-size:11px; letter-spacing:.05em; text-transform:uppercase; }
.source-cell b, .milestone-row b, .control-row b, .source-ledger b { display:block; margin-top:3px; font-size:12px; line-height:1.35; }
.milestone-row { padding:14px 16px; display:grid; grid-template-columns:minmax(270px,1fr) 132px 120px 155px 150px; gap:14px; align-items:center; border-bottom:1px solid var(--rule); }
.commercial-banner { margin-top:20px; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--rule); background:var(--night); color:#fff; box-shadow:var(--shadow); }
.commercial-banner > div { min-height:118px; padding:18px; border-right:1px solid rgba(255,255,255,.16); }
.commercial-banner > div:last-child { border-right:0; }
.commercial-banner small { color:#9eb0c0; font-size:8px; letter-spacing:.1em; text-transform:uppercase; }
.commercial-banner strong { display:block; margin:9px 0 7px; font:600 23px/1 var(--serif); }
.commercial-banner span { color:#b7c4cf; font-size:9px; line-height:1.4; }
.payment-row { padding:14px 16px; display:grid; grid-template-columns:34px minmax(280px,1fr) 110px 170px 180px; gap:15px; align-items:center; border-bottom:1px solid var(--rule); }
.payment-row > b { font:600 19px var(--serif); text-align:right; }
.source-link { min-height:36px; padding:6px 9px; display:flex; align-items:center; justify-content:flex-start; gap:6px; color:var(--navy); background:transparent; border:1px solid var(--rule); border-radius:6px; font-size:12px; font-weight:800; text-align:left; }
.source-link img { width:14px; height:14px; }
html[data-theme="dark"] .source-link { color:#c3dded; }
html[data-theme="dark"] .source-link img { filter:invert(1); }
.commitments { display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--rule); border-top:0; background:var(--paper-strong); }
.commitments article { padding:22px; }
.commitments article + article { border-left:1px solid var(--rule); }
.commitments h3 { margin:6px 0 8px; font:600 23px var(--serif); }
.commitments p { margin:0 0 15px; color:var(--muted); font-size:10px; }
.commitments article > div { padding:12px 0; border-top:1px solid var(--rule); }
.commitments small { color:var(--muted); font-size:8px; letter-spacing:.08em; text-transform:uppercase; }
.commitments ul { columns:2; padding-left:16px; margin:8px 0 0; color:var(--muted); font-size:9px; line-height:1.55; }
.truth-strip { margin-top:20px; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--rule); background:var(--paper-strong); }
.truth-strip > span { min-height:88px; padding:16px; border-right:1px solid var(--rule); }
.truth-strip > span:last-child { border-right:0; }
.truth-strip small { display:block; color:var(--muted); font-size:8px; letter-spacing:.07em; text-transform:uppercase; }
.truth-strip b { display:block; margin-top:8px; font:600 16px/1.15 var(--serif); }
.source-ledger article { padding:14px 16px; display:grid; grid-template-columns:minmax(300px,1.35fr) minmax(150px,.7fr) minmax(130px,.6fr) 120px 105px; gap:14px; align-items:center; border-bottom:1px solid var(--rule); }
.source-ledger article > div:first-child > span { display:block; margin-top:5px; color:var(--muted); font:600 8px/1.35 var(--mono); overflow-wrap:anywhere; }
.control-row { padding:14px 16px; display:grid; grid-template-columns:minmax(300px,1fr) 170px minmax(160px,.7fr) 180px; gap:14px; align-items:center; border-bottom:1px solid var(--rule); }

[data-record-open] { cursor:pointer; position:relative; transition:background .14s ease,border-color .14s ease,transform .14s ease; }
[data-record-open]:hover { background:color-mix(in srgb,var(--blue) 7%,var(--paper-strong)); }
[data-record-open]:focus-visible { z-index:2; outline:3px solid var(--orange); outline-offset:-3px; box-shadow:inset 0 0 0 5px color-mix(in srgb, var(--night) 60%, transparent); }
.truth-row[data-record-open]::after,.milestone-row[data-record-open]::after,.payment-row[data-record-open]::after,.source-ledger [data-record-open]::after,.control-row[data-record-open]::after { content:"Open"; position:absolute; right:9px; bottom:5px; color:var(--blue); font:700 10px var(--mono); opacity:0; }
.truth-row[data-record-open]:hover::after,.milestone-row[data-record-open]:hover::after,.payment-row[data-record-open]:hover::after,.source-ledger [data-record-open]:hover::after,.control-row[data-record-open]:hover::after { opacity:1; }

.connection-head { margin-bottom:0; }
.connection-legend { display:grid; grid-template-columns:repeat(4,1fr); margin-top:18px; background:var(--night); border:1px solid color-mix(in srgb,var(--blue) 42%,var(--rule)); color:#edf3f5; box-shadow:var(--shadow); }
.connection-legend > span { min-height:76px; padding:15px; display:grid; grid-template-columns:22px 1fr; column-gap:9px; align-content:center; border-right:1px solid rgba(255,255,255,.13); }
.connection-legend > span:last-child { border-right:0; }
.connection-legend img { width:18px; height:18px; grid-row:1 / 3; filter:invert(1); opacity:.82; }
.connection-legend b { font-size:13px; }
.connection-legend small { color:#aebdc8; font-size:12px; line-height:1.35; }
.connection-studio { margin-top:18px; background:var(--paper-strong); border:1px solid var(--rule); }
.connection-studio .connection-row { padding:16px 15px; display:grid; grid-template-columns:minmax(180px,1.1fr) minmax(150px,.75fr) 134px minmax(150px,.9fr) 128px; gap:16px; align-items:center; border-bottom:1px solid var(--rule); }
.connection-stages { display:flex; gap:6px; }
.connection-stages .stage { flex:1; position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.02em; text-align:center; }
.connection-stages .stage::before { content:""; position:absolute; top:4px; left:calc(-50% + 5px); width:calc(100% - 10px); height:1.5px; background:var(--rule); }
.connection-stages .stage:first-child::before { display:none; }
.connection-stages .stage i { position:relative; z-index:1; width:9px; height:9px; border-radius:50%; background:var(--paper); border:1.5px solid var(--rule); }
.connection-stages .stage.on { color:var(--moss); }
.connection-stages .stage.on i { background:var(--moss); border-color:var(--moss); }
.connection-stages .stage.on::before { background:color-mix(in srgb,var(--moss) 60%,var(--rule)); }
.connection-status { display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.row-action.ghost { color:var(--muted); background:transparent; border-color:var(--rule); }
.audit-filters { flex-direction:column; align-items:stretch; gap:10px; }
.audit-search { display:flex; align-items:center; gap:8px; padding:0 12px; min-height:40px; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
.audit-search img { width:15px; height:15px; opacity:.6; }
html[data-theme="dark"] .audit-search img { filter:invert(1); }
.audit-search input { flex:1; min-height:38px; border:0; background:transparent; color:var(--ink); font-size:13px; outline:none; }
.upload-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; }
.upload-input { flex:1; min-width:150px; font-size:12px; color:var(--muted); }
.upload-input::file-selector-button { margin-right:10px; padding:7px 11px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:7px; font-weight:800; font-size:11px; cursor:pointer; }
.wave-control-grid { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
/* Wave record page: compact title (one row, no cosmetic whitespace), tactile
   buttons, and a monospace dispatch log. All scoped to .wave-record so the
   shared record chrome and button primitive are untouched. */
.wave-record .record-page-head { padding:22px 0 16px; gap:20px; align-items:center; }
.wave-record .record-page-head h1 { max-width:none; margin:5px 0 7px; font-size:clamp(26px,2.5vw,36px); line-height:1.05; letter-spacing:-.02em; text-wrap:balance; }
.wave-record .record-page-head p { font-size:15px; line-height:1.5; }
.wave-record .button { transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease; }
.wave-record .button:active { transform:translateY(1px) scale(.97); }
.wave-record .button.is-pulsed { animation:wave-btn-pulse .42s ease; }
@keyframes wave-btn-pulse { 0%{transform:scale(1);} 32%{transform:scale(.94);} 64%{transform:scale(1.03);} 100%{transform:scale(1);} }
.wave-dispatch { margin-top:12px; }
.wave-dispatch-actions { display:flex; gap:10px; flex-wrap:wrap; }
.wave-dispatch-log { margin:12px 0 0; padding:12px; max-height:360px; overflow:auto; border:1px solid var(--rule); border-radius:11px; background:var(--paper); -webkit-overflow-scrolling:touch; }
.dispatch-placeholder { display:flex; align-items:center; gap:9px; padding:6px 4px; color:var(--muted); font-size:var(--type-caption); }
.dispatch-placeholder img { width:16px; height:16px; }
html[data-theme="dark"] .dispatch-placeholder img { filter:invert(1); }
.dispatch-log-head { display:flex; align-items:center; gap:11px; padding:2px 4px 12px; }
.dispatch-log-head strong { display:block; color:var(--ink); font-size:var(--type-control); }
.dispatch-log-head small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); }
.di-badge { display:inline-flex; align-items:center; gap:6px; flex:none; padding:5px 10px; border-radius:999px; font-size:.72rem; font-weight:800; letter-spacing:.03em; text-transform:uppercase; border:1px solid var(--rule); }
.di-badge img { width:14px; height:14px; }
.di-badge.preview { color:var(--muted); background:var(--paper-strong); }
.di-badge.live { color:#fff; background:var(--orange); border-color:var(--orange); }
.di-badge.live img { filter:invert(1); }
html[data-theme="dark"] .di-badge.preview img { filter:invert(1); }
.dispatch-items { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:9px; }
.dispatch-item { padding:11px 12px; border:1px solid var(--rule); border-radius:9px; background:var(--paper-strong); display:flex; flex-direction:column; gap:7px; }
.di-head { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.di-agent { display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border:1px solid var(--rule); border-radius:999px; background:var(--paper); color:var(--ink); font-size:.78rem; font-weight:800; cursor:pointer; transition:border-color .12s ease, transform .1s ease; }
.di-agent:hover { border-color:var(--orange); }
.di-agent:active { transform:scale(.96); }
.di-agent.static { cursor:default; }
.di-agent img { width:14px; height:14px; }
html[data-theme="dark"] .di-agent img { filter:invert(1); }
.di-arrow { flex:none; color:var(--muted); }
.di-arrow img { width:14px; height:14px; }
html[data-theme="dark"] .di-arrow img { filter:invert(1); }
.di-ticket { display:inline-flex; align-items:center; gap:4px; color:var(--orange); font:700 .8rem var(--mono); text-decoration:none; }
.di-ticket:hover { text-decoration:underline; }
.di-ticket img { width:12px; height:12px; }
.di-title { font-size:var(--type-caption); line-height:1.4; color:var(--ink); font-weight:600; }
.di-meta { display:flex; flex-wrap:wrap; gap:6px; }
.di-tag { padding:2px 8px; border-radius:6px; background:var(--paper); border:1px solid var(--rule); color:var(--muted); font-size:.72rem; font-weight:700; }
.di-branch { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:.72rem; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.di-branch img { width:12px; height:12px; flex:none; }
html[data-theme="dark"] .di-branch img { filter:invert(1); }
.dispatch-more { margin-top:9px; display:flex; align-items:center; gap:7px; color:var(--muted); font-size:var(--type-caption); }
.dispatch-more img { width:15px; height:15px; }
html[data-theme="dark"] .dispatch-more img { filter:invert(1); }
.dispatch-empty { display:flex; align-items:flex-start; gap:10px; padding:8px 4px; color:var(--muted); }
.dispatch-empty img { width:17px; height:17px; flex:none; margin-top:1px; }
html[data-theme="dark"] .dispatch-empty img { filter:invert(1); }
.dispatch-empty strong { display:block; color:var(--ink); font-size:var(--type-caption); }
.dispatch-empty small { display:block; margin-top:2px; font-size:var(--type-caption); }
/* Dry run preview: richer than the Kick off cards. Each ready ticket shows
   what the agent would DO (objective + deliverable), what it would MUTATE
   (the branch it creates and the scope it owns), and a Ready status; a rollup
   foot states the count and that nothing was written. */
.dispatch-preview-loading { display:flex; align-items:center; gap:10px; padding:10px 4px; color:var(--muted); font-size:var(--type-caption); }
.dispatch-items-preview { grid-template-columns:1fr; gap:9px; }
/* Collapsible dry-run item: a compact summary row (agent -> ticket, branch,
   status) that expands to the objective, owned scope and deliverable. */
details.dispatch-item.preview { display:block; padding:0; gap:0; border-left:3px solid var(--orange); }
details.dispatch-item.preview > summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:10px 12px; cursor:pointer; list-style:none; }
details.dispatch-item.preview > summary::-webkit-details-marker { display:none; }
details.dispatch-item.preview > summary:hover { background:color-mix(in srgb, var(--orange) 5%, transparent); }
.dpv-agent { display:inline-flex; align-items:center; gap:6px; color:var(--ink); font-size:.8rem; font-weight:800; }
.dpv-agent img { width:14px; height:14px; }
html[data-theme="dark"] .dpv-agent img { filter:invert(1); }
.dpv-branch { display:inline-flex; align-items:center; gap:5px; max-width:100%; color:var(--muted); font-size:.72rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dpv-branch img { width:13px; height:13px; flex:none; }
html[data-theme="dark"] .dpv-branch img { filter:invert(1); }
.dpv-caret { width:14px; height:14px; margin-left:auto; opacity:.6; transition:transform .18s ease; }
details.dispatch-item.preview[open] > summary .dpv-caret { transform:rotate(180deg); }
html[data-theme="dark"] .dpv-caret { filter:invert(1); }
.dpv-body { padding:10px 12px 12px; display:grid; gap:9px; border-top:1px solid var(--rule); }
.dpv-objective { margin:0; display:grid; gap:3px; color:var(--ink); font-size:var(--type-caption); line-height:1.5; }
.dpv-objective .overline { display:inline-flex; align-items:center; gap:6px; }
.dpv-objective .overline img { width:13px; height:13px; }
html[data-theme="dark"] .dpv-objective .overline img { filter:invert(1); }
.dispatch-item.not-ready { padding:10px 12px; border-left:3px solid var(--clay); opacity:.92; }
.dpv-reason { display:flex; align-items:flex-start; gap:7px; margin:0; color:var(--clay); font-size:var(--type-caption); font-weight:600; }
.dpv-reason img { width:15px; height:15px; flex:none; margin-top:1px; }
html[data-theme="dark"] .dpv-reason img { filter:invert(41%) sepia(31%) saturate(1200%) hue-rotate(330deg); }
.dpv-deliverable { display:flex; align-items:flex-start; gap:7px; margin:0; color:var(--muted); font-size:var(--type-caption); line-height:1.45; }
.dpv-deliverable img { width:14px; height:14px; flex:none; margin-top:2px; }
html[data-theme="dark"] .dpv-deliverable img { filter:invert(1); }
.dpv-facts { display:grid; gap:9px; padding:9px 11px; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
.dpv-fact { display:grid; gap:4px; min-width:0; }
.dpv-fact .overline { display:inline-flex; align-items:center; gap:6px; }
.dpv-fact .overline img { width:13px; height:13px; }
html[data-theme="dark"] .dpv-fact .overline img { filter:invert(1); }
.dpv-fact code { color:var(--orange); font-size:.78rem; word-break:break-all; }
.dpv-own { margin:0; padding-left:16px; display:grid; gap:3px; color:var(--ink); font-size:var(--type-caption); line-height:1.45; }
.dispatch-preview-foot { margin-top:11px; display:grid; gap:11px; }
.dpv-rollup { display:flex; align-items:flex-start; gap:9px; padding:11px 12px; border-radius:9px; font-size:var(--type-caption); line-height:1.5; border:1px solid var(--rule); }
.dpv-rollup img { width:17px; height:17px; flex:none; margin-top:1px; }
.dpv-rollup strong { color:var(--ink); }
.dpv-rollup.ok { background:color-mix(in srgb, var(--moss) 12%, transparent); border-color:color-mix(in srgb, var(--moss) 40%, var(--rule)); }
.dpv-rollup.warn { background:color-mix(in srgb, var(--clay) 12%, transparent); border-color:color-mix(in srgb, var(--clay) 40%, var(--rule)); }
html[data-theme="dark"] .dpv-rollup.ok img { filter:invert(58%) sepia(38%) saturate(560%) hue-rotate(96deg); }
html[data-theme="dark"] .dpv-rollup.warn img { filter:invert(52%) sepia(52%) saturate(900%) hue-rotate(330deg); }
.dpv-mutations { padding:10px 12px; background:var(--paper); border:1px solid var(--rule); border-radius:9px; }
.dpv-mutations .overline { display:inline-flex; align-items:center; gap:6px; margin-bottom:6px; }
.dpv-mutations .overline img { width:13px; height:13px; }
html[data-theme="dark"] .dpv-mutations .overline img { filter:invert(1); }
.dpv-mutations ul { margin:0; padding-left:16px; display:grid; gap:4px; color:var(--muted); font-size:var(--type-caption); line-height:1.5; }
@media (prefers-reduced-motion:reduce) { .wave-record .button.is-pulsed { animation:none; } .wave-record .button:active { transform:none; } .di-agent:active { transform:none; } }

/* Live "agents in flight" monitor: shared by the wave record page and the
   Agents page. Server-backed rows show each agent moving through Dispatched ->
   Running -> Evidence posted -> Completed/Halted; a pulsing dot marks live. */
.flight-panel { display:grid; gap:12px; }
.flight-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.flight-live-label { display:inline-flex; align-items:center; gap:7px; color:var(--ink); font-size:var(--type-control); font-weight:700; }
.flight-live-label img { width:16px; height:16px; }
html[data-theme="dark"] .flight-live-label img { filter:invert(1); }
.flight-live-label b { color:var(--orange-text); }
.flight-poll-note { color:var(--muted); font-size:var(--type-caption); }
.flight-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.flight-search { display:flex; align-items:center; gap:8px; flex:1; min-width:200px; padding:8px 12px; background:var(--paper); border:1px solid var(--rule); border-radius:9px; }
.flight-search img { width:16px; height:16px; opacity:.6; flex:none; }
html[data-theme="dark"] .flight-search img { filter:invert(1); }
.flight-search input { flex:1; min-width:0; border:0; background:transparent; color:var(--ink); font-size:16px; outline:none; }
.flight-chips { display:flex; flex-wrap:wrap; gap:6px; }
.flight-head-right { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.flight-list { display:grid; gap:8px; }
.flight-row { display:grid; grid-template-columns:12px minmax(120px,1.1fr) minmax(110px,1.1fr) minmax(0,1.3fr) auto auto; gap:12px; align-items:center; padding:11px 13px; background:var(--paper-strong); border:1px solid var(--rule); border-radius:10px; }
.flight-row[data-record-open] { cursor:pointer; }
.flight-row[data-record-open]:hover { border-color:color-mix(in srgb, var(--orange) 45%, var(--rule)); background:color-mix(in srgb, var(--orange) 5%, var(--paper-strong)); }
.flight-row.stage-live { border-color:color-mix(in srgb, var(--moss) 45%, var(--rule)); }
.flight-row.stage-risk { border-color:color-mix(in srgb, var(--clay) 45%, var(--rule)); }
.flight-kill { display:inline-flex; align-items:center; gap:5px; flex:none; padding:6px 10px; color:var(--clay); background:transparent; border:1px solid color-mix(in srgb, var(--clay) 45%, var(--rule)); border-radius:8px; font-size:.72rem; font-weight:800; cursor:pointer; }
.flight-kill:hover { color:#fff; background:var(--risk); border-color:var(--risk); }
.flight-kill img { width:13px; height:13px; }
html[data-theme="dark"] .flight-kill img { filter:invert(38%) sepia(60%) saturate(900%) hue-rotate(330deg); }
.flight-kill:hover img { filter:brightness(0) invert(1); }
@media (max-width:760px){ .flight-kill span { display:none; } }
.flight-dot { width:10px; height:10px; border-radius:999px; background:var(--muted); }
.flight-dot.green { background:var(--moss); animation:flightPulse 1.8s infinite; }
.flight-dot.amber { background:var(--orange); }
.flight-dot.red { background:var(--clay); }
.flight-dot.grey { background:var(--muted); }
@keyframes flightPulse { 0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--moss) 55%,transparent);} 70%{box-shadow:0 0 0 7px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
@media (prefers-reduced-motion:reduce){ .flight-dot.green{ animation:none; } }
.flight-id { display:flex; flex-direction:column; gap:3px; min-width:0; }
.flight-ticket { color:var(--muted); font-size:.72rem; }
.flight-stage { display:flex; flex-direction:column; gap:3px; min-width:0; }
.flight-badge { display:inline-flex; align-items:center; gap:5px; font-size:.72rem; font-weight:800; }
.flight-badge img { width:13px; height:13px; }
html[data-theme="dark"] .flight-badge img { filter:invert(1); }
.flight-badge.live { color:var(--moss); }
.flight-badge.risk { color:var(--clay); }
.flight-badge.wait, .flight-badge.quiet { color:var(--muted); }
.flight-stage small { color:var(--muted); font-size:.72rem; }
.flight-branch { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:.72rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.flight-branch img { width:13px; height:13px; flex:none; }
html[data-theme="dark"] .flight-branch img { filter:invert(1); }
.flight-row time { color:var(--muted); font-size:.72rem; white-space:nowrap; }
@media (max-width:760px){ .flight-row { grid-template-columns:12px 1fr auto; row-gap:6px; } .flight-stage { grid-column:2; } .flight-branch, .flight-row time { grid-column:2; } .flight-kill { grid-column:3; grid-row:1; align-self:start; } }
.connection-studio .connection-row:last-child { border-bottom:0; }
.connector-category { display:block; margin-bottom:5px; color:var(--clay); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.connection-studio .connection-row strong { font-size:14px; }
.connection-studio .connection-row > div:first-child small { display:block; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.4; }
.connection-dimensions { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; }
.dimension { min-height:54px; padding:7px 4px; display:grid; justify-items:center; align-content:center; gap:4px; color:var(--muted); background:color-mix(in srgb,var(--canvas) 62%,var(--paper)); border:1px solid var(--rule); border-radius:5px; text-align:center; }
.dimension img { width:15px; height:15px; opacity:.55; }
.dimension b { font-size:10px; }
.dimension.on { color:var(--moss); border-color:color-mix(in srgb,var(--moss) 55%,var(--rule)); background:color-mix(in srgb,var(--moss) 9%,var(--paper)); }
html[data-theme="dark"] .dimension img,.connection-legend img { filter:invert(1); }
.connection-studio .connection-row > div:nth-child(3) small { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.connection-next { color:var(--muted); font-size:12px; line-height:1.45; }
.connection-studio .client-actions { display:flex; flex-direction:column; gap:7px; justify-content:center; }
.connection-filters { margin-top:16px; display:flex; gap:7px; flex-wrap:wrap; }
.connection-filters img { width:15px; height:15px; }
html[data-theme="dark"] .connection-filters img { filter:invert(1); }
.connection-group { margin-top:22px; }
.connection-group > header { padding:0 0 11px; border-bottom:2px solid var(--ink); }
.connection-group > header h2 { margin:4px 0 2px; font:600 23px/1.12 var(--serif); }
.connection-group > header p { margin:0; color:var(--muted); font-size:12px; }
.connection-group > summary { min-height:62px; padding:12px 14px; display:grid; grid-template-columns:20px minmax(0,1fr) 18px; gap:10px; align-items:center; cursor:pointer; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-left:3px solid var(--clay); list-style:none; }
.connection-group > summary::-webkit-details-marker { display:none; }
.connection-group > summary > img { width:18px; height:18px; }
html[data-theme="dark"] .connection-group > summary > img { filter:invert(1); }
.connection-group > summary b { display:block; font-size:14px; }
.connection-group > summary small { display:block; margin-top:3px; color:var(--muted); font-size:12px; }
.connection-group[open] > summary > img:last-child { transform:rotate(180deg); }
.bank-group .connection-studio { margin-top:0; }
.connection-truth { display:inline-flex; min-height:28px; padding:5px 8px; align-items:center; color:var(--clay); background:color-mix(in srgb,var(--clay) 9%,var(--paper)); border-left:3px solid var(--clay); font-size:11px; font-weight:900; line-height:1.2; }
.connection-truth.on { color:var(--moss); background:color-mix(in srgb,var(--moss) 9%,var(--paper)); border-left-color:var(--moss); }
.dimension.missing { color:var(--clay); border-style:dashed; }
.dimension.na { opacity:.48; }
.connection-row[hidden] { display:none !important; }

.record-inspector { width:min(560px,100vw); height:100vh; padding:0; position:fixed; top:0; right:0; z-index:75; overflow:auto; color:var(--ink); background:var(--paper-strong); border-left:1px solid var(--rule); box-shadow:-22px 0 70px rgba(0,0,0,.28); transform:translateX(102%); visibility:hidden; transition:transform .22s ease,visibility 0s linear .22s; }
.record-inspector.open { transform:none; visibility:visible; transition:transform .22s ease; }
.record-inspector > header { min-height:88px; padding:20px 22px; display:flex; align-items:center; justify-content:space-between; gap:18px; position:sticky; top:0; z-index:2; background:color-mix(in srgb,var(--paper-strong) 94%,transparent); border-bottom:1px solid var(--rule); backdrop-filter:blur(16px); }
.record-inspector h2 { margin:5px 0 0; font:600 27px/1.08 var(--serif); }
.inspector-body { padding:22px; display:grid; gap:22px; }
.inspector-body section { padding-bottom:20px; border-bottom:1px solid var(--rule); }
.inspector-body section:last-child { border-bottom:0; }
.inspector-truth { padding:18px !important; background:color-mix(in srgb,var(--blue) 8%,var(--paper)); border:1px solid color-mix(in srgb,var(--blue) 38%,var(--rule)) !important; }
.inspector-truth p { margin:11px 0 0; color:var(--muted); font-size:13px; line-height:1.55; }
.inspector-summary,.record-fields { margin:10px 0 0; }
.inspector-summary > div,.record-fields > div { padding:10px 0; display:grid; grid-template-columns:145px minmax(0,1fr); gap:14px; border-bottom:1px solid var(--rule); }
.inspector-summary > div:last-child,.record-fields > div:last-child { border-bottom:0; }
.inspector-summary dt,.record-fields dt { color:var(--muted); font-size:11px; font-weight:800; }
.inspector-summary dd,.record-fields dd { margin:0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.record-fields ul { margin:0; padding-left:16px; }
.record-fields dl { margin:0; }
.inspector-source { margin-top:10px; padding:15px; background:var(--paper); border-left:3px solid var(--orange); }
.inspector-source strong { font-size:13px; }
.inspector-source p { margin:5px 0; color:var(--muted); font-size:12px; line-height:1.5; }
.inspector-source small { color:var(--blue); font:600 11px/1.4 var(--mono); overflow-wrap:anywhere; }
.linked-records { margin-top:10px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.linked-records span { padding:10px; color:var(--muted); background:var(--paper); border:1px solid var(--rule); font-size:11px; }
.linked-records b { display:block; margin-top:4px; color:var(--ink); font:700 11px var(--mono); }
.inspector-audit { margin-top:10px; }
.inspector-audit article { padding:9px 0; display:grid; grid-template-columns:12px 1fr; gap:9px; }
.inspector-audit i { width:8px; height:8px; margin-top:4px; border:2px solid var(--moss); border-radius:50%; }
.inspector-audit strong { display:block; font-size:12px; line-height:1.4; }
.inspector-audit small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.linked-records { margin-top:10px; display:grid; gap:8px; }
.linked-records button { width:100%; min-height:58px; padding:10px 12px; display:grid; grid-template-columns:minmax(0,1fr) auto 18px; align-items:center; gap:12px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:7px; text-align:left; }
.linked-records button:hover,.linked-records button:focus-visible { border-color:var(--orange); background:color-mix(in srgb,var(--orange) 6%,var(--paper)); }
.linked-records span { color:var(--muted); font-size:11px; font-weight:800; }
.linked-records b { font-size:12px; }
.linked-records img { width:16px; }
html[data-theme="dark"] .linked-records img { filter:invert(1); }
.quiet-copy { color:var(--muted); font-size:12px; line-height:1.5; }
.inspector-scrim { position:fixed; inset:0; z-index:70; background:rgba(3,12,22,.56); backdrop-filter:blur(2px); }
.inspector-scrim[hidden] { display:none; }
body.inspector-open { overflow:hidden; }

.provider-dialog { width:min(780px,calc(100vw - 30px)); }
.provider-wizard { padding-top:18px; }
.provider-purpose { padding:18px; background:color-mix(in srgb,var(--blue) 8%,var(--paper)); border-left:3px solid var(--blue); }
.provider-purpose p { margin:7px 0; color:var(--muted); font-size:13px; line-height:1.5; }
.provider-purpose strong { font-size:12px; }
.provider-state { margin-top:14px; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--rule); }
.provider-state > span { min-height:88px; padding:12px; display:grid; justify-items:center; align-content:center; gap:4px; color:var(--muted); border-right:1px solid var(--rule); text-align:center; }
.provider-state > span:last-child { border-right:0; }
.provider-state > span.on { color:var(--moss); background:color-mix(in srgb,var(--moss) 8%,var(--paper)); }
.provider-state img { width:18px; height:18px; }
html[data-theme="dark"] .provider-state img,.never-boundary img { filter:invert(1); }
.provider-state b { font-size:11px; }
.provider-state small { font-size:11px; }
.wizard-section { margin-top:18px; padding-top:16px; border-top:1px solid var(--rule); }
.wizard-section ol,.wizard-section ul { margin:10px 0 0; padding-left:20px; color:var(--muted); font-size:12px; line-height:1.55; }
.wizard-section.split { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.never-boundary { padding:14px; display:grid; grid-template-columns:20px 1fr; gap:9px; color:var(--ink); background:color-mix(in srgb,var(--risk) 8%,var(--paper)); border:1px solid color-mix(in srgb,var(--risk) 35%,var(--rule)); }
.never-boundary img { width:18px; }
.never-boundary b { font-size:11px; }
.never-boundary p { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.provider-result-card { margin-top:16px; padding:14px; border-left:3px solid var(--clay); background:var(--paper); }
.provider-result-card.success { border-left-color:var(--moss); }
.provider-result-card strong { font-size:13px; }
.provider-result-card p { margin:5px 0 11px; color:var(--muted); font-size:12px; line-height:1.5; }
.provider-actions { padding-top:16px; border-top:1px solid var(--rule); }

.atlas-tour[hidden] { display:none; }
.atlas-tour { position:fixed; inset:0; z-index:90; pointer-events:none; }
.tour-spotlight { position:fixed; border:2px solid var(--orange); border-radius:10px; box-shadow:0 0 0 9999px rgba(2,9,17,.5),0 0 0 6px color-mix(in srgb,var(--orange) 18%,transparent); transition:left .2s ease,top .2s ease,width .2s ease,height .2s ease,opacity .2s ease; }
.atlas-tour.preparing .tour-spotlight { opacity:0; }
.tour-panel { width:432px; height:100dvh; display:flex; flex-direction:column; position:fixed; top:0; right:0; pointer-events:auto; color:var(--ink); background:var(--paper-strong); border-left:1px solid color-mix(in srgb,var(--orange) 45%,var(--rule)); box-shadow:-26px 0 70px rgba(0,0,0,.3); }
.tour-panel::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--orange); }
body.tour-open .atlas-app { margin-right:432px; }
.tour-head { padding:18px 24px 14px; border-bottom:1px solid var(--rule); }
.tour-progress { display:flex; align-items:center; justify-content:space-between; gap:16px; color:var(--muted); font:700 var(--type-caption) var(--mono); letter-spacing:.06em; text-transform:uppercase; }
.tour-exit { min-height:44px; padding:0 11px; display:flex; align-items:center; gap:7px; color:var(--muted); background:transparent; border:1px solid var(--rule); border-radius:7px; font-size:var(--type-control); font-weight:800; }
.tour-exit:hover { color:var(--ink); border-color:var(--orange); }
.tour-exit img { width:15px; }
html[data-theme="dark"] .tour-exit img { filter:invert(1); }
.tour-map { margin:14px 0 0; padding:0; display:flex; gap:6px; list-style:none; }
.tour-map li { flex:1 1 0; min-width:0; height:34px; display:grid; place-items:center; color:var(--muted); background:var(--paper); border:1px solid var(--rule); border-radius:7px; font:700 var(--type-caption) var(--mono); }
.tour-map li.done { color:var(--paper-strong); background:var(--moss); border-color:var(--moss); }
.tour-map li.current { color:var(--night); background:var(--orange); border-color:var(--orange); box-shadow:0 0 0 2px color-mix(in srgb,var(--orange) 30%,transparent); }
.tour-scroll { flex:1 1 auto; min-height:0; padding:20px 24px 18px; overflow-y:auto; overscroll-behavior:contain; }
.tour-location { margin-bottom:16px; padding:10px 12px; display:flex; align-items:center; gap:10px; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
.tour-location img { width:17px; opacity:.8; }
html[data-theme="dark"] .tour-location img { filter:invert(1); }
.tour-location small { display:block; color:var(--muted); font-size:var(--type-caption); }
.tour-location b { display:block; margin-top:2px; font-size:var(--type-emphasis); }
.tour-panel h2 { margin:6px 0 10px; font:600 27px/1.12 var(--serif); }
.tour-copy { margin:0; color:var(--muted); font-size:var(--type-body); line-height:1.6; }
.tour-learning { margin-top:18px; display:grid; gap:12px; }
.tour-learning > div { padding:14px 15px; border:1px solid var(--rule); border-left:3px solid var(--navy); background:var(--paper); }
.tour-learning .tour-try { border-left-color:var(--orange); }
.tour-learning span { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.tour-learning span img { width:14px; opacity:.75; }
html[data-theme="dark"] .tour-learning span img { filter:invert(1); }
.tour-learning p { margin:8px 0 0; font-size:var(--type-body); line-height:1.55; }
.tour-preparing { margin-top:18px; padding:12px 14px; display:flex; align-items:center; gap:10px; color:var(--muted); background:var(--paper); border:1px dashed var(--rule); border-radius:8px; font-size:var(--type-control); font-weight:700; }
.tour-preparing .loading-mark { width:16px; height:16px; }
.tour-actions { padding:14px 24px calc(14px + env(safe-area-inset-bottom)); display:flex; justify-content:space-between; gap:10px; border-top:1px solid var(--rule); background:var(--paper-strong); }
.tour-actions .button { min-height:46px; flex:1 1 0; justify-content:center; }
@media (max-width:1180px) {
  body.tour-open .atlas-app { margin-right:0; }
  .tour-panel { top:auto; right:0; bottom:0; left:0; width:100%; height:auto; max-height:min(62dvh,560px); border-left:0; border-top:1px solid color-mix(in srgb,var(--orange) 45%,var(--rule)); border-radius:14px 14px 0 0; box-shadow:0 -24px 60px rgba(0,0,0,.35); }
  .tour-panel::before { inset:0 0 auto 0; width:auto; height:4px; border-radius:14px 14px 0 0; }
  .tour-head { padding:12px 16px 10px; }
  .tour-map { margin-top:10px; }
  .tour-map li { height:30px; border-radius:6px; }
  .tour-scroll { padding:14px 16px; }
  .tour-panel h2 { font-size:22px; }
  .tour-location { margin-bottom:12px; }
  .tour-actions { padding:10px 16px calc(10px + env(safe-area-inset-bottom)); }
}

.atlas-dialog { width:min(620px,calc(100vw - 32px)); max-height:min(720px,calc(100vh - 32px)); padding:0; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:12px; box-shadow:0 28px 90px rgba(0,0,0,.32); }
.atlas-dialog::backdrop { background:rgba(3,12,22,.68); backdrop-filter:blur(3px); }
.atlas-dialog form { padding:22px; }
.atlas-dialog header { padding-bottom:15px; display:flex; justify-content:space-between; gap:18px; border-bottom:1px solid var(--rule); }
.atlas-dialog h2 { margin:5px 0 0; font:600 27px/1.05 var(--serif); }
.dialog-close { width:38px; height:38px; display:grid; place-items:center; flex:none; color:var(--ink); background:transparent; border:1px solid var(--rule); border-radius:8px; }
.dialog-close img { width:17px; }
html[data-theme="dark"] .dialog-close img, html[data-theme="dark"] .command-input img { filter:invert(1); }
.command-input { height:48px; margin-top:17px; padding:0 13px; display:flex; align-items:center; gap:10px; background:var(--paper); border:1px solid var(--rule); }
.command-input:focus-within { border-color:var(--orange); box-shadow:0 0 0 2px color-mix(in srgb,var(--orange) 18%,transparent); }
.command-input img { width:18px; opacity:.72; }
.command-input input { width:100%; color:var(--ink); background:transparent; border:0; outline:0; font-size:13px; }
.command-examples { margin-top:14px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.command-example { min-height:46px; padding:9px 10px; color:var(--ink); background:transparent; border:1px solid var(--rule); border-radius:7px; text-align:left; font-size:10px; line-height:1.35; }
.command-example:hover { border-color:var(--orange); background:var(--paper); }
.command-results { margin-top:14px; }
.command-result { width:100%; padding:11px 0; display:flex; align-items:center; justify-content:space-between; gap:14px; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; }
.command-result strong { display:block; font-size:11px; }
.command-result small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.confirm-dialog > form > p { margin:18px 0; color:var(--muted); font-size:13px; line-height:1.55; }
.confirm-context { display:grid; grid-template-columns:auto 1fr; margin:0; background:var(--paper); border:1px solid var(--rule); }
.confirm-context dt, .confirm-context dd { margin:0; padding:9px 11px; border-bottom:1px solid var(--rule); font-size:10px; }
.confirm-context dt { color:var(--muted); font-weight:800; }
.confirm-context dd { text-align:right; }
.confirm-context dt:last-of-type, .confirm-context dd:last-of-type { border-bottom:0; }
.confirm-fields { display:grid; gap:11px; margin-top:14px; }
.confirm-fields label { display:grid; gap:5px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.confirm-fields input, .confirm-fields select, .confirm-fields textarea { width:100%; padding:10px 11px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:7px; font-size:11px; font-weight:500; letter-spacing:normal; text-transform:none; }
.confirm-fields textarea { min-height:82px; resize:vertical; }
.dialog-actions { margin-top:18px; display:flex; justify-content:flex-end; gap:9px; }

/* Live progress for long owner-confirmed operations: a Motion-animated bar and
   a streaming log of real stages (issue #105). */
.confirm-progress { margin:14px 0 2px; }
.cprog-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:8px; }
.cprog-phase { font-size:var(--type-control); color:var(--ink); font-weight:650; }
.cprog-pct { font-size:var(--type-caption); color:var(--muted); font-family:var(--mono); }
.cprog-track { height:9px; border-radius:6px; background:color-mix(in srgb, var(--orange) 15%, transparent); overflow:hidden; }
.cprog-fill { height:100%; width:0; border-radius:6px; background:linear-gradient(90deg, var(--orange), #f0b256); box-shadow:0 0 12px color-mix(in srgb, var(--orange) 45%, transparent); }
.cprog-log { list-style:none; margin:13px 0 0; padding:11px 13px; max-height:190px; overflow-y:auto; background:color-mix(in srgb, var(--ink) 5%, transparent); border:1px solid var(--rule); border-radius:11px; font:600 12px/1.5 var(--mono); color:var(--muted); display:flex; flex-direction:column; gap:5px; }
.cprog-log li { margin:0; }
.cprog-log li:last-child { color:var(--ink); }
.confirm-progress.is-error .cprog-fill { background:linear-gradient(90deg, var(--risk), #d98a6a); box-shadow:none; }
.confirm-progress.is-error .cprog-phase { color:var(--risk); }

/* Client packet email draft: read, edit, copy, send from your own mail client. */
.email-draft-dialog { max-width:660px; }
.email-draft-note { color:var(--muted); font-size:var(--type-caption); line-height:1.55; margin:0 0 16px; }
.email-field { display:block; margin-bottom:13px; }
.email-field span { display:block; font-size:var(--type-caption); text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:5px; }
.email-field input, .email-field textarea { width:100%; padding:10px 12px; background:color-mix(in srgb, var(--ink) 5%, transparent); border:1px solid var(--rule); border-radius:9px; color:var(--ink); font-size:16px; font-family:inherit; }
.email-field textarea { min-height:200px; resize:vertical; line-height:1.5; font:600 13px/1.5 var(--mono); }

.atlas-toast { max-width:min(430px,calc(100vw - 32px)); padding:12px 15px; position:fixed; right:22px; bottom:22px; z-index:80; opacity:0; transform:translateY(8px); color:#fff; background:var(--night); border-left:3px solid var(--orange); border-radius:8px; box-shadow:var(--shadow); font-size:10px; pointer-events:none; transition:.18s ease; }
.atlas-toast.show { opacity:1; transform:none; }
.atlas-toast.error { border-left-color:var(--risk); }
.noscript { padding:18px; color:#fff; background:var(--risk); text-align:center; }
.atlas-scrim { display:none; }

@media (max-width:1460px) {
  .decision { grid-template-columns:80px minmax(180px,1fr) minmax(150px,.8fr) 112px; }
  .roster-row { grid-template-columns:44px minmax(120px,.65fr) minmax(190px,1fr) 92px 105px; }
  .roster-row .boundary { display:none; }
  .client-row, .connection-row { grid-template-columns:minmax(180px,1.2fr) 120px 90px 110px minmax(110px,.7fr); }
  .client-actions { display:none; }
  .delivery-chain { grid-template-columns:repeat(3,1fr); }
  .delivery-chain::before { display:none; }
  .delivery-stage:nth-child(3) { border-right:0; }
  .delivery-stage:nth-child(-n+3) { border-bottom:1px solid var(--rule); }
  .run-ledger article { grid-template-columns:130px minmax(250px,1fr) 120px; }
  .run-handoff { grid-column:2 / 3; }
  .run-ledger article .label { grid-column:3; grid-row:1; }
}

@media (max-width:1100px) {
  /* .atlas-app/.atlas-stage display:block and .atlas-rail.open{left:0} are
     the canonical v2 drawer offset below (-264px); this block keeps only
     the box-shadow/transition, which the v2 rule never duplicated. */
  .atlas-rail { box-shadow:var(--shadow); transition:left .18s ease; }
  .rail-close { width:38px; height:38px; display:grid; place-items:center; position:absolute; right:10px; top:10px; background:#0d243e; border:1px solid rgba(255,255,255,.18); border-radius:8px; }
  .rail-close img { width:17px; filter:invert(1); }
  .atlas-scrim { display:block; position:fixed; inset:0; z-index:25; background:rgba(3,12,22,.62); }
  .atlas-scrim[hidden] { display:none; }
  .atlas-topbar { grid-template-columns:auto minmax(0,1fr) auto; padding:0 14px; }
  .operating-horizon { display:none; }
  .mobile-open { display:grid; }
  .atlas-workbench { padding:18px 16px 44px; }
  .owner-desk, .lower { grid-template-columns:1fr; }
  .release-path { border-left:0; border-top:1px solid var(--rule); }
  .decision { grid-template-columns:80px 1fr 120px; }
  .decision p { grid-column:2 / 3; }
  .programme-spine { grid-template-columns:38px 1fr; }
  .spine-line::before { left:13px; }
  .spine-row { grid-template-columns:38px minmax(170px,.8fr) 1fr 84px; }
  .infra-field { grid-template-columns:1fr; }
  .commercial-banner, .truth-strip { grid-template-columns:1fr 1fr; }
  .commercial-banner > div:nth-child(2), .truth-strip > span:nth-child(2) { border-right:0; }
  .commercial-banner > div:nth-child(-n+2), .truth-strip > span:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .milestone-row { grid-template-columns:minmax(230px,1fr) 130px 140px; }
  .milestone-row > div:nth-child(3), .milestone-row > div:nth-child(4) { display:none; }
  .payment-row { grid-template-columns:34px minmax(220px,1fr) 100px 160px; }
  .payment-row .source-link { display:none; }
  .source-ledger article { grid-template-columns:minmax(260px,1fr) 170px 120px; }
  .source-ledger article > div:nth-child(3), .source-ledger article > div:nth-child(5) { display:none; }
  .control-row { grid-template-columns:minmax(240px,1fr) 160px minmax(160px,.7fr); }
  .control-row .source-link { display:none; }
  .environment { border-right:0; border-bottom:1px solid var(--rule); }
  .environment:last-child { border-bottom:0; }
}

@media (max-width:760px) {
  .atlas-topbar { height:60px; gap:9px; }
  .atlas-query { height:38px; }
  .atlas-query kbd { display:none; }
  .topbar-controls { gap:5px; }
  #reconcileAll { display:none; }
  .icon-button, .top-owner { width:38px; height:38px; }
  .top-owner { display:none; }
  .atlas-workbench { min-height:calc(100vh - 60px); padding:15px 12px 38px; }
  .dayline, .page-head { display:block; }
  .dayline h1, .page-head h1 { font-size:31px; }
  .dayline p, .page-head p { font-size:13px; }
  .reconciled, .headline-stat { margin-top:13px; text-align:left; }
  .next-result { padding:18px 18px 17px; }
  .next-result h2 { font-size:27px; }
  .next-result p { font-size:13px; }
  .release-path { padding:17px; }
  .decision { grid-template-columns:1fr auto; padding:14px; }
  .decision .kind { grid-column:1; }
  .decision > strong, .decision p, .decision button { grid-column:1 / 3; }
  .programme-spine { grid-template-columns:27px 1fr; }
  .spine-line::before { left:13px; }
  .spine-row { grid-template-columns:26px 1fr 60px; padding:13px 0; }
  .spine-dot { margin-left:-27px; }
  .spine-row p { grid-column:2 / 4; }
  .section-title { align-items:start; }
  .section-title p { display:none; }
  .ledger-row { grid-template-columns:30px 1fr; }
  .ledger-row time { grid-column:2; }
  .roster-row { grid-template-columns:38px 1fr auto; }
  .roster-row .mission { grid-column:2 / 4; }
  .roster-row .boundary { display:none; }
  .roster-group > header { align-items:flex-start; flex-direction:column; gap:8px; }
  .authority-key { min-height:36px; }
  .row-action { min-height:44px; }
  .agent-scope summary { min-height:44px; width:100%; }
  .client-row, .connection-row { grid-template-columns:1fr auto; padding:13px 0; }
  .client-row > div:nth-child(2), .client-row > div:nth-child(3), .connection-row > div:nth-child(2), .connection-row > div:nth-child(3) { display:none; }
  .client-row > div:nth-child(4), .connection-row > div:nth-child(4) { grid-column:2; grid-row:1; }
  .client-row > div:nth-child(5), .connection-row > div:nth-child(5) { grid-column:1 / 3; font-size:12px; line-height:1.45; }
  .client-row .client-actions, .connection-row .client-actions { display:flex; grid-column:1 / 3; justify-content:flex-start; }
  .command-examples { grid-template-columns:1fr; }
  .baseline-compare, .commitments { grid-template-columns:1fr; }
  .baseline-compare article + article, .commitments article + article { border-left:0; border-top:1px solid var(--rule); }
  .truth-row { grid-template-columns:28px 1fr; }
  .truth-row .label { grid-column:2; }
  .truth-row .source-cell { grid-column:2; }
  .milestone-row { grid-template-columns:1fr auto; }
  .milestone-row > div:nth-child(2), .milestone-row > div:nth-child(3), .milestone-row > div:nth-child(4) { display:none; }
  .commercial-banner, .truth-strip { grid-template-columns:1fr; }
  .commercial-banner > div, .truth-strip > span { min-height:auto; border-right:0; border-bottom:1px solid var(--rule); }
  .commercial-banner > div:last-child, .truth-strip > span:last-child { border-bottom:0; }
  .payment-row { grid-template-columns:28px 1fr auto; }
  .payment-row > b { grid-column:3; grid-row:1; }
  .payment-row .label { grid-column:2 / 4; }
  .payment-row .source-link { grid-column:2 / 4; display:flex; }
  .commitments ul { columns:1; }
  .source-ledger article { grid-template-columns:1fr auto; }
  .source-ledger article > div:nth-child(2), .source-ledger article > div:nth-child(3), .source-ledger article > div:nth-child(5) { display:none; }
  .control-row { grid-template-columns:1fr; }
  .control-row .source-link { display:flex; }
  .atlas-dialog form { padding:18px; }
  .atlas-dialog h2 { font-size:24px; }
  .atlas-toast { left:12px; right:12px; bottom:12px; }
  .agent-command { grid-template-columns:1fr; padding:18px; }
  .agent-command-stats { grid-template-columns:repeat(3,1fr); }
  .agent-command-stats span { min-width:0; padding:10px 8px; }
  .delivery-chain { grid-template-columns:1fr; }
  .delivery-stage { display:grid; grid-template-columns:40px minmax(0,1fr); column-gap:11px; border-right:0; border-bottom:1px solid var(--rule); }
  .delivery-stage:last-child { border-bottom:0; }
  .stage-sequence { grid-row:1 / 7; }
  .stage-labels, .delivery-stage h3, .delivery-stage p, .stage-actor, .stage-evidence { grid-column:2; }
  .delivery-stage p { min-height:0; }
  .run-ledger article { grid-template-columns:1fr auto; gap:10px; }
  .run-ledger article > div:nth-child(2), .run-handoff { grid-column:1 / 3; }
  .run-ledger article .label { grid-column:2; grid-row:1; }
}

/* Final readability and inspectable-source safeguards. */
.dimension b,
.connection-truth,
.repo-measures .mono,
.confirm-context dt,
.confirm-context dd { font-size:.8125rem; }
.connection-next,
.command-example,
.command-result strong,
.confirm-fields label,
.atlas-toast,
.wait-row p,
.ledger-row p { font-size:.875rem; }
.confirm-fields input,
.confirm-fields select,
.confirm-fields textarea { min-height:44px; font-size:1rem; }
.command-example { min-height:44px; }
.repo-ledger article[tabindex] { cursor:pointer; }
.repo-ledger article[tabindex]:hover,
.repo-ledger article[tabindex]:focus-visible { background:color-mix(in srgb,var(--blue) 6%,transparent); outline:2px solid transparent; box-shadow:inset 3px 0 var(--blue); }
.repo-inspector-ledger { border-top:1px solid var(--rule); }
.repo-inspector-ledger article { min-width:0; padding:12px 0; display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; border-bottom:1px solid var(--rule); }
.repo-inspector-ledger article span strong,
.repo-inspector-ledger article span small { display:block; }
.repo-inspector-ledger article strong { font-size:.9375rem; }
.repo-inspector-ledger article small { margin-top:3px; color:var(--muted); font-size:.8125rem; }
.repo-inspector-ledger article > b { font-size:.8125rem; overflow-wrap:anywhere; }
.repo-inspector-ledger article > a { min-height:44px; display:inline-flex; align-items:center; gap:7px; color:var(--ink); font-size:.875rem; font-weight:800; }
.repo-inspector-ledger article > a img,
.repo-inspector-links a img,
.repo-inspector-external img { width:17px; height:17px; }
.repo-inspector-links { display:grid; border-top:1px solid var(--rule); }
.repo-inspector-links a { min-height:64px; padding:10px 0; display:grid; grid-template-columns:90px minmax(0,1fr) 18px; gap:4px 12px; align-items:center; color:var(--ink); border-bottom:1px solid var(--rule); text-decoration:none; }
.repo-inspector-links a span { color:var(--blue); font:700 .8125rem var(--mono); }
.repo-inspector-links a strong { font-size:.9375rem; }
.repo-inspector-links a small { grid-column:2; color:var(--muted); font-size:.8125rem; }
.repo-inspector-links a img { grid-column:3; grid-row:1 / 3; }
.repo-inspector-external { margin-top:4px; }
html[data-theme="dark"] .repo-inspector-ledger img,
html[data-theme="dark"] .repo-inspector-links img,
html[data-theme="dark"] .repo-inspector-external img { filter:invert(1); }
@media (max-width:760px) {
  .connection-studio .connection-row > div:nth-child(2),
  .connection-studio .connection-row > div:nth-child(3) { display:grid; }
  .connection-dimensions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .repo-inspector-ledger article { grid-template-columns:minmax(0,1fr) auto; }
  .repo-inspector-ledger article > a { grid-column:1 / 3; }
}

@media (max-width:1100px) {
  .walkthrough-launch span { display:none; }
  .walkthrough-launch { width:40px; padding:0; justify-content:center; }
  .connection-studio .connection-row { grid-template-columns:minmax(190px,.8fr) minmax(260px,1fr) 120px; }
  .connection-studio .connection-next { grid-column:1 / 3; }
  .connection-studio .client-actions { grid-column:3; grid-row:1 / 3; flex-direction:column; }
}

@media (max-width:760px) {
  .connection-legend { grid-template-columns:1fr 1fr; }
  .connection-legend > span:nth-child(2) { border-right:0; }
  .connection-legend > span:nth-child(-n+2) { border-bottom:1px solid rgba(255,255,255,.13); }
  .connection-studio .connection-row { display:grid; grid-template-columns:1fr; gap:12px; padding:15px; }
  .connection-studio .connection-row > div { grid-column:1 !important; grid-row:auto !important; }
  .connection-studio .client-actions { display:grid; grid-template-columns:1fr 1fr; }
  .connection-dimensions { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .dimension { min-width:0; }
  .dimension b { font-size:9px; }
  .connection-filters { display:grid; grid-template-columns:1fr; }
  .provider-state { grid-template-columns:1fr 1fr; }
  .provider-state > span:nth-child(2) { border-right:0; }
  .provider-state > span:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .wizard-section.split { grid-template-columns:1fr; }
}

@media (max-width:760px) {
  .record-inspector { width:100vw; border-left:0; }
  .record-inspector > header { min-height:72px; padding:14px; }
  .record-inspector h2 { font-size:24px; }
  .inspector-body { padding:16px 14px 30px; }
  .inspector-summary > div,.record-fields > div { grid-template-columns:105px minmax(0,1fr); }
  .linked-records { grid-template-columns:1fr; }
  .provider-dialog { width:100vw; max-height:100vh; margin:0; border:0; border-radius:0; }
  .provider-dialog form { min-height:100vh; }
  .provider-actions { display:grid; grid-template-columns:1fr; }
  .provider-actions .button { min-height:46px; }
  .tour-spotlight { border-radius:7px; }
  .walkthrough-launch { width:44px; min-height:44px; }
}

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

/* Atlas readability contract: no meaningful operating text below 13px. */
.mark-name span,
.active-programme small,
.programme-pulse,
.atlas-menu em,
.owner-line span,
.private-note,
.operating-horizon small,
.atlas-query kbd,
.attention-count,
.overline,
.reconciled span,
.headline-stat small,
.gate strong,
.gate small,
.gate time,
.section-title p,
.section-title button,
.button,
.decision button,
.row-action,
.spine-row small,
.spine-row p,
.spine-progress b,
.dark-note p,
.wait-row small,
.wait-row time,
.wait-row strong,
.wait-row p,
.text-action,
.portrait,
.agent-command-stats small,
.stage-sequence,
.stage-status,
.human-gate-label,
.stage-actor,
.stage-evidence,
.source-mode-note,
.run-provider span,
.run-handoff small,
.run-provider strong,
.run-handoff b,
.run-provider em,
.run-ledger article > div:nth-child(2) > small,
.run-tools,
.agent-scope summary,
.agent-scope small,
.agent-scope b,
.client-row strong,
.connection-row strong,
.client-row small,
.connection-row small,
.client-row div,
.connection-row div,
.label,
.environment > p,
.service strong,
.service span,
.service small,
.metadata,
.baseline-compare dl,
.row-number,
.commercial-banner small,
.commercial-banner span,
.commitments small,
.commitments ul,
.truth-strip small,
.source-ledger article > div:first-child > span,
.dimension b,
.connection-studio .connection-row > div:nth-child(3) small,
.connection-truth,
.inspector-summary dt,
.record-fields dt,
.inspector-source small,
.inspector-audit small,
.provider-state b,
.provider-state small,
.never-boundary b,
.tour-progress,
.command-example,
.command-result strong,
.command-result small,
.confirm-context dt,
.confirm-context dd,
.confirm-fields label,
.atlas-toast,
.atlas-login-form>small,
.login-error { font-size:var(--type-caption); }

.atlas-menu button,
.atlas-query,
.walkthrough-launch,
.decision .kind,
.ledger-row span,
.ledger-row time,
.roster-row strong,
.roster-row small,
.mission b,
.mission span,
.state,
.boundary,
.delivery-stage p,
.run-ledger p,
.client-row strong,
.connection-row strong,
.source-cell small,
.milestone-row small,
.control-row small,
.source-ledger small,
.source-cell b,
.milestone-row b,
.control-row b,
.source-ledger b,
.source-link,
.connection-studio .connection-row > div:first-child small,
.connection-next,
.connection-group > summary small,
.inspector-summary dd,
.record-fields dd,
.inspector-source p,
.linked-records span,
.linked-records b,
.inspector-audit strong,
.quiet-copy,
.provider-purpose strong,
.wizard-section ol,
.wizard-section ul,
.never-boundary p,
.provider-result-card p,
.tour-progress button,
.command-input input,
.confirm-fields input,
.confirm-fields select,
.confirm-fields textarea { font-size:var(--type-control); }

.dayline p,
.page-head p,
.next-result p,
.decision p,
.spine-row strong,
.dark-note strong,
.ledger-row strong,
.ledger-row p,
.agent-command p,
.delivery-stage h3,
.run-ledger article > div:nth-child(2) > strong,
.truth-row strong,
.milestone-row strong,
.payment-row strong,
.control-row strong,
.source-ledger strong,
.truth-row p,
.milestone-row p,
.payment-row p,
.control-row p,
.source-ledger p,
.commitments p,
.connection-legend small,
.connector-category,
.connection-studio .connection-row strong,
.connection-group > header p,
.connection-group > summary b,
.inspector-truth p,
.inspector-source strong,
.provider-purpose p,
.provider-result-card strong,
.tour-copy,
.confirm-dialog > form > p,
.atlas-login-brand p,
.atlas-login-form>p { font-size:var(--type-body); }

.active-programme strong,
.owner-line strong { font-size:var(--type-emphasis); }

.owner-line span,
.private-note,
.gate small,
.gate time,
.stage-status,
.stage-actor,
.source-mode-note,
.run-provider span,
.run-handoff small,
.run-provider em,
.run-ledger article > div:nth-child(2) > small,
.run-tools,
.agent-scope small,
.inspector-summary dt,
.record-fields dt,
.inspector-source small,
.inspector-audit small,
.confirm-fields label { font-size:var(--type-control); }

.roster-row strong { font-size:1rem; }
.mission b { font-size:.9375rem; }
.roster-row small,
.mission span,
.state,
.boundary { font-size:var(--type-control); }

.delivery-stage h3 { font-size:1.25rem; }
.delivery-stage p { min-height:0; font-size:.9375rem; line-height:1.55; }
.stage-actor { font-size:var(--type-control); line-height:1.45; }
.stage-evidence { font-size:var(--type-caption); line-height:1.5; }
.human-gate-label { font-size:.75rem; }

.run-ledger article > div:nth-child(2) > strong,
.run-provider strong,
.run-handoff b { font-size:.9375rem; }
.run-ledger p { font-size:var(--type-control); line-height:1.55; }

.client-row strong,
.connection-row strong { font-size:.9375rem; }
.client-row small,
.connection-row small,
.client-row div,
.connection-row div { font-size:var(--type-control); line-height:1.5; }

.atlas-dialog form { font-size:var(--type-body); }
.command-example,
.command-result strong { font-size:var(--type-control); }
.command-result small { font-size:var(--type-caption); line-height:1.45; }
.confirm-fields input,
.confirm-fields select,
.confirm-fields textarea { font-size:1rem; }

.overline,
.active-programme small,
.operating-horizon small,
.headline-stat small,
.reconciled span,
.commercial-banner small,
.truth-strip small,
.agent-command-stats small { letter-spacing:.07em; }

.button,.decision button,.row-action { min-height:42px; }
.atlas-menu button { min-height:46px; }
.gate { padding-block:10px; }
.decision,.roster-row,.client-row,.connection-row,.truth-row,.milestone-row,.payment-row,.control-row,.source-ledger article { row-gap:8px; }

@media (max-width:1460px) {
  .delivery-stage { padding:18px; }
  .delivery-chain { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .delivery-stage p { min-height:0; }
}

@media (max-width:760px) {
  .delivery-chain { grid-template-columns:1fr; }
  .roster-row { grid-template-columns:42px minmax(0,1fr) auto; }
  .roster-row .mission { grid-column:2 / 4; }
  .client-row,.connection-row { grid-template-columns:1fr auto; }
}

.atlas-login-page{min-height:100vh;background:var(--night);color:#fff;display:grid;place-items:center;padding:24px}
.atlas-login-shell{width:min(980px,100%);display:grid;grid-template-columns:1.1fr .8fr;border:1px solid rgba(255,255,255,.16);box-shadow:0 28px 90px rgba(0,0,0,.38);background:#0b2037}
.atlas-login-brand{padding:56px 52px;background:#07182d;border-right:1px solid rgba(255,255,255,.13)}
.login-logo{width:142px;height:70px;background:#fff;border-radius:10px;display:grid;place-items:center;padding:10px;margin-bottom:42px}
.login-logo img{width:120px;height:auto}
.atlas-login-brand h1{font:600 clamp(36px,5vw,58px)/1.02 var(--serif);letter-spacing:-.03em;margin:10px 0 18px;max-width:570px}
.atlas-login-brand p{font-size:14px;line-height:1.6;color:#aebdca;max-width:530px;margin:0}
.atlas-login-form{padding:56px 42px;background:#f7f0e3;color:#17202b;display:flex;flex-direction:column;justify-content:center}
.atlas-login-form h2{font:600 36px/1 var(--serif);margin:9px 0 10px}
.atlas-login-form>p{font-size:13px;line-height:1.5;color:#687077;margin:0 0 22px}
.atlas-login-form form{display:grid;gap:10px}
.atlas-login-form label{font-size:11px;font-weight:800}
.atlas-login-form input{height:48px;border:1px solid #c9baa2;background:#fffaf0;border-radius:7px;padding:0 12px;color:#17202b;font:600 14px var(--ui);outline:none}
.atlas-login-form input:focus{border-color:#102d56;box-shadow:0 0 0 3px rgba(16,45,86,.14)}
.atlas-login-form .button{margin-top:6px;min-height:46px;justify-content:center}
.atlas-login-form .button img{width:17px;height:17px;filter:invert(1)}
.atlas-login-form>small{font-size:10px;line-height:1.45;color:#737a7e;margin-top:18px}
.login-error{padding:10px 11px;margin:0 0 14px;border-left:3px solid #923d45;background:#f1ddda;color:#773038;font-size:11px}
@media(max-width:760px){.atlas-login-page{padding:0}.atlas-login-shell{min-height:100vh;grid-template-columns:1fr;border:0}.atlas-login-brand{padding:34px 24px;border-right:0;border-bottom:1px solid rgba(255,255,255,.13)}.login-logo{width:112px;height:56px;margin-bottom:26px}.login-logo img{width:94px}.atlas-login-brand h1{font-size:36px}.atlas-login-form{padding:34px 24px}.atlas-login-form h2{font-size:32px}}

/* CLI authorization: a deliberate two-step handoff, not a generic login card. */
.atlas-login-shell { overflow:hidden; border-radius:18px; }
.login-brandline { display:flex; align-items:center; gap:14px; margin-bottom:38px; }
.login-brandline .login-logo { margin:0; flex:none; }
.login-brandline > span { color:#9eacb9; font:800 12px/1.3 var(--ui); letter-spacing:.16em; }
.auth-kicker, .auth-form-kicker { display:flex; align-items:center; gap:8px; font:800 13px/1.3 var(--ui); letter-spacing:.12em; text-transform:uppercase; }
.auth-kicker { color:#f2ae60; }
.auth-form-kicker { color:#95621c; }
.auth-kicker img, .auth-form-kicker img { width:18px; height:18px; }
.auth-kicker img { filter:invert(1); }
.auth-form-kicker img { opacity:.8; }
.atlas-login-brand h1 { margin-top:14px; }
.auth-steps { margin:38px 0 0; padding:0; display:grid; gap:0; list-style:none; }
.auth-steps li { min-height:58px; padding:12px 0; display:grid; grid-template-columns:34px 1fr; gap:11px; align-items:start; color:#8da0b1; border-top:1px solid rgba(255,255,255,.13); }
.auth-steps li:last-child { border-bottom:1px solid rgba(255,255,255,.13); }
.auth-steps li > b { color:#71869a; font:700 13px/1 var(--mono); padding-top:3px; }
.auth-steps li strong, .auth-steps li small { display:block; }
.auth-steps li strong { color:#dce6ec; font-size:15px; line-height:1.25; }
.auth-steps li small { margin-top:3px; color:#91a5b6; font-size:14px; line-height:1.35; }
.auth-steps li.current { border-top-color:rgba(241,154,66,.55); }
.auth-steps li.current > b, .auth-steps li.current strong { color:#f5b56e; }
.atlas-login-form { gap:0; }
.atlas-login-form .auth-form-kicker { margin-bottom:15px; }
.atlas-login-form h2 { max-width:430px; line-height:1.08; }
.atlas-login-form > p strong { color:#17202b; font-weight:800; }
.atlas-login-form label { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.atlas-login-form label span { color:#687077; font-size:14px; font-weight:500; letter-spacing:normal; text-transform:none; }
.atlas-login-form form { margin-top:5px; }
.atlas-login-form .button.secondary img { filter:none; }
.auth-code-block { margin-top:3px; padding:14px; background:#fffaf0; border:1px solid #c9baa2; border-left:3px solid #e77e18; }
.auth-code-block label { margin-bottom:7px; color:#687077; }
.auth-code-block input { width:100%; height:52px; padding:0 12px; color:#17202b; background:#f7f0e3; border:1px solid #c9baa2; border-radius:7px; font:800 19px var(--mono); letter-spacing:.07em; }
.atlas-login-form pre { margin:16px 0 0; padding:13px 14px; overflow-x:auto; color:#e7eff4; background:#07182d; border:1px solid #214565; border-radius:7px; font:600 13px/1.5 var(--mono); }
.atlas-login-form pre code { white-space:pre; }
.atlas-login-form .button.secondary { margin-top:14px; }
@media (max-width:900px) and (min-width:761px) {
  .atlas-login-page { padding:16px; }
  .atlas-login-shell { grid-template-columns:1fr 1fr; }
  .atlas-login-brand, .atlas-login-form { padding:36px 30px; }
  .auth-steps { margin-top:28px; }
}
@media (max-width:760px) {
  .login-brandline { margin-bottom:28px; }
  .login-brandline .login-logo { width:112px; height:56px; }
  .login-brandline .login-logo img { width:94px; }
  .login-brandline > span { font-size:11px; }
  .auth-steps { margin-top:27px; }
  .auth-steps li { min-height:52px; }
  .atlas-login-form > p { max-width:480px; }
  .atlas-login-form pre { font-size:12px; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-login-shell *, .atlas-login-shell *::before, .atlas-login-shell *::after { transition:none !important; animation:none !important; }
}

/* Atlas owner operating desk */
/* Two columns only: primary nav + full-width stage. The old right context rail
   was a covering slab that duplicated the record hero/breadcrumb and view
   headers; it is removed so content uses the full width. */
.atlas-app { grid-template-columns:248px minmax(0,1fr); }
.atlas-rail { width:248px; padding:24px 18px 18px; }
.atlas-stage { grid-column:2; }
.atlas-mark { min-height:70px; padding:0 6px 20px; }
.mark-logo { width:82px; height:44px; }
.mark-logo img { width:72px; }
.mark-name strong { font-size:23px; }
.mark-name span { font-size:13px; line-height:1.25; letter-spacing:.06em; text-transform:none; }
.active-programme { margin:20px 6px 17px; }
.active-programme small { font-size:13px; }
.active-programme strong { margin-top:7px; font-size:15px; }
.programme-pulse { font-size:13px; }
.atlas-menu { gap:2px; }
.menu-group { margin:17px 11px 6px; color:#71879a; font-size:13px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.menu-group:first-child { margin-top:1px; }
.atlas-menu button { min-height:46px; font-size:14px; border-radius:6px; }
.atlas-menu button.active::before { left:-18px; }
.atlas-menu em { font-size:13px; }
.owner-line strong { font-size:14px; }
.owner-line span, .private-note { font-size:13px; }
.atlas-topbar { height:72px; padding:0 24px; grid-template-columns:minmax(160px,.55fr) minmax(260px,560px) auto; }
.operating-horizon small { font-size:13px; }
.operating-horizon strong { margin-top:4px; font-size:17px; }
.atlas-query { height:44px; padding-inline:14px; font-size:14px; }
.atlas-query kbd { font-size:13px; }
.walkthrough-launch { min-height:44px; font-size:14px; }
.sync-launch { min-width:118px; justify-content:flex-start; }
.sync-launch .sync-state { margin-left:auto; color:var(--muted); font-size:13px; font-style:normal; font-weight:700; }
.sync-launch:disabled { cursor:wait; opacity:.72; }
.sync-launch:disabled img { animation:atlas-spin .8s linear infinite; }
.icon-button, .top-owner { width:44px; height:44px; }
.atlas-workbench { max-width:1300px; min-height:calc(100vh - 72px); padding:28px 32px 64px; }
.dayline, .page-head { padding:8px 0 22px; }
.dayline h1, .page-head h1 { font-size:clamp(38px,3.1vw,54px); }
.dayline p, .page-head p { font-size:16px; line-height:1.6; }
.overline { font-size:13px; }
.headline-stat small, .reconciled span { font-size:13px; }
.headline-stat strong { font-size:27px; }
.owner-desk { margin-top:24px; }
.next-result h2 { font-size:clamp(30px,2.5vw,42px); }
.next-result p { font-size:16px; }
.release-path { padding:24px; }
.release-path h3 { font-size:22px; }
.gate strong { font-size:14px; }
.gate small, .gate time { font-size:13px; }
.section-title { padding-bottom:12px; }
.section-title h2 { font-size:28px; }
.section-title p, .section-title button { font-size:14px; }
.decision .kind { font-size:13px; }
.decision strong { font-size:16px; }
.decision p { font-size:15px; }
.button, .decision button, .row-action { min-height:44px; font-size:14px; }
.spine-row strong { font-size:15px; }
.spine-row small, .spine-row p, .spine-progress b { font-size:13px; }
.ledger-row strong { font-size:15px; }
.ledger-row p { font-size:14px; }
.ledger-row span, .ledger-row time { font-size:13px; }
.wait-row small, .wait-row time { font-size:13px; }
.wait-row strong { font-size:15px; }
.wait-row p, .text-action { font-size:14px; }

.atlas-context-rail { display:none; }
.context-loading { min-height:220px; display:grid; place-items:center; align-content:center; gap:14px; text-align:center; }
.context-section { padding:22px 0; border-bottom:1px solid rgba(255,255,255,.13); }
.context-section:first-child { padding-top:0; }
.context-section:last-child { border-bottom:0; }
.context-section .overline { color:#e6a45d; }
.context-section > strong { display:block; margin:8px 0 10px; font:600 27px/1.08 var(--serif); }
.context-section > p { margin:0; color:#a8b7c4; font-size:15px; line-height:1.55; }
.context-section > button { width:100%; min-height:44px; margin-top:18px; padding:0 12px; display:flex; align-items:center; gap:9px; color:#f7f0e3; background:#102d49; border:1px solid #35516a; border-radius:6px; font-size:14px; font-weight:800; }
.context-section > button:hover { border-color:#f19a42; }
.context-section > button img { width:17px; filter:invert(1); }
.context-person { min-height:54px; display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; align-items:center; border-bottom:1px solid rgba(255,255,255,.1); }
.context-person > b { width:34px; height:34px; display:grid; place-items:center; color:#07182d; background:#f19a42; border-radius:7px; font-size:13px; }
.context-person strong { display:block; font-size:15px; }
.context-person small { display:block; margin-top:2px; color:#9fafbc; font-size:13px; }
.context-note { color:#a9b6c0 !important; font-size:var(--type-caption) !important; }
.context-pairs { margin:8px 0 0; }
.context-pairs > div { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid rgba(255,255,255,.1); }
.context-pairs dt { color:#9fafbc; font-size:13px; }
.context-pairs dd { margin:0; font-size:14px; font-weight:800; text-align:right; }

.mission-ledger { margin-top:24px; border-top:2px solid var(--ink); }
.mission-row { min-height:122px; padding:18px 2px; display:grid; grid-template-columns:42px minmax(260px,1.3fr) minmax(160px,.55fr) minmax(170px,.65fr) 22px; gap:18px; align-items:center; border-bottom:1px solid var(--rule); }
.mission-row:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.mission-copy > strong { display:block; margin-top:4px; font-size:17px; }
.mission-copy p { margin:6px 0; color:var(--muted); font-size:15px; line-height:1.5; }
.mission-copy small { color:var(--muted); font-size:13px; }
.mission-position { display:grid; gap:8px; }
.mission-position .label { width:max-content; }
.mission-position b { font-size:13px; }
.mission-handoff small { display:block; color:var(--muted); font-size:13px; }
.mission-handoff strong { display:block; margin-top:5px; font-size:14px; line-height:1.4; }
.row-chevron { width:18px; opacity:.55; }
html[data-theme="dark"] .row-chevron { filter:invert(1); }
.atlas-mobile-nav { display:none; }

@media (max-width:1500px) {
  .atlas-app { grid-template-columns:248px minmax(0,1fr); }
}

@media (max-width:1180px) {
  .atlas-topbar { padding-inline:16px; }
  .atlas-workbench { padding-inline:22px; }
  .decision { grid-template-columns:100px 1fr 140px; }
  .decision p { grid-column:2; }
  .mission-row { grid-template-columns:38px minmax(240px,1fr) 150px 170px 18px; gap:13px; }
}

@media (max-width:1100px) {
  .atlas-app { display:block; }
  .atlas-rail { left:-264px; }
  .atlas-rail.open { left:0; }
  .atlas-stage { display:block; }
}

@media (max-width:760px) {
  .atlas-topbar { height:62px; }
  .atlas-topbar { grid-template-columns:44px minmax(0,1fr) auto; padding-inline:14px; }
  .atlas-query span { font-size:0; }
  .atlas-query span::after { content:"Search Atlas"; font-size:14px; }
  #projectSync { display:none; }
  #walkthroughOpen, #reconcileAll, #themeToggle { display:none; }
  .topbar-controls { min-width:0; }
  .atlas-workbench { min-height:calc(100vh - 62px); padding:18px 14px 104px; }
  .dayline h1, .page-head h1 { font-size:36px; }
  .dayline p, .page-head p { font-size:16px; }
  .next-result { padding:22px 20px; }
  .next-result h2 { font-size:31px; }
  .release-path { padding:20px; }
  .section-title h2 { font-size:25px; }
  .decision { grid-template-columns:1fr; gap:8px; }
  .decision .kind, .decision > strong, .decision p, .decision button, .decision .metadata { grid-column:1; }
  .mission-row { padding:17px 0; grid-template-columns:32px minmax(0,1fr) 18px; gap:10px; align-items:start; }
  .mission-copy { grid-column:2; }
  .mission-position, .mission-handoff { grid-column:2 / 4; }
  .row-chevron { grid-column:3; grid-row:1; margin-top:6px; }
  .mission-copy > strong { font-size:17px; }
  .mission-copy p { font-size:15px; }
  .atlas-mobile-nav { height:76px; padding:7px 8px calc(7px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(5,1fr); position:fixed; left:0; right:0; bottom:0; z-index:24; background:color-mix(in srgb,var(--paper-strong) 96%,transparent); border-top:1px solid var(--rule); backdrop-filter:blur(18px); }
  .atlas-mobile-nav button { min-width:0; display:grid; place-items:center; align-content:center; gap:4px; color:var(--muted); background:transparent; border:0; border-top:3px solid transparent; font-size:13px; font-weight:800; }
  .atlas-mobile-nav button img { width:21px; height:21px; opacity:.76; }
  html[data-theme="dark"] .atlas-mobile-nav button img { filter:invert(1); }
  .atlas-mobile-nav button.active { color:var(--ink); border-top-color:var(--orange); }
  .atlas-mobile-nav button.active img { opacity:1; }
  .record-inspector { padding-bottom:calc(20px + env(safe-area-inset-bottom)); }
}

@media (min-width:761px) and (max-width:1500px) {
  #atlasContextRail { display:none; }
}

/* Final owner-desk craft and accessibility safeguards. */
.atlas-rail { overflow:hidden; }
.atlas-mark,
.active-programme,
.atlas-owner { flex:0 0 auto; }
.atlas-menu { flex:1 1 auto; min-height:0; padding-bottom:24px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#35516a transparent; }
.mobile-rail-walkthrough { display:none; }
.human-gate-label { font-size:.8125rem; }
.dialog-close { width:44px; height:44px; }
.text-action,
.release-detail,
.source-link,
.section-title button { min-height:44px; }
.form-grid label { font-size:.875rem; line-height:1.45; }
.form-grid input,
.form-grid select { font-size:1rem; }

.delivery-pulse { margin-top:24px; padding:0 0 2px; border-top:2px solid var(--ink); border-bottom:1px solid var(--rule); }
.delivery-pulse > header { padding:16px 0 13px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:center; }
.delivery-pulse h2 { margin:3px 0 6px; font:600 1.55rem/1.12 var(--serif); }
.delivery-pulse header p { max-width:720px; margin:0; color:var(--muted); font-size:.9375rem; line-height:1.55; }
.pulse-state { min-width:180px; padding-left:14px; display:flex; gap:10px; align-items:center; border-left:3px solid var(--clay); }
.pulse-state.connected { border-left-color:var(--moss); }
.pulse-state > img { width:21px; height:21px; }
html[data-theme="dark"] .pulse-state > img,
html[data-theme="dark"] .repo-identity > img,
html[data-theme="dark"] .repo-health > img,
html[data-theme="dark"] .repo-link > img,
html[data-theme="dark"] .pulse-empty > img { filter:invert(1); }
.pulse-state b,
.pulse-state small { display:block; }
.pulse-state b { font-size:.9375rem; }
.pulse-state small { margin-top:2px; color:var(--muted); font-size:.8125rem; }
.repo-ledger { border-top:1px solid var(--rule); }
.repo-ledger article { min-width:0; padding:15px 0; display:grid; grid-template-columns:minmax(220px,1.05fr) minmax(420px,1.5fr) minmax(150px,.65fr) auto; gap:20px; align-items:center; border-bottom:1px solid var(--rule); }
.repo-ledger article:last-child { border-bottom:0; }
.repo-identity { min-width:0; display:flex; gap:11px; align-items:center; }
.repo-identity > img { width:22px; height:22px; }
.repo-identity strong,
.repo-identity small { display:block; overflow-wrap:anywhere; }
.repo-identity strong { font-size:.9375rem; }
.repo-identity small { margin-top:3px; color:var(--muted); font-size:.8125rem; }
.repo-measures { display:grid; grid-template-columns:repeat(4,minmax(72px,1fr)); gap:14px; }
.repo-measures small,
.repo-measures b { display:block; }
.repo-measures small { color:var(--muted); font-size:.8125rem; }
.repo-measures b { margin-top:3px; font-size:.9375rem; }
.repo-measures .mono { font-family:var(--mono); font-size:.8125rem; font-variant-numeric:tabular-nums; }
.repo-health { display:flex; gap:9px; align-items:center; }
.repo-health > img { width:19px; height:19px; }
.repo-health b,
.repo-health small { display:block; }
.repo-health b { font-size:.875rem; }
.repo-health small { margin-top:2px; color:var(--muted); font-size:.8125rem; }
.repo-health.success b { color:var(--moss); }
.repo-health.risk b { color:var(--risk); }
.repo-link { min-height:44px; display:inline-flex; align-items:center; gap:7px; color:var(--ink); font-size:.875rem; font-weight:800; text-decoration:none; }
.repo-link > img { width:17px; height:17px; }
.delivery-pulse > footer { padding:11px 0 12px; display:flex; gap:22px; color:var(--muted); border-top:1px solid var(--rule); font-size:.8125rem; font-weight:700; }
.pulse-empty { padding:18px 0; display:flex; gap:12px; align-items:flex-start; border-top:1px solid var(--rule); }
.pulse-empty > img { width:24px; height:24px; }
.pulse-empty strong { font-size:.9375rem; }
.pulse-empty p { margin:4px 0 0; color:var(--muted); font-size:.875rem; line-height:1.5; }
@media (max-width:1180px) and (min-width:761px) {
  .repo-ledger article { grid-template-columns:minmax(220px,1fr) minmax(360px,1.5fr); }
  .repo-health { grid-column:1; }
  .repo-link { grid-column:2; grid-row:2; justify-self:end; }
}
.section-title button { padding:8px 0; }
.text-action { padding:8px 0; display:inline-flex; align-items:center; gap:7px; }
.attention-toggle { display:none; }
.atlas-login-brand p,
.atlas-login-form > p,
.atlas-login-form > small,
.atlas-login-form label,
.login-error { font-size:.8125rem; }
.atlas-login-form input { font-size:1rem; }

/* Hosted Atlas has one owner and one entry action. Keep the sign-in surface
   intentionally quiet, with no programme explanation competing with access. */
.atlas-login-shell--minimal { width:min(420px,100%); display:block; border-radius:16px; }
.atlas-login-form--minimal { min-height:0; padding:42px; background:#f7f0e3; }
.atlas-login-form--minimal h1 { margin:0 0 26px; font:600 38px/1 var(--serif); letter-spacing:-.025em; }
.atlas-login-form--minimal > .button { width:100%; margin:0; }
.atlas-login-form--minimal form { margin:0; }
.atlas-login-form--minimal label { margin-top:0; }
.atlas-login-form--minimal .login-error { margin-bottom:18px; }
@media (max-width:760px) {
  .atlas-login-page { padding:20px; }
  .atlas-login-shell--minimal { min-height:0; }
  .atlas-login-form--minimal { padding:32px 24px; }
}

@media (max-width:760px) {
  .delivery-pulse > header { grid-template-columns:minmax(0,1fr); gap:13px; }
  .pulse-state { padding:10px 0 0; border-left:0; border-top:3px solid var(--clay); }
  .pulse-state.connected { border-top-color:var(--moss); }
  .repo-ledger article { grid-template-columns:minmax(0,1fr); gap:13px; }
  .repo-measures { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .repo-health { padding-top:11px; border-top:1px solid var(--rule); }
  .repo-link { width:100%; justify-content:flex-start; }
  .delivery-pulse > footer { flex-wrap:wrap; gap:8px 15px; }
  .mobile-rail-walkthrough { width:100%; min-height:44px; margin:0 0 14px; padding:0 11px; display:flex; align-items:center; gap:10px; color:#f9f6ed; background:#102d49; border:1px solid #35516a; border-radius:6px; font-size:14px; font-weight:800; }
  .mobile-rail-walkthrough img { width:18px; filter:invert(1); }
  .attention-extra { display:none; }
  .attention-extra.show-mobile { display:grid; }
  .attention-toggle { width:100%; min-height:48px; margin-top:10px; padding:0 14px; display:flex; align-items:center; justify-content:center; gap:8px; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:6px; font-size:14px; font-weight:800; }
  .attention-toggle img { width:17px; transition:transform .18s ease; }
  .attention-toggle[data-expanded="true"] img { transform:rotate(180deg); }
  html[data-theme="dark"] .attention-toggle img { filter:invert(1); }
  .client-row { grid-template-columns:minmax(0,1fr); gap:10px; }
  .client-row > div { min-width:0; grid-column:1 !important; grid-row:auto !important; font-size:14px !important; overflow-wrap:anywhere; }
  .client-row > div:nth-child(2),
  .client-row > div:nth-child(3) { display:none; }
  .client-row > div:nth-child(4) { display:block; }
  .client-row .client-actions { grid-column:1 !important; justify-content:flex-start; }
  .client-row .label { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  .lower { min-width:0; grid-template-columns:minmax(0,1fr); }
  .lower > section,
  .lower .waiting,
  .lower .wait-row { min-width:0; max-width:100%; }
  .lower .wait-row header { flex-wrap:wrap; align-items:flex-start; }
  .lower .wait-row .label { width:fit-content; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  .lower .wait-row strong,
  .lower .wait-row p,
  .lower .wait-row .metadata { overflow-wrap:anywhere; }
  .payment-row { grid-template-columns:28px minmax(0,1fr); gap:10px 12px; align-items:start; }
  .payment-row > div { min-width:0; grid-column:2; }
  .payment-row > b { grid-column:2; grid-row:auto; justify-self:start; text-align:left; }
  .payment-row .label,
  .payment-row .source-link { grid-column:2; width:100%; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  .payment-row p { overflow-wrap:anywhere; }
  .record-inspector .dialog-close { width:44px; height:44px; }
  .inspector-summary dt,
  .record-fields dt,
  .inspector-source small,
  .inspector-audit small,
  .linked-records span,
  .quiet-copy { font-size:13px; }
  .inspector-summary dd,
  .record-fields dd,
  .inspector-source p,
  .linked-records b,
  .inspector-audit strong { font-size:14px; }
}

/* Issue #63: first-class, URL-addressable programme records. */
.record-workspace { width:100%; max-width:1460px; margin:0 auto; padding:4px 0 72px; }
.record-breadcrumb { min-width:0; min-height:46px; display:flex; align-items:center; gap:10px; color:var(--muted); border-bottom:1px solid var(--rule); font-size:13px; }
.record-breadcrumb button { min-height:44px; padding:0; display:inline-flex; align-items:center; gap:8px; color:var(--ink); background:transparent; border:0; font-size:14px; font-weight:800; }
.record-breadcrumb button img { width:17px; height:17px; }
.record-breadcrumb > i { width:1px; height:18px; flex:none; background:var(--rule); transform:rotate(18deg); }
.record-breadcrumb > span { font-size:13px; font-weight:700; }
.record-breadcrumb > b { min-width:0; overflow:hidden; color:var(--blue); font:700 13px/1.4 var(--mono); text-overflow:ellipsis; white-space:nowrap; }
.record-page-head { padding:22px 0 16px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:28px; align-items:end; }
.record-page-head > div:first-child { max-width:900px; }
/* Compact record hero title: dense, not a screen-filling display line. Applies
   to every record page (ticket, agent, person, dependency, ...). */
.record-page-head h1 { max-width:900px; margin:5px 0 7px; font:600 clamp(24px,2.4vw,34px)/1.08 var(--serif); letter-spacing:-.02em; text-wrap:balance; }
.record-page-head p { max-width:820px; margin:0; color:var(--muted); font-size:15px; line-height:1.5; }
/* Ticket/brief record: the hero card below repeats the full title, so the page
   head title is a single dense row (ellipsised, full text on hover) and the top
   whitespace is tightened. Two classes win over the mobile 40px h1 bump. */
.ticket-record .record-page-head { padding:12px 0 12px; align-items:center; }
.ticket-record .record-page-head h1 { max-width:100%; margin:1px 0 3px; font-size:clamp(19px,1.7vw,25px); line-height:1.18; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.record-page-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.record-page-actions .button { min-height:44px; padding:0 13px; border-radius:6px; font-size:14px; text-decoration:none; white-space:nowrap; }
.record-page-actions .button img { width:17px; height:17px; }
.record-hero { min-width:0; padding:27px 30px; display:grid; grid-template-columns:minmax(280px,.78fr) minmax(0,1.35fr); gap:38px; align-items:stretch; color:#f7f2e8; background:linear-gradient(112deg,#081a2d 0%,#0d2a47 62%,#123b5d 100%); border-top:4px solid var(--orange); box-shadow:var(--shadow); }
.record-state { min-width:0; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; border-right:1px solid rgba(255,255,255,.2); }
.record-state .label { margin-bottom:15px; }
.record-state > strong { max-width:520px; font:600 25px/1.2 var(--serif); text-wrap:balance; }
.record-state > small { margin-top:11px; color:#adbdc8; font-size:13px; line-height:1.45; }
.record-hero > dl { min-width:0; margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; }
.record-hero > dl > div { min-width:0; padding:8px 22px; display:flex; flex-direction:column; justify-content:center; border-right:1px solid rgba(255,255,255,.16); }
.record-hero > dl > div:last-child { border-right:0; }
.record-hero dt { color:#9fb2c0; font-size:13px; font-weight:700; }
.record-hero dd { margin:8px 0 0; color:#fffaf0; font-size:15px; font-weight:800; line-height:1.45; overflow-wrap:anywhere; }
.repository-hero dd { font-family:var(--mono); font-size:13px; }
.record-page-grid { min-width:0; margin-top:34px; display:grid; grid-template-columns:minmax(0,1.48fr) minmax(310px,.72fr); gap:46px; align-items:start; }
.record-page-main,.record-page-side { min-width:0; display:grid; gap:38px; }
.record-page-side { position:sticky; top:88px; }
/* Owners panel ("Who holds what") on the wave record page can be taller than
   the sticky aside; bound its height and scroll internally so every owner is
   reachable rather than clipped below the fold. Scoped to .wave-record so the
   full-width Waves-view lists keep flowing with the page. */
.wave-record .wave-operator-list { max-height:min(58vh,540px); overflow-y:auto; overscroll-behavior:contain; padding-right:4px; }
.wave-record .wave-operator-list::-webkit-scrollbar { width:8px; }
.wave-record .wave-operator-list::-webkit-scrollbar-thumb { background:var(--rule); border-radius:8px; }
.record-section { min-width:0; padding-top:18px; border-top:2px solid var(--ink); }
.record-section-title { display:flex; justify-content:space-between; gap:18px; align-items:end; }
.record-section-title h2 { margin:4px 0 0; font:600 28px/1.1 var(--serif); }
.record-fields-full { margin:15px 0 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:30px; }
.record-fields-full > div { min-height:66px; padding:12px 0; grid-template-columns:minmax(112px,.58fr) minmax(0,1fr); gap:14px; align-content:start; }
.record-fields-full dt { font-size:13px; line-height:1.45; }
.record-fields-full dd { font-size:15px; line-height:1.55; }
.record-fields-full dd ul { margin:0; padding-left:18px; }
.record-source { margin-top:15px; padding:5px 0 5px 18px; border-left:4px solid var(--orange); }
.record-source > div { display:grid; grid-template-columns:24px minmax(0,1fr); gap:12px; }
.record-source img { width:22px; height:22px; }
.record-source strong { font-size:16px; }
.record-source p { max-width:800px; margin:5px 0 0; color:var(--muted); font-size:15px; line-height:1.55; }
.record-source > small { display:block; margin:12px 0 0 36px; color:var(--blue); font:700 13px/1.45 var(--mono); overflow-wrap:anywhere; }
.record-evidence { margin-top:15px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-top:1px solid var(--rule); }
.record-evidence button { min-width:0; min-height:92px; padding:14px 14px 14px 0; display:grid; grid-template-columns:40px minmax(0,1fr) 18px; gap:12px; align-items:center; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; }
.record-evidence button:nth-child(odd) { margin-right:20px; }
.record-evidence button:hover { color:var(--blue); }
.record-evidence > button > img { width:18px; height:18px; opacity:.65; }
.evidence-mark { width:36px; height:36px; display:grid; place-items:center; color:var(--night); background:var(--orange-soft); border-radius:6px; }
.evidence-mark img { width:19px; height:19px; }
.record-evidence small,.record-evidence strong,.record-evidence em { display:block; }
.record-evidence small { color:var(--muted); font-size:13px; font-weight:700; }
.record-evidence strong { margin-top:3px; font-size:15px; line-height:1.38; }
.record-evidence em { margin-top:4px; color:var(--blue); font-size:13px; font-style:normal; }
.record-relations { margin-top:15px; border-top:1px solid var(--rule); }
.record-relations button { width:100%; min-height:74px; padding:12px 2px; display:grid; grid-template-columns:150px minmax(0,1fr) 20px; gap:16px; align-items:center; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; }
.record-relations button:hover { color:var(--blue); }
.record-relations span { color:var(--muted); font-size:13px; font-weight:700; }
.record-relations b { font-size:15px; line-height:1.45; }
.record-relations img { width:18px; height:18px; }
.record-next { padding:20px; color:#f7f2e8; background:#0b2036; border-top-color:var(--orange); }
.record-next .overline { color:#efa35b; }
.record-next h2 { color:#fffaf0; }
.record-next > p { margin:14px 0 20px; color:#b6c3cc; font-size:15px; line-height:1.6; }
.record-next > div:last-child { padding-top:15px; border-top:1px solid rgba(255,255,255,.16); }
.record-next small,.record-next strong { display:block; }
.record-next small { color:#91a6b6; font-size:13px; }
.record-next strong { margin-top:6px; font-size:15px; line-height:1.5; }
.record-activity { margin-top:10px; }
.record-activity article { padding:12px 0; display:grid; grid-template-columns:15px minmax(0,1fr); gap:11px; border-bottom:1px solid var(--rule); }
.record-activity i { width:9px; height:9px; margin-top:5px; border:2px solid var(--moss); border-radius:50%; }
.record-activity strong { font-size:15px; line-height:1.42; }
.record-activity p { margin:4px 0; color:var(--muted); font-size:14px; line-height:1.5; }
.record-activity small { color:var(--muted); font-size:13px; line-height:1.45; }
.record-empty-line { min-height:74px; margin-top:12px; display:grid; grid-template-columns:28px minmax(0,1fr); gap:12px; align-items:center; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.record-empty-line > img { width:22px; height:22px; opacity:.65; }
.record-empty-line strong,.record-empty-line small { display:block; }
.record-empty-line strong { font-size:15px; }
.record-empty-line small { margin-top:3px; color:var(--muted); font-size:13px; line-height:1.45; }
.repository-evidence { margin-top:34px; }
.repository-evidence > .inspector-truth { max-width:760px; }
.repository-evidence > section { padding:20px 0; border-bottom:1px solid var(--rule); }
.repository-evidence .inspector-summary { max-width:760px; }
.record-context > strong { font-size:25px; }
.record-link-context p { font-size:14px; }

/* Team-member records are operational desks, not generic programme-source
   pages. One compact identity line, one status band and a ruled ticket ledger
   make the full workload visible before any supporting detail. */
.team-member-record { padding-top:0; }
.team-member-head { min-width:0; padding:16px 0 14px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:22px; align-items:center; border-bottom:2px solid var(--ink); }
.team-member-identity { min-width:0; display:grid; grid-template-columns:48px minmax(0,1fr); gap:13px; align-items:start; }
.team-member-icon { width:48px; height:48px; display:grid; place-items:center; color:var(--night); background:var(--orange-soft); border:1px solid color-mix(in srgb,var(--orange) 54%,var(--rule)); border-radius:7px; }
.team-member-icon img { width:23px; height:23px; }
.team-member-identity h1 { margin:3px 0 5px; font:600 clamp(29px,2.8vw,39px)/1 var(--serif); letter-spacing:-.025em; }
.team-member-identity p { max-width:840px; margin:0; display:flex; flex-wrap:wrap; gap:4px 10px; color:var(--muted); font-size:15px; line-height:1.48; }
.team-member-identity p strong { color:var(--ink); font-weight:800; }
.team-member-summary { min-width:0; display:grid; grid-template-columns:minmax(270px,.9fr) minmax(0,1.6fr); border-top:4px solid var(--orange); color:#f7f2e8; background:#0b2036; box-shadow:var(--shadow); }
.team-member-next { min-width:0; padding:17px 21px; display:grid; align-content:center; gap:5px; color:inherit; background:transparent; border:0; border-right:1px solid rgba(255,255,255,.17); text-align:left; }
.team-member-next[data-action] { cursor:pointer; }
.team-member-next[data-action]:hover { background:rgba(255,255,255,.06); }
.team-member-next[data-action]:focus-visible { outline:3px solid var(--orange); outline-offset:-3px; }
.team-member-next .overline { color:#efa35b; }
.team-member-next strong { color:#fffaf0; font:600 20px/1.22 var(--serif); overflow-wrap:anywhere; }
.team-member-next small { display:flex; align-items:center; gap:7px; color:#c2d2dc; font-size:13px; font-weight:700; line-height:1.35; }
.team-member-next small img { width:14px; height:14px; filter:invert(1); }
.team-ticket-stats { min-width:0; margin:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
.team-ticket-stats > div { min-width:0; min-height:94px; padding:15px 16px; display:flex; flex-direction:column; justify-content:center; border-right:1px solid rgba(255,255,255,.14); }
.team-ticket-stats > div:last-child { border-right:0; }
.team-ticket-stats dt { color:#aebfcb; font-size:13px; font-weight:700; line-height:1.35; }
.team-ticket-stats dd { margin:5px 0 0; color:#fffaf0; font:600 27px/1 var(--serif); font-variant-numeric:tabular-nums; }
.team-ticket-section { min-width:0; margin-top:27px; padding-top:17px; border-top:2px solid var(--ink); }
.team-ticket-section-head { display:flex; justify-content:space-between; align-items:end; gap:18px; }
.team-ticket-section-head h2 { margin:4px 0 0; font:600 clamp(25px,2.2vw,31px)/1.08 var(--serif); }
.team-ticket-filter-count { color:var(--muted); font:700 14px var(--mono); white-space:nowrap; }
.team-ticket-filters { margin:16px 0 8px; display:flex; flex-wrap:wrap; gap:6px; }
.team-ticket-filters button { min-height:44px; padding:0 10px; display:inline-flex; align-items:center; gap:6px; color:var(--muted); background:transparent; border:1px solid var(--rule); border-radius:6px; font-size:14px; font-weight:800; white-space:nowrap; }
.team-ticket-filters button img { width:16px; height:16px; opacity:.8; }
.team-ticket-filters button:hover { color:var(--ink); border-color:var(--orange); background:color-mix(in srgb,var(--orange) 7%,transparent); }
.team-ticket-filters button.active { color:var(--ink); border-color:var(--orange); box-shadow:inset 0 -3px 0 var(--orange); }
.team-ticket-filters b { margin-left:2px; color:inherit; font:800 13px var(--mono); font-variant-numeric:tabular-nums; }
.team-ticket-ledger { min-width:0; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.team-ticket-columns,.team-ticket-row { min-width:0; display:grid; grid-template-columns:minmax(220px,1.35fr) minmax(95px,.5fr) minmax(100px,.52fr) minmax(100px,.5fr) minmax(155px,.8fr) 18px; column-gap:14px; align-items:center; }
.team-ticket-columns { min-height:37px; padding:0 13px; color:var(--muted); border-bottom:1px solid var(--rule); font-size:13px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.team-ticket-row { width:100%; padding:13px; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; }
.team-ticket-row:last-child { border-bottom:0; }
.team-ticket-row:hover { background:color-mix(in srgb,var(--orange) 7%,transparent); }
.team-ticket-primary,.team-ticket-handoff { min-width:0; display:block; }
.team-ticket-primary small,.team-ticket-handoff small { display:block; color:var(--muted); font-size:13px; font-weight:700; line-height:1.35; }
.team-ticket-primary strong { display:block; margin-top:3px; color:var(--ink); font-size:15px; line-height:1.36; overflow-wrap:anywhere; }
.team-ticket-handoff em { display:block; margin-top:2px; color:var(--muted); font-size:13px; font-style:normal; font-weight:600; line-height:1.35; }
.team-ticket-handoff strong { display:block; margin-top:3px; color:var(--ink); font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.team-ticket-state { min-width:0; }
.team-ticket-state .label { max-width:100%; min-height:0; padding:5px 7px; white-space:normal; line-height:1.25; }
.team-ticket-state .chip-icon { width:14px; height:14px; }
.team-ticket-relationship,.team-ticket-gate { min-width:0; color:var(--muted); font-size:14px; font-weight:700; line-height:1.35; overflow-wrap:anywhere; }
.team-ticket-open { display:grid; place-items:center; color:var(--blue); }
.team-ticket-open img { width:17px; height:17px; }
.team-ticket-empty { min-height:126px; padding:20px 0; display:grid; grid-template-columns:34px minmax(0,1fr); gap:14px; align-items:center; border-bottom:1px solid var(--rule); }
.team-ticket-empty > img { width:25px; height:25px; color:var(--muted); opacity:.72; }
.team-ticket-empty strong,.team-ticket-empty small { display:block; }
.team-ticket-empty strong { color:var(--ink); font-size:16px; }
.team-ticket-empty small { margin-top:5px; color:var(--muted); font-size:14px; line-height:1.5; }
html[data-theme="dark"] .team-member-icon img,
html[data-theme="dark"] .team-ticket-filters img,
html[data-theme="dark"] .team-ticket-open img,
html[data-theme="dark"] .team-ticket-empty > img { filter:invert(1); }
html[data-theme="dark"] .record-breadcrumb img,
html[data-theme="dark"] .record-page-actions img,
html[data-theme="dark"] .record-source img,
html[data-theme="dark"] .record-evidence button > img,
html[data-theme="dark"] .evidence-mark img,
html[data-theme="dark"] .record-relations img,
html[data-theme="dark"] .record-empty-line > img { filter:invert(1); }

/* Work-item pages are compact engineering workbenches. The live delivery
   stream earns the first viewport; provenance remains present but deliberately
   thin and static scope is a progressive disclosure. */
.work-item-workbench { max-width:1500px; padding-top:0; }
.workbench-breadcrumb { min-height:42px; display:flex; align-items:center; gap:10px; color:var(--muted); border-bottom:1px solid var(--rule); font-size:14px; font-weight:800; }
.workbench-breadcrumb button { min-height:42px; display:inline-flex; align-items:center; gap:8px; padding:0 4px; color:var(--muted); background:transparent; border:0; font:inherit; font-weight:800; }
.workbench-breadcrumb button:hover { color:var(--ink); }
.workbench-breadcrumb button img { width:17px; }
.workbench-breadcrumb > span { padding-left:10px; border-left:1px solid var(--rule); font:700 13px var(--mono); color:var(--blue); }
.workbench-provenance { min-height:44px; display:flex; align-items:center; flex-wrap:wrap; gap:7px 18px; padding:8px 0; color:var(--muted); border-bottom:1px solid var(--rule); font-size:13px; line-height:1.4; }
.workbench-provenance > span,.workbench-provenance > a { min-width:0; display:inline-flex; align-items:center; gap:6px; color:inherit; }
.workbench-provenance > span:first-child { color:var(--ink); }
.workbench-provenance > span:first-child b { overflow-wrap:anywhere; }
.workbench-provenance img { width:15px; }
.workbench-provenance a { color:var(--blue); font-weight:800; text-decoration:none; }
.workbench-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:start; padding:16px 0 13px; border-bottom:3px solid var(--orange); }
.workbench-head h1 { max-width:860px; margin:3px 0 6px; color:var(--ink); font:600 clamp(32px,3.3vw,44px)/1 var(--serif); letter-spacing:-.035em; overflow-wrap:anywhere; }
.workbench-head p { max-width:850px; margin:0; color:var(--muted); font-size:15px; line-height:1.5; }
.workbench-head-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.workbench-head-actions .button { min-height:44px; font-size:14px; }
.workbench-operating-band { display:grid; grid-template-columns:minmax(205px,.8fr) minmax(290px,1.25fr) minmax(310px,1.15fr); align-items:stretch; color:#f7f2e8; background:#0c263d; border-bottom:1px solid color-mix(in srgb,var(--orange) 65%,transparent); box-shadow:var(--shadow); }
.workbench-current,.workbench-next-action,.workbench-facts { min-width:0; padding:16px 18px; }
.workbench-current { display:flex; flex-direction:column; align-items:flex-start; gap:8px; border-right:1px solid rgba(255,255,255,.15); }
.workbench-current .overline,.workbench-next-action small { color:#efa35b; }
.workbench-current > strong { color:#fffaf0; font:600 19px/1.22 var(--serif); }
.workbench-current > small { color:#b8c9d4; font-size:13px; line-height:1.35; }
.workbench-next-action { width:100%; display:grid; grid-template-columns:26px minmax(0,1fr); gap:11px; align-content:center; color:#fffaf0; background:transparent; border:0; border-right:1px solid rgba(255,255,255,.15); text-align:left; }
button.workbench-next-action { cursor:pointer; }
button.workbench-next-action:hover { background:rgba(255,255,255,.06); }
button.workbench-next-action:focus-visible { outline:3px solid var(--orange); outline-offset:-3px; }
.workbench-next-action > img { width:19px; margin-top:4px; }
.workbench-next-action small,.workbench-next-action strong,.workbench-next-action em { display:block; }
.workbench-next-action small { font-size:13px; font-weight:900; letter-spacing:.045em; text-transform:uppercase; }
.workbench-next-action strong { margin-top:4px; color:#fffaf0; font-size:16px; line-height:1.35; overflow-wrap:anywhere; }
.workbench-next-action em { margin-top:4px; color:#c1d1dc; font-size:13px; font-style:normal; font-weight:600; line-height:1.4; }
.workbench-facts { margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 16px; align-content:center; }
.workbench-facts > div { min-width:0; }
.workbench-facts dt { color:#b8c9d4; font-size:13px; font-weight:800; line-height:1.25; }
.workbench-facts dd { margin:4px 0 0; color:#fffaf0; font-size:14px; font-weight:800; line-height:1.35; overflow-wrap:anywhere; }
.workbench-facts .workbench-blocker { grid-column:1 / -1; padding-top:9px; border-top:1px solid rgba(255,255,255,.16); }
.workbench-facts .workbench-blocker dd { color:#ffc5bb; }
.workbench-person { min-height:0; display:inline-flex; align-items:center; gap:6px; padding:0; color:inherit; background:transparent; border:0; font:inherit; font-weight:800; text-align:left; }
button.workbench-person { cursor:pointer; text-decoration:underline; text-decoration-color:rgba(255,255,255,.34); text-underline-offset:3px; }
.workbench-person img { width:15px; filter:invert(1); }
.workbench-stream-section,.workbench-section { min-width:0; padding:21px 0; border-bottom:1px solid var(--rule); }
.workbench-section-head { display:flex; justify-content:space-between; gap:18px; align-items:end; margin:0 0 11px; }
.workbench-section-head h2 { margin:3px 0 0; color:var(--ink); font:600 27px/1.05 var(--serif); letter-spacing:-.022em; }
.workbench-section-head > p { margin:0; color:var(--muted); font:700 13px var(--mono); white-space:nowrap; }
.workbench-filters { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 12px; }
.workbench-filters button { min-height:42px; display:inline-flex; align-items:center; gap:7px; padding:0 10px; color:var(--muted); background:transparent; border:1px solid var(--rule); border-radius:6px; font-size:14px; font-weight:800; }
.workbench-filters button img { width:16px; }
.workbench-filters button b { font:800 13px var(--mono); font-variant-numeric:tabular-nums; }
.workbench-filters button:hover { color:var(--ink); border-color:var(--orange); background:color-mix(in srgb,var(--orange) 7%,transparent); }
.workbench-filters button.active { color:var(--ink); border-color:var(--orange); box-shadow:inset 0 -3px 0 var(--orange); }
.workbench-stream { border-top:1px solid var(--rule); }
.workbench-event { width:100%; min-width:0; display:grid; grid-template-columns:31px minmax(0,1fr) 17px; gap:12px; align-items:start; padding:12px 2px; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; }
button.workbench-event { cursor:pointer; }
button.workbench-event:hover { background:color-mix(in srgb,var(--orange) 6%,transparent); }
.workbench-event > img:last-child { width:16px; margin-top:7px; color:var(--blue); }
.workbench-stream-mark { width:30px; height:30px; display:grid; place-items:center; color:var(--blue); background:var(--paper-strong); border:1px solid var(--rule); border-radius:50%; }
.workbench-stream-mark img { width:16px; }
.workbench-stream-mark.done { color:var(--moss); border-color:color-mix(in srgb,var(--moss) 55%,var(--rule)); }
.workbench-stream-mark.wait { color:var(--orange); border-color:color-mix(in srgb,var(--orange) 55%,var(--rule)); }
.workbench-stream-mark.risk { color:var(--clay); border-color:color-mix(in srgb,var(--clay) 55%,var(--rule)); }
.workbench-stream-copy { min-width:0; padding-top:2px; }
.workbench-stream-top { display:flex; align-items:flex-start; flex-wrap:wrap; gap:7px; }
.workbench-stream-top > strong { min-width:0; flex:1 1 180px; color:var(--ink); font-size:15px; line-height:1.35; overflow-wrap:anywhere; }
.workbench-stream-copy > small { display:block; margin-top:4px; color:var(--muted); font-size:14px; line-height:1.45; }
.workbench-stream-copy > em { display:flex; flex-wrap:wrap; align-items:center; gap:5px 9px; margin-top:6px; color:var(--quiet); font-size:13px; font-style:normal; font-weight:700; line-height:1.35; }
.workbench-stream-copy > em .workbench-person { color:var(--muted); font-size:13px; }
.workbench-stream-copy > em .workbench-person img { filter:none; opacity:.72; }
.workbench-ref { max-width:100%; color:var(--blue); overflow-wrap:anywhere; }
.workbench-lower-grid { display:grid; grid-template-columns:minmax(0,1.32fr) minmax(300px,.74fr); gap:28px; }
.workbench-lower-grid > aside { min-width:0; }
.workbench-lower-grid > aside .workbench-section:first-child { padding-top:21px; }
.workbench-scope { background:var(--paper-strong); border:1px solid var(--rule); }
.workbench-scope summary { min-height:48px; display:grid; grid-template-columns:19px minmax(0,1fr) 17px; gap:9px; align-items:center; padding:0 13px; color:var(--ink); cursor:pointer; font-size:14px; font-weight:800; list-style:none; }
.workbench-scope summary::-webkit-details-marker { display:none; }
.workbench-scope summary > img { width:17px; }
.workbench-scope[open] summary { border-bottom:1px solid var(--rule); }
.workbench-scope[open] summary > img:last-child { transform:rotate(180deg); }
.workbench-scope > p { margin:0; padding:14px 15px 0; color:var(--muted); font-size:15px; line-height:1.55; }
.workbench-fields { margin:14px 15px 15px; }
.workbench-artifacts { border-top:1px solid var(--rule); }
.workbench-artifacts > button,.workbench-artifacts > article { width:100%; min-width:0; display:grid; grid-template-columns:30px minmax(0,1fr) auto 17px; gap:10px; align-items:start; padding:11px 0; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; }
.workbench-artifacts > button { cursor:pointer; }
.workbench-artifacts > button:hover { background:color-mix(in srgb,var(--orange) 6%,transparent); }
.workbench-artifacts > button > img:last-child { width:16px; margin-top:6px; color:var(--blue); }
.workbench-artifact-icon { width:29px; height:29px; display:grid; place-items:center; color:var(--blue); background:var(--paper-strong); border:1px solid var(--rule); border-radius:6px; }
.workbench-artifact-icon img { width:16px; }
.workbench-artifacts strong,.workbench-artifacts small { display:block; overflow-wrap:anywhere; }
.workbench-artifacts strong { font-size:14px; line-height:1.35; }
.workbench-artifacts small { margin-top:3px; color:var(--muted); font-size:13px; font-weight:600; line-height:1.4; }
.workbench-artifact-meta { min-width:75px; display:grid; justify-items:end; gap:5px; }
.workbench-artifact-meta time { color:var(--quiet); font-size:12px; font-weight:700; white-space:nowrap; }
.workbench-code-refs { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.workbench-code-refs > button,.workbench-code-refs > span { min-height:36px; max-width:100%; display:inline-flex; align-items:center; gap:7px; padding:6px 9px; color:var(--muted); background:var(--paper-strong); border:1px solid var(--rule); border-radius:5px; font-size:13px; font-weight:700; overflow-wrap:anywhere; }
.workbench-code-refs > button { cursor:pointer; }
.workbench-code-refs > button:hover { color:var(--ink); border-color:var(--orange); }
.workbench-code-refs img { width:15px; flex:none; }
.workbench-quiet { color:var(--muted); font-size:13px; }
.workbench-related { border-top:1px solid var(--rule); }
.workbench-related button { width:100%; display:grid; grid-template-columns:20px minmax(0,1fr) 16px; gap:9px; align-items:start; padding:11px 0; color:var(--ink); background:transparent; border:0; border-bottom:1px solid var(--rule); text-align:left; cursor:pointer; }
.workbench-related button:hover { background:color-mix(in srgb,var(--orange) 6%,transparent); }
.workbench-related button > img { width:16px; margin-top:4px; color:var(--blue); }
.workbench-related small,.workbench-related strong { display:block; }
.workbench-related small { color:var(--muted); font-size:13px; font-weight:700; }
.workbench-related strong { margin-top:3px; color:var(--ink); font-size:14px; line-height:1.35; }
.workbench-empty { min-height:86px; display:grid; grid-template-columns:29px minmax(0,1fr); gap:11px; align-content:center; padding:16px 2px; border-bottom:1px solid var(--rule); }
.workbench-empty.compact { min-height:70px; }
.workbench-empty > img { width:23px; color:var(--muted); opacity:.75; }
.workbench-empty strong,.workbench-empty small { display:block; }
.workbench-empty strong { color:var(--ink); font-size:14px; }
.workbench-empty small { margin-top:3px; color:var(--muted); font-size:13px; line-height:1.45; }
html[data-theme="dark"] .workbench-breadcrumb img,
html[data-theme="dark"] .workbench-provenance img,
html[data-theme="dark"] .workbench-head-actions img,
html[data-theme="dark"] .workbench-next-action > img,
html[data-theme="dark"] .workbench-filters img,
html[data-theme="dark"] .workbench-scope img,
html[data-theme="dark"] .workbench-empty > img { filter:invert(1); }

@media (max-width:1180px) {
  .workbench-operating-band { grid-template-columns:minmax(190px,.7fr) minmax(0,1.3fr); }
  .workbench-facts { grid-column:1 / -1; grid-template-columns:repeat(4,minmax(0,1fr)); padding-top:13px; border-top:1px solid rgba(255,255,255,.15); }
  .workbench-lower-grid { grid-template-columns:minmax(0,1fr); gap:0; }
  .workbench-lower-grid > aside { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 26px; }
}

@media (max-width:760px) {
  .workbench-breadcrumb > span { display:none; }
  .workbench-provenance { align-items:flex-start; gap:6px 12px; padding:9px 0; }
  .workbench-provenance > span:first-child { flex-basis:100%; }
  .workbench-provenance > a { flex-basis:100%; }
  .workbench-head { grid-template-columns:minmax(0,1fr); gap:12px; padding:14px 0 12px; }
  .workbench-head h1 { font-size:32px; }
  .workbench-head-actions { justify-content:flex-start; }
  .workbench-head-actions .button { flex:1 1 auto; }
  .workbench-operating-band { grid-template-columns:minmax(0,1fr); }
  .workbench-current,.workbench-next-action { border-right:0; border-bottom:1px solid rgba(255,255,255,.15); }
  .workbench-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workbench-facts > div:last-child:nth-child(odd) { grid-column:1 / -1; }
  .workbench-stream-section,.workbench-section { padding:18px 0; }
  .workbench-section-head { align-items:start; gap:10px; }
  .workbench-section-head h2 { font-size:24px; }
  .workbench-section-head > p { padding-top:5px; text-align:right; white-space:normal; }
  .workbench-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workbench-filters button { width:100%; justify-content:flex-start; }
  .workbench-filters button:first-child { grid-column:1 / -1; }
  .workbench-event { gap:10px; }
  .workbench-event > img:last-child { display:none; }
  .workbench-lower-grid > aside { grid-template-columns:minmax(0,1fr); }
  .workbench-artifacts > button,.workbench-artifacts > article { grid-template-columns:30px minmax(0,1fr) 16px; }
  .workbench-artifact-meta { grid-column:2; grid-row:2; justify-items:start; display:flex; align-items:center; gap:8px; }
  .workbench-artifacts > button > img:last-child { grid-column:3; grid-row:1 / 3; }
}

@media (max-width:1180px) {
  .record-page-head { grid-template-columns:minmax(0,1fr); gap:20px; }
  .record-page-actions { justify-content:flex-start; }
  .record-page-grid { grid-template-columns:minmax(0,1fr); gap:38px; }
  .record-page-side { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .team-member-summary { grid-template-columns:minmax(240px,.82fr) minmax(0,1.4fr); }
  .team-ticket-columns,.team-ticket-row { grid-template-columns:minmax(185px,1.22fr) minmax(90px,.48fr) minmax(90px,.48fr) minmax(90px,.48fr) minmax(125px,.7fr) 18px; column-gap:10px; }
}

@media (max-width:1100px) and (min-width:761px) {
  .team-ticket-columns { display:none; }
  .team-ticket-row { grid-template-columns:minmax(0,1fr) 20px; gap:10px 12px; padding:15px 10px; }
  .team-ticket-primary { grid-column:1; grid-row:1; }
  .team-ticket-open { grid-column:2; grid-row:1; align-self:start; padding-top:5px; }
  .team-ticket-state { grid-column:1; grid-row:2; }
  .team-ticket-relationship { grid-column:1; grid-row:3; }
  .team-ticket-gate { grid-column:1; grid-row:4; }
  .team-ticket-handoff { grid-column:1; grid-row:5; padding-top:6px; border-top:1px solid var(--rule); }
}

@media (max-width:760px) {
  .record-workspace { padding-top:0; }
  .record-breadcrumb { overflow:hidden; }
  .record-breadcrumb > span,.record-breadcrumb > i:last-of-type,.record-breadcrumb > b { display:none; }
  .record-page-head { padding:25px 0 21px; }
  .record-page-head h1 { font-size:40px; line-height:1.02; }
  .record-page-head p { font-size:16px; }
  .record-page-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-page-actions .button { width:100%; min-width:0; justify-content:flex-start; white-space:normal; }
  .record-hero { padding:23px 20px; grid-template-columns:minmax(0,1fr); gap:22px; }
  .record-state { padding-bottom:20px; border-right:0; border-bottom:1px solid rgba(255,255,255,.2); }
  .record-state > strong { font-size:23px; }
  .record-hero > dl { grid-template-columns:minmax(0,1fr); }
  .record-hero > dl > div { min-height:65px; padding:10px 0; border-right:0; border-bottom:1px solid rgba(255,255,255,.14); }
  .record-hero > dl > div:last-child { border-bottom:0; }
  .record-page-grid { margin-top:28px; }
  .record-page-main,.record-page-side { gap:30px; }
  .record-page-side { grid-template-columns:minmax(0,1fr); }
  .record-section-title h2 { font-size:25px; }
  .record-fields-full { grid-template-columns:minmax(0,1fr); }
  .record-fields-full > div { grid-template-columns:112px minmax(0,1fr); }
  .record-evidence { grid-template-columns:minmax(0,1fr); }
  .record-evidence button:nth-child(odd) { margin-right:0; }
  .record-relations button { grid-template-columns:minmax(0,1fr) 18px; gap:4px 10px; }
  .record-relations span,.record-relations b { grid-column:1; }
  .record-relations img { grid-column:2; grid-row:1 / 3; }
  .team-member-head { grid-template-columns:minmax(0,1fr); gap:13px; padding:14px 0; }
  .team-member-head .record-page-actions { display:flex; }
  .team-member-head .record-page-actions .button { width:auto; }
  .team-member-identity { grid-template-columns:44px minmax(0,1fr); gap:11px; }
  .team-member-icon { width:44px; height:44px; }
  .team-member-identity h1 { font-size:31px; }
  .team-member-identity p { display:block; font-size:15px; }
  .team-member-identity p strong { display:block; margin-bottom:3px; }
  .team-member-summary { grid-template-columns:minmax(0,1fr); }
  .team-member-next { min-height:94px; border-right:0; border-bottom:1px solid rgba(255,255,255,.17); }
  .team-ticket-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .team-ticket-stats > div { min-height:70px; border-bottom:1px solid rgba(255,255,255,.14); }
  .team-ticket-stats > div:nth-child(even) { border-right:0; }
  .team-ticket-stats > div:last-child { grid-column:1 / -1; border-bottom:0; }
  .team-ticket-stats dd { font-size:24px; }
  .team-ticket-section { margin-top:22px; }
  .team-ticket-section-head { align-items:start; }
  .team-ticket-section-head h2 { font-size:26px; }
  .team-ticket-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .team-ticket-filters button { width:100%; justify-content:flex-start; white-space:normal; }
  .team-ticket-filters button:first-child { grid-column:1 / -1; }
  .team-ticket-columns { display:none; }
  .team-ticket-row { grid-template-columns:minmax(0,1fr) 20px; gap:10px 12px; padding:15px 4px; }
  .team-ticket-primary { grid-column:1; grid-row:1; }
  .team-ticket-open { grid-column:2; grid-row:1; align-self:start; padding-top:5px; }
  .team-ticket-state { grid-column:1; grid-row:2; }
  .team-ticket-relationship,.team-ticket-gate { min-width:0; color:var(--muted); font-size:14px; }
  .team-ticket-relationship { grid-column:1; grid-row:3; }
  .team-ticket-gate { grid-column:1; grid-row:4; }
  .team-ticket-handoff { grid-column:1; grid-row:5; padding-top:6px; border-top:1px solid var(--rule); }
}

/* ===== Owner onboarding surfaces: Command-K palette and the Help workspace ===== */
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

.command-dialog { width:min(680px,calc(100vw - 32px)); }
.command-input input { font-size:1rem; }
.command-hint { margin-top:10px; display:flex; flex-wrap:wrap; gap:14px; color:var(--muted); font-size:var(--type-caption); }
.command-hint kbd { padding:2px 6px; background:var(--paper); border:1px solid var(--rule); border-radius:4px; font:700 var(--type-caption) var(--mono); }
.command-hint-help { margin-left:auto; }
.command-results { max-height:min(46vh,430px); margin-top:12px; overflow-y:auto; overscroll-behavior:contain; }
.command-group { position:sticky; top:0; z-index:1; margin-top:8px; padding:8px 10px 6px; color:var(--muted); background:var(--paper-strong); font-size:var(--type-caption); font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.command-results .command-group:first-child { margin-top:0; }
.command-result { width:100%; min-height:56px; padding:9px 10px; display:grid; grid-template-columns:36px minmax(0,1fr) auto auto; gap:12px; align-items:center; color:var(--ink); background:transparent; border:0; border-left:3px solid transparent; border-bottom:1px solid var(--rule); text-align:left; }
.command-glyph { width:36px; height:36px; display:grid; place-items:center; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
.command-glyph img { width:17px; opacity:.85; }
html[data-theme="dark"] .command-glyph img { filter:invert(1); }
.command-copy { min-width:0; }
.command-result strong { display:block; font-size:var(--type-control); }
.command-result small { display:block; margin-top:3px; color:var(--muted); font-size:var(--type-caption); line-height:1.45; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.command-kind { padding:4px 10px; color:var(--muted); border:1px solid var(--rule); border-radius:999px; font-size:var(--type-caption); font-weight:700; white-space:nowrap; }
.command-enter { width:20px; display:grid; place-items:center; opacity:0; }
.command-enter img { width:16px; }
html[data-theme="dark"] .command-enter img { filter:invert(1); }
.command-result:hover { background:color-mix(in srgb,var(--orange) 6%,transparent); }
.command-result.active { background:color-mix(in srgb,var(--orange) 10%,transparent); border-left-color:var(--orange); }
.command-result.active .command-enter { opacity:1; }
.command-result.active .command-kind { color:var(--ink); border-color:color-mix(in srgb,var(--orange) 55%,var(--rule)); }
.command-empty { padding:26px 10px; }
.command-empty strong { display:block; font-size:var(--type-emphasis); }
.command-empty p { margin:7px 0 0; color:var(--muted); font-size:var(--type-control); line-height:1.55; }
@media (max-width:620px) {
  .command-kind { display:none; }
  .command-result { grid-template-columns:36px minmax(0,1fr) auto; }
  .command-result small { white-space:normal; }
}

/* Help workspace */
[data-help-topic] { scroll-margin-top:92px; }
.help-hero { margin-top:8px; display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.9fr); background:var(--paper); border:1px solid var(--rule); }
.help-hero-copy { padding:26px 28px; }
.help-hero-copy h2 { margin:8px 0 10px; font:600 30px/1.1 var(--serif); }
.help-hero-copy > p { max-width:640px; margin:0; color:var(--muted); font-size:var(--type-body); line-height:1.6; }
.help-start-list { margin:18px 0 0; padding:0; list-style:none; }
.help-start-list li { padding:11px 0; display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; align-items:start; border-top:1px solid var(--rule); font-size:var(--type-body); line-height:1.55; }
.help-start-list b { padding-top:2px; color:var(--orange); font:700 var(--type-control) var(--mono); }
.help-hero-side { padding:26px 24px; display:flex; flex-direction:column; gap:12px; background:var(--paper-strong); border-left:1px solid var(--rule); }
.help-hero-side > p { margin:0; color:var(--muted); font-size:var(--type-control); line-height:1.55; }
.help-hero-side .button { justify-content:center; }
.help-key-hints { margin-top:auto; display:grid; gap:8px; color:var(--muted); font-size:var(--type-control); }
.help-key-hints kbd { padding:2px 7px; background:var(--paper); border:1px solid var(--rule); border-radius:4px; font:700 var(--type-caption) var(--mono); }
.help-icon { width:20px; }
html[data-theme="dark"] .help-icon { filter:invert(1); }

.routine-ledger { border-top:2px solid var(--ink); }
.routine-row { padding:16px 2px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:16px; align-items:center; border-bottom:1px solid var(--rule); }
.routine-copy strong { display:block; font-size:var(--type-emphasis); }
.routine-copy p { margin:5px 0 7px; color:var(--muted); font-size:var(--type-body); line-height:1.55; }
.routine-copy small { display:flex; align-items:flex-start; gap:7px; color:var(--moss); font-size:var(--type-caption); font-weight:700; line-height:1.45; }
.routine-copy small img { width:15px; margin-top:1px; }
html[data-theme="dark"] .routine-copy small img { filter:invert(1); }

.help-workspace-grid, .help-concept-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px; }
.help-workspace, .help-concept { padding:18px 18px 6px; display:flex; flex-direction:column; background:var(--paper); border:1px solid var(--rule); }
.help-workspace header, .help-concept header { display:flex; align-items:center; gap:10px; }
.help-workspace h3, .help-concept h3 { margin:0; flex:1 1 auto; font:600 20px/1.15 var(--serif); }
.help-workspace header .text-action { flex:none; display:flex; align-items:center; gap:6px; }
.help-workspace header .text-action img { width:14px; }
html[data-theme="dark"] .help-workspace header .text-action img { filter:invert(1); }
.help-workspace > p, .help-concept > p { flex:1 1 auto; margin:10px 0 8px; color:var(--muted); font-size:var(--type-control); line-height:1.55; }
.help-details { border-top:1px solid var(--rule); }
.help-details summary { min-height:44px; display:flex; align-items:center; gap:8px; color:var(--muted); font-size:var(--type-control); font-weight:800; cursor:pointer; list-style:none; }
.help-details summary::-webkit-details-marker { display:none; }
.help-details summary .chevron { width:15px; margin-left:auto; transition:transform .18s ease; }
.help-details[open] summary .chevron { transform:rotate(180deg); }
html[data-theme="dark"] .help-details summary img { filter:invert(1); }
.help-details-body { padding:2px 0 14px; display:grid; gap:12px; }
.help-details-body p { margin:0; font-size:var(--type-control); line-height:1.55; }
.help-detail-block small { display:block; margin-bottom:5px; color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.help-detail-block.boundary p { color:var(--clay); font-weight:600; }
.help-chips { margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px; list-style:none; }
.help-chips li { padding:5px 10px; border:1px solid var(--rule); border-radius:999px; font-size:var(--type-caption); font-weight:700; }
.help-see-also { display:flex; flex-wrap:wrap; gap:8px; }
.help-see-also button { min-height:40px; padding:0 12px; display:flex; align-items:center; gap:7px; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:7px; font-size:var(--type-control); font-weight:700; }
.help-see-also button:hover { border-color:var(--orange); }
.help-see-also button img { width:15px; }
html[data-theme="dark"] .help-see-also button img { filter:invert(1); }

.help-lede { max-width:760px; margin:2px 0 16px; color:var(--muted); font-size:var(--type-body); line-height:1.6; }
.help-keys { margin:0; border-top:2px solid var(--ink); }
.help-keys > div { min-height:52px; padding:10px 2px; display:grid; grid-template-columns:minmax(180px,250px) minmax(0,1fr); gap:16px; align-items:center; border-bottom:1px solid var(--rule); }
.help-keys dt kbd { padding:4px 9px; background:var(--paper); border:1px solid var(--rule); border-radius:5px; font:700 var(--type-caption) var(--mono); }
.help-keys dd { margin:0; font-size:var(--type-control); line-height:1.5; }
.help-trouble-list { display:grid; gap:10px; }
.help-trouble { padding:0 16px; background:var(--paper); border:1px solid var(--rule); }
.help-trouble summary { min-height:52px; }
.help-trouble summary img:first-child { width:17px; }
.help-trouble summary b { flex:1 1 auto; color:var(--ink); font-size:var(--type-emphasis); }
.help-trouble > p { margin:0; padding:0 0 16px 25px; color:var(--muted); font-size:var(--type-body); line-height:1.6; }
.help-footer { margin-top:26px; padding:22px 24px; display:flex; flex-wrap:wrap; gap:18px; align-items:center; justify-content:space-between; background:var(--paper); border:1px solid var(--rule); border-left:4px solid var(--orange); }
.help-footer > div { display:flex; gap:14px; align-items:center; }
.help-footer strong { display:block; font-size:var(--type-emphasis); }
.help-footer p { margin:4px 0 0; color:var(--muted); font-size:var(--type-control); line-height:1.5; }
.help-topic-flash { animation:help-flash 1.6s ease; }
@keyframes help-flash { 0%,60% { box-shadow:0 0 0 3px color-mix(in srgb,var(--orange) 65%,transparent); } 100% { box-shadow:0 0 0 0 transparent; } }
.context-keys > div { min-height:0; padding:8px 0; display:grid; gap:3px; }
.context-keys dt { font-weight:800; }
.context-keys dd { text-align:left; font-weight:400; color:#a8b7c4; }

@media (max-width:1100px) {
  .help-hero { grid-template-columns:1fr; }
  .help-hero-side { border-left:0; border-top:1px solid var(--rule); }
}
@media (max-width:760px) {
  .help-hero-copy, .help-hero-side { padding:18px 16px; }
  .routine-row { grid-template-columns:32px minmax(0,1fr); }
  .routine-row .row-action { grid-column:2; justify-self:start; }
  .help-workspace-grid, .help-concept-grid { grid-template-columns:1fr; }
  .help-keys > div { padding:12px 2px; grid-template-columns:1fr; gap:6px; }
  .help-footer { padding:18px 16px; }
  .help-footer .button { width:100%; justify-content:center; }
}

/* The preparing chip must obey [hidden] even though it is a flex row. */
.tour-preparing[hidden] { display:none; }

/* While the walkthrough rail is docked, wide two-column surfaces reflow to one
   column so the highlighted target stays comfortably readable beside the guide. */
@media (min-width:1181px) {
  body.tour-open .owner-desk,
  body.tour-open .lower,
  body.tour-open .record-page-grid,
  body.tour-open .record-fields-full,
  body.tour-open .record-hero,
  body.tour-open .baseline-compare,
  body.tour-open .help-hero { grid-template-columns:1fr; }
  body.tour-open .record-page-side { position:static; }
  body.tour-open .record-page-head { grid-template-columns:1fr; align-items:start; gap:18px; }
  body.tour-open .commercial-banner { grid-template-columns:1fr 1fr; }
  body.tour-open .help-hero-side { border-left:0; border-top:1px solid var(--rule); }
  body.tour-open .baseline-compare article + article { border-left:0; border-top:1px solid var(--rule); }
}

/* ===== Adversarial design review fixes (issue #64) ===== */

/* Help prose is body copy, not metadata: hold the 15px floor. */
.help-workspace > p,
.help-concept > p,
.help-details-body p,
.help-hero-side > p,
.help-footer p { font-size:.9375rem; }

/* Palette result titles read as primary text, not chrome. */
.command-result strong { font-size:.9375rem; }

/* Touch targets on the Help concept cross-links. */
.help-see-also button { min-height:44px; }

/* An expanded card must not stretch its siblings into empty shells. */
.help-workspace-grid, .help-concept-grid { align-items:start; }

/* The walkthrough map is a progress indicator, not a control. */
.tour-map li { cursor:default; }
.tour-map li:not(.done):not(.current) { background:transparent; }

/* Honest scroll affordance: a fade appears only while more content is below. */
.tour-scroll::after,
.command-results::after { content:""; display:block; position:sticky; bottom:0; height:34px; margin-top:-34px; background:linear-gradient(to bottom, transparent, var(--paper-strong)); opacity:0; pointer-events:none; transition:opacity .16s ease; }
.tour-scroll.has-more-below::after,
.command-results.has-more-below::after { opacity:1; }

/* Beside the docked walkthrough rail, Connection Studio rows stack so every
   state dimension and action stays visible while step seven teaches them. */
@media (min-width:1181px) {
  body.tour-open .connection-studio .connection-row { grid-template-columns:minmax(0,1fr); gap:12px; padding:15px 0; }
  body.tour-open .connection-studio .connection-row .client-actions { justify-content:flex-start; }
  body.tour-open .connection-legend { grid-template-columns:1fr 1fr; row-gap:10px; }
  body.tour-open .connection-filters { flex-wrap:wrap; }
}
@media (min-width:1181px) {
  body.tour-open .connection-legend > span:nth-child(2n) { border-right:0; }
  body.tour-open .connection-legend > span { border-bottom:1px solid rgba(255,255,255,.13); }
  body.tour-open .connection-legend > span:nth-child(n+3) { border-bottom:0; }
}

/* ===== Team control plane: operator lanes, pages and the Bridge pulse ===== */
.team-lanes { margin-top:20px; display:grid; gap:22px; }
.team-lane .section-title { padding-bottom:8px; }
.operator-ledger { border-top:2px solid var(--ink); }
.operator-row { min-height:76px; padding:14px 4px; display:grid; grid-template-columns:44px minmax(220px,1.4fr) minmax(200px,auto) minmax(150px,auto); gap:16px; align-items:center; border-bottom:1px solid var(--rule); cursor:pointer; }
.operator-row:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.operator-row .portrait { width:44px; height:44px; display:grid; place-items:center; color:#07182d; background:var(--orange); border-radius:9px; font-weight:800; font-size:var(--type-control); }
.operator-row .portrait.agent { color:#f7f0e3; background:var(--violet); }
.operator-copy strong { display:block; font-size:var(--type-emphasis); }
.operator-copy small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); }
.operator-copy span { display:block; margin-top:5px; color:var(--muted); font-size:var(--type-control); line-height:1.45; }
.operator-load { display:flex; gap:14px; }
.operator-load span { min-width:64px; text-align:center; padding:7px 10px; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
.operator-load span.risk { border-color:color-mix(in srgb,var(--risk) 55%,var(--rule)); }
.operator-load span.wait { border-color:color-mix(in srgb,var(--clay) 55%,var(--rule)); }
.operator-load b { display:block; font-size:var(--type-emphasis); }
.operator-load small { display:block; margin-top:1px; color:var(--muted); font-size:var(--type-caption); }
.operator-load span.risk b { color:var(--risk); }
.operator-load span.wait b { color:var(--clay); }
.operator-links, .operator-flags { display:flex; align-items:center; justify-content:flex-end; gap:12px; }
.operator-flags { flex-direction:column; align-items:flex-end; gap:6px; }
.operator-flags small { color:var(--muted); font-size:var(--type-caption); font-weight:700; }
.operator-flags small.on { color:var(--moss); }
.operator-open { display:grid; place-items:center; }

.run-events { display:grid; gap:10px; }
.run-event { padding:13px 15px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px; align-items:start; background:var(--paper); border:1px solid var(--rule); border-left:3px solid var(--navy); }
.run-event[data-record-open] { cursor:pointer; transition:border-color .16s ease, background-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.run-event[data-record-open]:hover { background:var(--paper-strong); border-color:var(--blue); transform:translateX(2px); box-shadow:0 8px 22px rgba(0,0,0,.12); }
.run-event[data-record-open]:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.run-event.risk { border-left-color:var(--risk); }
.run-event .label { margin-top:2px; }
.run-event strong { font-size:var(--type-control); }
.run-event p { margin:4px 0 5px; color:var(--muted); font-size:var(--type-control); line-height:1.5; }
.run-event small { color:var(--muted); font-size:var(--type-caption); }
.run-event a { color:var(--blue); font-weight:700; }
/* Ticket run stream: outcome banner + expandable captured console log. */
.run-banner { display:flex; gap:11px; align-items:center; padding:12px 15px; margin:0 0 12px; border:1px solid var(--rule); border-left:3px solid var(--navy); background:var(--paper); }
.run-banner svg { width:20px; height:20px; flex:none; }
.run-banner strong { display:block; font-size:var(--type-control); }
.run-banner small { color:var(--muted); font-size:var(--type-caption); }
.run-banner.live { border-left-color:var(--orange); }
.run-banner.live svg { color:var(--orange); animation:run-spin 1.1s linear infinite; }
.run-banner.done { border-left-color:var(--good,#2f9e44); }
.run-banner.done svg { color:var(--good,#2f9e44); }
.run-banner.risk { border-left-color:var(--risk); }
.run-banner.risk svg { color:var(--risk); }
@keyframes run-spin { to { transform:rotate(360deg); } }
.run-log-details { margin-top:12px; border:1px solid var(--rule); background:var(--paper); }
.run-log-details > summary { cursor:pointer; padding:10px 14px; display:flex; gap:8px; align-items:center; font-size:var(--type-control); font-weight:700; color:var(--ink); list-style:none; }
.run-log-details > summary::-webkit-details-marker { display:none; }
.run-log-details > summary svg { width:16px; height:16px; }
.run-log-details[open] > summary { border-bottom:1px solid var(--rule); }
.run-log-pre { margin:0; padding:12px 14px; max-height:360px; overflow:auto; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; line-height:1.55; white-space:pre-wrap; word-break:break-word; color:var(--muted); }
.run-log-note { display:flex; gap:8px; align-items:flex-start; margin-top:10px; }
.run-log-note svg { width:15px; height:15px; flex:none; margin-top:2px; }

/* ===== Agent monitor (Phase 8) =======================================
   Restrained, meaningful motion only: a live pulse, an animated active
   edge and a progress sweep, always paired with a color + fixed Lucide
   icon + text label. prefers-reduced-motion below strips every keyframe
   and swaps in a static, high-contrast "Live" indicator. */
.monitor-strip { margin-top:20px; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--rule); background:var(--paper-strong); }
.monitor-count { min-height:80px; padding:14px 16px; border-right:1px solid var(--rule); }
.monitor-count:last-child { border-right:0; }
.monitor-count b { display:block; font:600 26px/1.1 var(--serif); }
.monitor-count small { margin-top:8px; display:flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.monitor-count small img { width:14px; height:14px; flex:none; opacity:.85; }
.monitor-count.live b, .monitor-count.live small { color:var(--violet); }
.monitor-count.done b, .monitor-count.done small { color:var(--moss); }
.monitor-count.risk b, .monitor-count.risk small { color:var(--risk); }
.monitor-count.quiet b, .monitor-count.quiet small { color:var(--muted); }
html[data-theme="dark"] .monitor-count small img { filter:invert(1); }

.monitor-board { border-top:2px solid var(--ink); }
.monitor-row { position:relative; min-height:84px; padding:14px 18px 14px 20px; display:grid; grid-template-columns:44px minmax(190px,1.1fr) minmax(170px,auto) minmax(220px,1.3fr) 148px; gap:16px; align-items:center; border-bottom:1px solid var(--rule); overflow:hidden; cursor:pointer; }
.monitor-row:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.monitor-row.is-live { background:color-mix(in srgb,var(--violet) 6%,var(--paper-strong)); box-shadow:inset 4px 0 0 var(--violet); }
.monitor-row.is-live::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background:linear-gradient(90deg, transparent, color-mix(in srgb,var(--violet) 75%,transparent), transparent); transform:translateX(-100%); animation:monitor-sweep 2.4s linear infinite; }
@keyframes monitor-sweep { to { transform:translateX(100%); } }
/* Halted rows need a decision and must be unmistakable at a glance (the VI
   owner reads by colour+border, never colour alone): risk-red left edge and a
   faint red wash. Done rows carry a calm moss edge so a finished run never
   competes with a halted one for attention. */
.monitor-row.status-halted { background:color-mix(in srgb,var(--risk) 6%,var(--paper-strong)); box-shadow:inset 4px 0 0 var(--risk); }
.monitor-row.status-done { box-shadow:inset 4px 0 0 color-mix(in srgb,var(--moss) 70%,transparent); }
.monitor-identity strong { display:block; font-size:var(--type-emphasis); }
.monitor-identity small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); }
.monitor-identity .label, .monitor-identity .state { margin-top:6px; }
.monitor-work { display:grid; gap:6px; }
.monitor-work > div { display:flex; align-items:baseline; gap:8px; }
.mono-label { flex:none; color:var(--muted); font-family:var(--mono); font-size:var(--type-caption); font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.mono-value { font-family:var(--mono); font-size:var(--type-control); font-variant-numeric:tabular-nums; }
.mono-value.muted { color:var(--muted); }
button.mono-value { padding:0; color:var(--blue); background:transparent; border:0; font-weight:700; cursor:pointer; }
.monitor-event { min-width:0; }
.monitor-event span { display:block; font-size:var(--type-control); font-weight:700; }
.monitor-event p { margin:4px 0 0; color:var(--muted); font-size:var(--type-caption); line-height:1.5; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.monitor-live { display:flex; flex-direction:column; align-items:flex-end; gap:6px; text-align:right; }
.live-indicator { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:8px; font-size:var(--type-caption); font-weight:800; }
.live-indicator img { width:14px; height:14px; flex:none; }
.live-indicator b { font-weight:800; }
.live-indicator.live { color:var(--violet); background:color-mix(in srgb,var(--violet) 14%,transparent); }
.live-indicator.halted { color:var(--risk); background:color-mix(in srgb,var(--risk) 14%,transparent); }
.live-indicator.done { color:var(--moss); background:color-mix(in srgb,var(--moss) 14%,transparent); }
.live-indicator.quiet { color:var(--muted); background:color-mix(in srgb,var(--muted) 12%,transparent); }
.live-indicator.halted .live-dot { background:var(--risk); }
.live-indicator.done .live-dot { background:var(--moss); }
html[data-theme="dark"] .live-indicator img { filter:invert(1); }
.live-dot { width:8px; height:8px; flex:none; border-radius:50%; background:var(--muted); }
.live-indicator.live .live-dot { background:var(--violet); animation:monitor-pulse 1.8s ease-in-out infinite; }
@keyframes monitor-pulse { 0%,100% { box-shadow:0 0 0 0 color-mix(in srgb,var(--violet) 55%,transparent); } 50% { box-shadow:0 0 0 5px color-mix(in srgb,var(--violet) 0%,transparent); } }
.monitor-live small { color:var(--muted); font-size:var(--type-caption); }
/* Wave A item 6: Dry run sits beside Prepare run in the roster row. */
.monitor-live-actions { margin-top:8px; display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.monitor-live-actions .button { margin-top:0; white-space:nowrap; }

@media (prefers-reduced-motion:reduce) {
  .monitor-row.is-live::after { display:none; }
  .live-indicator.live .live-dot { animation:none; width:10px; height:10px; box-shadow:0 0 0 2px color-mix(in srgb,var(--violet) 65%,transparent); }
}

@media (max-width:1180px) {
  .monitor-row { grid-template-columns:40px minmax(0,1fr) minmax(0,1fr); }
  .monitor-event { grid-column:2 / span 2; }
  .monitor-live { grid-column:2 / span 2; flex-direction:row; align-items:center; justify-content:flex-start; }
  .monitor-live-actions { margin-top:0; margin-left:auto; justify-content:flex-start; }
}

@media (max-width:760px) {
  .monitor-strip { grid-template-columns:1fr 1fr; }
  .monitor-count:nth-child(2) { border-right:0; }
  .monitor-count:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .monitor-row { grid-template-columns:36px minmax(0,1fr); row-gap:10px; padding:14px; }
  .monitor-work, .monitor-event, .monitor-live { grid-column:2; }
  .monitor-live { flex-direction:row; align-items:center; justify-content:flex-start; }
  .monitor-live-actions { margin-left:0; }
}

/* ---- Dispatch (Phase 9) ------------------------------------------------- */
.dispatch-boundary { margin:16px 0 0; display:flex; gap:12px; align-items:flex-start; padding:14px 16px; background:color-mix(in srgb,var(--violet) 7%,var(--paper-strong)); border:1px solid var(--rule); border-left:4px solid var(--violet); }
.dispatch-boundary img { width:18px; height:18px; flex:none; margin-top:1px; }
html[data-theme="dark"] .dispatch-boundary img { filter:invert(1); }
.dispatch-boundary p { margin:0; font-size:var(--type-body); line-height:1.5; }
.dispatch-boundary b { font-weight:700; }
.dispatch-strip { margin-top:16px; }

.dispatch-ready { display:grid; gap:16px; }
.dispatch-group { border:1px solid var(--rule); background:var(--paper-strong); }
.dispatch-group-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 16px; border-bottom:2px solid var(--ink); flex-wrap:wrap; }
.dispatch-group-tools { display:inline-flex; align-items:center; gap:14px; }
.count-flat { color:var(--muted); font:700 var(--type-caption) var(--mono); text-transform:uppercase; letter-spacing:.04em; }
.dispatch-row { min-height:78px; padding:14px 16px; display:grid; grid-template-columns:40px minmax(0,1.5fr) minmax(150px,auto) auto; gap:16px; align-items:center; border-bottom:1px solid var(--rule); }
.dispatch-row:last-child { border-bottom:0; }
.dispatch-row:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.dispatch-identity { min-width:0; display:flex; flex-direction:column; gap:4px; }
.dispatch-identity > strong { font-size:var(--type-emphasis); line-height:1.3; }
.dispatch-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.pill-flat { padding:2px 7px; border:1px solid var(--rule); border-radius:5px; color:var(--muted); font:700 var(--type-caption) var(--mono); text-transform:uppercase; letter-spacing:.03em; }
.type-chip.mini { padding:2px 7px; font-size:var(--type-caption); }
.dispatch-branch { min-width:0; display:flex; flex-direction:column; gap:3px; }
.dispatch-go { white-space:nowrap; }

.dispatch-flight { border-top:2px solid var(--ink); }
.dispatch-flight-row { position:relative; min-height:70px; padding:12px 16px 12px 18px; display:grid; grid-template-columns:40px minmax(0,1.2fr) minmax(160px,1fr) 168px; gap:16px; align-items:center; border-bottom:1px solid var(--rule); overflow:hidden; }
.dispatch-flight-row:last-child { border-bottom:0; }
.dispatch-flight-row.is-live { background:color-mix(in srgb,var(--violet) 6%,var(--paper-strong)); box-shadow:inset 4px 0 0 var(--violet); }
.dispatch-flight-row.status-halted { background:color-mix(in srgb,var(--risk) 6%,var(--paper-strong)); box-shadow:inset 4px 0 0 var(--risk); }
.dispatch-flight-row.status-dispatched { box-shadow:inset 4px 0 0 color-mix(in srgb,var(--clay) 70%,transparent); }
.dispatch-flight-row.is-live::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--violet) 75%,transparent),transparent); transform:translateX(-100%); animation:monitor-sweep 2.4s linear infinite; }
.dispatch-flight-state { display:flex; flex-direction:column; align-items:flex-end; gap:6px; text-align:right; }
.dispatch-flight-state small { color:var(--muted); font-size:var(--type-caption); }

.dispatch-log-row { padding:12px 14px; display:grid; grid-template-columns:minmax(120px,auto) minmax(0,1fr) minmax(0,1.4fr) auto auto; gap:12px; align-items:center; border-bottom:1px solid var(--rule); }
.dispatch-log-row:last-child { border-bottom:0; }
.dispatch-log-row span { font-size:var(--type-caption); }
.dispatch-log-row .mono-value { font-family:var(--mono); }
.dispatch-log-row .dim { color:var(--muted); }
.dispatch-log-row time { color:var(--muted); font:600 var(--type-caption) var(--mono); white-space:nowrap; }

/* Dispatch brief inside the confirm dialog */
.confirm-detail { margin:4px 0 14px; }
/* Dispatch brief: the canonical card language (matches the dispatch dry-run
   widgets), lighter than the old heavy-bar blocks, with linked ticket ids. */
.dispatch-brief { display:grid; gap:9px; max-height:54vh; overflow:auto; padding:2px; }
.brief-top { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.brief-branch { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:.72rem; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.brief-branch img { width:12px; height:12px; flex:none; }
html[data-theme="dark"] .brief-branch img { filter:invert(1); }
.brief-card { padding:10px 12px; border:1px solid var(--rule); border-radius:9px; background:var(--paper-strong); }
.brief-card-head { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:.7rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.brief-card-head img { width:13px; height:13px; }
html[data-theme="dark"] .brief-card-head img { filter:invert(1); }
.brief-card p { margin:6px 0 0; font-size:var(--type-control); line-height:1.55; color:var(--ink); }
.brief-list { margin:7px 0 0; padding-left:16px; display:grid; gap:5px; }
.brief-list li { font-size:var(--type-control); line-height:1.5; color:var(--ink); }
.brief-split { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.brief-card.own { border-left:3px solid var(--moss); }
.brief-card.avoid { border-left:3px solid var(--risk); }
.brief-ticket { display:inline-flex; align-items:center; gap:3px; color:var(--orange); font-weight:700; text-decoration:none; }
.brief-ticket:hover { text-decoration:underline; }
.brief-ticket img { width:11px; height:11px; }
html[data-theme="dark"] .brief-ticket img { filter:invert(1); }
@media (max-width:640px) { .brief-split { grid-template-columns:1fr; } }

/* ---- Owner orchestration: a compact editorial ledger inside Agents ------- */
.orchestration-section { border-top:3px solid var(--orange); }
.orchestration-section .section-title { align-items:end; }
.orchestration-summary { display:flex; flex-wrap:wrap; gap:8px 18px; margin:12px 0; color:var(--muted); font-size:var(--type-control); }
.orchestration-summary span { display:inline-flex; align-items:baseline; gap:5px; }
.orchestration-summary b { color:var(--ink); font:700 var(--type-emphasis) var(--mono); }
.orchestration-filter { display:flex; align-items:center; gap:8px; margin:0 0 10px; color:var(--muted); font-size:var(--type-control); font-weight:700; }
.orchestration-filter img { width:16px; height:16px; flex:none; }
.orchestration-filter select { min-height:44px; min-width:208px; padding:0 34px 0 12px; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:6px; font:700 var(--type-control) var(--sans); }
.orchestration-ledger { border-top:2px solid var(--ink); }
.orchestration-item { border-bottom:1px solid var(--rule); background:transparent; }
.orchestration-item > summary { min-height:76px; padding:13px 2px; display:grid; grid-template-columns:minmax(138px,.78fr) minmax(0,1.7fr) auto auto; gap:14px; align-items:center; list-style:none; cursor:pointer; }
.orchestration-item > summary::-webkit-details-marker { display:none; }
.orchestration-item > summary:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.orchestration-type { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:var(--type-caption); font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.orchestration-type img { width:16px; height:16px; flex:none; }
.orchestration-item-copy { min-width:0; display:grid; gap:4px; }
.orchestration-item-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--type-control); }
.orchestration-item-copy small { overflow:hidden; color:var(--muted); font-size:var(--type-caption); line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.orchestration-age { color:var(--muted); font:700 var(--type-caption) var(--mono); white-space:nowrap; }
.orchestration-detail { display:grid; gap:14px; padding:0 16px 16px 16px; margin-left:0; border-left:3px solid color-mix(in srgb,var(--orange) 60%,transparent); }
.orchestration-metadata { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }
.orchestration-metadata div { display:grid; gap:3px; }
.orchestration-metadata dt { color:var(--muted); font-size:var(--type-caption); font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.orchestration-metadata dd { min-width:0; margin:0; color:var(--ink); font-size:var(--type-control); overflow-wrap:anywhere; }
.orchestration-metadata dd small { display:block; margin-top:3px; color:var(--muted); font:600 var(--type-caption) var(--mono); }
.orchestration-metadata a { color:var(--blue); font-weight:800; }
.orchestration-blocker { display:flex; align-items:flex-start; gap:8px; margin:0; color:var(--ink); font-size:var(--type-control); line-height:1.5; }
.orchestration-blocker img { width:17px; height:17px; flex:none; margin-top:3px; }
.orchestration-reasons { padding:11px 12px; background:color-mix(in srgb,var(--clay) 7%,var(--paper-strong)); border-left:3px solid var(--clay); }
.orchestration-reasons b { display:block; font-size:var(--type-caption); text-transform:uppercase; letter-spacing:.04em; }
.orchestration-reasons ul { margin:7px 0 0; padding-left:18px; display:grid; gap:4px; color:var(--muted); }
.orchestration-reasons li { font-size:var(--type-control); line-height:1.45; }
.orchestration-actions { display:flex; flex-wrap:wrap; gap:8px; }
.orchestration-unavailable { margin:12px 0 0; color:var(--muted); font-size:var(--type-control); }
.orchestration-private-test { margin-top:14px; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.orchestration-private-test > summary { min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; color:var(--ink); font-size:var(--type-control); font-weight:800; }
.orchestration-private-test > summary::-webkit-details-marker { display:none; }
.orchestration-private-test > summary > span { display:inline-flex; align-items:center; gap:8px; }
.orchestration-private-test > summary img { width:17px; height:17px; flex:none; }
.orchestration-private-test > summary small { color:var(--muted); font:700 var(--type-caption) var(--mono); text-align:right; }
.orchestration-private-body { display:grid; gap:12px; padding:0 0 14px; }
.orchestration-private-body > p { margin:0; max-width:68ch; color:var(--muted); font-size:var(--type-control); line-height:1.5; }
.orchestration-private-actions { display:flex; flex-wrap:wrap; gap:8px; }
.orchestration-private-ledger { border-top:1px solid var(--rule); }
.orchestration-private-ledger article { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--rule); }
.orchestration-private-ledger article:last-child { border-bottom:0; }
.orchestration-private-ledger strong, .orchestration-private-ledger small { display:block; }
.orchestration-private-ledger strong { font-size:var(--type-control); }
.orchestration-private-ledger small { margin-top:3px; color:var(--muted); font-size:var(--type-caption); }
html[data-theme="dark"] .orchestration-private-test img { filter:invert(1); }
html[data-theme="dark"] .orchestration-filter img, html[data-theme="dark"] .orchestration-type img, html[data-theme="dark"] .orchestration-blocker img { filter:invert(1); }
@media (max-width:900px) {
  .orchestration-item > summary { grid-template-columns:minmax(130px,.85fr) minmax(0,1.6fr) auto; }
  .orchestration-age { grid-column:2 / -1; }
}
@media (max-width:640px) {
  .orchestration-section .section-title { display:block; }
  .orchestration-section .section-title p { display:block; margin-top:6px; }
  .orchestration-filter { align-items:flex-start; flex-wrap:wrap; }
  .orchestration-filter select { width:100%; min-width:0; }
  .orchestration-item > summary { grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; padding:14px 0; }
  .orchestration-type { grid-column:1; }
  .orchestration-item-copy { grid-column:1 / -1; }
  .orchestration-item-copy strong, .orchestration-item-copy small { white-space:normal; }
  .orchestration-age { grid-column:1; }
  .orchestration-detail { padding:0 0 15px 13px; }
  .orchestration-metadata { grid-template-columns:1fr; gap:10px; }
  .orchestration-actions .button { width:100%; justify-content:flex-start; white-space:normal; }
  .orchestration-private-test > summary { align-items:flex-start; padding:14px 0; }
  .orchestration-private-test > summary small { text-align:left; }
  .orchestration-private-actions .button, .orchestration-private-ledger .row-action { width:100%; justify-content:flex-start; white-space:normal; }
  .orchestration-private-ledger article { display:grid; grid-template-columns:1fr; }
}

@media (max-width:1180px) {
  .dispatch-row { grid-template-columns:40px minmax(0,1fr); }
  .dispatch-branch { grid-column:2; }
  .dispatch-go { grid-column:2; justify-self:start; }
  .dispatch-flight-row { grid-template-columns:40px minmax(0,1fr); }
  .dispatch-flight-row .dispatch-branch, .dispatch-flight-state { grid-column:2; }
  .dispatch-flight-state { flex-direction:row; align-items:center; justify-content:flex-start; }
  .dispatch-log-row { grid-template-columns:minmax(0,1fr) auto; row-gap:6px; }
}

@media (max-width:760px) {
  .dispatch-strip { grid-template-columns:1fr 1fr; }
  .dispatch-strip .monitor-count:nth-child(2) { border-right:0; }
  .dispatch-strip .monitor-count:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .dispatch-brief-split { grid-template-columns:1fr; }
  .dispatch-brief { max-height:52vh; }
}

/* ---- Front-load wave (P5; Wave A compacted the prose wall into one row -
   see the renderWavesFrontLoad comment in atlas.js) ---------------------- */
.front-load-section { margin-top:16px; padding:14px 18px; background:color-mix(in srgb,var(--orange) 5%,var(--paper-strong)); border:1px solid var(--rule); border-left:4px solid var(--orange); }
.front-load-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.front-load-title { margin:0; flex:none; font:600 20px var(--serif); }
.front-load-stats { display:flex; align-items:center; gap:16px; margin-right:auto; flex-wrap:wrap; }
.fl-stat { display:flex; align-items:baseline; gap:6px; white-space:nowrap; }
.fl-stat b { font-size:17px; color:var(--ink); }
.fl-stat small { color:var(--muted); font-size:var(--type-caption); }
.front-load-info { margin-top:10px; border-top:1px solid var(--rule); }
.front-load-info > summary { min-height:36px; padding-top:8px; display:flex; align-items:center; gap:7px; color:var(--muted); font-size:var(--type-caption); font-weight:700; cursor:pointer; list-style:none; }
.front-load-info > summary::-webkit-details-marker { display:none; }
.front-load-info > summary img { width:14px; height:14px; flex:none; }
.front-load-info > summary .chevron { width:14px; height:14px; margin-left:auto; transition:transform .15s ease; }
.front-load-info[open] > summary .chevron { transform:rotate(180deg); }
html[data-theme="dark"] .front-load-info > summary img { filter:invert(1); }
.front-load-lede { margin:10px 0 12px; max-width:74ch; font-size:var(--type-control); line-height:1.5; }
.front-load-routing { display:flex; align-items:flex-start; gap:8px; margin:0; max-width:74ch; color:var(--muted); font-size:var(--type-caption); line-height:1.45; }
.front-load-routing img { width:16px; height:16px; flex:none; margin-top:2px; }
.front-load-routing strong { color:var(--ink); }
html[data-theme="dark"] .front-load-routing img { filter:invert(1); }
.front-load-note { display:flex; align-items:center; gap:7px; margin:12px 0 0; font-size:var(--type-caption); color:var(--muted); }
.front-load-note img { width:14px; height:14px; flex:none; }
html[data-theme="dark"] .front-load-note img { filter:invert(1); }

/* ---- Calendar (P9; Wave A reduced text tiers + added the concise-list
   toggle and event-record routing - see renderCalendar in atlas.js) ----- */
.cal-rhythm-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.cal-rhythm { padding:14px 16px; background:var(--paper-strong); border:1px solid var(--rule); border-left:3px solid var(--blue); }
.cal-rhythm-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.cal-rhythm-head strong { font-size:var(--type-control); }
.cal-rhythm-head img { width:16px; height:16px; flex:none; }
html[data-theme="dark"] .cal-rhythm-head img { filter:invert(1); }
.cal-rhythm p { margin:0; font-size:var(--type-control); line-height:1.5; color:var(--muted); }
.cal-timeline { border-top:2px solid var(--ink); }
.cal-milestone { display:grid; grid-template-columns:112px 1fr; gap:16px; padding:16px 4px; border-bottom:1px solid var(--rule); }
.cal-milestone:last-child { border-bottom:0; }
.cal-milestone.is-past { opacity:.55; }
.cal-date { text-align:right; }
.cal-date b { display:block; font:600 17px/1.1 var(--serif); }
.cal-date em { display:block; margin-top:4px; font:700 var(--type-caption) var(--mono); font-style:normal; color:var(--orange); }
.cal-milestone.is-past .cal-date em { color:var(--muted); }
.cal-body strong { display:block; margin:6px 0 4px; font-size:var(--type-control); }
.cal-body p { margin:0; max-width:78ch; font-size:var(--type-control); line-height:1.5; color:var(--muted); }
.cal-kind { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:6px; font-size:var(--type-caption); font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.cal-kind img { width:13px; height:13px; flex:none; }
html[data-theme="dark"] .cal-kind img { filter:invert(1); }
.cal-kind.gate { color:var(--moss); background:color-mix(in srgb,var(--moss) 14%,transparent); }
.cal-kind.ceiling { color:var(--clay); background:color-mix(in srgb,var(--clay) 16%,transparent); }
/* Calendar cards open the event's own record page: clickable + keyboard-focusable. */
.cal-rhythm, .cal-milestone { cursor:pointer; transition:border-color .12s ease, background-color .12s ease; }
.cal-rhythm:hover { border-color:var(--orange); }
.cal-milestone:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.cal-rhythm:focus-visible, .cal-milestone:focus-visible { outline:3px solid var(--orange); outline-offset:2px; }
.cal-open-hint { display:inline-flex; align-items:center; gap:5px; margin-top:9px; color:var(--orange); font-size:var(--type-caption); font-weight:800; }
.cal-open-hint img { width:13px; height:13px; }
html[data-theme="dark"] .cal-open-hint img { filter:invert(1); }
/* Concise-list toggle: one line per event, denser than the card views
   above. Shares the .cal-kind pill and mono timestamp convention. */
.calendar-density-toggle { justify-self:end; }
.cal-concise-list { display:flex; flex-direction:column; background:var(--paper-strong); border:1px solid var(--rule); }
.cal-concise-row { min-height:44px; padding:8px 14px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; border-bottom:1px solid var(--rule); cursor:pointer; }
.cal-concise-row:last-child { border-bottom:0; }
.cal-concise-row:hover { background:color-mix(in srgb,var(--orange) 5%,transparent); }
.cal-concise-row:focus-visible { outline:3px solid var(--orange); outline-offset:-2px; }
.cal-concise-row.is-past { opacity:.55; }
.cal-concise-row strong { flex:1 1 auto; min-width:0; font-size:var(--type-control); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-concise-when { flex:none; color:var(--muted); font-size:var(--type-caption); }
.cal-concise-row .row-chevron { width:14px; height:14px; flex:none; opacity:.6; }
html[data-theme="dark"] .cal-concise-row .row-chevron { filter:invert(1); }
@media (max-width:760px) {
  .cal-rhythm-grid { grid-template-columns:1fr; }
  .cal-milestone { grid-template-columns:1fr; gap:6px; }
  .cal-date { display:flex; align-items:baseline; gap:10px; text-align:left; }
  .cal-date b { font-size:16px; }
  .cal-concise-row { flex-wrap:wrap; }
}

/* ---- Agents control plane (unifies Monitor + Dispatch) ----------------- */
.agents-glance { grid-template-columns:repeat(5,1fr); }
.monitor-count.ready b, .monitor-count.ready small { color:var(--orange); }
.agents-kickoff { margin-top:16px; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:16px 18px; background:color-mix(in srgb,var(--orange) 5%,var(--paper-strong)); border:1px solid var(--rule); border-left:4px solid var(--orange); }
.kickoff-copy { min-width:0; }
.kickoff-copy strong { display:block; margin:2px 0 4px; font-size:var(--type-emphasis); }
.kickoff-copy p { margin:0; max-width:62ch; font-size:var(--type-caption); color:var(--muted); line-height:1.5; }
.kickoff-actions { display:flex; gap:10px; flex:none; flex-wrap:wrap; }
.kickoff-note { display:flex; align-items:center; gap:7px; margin:10px 0 0; width:100%; font-size:var(--type-caption); color:var(--muted); }
.kickoff-note img { width:14px; height:14px; flex:none; }
html[data-theme="dark"] .kickoff-note img { filter:invert(1); }
.auto-run-chip { display:inline-flex; align-items:center; gap:5px; margin-top:6px; padding:2px 8px; border-radius:6px; font-size:var(--type-caption); font-weight:700; color:var(--violet); background:color-mix(in srgb,var(--violet) 14%,transparent); }
.auto-run-chip img { width:12px; height:12px; flex:none; }
html[data-theme="dark"] .auto-run-chip img { filter:invert(1); }
.live-indicator.ready { color:var(--orange); background:color-mix(in srgb,var(--orange) 14%,transparent); }
.live-indicator.ready .live-dot { background:var(--orange); }
.agent-row.status-ready { box-shadow:inset 4px 0 0 color-mix(in srgb,var(--orange) 70%,transparent); }
.monitor-live .agent-kick { margin-top:8px; white-space:nowrap; }
.hist-controls { display:flex; align-items:center; gap:12px; padding:12px 0; flex-wrap:wrap; }
.hist-search { display:inline-flex; align-items:center; gap:8px; flex:1; min-width:220px; padding:8px 12px; border:1px solid var(--rule); background:var(--paper); }
.hist-search img { width:15px; height:15px; flex:none; opacity:.7; }
html[data-theme="dark"] .hist-search img { filter:invert(1); }
.hist-search input { flex:1; border:0; background:transparent; color:var(--ink); font-size:max(16px,var(--type-control)); outline:none; }
@media (max-width:900px) {
  .agents-glance { grid-template-columns:1fr 1fr 1fr; }
  .agents-kickoff { flex-direction:column; }
}
@media (max-width:600px) {
  .agents-glance { grid-template-columns:1fr 1fr; }
}

.operator-record .operator-hero dl { grid-template-columns:repeat(3,minmax(0,1fr)); }
.operator-tickets { display:grid; gap:8px; }
.operator-ticket { min-height:48px; padding:9px 13px; display:flex; align-items:center; gap:12px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:8px; text-decoration:none; }
.operator-ticket:hover { border-color:var(--orange); }
.operator-ticket .mono { color:var(--blue); font-size:var(--type-caption); flex:none; }
.operator-ticket b { flex:1 1 auto; min-width:0; font-size:var(--type-control); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.operator-ticket em { flex:none; color:var(--risk); font-size:var(--type-caption); font-style:normal; font-weight:800; }
.operator-ticket.blocked { border-left:3px solid var(--risk); }
.operator-ticket img { width:14px; flex:none; opacity:.7; }
html[data-theme="dark"] .operator-ticket img { filter:invert(1); }
.operator-outbox { display:grid; gap:10px; }
.operator-outbox article { padding:12px 14px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; background:var(--paper); border:1px solid var(--rule); border-left:3px solid var(--moss); }
.operator-outbox article.failed { border-left-color:var(--clay); }
.operator-outbox strong { font-size:var(--type-control); }
.operator-outbox p { margin:4px 0 5px; color:var(--muted); font-size:var(--type-control); line-height:1.5; }
.operator-outbox small { color:var(--muted); font-size:var(--type-caption); overflow-wrap:anywhere; }
.operator-authority { margin:10px 0 0; padding:0; list-style:none; display:grid; gap:8px; }
.operator-authority li { display:flex; gap:9px; align-items:flex-start; font-size:var(--type-control); line-height:1.5; }
.operator-authority img { width:15px; margin-top:2px; flex:none; }
html[data-theme="dark"] .operator-authority img { filter:invert(1); }
.operator-stop { margin-top:14px; padding:12px 14px; background:var(--paper); border:1px solid var(--rule); border-left:3px solid var(--clay); }
.operator-stop small { display:block; color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.operator-stop strong { display:block; margin-top:5px; font-size:var(--type-control); line-height:1.5; }

.team-pulse { margin-top:24px; padding-bottom:4px; border-top:2px solid var(--ink); }
.pulse-strip { display:flex; gap:9px; overflow-x:auto; padding:4px 2px 10px; scrollbar-width:thin; }
.pulse-chip { flex:none; min-height:56px; padding:8px 13px 8px 9px; display:flex; align-items:center; gap:10px; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:10px; text-align:left; }
.pulse-chip:hover { border-color:var(--orange); }
.pulse-chip > b { width:34px; height:34px; flex:none; display:grid; place-items:center; color:#07182d; background:var(--orange); border-radius:8px; font-size:var(--type-caption); font-weight:800; }
.pulse-chip.agent > b { color:#f7f0e3; background:var(--violet); }
.pulse-chip strong { display:block; font-size:var(--type-control); }
.pulse-chip small { display:block; margin-top:1px; color:var(--muted); font-size:var(--type-caption); }
.pulse-chip em { flex:none; margin-left:4px; padding:3px 9px; border-radius:999px; font-size:var(--type-caption); font-style:normal; font-weight:800; }
.pulse-chip em.risk { color:var(--risk); background:color-mix(in srgb,var(--risk) 14%,transparent); }
.pulse-chip em.wait { color:var(--clay); background:color-mix(in srgb,var(--clay) 14%,transparent); }
.pulse-halts { display:flex; gap:9px; align-items:flex-start; padding:9px 2px 12px; color:var(--muted); font-size:var(--type-control); line-height:1.5; }
.pulse-halts img { width:16px; margin-top:2px; flex:none; }
html[data-theme="dark"] .pulse-halts img { filter:invert(1); }
.pulse-halts strong { color:var(--ink); }

@media (max-width:900px) {
  .operator-row { grid-template-columns:44px minmax(0,1fr); row-gap:10px; }
  .operator-load, .operator-links, .operator-flags { grid-column:2; justify-content:flex-start; align-items:flex-start; flex-direction:row; flex-wrap:wrap; }
  .operator-record .operator-hero dl { grid-template-columns:1fr; }
}

/* ===== Deploy-hardening UI pass: five states, zones, needs-you stream ===== */

/* Done joins risk/wait as a first-class chip tone. */
.label.done { color:var(--moss); background:color-mix(in srgb,var(--moss) 12%,transparent); border-color:color-mix(in srgb,var(--moss) 45%,var(--rule)); }
.spine-dot.done { background:var(--moss); }
.gate-icon.done { color:var(--moss); }

/* Needs-you: the one owner stream, always a glance away. */
.needs-you { min-height:44px; padding:5px 13px 5px 8px; display:flex; align-items:center; gap:10px; color:var(--ink); background:transparent; border:1px solid var(--rule); border-radius:9px; text-align:left; }
.needs-you:hover { border-color:var(--orange); }
.needs-you .needs-count { min-width:26px; height:26px; display:grid; place-items:center; color:#07182d; background:var(--orange); border-radius:7px; font-size:var(--type-caption); font-style:normal; font-weight:800; }
.needs-you b { display:block; font-size:var(--type-control); }
.needs-you small { display:block; margin-top:1px; color:var(--muted); font-size:var(--type-caption); }
.needs-you.stale small { color:var(--clay); font-weight:700; }
.needs-dialog { width:min(560px,calc(100vw - 32px)); }
/* Agent detail modal: quick read-only look, real reported data only. */
.agent-detail-dialog { width:min(560px,calc(100vw - 32px)); }
.agent-detail-body { max-height:calc(82vh - 130px); overflow:auto; -webkit-overflow-scrolling:touch; }
.agent-detail-hero { display:flex; align-items:center; gap:12px; padding:16px 0 4px; }
.agent-detail-hero p { margin:0; color:var(--ink); font-size:var(--type-body); line-height:1.5; }
.agent-detail-section { padding:15px 0; border-top:1px solid var(--rule); }
.agent-detail-section:first-of-type { border-top:0; }
.agent-detail-section > .overline { display:block; margin-bottom:9px; }
.agent-detail-section > p { margin:0; color:var(--ink); font-size:var(--type-body); line-height:1.55; }
.agent-detail-body .operator-tickets { display:flex; flex-direction:column; gap:7px; }
.agent-detail-body .run-events { display:flex; flex-direction:column; gap:9px; }
.agent-detail-body .dialog-actions { margin-top:6px; }
/* Calendar event detail modal (A5). */
.event-detail-dialog { width:min(600px,calc(100vw - 32px)); }
.event-detail-body { max-height:calc(82vh - 130px); overflow:auto; -webkit-overflow-scrolling:touch; }
.event-detail-hero { display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding:16px 0 6px; }
.event-meta { display:flex; gap:22px; margin:0; flex-wrap:wrap; }
.event-meta dt { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.event-meta dd { margin:3px 0 0; color:var(--ink); font-size:var(--type-control); font-weight:700; }
.event-detail-section { padding:15px 0; border-top:1px solid var(--rule); }
.event-detail-section > .overline { display:block; margin-bottom:9px; }
.event-detail-section > p { margin:0; color:var(--ink); font-size:var(--type-body); line-height:1.6; }
.event-gate-stats { display:flex; gap:10px; margin-bottom:11px; }
.event-gate-stats span { flex:1; padding:9px 12px; border:1px solid var(--rule); border-radius:8px; background:var(--paper); text-align:center; }
.event-gate-stats b { display:block; font-size:20px; color:var(--ink); font-family:var(--mono); }
.event-gate-stats small { display:block; margin-top:2px; color:var(--muted); font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; }
.event-gate-stats span.risk b { color:var(--risk); }
.event-detail-body .operator-tickets { display:flex; flex-direction:column; gap:7px; }
.event-detail-body .dialog-actions { margin-top:6px; }
/* Operator record: real project channels (Comms) and repos + Drive (Documents). */
.comms-dm { display:inline-flex; align-items:center; gap:7px; text-decoration:none; }
.comms-dm-note { margin:9px 0 0; font-size:var(--type-caption); }
.channel-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:8px; }
.channel-chip { display:flex; align-items:center; gap:9px; padding:10px 12px; border:1px solid var(--rule); border-radius:9px; background:var(--paper-strong); color:var(--ink); text-decoration:none; transition:border-color .12s ease; }
.channel-chip:hover { border-color:var(--orange); }
.channel-chip > img:first-child { width:16px; height:16px; flex:none; }
.channel-chip span { flex:1; min-width:0; }
.channel-chip strong { display:block; font-size:var(--type-caption); }
.channel-chip small { display:block; margin-top:1px; color:var(--muted); font-size:.7rem; }
.channel-chip > img:last-child { width:13px; height:13px; flex:none; opacity:.6; }
html[data-theme="dark"] .channel-chip img { filter:invert(1); }
.doc-group { margin-bottom:14px; }
.doc-group:last-child { margin-bottom:0; }
.doc-label { display:inline-flex; align-items:center; gap:7px; margin-bottom:8px; color:var(--muted); font-size:.72rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.doc-label img { width:14px; height:14px; }
html[data-theme="dark"] .doc-label img { filter:invert(1); }
.doc-list { display:flex; flex-direction:column; gap:7px; }
.doc-item { display:flex; align-items:center; gap:9px; padding:10px 12px; border:1px solid var(--rule); border-radius:9px; background:var(--paper-strong); color:var(--ink); text-decoration:none; transition:border-color .12s ease; }
.doc-item:hover { border-color:var(--orange); }
.doc-item span { flex:1; min-width:0; }
.doc-item strong { display:block; font-size:var(--type-caption); word-break:break-word; }
.doc-item small { display:block; margin-top:1px; color:var(--muted); font-size:.7rem; }
.doc-item > img { width:13px; height:13px; flex:none; opacity:.6; }
html[data-theme="dark"] .doc-item > img { filter:invert(1); }
.needs-list { max-height:min(56vh,520px); margin-top:14px; overflow-y:auto; overscroll-behavior:contain; }
.needs-row { width:100%; min-height:60px; padding:11px 10px; display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:12px; align-items:center; color:var(--ink); background:transparent; border:0; border-left:3px solid var(--orange); border-bottom:1px solid var(--rule); text-align:left; }
.needs-row:hover { background:color-mix(in srgb,var(--orange) 7%,transparent); }
.needs-glyph { width:36px; height:36px; display:grid; place-items:center; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
.needs-glyph img { width:17px; }
html[data-theme="dark"] .needs-glyph img { filter:invert(1); }
.needs-copy strong { display:block; font-size:var(--type-control); }
.needs-copy small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); line-height:1.45; }
.needs-row em { padding:4px 10px; color:var(--muted); border:1px solid var(--rule); border-radius:999px; font-size:var(--type-caption); font-style:normal; font-weight:700; white-space:nowrap; }

/* Bridge zones: loud only when something needs a human. */
.zone-head { margin:30px 0 0; padding:9px 0 0; display:flex; align-items:baseline; gap:14px; border-top:2px solid var(--ink); }
.zone-head .overline { color:var(--orange); }
.zone-head h2 { margin:0; font:600 1.35rem/1.15 var(--serif); color:var(--muted); }
.attention[data-zone="decide"] { margin-top:26px; padding-top:9px; border-top:2px solid var(--ink); }
.attention .section-title { align-items:center; }
.zone-quiet { margin-top:26px; padding:9px 0 12px; border-top:2px solid var(--ink); }
.zone-quiet-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 18px; }
.zone-quiet-line .overline { color:var(--orange); }
.zone-quiet-line p { margin:0; color:var(--muted); font-size:var(--type-body); }
.decide-actions { display:flex; flex-wrap:wrap; gap:6px 16px; }
.decide-halt { padding:10px 0; border-bottom:1px solid var(--rule); }
.decide-halt .text-action { margin-left:auto; }
.bridge-fold { margin-top:16px; border:1px solid var(--rule); background:var(--paper); }
.bridge-fold > summary { min-height:52px; padding:0 16px; display:flex; align-items:center; gap:10px; color:var(--ink); font-size:var(--type-control); font-weight:800; cursor:pointer; list-style:none; }
.bridge-fold > summary::-webkit-details-marker { display:none; }
.bridge-fold > summary span { color:var(--muted); font-weight:700; }
.bridge-fold > summary .chevron { margin-left:auto; width:15px; transition:transform .18s ease; }
.bridge-fold[open] > summary .chevron { transform:rotate(180deg); }
.bridge-fold > summary img:first-child { width:17px; }
html[data-theme="dark"] .bridge-fold summary img { filter:invert(1); }
.bridge-fold .programme-spine { margin:0 16px 16px; }
.watch-waits, .moved-river { margin-top:16px; }

/* Record pages: five facts lead, the full dump folds. */
.record-full-brief { border-top:1px solid var(--rule); }
.record-full-brief > summary { min-height:48px; display:flex; align-items:center; gap:9px; color:var(--muted); font-size:var(--type-control); font-weight:800; cursor:pointer; list-style:none; }
.record-full-brief > summary::-webkit-details-marker { display:none; }
.record-full-brief > summary .chevron { margin-left:auto; width:15px; transition:transform .18s ease; }
.record-full-brief[open] > summary .chevron { transform:rotate(180deg); }
html[data-theme="dark"] .record-full-brief summary img { filter:invert(1); }

/* Operator rail headings breathe instead of wrapping into the eyebrow. */
.record-section-title { display:grid; gap:3px; }
.record-section-title h2 { margin:0; }
.headline-stack { display:grid; gap:10px; justify-items:end; }

@media (max-width:760px) {
  .needs-you b { font-size:var(--type-caption); }
  .needs-you small { display:none; }
  .zone-head { margin-top:24px; }
  .headline-stack { justify-items:start; }
}

/* ===================================================================
   Phase 0: Atlas accessibility and visual language foundation.
   DESIGN.md "Atlas accessibility and visual language" is the source of
   truth this block implements. Every entity/state chip is now driven by
   entityGlyph()/stateGlyph() in atlas.js (icon + text label + color +
   left border - never color alone). No new hues: every rule below reuses
   the existing --ink/--muted/--moss/--clay/--risk/--violet/--blue/--orange
   /--navy tokens already defined at the top of this file.
   =================================================================== */

/* ---- Accessible orange-on-text derivative -------------------------------
   Contrast finding: --orange (#e77e18) measures ~2.5:1 on --paper and
   ~2.7:1 on --paper-strong in the light theme - well under the 4.5:1 AA
   floor for text (it also falls short of the 3:1 non-text/UI-component
   floor used for borders and the focus ring; the focus ring is mitigated
   below with a dark halo). --orange stays unchanged for backgrounds,
   borders and icons (on-brand, and those contexts are not text). For the
   few places orange IS the text color, --orange-text mixes it toward
   --ink until it clears AA with headroom; the dark theme's --orange
   already measures ~7.8:1 (AAA) so it is used unmixed there. */
:root { --orange-text: color-mix(in srgb, var(--orange) 60%, var(--ink) 40%); }
:root[data-theme="dark"] { --orange-text: var(--orange); }
.zone-head .overline,
.zone-quiet-line .overline,
.help-start-list b { color:var(--orange-text); }

/* ---- Entity chips: entityGlyph(type) -> .type-* --------------------------
   One fixed Lucide icon and one fixed color per entity, per the DESIGN.md
   "Entity visual language" table. */
.type-chip { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-left:3px solid currentColor; border-radius:6px; font-size:var(--type-caption); font-weight:800; }
.type-chip .chip-icon { width:14px; height:14px; flex:none; }
html[data-theme="dark"] .type-chip .chip-icon { filter:invert(1); }
.type-epic { color:var(--navy); background:color-mix(in srgb, var(--navy) 10%, transparent); }
.type-candidate, .type-wave, .type-human { color:var(--orange-text); background:color-mix(in srgb, var(--orange) 12%, transparent); }
.type-brief, .type-gate { color:var(--ink); background:color-mix(in srgb, var(--ink) 8%, transparent); }
.type-evidence { color:var(--moss); background:color-mix(in srgb, var(--moss) 12%, transparent); }
.type-confirmation { color:var(--moss); background:color-mix(in srgb, var(--moss) 12%, transparent); border-left-color:var(--orange); }
.type-agent { color:var(--violet); background:color-mix(in srgb, var(--violet) 12%, transparent); }
.type-bank { color:var(--blue); background:color-mix(in srgb, var(--blue) 12%, transparent); }
.type-blocked { color:var(--risk); background:color-mix(in srgb, var(--risk) 12%, transparent); }
.type-blocked_dependency { color:var(--clay); background:color-mix(in srgb, var(--clay) 12%, transparent); }

/* ---- State chips: stateGlyph(state) -> .label / .kind / .status-chip /
   .service-state, marked with .state-* -------------------------------------
   Fixes the collision this phase exists to remove: the base/"moving" chip
   previously inherited the same green as "done" (both read var(--moss)),
   so a chip with no explicit modifier looked confirmed even when nothing
   was confirmed. Every chip now gets an icon, a text label (already
   rendered by the JS caller), an explicit color, and a left border -
   moving is neutral ink, not green, and is visually distinct from risk,
   wait, done and needs-you. */
.label, .kind, .decision .kind, .status-chip, .service-state {
  display:inline-flex; align-items:center; gap:6px;
  border-left:3px solid var(--muted);
  color:var(--ink); background:color-mix(in srgb, var(--ink) 7%, transparent);
}
.status-chip, .service-state { padding:3px 9px; border-radius:5px; font-size:var(--type-caption); font-weight:800; }
.label .chip-icon, .kind .chip-icon, .status-chip .chip-icon, .service-state .chip-icon { width:14px; height:14px; flex:none; opacity:.92; }
html[data-theme="dark"] .label .chip-icon, html[data-theme="dark"] .kind .chip-icon,
html[data-theme="dark"] .status-chip .chip-icon, html[data-theme="dark"] .service-state .chip-icon { filter:invert(1); }
.state-risk, .label.risk, .kind.risk { color:var(--risk); background:color-mix(in srgb, var(--risk) 15%, transparent); border-left-color:var(--risk); }
.state-wait, .label.wait, .kind.wait { color:var(--clay); background:color-mix(in srgb, var(--clay) 15%, transparent); border-left-color:var(--clay); }
.state-done, .label.done, .kind.done { color:var(--moss); background:color-mix(in srgb, var(--moss) 15%, transparent); border-left-color:var(--moss); }
.state-moving { color:var(--ink); background:color-mix(in srgb, var(--ink) 7%, transparent); border-left-color:var(--muted); }
.state-needs-you { color:var(--orange-text); background:color-mix(in srgb, var(--orange) 15%, transparent); border-left-color:var(--orange); font-weight:900; }
.service span { display:inline-flex; }

/* ---- Release gates: real Lucide icons, not unicode glyphs ---------------
   Blocked/waiting/done gates now share the same icon+color+border language
   as every other state chip in the app, and the glyph is a real icon
   (screen-reader and font-fallback safe) instead of a bare "x"/"!"/tick
   character. */
.gate-icon { display:grid; place-items:center; }
.gate-icon-mark { width:12px; height:12px; }
html[data-theme="dark"] .gate-icon-mark { filter:invert(1); }
.gate { border-left:3px solid var(--muted); padding-left:8px; }
.gate-risk { border-left-color:var(--risk); }
.gate-wait { border-left-color:var(--clay); }
.gate-done { border-left-color:var(--moss); }
.gate-moving { border-left-color:var(--muted); }
/* Bridge v3 (issue #153): renderGate() now appends a one-word state next to
   every gate's icon+edge (additive - QA and Security keep reading exactly
   as before, just with this word). Its own grid column above (added to the
   shared .gate rule) keeps <time> from wrapping to a second row now that a
   4th cell exists. Colour reinforces, never carries, the meaning alone -
   the icon and left edge already do that. */
.gate-state { align-self:center; color:var(--muted); font-size:var(--type-caption); font-weight:800; white-space:nowrap; }
.gate-risk .gate-state { color:var(--atlas-oxblood-on-dark); }
.gate-wait .gate-state { color:var(--atlas-clay-on-dark); }
.gate-done .gate-state { color:var(--atlas-moss-on-dark); }

/* ---- Agent identity: entityGlyph('agent') -> the bot icon ---------------
   Agents render the shared bot glyph instead of text initials so an agent
   row is unmistakable at a glance; human operators keep their per-person
   initials chip (DESIGN.md "Human operator" row) unchanged. */
.actor .entity-icon, .portrait .entity-icon, .pulse-chip > b .entity-icon { width:16px; height:16px; }
.operator-row .portrait .entity-icon { width:19px; height:19px; }
html[data-theme="dark"] .actor.agent .entity-icon, html[data-theme="dark"] .portrait.agent .entity-icon { filter:invert(1); }
.operator-row .portrait.agent .entity-icon, .pulse-chip.agent > b .entity-icon { filter:invert(1); }

/* ---- Phase 3: Delivery command surface -----------------------------------
   Gate spine (glance), filter/command bar, ticket ledger grouped by
   candidate, wave ledger, metrics ledger. Fieldbook idiom only: ruled
   ledgers and a horizontal gate map; no card grids, no radial/percentage
   donuts, no decorative gradients, no elongated capsules. Every icon and
   color comes from entityGlyph()/stateGlyph()/statusClass() in atlas.js;
   nothing here hardcodes an icon or a semantic color. */
.mono { font-family:var(--mono); font-variant-numeric:tabular-nums; }

.gate-spine-col img,
.ticket-row img,
.wave-row img,
.metric-row img { width:15px; height:15px; flex:none; }
.delivery-banner img { width:19px; height:19px; }
html[data-theme="dark"] .delivery-banner img,
html[data-theme="dark"] .gate-spine-col img,
html[data-theme="dark"] .ticket-row img,
html[data-theme="dark"] .wave-row img,
html[data-theme="dark"] .metric-row img { filter:invert(1); }

.delivery-banner { margin-top:16px; padding:14px 16px; display:grid; grid-template-columns:22px 1fr; gap:11px; align-items:start; color:var(--ink); background:color-mix(in srgb, var(--clay) 12%, var(--paper-strong)); border:1px solid color-mix(in srgb, var(--clay) 45%, var(--rule)); border-left:4px solid var(--clay); border-radius:7px; }
.delivery-banner strong { display:block; font-size:var(--type-control); }
.delivery-banner p { margin:4px 0 0; color:var(--muted); font-size:var(--type-caption); line-height:1.5; }
/* Truthful owner-only reconnect actions on a not-synced banner (#153): run the
   owner-confirmed sync, or open GitHub connector setup. Both wrap on mobile. */
.delivery-banner-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:11px; }
.delivery-banner-actions .button { min-height:44px; }

/* Gate spine: the glance. Seven ruled columns; clicking one toggles the
   gate filter shared with the filter bar below. Desktop/tablet may scroll
   the spine within its own container; the page itself never overflows. */
.gate-spine-wrap { margin-top:18px; }
/* Gate map collapsed by default so the ticket ledger leads; the full gate
   figures stay one click away. */
.gate-map-panel { border:1px solid var(--rule); border-radius:12px; background:var(--paper); overflow:hidden; }
.gate-map-panel > summary { display:flex; align-items:center; gap:10px; padding:11px 15px; cursor:pointer; list-style:none; }
.gate-map-panel > summary::-webkit-details-marker { display:none; }
.gate-map-panel > summary:hover { background:var(--paper-strong); }
.gate-map-icon { width:16px; height:16px; flex:none; }
.gate-map-title { font-size:var(--type-control); font-weight:800; color:var(--ink); }
.gate-map-summary { color:var(--muted); font-size:var(--type-caption); font-weight:700; }
.gate-map-panel > summary .chevron { width:15px; height:15px; margin-left:auto; transition:transform .18s ease; }
.gate-map-panel[open] > summary .chevron { transform:rotate(180deg); }
.gate-map-panel[open] > summary { border-bottom:1px solid var(--rule); }
.gate-map-panel .gate-spine { padding:14px 15px; margin:0; }
html[data-theme="dark"] .gate-map-icon,
html[data-theme="dark"] .gate-map-panel > summary .chevron { filter:invert(1); }
.gate-spine { display:flex; gap:10px; overflow-x:auto; padding-bottom:6px; }
.gate-spine-col { flex:1 1 152px; min-width:152px; padding:12px 13px; display:flex; flex-direction:column; gap:8px; text-align:left; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:9px; }
.gate-spine-n { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.gate-spine-name { font:600 17px var(--serif); color:var(--ink); line-height:1.15; }
.gate-spine-figures { display:grid; gap:3px; }
.gate-spine-figures span { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:var(--type-caption); }
.gate-spine-figures b { color:var(--ink); font-weight:700; }
.gate-spine-figures span.risk b, .gate-spine-figures span.risk small { color:var(--risk); }
.gate-spine-progress { display:flex; align-items:center; gap:8px; margin-top:2px; }
.gate-spine-progress .track { flex:1; }
.gate-spine-progress b { font-size:var(--type-caption); color:var(--muted); white-space:nowrap; }

/* Filter/command bar: compact labelled menus hold the options and counts.
   Entity and status chips are metadata only, never filter controls. */
.delivery-filters { margin-top:18px; }
.delivery-clear { margin-top:12px; display:inline-flex; align-items:center; gap:6px; }

/* Searchable filter dropdowns. A facet whose options would not fit one row
   (over the JS threshold) renders here as a compact trigger + popover with a
   search box and a scrollable multi-select list, so the ticket ledger stays
   in the viewport instead of being pushed below a chip grid. */
.filter-fields { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.filter-field { position:relative; }
.filter-field-trigger { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 10px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:8px; font-size:var(--type-caption); font-weight:700; cursor:pointer; white-space:nowrap; }
.filter-field-trigger:hover { border-color:var(--muted); }
.filter-field.open .filter-field-trigger { border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-soft); }
.filter-field-trigger.has { color:var(--orange-text); background:var(--orange-soft); border-color:var(--orange); font-weight:800; }
.fft-icon { display:inline-flex; }
.fft-label { white-space:nowrap; }
.fft-count { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; background:var(--orange); color:#fff; border-radius:9px; font-size:11px; font-weight:800; }
.fft-caret { width:14px; height:14px; opacity:.6; transition:transform .15s ease; }
.filter-field.open .fft-caret { transform:rotate(180deg); }
.filter-field-pop { position:absolute; z-index:40; top:calc(100% + 6px); left:0; right:auto; width:min(320px,86vw); max-height:min(56vh,420px); display:flex; flex-direction:column; background:var(--paper); border:1px solid var(--rule); border-radius:12px; box-shadow:0 18px 46px rgba(3,12,22,.28); overflow:hidden; }
/* display:flex above would otherwise defeat the [hidden] toggle (an element
   with a display value ignores the hidden attribute), so the closed popover
   is hidden explicitly. Without this every dropdown renders open at once. */
.filter-field-pop[hidden] { display:none; }
.fdrop-search { display:flex; align-items:center; gap:8px; padding:10px 12px; border-bottom:1px solid var(--rule); }
.fdrop-search-ic { width:16px; height:16px; opacity:.6; flex:none; }
.fdrop-search-input { flex:1; min-width:0; border:0; background:transparent; color:var(--ink); font-size:16px; outline:none; }
.fdrop-list { overflow-y:auto; padding:6px; display:flex; flex-direction:column; gap:2px; }
.fdrop-opt { display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:0 10px; text-align:left; color:var(--ink); background:transparent; border:0; border-radius:8px; font-size:var(--type-control); font-weight:600; cursor:pointer; }
.fdrop-opt:hover { background:color-mix(in srgb, var(--orange) 8%, transparent); }
.fdrop-opt.on { color:var(--orange-text); font-weight:800; }
.fdrop-box { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; flex:none; border:1.5px solid var(--rule); border-radius:5px; }
.fdrop-opt.on .fdrop-box { background:var(--orange); border-color:var(--orange); }
.fdrop-check { width:12px; height:12px; opacity:0; }
.fdrop-opt.on .fdrop-check { opacity:1; filter:brightness(0) invert(1); }
.fdrop-opt-text { flex:1; min-width:0; overflow-wrap:anywhere; }
.fdrop-none { margin:0; padding:14px 12px; color:var(--muted); font-size:var(--type-caption); text-align:center; }
html[data-theme="dark"] .filter-field-trigger img,
html[data-theme="dark"] .filter-field-pop img { filter:invert(1); }
html[data-theme="dark"] .fdrop-opt.on .fdrop-check { filter:brightness(0) invert(1); }
.filter-select { min-height:44px; display:inline-flex; align-items:center; gap:9px; padding:0 10px; border:1px solid var(--rule); border-radius:8px; background:var(--paper); color:var(--ink); }
.filter-select > span { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--type-caption); white-space:nowrap; }
.filter-select > span img { width:15px; height:15px; flex:none; }
.filter-select select { min-width:0; min-height:40px; border:0; color:var(--ink); background:transparent; font-size:max(16px,var(--type-control)); font-weight:700; outline:none; }
html[data-theme="dark"] .filter-select > span img { filter:invert(1); }

/* Ticket ledger: ruled rows, grouped by candidate. .ticket-meta is an
   internal fixed-column grid (desktop) so who/wave/state/stuck/open stay
   aligned down the ledger even though each row is its own grid instance. */
.ticket-row { display:grid; grid-template-columns:24px minmax(220px,1fr) auto; gap:14px; align-items:center; padding:12px 14px; border-bottom:1px solid var(--rule); color:inherit; text-decoration:none; }
.ticket-row:last-child { border-bottom:0; }
.ticket-row-candidate { background:color-mix(in srgb, var(--orange) 4%, transparent); }
.ticket-row-child { padding-left:36px; }
.ticket-row:hover { background:color-mix(in srgb, var(--orange) 8%, transparent); }
.ticket-main { display:flex; align-items:baseline; gap:10px; min-width:0; }
.ticket-id { flex:none; color:var(--muted); font-size:var(--type-caption); }
.ticket-title { flex:1; min-width:0; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:var(--type-control); line-height:1.4; color:var(--ink); }
.ticket-row-candidate .ticket-title { font-weight:700; }
.ticket-meta { display:grid; grid-template-columns:132px 104px 168px 108px 20px; gap:10px; align-items:center; }
.ticket-wave { color:var(--muted); font-size:var(--type-caption); white-space:nowrap; }
.ticket-stuck { display:inline-flex; align-items:center; gap:5px; color:var(--clay); font-size:var(--type-caption); font-weight:800; white-space:nowrap; }
.ticket-open { opacity:.7; }
.delivery-who { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--type-caption); font-weight:700; }
.delivery-who.unassigned { font-style:italic; }

/* ---- Phase 4: per-ticket record page --------------------------------
   Opening a ticket from the Delivery ledger resolves it in-Atlas. The
   shell reuses .record-workspace/.record-hero/.record-section/.record-fields
   and the chain-siblings list reuses the exact .ticket-row/.ledger markup
   from the Delivery ledger above, so a ticket never has two different
   looks. .record-hero's band is always the fixed dark gradient regardless
   of site theme, so the hero glyph is inverted unconditionally, not only
   under the dark theme. */
.ticket-hero-title { display:flex; align-items:center; gap:10px; }
.ticket-hero-title img.ticket-hero-glyph { width:22px; height:22px; flex:none; filter:invert(1); }
.ticket-body { display:grid; gap:13px; }
/* Rich-text rendering for GitHub bodies: legible size, live links, bold labels,
   headings and lists. Reusable via .rich-text. */
.rich-text p { margin:0; color:var(--ink); font-size:var(--type-body); line-height:1.68; overflow-wrap:anywhere; }
.rich-text a { color:var(--orange-text); font-weight:600; text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }
.rich-text a:hover { text-decoration:none; }
.rich-text strong { color:var(--ink); font-weight:800; }
.rich-text .rt-key { color:var(--muted); font-weight:800; letter-spacing:.01em; }
.rich-text .rt-h { margin:4px 0 0; font:600 clamp(19px,2vw,23px)/1.2 var(--serif); color:var(--ink); }
.rich-text .rt-list { margin:0; padding-left:20px; display:grid; gap:6px; }
.rich-text .rt-list li { color:var(--ink); font-size:var(--type-body); line-height:1.55; overflow-wrap:anywhere; }
.ticket-blocked-list { display:flex; flex-wrap:wrap; gap:6px; }
.ticket-blocked-clear { display:inline-flex; align-items:center; gap:6px; color:var(--moss); font-size:13px; font-weight:700; }
.ticket-blocked-clear img { width:14px; height:14px; }
html[data-theme="dark"] .ticket-blocked-clear img { filter:invert(1); }

/* Wave ledger. The release-next-wave action is always available (like
   Bridge/Team's identical control) rather than tied to a specific row, so
   it is never lost when no wave has been recorded yet. */
.delivery-wave-actions { margin:12px 0 0; }
.wave-row { display:grid; grid-template-columns:auto minmax(200px,1fr) auto; gap:14px; align-items:center; padding:13px 14px; border-bottom:1px solid var(--rule); }
.wave-row:last-child { border-bottom:0; }
.wave-copy strong { display:block; font-size:var(--type-control); }
.wave-copy small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); }

/* Metrics ledger: thin CSS-only trend bars, never a chart library. Fields
   with no recorded history (oldest-blocked-age, quiet-stuck) never draw a
   fabricated line; they show their honest note instead. */
.metric-row { display:grid; grid-template-columns:minmax(200px,1fr) 130px auto; gap:14px; align-items:center; padding:13px 14px; border-bottom:1px solid var(--rule); }
.metric-row:last-child { border-bottom:0; }
.metric-label { color:var(--ink); font-size:var(--type-control); }
.metric-trend { display:flex; align-items:flex-end; gap:2px; height:26px; }
.metric-trend i { flex:1; min-width:3px; background:var(--blue); border-radius:1px; }
.metric-trend i.down { background:var(--clay); }
.metric-trend-note { color:var(--muted); font-size:var(--type-caption); font-style:italic; }
.metric-value { color:var(--ink); font-size:var(--type-control); font-weight:700; text-align:right; }
.metric-value-empty { color:var(--muted); font-weight:600; font-style:italic; }

@media (max-width:760px) {
  /* Gate spine becomes a vertical numbered-style sequence; no horizontal
     page overflow. Ticket/wave/metric ledgers become structured records:
     one label/value stack and a single primary action per row. */
  .gate-spine { flex-direction:column; overflow-x:visible; padding-bottom:0; }
  .gate-spine-col { min-width:0; }
  .gate-spine-figures { grid-template-columns:1fr 1fr; }
  .ticket-row { grid-template-columns:22px 1fr; row-gap:6px; padding:12px; }
  .ticket-row-child { padding-left:30px; }
  .ticket-station { grid-column:1; grid-row:1; }
  .ticket-main { grid-column:2; grid-row:1; flex-wrap:wrap; }
  /* display:block cancels the desktop -webkit-box/-webkit-line-clamp
     truncation (it only applies inside a -webkit-box), so the title wraps
     as plain block text and the grid row auto-sizes to its real height
     instead of the clamped-but-visible text overlapping .ticket-meta below. */
  .ticket-title { display:block; white-space:normal; overflow:visible; text-overflow:clip; }
  .ticket-meta { grid-column:2; grid-row:2; display:flex; flex-wrap:wrap; justify-content:flex-start; }
  .wave-row { grid-template-columns:1fr; row-gap:8px; }
  .metric-row { grid-template-columns:1fr; row-gap:8px; }
  .metric-trend { height:22px; }
  .metric-value { text-align:left; }
}

/* ---- prefers-contrast: more ----------------------------------------------
   Raises rule (divider/border) color and secondary text to the
   high-contrast end of the existing palette; no new hues, just less
   dilution of the tokens already in use. */
@media (prefers-contrast: more) {
  :root { --rule:#8b7b5c; --muted:#30363d; }
  :root[data-theme="dark"] { --rule:#6c7f95; --muted:#dbe4ea; }
  .label, .kind, .decision .kind, .status-chip, .service-state,
  .state-risk, .state-wait, .state-done, .state-moving, .state-needs-you,
  .type-chip, .gate { border-left-width:4px; font-weight:900; }
  button, input, select, textarea, .label, .kind, .type-chip { border-width:2px; }
}

/* ---- Phase 0 legibility floor --------------------------------------------
   Nothing below 14px anywhere (DESIGN.md legibility baseline). The type
   tokens raised at the top of this file already lift every selector that
   reads var(--type-caption)/var(--type-control)/var(--type-body); the
   groups below are the remaining literal px/rem sizes across the file
   that still resolved under the new floor. Raise-only: no selector here
   is made smaller than it already was. */
.slack-discovery-meta,
.slack-discovery-meta span,
.owner-avatar,
.top-owner,
.gate-icon,
.actor,
.authority-key,
.connection-legend b,
.client-row > div:nth-child(5),
.connection-row > div:nth-child(5),
.repo-inspector-ledger article small,
.repo-inspector-ledger article > b,
.repo-inspector-links a span,
.repo-inspector-links a small,
.atlas-login-form>small,
.mark-name span,
.active-programme small,
.programme-pulse,
.menu-group,
.atlas-menu em,
.owner-line span,
.private-note,
.operating-horizon small,
.atlas-query kbd,
.sync-launch .sync-state,
.overline,
.reconciled span,
.headline-stat small,
.gate small,
.gate time,
.decision .kind,
.spine-row small,
.spine-row p,
.spine-progress b,
.ledger-row span,
.ledger-row time,
.wait-row small,
.wait-row time,
.context-person > b,
.context-person small,
.context-pairs dt,
.mission-copy small,
.mission-position b,
.mission-handoff small,
.human-gate-label,
.pulse-state small,
.repo-identity small,
.repo-measures small,
.repo-measures .mono,
.repo-health small,
.delivery-pulse > footer,
.inspector-summary dt,
.record-fields dt,
.inspector-source small,
.linked-records span,
.inspector-audit small,
.quiet-copy,
.record-breadcrumb,
.record-breadcrumb > span,
.record-breadcrumb > b,
.record-state > small,
.record-hero dt,
.repository-hero dd,
.record-fields-full dt,
.record-source > small,
.record-evidence small,
.record-evidence em,
.record-relations span,
.record-next small,
.record-activity small,
.record-empty-line small,
.truth-row[data-record-open]::after,
.milestone-row[data-record-open]::after,
.payment-row[data-record-open]::after,
.source-ledger [data-record-open]::after,
.control-row[data-record-open]::after { font-size:var(--type-caption); }

/* Navigation and form control labels: 15px minimum with a 44px target. */
.atlas-mobile-nav button,
.atlas-login-form label,
.login-error { font-size:var(--type-control); }
.atlas-login-form label { min-height:20px; display:inline-block; }

/* Real body prose, not metadata: hold the 17px body floor. */
.atlas-loading p,
.atlas-error p,
.atlas-empty p,
.atlas-login-form>p,
.atlas-login-brand p,
.baseline-compare p { font-size:var(--type-body); }

/* Phase 0 integration: the partially-sighted owner's primary reading surfaces
   still resolved to 16px (body) and 14px (nav). Route them through the raised
   tokens so the tiered minimums hold (DESIGN.md: body 17px, ops and nav 15px).
   Placed last so it wins over the desktop 16px rules and the mobile 13px override. */
.dayline p, .page-head p, .next-result p, .record-page-head p,
.decision strong, .record-source strong { font-size:var(--type-body); line-height:1.6; }
.atlas-menu button { font-size:var(--type-control); }

/* ---- Waves reporting -------------------------------------------------
   Released-wave and staged-pipeline ledgers, expandable via native
   <details>/<summary> (the same disclosure primitive used by the record
   .bridge-fold and .help-details), so expand/collapse is keyboard
   accessible for free. Ruled rows only, per the fieldbook idiom: no card
   grid, no donut, no capsule shape. Figures are mono for tabular alignment;
   state and blocked counts always carry a color plus an icon plus a label,
   never color alone (DESIGN.md "Atlas accessibility and visual language"). */
.waves-summary b { font-family:var(--mono); font-variant-numeric:tabular-nums; }
.waves-filter-count { margin:10px 0 0; color:var(--muted); font-size:var(--type-caption); }

/* Wave B item 2 (issue #166): the shared tableFilterBar/tableFilterBlock
   primitive's live count line. Reuses .hist-controls/.hist-search/
   .filter-select for the controls themselves (already compact + mobile-
   safe from Wave A item 7 and the Agent Data Plane rules below), so only
   the count line needs a rule of its own here. */
.table-filter-count { margin:10px 0 12px; color:var(--muted); font-size:var(--type-caption); }

.wave-ledger-block { background:var(--paper-strong); border:1px solid var(--rule); border-top:0; }
.wave-block { border-bottom:1px solid var(--rule); }
.wave-block:last-child { border-bottom:0; }
.wave-block > summary { list-style:none; cursor:pointer; padding:13px 14px; display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; }
.wave-block > summary::-webkit-details-marker { display:none; }
.wave-block > summary .chevron { width:15px; height:15px; flex:none; margin-left:auto; transition:transform .18s ease; }
.wave-block[open] > summary .chevron { transform:rotate(180deg); }
html[data-theme="dark"] .wave-block > summary .chevron,
html[data-theme="dark"] .wave-operator-block > summary .chevron { filter:invert(1); }
.wave-block-copy { flex:1 1 200px; min-width:0; }
.wave-block-copy strong { display:block; font-size:var(--type-control); color:var(--ink); }
.wave-block-copy small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); }
.wave-block-progress { display:flex; align-items:center; gap:8px; flex:none; }
.wave-block-progress .track { width:60px; }
.wave-block-progress b { font-size:var(--type-caption); color:var(--muted); white-space:nowrap; }
.wave-block-blocked { display:flex; flex-direction:column; align-items:flex-end; flex:none; color:var(--muted); font-size:var(--type-caption); }
.wave-block-blocked b { font-size:var(--type-control); color:var(--ink); }
.wave-block-blocked.risk b, .wave-block-blocked.risk small { color:var(--risk); }
.pipeline-block-actions { padding:0 14px 13px 14px; }
.wave-block-actions { padding:12px 14px 4px 14px; }
/* Quick action on the collapsed wave summary: reachable without expanding. */
.wave-block > summary .wave-quick-open { margin-left:auto; display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border:1px solid var(--rule); border-radius:7px; background:var(--paper-strong); color:var(--ink); font-size:var(--type-caption); font-weight:800; cursor:pointer; transition:transform .12s ease, border-color .12s ease, background-color .12s ease; }
.wave-block > summary .wave-quick-open:hover { border-color:var(--orange); }
.wave-block > summary .wave-quick-open:active { transform:scale(.96); }
.wave-block > summary .wave-quick-open img { width:15px; height:15px; }
.wave-block > summary .wave-quick-open + .chevron { margin-left:8px; }
html[data-theme="dark"] .wave-block > summary .wave-quick-open img { filter:invert(1); }

.wave-operator-list { border-top:1px solid var(--rule); background:var(--paper); }
.wave-operator-block { border-bottom:1px solid var(--rule); }
.wave-operator-block:last-child { border-bottom:0; }
/* Compact one-line collapsed summary: name, role truncates, count, chevron.
   Collapsed by default (forceOpen=false); expands to the ticket list. */
.wave-operator-block > summary { list-style:none; cursor:pointer; padding:9px 12px; display:flex; flex-wrap:nowrap; align-items:center; gap:9px; }
.wave-operator-block > summary::-webkit-details-marker { display:none; }
.wave-operator-block > summary:hover { background:var(--paper-strong); }
.wave-operator-block > summary .chevron { width:14px; height:14px; flex:none; transition:transform .18s ease; }
.wave-operator-block[open] > summary .chevron { transform:rotate(180deg); }
.wave-operator-role { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:var(--type-caption); }
.wave-operator-count { flex:none; margin-left:auto; color:var(--muted); font-size:var(--type-caption); white-space:nowrap; }
.wave-operator-count b { color:var(--ink); }
.wave-operator-count.risk, .wave-operator-count.risk b { color:var(--risk); }
.wave-ticket-meta { display:flex; align-items:center; gap:10px; }

/* The wave zoom-in flat row: id+title | owner | state+GitHub link. Flex (not the
   base grid) so the middle owner column sits cleanly and the row wraps on a phone. */
.wave-all-tickets { border-top:1px solid var(--rule); }
.wave-all-tickets > summary { display:flex; align-items:center; gap:8px; padding:12px 14px; cursor:pointer; font-size:var(--type-control); color:var(--ink); font-weight:600; list-style:none; }
.wave-all-tickets > summary::-webkit-details-marker { display:none; }
.wave-all-tickets > summary .chevron { transition:transform .15s ease; }
.wave-all-tickets[open] > summary .chevron { transform:rotate(180deg); }
.wave-flat-ledger .wave-flat-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.wave-flat-ledger .wave-flat-row .ticket-main { flex:1 1 240px; min-width:0; }
.wave-flat-who { flex:0 0 auto; display:flex; align-items:center; }
.wave-flat-ledger .wave-ticket-meta { flex:0 0 auto; margin-left:auto; }
.wave-flat-unassigned { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:var(--type-caption); }

.waves-people-ledger .people-ledger-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; padding:13px 14px; border-bottom:1px solid var(--rule); }
.waves-people-ledger .people-ledger-row:last-child { border-bottom:0; }
.people-figures { display:flex; gap:16px; flex:none; margin-left:auto; }
.people-figures span { display:flex; flex-direction:column; align-items:center; color:var(--muted); font-size:var(--type-caption); }
.people-figures b { font-size:var(--type-control); color:var(--ink); }
.people-figures span.risk b, .people-figures span.risk small { color:var(--risk); }
.people-note { flex-basis:100%; margin:2px 0 0; color:var(--muted); font-size:var(--type-caption); line-height:1.5; }
.people-note b { color:var(--ink); font-family:var(--mono); }

@media (max-width:760px) {
  .wave-block > summary, .wave-operator-block > summary { padding-right:14px; }
  .wave-block-progress, .wave-block-blocked { flex:1 1 auto; }
  .wave-block-blocked { align-items:flex-start; }
  .people-figures { margin-left:0; flex-basis:100%; justify-content:flex-start; }
}

/* The small element defaults to 0.833em, which drops the released/staged/blocked
   figure labels under the 14px legibility floor against 14 to 17px parents.
   Hold it at the floor for the partially-sighted owner, scaling up with context. */
small { font-size:max(var(--type-caption), 0.833em); }

/* ---- Whitespace compaction (P7): tighten without losing information ----- */
/* Inline empty states no longer reserve a full-screen 430px; the full-page
   loading/error states keep their height (separate selectors). */
.atlas-empty { min-height:auto; padding:32px 16px; }
.atlas-workbench { padding-bottom:36px; }
.attention, .programme-spine, .lower, .data-section { margin-top:14px; }
.page-head { padding-bottom:12px; }
.section-title { padding-bottom:6px; }
.monitor-row, .agent-row, .dispatch-row, .dispatch-flight-row { min-height:auto; padding-top:11px; padding-bottom:11px; }
.cal-milestone { padding-top:12px; padding-bottom:12px; }
.agents-kickoff, .dispatch-boundary, .front-load-section, .cal-rhythm { padding-top:13px; padding-bottom:13px; }
.record-hero { padding-top:16px; padding-bottom:16px; }
.record-page-grid { gap:18px; }
.record-page-main, .record-page-side { gap:16px; }

/* ---- Owner decision workbench ------------------------------------------ */
.decision-workspace { max-width:1380px; }
.decision-provenance { display:flex; align-items:center; flex-wrap:wrap; gap:8px 18px; padding:10px 0; border-bottom:1px solid var(--rule); color:var(--muted); font-size:13px; line-height:1.45; }
.decision-provenance > span, .decision-provenance > a { display:inline-flex; align-items:center; min-width:0; gap:6px; color:inherit; }
.decision-provenance img { width:15px; height:15px; flex:0 0 auto; }
.decision-provenance a { color:var(--blue); font-weight:800; text-decoration:none; }
.decision-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:18px 0 14px; }
.decision-page-head h1 { max-width:900px; margin:5px 0 0; color:var(--ink); font-family:var(--display); font-size:clamp(30px,3.1vw,42px); line-height:1.03; letter-spacing:-.035em; overflow-wrap:anywhere; }
.decision-page-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; flex:0 0 auto; }
.decision-band { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(270px,.85fr) minmax(250px,.7fr); border-top:3px solid var(--orange); background:color-mix(in srgb,var(--blue) 78%,var(--paper)); }
.decision-band > div { min-width:0; padding:21px 23px; border-right:1px solid color-mix(in srgb,var(--rule) 78%,transparent); }
.decision-band > div:last-child { border-right:0; }
.decision-question h2 { margin:5px 0 7px; color:var(--paper); font-family:var(--display); font-size:clamp(25px,2.25vw,34px); line-height:1.08; letter-spacing:-.025em; }
.decision-question p { margin:0; color:color-mix(in srgb,var(--paper) 84%,var(--muted)); font-size:15px; line-height:1.5; }
.decision-state { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:9px; }
.decision-state > strong { color:var(--paper); font-size:15px; line-height:1.45; }
.decision-state > small { color:color-mix(in srgb,var(--paper) 70%,var(--muted)); font-size:13px; line-height:1.4; }
.decision-state .mono { overflow-wrap:anywhere; word-break:break-word; white-space:normal; }
.decision-actions { display:grid; grid-template-columns:1fr; align-content:start; gap:8px; }
.decision-actions .button { width:100%; justify-content:flex-start; min-height:44px; font-size:14px; }
.decision-actions .button[disabled] { cursor:not-allowed; opacity:.53; }
.decision-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--rule); }
.decision-facts > div { min-width:0; padding:13px 15px; border-right:1px solid var(--rule); }
.decision-facts > div:last-child { border-right:0; }
.decision-facts span { display:block; margin-bottom:4px; color:var(--muted); font-size:13px; line-height:1.35; }
.decision-facts strong { display:block; color:var(--ink); font-size:15px; line-height:1.35; overflow-wrap:anywhere; word-break:break-word; }
.decision-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,.33fr); align-items:start; gap:32px; margin-top:6px; }
.decision-layout > main { min-width:0; }
.decision-layout > aside { min-width:0; border-left:1px solid var(--rule); padding-left:22px; }
.decision-section { padding:25px 0; border-bottom:1px solid var(--rule); }
.decision-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:12px; }
.decision-section-head h2, .decision-ai-card h2, .decision-next h2 { margin:4px 0 0; color:var(--ink); font-family:var(--display); font-size:clamp(24px,2vw,31px); line-height:1.08; letter-spacing:-.022em; }
.decision-section-head > span { color:var(--muted); font-family:var(--mono); font-size:13px; white-space:nowrap; }
.decision-stream-item { display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; padding:14px 0; border-top:1px solid var(--rule); }
.decision-stream-item:first-of-type { border-top:0; }
.decision-stream-icon { width:30px; height:30px; display:grid; place-items:center; border:1px solid var(--rule); border-radius:50%; color:var(--blue); background:var(--paper-strong); }
.decision-stream-icon img { width:16px; height:16px; }
.decision-stream-icon.done { color:var(--moss); border-color:color-mix(in srgb,var(--moss) 55%,var(--rule)); }
.decision-stream-icon.wait { color:var(--orange); border-color:color-mix(in srgb,var(--orange) 55%,var(--rule)); }
.decision-stream-item > div { min-width:0; }
.decision-stream-item > div > div { display:flex; flex-wrap:wrap; align-items:flex-start; gap:7px; }
.decision-stream-item strong { flex:1 1 220px; color:var(--ink); font-size:16px; line-height:1.35; }
.decision-stream-item p { margin:4px 0; color:var(--muted); font-size:15px; line-height:1.45; }
.decision-stream-item small { color:var(--quiet); font-size:13px; line-height:1.4; }
.decision-stream-item .mono { overflow-wrap:anywhere; word-break:break-word; white-space:normal; }
.decision-ai-card { margin-top:24px; padding:20px 22px; border-top:2px solid var(--blue); background:color-mix(in srgb,var(--paper-strong) 88%,var(--blue)); }
.decision-ai-card > p { margin:12px 0 0; color:var(--ink); font-size:16px; line-height:1.55; }
.decision-ai-card .decision-ai-next { border-left:2px solid var(--orange); padding-left:12px; color:var(--muted); }
.decision-ai-next strong { display:block; margin-bottom:3px; color:var(--ink); font-size:14px; }
.decision-ai-meta { display:flex; flex-wrap:wrap; gap:6px 14px; margin:13px 0; color:var(--muted); font-size:13px; }
.decision-ai-meta .mono { overflow-wrap:anywhere; word-break:break-word; }
.decision-evidence-list { border-top:1px solid var(--rule); }
.decision-evidence-list > * { width:100%; display:grid; grid-template-columns:30px minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--rule); text-align:left; color:inherit; }
.decision-evidence-list button { background:transparent; border:0; cursor:pointer; }
.decision-evidence-list button:hover strong { color:var(--blue); }
.decision-evidence-list > * > span:first-child { display:grid; place-items:center; width:28px; height:28px; color:var(--moss); background:color-mix(in srgb,var(--moss) 10%,transparent); }
.decision-evidence-list img { width:16px; height:16px; }
.decision-evidence-list strong { display:block; color:var(--ink); font-size:15px; line-height:1.35; }
.decision-evidence-list small { display:block; margin-top:2px; color:var(--muted); font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.decision-evidence-list time { color:var(--quiet); font-size:13px; white-space:nowrap; }
.decision-static-details { margin:22px 0 0; border-bottom:1px solid var(--rule); }
.decision-static-details summary { display:flex; align-items:center; gap:8px; padding:14px 0; color:var(--ink); cursor:pointer; font-size:15px; font-weight:800; list-style:none; }
.decision-static-details summary::-webkit-details-marker { display:none; }
.decision-static-details summary img { width:17px; height:17px; }
.decision-static-details summary .chevron { margin-left:auto; transition:transform .18s ease; }
.decision-static-details[open] summary .chevron { transform:rotate(180deg); }
.decision-static-details .record-fields { padding:0 0 15px; }
.decision-next, .decision-note-suggestion { padding:24px 0; border-bottom:1px solid var(--rule); }
.decision-next p, .decision-note-suggestion p { margin:11px 0 0; color:var(--muted); font-size:15px; line-height:1.52; }
.decision-next dl { margin:17px 0 0; }
.decision-next dl > div { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid var(--rule); }
.decision-next dt { color:var(--muted); font-size:13px; }
.decision-next dd { margin:0; color:var(--ink); font-size:14px; font-weight:800; text-align:right; }
.decision-note-suggestion { border-left:2px solid var(--orange); padding-left:13px; }

@media (max-width:1100px) {
  .decision-band { grid-template-columns:minmax(0,1fr) minmax(280px,.75fr); }
  .decision-actions { grid-column:1 / -1; grid-template-columns:repeat(2,minmax(0,1fr)); border-top:1px solid color-mix(in srgb,var(--rule) 78%,transparent); }
  .decision-actions .button:first-child { grid-column:1 / -1; }
  .decision-layout { grid-template-columns:minmax(0,1fr); }
  .decision-layout > aside { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; border-left:0; border-top:1px solid var(--rule); padding:0; }
}
@media (max-width:760px) {
  .decision-provenance { gap:8px 12px; padding:9px 0; }
  .decision-page-head { align-items:flex-start; flex-direction:column; padding-top:15px; }
  .decision-page-actions { justify-content:flex-start; }
  .decision-band { display:block; }
  .decision-band > div { padding:18px 16px; border-right:0; border-bottom:1px solid color-mix(in srgb,var(--rule) 78%,transparent); }
  .decision-band > div:last-child { border-bottom:0; }
  .decision-actions { display:grid; grid-template-columns:1fr; }
  .decision-actions .button:first-child { grid-column:auto; }
  .decision-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .decision-facts > div:nth-child(2) { border-right:0; }
  .decision-facts > div:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .decision-layout > aside { display:block; }
  .decision-next, .decision-note-suggestion { padding:20px 0; }
  .decision-evidence-list > * { grid-template-columns:30px minmax(0,1fr); }
  .decision-evidence-list time, .decision-evidence-list > * > img:last-child { grid-column:2; justify-self:start; }
  .decision-section-head { align-items:flex-start; flex-direction:column; gap:4px; }
}

/* ---- Controlled work-item resolution ----------------------------------- */
.confirm-checkbox { grid-template-columns:auto minmax(0,1fr); align-items:start; gap:10px; padding:12px; color:var(--ink)!important; background:var(--paper-strong); border:1px solid var(--rule); border-radius:8px; letter-spacing:normal!important; text-transform:none!important; }
.confirm-checkbox input { width:18px!important; min-height:18px!important; margin:2px 0 0; accent-color:var(--orange); }
.confirm-checkbox span { display:grid; gap:3px; color:var(--ink); font-size:15px; font-weight:800; line-height:1.35; }
.confirm-checkbox small, .confirm-fields label > small { color:var(--muted); font-size:13px; font-weight:500; line-height:1.42; letter-spacing:normal; text-transform:none; }
.resolution-workspace { max-width:1380px; }
.resolution-provenance { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; padding:10px 0; color:var(--muted); border-bottom:1px solid var(--rule); font-size:13px; line-height:1.45; }
.resolution-provenance > span, .resolution-provenance > a { display:inline-flex; min-width:0; align-items:center; gap:6px; color:inherit; }
.resolution-provenance a { color:var(--blue); font-weight:800; text-decoration:none; }
.resolution-provenance img { width:15px; height:15px; flex:0 0 auto; }
.resolution-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:18px 0 14px; }
.resolution-page-head > div:first-child { min-width:0; }
.resolution-page-head h1 { max-width:900px; margin:5px 0 0; color:var(--ink); font-family:var(--display); font-size:clamp(30px,3.1vw,42px); line-height:1.03; letter-spacing:-.035em; overflow-wrap:anywhere; }
.resolution-page-head p { max-width:860px; margin:9px 0 0; color:var(--muted); font-size:16px; line-height:1.52; }
.resolution-operating-band { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(260px,.72fr); border-top:3px solid var(--orange); background:color-mix(in srgb,var(--blue) 79%,var(--paper)); }
.resolution-operating-band > div { min-width:0; padding:20px 22px; border-right:1px solid color-mix(in srgb,var(--rule) 76%,transparent); }
.resolution-operating-band > div:last-child { border-right:0; }
.resolution-state, .resolution-requirement, .resolution-actions { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:8px; }
.resolution-operating-band .overline { color:color-mix(in srgb,var(--paper) 70%,var(--orange)); }
.resolution-state > strong, .resolution-requirement > strong { color:var(--paper); font-size:18px; line-height:1.32; }
.resolution-state > small, .resolution-requirement > p, .resolution-requirement > small { margin:0; color:color-mix(in srgb,var(--paper) 76%,var(--muted)); font-size:14px; line-height:1.48; }
.resolution-actions .button { width:100%; min-height:44px; justify-content:flex-start; font-size:14px; }
.resolution-actions > small { color:color-mix(in srgb,var(--paper) 78%,var(--muted)); font-size:13px; line-height:1.4; }
.resolution-actions .button[disabled] { cursor:not-allowed; opacity:.5; }
.resolution-ledger, .resolution-section { padding:25px 0; border-bottom:1px solid var(--rule); }
.resolution-ledger-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:12px; }
.resolution-ledger-head h2, .resolution-section h2 { margin:4px 0 0; color:var(--ink); font-family:var(--display); font-size:clamp(24px,2vw,31px); line-height:1.08; letter-spacing:-.022em; }
.resolution-ledger-head > span { flex:0 0 auto; color:var(--muted); font-family:var(--mono); font-size:13px; white-space:nowrap; }
.resolution-evidence-row { display:grid; grid-template-columns:32px minmax(0,1fr) minmax(130px,.42fr) auto; align-items:center; gap:11px; padding:13px 0; border-top:1px solid var(--rule); }
.resolution-evidence-icon, .resolution-history-mark { display:grid; place-items:center; width:29px; height:29px; color:var(--moss); background:color-mix(in srgb,var(--moss) 10%,transparent); border:1px solid color-mix(in srgb,var(--moss) 25%,var(--rule)); }
.resolution-evidence-icon img, .resolution-history-mark img { width:16px; height:16px; }
.resolution-evidence-row > span:nth-child(2) { min-width:0; }
.resolution-evidence-row strong { display:block; color:var(--ink); font-size:15px; line-height:1.35; overflow-wrap:anywhere; }
.resolution-evidence-row small { display:block; margin-top:2px; color:var(--muted); font-size:13px; line-height:1.42; overflow-wrap:anywhere; }
.resolution-evidence-row time { color:var(--quiet); font-size:13px; line-height:1.4; }
.resolution-download { min-height:38px!important; padding:7px 10px!important; font-size:13px!important; white-space:nowrap; }
.resolution-empty { display:grid; grid-template-columns:32px minmax(0,1fr); gap:11px; align-items:start; padding:17px 0; color:var(--muted); border-top:1px solid var(--rule); }
.resolution-empty > img { width:21px; height:21px; color:var(--orange); }
.resolution-empty strong { display:block; color:var(--ink); font-size:15px; line-height:1.4; }
.resolution-empty small { display:block; margin-top:3px; color:var(--muted); font-size:14px; line-height:1.46; }
.resolution-empty.compact { padding-bottom:0; }
.resolution-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,.34fr); align-items:start; gap:32px; }
.resolution-columns > main { min-width:0; }
.resolution-columns > aside { min-width:0; padding-left:22px; border-left:1px solid var(--rule); }
.resolution-history-row { display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; padding:14px 0; border-top:1px solid var(--rule); }
.resolution-history-row > div { min-width:0; }
.resolution-history-row > div > div { display:flex; flex-wrap:wrap; align-items:flex-start; gap:7px; }
.resolution-history-row strong { flex:1 1 210px; color:var(--ink); font-size:16px; line-height:1.35; }
.resolution-history-row p { margin:4px 0; color:var(--muted); font-size:15px; line-height:1.46; }
.resolution-history-row small { color:var(--quiet); font-size:13px; line-height:1.4; }
.resolution-next > p { margin:11px 0 16px; color:var(--muted); font-size:15px; line-height:1.52; }
.resolution-close-control { display:grid; grid-template-columns:20px minmax(0,1fr); gap:10px; align-items:start; padding:13px 0; border-top:1px solid var(--rule); color:var(--ink); }
.resolution-close-control input { width:18px; height:18px; margin:2px 0 0; accent-color:var(--orange); }
.resolution-close-control.disabled { color:var(--muted); }
.resolution-close-control.confirmed { grid-template-columns:20px minmax(0,1fr); color:var(--moss); }
.resolution-close-control > img { width:18px; height:18px; margin-top:2px; }
.resolution-close-control strong { display:block; color:var(--ink); font-size:15px; line-height:1.35; }
.resolution-close-control small { display:block; margin-top:3px; color:var(--muted); font-size:13px; line-height:1.42; }
.resolution-gates { display:grid; gap:0; margin:14px 0 0; padding:0; list-style:none; border-top:1px solid var(--rule); }
.resolution-gates li { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:9px; padding:12px 0; border-bottom:1px solid var(--rule); }
.resolution-gates strong { display:block; color:var(--ink); font-size:15px; line-height:1.35; }
.resolution-gates small { display:block; margin-top:3px; color:var(--muted); font-size:13px; line-height:1.4; }

@media (max-width:1100px) {
  .resolution-operating-band { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .resolution-actions { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
  .resolution-actions .button:first-child { grid-column:1 / -1; }
  .resolution-actions > small { grid-column:1 / -1; }
  .resolution-columns { grid-template-columns:minmax(0,1fr); }
  .resolution-columns > aside { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; padding-left:0; border-left:0; border-top:1px solid var(--rule); }
}
@media (max-width:760px) {
  .resolution-workspace .record-breadcrumb > b { display:block; max-width:calc(100vw - 146px); }
  .resolution-provenance { gap:8px 12px; padding:9px 0; }
  .resolution-page-head { flex-direction:column; padding-top:15px; }
  .resolution-page-head h1 { font-size:clamp(29px,10vw,38px); }
  .resolution-operating-band { display:block; }
  .resolution-operating-band > div { padding:18px 16px; border-right:0; border-bottom:1px solid color-mix(in srgb,var(--rule) 76%,transparent); }
  .resolution-operating-band > div:last-child { border-bottom:0; }
  .resolution-actions { display:grid; grid-template-columns:1fr; }
  .resolution-actions .button:first-child { grid-column:auto; }
  .resolution-ledger-head { align-items:flex-start; flex-direction:column; gap:4px; }
  .resolution-evidence-row { grid-template-columns:32px minmax(0,1fr); }
  .resolution-evidence-row time, .resolution-download { grid-column:2; justify-self:start; }
  .resolution-columns > aside { display:block; }
  .resolution-history-row { gap:10px; }
  .resolution-section, .resolution-ledger { padding:21px 0; }
}

/* ---- Owner alert centre -------------------------------------------------
   A private Atlas operating feed, intentionally distinct from Slack. The
   layout reads as a compact alert ledger: severity, grounded context and
   one bounded acknowledgement, with no promotional card stack. */
.atlas-topbar { grid-template-columns:minmax(138px,.42fr) minmax(120px,.36fr) minmax(260px,560px) auto; gap:14px; }
.owner-alerts-open { min-height:44px; min-width:0; padding:5px 10px 5px 8px; display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:8px; color:var(--ink); background:transparent; border:1px solid var(--rule); border-radius:9px; text-align:left; }
.owner-alerts-open:hover, .owner-alerts-open:focus-visible { border-color:var(--orange); }
.owner-alert-icon { width:28px; height:28px; display:grid; place-items:center; color:var(--ink); background:color-mix(in srgb,var(--blue) 11%,var(--paper-strong)); border:1px solid color-mix(in srgb,var(--blue) 25%,var(--rule)); border-radius:7px; }
.owner-alert-icon img { width:16px; height:16px; }
html[data-theme="dark"] .owner-alert-icon img, html[data-theme="dark"] .owner-alert-toolbar img, html[data-theme="dark"] .owner-alert-row img, html[data-theme="dark"] .owner-alert-empty > img { filter:invert(1); }
.owner-alerts-open b { display:block; overflow:hidden; font-size:var(--type-control); font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.owner-alerts-open small { display:block; margin-top:1px; overflow:hidden; color:var(--muted); font-size:var(--type-caption); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.owner-alert-count { min-width:24px; height:24px; display:grid; place-items:center; padding:0 5px; color:#fff; background:var(--risk); border-radius:7px; font-family:var(--mono); font-size:13px; font-style:normal; font-weight:800; }
.owner-alerts-open.has-critical { border-color:color-mix(in srgb,var(--risk) 72%,var(--rule)); }
.owner-alerts-open.has-critical .owner-alert-icon { color:var(--risk); background:color-mix(in srgb,var(--risk) 10%,var(--paper-strong)); border-color:color-mix(in srgb,var(--risk) 42%,var(--rule)); }
.owner-alerts-open.is-offline { border-style:dashed; }
.owner-alert-dialog { width:min(780px,calc(100vw - 32px)); }
.owner-alert-dialog form { min-width:0; }
.owner-alert-intro { max-width:650px; margin:2px 0 16px; color:var(--muted); font-size:15px; line-height:1.5; }
.owner-alert-toolbar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; padding:0 0 13px; border-bottom:1px solid var(--rule); }
.owner-alert-toolbar button { min-height:40px; min-width:0; padding:7px 9px; display:flex; align-items:center; justify-content:center; gap:7px; color:var(--muted); background:transparent; border:1px solid var(--rule); border-radius:7px; font-size:14px; font-weight:800; text-align:center; }
.owner-alert-toolbar button:hover { color:var(--ink); border-color:var(--orange); }
.owner-alert-toolbar button.active { color:var(--ink); background:color-mix(in srgb,var(--orange) 10%,var(--paper-strong)); border-color:color-mix(in srgb,var(--orange) 63%,var(--rule)); box-shadow:inset 0 -2px 0 var(--orange); }
.owner-alert-toolbar img { width:15px; height:15px; flex:0 0 auto; }
.owner-alert-source { min-height:34px; display:flex; align-items:center; padding:7px 0; color:var(--muted); border-bottom:1px solid var(--rule); font-size:13px; line-height:1.42; }
.owner-alert-list { max-height:min(58vh,560px); overflow:auto; overscroll-behavior:contain; }
.owner-alert-row { display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:12px; align-items:start; padding:14px 2px; border-bottom:1px solid var(--rule); border-left:3px solid transparent; }
.owner-alert-row.severity-critical, .owner-alert-row.severity-high { padding-left:9px; border-left-color:var(--risk); }
.owner-alert-row.severity-medium { padding-left:9px; border-left-color:var(--clay); }
.owner-alert-row.severity-low { padding-left:9px; border-left-color:var(--blue); }
.owner-alert-mark { width:32px; height:32px; display:grid; place-items:center; color:var(--ink); background:var(--paper-strong); border:1px solid var(--rule); border-radius:7px; }
.owner-alert-row.severity-critical .owner-alert-mark, .owner-alert-row.severity-high .owner-alert-mark { color:var(--risk); background:color-mix(in srgb,var(--risk) 9%,var(--paper-strong)); border-color:color-mix(in srgb,var(--risk) 34%,var(--rule)); }
.owner-alert-row.severity-medium .owner-alert-mark { color:var(--clay); background:color-mix(in srgb,var(--clay) 9%,var(--paper-strong)); }
.owner-alert-mark img { width:17px; height:17px; }
.owner-alert-copy { min-width:0; }
.owner-alert-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; color:var(--muted); font-size:13px; line-height:1.35; }
.owner-alert-meta .label { min-height:25px; padding:4px 8px; font-size:13px; }
.owner-alert-target { color:var(--ink); font-family:var(--mono); font-size:13px; font-weight:800; overflow-wrap:anywhere; }
.owner-alert-meta time { color:var(--quiet); font-family:var(--mono); font-size:13px; overflow-wrap:anywhere; }
.owner-alert-copy > strong { display:block; margin-top:7px; color:var(--ink); font-size:16px; line-height:1.35; overflow-wrap:anywhere; }
.owner-alert-copy p { margin:4px 0 0; color:var(--muted); font-size:15px; line-height:1.48; overflow-wrap:anywhere; }
.owner-alert-actions { min-width:116px; display:grid; gap:7px; align-content:start; }
.owner-alert-actions .button { min-height:38px; padding:7px 10px; justify-content:center; font-size:13px; white-space:nowrap; }
.owner-alert-actions .button img { width:15px; height:15px; }
.owner-alert-acknowledged, .owner-alert-readonly { min-height:32px; display:flex; align-items:center; gap:6px; color:var(--muted); font-size:13px; font-weight:800; line-height:1.35; }
.owner-alert-acknowledged { color:var(--moss); }
.owner-alert-acknowledged img, .owner-alert-readonly img { width:15px; height:15px; flex:0 0 auto; }
.owner-alert-empty { min-height:150px; display:grid; grid-template-columns:30px minmax(0,1fr); gap:12px; align-content:center; align-items:start; padding:22px 2px; color:var(--moss); }
.owner-alert-empty > img { width:21px; height:21px; }
.owner-alert-empty strong { display:block; color:var(--ink); font-size:16px; line-height:1.4; }
.owner-alert-empty small { display:block; margin-top:4px; color:var(--muted); font-size:14px; line-height:1.48; }

@media (max-width:1180px) {
  .atlas-topbar { grid-template-columns:minmax(128px,.44fr) minmax(112px,.36fr) minmax(0,1fr) auto; gap:9px; }
  .owner-alerts-open { padding-right:8px; }
  .owner-alerts-open small { display:none; }
}
@media (min-width:1101px) and (max-width:1360px) {
  /* The fixed rail leaves a narrower stage at this range. Prioritise the
     command field, then retain compact counted entry points before labels. */
  .atlas-topbar { grid-template-columns:44px 44px minmax(0,1fr) auto; gap:8px; }
  .needs-you, .owner-alerts-open { width:44px; min-width:44px; padding:4px; grid-template-columns:1fr; justify-items:center; }
  .needs-you > span, .owner-alerts-open > span:nth-child(2) { display:none; }
  .needs-you .needs-count { min-width:26px; }
  .owner-alerts-open .owner-alert-icon { justify-self:center; }
  .topbar-controls { gap:5px; }
  .topbar-controls .walkthrough-launch { width:44px; min-width:44px; padding:0; justify-content:center; }
  #walkthroughOpen span, #projectSync span, #projectSync .sync-state, #helpOpen span { display:none; }
  .top-owner { display:none; }
}
@media (max-width:900px) {
  .atlas-topbar { grid-template-columns:auto minmax(118px,.42fr) minmax(0,1fr) auto; }
  .needs-you { min-width:0; }
  .needs-you small { display:none; }
  .owner-alerts-open { min-width:44px; grid-template-columns:28px minmax(0,1fr) auto; }
}
@media (max-width:760px) {
  .atlas-topbar { grid-template-columns:38px minmax(0,1fr) auto; gap:7px; }
  .needs-you { display:none; }
  .owner-alerts-open { width:38px; min-height:38px; padding:4px; grid-template-columns:1fr; border-radius:8px; }
  .owner-alerts-open > span:nth-child(2) { display:none; }
  .owner-alert-icon { width:28px; height:28px; justify-self:center; }
  .owner-alert-count { min-width:21px; width:auto; height:18px; padding:0 3px; position:absolute; margin:0 0 24px 24px; border:2px solid var(--paper); border-radius:7px; font-size:9px; line-height:1; }
  .owner-alert-dialog { width:min(100vw - 18px,650px); max-height:calc(100dvh - 18px); }
  .owner-alert-dialog form { padding:17px 15px; }
  .owner-alert-intro { margin-bottom:13px; font-size:15px; }
  .owner-alert-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .owner-alert-toolbar button { min-height:42px; font-size:14px; }
  .owner-alert-source { padding:9px 0; }
  .owner-alert-list { max-height:calc(100dvh - 310px); }
  .owner-alert-row { grid-template-columns:32px minmax(0,1fr); gap:9px; padding:13px 0; }
  .owner-alert-mark { width:30px; height:30px; }
  .owner-alert-actions { grid-column:2; min-width:0; display:flex; flex-wrap:wrap; }
  .owner-alert-actions .button { flex:0 1 auto; min-height:40px; font-size:14px; }
  .owner-alert-acknowledged, .owner-alert-readonly { min-height:40px; }
}
@media (prefers-reduced-motion:reduce) {
  .owner-alerts-open, .owner-alert-toolbar button { transition:none; }
}

/* =========================================================================
   Bridge command surface v3 (issue #153) - DESIGN.md "Bridge command
   surface v3" + "v3 amendments after adversarial review". Class names below
   are read straight from the live renderNextStrip/renderAttention/
   renderDeliveryPulse/renderReleaseLane/renderWaveReadiness/
   renderBridgeBank/renderBridgeEvidence output in atlas.js - not guessed
   from the contract's prose. Icons stay the standard monochrome <img>
   (inverted on dark via the existing filter rules); entity colour is
   carried by a left edge on each section card, never by recolouring an
   icon (see "Icon rendering reality" in the implementation contract).
   ========================================================================= */

/* ---- Section jump menu (nav.bridge-jump > button.jump-item) ------------- */
.bridge-jump { position:sticky; top:72px; z-index:18; display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 18px; padding:8px 0 10px; background:var(--canvas); }
@media (min-width:901px) { .bridge-jump { top:108px; } }
.jump-item { min-height:44px; padding:8px 10px; display:inline-flex; align-items:center; gap:6px; color:var(--muted); background:var(--paper-strong); border:1px solid var(--rule); border-radius:10px; font-size:var(--type-control); font-weight:700; white-space:nowrap; }
.jump-item img { width:15px; height:15px; flex:none; opacity:.75; }
html[data-theme="dark"] .jump-item img { filter:invert(1); }
.jump-item:hover { color:var(--ink); border-color:var(--orange); }
.jump-item.is-active { color:var(--ink); font-weight:800; border-color:var(--orange); box-shadow:inset 0 -3px 0 var(--orange); }
.jump-item.is-active img { opacity:1; }
@media (max-width:760px) {
  .bridge-jump { position:sticky; top:62px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .jump-item { justify-content:flex-start; }
}

/* Bridge section roots: sticky topbar + shortcut bar + jump menu offset, so
   a jumped-to or anchor-scrolled section never lands underneath them. */
#bridge-next, #bridge-decisions, #bridge-live, #bridge-release, #bridge-waves, #bridge-bank, #bridge-evidence { scroll-margin-top:140px; }
@media (max-width:900px) { #bridge-next, #bridge-decisions, #bridge-live, #bridge-release, #bridge-waves, #bridge-bank, #bridge-evidence { scroll-margin-top:96px; } }
@media (max-width:760px) { #bridge-next, #bridge-decisions, #bridge-live, #bridge-release, #bridge-waves, #bridge-bank, #bridge-evidence { scroll-margin-top:112px; } }

/* ---- Day line (header.dayline > span.d/.g/.r), Bridge-only markup ------- */
.dayline { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 16px; padding:8px 0 16px; border-bottom:1px solid var(--rule); }
.dayline .d { color:var(--orange-text); font-size:var(--type-caption); font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.dayline .g { flex:1 1 auto; min-width:200px; font:600 19px var(--serif); color:var(--ink); }
.dayline .r { color:var(--muted); font-size:var(--type-control); }
.dayline .r b { color:var(--atlas-moss-on-dark); font-weight:700; }

/* ---- Shared section-card chrome for every Bridge section (entity colour
   is the left edge, per "Icon rendering reality" - never a recoloured
   icon). Bank inputs = warm blue, Evidence = moss, Next action/Decisions/
   Wave readiness = orange, Live delivery/Release path = neutral. --------- */
.next-strip, .decide, .live-delivery, .release-lane, .wave-readiness, .bank-inputs, .evidence-river {
  margin-top:18px; background:var(--paper-strong); border:1px solid var(--rule); border-radius:10px; overflow:hidden;
}
.next-strip { border-left:3px solid var(--orange); padding:20px 22px 18px; }
.decide, .wave-readiness { border-top:3px solid var(--orange); }
.bank-inputs { border-top:3px solid var(--atlas-blue-on-dark); }
.evidence-river { border-top:3px solid var(--atlas-moss-on-dark); }
.live-delivery, .release-lane { border-top:3px solid var(--rule); }

/* ---- Shared section header (header.sec-head > img.sec-icon + h3 + .sec-sp
   spacer + a trailing chip or .sec-note) - decide/live/release/wave/bank/
   evidence all use this same header. --------------------------------------- */
.sec-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--rule); }
.sec-icon { width:16px; height:16px; flex:none; }
html[data-theme="dark"] .sec-icon { filter:invert(1); }
.sec-head h3 { margin:0; flex:none; font-size:var(--type-control); font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); }
.sec-sp { flex:1 1 auto; }
.sec-note { color:var(--muted); font-size:var(--type-caption); font-weight:700; white-space:normal; }

/* ---- 3. Next action strip (section.next-strip#bridge-next) -------------- */
.ns-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ns-icon { width:20px; height:20px; flex:none; }
html[data-theme="dark"] .ns-icon { filter:invert(1); }
.ns-id { flex:none; color:var(--muted); font-size:var(--type-caption); font-weight:700; }
.ns-head h2 { flex:1 1 260px; min-width:0; margin:0; font:600 clamp(20px,2vw,22px)/1.3 var(--serif); letter-spacing:-.01em; color:var(--ink); overflow-wrap:anywhere; }
.ns-action { min-height:44px; padding:0 16px; display:inline-flex; align-items:center; gap:8px; flex:none; color:#1a1002; background:var(--orange); border:1px solid var(--orange); border-radius:9px; font-size:var(--type-control); font-weight:700; white-space:nowrap; }
.ns-action:hover { background:color-mix(in srgb,var(--orange) 85%,var(--night)); border-color:color-mix(in srgb,var(--orange) 85%,var(--night)); }
.ns-action img { width:14px; height:14px; flex:none; filter:invert(1); }
.ns-row { display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; margin-top:12px; font-size:var(--type-control); }
.ns-k { flex:none; min-width:170px; color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.ns-v { color:var(--ink); overflow-wrap:anywhere; white-space:normal; }
.ns-v.ns-gap { padding-left:10px; border-left:2px solid var(--atlas-clay-on-dark); color:var(--atlas-clay-on-dark); }

/* ---- 4. Decisions and owner actions (section.decide#bridge-decisions) --- */
.decide-body { padding:2px 16px 6px; }
.quiet { padding:14px 0; color:var(--muted); font-size:var(--type-body); line-height:1.5; }
.decide-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; padding:14px 0; border-bottom:1px solid var(--rule); }
.decide-row:last-child { border-bottom:0; }
.dr-text { flex:1 1 260px; min-width:0; display:flex; flex-direction:column; gap:3px; }
.dr-text b { font-size:var(--type-control); font-weight:700; color:var(--ink); line-height:1.4; overflow-wrap:anywhere; }
.dr-text > b > .dr-id { margin-right:6px; color:var(--muted); font-weight:700; }
.dr-text span { font-size:var(--type-caption); color:var(--muted); line-height:1.45; overflow-wrap:anywhere; white-space:normal; }
.dr-who { flex:none; max-width:220px; color:var(--muted); font-size:var(--type-caption); white-space:normal; overflow-wrap:anywhere; text-align:right; }
.dr-who:empty { display:none; }
.dr-open { min-height:44px; padding:0 14px; display:inline-flex; align-items:center; gap:7px; flex:none; color:var(--orange-text); background:transparent; border:1px solid color-mix(in srgb,var(--orange) 45%,var(--rule)); border-radius:9px; font-size:var(--type-control); font-weight:700; white-space:nowrap; }
.dr-open:hover { background:color-mix(in srgb,var(--orange) 8%,transparent); border-color:var(--orange); }
.dr-open img { width:14px; height:14px; flex:none; }
html[data-theme="dark"] .dr-open img { filter:invert(1); }

/* ---- 4b. Decisions actor groups (issue #165): the flat decide-row list is
   grouped by who acts - Agents, Humans - as two .bridge-fold disclosures,
   collapsed by default so a long mixed list stops reading as one wall.
   Expanding either reveals the unchanged .decide-row markup above, so no
   row styling below duplicates it. Entity colour lives on the title text
   only (coloredTitle/.title-agent, .title-owner), never a recoloured icon,
   per "Icon rendering reality". */
.decide-body .actor-group { margin:10px 0 0; border-color:var(--rule); background:var(--paper); }
.decide-body .actor-group:first-child { margin-top:4px; }
.decide-body .actor-group > summary { min-height:44px; padding:0 14px; gap:9px; font-weight:700; }
.actor-group-icon { width:15px; height:15px; flex:none; opacity:.85; }
html[data-theme="dark"] .actor-group-icon { filter:invert(1); }
.actor-group-title { margin:0; font:800 var(--type-control)/1 inherit; letter-spacing:.02em; }
.actor-group-count { flex:none; color:var(--muted); font-size:var(--type-caption); font-weight:700; }
.actor-group-body { padding:0 14px; }
.actor-group-body .decide-row:first-child { border-top:1px solid var(--rule); }
.actor-group-empty { padding:12px 0; }

/* ---- 5. Live delivery (section.live-delivery#bridge-live) --------------- */
.ld-body { padding:14px 16px 16px; }
.ld-counts { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:14px; }
.ld-count { min-height:44px; padding:10px 14px; display:flex; flex-direction:column; gap:2px; align-items:flex-start; justify-content:center; text-align:left; color:inherit; background:var(--paper); border:1px solid var(--rule); border-radius:10px; }
.ld-count:hover { border-color:var(--orange); }
.ld-count .n { font-family:var(--mono); font-size:1.375rem; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.ld-count .l { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--type-caption); }
.ld-count .l img { width:14px; height:14px; flex:none; opacity:.85; }
html[data-theme="dark"] .ld-count .l img { filter:invert(1); }
.ld-count.is-halt { border-left:3px solid var(--atlas-oxblood-on-dark); }
.ld-count.is-halt .l { color:var(--atlas-oxblood-on-dark); }
.ld-handoff { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; border-top:1px solid var(--rule); }
.hchip { min-height:44px; padding:6px 14px; display:inline-flex; align-items:center; gap:8px; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:9px; font-size:var(--type-control); white-space:normal; overflow-wrap:anywhere; }
.hchip:hover { border-color:var(--orange); }
.hchip .av { width:26px; height:26px; flex:none; display:grid; place-items:center; color:var(--orange-text); background:var(--night); border:1px solid var(--orange); border-radius:7px; font-size:var(--type-caption); font-weight:700; }
.hchip-icon { width:15px; height:15px; filter:invert(1); }
.hchip b { font-weight:700; }
.ld-empty { padding:10px 0; color:var(--muted); font-size:var(--type-body); }
.ld-asof { margin:0; padding:10px 0 0; color:var(--muted); font-size:var(--type-caption); }
.ld-events { border-top:1px solid var(--rule); }
.evrow { display:flex; gap:10px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--rule); font-size:var(--type-control); }
.evrow:last-child { border-bottom:0; }
.evrow-icon { width:16px; height:16px; flex:none; margin-top:2px; opacity:.85; }
html[data-theme="dark"] .evrow-icon { filter:invert(1); }
.evrow .t { flex:1 1 auto; min-width:0; color:var(--muted); overflow-wrap:anywhere; }
.evrow .t b { color:var(--ink); font-weight:700; }
.evrow time { flex:none; margin-left:auto; color:var(--muted); font:700 var(--type-caption) var(--mono); white-space:nowrap; }
.ld-repos { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; padding-top:12px; margin-top:2px; border-top:1px solid var(--rule); }
.ld-repo { min-width:0; padding:14px 16px; background:var(--paper); border:1px solid var(--rule); border-radius:10px; }
.ld-repo h5 { margin:0 0 6px; font-size:var(--type-control); font-weight:700; color:var(--ink); overflow-wrap:anywhere; }
.ld-repo-m { display:flex; flex-wrap:wrap; gap:6px 16px; color:var(--muted); font-size:var(--type-caption); }
.ld-repo-m b { color:var(--ink); }
.ld-sync-notice { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding-top:12px; margin-top:2px; border-top:1px solid var(--rule); color:var(--muted); font-size:var(--type-control); }
.ld-sync-notice img { width:16px; height:16px; flex:none; }
html[data-theme="dark"] .ld-sync-notice img { filter:invert(1); }
.ld-sync-notice b { color:var(--ink); }
.ld-sync-notice .dr-open { margin-left:auto; }

/* ---- 6. Release path (section.release-lane#bridge-release) -------------- */
.rl-body { padding:14px 16px 16px; }
.gate-lane { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.gate-lane .gate { flex:1 1 240px; max-width:360px; min-height:44px; padding:10px 14px; display:flex; grid-template-columns:unset; align-items:center; gap:10px; background:var(--paper); border:1px solid var(--rule); border-bottom:1px solid var(--rule); border-radius:10px; }
.gate-lane .gate:last-child { border-bottom:1px solid var(--rule); }
.gate-lane .gate-icon { width:26px; height:26px; border-radius:7px; flex:none; }
.gate-lane .gate > div { min-width:0; flex:1 1 auto; }
.gate-lane .gate strong { display:block; font-size:var(--type-control); }
.gate-lane .gate small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); line-height:1.4; overflow-wrap:anywhere; }
.gate-lane .gate-state { flex:none; }
.gate-lane .gate time:empty { display:none; }

/* ---- 7. Wave readiness (section.wave-readiness#bridge-waves) ------------ */
.wave-strip { display:flex; flex-wrap:wrap; align-items:center; gap:16px 24px; padding:16px; }
.wnum { display:flex; flex-direction:column; gap:2px; }
.wnum .n { font-family:var(--mono); font-size:1.5rem; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.wnum .l { color:var(--muted); font-size:var(--type-caption); }
.wnum.is-blocked .n { color:var(--atlas-clay-on-dark); }
.wave-why { flex:1 1 260px; min-width:0; color:var(--muted); font-size:var(--type-control); overflow-wrap:anywhere; }
.wave-why b { color:var(--ink); }

/* ---- 8/9. Bank inputs and Evidence bodies wrap the existing .waiting/
   .wait-row and .ledger/.ledger-row markup unchanged - only the new card
   chrome above and this padding are added. ---------------------------------- */
.bank-body, .evidence-body { padding-bottom:4px; }
.bank-body .waiting, .evidence-body .ledger { border-top:0; }

/* ---- prefers-contrast:more: extend the existing app-wide block rather
   than duplicate it (raises --rule/--muted already; this raises Bridge's
   own border widths and edges to match). ----------------------------------- */
@media (prefers-contrast:more) {
  .jump-item, .decide-row, .ld-count, .hchip, .ld-repo, .gate-lane .gate { border-width:2px; }
  .next-strip, .decide, .wave-readiness, .bank-inputs, .evidence-river, .live-delivery, .release-lane { border-width:2px; }
  .next-strip { border-left-width:4px; }
  .decide, .wave-readiness { border-top-width:4px; }
  .bank-inputs, .evidence-river { border-top-width:4px; }
  .ld-count.is-halt, .ns-v.ns-gap { border-left-width:3px; }
}
/* ---- Viewport density, issue #139 ---------------------------------------
   Atlas is an operating desk. Keep the typography and control floors from
   DESIGN.md, then reclaim the oversized shell and decorative padding so the
   owner reaches the active evidence in the first viewport. This terminal
   layer intentionally governs every route that uses the shared shell. */
.atlas-topbar {
  height:64px;
  padding-inline:20px;
  gap:16px;
}

.atlas-shortcut-bar {
  top:64px;
  min-height:30px;
  padding:3px 20px;
  gap:3px 14px;
}

.atlas-workbench {
  min-height:calc(100vh - 64px);
  padding:16px 24px 32px;
}

.dayline,
.page-head {
  gap:20px;
  padding:3px 0 12px;
}

.dayline h1,
.page-head h1 {
  margin-block:3px 5px;
  font-size:clamp(31px,2.65vw,43px);
  line-height:1.06;
}

.dayline p,
.page-head p {
  max-width:68ch;
  line-height:1.48;
}

/* The statistic and its direct actions are a compact, wrapping unit. It no
   longer makes a separate tall action column on wide pages. */
.headline-stack {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px 10px;
  max-width:510px;
}

.headline-stat {
  padding-block:7px;
}

.headline-stat strong { font-size:23px; }

.owner-desk,
.mission-ledger {
  margin-top:14px;
}

.next-result {
  padding:18px 22px;
}

.next-result::before { height:64px; }

.next-result h2 {
  margin:5px 0 8px;
  font-size:clamp(26px,2.15vw,35px);
  line-height:1.1;
}

.release-path { padding:18px; }
.release-path h3 { margin-block:3px 9px; font-size:20px; }
.gate { padding-block:8px; }

.section-title { padding-bottom:6px; }
.section-title h2 { font-size:24px; }

/* Ledger rows keep their operational labels and actions at the existing
   floors, but stop allocating presentation-sized blank vertical space. */
.mission-row {
  min-height:94px;
  padding-block:12px;
}

.mission-copy p { margin-block:4px; line-height:1.45; }

.decision {
  padding-block:13px;
}

/* Record routes share the same viewport budget. The facts stay readable and
   all recorded controls remain present, with less ornamental breathing room. */
.record-workspace { padding-bottom:40px; }
.record-page-head { padding-block:14px 10px; gap:18px; }
.record-page-head h1 { margin-block:3px 5px; }
.record-hero { padding:18px 22px; gap:24px; }
.record-hero > dl > div { padding-block:5px; }
.record-page-grid { margin-top:18px; }

/* Route leads that carry current facts, not decoration. These retain every
   fact and action while using one compact evidence band before the ledger. */
.delivery-banner {
  margin-top:12px;
  padding:10px 12px;
  gap:9px;
}

.delivery-banner p { line-height:1.4; }
.gate-spine-wrap,
.delivery-filters { margin-top:12px; }

.truth-strip,
.commercial-banner { margin-top:14px; }

.truth-strip > span {
  min-height:72px;
  padding:12px;
}

.truth-strip b { margin-top:5px; }

.commercial-banner > div {
  min-height:98px;
  padding:12px;
}

.commercial-banner strong { margin:6px 0 5px; }

.front-load-section { padding:12px 14px; }
.front-load-section .section-title { margin-bottom:6px; }
.front-load-lede { margin-bottom:8px; line-height:1.45; }
.front-load-note { margin-top:8px; }

/* Split workspaces keep the rail visible without turning the primary column
   into a tall empty panel. The primary work continues beside the release
   evidence, so the next decision or QA candidate remains in the viewport. */
.owner-desk:has(.owner-desk-primary) {
  align-items:start;
  gap:14px;
  background:transparent;
  border:0;
  box-shadow:none;
}

.owner-desk-primary { min-width:0; display:grid; gap:14px; }

.owner-desk:has(.owner-desk-primary) .next-result {
  background:var(--paper-strong);
  border:1px solid var(--rule);
}

.owner-desk:has(.owner-desk-primary) .release-path {
  border:1px solid var(--rule);
}

.owner-desk-primary .attention,
.owner-desk-primary .data-section { margin-top:0; }

/* Help uses two independent evidence sheets. The guided action remains
   discoverable, but its compact key hints no longer pin an empty tall rail. */
.help-hero {
  align-items:start;
  gap:14px;
  background:transparent;
  border:0;
}

.help-hero-copy,
.help-hero-side { border:1px solid var(--rule); }
.help-hero-side { align-self:start; }
.help-key-hints { margin-top:0; }

/* Filter controls are actions, not tags. Keep the 44 px target while
   preserving density with concise labels and wrapped groups. */
.filter-field-trigger,
.filter-select { min-height:44px; }

@media (max-width:760px) {
  #helpOpen { display:none; }
  .owner-desk:has(.owner-desk-primary) { gap:12px; }
  .help-hero { gap:12px; }
}

@media (max-width:1180px) {
  .atlas-topbar { padding-inline:16px; }
  .atlas-shortcut-bar { padding-inline:16px; }
  .atlas-workbench { padding-inline:18px; }
  .dayline,
  .page-head { gap:16px; }
  .headline-stack { max-width:420px; }
}

@media (max-width:760px) {
  .atlas-topbar { height:60px; }
  .atlas-workbench {
    min-height:calc(100vh - 60px);
    padding:12px 12px 92px;
  }
  .dayline,
  .page-head { padding-bottom:10px; }
  .dayline h1,
  .page-head h1 { font-size:31px; }
  .headline-stack {
    justify-content:flex-start;
    max-width:none;
    margin-top:10px;
  }
  .next-result { padding:16px 16px 17px; }
  .next-result h2 { font-size:28px; }
  .release-path { padding:16px; }
  .section-title h2 { font-size:23px; }
  .mission-row { min-height:0; padding-block:12px; }
  .record-page-head { padding-block:10px; gap:12px; }
  .record-hero { padding:16px; gap:16px; }
  .truth-strip > span { min-height:64px; padding:10px; }
  .commercial-banner > div { min-height:0; padding:12px; }
  .front-load-section { padding:12px; }
}

/* Owner orchestration. A compact editorial ledger keeps the decision, route,
   ticket truth and eligibility evidence together. Prepared handoffs remain
   inert until the owner uses the confirmed action in the final column. */
.orchestration-workspace { margin-top:16px; padding-top:0; border-top:2px solid var(--ink); }
.orchestration-title { align-items:flex-start; padding:13px 0 11px; }
.orchestration-title h2 { margin-bottom:4px; }
.orchestration-title p { max-width:68ch; margin:0; color:var(--muted); font-size:var(--type-control); line-height:1.45; }
.orchestration-title .button { flex:none; min-height:44px; }
.orchestration-strip { display:grid; grid-template-columns:1.35fr repeat(3,minmax(0,1fr)); border-bottom:1px solid var(--rule); }
.orchestration-strip > span { min-height:61px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; border-right:1px solid var(--rule); }
.orchestration-strip > span:last-child { border-right:0; }
.orchestration-strip small { color:var(--muted); font-size:var(--type-caption); font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.orchestration-strip b { color:var(--ink); font:600 24px/1 var(--serif); font-variant-numeric:tabular-nums; }
.orchestration-strip .owner-total { background:color-mix(in srgb,var(--orange) 9%,var(--paper-strong)); box-shadow:inset 3px 0 0 var(--orange); }
.orchestration-strip .owner-total small { color:var(--ink); }
.orchestration-strip .owner-total b { color:var(--orange); font-size:31px; }
.orchestration-simulation { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:12px 0; border-bottom:1px solid var(--rule); }
.orchestration-simulation .overline { display:block; margin-bottom:4px; }
.orchestration-simulation strong { display:block; color:var(--ink); font-size:var(--type-emphasis); line-height:1.3; }
.orchestration-simulation p { margin:4px 0 0; max-width:82ch; color:var(--muted); font-size:var(--type-control); line-height:1.45; }
.orchestration-simulation .button { min-height:44px; }
.simulation-complete { display:block; padding:12px 0 10px; }
.simulation-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.simulation-heading .label { flex:none; }
.simulation-details { margin-top:9px; border-top:1px solid var(--rule); }
.simulation-details > summary { min-height:44px; display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; color:var(--ink); }
.simulation-details > summary::-webkit-details-marker { display:none; }
.simulation-details > summary > img { width:16px; height:16px; flex:none; }
html[data-theme="dark"] .simulation-details > summary > img { filter:invert(1); }
.simulation-details > summary > span { display:grid; gap:1px; min-width:0; }
.simulation-details > summary b { font-size:var(--type-control); }
.simulation-details > summary small { color:var(--muted); font-size:var(--type-caption); }
.simulation-details > summary .chevron { width:14px; height:14px; margin-left:auto; transition:transform .15s ease; }
.simulation-details[open] > summary .chevron { transform:rotate(180deg); }
.simulation-output-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:11px; border-top:1px solid var(--rule); }
.simulation-output-list > div { display:grid; grid-template-columns:18px minmax(0,1fr); column-gap:7px; align-content:start; min-height:92px; padding:10px; border-right:1px solid var(--rule); }
.simulation-output-list > div:first-child { padding-left:0; }
.simulation-output-list > div:last-child { border-right:0; }
.simulation-output-list img { width:15px; height:15px; margin-top:2px; }
html[data-theme="dark"] .simulation-output-list img { filter:invert(1); }
.simulation-output-list strong { grid-column:2; font-size:var(--type-caption); }
.simulation-output-list b { grid-column:2; margin-top:2px; color:var(--moss); font-size:var(--type-caption); line-height:1.35; }
.simulation-output-list small { grid-column:2; margin-top:3px; color:var(--muted); font-size:var(--type-caption); line-height:1.35; }
.orchestration-controls { display:grid; grid-template-columns:minmax(260px,1fr) auto minmax(188px,auto); align-items:center; gap:10px; padding:11px 0; }
.orchestration-search { min-width:0; }
.orchestration-controls .filter-select { min-width:0; }
.orchestration-list { margin-top:4px; }
.orchestration-row { position:relative; display:grid; grid-template-columns:36px minmax(0,1fr) minmax(138px,auto); gap:12px; align-items:start; padding:12px 0; border-bottom:1px solid var(--rule); }
.orchestration-row::before { content:""; position:absolute; inset:0 auto 0 -8px; width:3px; background:var(--rule); }
.orchestration-row.state-eligible::before { background:var(--orange); }
.orchestration-row.state-blocked::before { background:var(--risk); }
.orchestration-row.state-complete::before { background:var(--moss); }
.orchestration-glyph { width:32px; height:32px; display:grid; place-items:center; color:var(--ink); background:transparent; }
.orchestration-row.kind-handoff .orchestration-glyph { background:color-mix(in srgb,var(--violet) 10%,var(--paper-strong)); }
.orchestration-row.kind-blocker .orchestration-glyph { color:var(--risk); }
.orchestration-glyph img { width:17px; height:17px; }
html[data-theme="dark"] .orchestration-glyph img { filter:invert(1); }
.orchestration-copy { min-width:0; }
.orchestration-kicker { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.orchestration-kicker > span:first-child { color:var(--muted); font-size:var(--type-caption); font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.orchestration-kicker .label { min-height:28px; }
.orchestration-copy > strong { display:block; margin-top:5px; color:var(--ink); font-size:var(--type-emphasis); line-height:1.3; overflow-wrap:anywhere; }
.orchestration-copy > p { margin:4px 0 0; max-width:82ch; color:var(--muted); font-size:var(--type-control); line-height:1.45; }
.orchestration-route { display:grid; grid-template-columns:minmax(210px,auto) minmax(0,1fr); gap:8px 14px; align-items:center; margin-top:9px; }
.orchestration-route > span:first-child { display:flex; align-items:center; gap:7px; min-width:0; }
.orchestration-route > span:first-child > img { width:14px; height:14px; flex:none; opacity:.65; }
html[data-theme="dark"] .orchestration-route > span:first-child > img { filter:invert(1); }
.orchestration-route .type-chip { min-width:0; }
.orchestration-route .chip-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.orchestration-ticket { min-width:0; display:flex; align-items:baseline; justify-content:flex-end; gap:8px; text-align:right; }
.orchestration-ticket a, .orchestration-ticket > b { flex:none; color:var(--blue); font:800 var(--type-caption) var(--mono); text-decoration:none; }
.orchestration-ticket a { display:inline-flex; align-items:center; gap:5px; }
.orchestration-ticket a:hover { color:var(--orange); text-decoration:underline; text-underline-offset:3px; }
.orchestration-ticket a img { width:13px; height:13px; }
.orchestration-ticket small { min-width:0; color:var(--muted); font-size:var(--type-caption); overflow-wrap:anywhere; }
.orchestration-row-end { min-height:100%; display:flex; flex-direction:column; align-items:flex-end; justify-content:space-between; gap:10px; }
.orchestration-row-end time { color:var(--muted); font:600 var(--type-caption) var(--mono); white-space:nowrap; }
.owner-action-label { color:var(--muted); font-size:var(--type-caption); font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.orchestration-actions { display:grid; justify-items:stretch; gap:6px; }
.orchestration-action { min-height:44px; white-space:nowrap; }
.orchestration-reasons { margin-top:9px; border-top:1px solid var(--rule); }
.orchestration-reasons > summary { min-height:44px; display:flex; align-items:center; gap:7px; color:var(--ink); cursor:pointer; list-style:none; font-size:var(--type-caption); font-weight:800; }
.orchestration-reasons > summary::-webkit-details-marker { display:none; }
.orchestration-reasons > summary img { width:14px; height:14px; }
html[data-theme="dark"] .orchestration-reasons > summary img { filter:invert(1); }
.orchestration-reasons > summary .chevron { margin-left:auto; transition:transform .15s ease; }
.orchestration-reasons[open] > summary .chevron { transform:rotate(180deg); }
.orchestration-reasons ul { display:grid; gap:5px; margin:0 0 3px; padding:0 0 0 22px; color:var(--muted); font-size:var(--type-control); line-height:1.4; }
.orchestration-transcript { margin-top:12px; border-top:2px solid var(--ink); }
.orchestration-transcript > summary { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--ink); cursor:pointer; list-style:none; }
.orchestration-transcript > summary::-webkit-details-marker { display:none; }
.orchestration-transcript > summary > span { display:flex; align-items:center; gap:8px; }
.orchestration-transcript > summary img { width:17px; height:17px; }
html[data-theme="dark"] .orchestration-transcript > summary img { filter:invert(1); }
.orchestration-transcript > summary small { color:var(--muted); font-size:var(--type-caption); font-weight:600; }
.orchestration-transcript > summary .chevron { transition:transform .15s ease; }
.orchestration-transcript[open] > summary .chevron { transform:rotate(180deg); }
.orchestration-transcript-list { border-top:1px solid var(--rule); }
.orchestration-transcript-list article { display:grid; grid-template-columns:24px minmax(0,1fr) auto minmax(128px,auto); gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid var(--rule); }
.orchestration-transcript-list article > span img { width:15px; height:15px; }
html[data-theme="dark"] .orchestration-transcript-list article > span img { filter:invert(1); }
.orchestration-transcript-list strong { display:block; font-size:var(--type-control); line-height:1.35; }
.orchestration-transcript-list small { display:block; margin-top:2px; color:var(--muted); font-size:var(--type-caption); }
.orchestration-transcript-list time { color:var(--muted); font:600 var(--type-caption) var(--mono); text-align:right; white-space:nowrap; }
.orchestration-unavailable { display:flex; align-items:flex-start; gap:10px; padding:12px 0; color:var(--muted); }
.orchestration-unavailable > img { width:18px; height:18px; flex:none; }
html[data-theme="dark"] .orchestration-unavailable > img { filter:invert(1); }
.orchestration-unavailable strong, .orchestration-unavailable small { display:block; font-size:var(--type-control); line-height:1.45; }
.orchestration-unavailable strong { color:var(--ink); }

@media (max-width:1120px) {
  .simulation-output-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .simulation-output-list > div:nth-child(2) { border-right:0; }
  .simulation-output-list > div:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .simulation-output-list > div:nth-child(3) { padding-left:0; }
  .orchestration-controls { grid-template-columns:minmax(0,1fr) auto; }
  .orchestration-route { grid-template-columns:1fr; }
  .orchestration-ticket { justify-content:flex-start; text-align:left; }
}

@media (max-width:760px) {
  .orchestration-title { display:grid; gap:10px; }
  .orchestration-title .button { justify-self:start; }
  .orchestration-simulation { grid-template-columns:1fr; gap:10px; }
  .simulation-heading { display:grid; gap:8px; }
  .simulation-heading .label { justify-self:start; }
  .simulation-output-list { grid-template-columns:1fr; }
  .simulation-output-list > div { min-height:0; padding:9px 0; border-right:0; border-bottom:1px solid var(--rule); }
  .simulation-output-list > div:first-child, .simulation-output-list > div:nth-child(3) { padding-left:0; }
  .simulation-output-list > div:last-child { border-bottom:0; }
  .orchestration-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .orchestration-strip > span:nth-child(2) { border-right:0; }
  .orchestration-strip > span:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
  .orchestration-controls { grid-template-columns:1fr; }
  .orchestration-row { grid-template-columns:32px minmax(0,1fr); gap:10px; }
  .orchestration-row-end { grid-column:2; min-height:0; flex-direction:row; align-items:center; justify-content:space-between; flex-wrap:wrap; }
  .orchestration-action { width:100%; min-width:0; justify-content:center; white-space:normal; overflow-wrap:anywhere; text-align:center; }
  .orchestration-actions { width:100%; }
  .owner-action-label { width:100%; }
  .orchestration-route > span:first-child { flex-wrap:wrap; }
  .orchestration-route .chip-text { white-space:normal; }
  .orchestration-ticket { display:grid; justify-content:start; gap:2px; }
  .orchestration-transcript-list article { grid-template-columns:22px minmax(0,1fr) auto; }
  .orchestration-transcript-list article .label { grid-column:2; justify-self:start; }
  .orchestration-transcript-list time { grid-column:2 / -1; text-align:left; }
}

/* Bank package workflow. The workspace keeps one action sequence in view,
   with ticket truth and audit evidence adjacent rather than scattered across
   separate client, document and decision surfaces. */
.bank-page-head { align-items:end; }
.bank-ticket-strip {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:13px 16px;
  border-top:2px solid var(--orange);
  border-bottom:1px solid var(--rule);
  background:color-mix(in srgb, var(--paper-strong) 88%, var(--orange));
}
.bank-ticket-strip > div { min-width:0; display:grid; gap:3px; }
.bank-ticket-strip strong { font-size:var(--type-control); color:var(--ink); }
.bank-ticket-strip small { color:var(--muted); }
.bank-ticket-strip > div:last-child { justify-items:end; text-align:right; }
.bank-ticket-authority { display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; color:var(--muted); font-size:var(--type-caption); }
.bank-ticket-authority img { width:14px; height:14px; }
.bank-ticket-link { display:inline-flex; align-items:center; gap:7px; color:var(--blue); font-size:var(--type-control); font-weight:800; text-decoration:none; }
.bank-ticket-link img { width:15px; height:15px; }
.bank-ticket-link:hover { color:var(--orange); text-decoration:underline; text-underline-offset:3px; }
.bank-workflow { margin-top:14px; border:1px solid var(--rule); background:var(--paper); }
.bank-stage-rail { display:grid; grid-template-columns:repeat(3,1fr); border-bottom:1px solid var(--rule); background:var(--paper-strong); }
.bank-stage {
  min-height:74px;
  display:grid;
  grid-template-columns:32px 1fr;
  grid-template-rows:auto auto;
  align-content:center;
  gap:1px 9px;
  padding:12px 14px;
  border:0;
  border-right:1px solid var(--rule);
  border-radius:0;
  background:transparent;
  color:var(--muted);
  text-align:left;
}
.bank-stage:last-child { border-right:0; }
.bank-stage > span { grid-row:1 / span 2; display:grid; place-items:center; width:28px; height:28px; border:1px solid var(--rule); color:var(--muted); font-size:var(--type-caption); font-weight:900; font-variant-numeric:tabular-nums; }
.bank-stage b { color:var(--ink); font-size:var(--type-control); }
.bank-stage small { color:var(--muted); font-size:var(--type-caption); }
.bank-stage:hover { background:color-mix(in srgb, var(--orange) 7%, transparent); }
.bank-stage.active { box-shadow:inset 0 -3px 0 var(--orange); background:color-mix(in srgb, var(--orange) 9%, transparent); }
.bank-stage.active > span { border-color:var(--orange); color:var(--orange); }
.bank-stage.complete > span { border-color:var(--moss); color:var(--moss); }
.bank-stage-body { padding:18px; }
.bank-stage-sheet { display:grid; gap:16px; }
.bank-section-heading { display:flex; align-items:start; justify-content:space-between; gap:18px; }
.bank-section-heading h2 { margin:3px 0 5px; font-size:clamp(24px,2vw,31px); line-height:1.1; }
.bank-section-heading p { max-width:66ch; margin:0; color:var(--muted); line-height:1.46; }
.bank-action-tray { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; max-width:590px; }
.bank-action-tray .button { min-height:44px; white-space:nowrap; }
.bank-file-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.bank-file { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid var(--rule); background:var(--paper-strong); color:var(--ink); text-decoration:none; }
.bank-file > span { min-width:0; display:grid; grid-template-columns:18px minmax(0,1fr); column-gap:9px; align-items:center; }
.bank-file > span > img { grid-row:1 / span 2; width:17px; height:17px; }
.bank-file b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--type-control); }
.bank-file small { color:var(--muted); font-size:var(--type-caption); }
.bank-file > img { width:17px; height:17px; flex:none; }
.bank-file:hover { border-color:var(--orange); background:color-mix(in srgb, var(--orange) 7%, var(--paper-strong)); }
.bank-boundary-note, .bank-callout { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border-left:3px solid var(--blue); background:color-mix(in srgb, var(--blue) 8%, var(--paper-strong)); color:var(--muted); line-height:1.45; }
.bank-boundary-note img, .bank-callout img { width:18px; height:18px; flex:none; margin-top:2px; }
.bank-boundary-note strong, .bank-callout strong { color:var(--ink); }
.bank-callout.wait { border-left-color:var(--clay); background:color-mix(in srgb, var(--clay) 9%, var(--paper-strong)); }
.bank-private-link { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid color-mix(in srgb, var(--orange) 62%, var(--rule)); background:color-mix(in srgb, var(--orange) 7%, var(--paper-strong)); color:var(--ink); text-decoration:none; }
.bank-private-link > img { width:19px; height:19px; flex:none; }
.bank-private-link > span { flex:1; min-width:0; display:grid; gap:2px; }
.bank-private-link small { color:var(--muted); font-size:var(--type-caption); }
.bank-private-link b { font-size:var(--type-control); }
.bank-private-link:hover { background:color-mix(in srgb, var(--orange) 13%, var(--paper-strong)); }
.bank-classification { border-top:1px solid var(--rule); }
.bank-classification > summary, .bank-audit > summary { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; color:var(--ink); cursor:pointer; font-size:var(--type-control); font-weight:800; list-style:none; }
.bank-classification > summary::-webkit-details-marker, .bank-audit > summary::-webkit-details-marker { display:none; }
.bank-classification summary > img, .bank-audit summary > img { width:17px; height:17px; }
.bank-classification summary > span { display:flex; align-items:center; gap:8px; }
.bank-classification .chevron, .bank-audit .chevron { transition:transform .15s ease; }
.bank-classification[open] .chevron, .bank-audit[open] .chevron { transform:rotate(180deg); }
.bank-classification > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:0 0 4px; }
.bank-classification p { margin:0; color:var(--muted); line-height:1.45; }
.bank-classification strong { color:var(--ink); }
.bank-confirm-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.bank-confirm-grid article { min-height:128px; padding:14px; border-right:1px solid var(--rule); }
.bank-confirm-grid article:last-child { border-right:0; }
.bank-confirm-grid small { color:var(--muted); font-size:var(--type-caption); text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.bank-confirm-grid strong { display:block; margin-top:7px; font-size:20px; color:var(--ink); }
.bank-confirm-grid p { margin:6px 0 0; color:var(--muted); line-height:1.4; }
.bank-lower-grid { display:grid; grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); gap:14px; margin-top:14px; }
.bank-latest-decision, .bank-audit { border-top:2px solid var(--orange); border-bottom:1px solid var(--rule); padding:14px 0; }
.bank-latest-decision .bank-section-heading { align-items:center; }
.bank-latest-decision .bank-section-heading h2 { font-size:22px; }
.bank-latest-decision p { margin:5px 0 8px; color:var(--muted); line-height:1.45; }
.bank-latest-decision small { color:var(--muted); font-size:var(--type-caption); }
.bank-audit { padding:0; }
.bank-audit > summary { padding-inline:0; }
.bank-audit > summary > span { display:flex; align-items:center; gap:8px; }
.bank-audit > summary small { color:var(--muted); font-size:var(--type-caption); font-weight:600; }
.bank-audit > div { display:grid; border-top:1px solid var(--rule); }
.bank-audit article { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--rule); }
.bank-audit article:last-child { border-bottom:0; }
.bank-audit article > span img { width:16px; height:16px; margin-top:2px; }
.bank-audit article div { display:grid; gap:3px; }
.bank-audit article strong { font-size:var(--type-control); line-height:1.35; }
.bank-audit article small { color:var(--muted); font-size:var(--type-caption); }
.bank-sync-footer { display:flex; align-items:center; gap:9px 12px; margin-top:14px; color:var(--muted); font-size:var(--type-caption); }
.bank-sync-footer > img { width:17px; height:17px; }
.bank-sync-footer > span { display:grid; gap:1px; }
.bank-sync-footer strong { color:var(--ink); font-size:var(--type-control); }
.bank-sync-footer small { font-size:var(--type-caption); }

@media (max-width:1024px) {
  .bank-section-heading { display:grid; gap:12px; }
  .bank-action-tray { justify-content:flex-start; max-width:none; }
  .bank-lower-grid { grid-template-columns:1fr; }
}

@media (max-width:760px) {
  .bank-ticket-strip { align-items:start; display:grid; }
  .bank-ticket-strip > div:last-child { justify-items:start; text-align:left; }
  .bank-ticket-authority { justify-content:flex-start; }
  .bank-stage { min-height:68px; grid-template-columns:26px 1fr; gap:1px 6px; padding:10px 8px; }
  .bank-stage > span { width:23px; height:23px; font-size:13px; }
  .bank-stage b { font-size:14px; }
  .bank-stage small { font-size:13px; }
  .bank-stage-body { padding:14px 12px; }
  .bank-file-grid, .bank-classification > div, .bank-confirm-grid { grid-template-columns:1fr; }
  .bank-confirm-grid article { min-height:0; border-right:0; border-bottom:1px solid var(--rule); }
  .bank-confirm-grid article:last-child { border-bottom:0; }
  .bank-action-tray { display:grid; grid-template-columns:1fr; }
  .bank-action-tray .button { justify-content:center; }
  .bank-sync-footer { align-items:flex-start; flex-wrap:wrap; }
}

/* ==========================================================================
   Agent record: Control | Data tabs (issue #160)
   Two tabs on the per-agent record: Control (operate, built here) and Data
   (introspect, an honest placeholder until P4). The tab strip reuses the
   Bridge jump-menu's bounded-rectangle language (DESIGN.md "no elongated
   capsules" + "orange 2px underline edge, bolded label, aria-current"): icon
   + label, >=44px tall, sticky beneath the topbar/shortcut-bar at the same
   offsets already proven correct for .bridge-jump. Card bodies reuse the
   existing .record-section ledger rhythm rather than a new boxed-card
   system, matching the Atlas visual idea's preference for ruled sections
   over equal card grids.
   ========================================================================= */
.record-tabs { position:sticky; top:72px; z-index:15; display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 18px; padding:6px 0; background:var(--canvas); }
@media (min-width:901px) { .record-tabs { top:108px; } }
.record-tab { min-height:44px; padding:9px 16px; display:inline-flex; align-items:center; gap:8px; color:var(--muted); background:var(--paper-strong); border:1px solid var(--rule); border-radius:8px; font-size:var(--type-control); font-weight:700; text-decoration:none; white-space:nowrap; }
.record-tab img { width:16px; height:16px; flex:none; opacity:.75; }
html[data-theme="dark"] .record-tab img { filter:invert(1); }
.record-tab:hover { color:var(--ink); border-color:var(--orange); }
.record-tab.is-active { color:var(--ink); font-weight:800; border-color:var(--orange); background:color-mix(in srgb, var(--orange) 7%, var(--paper-strong)); box-shadow:inset 0 -2px 0 var(--orange); }
.record-tab.is-active img { opacity:1; }
@media (max-width:760px) { .record-tabs { position:sticky; top:62px; } }

/* Wave A: the wave record hero was a tall two-column dl card with big
   whitespace, pushing the dispatch/ticket content below the fold. Shrunk
   to text height - a single wrapping band: state chip, colored title,
   mono stat group, done. Overrides the shared .record-hero grid so
   .wave-hero-compact never inherits the dl-based 3-column layout other
   record heroes still use. */
.wave-hero-compact { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; padding:14px 20px; }
.wave-hero-title { margin:0; flex:1 1 auto; min-width:0; font:600 19px var(--serif); line-height:1.3; overflow-wrap:anywhere; }
.wave-hero-stats { display:flex; flex-wrap:wrap; align-items:center; gap:16px; margin-left:auto; }
.whs { display:flex; align-items:baseline; gap:6px; white-space:nowrap; }
.whs b { font-size:16px; color:#fffaf0; }
.whs small { color:#adbdc8; font-size:var(--type-caption); }
.whs.risk b { color:var(--atlas-oxblood-on-dark); }
@media (max-width:760px) {
  .wave-hero-compact { padding:14px 16px; }
  .wave-hero-stats { margin-left:0; gap:12px 16px; }
}

/* Glance hero: violet agent glyph badge + hero-safe mono links. .record-hero
   is a fixed-dark surface regardless of theme (see the .ticket-hero-title
   comment above), so its links must inherit the hero's own cream text
   color rather than the theme-toggled --blue/--navy link colors used
   elsewhere, which would go dark-on-dark and unreadable in light mode. The
   agent violet uses --atlas-violet-on-dark (#AC9BD6 on dark, aliased to
   --violet on light) - the token this codebase already carries specifically
   for text/icons that sit on Atlas's dark chrome. */
.agent-hero-glyph { width:38px; height:38px; flex:none; margin-bottom:10px; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; background:color-mix(in srgb, var(--atlas-violet-on-dark) 24%, transparent); border:1px solid color-mix(in srgb, var(--atlas-violet-on-dark) 55%, transparent); }
.agent-hero-glyph img { width:19px; height:19px; filter:invert(1); }
.record-hero .hero-link { padding:0; display:inline-flex; align-items:center; gap:4px; color:inherit; background:transparent; border:0; font:inherit; font-family:var(--mono); font-size:var(--type-control); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.record-hero .hero-link:hover, .record-hero .hero-link:focus-visible { color:var(--orange); }
.record-hero .hero-link img { width:12px; height:12px; filter:invert(1); }
.record-hero dd .mono-value { font-weight:800; }
.record-hero dd .mono-value.muted { color:#adbdc8; font-weight:700; }

/* Control-tab cards: a small note+chip line above each card's action row,
   and the action row itself. Buttons stay the shared .button primitive
   (44px/14px floor already enforced globally) so no new sizing rules are
   needed here. */
.agent-card-note { margin:10px 0 14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--muted); font-size:var(--type-control); line-height:1.5; }
.agent-card-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }

/* Data plane: one full-width column of stacked .record-section ledgers
   (Activity, Live console log, Runs & dispatches x2, Comms & audit x2,
   Facts) - same ruled rhythm as the Control tab, no boxed-card system. */
.record-page-grid.single-column { grid-template-columns:minmax(0,1fr); }

/* Agent Data Plane (issue #161). Every list reuses .run-events/.run-event/
   .hist-controls/.filter-select/.record-fields verbatim; only the pieces
   below are new. entityChip("run_event"|"dispatch"|"kill"|"orchestration"|
   "slack") all share the agent's violet accent (--violet, the same token
   .type-agent already uses on this themed --paper surface, not the fixed-
   dark-hero --atlas-violet-on-dark) - the row's state chip alongside it
   carries the risk/wait/done distinction, so color is never doubled up as
   the sole signal for either the kind or the state. */
.type-run_event, .type-dispatch, .type-kill, .type-orchestration, .type-slack {
  color:var(--violet); background:color-mix(in srgb, var(--violet) 12%, transparent);
}
.timeline-kind-cell { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.agent-log-loading { display:flex; align-items:center; gap:10px; padding:10px 0; color:var(--muted); font-size:var(--type-control); }
.agent-log-loading .loading-mark { width:18px; height:18px; border-width:2px; }
.agent-log-meta { margin:0 0 10px; color:var(--muted); font-size:var(--type-caption); }

@media (max-width:760px) {
  .record-tabs { margin:16px 0 14px; }
  .agent-hero-glyph { width:34px; height:34px; }
}

/* ==========================================================================
   Wave A item 7: compact control tier. Filter dropdowns (compactFilterSelect
   -> .filter-select, plus the .filter-field-trigger facet buttons) and
   quick-action buttons (.button/.decision button/.row-action) kept their
   44px touch target (DESIGN.md control-label floor) but carried oversized
   padding/gaps that read as visually bulky. Tightened here, appended last
   so it wins the cascade over the earlier phase-tagged sizing rules above
   (same pattern this file already uses) - min-height stays >=44px
   everywhere, label text moves to the DESIGN.md 15px control-label floor
   (var(--type-control)) rather than shrinking below it. The real
   <select> inside .filter-select keeps its own forced 16px (iOS
   zoom-on-focus safety, untouched); only its surrounding chrome tightens.
   ========================================================================= */
.button, .decision button, .row-action { padding:0 9px; gap:5px; font-size:var(--type-control); }
.button img, .decision button img, .row-action img { width:14px; height:14px; }
.filter-select { padding:0 8px; gap:7px; }
.filter-select > span { gap:5px; }
.filter-select > span img { width:14px; height:14px; }
.filter-select select { min-height:36px; }
.filter-field-trigger { padding:0 8px; gap:5px; }
.fdrop-opt { padding:0 8px; }

/* ===== Wave C (#167): agents & staff as work companions ==================
   The agent record's actionable work-item list (both planes), the wave's full
   scheduled-agent roster, the work-item live-state header, and the operator
   audit trail. All reuse the existing chip vocabulary (STATE_GLYPHS), the
   shared table filter bar and the record-section rhythm: no boxed cards,
   honest states, compact rows that open the full workbench on click. */

/* One new honest chip state: queued (not started), mirroring .state-moving
   but muted so "not started" reads calm, not active. */
.state-queued { color:var(--muted); background:color-mix(in srgb, var(--muted) 12%, transparent); border-left-color:var(--muted); }

/* Micro action buttons for compact rows. Two-class specificity (.button.micro)
   beats the base and mobile .button rules regardless of source order. */
.button.micro { min-height:30px; padding:0 8px; gap:4px; font-size:var(--type-control); border-radius:6px; }
.button.micro img { width:13px; height:13px; }

/* Agent work-items card (control + data planes). */
.agent-workitems-card .wi-section-head { align-items:center; }
.wi-head-actions { display:flex; gap:8px; flex-wrap:wrap; }
.wi-summary-strip { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 12px; }
.wi-list { display:flex; flex-direction:column; gap:6px; }
.wi-row { display:flex; align-items:stretch; gap:8px; }
.wi-open { flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:12px; padding:9px 12px; text-align:left; background:var(--paper); border:1px solid var(--rule); border-radius:8px; color:var(--ink); cursor:pointer; }
.wi-open:hover { border-color:var(--muted); }
.wi-lead { flex:0 0 auto; }
.wi-copy { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wi-copy strong { font-weight:600; font-size:15px; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wi-copy small { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wi-copy small .mono { font-family:var(--mono); }
.wi-chevron { flex:0 0 auto; width:16px; height:16px; opacity:.5; }
.wi-actions { display:flex; align-items:center; }

/* Scheduled-agents roster on the wave record. */
.sa-list { display:flex; flex-direction:column; gap:6px; }
.sa-row { display:flex; }
.sa-open { flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:12px; padding:9px 12px; text-align:left; background:var(--paper); border:1px solid var(--rule); border-radius:8px; color:var(--ink); cursor:pointer; }
.sa-open:hover { border-color:var(--muted); }
.sa-lead { flex:0 0 auto; }
.sa-copy { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.sa-copy strong { font-weight:600; font-size:15px; line-height:1.25; }
.sa-copy small { color:var(--muted); font-size:12px; }
.sa-metrics { flex:0 0 auto; display:flex; gap:14px; }
.sa-metrics > span { display:flex; flex-direction:column; align-items:center; line-height:1.05; }
.sa-metrics b { font-size:15px; font-family:var(--mono); }
.sa-metrics small { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.sa-chevron { flex:0 0 auto; width:16px; height:16px; opacity:.5; }

/* Work-item workbench: the explicit "waiting on" line under the live state. */
.wb-waiting { display:inline-flex; align-items:center; gap:5px; margin-top:4px; color:var(--clay); font-size:12px; font-style:normal; font-weight:600; }
.wb-waiting img { width:13px; height:13px; }

/* Operator audit trail (person + agent team records). */
.team-audit-section { margin-top:18px; }
.team-audit-list { list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:2px; }
.team-audit-row { display:flex; gap:10px; padding:8px 0; border-top:1px solid var(--rule); }
.team-audit-row:first-child { border-top:none; }
.ta-mark { flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:6px; background:color-mix(in srgb, var(--ink) 6%, transparent); }
.ta-mark img { width:14px; height:14px; opacity:.7; }
.team-audit-row > div { display:flex; flex-direction:column; gap:1px; min-width:0; }
.team-audit-row strong { font-weight:600; font-size:14px; line-height:1.3; }
.team-audit-row small { color:var(--muted); font-size:12px; }
.team-audit-row em { color:var(--muted); font-size:11px; font-style:normal; }

@media (max-width:640px) {
  .sa-metrics { gap:10px; }
  .wi-copy strong, .sa-copy strong, .wi-copy small { white-space:normal; }
}

/* Decision/resolution workbench live-state line (Wave C). */
.dw-livestate { display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.dw-livestate > span { color:var(--muted); font-size:13px; }
.decision-question .wb-waiting, .resolution-state .wb-waiting { margin-top:2px; }

/* Wave D (#168): local runner card on the Agents view. */
.local-runner-card .local-runner-cmd { margin-top:12px; display:flex; flex-direction:column; gap:6px; }
.local-runner-cmd code { display:block; overflow-x:auto; padding:10px 12px; background:color-mix(in srgb, var(--ink) 6%, transparent); border:1px solid var(--rule); border-radius:8px; font-size:12px; white-space:pre; }
.local-runner-cmd small { color:var(--muted); font-size:12px; }

/* ==========================================================================
   Mixed workforce shell, issue #153
   The primary navigation follows the owner's daily mental model. Detailed
   programme, QA, release and provider records remain available through the
   seven destinations and direct record links, without competing in the rail.
   ========================================================================= */
.atlas-app { grid-template-columns:232px minmax(0,1fr); }
.atlas-rail { width:232px; padding:18px 16px 16px; }
.atlas-stage { grid-column:2; min-width:0; }
.atlas-mark { min-height:62px; padding:0 4px 15px; gap:11px; }
.mark-logo { width:76px; height:40px; }
.mark-logo img { width:67px; }
.mark-name strong { font-size:24px; }
.mark-name span { margin-top:3px; font-size:13px; line-height:1.25; }
.active-programme { margin:15px 5px 12px; }
.active-programme small { font-size:13px; }
.active-programme strong { margin-top:5px; font-size:15px; line-height:1.35; }
.programme-pulse { margin-top:7px; font-size:13px; line-height:1.35; }
.atlas-primary-menu { align-content:start; gap:3px; padding-bottom:12px; }
.atlas-primary-menu .menu-group { margin:9px 10px 5px; }
.atlas-primary-menu button { min-height:46px; padding-inline:12px; gap:11px; font-size:15px; }
.atlas-primary-menu button.active::before { left:-16px; }
.atlas-primary-menu button img { width:19px; height:19px; }
.atlas-primary-menu em { font-size:13px; }
.atlas-owner { padding-top:12px; }

.atlas-topbar { height:64px; padding-inline:18px; gap:10px; }
.atlas-shortcut-bar { top:64px; }
.atlas-workbench { max-width:none; min-height:calc(100vh - 64px); padding:16px clamp(18px,2vw,34px) 36px; }
.atlas-query { min-width:0; }
.atlas-query span { font-size:15px; }
.topbar-controls { justify-content:flex-end; }

@media (min-width:1101px) {
  .atlas-topbar { grid-template-columns:minmax(132px,.32fr) minmax(108px,.28fr) minmax(260px,1fr) auto; }
}

@media (max-width:1100px) {
  .atlas-app { display:block; }
  .atlas-rail { width:min(320px,88vw); left:min(-330px,-90vw); box-shadow:var(--shadow); transition:left .18s ease; }
  .atlas-rail.open { left:0; }
  .atlas-stage { display:block; }
  .atlas-primary-menu { padding-bottom:20px; }
}

@media (max-width:760px) {
  .atlas-topbar { height:60px; padding-inline:10px; grid-template-columns:38px 38px minmax(0,1fr) 38px; gap:7px; }
  .mobile-open, .owner-alerts-open { width:38px; min-width:38px; }
  .atlas-query { height:38px; padding-inline:10px; }
  .atlas-query img { width:18px; height:18px; }
  .atlas-query span { font-size:0; }
  .atlas-query span::after { content:"Search Atlas"; font-size:15px; }
  .atlas-query kbd { display:none; }
  .topbar-controls { display:block; }
  .topbar-controls > :not(.theme-toggle) { display:none !important; }
  .topbar-controls .theme-toggle { width:38px; height:38px; display:grid !important; }
  .atlas-workbench { min-height:calc(100vh - 60px); padding:12px 12px calc(92px + env(safe-area-inset-bottom)); }
  .atlas-mobile-nav { min-height:72px; height:auto; }
  .atlas-mobile-nav button { min-height:56px; font-size:14px; }
  .atlas-mobile-nav button img { width:22px; height:22px; }
  .atlas-primary-menu button { min-height:48px; }
}

@media (prefers-reduced-motion:reduce) {
  .atlas-rail { transition:none; }
}

/* The rail collapses at 1100px, so the tablet header must become compact at
   the same breakpoint. Keeping the desktop header here made the controls
   collide even though the page itself did not report horizontal overflow. */
@media (min-width:761px) and (max-width:1100px) {
  .atlas-topbar { height:64px; padding-inline:12px; grid-template-columns:44px 44px 44px minmax(220px,1fr) auto; gap:8px; }
  .mobile-open { width:44px; min-width:44px; height:44px; display:grid !important; }
  .needs-you, .owner-alerts-open { width:44px; min-width:44px; min-height:44px; padding:4px; grid-template-columns:1fr; justify-items:center; }
  .needs-you > span, .owner-alerts-open > span:nth-child(2) { display:none; }
  .owner-alerts-open .owner-alert-icon { justify-self:center; }
  .topbar-controls { gap:5px; }
  .topbar-controls .walkthrough-launch { width:44px; min-width:44px; padding:0; justify-content:center; }
  #walkthroughOpen span, #projectSync span, #projectSync .sync-state, #helpOpen span { display:none; }
  .top-owner { display:none; }
}

@media (min-width:761px) and (max-width:1360px) {
  .owner-alerts-open { position:relative; height:44px; max-height:44px; }
  .owner-alerts-open .owner-alert-count { width:auto; min-width:22px; height:20px; padding:0 4px; position:absolute; top:-5px; right:-5px; border:2px solid var(--paper); font-size:10px; line-height:1; }
}

/* The walkthrough teaches the real interface without resizing it into an
   unusable sliver. The coach floats above the page and the spotlight keeps
   the underlying destination at its normal responsive width. */
body.tour-open .atlas-app { margin-right:0; }
@media (min-width:1181px) {
  .tour-panel { top:auto; right:18px; bottom:18px; width:min(720px,calc(100vw - 36px)); height:auto; max-height:min(48dvh,480px); border:1px solid color-mix(in srgb,var(--orange) 45%,var(--rule)); border-radius:12px; box-shadow:0 26px 80px rgba(0,0,0,.42); }
  .tour-panel::before { border-radius:12px 0 0 12px; }
}

/* ==========================================================================
   Mixed workforce workspaces, issue #153
   One shared task lifecycle is the primary language. Human availability and
   agent runtime remain separate signals. Dense ledgers replace release-cycle
   ceremony on the daily surfaces while the specialist records remain intact.
   ========================================================================= */
.mw-home, .mw-work, .mw-staff, .mw-systems { width:100%; min-width:0; }
.mw-page-head { display:flex; align-items:end; justify-content:space-between; gap:28px; padding:10px 0 18px; border-bottom:1px solid var(--rule); }
.mw-page-head > div:first-child { max-width:850px; }
.mw-page-head h1 { max-width:820px; margin:6px 0 5px; font:650 clamp(2rem,3.1vw,3.2rem)/.98 var(--serif); letter-spacing:-.025em; }
.mw-page-head p { max-width:780px; margin:0; color:var(--muted); font-size:var(--type-body); line-height:1.5; }
.mw-freshness { min-width:150px; padding-left:18px; border-left:3px solid var(--moss); text-align:right; }
.mw-freshness small, .mw-freshness strong { display:block; }
.mw-freshness small { color:var(--muted); font-size:var(--type-caption); }
.mw-freshness strong { margin-top:3px; font:600 var(--type-emphasis)/1.25 var(--serif); }

.mw-next { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:18px; margin-top:16px; padding:14px 16px 14px 18px; border-top:3px solid var(--orange); border-bottom:1px solid var(--rule); background:color-mix(in srgb,var(--paper-strong) 64%,transparent); }
.mw-next-copy { min-width:0; }
.mw-next-copy h2 { margin:3px 0 2px; font:650 clamp(1.35rem,1.9vw,1.8rem)/1.08 var(--serif); }
.mw-next-copy p { margin:0; color:var(--muted); font-size:var(--type-control); line-height:1.4; }
.mw-next-meta { display:grid; gap:6px; min-width:190px; }
.mw-next-meta span { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:var(--type-caption); }
.mw-next-meta img { width:16px; height:16px; }
.mw-next-meta b { color:var(--ink); font-weight:650; }
.mw-wave-pulse { width:100%; min-height:48px; margin-top:8px; padding:8px 12px; display:grid; grid-template-columns:auto minmax(0,1fr) 18px; align-items:center; gap:16px; border:0; border-bottom:1px solid var(--rule); border-radius:0; color:var(--ink); background:transparent; text-align:left; }
.mw-wave-pulse:hover { background:color-mix(in srgb,var(--blue) 6%,transparent); }
.mw-wave-pulse > span { display:flex; flex-wrap:wrap; align-items:center; gap:7px 14px; }
.mw-wave-pulse > span:first-child img, .mw-wave-pulse > img { width:17px; height:17px; }
.mw-wave-pulse > span:first-child small { color:var(--muted); font-size:var(--type-caption); }
.mw-wave-pulse > span:nth-child(2) { justify-content:flex-end; color:var(--muted); font-size:var(--type-caption); }
.mw-wave-pulse b { color:var(--ink); }
.mw-wave-pulse b.risk { color:var(--risk); }

.mw-section { min-width:0; margin-top:22px; }
.mw-section-head { min-height:46px; display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:8px; }
.mw-section-head h2 { margin:3px 0 0; font:600 clamp(1.25rem,1.7vw,1.65rem)/1.1 var(--serif); }
.mw-action-ledger, .mw-work-ledger, .mw-activity { border-top:1px solid var(--rule); }
.mw-action-row { display:grid; grid-template-columns:150px minmax(0,1fr) minmax(130px,190px) 18px; gap:15px; align-items:center; min-height:72px; padding:11px 8px; border-bottom:1px solid var(--rule); cursor:pointer; }
.mw-action-row:hover, .mw-action-row:focus-visible { background:color-mix(in srgb,var(--orange) 6%,transparent); }
.mw-action-row > div { min-width:0; }
.mw-action-row strong { display:block; font-size:var(--type-control); line-height:1.3; }
.mw-action-row p { margin:3px 0 0; color:var(--muted); font-size:var(--type-caption); line-height:1.4; }
.mw-kind { display:flex; align-items:center; gap:7px; color:var(--clay); font-size:var(--type-caption); }
.mw-kind img, .mw-activity img { width:16px; height:16px; }
.mw-owner { color:var(--muted); font-size:var(--type-caption); }
.row-chevron { width:17px; height:17px; opacity:.65; }

.mw-people-systems { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; }
.mw-signal-grid { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.mw-signal-grid button { min-height:126px; padding:15px; display:grid; align-content:start; gap:5px; border:0; border-right:1px solid var(--rule); color:var(--ink); background:transparent; text-align:left; }
.mw-signal-grid button:last-child { border-right:0; }
.mw-signal-grid button:hover { background:color-mix(in srgb,var(--blue) 7%,transparent); }
.mw-signal-grid span { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:var(--type-control); font-weight:700; }
.mw-signal-grid img { width:18px; height:18px; }
.mw-signal-grid strong { font:650 2.4rem/1 var(--serif); }
.mw-signal-grid small { color:var(--muted); font-size:var(--type-caption); line-height:1.35; }
.mw-activity article { min-height:58px; padding:9px 3px; display:grid; grid-template-columns:24px minmax(0,1fr); gap:9px; align-items:center; border-bottom:1px solid var(--rule); cursor:pointer; }
.mw-activity article:hover { background:color-mix(in srgb,var(--blue) 6%,transparent); }
.mw-activity strong, .mw-activity small { display:block; }
.mw-activity strong { font-size:var(--type-control); }
.mw-activity small { margin-top:3px; color:var(--muted); font-size:var(--type-caption); }

.mw-state-nav { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); margin:16px 0 4px; border:1px solid var(--rule); }
.mw-state-nav button { min-height:64px; padding:9px 12px; display:flex; align-items:center; justify-content:space-between; gap:8px; border:0; border-right:1px solid var(--rule); border-radius:0; color:var(--ink); background:var(--paper); }
.mw-state-nav button:last-child { border-right:0; }
.mw-state-nav button:hover { background:var(--paper-strong); }
.mw-state-nav button.active { box-shadow:inset 0 -4px 0 var(--orange); background:var(--paper-strong); }
.mw-state-nav span { display:flex; align-items:center; gap:6px; font-size:var(--type-control); font-weight:700; }
.mw-state-nav img { width:16px; height:16px; }
.mw-state-nav strong { font:700 1.25rem var(--mono); }
.mw-work-row { display:grid; grid-template-columns:150px minmax(260px,1.35fr) 120px minmax(130px,.65fr) minmax(210px,1fr) 18px; gap:13px; align-items:center; min-height:70px; padding:10px 8px; border-bottom:1px solid var(--rule); cursor:pointer; }
.mw-work-row:is(a) { color:inherit; text-decoration:none; }
.mw-work-row:hover, .mw-work-row:focus-visible { background:color-mix(in srgb,var(--blue) 6%,transparent); }
.mw-work-row[hidden] { display:none; }
.mw-work-id { overflow-wrap:anywhere; font:650 var(--type-caption)/1.3 var(--mono); color:var(--blue); }
.mw-work-title { min-width:0; }
.mw-work-title strong, .mw-work-title small { display:block; }
.mw-work-title strong { font-size:var(--type-control); line-height:1.3; }
.mw-work-title small, .mw-worker, .mw-handoff { color:var(--muted); font-size:var(--type-caption); line-height:1.35; }
.mw-work-title em { margin-top:3px; display:flex; align-items:center; gap:6px; color:var(--risk); font-size:var(--type-caption); font-style:normal; font-weight:700; line-height:1.35; }
.mw-work-title em img { width:14px; height:14px; flex:none; }
.mw-state { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:4px 7px; border-left:3px solid currentColor; background:color-mix(in srgb,currentColor 9%,transparent); font-size:var(--type-caption); font-weight:750; }
.mw-state img { width:14px; height:14px; }
.mw-state.ready { color:var(--blue); }
.mw-state.working { color:var(--violet); }
.mw-state.review { color:var(--orange); }
.mw-state.blocked { color:var(--risk); }
.mw-state.done { color:var(--moss); }
.mw-state.planned { color:var(--muted); }

.mw-work-scope {
  display:flex;
  align-items:stretch;
  gap:0;
  margin:12px 0 0;
  border-bottom:1px solid var(--rule);
}
.mw-work-scope button {
  min-height:48px;
  padding:8px 16px;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-bottom:3px solid transparent;
  border-radius:0;
  color:var(--muted);
  background:transparent;
  font-size:var(--type-control);
  font-weight:750;
}
.mw-work-scope button:hover { color:var(--ink); background:color-mix(in srgb,var(--blue) 6%,transparent); }
.mw-work-scope button.active { color:var(--ink); border-bottom-color:var(--orange); }
.mw-work-scope button img { width:17px; height:17px; }
.mw-work-scope button b { margin-left:4px; color:var(--blue); font:750 var(--type-caption)/1 var(--mono); }
.mw-wave-brief,
.mw-planned-brief {
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(360px,1.2fr) auto;
  gap:22px;
  align-items:center;
  min-height:112px;
  padding:15px 8px;
  border-bottom:1px solid var(--rule-strong);
}
.mw-wave-brief.empty { grid-template-columns:minmax(0,1fr) auto; }
.mw-wave-brief h2,
.mw-planned-brief h2 { margin:3px 0 0; font:650 clamp(1.35rem,2vw,1.85rem)/1.08 var(--serif); }
.mw-wave-brief p,
.mw-planned-brief p { margin:5px 0 0; color:var(--muted); font-size:var(--type-control); line-height:1.4; }
.mw-wave-truth { min-width:0; display:grid; gap:6px; }
.mw-wave-state-line, .mw-wave-queue-line { display:flex; flex-wrap:wrap; gap:0; border-left:1px solid var(--rule); }
.mw-wave-state-line span, .mw-wave-queue-line span { min-height:32px; padding:6px 10px; display:flex; align-items:center; gap:5px; border-right:1px solid var(--rule); color:var(--muted); font-size:var(--type-caption); }
.mw-wave-state-line b, .mw-wave-queue-line b { color:var(--ink); font:750 var(--type-control)/1 var(--mono); }
.mw-wave-state-line .blocked, .mw-wave-state-line .blocked b { color:var(--risk); }
.mw-wave-brief .button,
.mw-planned-brief .button { min-height:44px; white-space:nowrap; }
.mw-planned-brief { grid-template-columns:minmax(0,1fr) auto; }
.mw-state-nav.compact { grid-template-columns:repeat(7,minmax(0,1fr)); margin-top:12px; }
.mw-state-nav.compact button { min-height:52px; }

.mw-staff-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:16px; border-top:1px solid var(--rule); }
.mw-person { min-width:0; padding:18px; border-right:1px solid var(--rule); border-bottom:1px solid var(--rule); cursor:pointer; }
.mw-person:nth-child(3n) { border-right:0; }
.mw-person:hover, .mw-person:focus-visible { background:var(--paper-strong); }
.mw-person header { display:grid; grid-template-columns:44px minmax(0,1fr); gap:10px; align-items:center; }
.mw-avatar { width:44px; height:44px; display:grid; place-items:center; color:var(--night); background:var(--orange); border-radius:8px; font-weight:900; }
.mw-person header strong { font-size:var(--type-emphasis); }
.mw-person header p { margin:2px 0 0; color:var(--muted); font-size:var(--type-caption); }
.mw-current-assignment { min-height:64px; margin:13px 0 0; color:var(--muted); font-size:var(--type-control); line-height:1.45; }
.mw-current-assignment strong, .mw-current-assignment small { display:block; }
.mw-current-assignment strong { color:var(--ink); font-size:var(--type-control); }
.mw-current-assignment small { margin-top:4px; color:var(--muted); font-size:var(--type-caption); }
.mw-availability { grid-column:1/-1; display:flex; align-items:center; gap:7px; margin-top:6px; color:var(--muted); font-size:var(--type-caption); }
.mw-availability img { width:14px; height:14px; }
.mw-person dl { display:grid; grid-template-columns:repeat(4,1fr); margin:16px 0 12px; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.mw-person dl div { padding:10px 7px; border-right:1px solid var(--rule); }
.mw-person dl div:last-child { border-right:0; }
.mw-person dt { color:var(--muted); font-size:var(--type-caption); }
.mw-person dd { margin:4px 0 0; font:650 1.35rem var(--mono); }
.mw-person dd.risk { color:var(--risk); }
.mw-person footer { display:flex; flex-wrap:wrap; align-items:center; gap:8px 15px; color:var(--muted); font-size:var(--type-caption); }
.mw-person footer span { display:flex; align-items:center; gap:5px; }
.mw-person footer b { width:100%; color:var(--blue); font-size:var(--type-caption); }
.mw-person footer img { width:15px; height:15px; }
.mw-person footer .row-chevron { margin-left:auto; }

.mw-system-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:16px; border-top:1px solid var(--rule); border-left:1px solid var(--rule); }
.mw-system-grid > button { min-height:168px; padding:18px; display:grid; grid-template-columns:28px minmax(0,1fr) 18px; gap:12px; align-items:start; border:0; border-right:1px solid var(--rule); border-bottom:1px solid var(--rule); border-radius:0; color:var(--ink); background:transparent; text-align:left; }
.mw-system-grid > button:hover { background:var(--paper-strong); }
.mw-system-grid > button > img { width:24px; height:24px; color:var(--orange); }
html[data-theme="dark"] .mw-system-grid > button > img { filter:invert(1); opacity:.9; }
.mw-system-grid strong, .mw-system-grid p, .mw-system-grid small { display:block; }
.mw-system-grid strong { font-size:var(--type-emphasis); }
.mw-system-grid p { margin:6px 0 13px; color:var(--muted); font-size:var(--type-control); line-height:1.42; }
.mw-system-grid small { color:var(--blue); font-size:var(--type-caption); font-weight:700; }

.mw-agent-wave { margin:12px 0 18px; padding:12px 0; display:grid; grid-template-columns:minmax(240px,.6fr) minmax(0,1.4fr); gap:24px; align-items:start; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.mw-agent-wave h2 { margin:3px 0; font:650 1.45rem/1.1 var(--serif); }
.mw-agent-wave p { margin:0; color:var(--muted); font-size:var(--type-caption); line-height:1.45; }
.mw-agent-wave > div:last-child { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.mw-agent-wave button { min-height:62px; padding:9px 10px; display:grid; grid-template-columns:auto minmax(0,1fr) 18px; gap:5px 10px; align-items:center; border:0; border-left:1px solid var(--rule); border-bottom:1px solid var(--rule); border-radius:0; color:var(--ink); background:transparent; text-align:left; }
.mw-agent-wave button:hover { background:var(--paper-strong); }
.mw-agent-wave button .mono { grid-row:1/3; color:var(--blue); font-size:var(--type-caption); }
.mw-agent-wave button strong { font-size:var(--type-control); }
.mw-agent-wave button small { color:var(--muted); font-size:var(--type-caption); }
.mw-agent-wave button > img { grid-column:3; grid-row:1/3; width:16px; height:16px; }

.team-current-wave { margin-top:12px; }
.team-current-wave-ledger { border-top:1px solid var(--rule); }
.team-current-wave-ledger button { width:100%; min-height:64px; padding:9px 6px; display:grid; grid-template-columns:100px minmax(0,1fr) 18px; gap:12px; align-items:center; border:0; border-bottom:1px solid var(--rule); border-radius:0; color:var(--ink); background:transparent; text-align:left; }
.team-current-wave-ledger button:hover { background:var(--paper-strong); }
.team-current-wave-ledger strong, .team-current-wave-ledger small, .team-current-wave-ledger em { display:block; }
.team-current-wave-ledger strong { font-size:var(--type-control); }
.team-current-wave-ledger small { margin-top:3px; color:var(--muted); font-size:var(--type-caption); }
.team-current-wave-ledger em { margin-top:3px; color:var(--risk); font-size:var(--type-caption); font-style:normal; }
.team-current-wave-ledger em img { width:14px; height:14px; margin-right:5px; vertical-align:-2px; }
.agent-wave-truth { margin:10px 0 14px; padding:8px 0; display:flex; flex-wrap:wrap; align-items:stretch; gap:0; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.agent-wave-truth > span { min-width:220px; padding:7px 12px; display:grid; grid-template-columns:18px minmax(0,1fr); gap:2px 8px; align-content:center; border-right:1px solid var(--rule); }
.agent-wave-truth > span img { grid-row:1/3; width:17px; height:17px; }
.agent-wave-truth > span small { color:var(--muted); font-size:var(--type-caption); }
.agent-wave-truth button { min-height:48px; padding:7px 11px; display:grid; grid-template-columns:auto minmax(0,1fr) 16px; align-items:center; gap:9px; border:0; border-right:1px solid var(--rule); border-radius:0; color:var(--ink); background:transparent; }
.agent-wave-truth button:hover { background:var(--paper-strong); }
.agent-wave-truth button span { color:var(--muted); font-size:var(--type-caption); }
.agent-wave-truth button > img { width:15px; height:15px; }
.canonical-ticket-truth { margin:10px 0 16px; display:grid; grid-template-columns:.8fr 1fr .55fr 1.65fr; border-top:3px solid var(--orange); border-bottom:1px solid var(--rule); background:var(--paper); }
.canonical-ticket-truth > div { min-width:0; padding:12px 14px; border-right:1px solid var(--rule); }
.canonical-ticket-truth > div:last-child { border-right:0; }
.canonical-ticket-truth strong, .canonical-ticket-truth small { display:block; }
.canonical-ticket-truth strong { margin-top:4px; color:var(--ink); font-size:var(--type-control); line-height:1.35; }
.canonical-ticket-truth small { margin-top:6px; color:var(--risk); font-size:var(--type-caption); line-height:1.4; }
.canonical-ticket-truth small img { width:14px; height:14px; margin-right:5px; vertical-align:-2px; }
.canonical-ticket-comments { border-top:1px solid var(--rule); }
.canonical-ticket-comments details { border-bottom:1px solid var(--rule); }
.canonical-ticket-comments summary, .canonical-ticket-history > summary { min-height:52px; padding:9px 4px; display:flex; align-items:center; gap:10px; cursor:pointer; list-style:none; }
.canonical-ticket-comments summary > img, .canonical-ticket-history > summary > img { width:17px; height:17px; }
.canonical-ticket-comments summary > img:last-child, .canonical-ticket-history > summary > img:last-child { margin-left:auto; }
.canonical-ticket-comments summary span { display:grid; gap:2px; }
.canonical-ticket-comments summary small, .canonical-ticket-history summary small { color:var(--muted); font-size:var(--type-caption); }
.canonical-ticket-comments .ticket-body { padding:12px 4px 18px 31px; }
.canonical-ticket-history > div { padding:4px 4px 16px; }

@media (max-width:1180px) {
  .mw-page-head h1 { font-size:2.35rem; }
  .mw-people-systems { grid-template-columns:1fr; gap:4px; }
  .mw-work-row { grid-template-columns:135px minmax(230px,1fr) 110px minmax(140px,.7fr) 18px; }
  .mw-work-row .mw-handoff { grid-column:2/5; }
  .mw-system-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mw-wave-brief { grid-template-columns:minmax(240px,1fr) minmax(330px,1.3fr); }
  .mw-wave-brief .button { grid-column:1/-1; justify-self:start; }
  .mw-agent-wave { grid-template-columns:1fr; gap:10px; }
}

@media (max-width:760px) {
  .mw-page-head { align-items:start; gap:12px; padding:5px 0 13px; }
  .mw-page-head h1 { font-size:2rem; line-height:1.02; }
  .mw-page-head p { font-size:var(--type-control); }
  .mw-freshness, .headline-stat { display:none; }
  .mw-next { grid-template-columns:1fr; gap:10px; padding:13px 12px; }
  .mw-next-meta { grid-template-columns:1fr 1fr; min-width:0; }
  .mw-next .button { width:100%; }
  .mw-section { margin-top:18px; }
  .mw-section-head { align-items:start; }
  .mw-section-head .text-action { flex:none; }
  .mw-action-row { grid-template-columns:1fr 18px; gap:7px 10px; padding:12px 4px; }
  .mw-action-row .mw-kind, .mw-action-row .mw-owner { grid-column:1; }
  .mw-action-row > div { grid-column:1; }
  .mw-action-row .row-chevron { grid-column:2; grid-row:1/4; align-self:center; }
  .mw-signal-grid { grid-template-columns:1fr 1fr; }
  .mw-signal-grid button { min-height:118px; padding:12px; }
  .mw-state-nav { grid-template-columns:repeat(2,minmax(0,1fr)); border-bottom:0; }
  .mw-state-nav button { min-height:52px; border-bottom:1px solid var(--rule); }
  .mw-state-nav button:nth-child(2n) { border-right:0; }
  .mw-work-row { grid-template-columns:1fr auto; gap:6px 10px; padding:13px 4px; }
  .mw-work-row > * { grid-column:1; }
  .mw-work-row .mw-state { grid-column:2; grid-row:1; }
  .mw-work-row .row-chevron { grid-column:2; grid-row:2/6; align-self:center; }
  .mw-work-id { grid-row:1; }
  .mw-work-title { grid-row:2; }
  .mw-worker { grid-row:3; }
  .mw-handoff { grid-row:4; }
  .mw-staff-grid, .mw-system-grid { grid-template-columns:1fr; }
  .mw-person, .mw-person:nth-child(3n) { border-right:0; }
  .mw-system-grid { border-left:0; }
  .mw-system-grid > button { min-height:130px; border-left:1px solid var(--rule); }
  .mw-work-scope { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .mw-work-scope button { min-height:52px; padding:8px 7px; justify-content:center; font-size:var(--type-caption); }
  .mw-work-scope button b { display:none; }
  .mw-wave-brief,
  .mw-wave-brief.empty,
  .mw-planned-brief { grid-template-columns:1fr; gap:12px; padding:14px 4px; }
  .mw-wave-state-line, .mw-wave-queue-line { border-top:1px solid var(--rule); border-left:0; }
  .mw-wave-brief .button,
  .mw-planned-brief .button { width:100%; }
  .mw-state-nav.compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mw-wave-pulse { grid-template-columns:1fr 18px; }
  .mw-wave-pulse > span:nth-child(2) { grid-column:1; justify-content:flex-start; }
  .mw-wave-pulse > img { grid-column:2; grid-row:1/3; }
  .mw-agent-wave > div:last-child { grid-template-columns:1fr; }
  .team-current-wave-ledger button { grid-template-columns:74px minmax(0,1fr) 16px; gap:8px; }
  .agent-wave-truth { display:grid; grid-template-columns:1fr; }
  .agent-wave-truth > span, .agent-wave-truth button { border-right:0; border-bottom:1px solid var(--rule); }
  .canonical-ticket-truth { grid-template-columns:1fr 1fr; }
  .canonical-ticket-truth > div:nth-child(2) { border-right:0; }
  .canonical-ticket-truth > div:nth-child(-n+2) { border-bottom:1px solid var(--rule); }
}

@media (max-width:420px) {
  .mw-next-meta, .mw-signal-grid { grid-template-columns:1fr; }
  .mw-signal-grid button { min-height:104px; border-right:0; border-bottom:1px solid var(--rule); }
  .mw-signal-grid button:last-child { border-bottom:0; }
  .mw-section-head { display:block; }
  .mw-section-head .text-action { margin-top:8px; }
  .mw-person dl { grid-template-columns:1fr 1fr; }
}

/* Decision ledgers privilege the question and context, with one aligned
   action. Fixed four-column rows caused titles, chips and buttons to overlap. */
.decision-list .decision {
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "kind action"
    "title action"
    "context action"
    "meta action";
  align-items:start;
  gap:5px 18px;
  min-height:112px;
}
.decision-list .decision > .kind { grid-area:kind; justify-self:start; }
.decision-list .decision > strong { grid-area:title; font-size:var(--type-emphasis); }
.decision-list .decision > p { grid-area:context; font-size:var(--type-control); }
.decision-list .decision > .metadata { grid-area:meta; font-size:var(--type-caption); }
.decision-list .decision > button:last-child { grid-area:action; align-self:center; min-height:44px; font-size:var(--type-control); }

@media (max-width:760px) {
  .decision-list .decision {
    grid-template-columns:1fr;
    grid-template-areas:"kind" "title" "context" "meta" "action";
  }
  .decision-list .decision > button:last-child { width:100%; justify-self:stretch; }
}
