/* GENERATED by scripts/write_peer_styles.mjs — do not edit here.
   Source: design-system/base.css + themes/continuity-web.css */

/* ==========================================================================
   CONTINUITY ECOSYSTEM DESIGN SYSTEM — base layer
   Shared by the coordinator and the four independent peer sites.
   GENERATED into each app's styles.css by scripts/write_peer_styles.mjs.
   Edit design-system/base.css + design-system/themes/*.css, then re-run.
   ========================================================================== */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./assets/fonts/inter-var-latin.woff2") format("woff2-variations"),
       url("./assets/fonts/inter-var-latin.woff2") format("woff2");
}

:root {
  /* Core palette */
  --paper: #F8F9F7;
  --surface: #FFFFFF;
  --surface-2: #F3F5F7;
  --ink: #111827;
  --ink-2: #344054;
  --muted: #667085;
  --line: #E9EDF2;
  --line-strong: #D5DBE3;
  --brand: #4263EB;
  --navy: #0B1220;
  --navy-2: #121B2E;
  --navy-line: #24304A;

  /* Semantic */
  --ok: #067647;
  --ok-bg: #ECFDF3;
  --ok-line: #ABEFC6;
  --warn: #B54708;
  --warn-bg: #FFFAEB;
  --warn-line: #FEDF89;
  --danger: #B42318;
  --danger-bg: #FEF3F2;
  --danger-line: #FECDCA;
  --info: #175CD3;
  --info-bg: #EFF8FF;
  --info-line: #B2DDFF;

  /* Site accent — overridden per theme */
  --accent: var(--brand);
  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, white);
  --accent-line: color-mix(in srgb, var(--accent) 28%, white);
  --accent-strong: color-mix(in srgb, var(--accent) 82%, black);
  --accent-hover: color-mix(in srgb, var(--accent) 84%, black);
  --hero-bg: var(--navy);
  --hero-ink: #F5F7FB;
  --hero-muted: #A6B0C3;

  /* Type */
  --font: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --fs-display: clamp(2.4rem, 1.4rem + 3.6vw, 4.25rem);
  --fs-h1: clamp(2rem, 1.3rem + 2.4vw, 3.1rem);
  --fs-h2: clamp(1.45rem, 1.15rem + 1vw, 1.95rem);
  --fs-h3: 1.0625rem;
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.78rem;

  /* Space & shape */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -6px rgba(16, 24, 40, 0.08);
  --shadow-3: 0 2px 4px rgba(16, 24, 40, 0.04), 0 24px 48px -12px rgba(16, 24, 40, 0.16);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--paper); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.022em; font-weight: 650; color: inherit; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.034em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.012em; font-weight: 620; }
p { margin: 0; }
a { color: var(--accent-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 0.08em 0.38em; border-radius: 6px; overflow-wrap: anywhere; }
small { font-size: var(--fs-xs); color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, white); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container, .shell { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-7); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-6); }
.section-head > div { max-width: 640px; }
.section-head p { color: var(--muted); margin-top: var(--s-3); font-size: 1.0625rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-strong);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eyebrow.plain::before { display: none; }
.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); }
.grid { display: grid; gap: var(--s-5); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); }
.header-bar { display: flex; align-items: center; gap: var(--s-5); min-height: 68px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-lockup svg { flex: none; }
.brand-name { display: block; font-weight: 680; letter-spacing: -0.02em; font-size: 1.02rem; line-height: 1.1; }
.brand-domain { display: block; font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 520;
  padding: 8px 12px; border-radius: var(--r-pill);
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a { white-space: nowrap; }
@media (max-width: 1560px) { .brand-domain { display: none; } .site-nav { gap: 2px; } .site-nav a { padding: 8px 10px; } }
@media (max-width: 1240px) { .site-nav { display: none; } }
.site-nav a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.header-meta { display: flex; align-items: center; gap: var(--s-3); }

/* ---------- Buttons ---------- */
.btn, .cta-btn, .approve-btn, .ghost-btn, .mini-btn, .primary-btn, .secondary-btn {
  --btn-bg: var(--surface); --btn-ink: var(--ink); --btn-line: var(--line-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font: 600 var(--fs-sm)/1 var(--font); letter-spacing: -0.005em;
  color: var(--btn-ink); background: var(--btn-bg);
  border: 1px solid var(--btn-line); border-radius: var(--r-pill);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s var(--ease), border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-1);
}
.btn:hover, .ghost-btn:hover, .mini-btn:hover, .secondary-btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line-strong)); }
.btn:active, .cta-btn:active, .approve-btn:active, .ghost-btn:active, .mini-btn:active, .primary-btn:active, .secondary-btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible, .cta-btn:focus-visible, .approve-btn:focus-visible, .ghost-btn:focus-visible, .mini-btn:focus-visible, .primary-btn:focus-visible, .secondary-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary, .cta-btn, .primary-btn {
  --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --btn-line: transparent;
  box-shadow: 0 1px 2px rgba(16,24,40,.12), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-primary:hover, .cta-btn:hover, .primary-btn:hover { --btn-bg: var(--accent-hover, var(--accent-strong)); }
.btn-dark, .approve-btn { --btn-bg: var(--ink); --btn-ink: #fff; --btn-line: transparent; }
.btn-dark:hover, .approve-btn:hover { --btn-bg: #000; }
.btn-ghost, .ghost-btn { --btn-bg: transparent; box-shadow: none; }
.btn-sm, .mini-btn { min-height: 34px; padding: 0 12px; font-size: var(--fs-xs); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 0.98rem; }
.btn[disabled], .cta-btn[disabled], .approve-btn[disabled], .ghost-btn[disabled], .mini-btn[disabled], .primary-btn[disabled], .secondary-btn[disabled], .btn[aria-disabled="true"] {
  cursor: not-allowed; opacity: 1; --btn-bg: var(--surface-2); --btn-ink: #98A2B3; --btn-line: var(--line); box-shadow: none; transform: none;
}
.btn[aria-busy="true"]::after, .cta-btn[aria-busy="true"]::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent; animation: ds-spin .7s linear infinite;
}
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ---------- Form fields ---------- */
label, .field-label, .input-label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 12px 14px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { line-height: 1.55; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #B8C1CD; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23667085' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }

/* ---------- Cards ---------- */
.card, .panel-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--shadow-1);
}
.card-lg { padding: var(--s-6); }
.card-head, .panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-4); flex-wrap: wrap; }
.card-head h2, .panel-header h2 { font-size: 1.15rem; letter-spacing: -0.018em; }
.panel-sub, .card-sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; max-width: 70ch; }
.card-interactive { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }

/* ---------- Badges & chips ---------- */
.badge, .status-chip, .mono-tag, .pill-badge, .spec-pill, .mode-pill, .inv-tag, .state-tag, .pareto-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1;
  padding: 6px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.no-dot::before { display: none; }
.badge-ok, .status-chip { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-accent { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.badge-demo, .pill-badge { background: var(--surface); color: var(--muted); border: 1px dashed var(--line-strong); }
.mono-tag { font-family: var(--mono); font-weight: 500; font-size: 0.7rem; }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.notice-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--ink); color: #fff; margin-top: 1px; }
.notice-ok { background: var(--ok-bg); border-color: var(--ok-line); color: #05603A; }
.notice-ok .notice-icon { background: var(--ok); }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); color: #93370D; }
.notice-warn .notice-icon { background: var(--warn); }
.notice-info { background: var(--info-bg); border-color: var(--info-line); color: #194185; }
.notice-info .notice-icon { background: var(--info); }

/* Live region feedback that only shows when filled */
.feedback:empty { display: none; }
.feedback {
  display: flex; gap: 10px; align-items: flex-start; margin-top: var(--s-4);
  padding: 12px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 520;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-strong);
  animation: ds-rise .35s var(--ease);
}
.feedback::before { content: "●"; font-size: 9px; line-height: 2; }

/* ---------- Definition list ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 0; }
.spec-grid > div { background: var(--surface); padding: 14px 16px; }
.spec-grid dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.spec-grid dd { margin: 0; font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }

/* ---------- Timeline / stepper ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: tl; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 20px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  counter-increment: tl; content: counter(tl);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 650; background: var(--surface); color: var(--muted); border: 1.5px solid var(--line-strong);
  position: relative; z-index: 1; transition: all .3s var(--ease);
}
.timeline li::after { content: ""; position: absolute; left: 13.25px; top: 30px; bottom: 2px; width: 1.5px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline .tl-title { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); line-height: 28px; }
.timeline .tl-desc { font-size: var(--fs-xs); color: var(--muted); margin-top: -2px; }
.timeline li[data-state="done"]::before { content: "✓"; background: var(--ok); color: #fff; border-color: var(--ok); }
.timeline li[data-state="done"]::after { background: var(--ok); }
.timeline li[data-state="current"]::before { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.timeline li[data-state="current"] .tl-title::after { content: " · in progress"; color: var(--accent-strong); font-weight: 500; }
.timeline li[data-state="todo"] .tl-title { color: var(--muted); }
.timeline li[data-state="blocked"]::before { content: "!"; background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }

/* Horizontal stepper */
.stepper { list-style: none; padding: 0; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; counter-reset: st; }
.stepper li { position: relative; padding-top: 40px; padding-right: 12px; }
.stepper li::before {
  counter-increment: st; content: counter(st);
  position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 650;
  background: var(--surface); color: var(--muted); border: 1.5px solid var(--line-strong); z-index: 1;
  transition: all .35s var(--ease);
}
.stepper li::after { content: ""; position: absolute; top: 13.5px; left: 34px; right: 6px; height: 1.5px; background: var(--line-strong); transition: background .35s; }
.stepper li:last-child::after { display: none; }
.stepper .st-title { font-weight: 620; font-size: var(--fs-sm); line-height: 1.25; display: block; }
.stepper .st-desc { font-size: var(--fs-xs); color: var(--muted); display: block; margin-top: 4px; }
.stepper li[data-state="done"]::before { content: "✓"; background: var(--ok); color: #fff; border-color: var(--ok); }
.stepper li[data-state="done"]::after { background: var(--ok); }
.stepper li[data-state="current"]::before { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.stepper li[data-state="todo"] .st-title { color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
.data-table th { text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, white); }
.data-table td strong { color: var(--ink); }

/* ---------- Tabs ---------- */
.tablist { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); overflow-x: auto; scrollbar-width: none; }
.tablist::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: none; border: 0; background: transparent; color: var(--muted); font: 600 var(--fs-sm)/1 var(--font);
  padding: 10px 16px; border-radius: var(--r-pill); cursor: pointer; min-height: 38px; transition: box-shadow .15s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active, .tab-btn[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.tab-panel { padding-top: var(--s-5); animation: ds-fade .3s var(--ease); }

/* ---------- Artifact links ---------- */
.artifact-links { display: flex; flex-wrap: wrap; gap: 8px; }
.artifact-links a, .artifact-chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-2);
  text-decoration: none; padding: 7px 11px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s;
}
.artifact-links a::before, .artifact-chip::before { content: "{ }"; color: var(--accent); font-weight: 700; font-size: 0.7rem; }
.artifact-links a:hover, .artifact-chip:hover { border-color: var(--accent-line); color: var(--accent-strong); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-7); margin-top: var(--s-7); color: var(--muted); font-size: var(--fs-sm); }
.site-footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-6); align-items: start; }
.policy-note, .disclosure-footer { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

/* ==========================================================================
   Open Agentic Web runtime skin (#agent-app, ns-*)
   ========================================================================== */
.assistant-shell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-6); box-shadow: var(--shadow-2); }
.assistant-note { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s-3); }
.status-line, .runtime-status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: var(--s-4) 0 0;
  font-size: var(--fs-xs); font-weight: 520; color: var(--muted);
  padding: 8px 12px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
}
.status-line:empty, .runtime-status-pill:empty { display: none; }
.status-line::before, .runtime-status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: ds-pulse 1.6s ease-in-out infinite; }
#agent-app {
  --ns-font: var(--font);
  --ns-bg: var(--surface);
  --ns-fg: var(--ink);
  --ns-primary: var(--accent);
  --ns-accent: var(--accent);
  --ns-border: var(--line);
  --ns-panelbg: var(--surface-2);
  --ns-msgbg: var(--surface-2);
  --ns-muted: var(--muted);
  --ns-header-pad: 0 0 12px;
  color: var(--ink);
  margin-top: var(--s-5);
}
.assistant-panels { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s-4); margin-top: var(--s-4); }
#agent-app.ns-composed-app [data-ns-slot="chat"] { height: 620px; }
#agent-app .ns-chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
#agent-app .ns-header { flex-wrap: wrap; background: transparent; color: var(--ink); border-bottom: 1px solid var(--line); }
#agent-app .ns-header .ns-brand, #agent-app .ns-header h3 { color: var(--ink); letter-spacing: -0.01em; }
#agent-app .ns-msg { overflow-wrap: break-word; border-radius: 14px; line-height: 1.55; }
#agent-app .ns-msg a { display: inline-block; padding: 4px 2px; min-height: 24px; }
#agent-app .ns-input { border-radius: var(--r-md); }
#agent-app .ns-send { border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 600; }
#agent-app .ns-agents { border-radius: var(--r-lg); background: var(--surface-2); }
#agent-app .ns-anode { border-radius: var(--r-md); background: var(--surface); }
#agent-app .ns-settings { background: var(--surface); color: var(--ink); border-radius: var(--r-md); border: 1px solid var(--line); padding: 12px 16px; margin-top: var(--s-4); }
#agent-app .ns-settings summary, #agent-app .ns-settings-body, #agent-app .ns-settings-body label { color: var(--ink); margin: 4px 0; font-weight: 500; }
#agent-app .ns-settings summary { cursor: pointer; font-weight: 600; }
#agent-app .ns-key-required-hint, #agent-app .ns-setup-warn { color: var(--warn) !important; font-weight: 600; }
#agent-app .ns-devtoggle:not(.on) { color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); }
#agent-app .ns-devtoggle:not(.on):hover, #agent-app .ns-modal-close:hover { background: transparent; }
#agent-app input[type="checkbox"], #agent-app input[type="radio"] { width: auto; min-height: 0; }
#agent-app button { margin: 0; }
#agent-app .ns-w-label { font-family: inherit; }
#agent-app .ns-widget label { margin: 0; }
#agent-app .ns-w-radio label, #agent-app .ns-w-multi label, #agent-app .ns-w-toggle { font-weight: 400; }
#agent-app .ns-w-toggle { font-size: 13px; }
#agent-app .ns-w-choice { color: var(--ns-fg); }
#agent-app .ns-w-choice:disabled:hover { background: #fafbfc; }
#agent-app .ns-consent { background: var(--warn-bg); color: var(--ink); border-radius: var(--r-md); }
#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status { display: none; }
#agent-app .ns-llmbadge.mock { color: #78350f; background: #fef3c7; border: 1px solid #d97706; }
#agent-app .ns-consent-actions { flex-wrap: wrap; }
#agent-app .ns-consent-actions button { white-space: nowrap; }

/* Bound review dialog (site.js) */
body > dialog h2 { margin: 0 0 12px; font: 650 1.25rem/1.25 var(--font); letter-spacing: -0.02em; }
body > dialog button { margin-right: 8px; }
.assistant-review {
  max-width: 680px; width: min(92%, 680px); max-height: 86vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px;
  font: 15px/1.55 var(--font); background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -20px rgba(16, 24, 40, 0.45);
}
.assistant-review[open] { animation: ds-pop .28s var(--ease); }
.assistant-review::backdrop { background: rgba(11, 18, 32, 0.55); backdrop-filter: blur(4px); }
.assistant-review dl { display: grid; grid-template-columns: fit-content(40%) 1fr; gap: 8px 18px; margin: 16px 0; padding: 16px; background: var(--surface-2); border-radius: var(--r-md); }
.assistant-review dt { font-weight: 600; color: var(--muted); font-size: var(--fs-sm); }
.assistant-review dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.assistant-review details { margin: 12px 0; }
.assistant-review pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 12px; border-radius: var(--r-sm); font-size: 0.8rem; }
.assistant-review button { min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; border: none; font-family: inherit; }
.assistant-review .assistant-decline { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }

/* ---------- Motion ---------- */
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ds-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ds-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ds-dash { to { stroke-dashoffset: -24; } }
@keyframes ds-flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.reveal-armed { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-armed.is-in { opacity: 1; transform: none; }
.is-updated { animation: ds-flash .8s var(--ease); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #eef1f4 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: ds-shimmer 1.4s ease infinite; border-radius: var(--r-sm); min-height: 14px; }
@keyframes ds-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal-armed { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { display: none; }
}
@media (max-width: 860px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .assistant-panels { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .stepper { grid-auto-flow: row; grid-auto-columns: auto; gap: 14px; }
  .stepper li { padding: 0 0 0 42px; min-height: 28px; }
  .stepper li::after { display: none; }
  .section { padding-block: var(--s-7); }
}
@media (max-width: 600px) {
  .container, .shell { width: min(100% - 28px, var(--container)); }
  .cols-4 { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .card, .panel-card { padding: var(--s-4); border-radius: var(--r-md); }
  .assistant-shell { padding: var(--s-4); border-radius: var(--r-lg); }
  .btn-row > * { flex: 1 1 auto; }
  .header-bar { min-height: 60px; gap: var(--s-3); }
  .brand-domain { display: none; }
  #agent-app.ns-composed-app [data-ns-slot="chat"] { height: 560px; }
  .assistant-review dl { grid-template-columns: 1fr; gap: 2px; }
  .assistant-review dd { margin-bottom: 8px; }
}

/* ---------- Shared Night / Dark Theme Foundation ---------- */
html[data-theme="dark"] {
  --paper: #0A0F1C;
  --surface: #111827;
  --surface-2: #172033;
  --ink: #F3F5F9;
  --ink-2: #CBD2DE;
  --muted: #98A2B3;
  --line: #222D42;
  --line-strong: #2E3A52;
  --accent-soft: #18224A;
  --accent-line: #2B3A7A;
  --accent-strong: #9DB0FF;
  --accent-hover: color-mix(in srgb, var(--accent) 84%, black);
  --ok: #6CE9A6;
  --ok-bg: #0D2A1F;
  --ok-line: #1C5A41;
  --warn: #FDB022;
  --warn-bg: #2B1F0B;
  --warn-line: #5A4115;
  --info: #84CAFF;
  --info-bg: #0F2140;
  --info-line: #1E3D73;
  --danger: #FDA29B;
  --danger-bg: #2D1215;
  --danger-line: #5C2228;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 28px -6px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 4px 10px rgba(0, 0, 0, 0.4), 0 28px 56px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
[data-theme="dark"] code { background: #1B2540; border-color: var(--line-strong); color: var(--ink); }
[data-theme="dark"] .site-header, [data-theme="dark"] .site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom-color: var(--line);
}
[data-theme="dark"] .btn-dark:not([disabled]), [data-theme="dark"] .approve-btn:not([disabled]) {
  --btn-bg: #F3F5F9;
  --btn-ink: #0A0F1C;
}
[data-theme="dark"] input:hover, [data-theme="dark"] select:hover, [data-theme="dark"] textarea:hover {
  border-color: #475569;
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%2398A2B3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="dark"] .notice-icon { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); }
[data-theme="dark"] .notice-ok { color: var(--ok); }
[data-theme="dark"] .notice-ok .notice-icon { background: #059669; color: #fff; border: 0; }
[data-theme="dark"] .notice-warn { color: var(--warn); }
[data-theme="dark"] .notice-warn .notice-icon { background: #D97706; color: #fff; border: 0; }
[data-theme="dark"] .notice-info { color: var(--info); }
[data-theme="dark"] .notice-info .notice-icon { background: #2563EB; color: #fff; border: 0; }
[data-theme="dark"] .timeline li[data-state="done"]::before,
[data-theme="dark"] .stepper li[data-state="done"]::before {
  background: var(--ok);
  color: #052E1C;
  border-color: var(--ok);
}
[data-theme="dark"] .data-table tbody tr:hover { background: #151F33; }
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-strong) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
}
[data-theme="dark"] #agent-app {
  --ns-bg: var(--surface);
  --ns-fg: var(--ink);
  --ns-primary: var(--accent);
  --ns-accent: var(--accent);
  --ns-border: var(--line-strong);
  --ns-panelbg: var(--surface-2);
  --ns-msgbg: var(--surface-2);
  --ns-muted: var(--muted);
}
[data-theme="dark"] #agent-app .ns-anode,
[data-theme="dark"] #agent-app .ns-widget,
[data-theme="dark"] #agent-app .ns-tbox,
[data-theme="dark"] #agent-app .ns-modal-card {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
[data-theme="dark"] #agent-app .ns-w-choice,
[data-theme="dark"] #agent-app .ns-mact,
[data-theme="dark"] #agent-app .ns-input,
[data-theme="dark"] #agent-app .ns-settings-body input,
[data-theme="dark"] #agent-app .ns-settings-body select {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-strong);
}
[data-theme="dark"] #agent-app .ns-w-choice:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
[data-theme="dark"] #agent-app .ns-w-choice:disabled:hover { background: var(--surface-2); }
[data-theme="dark"] #agent-app .ns-key-help > a,
[data-theme="dark"] #agent-app .ns-w-cmeta { color: var(--accent-strong); }
[data-theme="dark"] #agent-app .ns-key-providers a {
  background: var(--surface-2);
  color: var(--accent-strong);
  border-color: var(--line-strong);
}
[data-theme="dark"] #agent-app .ns-key-providers a small { color: var(--ink-2); }
[data-theme="dark"] #agent-app .ns-hint.warn,
[data-theme="dark"] #agent-app .ns-consent-actions button.ghost {
  color: var(--warn);
  border-color: var(--warn-line);
}
[data-theme="dark"] #agent-app .ns-consent {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--ink);
}
[data-theme="dark"] #agent-app .ns-consent-req { color: var(--ink-2); }
[data-theme="dark"] #agent-app .ns-consent-done { color: var(--ok); }
[data-theme="dark"] #agent-app .ns-llmbadge.mock { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
[data-theme="dark"] #agent-app .ns-llmbadge.real { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
[data-theme="dark"] #agent-app .ns-llmbadge.pending { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
[data-theme="dark"] #agent-app .ns-llmbadge.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }

@media print {
  .site-header, .skip-link, .assistant-shell, .outcome-panel, #live-wall, .btn-row, .workspace-tools, .scenario-strip { display: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .hero { background: #fff !important; color: #000 !important; padding: 12px 0 !important; border-bottom: 2px solid #000; }
  .hero h1, .hero h1 span, .hero-sub, .hero-lead { color: #000 !important; -webkit-text-fill-color: #000 !important; background: none !important; }
  .card, .panel-card { box-shadow: none !important; border: 1px solid #bbb !important; break-inside: avoid; }
  .reveal-armed { opacity: 1 !important; transform: none !important; }
}


/* ==========================================================================
   CONTINUITY — the command center. Night blue, white, electric blue, emerald.
   ========================================================================== */
:root {
  --accent: #4263EB;
  --accent-strong: #2F4BC7;
  --accent-soft: #EEF1FE;
  --accent-line: #C9D3FB;
  --emerald: #10B981;
  --bg-card: var(--surface-2);   /* used by script.js inline styles */
  --bg-subtle: var(--surface-2);
  --border: var(--line);
  --dot-moveco: #4C7DFF;
  --dot-permitflow: #2E9D74;
  --dot-homeconnect: #22B8CF;
  --dot-powerflow: #34D399;
}

/* Dark theme overrides (inherits shared html[data-theme="dark"] base from base.css) */
html[data-theme="dark"] {
  --accent-soft: #18224A;
  --accent-line: #2B3A7A;
  --accent-strong: #9DB0FF;
  --accent-hover: #3654D1;
}
[data-theme="dark"] .outcome-icon { background: #059669; color: #fff; }
[data-theme="dark"] .is-warn .outcome-icon { background: #D97706; color: #fff; }

.mono-ref { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--hero-ink); background: var(--navy); overflow: hidden;
  padding: var(--s-8) 0 var(--s-7); isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 520px at 78% 30%, rgba(66, 99, 235, .22), transparent 65%),
    radial-gradient(700px 400px at 5% 100%, rgba(16, 185, 129, .10), transparent 70%),
    linear-gradient(180deg, #0B1220 0%, #0B1220 70%, #0E1628 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: var(--s-7); align-items: center; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-5); }
.hero .spec-pill { background: rgba(255,255,255,.06); color: #C9D2E3; border-color: rgba(255,255,255,.12); }
.hero h1 { font-size: var(--fs-display); line-height: 1.0; letter-spacing: -0.048em; font-weight: 680; color: #fff; }
.hero h1 span { background: linear-gradient(92deg, #FFFFFF 0%, #B9C6FF 45%, #7FE3C0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); color: #E4E9F4; margin-top: var(--s-5); font-weight: 500; letter-spacing: -0.015em; }
.hero-lead { color: var(--hero-muted); margin-top: var(--s-3); max-width: 52ch; }
.hero-ctas { margin-top: var(--s-6); }
.btn-on-dark { --btn-bg: rgba(255,255,255,.06); --btn-ink: #fff; --btn-line: rgba(255,255,255,.18); box-shadow: none; }
.btn-on-dark:hover { --btn-bg: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3) !important; }
.hero-status { margin-top: var(--s-5); }
.hero-ctas button[aria-busy="true"] { cursor: wait; opacity: .72; }

.continuity-review {
  width: min(92vw, 620px);
  max-height: min(92dvh, 820px);
  padding: 0;
  overflow: hidden;
}
.continuity-review[open] { display: flex; flex-direction: column; }
body > .continuity-review h2 { margin: 0; padding: 20px 22px 14px; }
.review-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 14px; }
.review-recovery { margin: 4px 0 12px; padding: 10px 12px; border-left: 3px solid #df973f; background: var(--surface-2); }
.review-total { margin: 10px 0 12px; color: var(--ink); font-size: var(--fs-sm); }
.review-total strong { font-size: 1.38rem; font-variant-numeric: tabular-nums; }
.review-bookings { list-style: none; padding: 0; margin: 0; border-block: 1px solid var(--line); }
.review-bookings li { display: grid; gap: 2px; padding: 10px 0; }
.review-bookings li + li { border-top: 1px solid var(--line); }
.review-bookings span { font-size: var(--fs-sm); }
.review-bookings small, .review-preserved { color: var(--muted); font-size: var(--fs-xs); }
.review-preserved { margin: 12px 0 4px; }
.review-actions { display: flex; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--surface); }
body > .continuity-review .review-actions button { margin: 0; }
.continuity-review button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 550px) {
  .review-actions { flex-direction: column; padding-inline: 16px; }
  .review-scroll { padding-inline: 16px; }
  body > .continuity-review h2 { padding-inline: 16px; }
}
.mode-pill { background: rgba(255,255,255,.06); color: #C9D2E3; border: 1px solid rgba(255,255,255,.12); }
.mode-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FDB022; }
.mode-pill.live { color: #A7F3D0; border-color: rgba(52, 211, 153, .35); background: rgba(16, 185, 129, .1); }
.mode-pill.live::before { background: var(--emerald); box-shadow: 0 0 0 4px rgba(16,185,129,.18); animation: ds-pulse 2s ease-in-out infinite; }

/* Ecosystem visualization */
.eco { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 540px; justify-self: end; }
.eco-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.eco-link { fill: none; stroke: #2A3756; stroke-width: 1.5; transition: stroke .4s; }
.eco-pulse { fill: none; stroke: #6E8BFF; stroke-width: 2; stroke-dasharray: 4 20; opacity: .55; animation: ds-dash 1.6s linear infinite; }
.eco-link[data-state="contacted"] { stroke: #3F5BD8; }
.eco-link[data-state="prepared"] { stroke: #F79009; }
.eco-link[data-state="committed"] { stroke: var(--emerald); }
.eco-link[data-state="failed"] { stroke: #F04438; }
.eco-pulse[data-state="prepared"] { stroke: #FDB022; opacity: .9; animation-duration: .9s; }
.eco-pulse[data-state="committed"] { stroke: #34D399; opacity: .9; }
.eco-pulse[data-state="failed"] { stroke: #F97066; }
.eco:not(.is-live) .eco-pulse[data-state="idle"] { opacity: .18; }
.eco-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 31%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 4px; text-align: center;
  background: radial-gradient(circle at 50% 35%, #1A2547, #0F172C 70%); border: 1px solid #33437A;
  box-shadow: 0 0 0 10px rgba(66, 99, 235, .06), 0 0 0 22px rgba(66, 99, 235, .035), 0 30px 60px -20px rgba(0,0,0,.6);
}
.eco-core strong { color: #fff; font-size: clamp(.8rem, .6rem + .5vw, 1rem); letter-spacing: .04em; }
.eco-core span:last-child { color: #A6B0C3; font-size: .7rem; max-width: 12ch; line-height: 1.25; }
.eco-core-mark { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 210deg, #4263EB, #34D399, #4263EB); mask: radial-gradient(circle, transparent 5px, #000 6px); }
.eco-node {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: grid; grid-template-columns: auto 1fr; column-gap: 9px; row-gap: 1px; align-items: center;
  min-width: 164px; padding: 11px 14px; border-radius: 14px; text-decoration: none;
  background: rgba(17, 24, 39, .88); border: 1px solid #2A3756; color: #fff;
  backdrop-filter: blur(6px); box-shadow: 0 16px 32px -16px rgba(0,0,0,.7);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.eco-node:hover, .eco-node:focus-visible { transform: translate(-50%, -50%) translateY(-3px); border-color: #4C66E0; box-shadow: 0 0 0 4px rgba(66,99,235,.2), 0 20px 40px -16px rgba(0,0,0,.8); outline: none; }
.eco-dot { width: 10px; height: 10px; border-radius: 3px; grid-row: span 3; align-self: start; margin-top: 4px; }
.dot-moveco { background: var(--dot-moveco); } .dot-permitflow { background: var(--dot-permitflow); } .dot-homeconnect { background: var(--dot-homeconnect); } .dot-powerflow { background: var(--dot-powerflow); }
.eco-name { font-weight: 620; font-size: .86rem; letter-spacing: -0.01em; }
.eco-role { font-size: .72rem; color: #8F9BB3; }
.eco-state { font-size: .68rem; color: #A6B0C3; font-weight: 560; margin-top: 3px; }
.eco-node[data-state="contacted"] { border-color: #3F5BD8; }
.eco-node[data-state="contacted"] .eco-state { color: #B9C6FF; }
.eco-node[data-state="prepared"] { border-color: #B54708; }
.eco-node[data-state="prepared"] .eco-state { color: #FEC84B; }
.eco-node[data-state="committed"] { border-color: #067647; }
.eco-node[data-state="committed"] .eco-state { color: #6CE9A6; }
.eco-node[data-state="failed"] .eco-state { color: #FDA29B; }
.peer-sync-tag { grid-column: 2; justify-self: start; margin-top: 6px; font-size: .64rem; font-weight: 700; color: #052E1C; background: #6CE9A6; padding: 3px 7px; border-radius: 999px; }
.peer-sync-tag::before { content: "✓ "; }

/* Mission steps (in hero) */
.mission-steps {
  list-style: none; margin: var(--s-7) 0 0; padding: 18px 22px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: ms;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-lg);
}
.mission-steps li { position: relative; padding-left: 38px; padding-right: 8px; min-height: 30px; }
.mission-steps li::before {
  counter-increment: ms; content: counter(ms); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 650; color: #8F9BB3; border: 1.5px solid #2E3A52; background: #0F172A; transition: all .35s var(--ease);
}
.mission-steps .st-title { display: block; font-size: .82rem; font-weight: 620; color: #E4E9F4; line-height: 1.2; }
.mission-steps .st-desc { display: block; font-size: .7rem; color: #8F9BB3; margin-top: 3px; }
.mission-steps li[data-state="done"]::before { content: "✓"; background: var(--emerald); border-color: var(--emerald); color: #04241A; }
.mission-steps li[data-state="current"]::before { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 5px rgba(66,99,235,.25); }
.mission-steps li[data-state="blocked"]::before { content: "!"; background: #3A2507; border-color: #F79009; color: #FDB022; }
.mission-steps li[data-state="todo"] .st-title { color: #8F9BB3; }

/* ---------- Workspace ---------- */
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.workspace-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.composer-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; }
.scenario-strip { padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.scenario-pills-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.strip-label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-right: 4px; }
.scenario-pill {
  font: 560 var(--fs-xs)/1 var(--font); min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); transition: all .15s;
}
.scenario-pill:hover { border-color: var(--accent-line); color: var(--ink); }
.scenario-pill.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.intake-trigger-pill { border-style: dashed; color: var(--accent-strong); }
.intake-drawer { margin-top: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: 12px; animation: ds-rise .3s var(--ease); }
.intake-drawer-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.intake-head-actions, .intake-footer-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-label-btn { margin: 0; }
.prompt-composer { padding: 22px; display: grid; gap: 14px; }
.composer-label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-label-row .input-label { margin: 0; }
.invariant-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-tag { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.inv-tag::before { content: "🔒"; font-size: 10px; }
#mission-input { font-size: 1.02rem; line-height: 1.65; min-height: 150px; background: var(--paper); border-radius: var(--r-lg); padding: 16px 18px; }
.composer-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.status-banner { font-size: var(--fs-sm); color: var(--muted); flex: 1 1 260px; }
.status-banner:empty { display: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 6px; box-shadow: var(--shadow-1); }
.kpi-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 560; }
.kpi-value { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); font-weight: 680; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-sub { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Mission (graph + approval center) ---------- */
.workspace-two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.graph-panel { padding: 0; overflow: hidden; }
.graph-panel .panel-header { padding: 20px 22px 0; }
.zoom-controls { display: flex; align-items: center; gap: 6px; }
.zoom-readout { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); min-width: 42px; text-align: center; }
.graph-viewport, .canvas-dark {
  background: radial-gradient(800px 300px at 50% 0%, #15203A, #0B1220 70%);
  border-block: 1px solid #1C2740;
}
.graph-viewport { overflow: auto; padding: 14px; min-height: 340px; }
#mission-graph-svg { width: 100%; min-width: 640px; height: auto; transform-origin: top left; transition: transform .2s var(--ease); display: block; }
.graph-node-group { cursor: pointer; transition: opacity .2s; }
.graph-node-group:hover rect:first-of-type { filter: brightness(1.18); }
.graph-node-group:focus { outline: none; }
.graph-node-group:focus-visible rect:first-of-type { stroke: #9DB0FF; stroke-width: 3; }
.node-inspector { padding: 18px 22px 22px; font-size: var(--fs-sm); color: var(--ink-2); display: grid; gap: 6px; }
.node-inspector strong { color: var(--ink); }

.approval-center { display: grid; gap: var(--s-4); }
.approval-center .panel-header { margin-bottom: 0; }
.approval-center h3 { font-size: 1.2rem; margin-top: 6px; }
.narrative-summary { font-size: var(--fs-sm); line-height: 1.6; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.narrative-summary strong { color: var(--ink); }
.hold-countdown-strip { font-size: var(--fs-sm); font-weight: 560; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); }
.guarantees { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guarantees li { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.guarantees strong { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ok); min-width: 74px; }
.sub-heading { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin-top: 4px; }
.operations-list { display: grid; gap: 10px; }
.op-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; font-size: var(--fs-xs); color: var(--muted); display: grid; gap: 4px; background: var(--surface); animation: ds-rise .35s var(--ease); }
.op-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); font-weight: 620; color: var(--ink); margin-bottom: 4px; }
.op-card code { font-size: .7rem; }
.state-tag { font-family: var(--mono); font-size: .66rem; background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.muted-empty { font-size: var(--fs-sm); color: var(--muted); padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); text-align: center; }
.approve-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px; margin-top: 4px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.approve-bar strong { font-size: var(--fs-sm); }
.approve-btn:not([disabled]) { animation: ds-flash 1.6s var(--ease) 2; }
.export-actions { display: flex; gap: 6px; }

/* ---------- Plans ---------- */
.plan-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); }
.plan-legend b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: .7rem; margin-right: 6px; }
.plans-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.plans-layout:has(#whatif-budget-box[hidden]) { grid-template-columns: 1fr; }
.plans-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.plans-list:empty::before, .plans-empty {
  content: "No plans yet. They appear here once CONTINUITY has analyzed your change.";
  grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; justify-content: center;
  padding: 36px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); font-size: var(--fs-sm); text-align: center; background: var(--surface);
}
.plans-empty-art { display: flex; gap: 6px; }
.plans-empty-art i { width: 34px; height: 44px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.plan-option {
  position: relative; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--r-lg);
  background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.plan-option:hover:not([disabled]) { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.plan-option:focus-visible { outline: none; box-shadow: var(--ring); }
.plan-option.selected { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow-2); }
.plan-option[disabled] { cursor: default; opacity: .9; }
.plan-badge-row { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.plan-letter { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--ink); color: var(--paper); }
.plan-option.selected .plan-letter { background: var(--accent); color: #fff; }
.plan-kind { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1.25; }
.plan-option-top { display: grid; gap: 8px; font-weight: 620; font-size: .95rem; letter-spacing: -0.012em; }
.plan-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price-main { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-price-delta { font-size: 0.92rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-option-meta { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; }
.pareto-badge { margin-left: 8px; background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); font-size: .62rem; padding: 4px 8px; vertical-align: middle; }
.whatif-box { border-radius: var(--r-lg); padding: 20px; color: #E4E9F4; border: 1px solid #1C2740; display: grid; gap: 12px; }
.whatif-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.whatif-label { color: #E4E9F4; margin: 0; font-weight: 560; }
.whatif-label strong { color: #fff; font-size: 1.1rem; }
.whatif-box .mono-ref { color: #8F9BB3; }
#pareto-plot-svg { width: 100%; height: auto; }

/* ---------- Network ---------- */
.section-dark { background: var(--navy); color: var(--hero-ink); }
.section-dark .section-head p, .network-foot { color: var(--hero-muted); }
.section-dark .eyebrow { color: #9DB0FF; }
.section-dark .eyebrow::before { background: #6E8BFF; }
.section-dark .artifact-chip { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); color: #E4E9F4; }
.network-foot { margin-top: var(--s-5); font-size: var(--fs-sm); }
.network-foot a { color: #B9C6FF; }
.agent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.agent-card { background: #111A2E; border: 1px solid #1F2A44; border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; align-content: start; transition: border-color .3s, transform .2s var(--ease); }
.agent-card:hover { transform: translateY(-2px); border-color: #33437A; }
.agent-card[data-state="committed"] { border-color: #0B6B45; }
.agent-card[data-state="prepared"] { border-color: #7A4A0A; }
.agent-top { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.agent-top .eco-dot { grid-row: span 1; margin-top: 7px; }
.agent-top h3 { color: #fff; font-size: 1rem; }
.agent-top p { color: #8F9BB3; font-size: var(--fs-xs); margin-top: 2px; }
.agent-status { grid-column: 1 / -1; justify-self: start; background: rgba(255,255,255,.05); color: #C9D2E3; border-color: rgba(255,255,255,.12); }
.section-dark .badge-ok { background: rgba(16,185,129,.12); color: #6CE9A6; border-color: rgba(16,185,129,.35); }
.section-dark .badge-warn { background: rgba(247,144,9,.12); color: #FEC84B; border-color: rgba(247,144,9,.35); }
.section-dark .badge-info { background: rgba(66,99,235,.14); color: #B9C6FF; border-color: rgba(110,139,255,.35); }
.section-dark .badge-danger { background: rgba(240,68,56,.12); color: #FDA29B; border-color: rgba(240,68,56,.35); }
.agent-caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.agent-caps code { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: #C9D2E3; font-size: .7rem; }
.agent-last { font-size: var(--fs-xs); color: #A6B0C3; min-height: 3em; border-top: 1px solid #1F2A44; padding-top: 12px; }
.agent-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); }
.agent-links a { color: #B9C6FF; }

/* ---------- Trust center ---------- */
.trust-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: var(--s-5); }
.trust-tile { text-align: left; font: inherit; cursor: pointer; display: grid; gap: 4px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.trust-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--accent-line); }
.trust-tile:focus-visible { outline: none; box-shadow: var(--ring); }
.trust-tile .tt-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-size: 15px; margin-bottom: 8px; }
.trust-tile strong { font-size: var(--fs-sm); }
.trust-tile span:last-child { font-size: var(--fs-xs); color: var(--muted); }
.trust-panel { padding: var(--s-5); }
.tabs-bar { margin-bottom: 0; }
.tab-intro { margin-bottom: var(--s-4); }
.chaos-header { display: flex; justify-content: space-between; gap: var(--s-5); align-items: flex-start; flex-wrap: wrap; margin-bottom: var(--s-4); }
.chaos-header > div:first-child { max-width: 72ch; }
.chaos-summary { font-size: var(--fs-sm); font-weight: 560; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: var(--s-4); color: var(--ink-2); }
.auditor-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.audit-url-input { width: min(320px, 100%); min-height: 44px; }
.timeline-list { margin: 0; padding: 0 0 0 22px; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.timeline-list li { padding: 8px 12px; border-left: 2px solid var(--line-strong); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; overflow-wrap: anywhere; }
.timeline-list li::marker { color: var(--muted); font-size: var(--fs-xs); }
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.code-box { font-family: var(--mono); font-size: .78rem; background: var(--navy); color: #D5DEF0; border-color: #1C2740; }
.code-box:focus { border-color: var(--accent); }

/* ---------- Assistant ---------- */
.sample-prompts-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: var(--s-3); }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.protocol-links { display: grid; gap: 10px; font-size: var(--fs-xs); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .eco { justify-self: center; max-width: 500px; }
  .mission-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .workspace-two-col, .plans-layout { grid-template-columns: 1fr; }
  .agent-grid, .trust-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding-top: var(--s-7); }
  .hero h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  .eco { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: none; }
  .eco-lines { display: none; }
  .eco-core { position: static; transform: none; grid-column: 1 / -1; width: auto; aspect-ratio: auto; border-radius: var(--r-lg); padding: 14px; grid-auto-flow: column; justify-content: start; gap: 12px; }
  .eco-node { position: static; transform: none; min-width: 0; }
  .eco-node:hover, .eco-node:focus-visible { transform: translateY(-2px); }
  .mission-steps { grid-template-columns: 1fr 1fr; padding: 16px; }
  .agent-grid, .trust-tiles, .kpi-grid, .converter-grid { grid-template-columns: 1fr; }
  .workspace-tools { width: 100%; }
  .composer-actions > .cta-btn { width: 100%; }
  .approve-bar .approve-btn { width: 100%; }
  .scenario-strip, .prompt-composer { padding: 16px; }
  .header-meta .top-demo-btn { min-height: 38px; padding: 0 14px; font-size: .74rem; }
  .brand-domain { display: none; }
  .graph-viewport { min-height: 280px; }
}

/* Merged-strategy explanation (e.g. Plan A is also the lowest-cost plan) */
.plans-note { margin: 0 0 var(--s-4); font-size: var(--fs-sm); color: var(--ink-2); padding: 12px 16px; border-radius: var(--r-md); background: var(--info-bg); border: 1px solid var(--info-line); }
.plans-note::before { content: "ℹ "; color: var(--info); font-weight: 700; }

/* Counterfactual relaxation prescription & inline Ed25519 receipt inspection drawers */
.rx-prescription { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; gap: 8px; justify-items: start; }
.provider-alerts-banner { margin-top: 8px; color: var(--warn); font-weight: 600; }
.receipt-drawer { margin-top: 8px; }
.receipt-drawer > summary { cursor: pointer; font-weight: 650; font-size: var(--fs-xs); color: var(--accent-strong); }
.receipt-pre { margin: 6px 0 0; padding: 10px; border-radius: var(--r-sm); background: var(--navy); color: #D5DEF0; overflow: auto; font-family: var(--mono); font-size: 0.74rem; max-height: 220px; white-space: pre-wrap; }
.inspector-head-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-card.is-dragover { outline: 2.5px dashed var(--accent); outline-offset: -6px; background: var(--accent-soft); }
.draft-actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.horizon-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(148, 163, 184, 0.22); }
.horizon-strip-label { font-size: 0.72rem; color: #cbd5e1; font-weight: 600; margin-right: 4px; }
.horizon-pill { font-family: var(--sans); font-size: 0.72rem; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.35); background: rgba(15, 23, 42, 0.55); color: #e2e8f0; cursor: pointer; transition: border-color .15s, background .15s; }
.horizon-pill:hover:not(:disabled) { border-color: #60a5fa; background: rgba(30, 41, 59, 0.9); }
.horizon-pill.active { border-color: #34d399; background: rgba(16, 185, 129, 0.22); color: #ecfdf5; font-weight: 700; }
.horizon-pill.best-day:not(.active) { border-color: #fbbf24; }
.horizon-pill:disabled { opacity: 0.45; cursor: not-allowed; }
@keyframes rippleDash { to { stroke-dashoffset: -20; } }
@media (prefers-reduced-motion: no-preference) {
  .edge-ripple-path { animation: rippleDash 1.1s linear infinite; }
}

/* Completion panel (after a commit) */
.outcome-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; width: min(440px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  padding: 18px 18px 18px 20px; border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(16, 24, 40, .35); animation: ds-pop .35s var(--ease);
}
.outcome-panel.is-ok { border-color: var(--ok-line); }
.outcome-panel.is-warn { border-color: var(--warn-line); }
.outcome-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ok); }
.is-warn .outcome-icon { background: var(--warn); }
.outcome-body { display: grid; gap: 6px; }
.outcome-body span { font-size: var(--fs-sm); color: var(--ink-2); }
.outcome-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.outcome-close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.outcome-close:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 600px) { .outcome-panel { right: 16px; bottom: 16px; } }

/* Before / after proof strip */
.hero-hint { display: block; margin-top: 10px; font-size: var(--fs-xs); color: var(--hero-muted); }
.hero-status .mode-pill { min-width: 0; max-width: 100%; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr); gap: var(--s-4); align-items: stretch; }
.proof-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: 10px; align-content: start; justify-items: start; box-shadow: var(--shadow-1); }
.proof-before { background: var(--surface-2); box-shadow: none; }
.proof-before .eyebrow { color: var(--muted); }
.proof-after { border-color: var(--accent-line); }
.proof-big { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 680; letter-spacing: -0.035em; line-height: 1.1; }
.proof-big small { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.proof-before .proof-big { color: var(--ink-2); }
.proof-text { font-size: var(--fs-sm); color: var(--muted); max-width: 44ch; }
.proof-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.proof-facts strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.proof-arrow { align-self: center; font-size: 1.6rem; color: var(--muted); }
a.badge { text-decoration: none; }
@media (max-width: 860px) { .proof-grid { grid-template-columns: 1fr; } .proof-arrow { justify-self: center; transform: rotate(90deg); } }

/* Live provider wall */
.live-wall { margin-bottom: var(--s-6); padding: var(--s-5); border-radius: var(--r-xl); background: linear-gradient(180deg, #121C33, #0F172A); border: 1px solid #24304A; }
.live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-5); }
.live-head h3 { color: #fff; font-size: 1.2rem; }
.live-head p { color: var(--hero-muted); font-size: var(--fs-sm); max-width: 68ch; margin-top: 6px; }
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.live-site { margin: 0; display: grid; grid-template-rows: auto 1fr auto; border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid #2A3756; transition: box-shadow .4s var(--ease), border-color .4s; }
.live-site[data-state="committed"] { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, .25); }
.live-site[data-state="prepared"] { border-color: #B54708; }
.live-site figcaption { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #1A2440; color: #C9D2E3; font-family: var(--mono); font-size: .66rem; min-width: 0; }
.live-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #0F172A; padding: 4px 8px; border-radius: 6px; flex: 1; min-width: 0; }
.live-dots { display: flex; gap: 4px; flex: none; }
.live-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3A4868; display: block; }
.live-frame { height: 256px; display: grid; background: var(--surface); }
.live-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.live-placeholder { place-self: center; color: var(--muted); font-size: var(--fs-xs); }
.live-state { display: block; padding: 8px 10px; font-size: .7rem; font-weight: 560; color: var(--ink-2); background: var(--surface-2); border-top: 1px solid var(--line); min-height: 2.6em; }
.live-state[data-state="committed"] { background: var(--ok-bg); color: var(--ok); }
.live-state[data-state="committed"]::before { content: "✓ "; }
.live-state[data-state="prepared"] { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 1080px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .live-grid { grid-template-columns: 1fr; } }

/* Before -> After Critical-Path & Schedule Alignment Strip */
.gantt-strip { margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.gantt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: var(--fs-sm); color: var(--ink); }
.gantt-list { display: grid; gap: 6px; }
.gantt-row {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.25fr) auto; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 8px 11px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: var(--fs-xs);
}
.gantt-row.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.gantt-title { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.gantt-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.gantt-dates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gantt-dates strong { color: var(--ink); }
.slack-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: var(--r-pill); font-size: 0.7rem; font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.slack-crit { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.slack-float { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.slack-safe { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
@media (max-width: 680px) { .gantt-row { grid-template-columns: 1fr; gap: 4px; } .slack-pill { justify-self: start; } }

/* Command Palette Dialog & Header Shortcut Badge */
.top-actions kbd { font-family: var(--mono); font-size: 0.68rem; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong); margin-left: 4px; }
.cmd-palette-dialog {
  width: min(560px, calc(100vw - 28px)); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: var(--s-5); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3);
}
.cmd-palette-dialog::backdrop { background: rgba(10, 15, 28, 0.58); }
.cmd-palette-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.cmd-palette-input { width: 100%; margin-bottom: 10px; }
.cmd-palette-list { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.cmd-palette-item {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 550 var(--fs-sm)/1.35 var(--font); cursor: pointer;
}
.cmd-palette-item:hover, .cmd-palette-item:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); outline: none; }

/* ---------- Readability & touch pass (Nov 17) ---------- */
/* Header: keep the actions on one line on wide screens; on phones the keyboard palette button would collide with the logo. */
@media (min-width: 900px) { .header-meta.top-actions { flex-wrap: nowrap; flex-shrink: 0; } .header-meta.top-actions > * { white-space: nowrap; } }
@media (max-width: 720px) { #cmd-palette-open-btn { display: none; } .brand { min-width: 0; } }
@media (hover: none) { .top-actions kbd { display: none; } }
/* No running text below 12px. */
.eco-role, .eco-state, .slack-pill, .live-url, .st-desc, .badge, .spec-pill, .mode-pill, .inv-tag, .strip-label, .artifact-chip { font-size: max(0.75rem, 12px); }
/* Card links are real targets (WCAG 2.5.8: at least 24px). */
.agent-links { gap: 4px 14px; }
.agent-links a { display: inline-flex; align-items: center; min-height: 28px; }
/* Scrollable tab bars show that they scroll. */
@media (max-width: 1100px) { .tablist { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); } }
/* Below 1240px the section nav becomes a scrollable second row instead of disappearing. */
@media (max-width: 1240px) {
  .site-header .header-bar { flex-wrap: wrap; row-gap: 0; }
  .site-header .site-nav { display: flex; order: 3; width: 100%; margin: 0 0 8px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .site-header .site-nav::-webkit-scrollbar { display: none; }
  .site-header .site-nav a { padding: 6px 10px; }
}
/* Technical details stay one click away instead of in the way. */
.tech-details { margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }
.tech-details > summary { cursor: pointer; width: fit-content; min-height: 24px; display: inline-flex; align-items: center; color: #9FB0D6; }
.tech-details > summary:hover { color: var(--ink); }
.tech-details > div { margin-top: 4px; overflow-wrap: anywhere; }
.panel-plain { margin: 6px 0 4px; color: var(--ink-2); font-size: var(--fs-sm); max-width: 70ch; }
.panel-plain + .panel-sub { font-size: var(--fs-xs); color: var(--muted); }
.proof-ok { color: var(--ok, #34D399); font-weight: 600; font-size: var(--fs-xs); margin-top: 4px; }
