/* entered-stage.css — Tier 1 styles for the entered-stage decision surface.
 *
 * Anchored to DS6 token system (--arc-rgb, --arc-hue, Geist + Geist Mono).
 * Styles for: shell (modal/fullscreen), topbar (back · stage chip · WO chip ·
 * mode toggle · WO rack · cp-timer), mode-select gate (3 cards), body, footer.
 *
 * Confine atom styles co-live here for now — split into separate files per
 * stage when tier-2 expands.
 */

/* ─── Shell · scrim + frame ────────────────────────────────────── */

.es-scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.62);
  backdrop-filter: blur(4px);
  z-index: 950;
  animation: esFadeIn 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.es-shell {
  position: fixed;
  z-index: 951;
  /* DS6 — match the workshop's surface tone (linear gradient + arc tint
     hint) so the modal feels native to the workshop, not a foreign overlay. */
  background:
    radial-gradient(circle at 50% -10%, rgba(var(--arc-rgb, 74, 144, 217), 0.06), transparent 60%),
    linear-gradient(180deg, #0e1419 0%, #0b0f15 100%);
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(var(--arc-rgb, 74, 144, 217), 0.18);
  border-radius: 14px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  font-family: 'Geist', system-ui, sans-serif;
  animation: esWidenIn 600ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

/* Round 2 — modal/fullscreen transition. The shell smoothly expands when
   Director picks a review mode (Glance/Review/Tune) and dismisses the
   gate. CSS transitions on inset + border-radius animate the expansion. */
.es-shell {
  transition:
    top 380ms cubic-bezier(0.22, 1, 0.36, 1),
    left 380ms cubic-bezier(0.22, 1, 0.36, 1),
    right 380ms cubic-bezier(0.22, 1, 0.36, 1),
    bottom 380ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 380ms ease,
    border-color 380ms ease;
}
.es-shell--modal {
  top: 8vh;
  left: max(5vw, calc(50vw - 460px));
  right: max(5vw, calc(50vw - 460px));
  bottom: 8vh;
  max-width: 920px;
  margin: 0 auto;
}

.es-shell--fullscreen {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  border-radius: 0;
}

@keyframes esFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes esWidenIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─── Topbar ───────────────────────────────────────────────────── */

.es-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.es-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font: 500 12.5px Geist, sans-serif;
  cursor: pointer;
}
.es-back:hover { background: rgba(255, 255, 255, 0.04); color: #e5e7eb; }

.es-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.es-stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--role-color, #a855f7);
  box-shadow: 0 0 8px var(--role-color, #a855f7);
}
.es-stage-dot[data-role="director"]  { --role-color: #fbbf24; }
.es-stage-dot[data-role="architect"] { --role-color: #a855f7; }
.es-stage-dot[data-role="executor"]  { --role-color: #06b6d4; }
.es-stage-dot[data-role="verifier"]  { --role-color: #22c55e; }
.es-stage-dot[data-role="closer"]    { --role-color: #ec4899; }

.es-stage-label {
  font: 600 14px Geist, sans-serif;
  color: #e5e7eb;
}

.es-wo {
  font: 400 12px 'Geist Mono', monospace;
  color: #9ca3af;
  margin-left: 4px;
}

.es-role-pill {
  font: 600 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.10);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.es-role-pill[data-role="director"]  { background: rgba(251,191,36,0.10); color: #fbbf24; border-color: rgba(251,191,36,0.25); }
.es-role-pill[data-role="executor"]  { background: rgba(6,182,212,0.10);  color: #06b6d4; border-color: rgba(6,182,212,0.25); }
.es-role-pill[data-role="verifier"]  { background: rgba(34,197,94,0.10);  color: #22c55e; border-color: rgba(34,197,94,0.25); }
.es-role-pill[data-role="closer"]    { background: rgba(236,72,153,0.10); color: #ec4899; border-color: rgba(236,72,153,0.25); }

.es-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.es-mode-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 2px;
  font: 600 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
}

.es-mode-pill {
  padding: 5px 12px;
  border-radius: 14px;
  background: transparent;
  border: 0;
  color: #9ca3af;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.es-mode-pill.is-active {
  background: rgba(168, 85, 247, 0.18);
  color: #a855f7;
}
.es-mode-pill:hover:not(.is-active) { color: #cbd5e1; }

.es-cp-timer {
  font: 500 12.5px 'Geist Mono', monospace;
  color: #9ca3af;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.es-cp-timer b { color: #e5e7eb; font-weight: 600; }

/* WO rack — droplets per WO at this stage */
.es-wo-rack {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  max-width: 260px;
}
.es-wo-rack.is-empty { opacity: 0.6; }
.es-wo-rack-label {
  font: 600 10px 'Geist Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}
.es-wo-rack-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.es-wo-rack-scroll::-webkit-scrollbar { display: none; }
.es-wo-droplet {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
  cursor: pointer;
  transition: transform 140ms ease;
}
.es-wo-droplet:hover { transform: scale(1.25); }
.es-wo-droplet.is-active { background: var(--arc-hue, #a5b4fc); box-shadow: 0 0 6px var(--arc-hue, #a5b4fc); }
.es-wo-droplet.is-awaiting { background: #fbbf24; }
.es-wo-droplet.is-running  { background: #06b6d4; box-shadow: 0 0 6px rgba(6, 182, 212, 0.6); }

/* ─── Body ─────────────────────────────────────────────────────── */

.es-body {
  flex: 1;
  overflow: auto;
  padding: 22px 28px;
}

.es-stub {
  max-width: 720px;
  margin: 12vh auto;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.es-stub h2 { margin: 0 0 10px; font: 600 18px Geist, sans-serif; color: #e5e7eb; }
.es-stub p  { margin: 6px 0; font-size: 13px; color: #9ca3af; line-height: 1.6; }
.es-stub code { font-family: 'Geist Mono', monospace; color: #cbd5e1; }

/* ─── Mode-select gate (3-card chooser) ────────────────────────── */

.es-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Was 60vh — too tall, made the mode-select feel like a fullscreen takeover.
     Reduced to fit comfortably inside the modal at workshop resolutions. */
  min-height: 40vh;
  padding: 32px 20px;
}
.es-gate-prelude {
  text-align: center;
  margin-bottom: 28px;
  max-width: 640px;
}
.es-gate-eyebrow {
  font: 600 11px 'Geist Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a855f7;
  margin-bottom: 8px;
}
.es-gate-title {
  font: 600 26px Geist, sans-serif;
  color: #e5e7eb;
  margin: 0 0 10px;
}
.es-gate-sub {
  font-size: 13.5px;
  color: #9ca3af;
  line-height: 1.6;
  margin: 0;
}

.es-gate-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 280px));
  gap: 18px;
}
.es-gate-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  text-align: left;
  color: inherit;
  font-family: inherit;
}
.es-gate-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.04);
}
.es-gate-card.is-default {
  border-color: rgba(168, 85, 247, 0.40);
  background: rgba(168, 85, 247, 0.05);
}
.es-gate-icon { font-size: 26px; line-height: 1; }
.es-gate-name {
  font: 600 18px Geist, sans-serif;
  color: #e5e7eb;
}
.es-gate-alt {
  font: 500 11px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
}
.es-gate-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
}
.es-gate-time {
  margin-top: auto;
  font: 500 11.5px 'Geist Mono', monospace;
  color: #6b7280;
  align-self: flex-end;
}

/* ─── Footer ───────────────────────────────────────────────────── */

.es-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}
.es-primary {
  background: rgba(168, 85, 247, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(168, 85, 247, 0.40);
}
.es-primary:hover { background: rgba(168, 85, 247, 0.28); color: #fff; }

/* ─── Confine atoms ────────────────────────────────────────────── */

.es-mode-explainer {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(168, 85, 247, 0.05);
  border-left: 3px solid #a855f7;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.55;
}
.es-mode-explainer b {
  display: inline-block;
  margin-bottom: 4px;
  color: #a855f7;
  font: 600 11px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.es-summary-band {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: rgba(168, 85, 247, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 10px;
}
.es-summary-band .es-stage-dot { width: 18px; height: 18px; flex: 0 0 auto; }
.es-summary-text { flex: 1; }
.es-summary-head { font: 600 14px Geist, sans-serif; color: #e5e7eb; }
.es-summary-sub  {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 3px;
  line-height: 1.5;
}
.es-summary-sub em { color: #fbbf24; font-style: italic; }
.es-summary-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.es-confine-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.es-confine-right { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 14px; }

.es-section {
  background: transparent;
}
.es-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.es-section-title {
  font: 600 14px Geist, sans-serif;
  color: #e5e7eb;
}
.es-section-count {
  font: 500 11.5px 'Geist Mono', monospace;
  color: #9ca3af;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.es-section-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.es-engagement-tally {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11.5px 'Geist Mono', monospace;
  color: #6b7280;
}
.es-engagement-tally__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.es-engagement-tally.is-progress .es-engagement-tally__dot { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
.es-engagement-tally.is-complete .es-engagement-tally__dot { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }

.es-bulk-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0 12px;
  font-size: 11px;
  color: #9ca3af;
}
.es-bulk-row > span:first-child { margin-right: 4px; }

.es-ac-list { display: flex; flex-direction: column; gap: 8px; }

.es-ac-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 200ms ease, background 200ms ease;
}
.es-ac-row.is-modifying {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(251, 191, 36, 0.04);
}
.es-ac-row.is-nfr {
  border-left: 3px solid rgba(34, 197, 94, 0.50);
}
.es-ac-row.is-engaged {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.04);
}
.es-ac-row--placeholder {
  border-style: dashed;
  opacity: 0.65;
}
.es-ac-id {
  font: 600 11px 'Geist Mono', monospace;
  color: #a855f7;
  align-self: start;
  padding-top: 2px;
}
.es-ac-row.is-nfr .es-ac-id { color: #4ad982; }
.es-ac-id small { color: #6b7280; font-weight: 400; letter-spacing: 0; }

.es-ac-text {
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.5;
}
.es-ac-rationale {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 4px;
  line-height: 1.5;
}
.es-ac-caveat {
  font-size: 11.5px;
  color: #fbbf24;
  margin-top: 4px;
  font-style: italic;
}

.es-scope-chip {
  align-self: start;
  font: 500 11.5px Geist, sans-serif;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: #cbd5e1;
  cursor: pointer;
}
.es-scope-chip[data-scope-chip="invariant"] { background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.25); color: #4ade80; }
.es-scope-chip[data-scope-chip="variant"]   { background: rgba(99, 102, 241, 0.10); border-color: rgba(99, 102, 241, 0.25); color: #a5b4fc; }
.es-scope-chip[data-scope-chip="modifying-if-tension"],
.es-scope-chip[data-scope-chip="modifying"] { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.30); color: #fbbf24; }
.es-scope-chip.is-disabled { opacity: 0.5; cursor: default; }

/* Sidecar — Strategist Candidates */
.es-candidates {
  border: 1px solid rgba(168, 85, 247, 0.20);
  border-radius: 10px;
  padding: 14px;
  background: rgba(168, 85, 247, 0.02);
}
.es-candidates .es-section-title { color: #a855f7; }
.es-candidates-blurb {
  font-size: 11.5px;
  color: #9ca3af;
  margin-bottom: 12px;
  line-height: 1.5;
}
.es-candidates-empty {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}
.es-candidate {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
}
.es-candidate:last-child { margin-bottom: 0; }
.es-candidate-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 4px;
}
.es-candidate-note {
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.45;
  margin-bottom: 8px;
}
.es-candidate-actions { display: flex; gap: 4px; }

.es-open-questions {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 11.5px;
  color: #9ca3af;
}
.es-oq-head {
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
  font-size: 12px;
}
.es-oq-count { color: #fbbf24; }
.es-oq-list { line-height: 1.5; margin-bottom: 8px; }
.es-oq-item { margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════════════════════════
   Shared primitives — factored from Round 2 cascade analysis.
   Used across multiple stage atoms.
   ═══════════════════════════════════════════════════════════════════════ */

/* Hover-preview (10 instances: Recon · Confine · Design · Prototype · Plan ·
   Execute · Remediate · Interrogate · Verify · Validate). Anchored container
   with .es-hp-popover that surfaces on hover. Variant via [data-anchor]
   attribute drives accent colour. */
.es-hp { position: relative; }
.es-hp-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 6;
  padding: 8px 10px;
  background: #0a0a0d;
  color: #cbd5e1;
  border: 1px solid rgba(168, 85, 247, 0.30);
  border-radius: 6px;
  font: 400 11px Geist, sans-serif;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.es-hp:hover .es-hp-popover,
.es-hp:focus-within .es-hp-popover { display: block; }
.es-hp-popover__head {
  font: 600 9.5px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a855f7;
  margin-bottom: 4px;
}
.es-hp-popover[data-anchor="impact"] { border-color: rgba(168, 85, 247, 0.30); }
.es-hp-popover[data-anchor="impact"] .es-hp-popover__head { color: #a855f7; }
.es-hp-popover[data-anchor="trace"]  { border-color: rgba(196, 181, 253, 0.30); }
.es-hp-popover[data-anchor="trace"] .es-hp-popover__head { color: #c4b5fd; }
.es-hp-popover[data-anchor="broken"] { border-color: rgba(239, 68, 68, 0.30); }
.es-hp-popover[data-anchor="broken"] .es-hp-popover__head { color: #ef4444; }
.es-hp-popover[data-anchor="finding"] { border-color: rgba(248, 113, 113, 0.30); }
.es-hp-popover[data-anchor="finding"] .es-hp-popover__head { color: #f87171; }
.es-hp-popover[data-anchor="downstream"] { border-color: rgba(74, 217, 130, 0.30); }
.es-hp-popover[data-anchor="downstream"] .es-hp-popover__head { color: #4ad982; }
.es-hp-popover--bottom { bottom: auto; top: calc(100% + 6px); }
.es-hp-popover__fix {
  display: block;
  margin-top: 6px;
  padding: 4px 6px;
  background: rgba(34, 197, 94, 0.06);
  border-left: 2px solid #4ad982;
  border-radius: 0 4px 4px 0;
  color: #4ad982;
  font: 500 10.5px Geist, sans-serif;
}

/* Help-icon (3 instances: Design · Confine · Validate). `?` icon next to a
   plain-language label that reveals an explainer overlay on hover. */
.es-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.30);
  color: #a855f7;
  font: 600 9px 'Geist Mono', monospace;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
}
.es-help-icon:hover { background: rgba(168, 85, 247, 0.20); }
.es-help-overlay {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  padding: 10px 12px;
  background: #0a0a0d;
  color: #cbd5e1;
  border: 1px solid rgba(168, 85, 247, 0.30);
  border-radius: 6px;
  font: 400 11.5px Geist, sans-serif;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 9;
}
.es-help-icon:hover + .es-help-overlay,
.es-help-icon:focus + .es-help-overlay { display: block; }

/* First-visit (3 modes: banner / overlay / guide). Lifecycle gated via
   data-first-visit-only; live impl reads sessionStorage. */
.es-first-visit { animation: esFvBob 1.4s ease-in-out infinite alternate; }
.es-first-visit[data-mode="banner"] {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.06), rgba(34, 211, 238, 0.04));
  border: 1px solid rgba(168, 85, 247, 0.30);
  border-radius: 10px;
}
.es-first-visit[data-mode="overlay"] {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: 280px;
  z-index: 8;
  padding: 14px;
  background: #0a0a0d;
  color: #cbd5e1;
  border: 1px solid rgba(168, 85, 247, 0.40);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font: 500 12px Geist, sans-serif;
  line-height: 1.55;
  animation: esFvFadeIn 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.es-first-visit[data-mode="guide"] {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font: 600 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  background: #0a0a0d;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.40);
  border-radius: 10px;
  z-index: 3;
  animation: esFvBob 1.2s ease-in-out infinite alternate;
}
.es-first-visit__close {
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 4px;
}
.es-first-visit.is-dismissed { display: none !important; }
@keyframes esFvBob {
  from { transform: translateX(-2px); }
  to   { transform: translateX(2px); }
}
@keyframes esFvFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Decision-quad — per-row action set (Verify · Remediate · Interrogate). */
.es-decision-quad {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.es-decision-quad .btn { font-size: 10.5px; padding: 4px 8px; }
.es-decision-quad__more {
  cursor: pointer;
  font: 500 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  color: #6b7280;
}
.es-decision-quad__more:hover { color: #cbd5e1; }

/* Status-strip — heartbeat / form-invariants / progress. Below main, above
   action footer slot (Prototype Q4 · Execute Lock #5 · Verify Lock #6). */
.es-status-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font: 500 11.5px Geist, sans-serif;
  color: #cbd5e1;
}
.es-status-strip__label {
  font: 600 10px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
}
.es-status-strip[data-strip="form-invariants"] {
  border-top-color: rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.04);
}
.es-status-strip[data-strip="form-invariants"] .es-status-strip__label { color: #4ad982; }
.es-status-strip[data-strip="heartbeat"] {
  border-top-color: rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.03);
}
.es-status-strip[data-strip="heartbeat"] .es-status-strip__label { color: #22d3ee; }
.es-status-strip__items {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
}
.es-status-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.20);
}
.es-status-strip__item.is-broken {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.30);
  cursor: help;
}
.es-status-strip__check { color: #4ad982; font-size: 12px; }
.es-status-strip__item.is-broken .es-status-strip__check { color: #ef4444; }

/* Stagger-in keyframe + custom-property pattern (Confine · Plan · Prototype ·
   Verify Lock #5). Apply with `--es-stagger-delay: 0ms` per item. */
@keyframes es-stagger-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.es-stagger-in {
  animation: es-stagger-in 480ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--es-stagger-delay, 0ms);
}

/* Tally-celebrate (4 instances). */
@keyframes es-tally-celebrate {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); color: #22c55e; }
  100% { transform: scale(1); }
}
.es-tally-celebrate { animation: es-tally-celebrate 700ms ease-out; }
.es-tally-celebrate::before { content: '✓ '; color: #22c55e; font-weight: 700; margin-right: 4px; }

/* Footer-state-by-verdict (clean / cautious / block). Forms a state machine
   on the entered-shell action footer. */
.es-footer[data-verdict-state="clean"] .btn:first-of-type {
  background: rgba(34, 197, 94, 0.18);
  color: #4ad982;
  border: 1px solid rgba(34, 197, 94, 0.40);
  animation: es-clean-pulse 1.6s ease-in-out infinite;
}
@keyframes es-clean-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
  50%      { transform: scale(1.03); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.20); }
}
.es-footer[data-verdict-state="cautious"] .btn:first-of-type {
  background: rgba(251, 191, 36, 0.10);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.40);
  animation: es-cautious-nudge 2.4s ease-in-out infinite;
}
@keyframes es-cautious-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
  50%      { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15); }
}
.es-footer[data-verdict-state="block"] .btn:first-of-type {
  background: rgba(239, 68, 68, 0.10);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.40);
}

/* Extract-to-Polaris (1 instance, Review Lock #6 DISCUSS). Capsule travels
   right toward Polaris target. */
.es-extract-band {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-top: 14px;
  background: rgba(168, 85, 247, 0.05);
  border: 1px dashed rgba(168, 85, 247, 0.30);
  border-radius: 10px;
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}
.es-extract-band__icon { font-size: 18px; color: #a855f7; }
.es-extract-band__capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.40);
  border-radius: 14px;
  font: 600 10.5px 'Geist Mono', monospace;
  color: #c4b5fd;
  letter-spacing: 0.06em;
  animation: es-capsule-transport 3.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes es-capsule-transport {
  0%   { transform: translateX(0) scale(1); opacity: 0; }
  15%  { transform: translateX(8px) scale(1.05); opacity: 1; }
  75%  { transform: translateX(120px) scale(0.85); opacity: 1; }
  100% { transform: translateX(160px) scale(0.6); opacity: 0; }
}
.es-extract-band__target {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 600 10.5px 'Geist Mono', monospace;
  color: #a855f7;
  letter-spacing: 0.06em;
}

/* Common section / row patterns shared across stages */
.es-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 8px;
  align-items: start;
  position: relative;
}
.es-row.is-engaged { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.04); }
.es-row__id { font: 600 11px 'Geist Mono', monospace; color: #a855f7; padding-top: 2px; }
.es-row__id small { display: block; color: #6b7280; font-weight: 400; letter-spacing: 0; }
.es-row__body { font-size: 13px; color: #e5e7eb; line-height: 1.5; }
.es-row__notes {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 6px;
  line-height: 1.5;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}
.es-row__notes b { color: #cbd5e1; font-weight: 600; }

/* Verdict-pill */
.es-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 10px;
  font: 600 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.es-verdict-pill[data-verdict="pass"]      { background: rgba(34, 197, 94, 0.12);  color: #4ad982; }
.es-verdict-pill[data-verdict="partial"]   { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.es-verdict-pill[data-verdict="fail"]      { background: rgba(239, 68, 68, 0.12);  color: #ef4444; }
.es-verdict-pill[data-verdict="completed"] { background: rgba(34, 197, 94, 0.12);  color: #4ad982; }
.es-verdict-pill[data-verdict="deviated"]  { background: rgba(125, 211, 252, 0.15); color: #7dd3fc; }
.es-verdict-pill[data-verdict="blocked"]   { background: rgba(239, 68, 68, 0.12);  color: #ef4444; }
.es-verdict-pill[data-verdict="blocker"]   { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.es-verdict-pill[data-verdict="notable"]   { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.es-verdict-pill[data-verdict="minor"]     { background: rgba(125, 211, 252, 0.15); color: #7dd3fc; }
.es-verdict-pill[data-verdict="advisory"]  { background: rgba(168, 85, 247, 0.15); color: #c4b5fd; }
.es-verdict-pill[data-verdict="fixed"]     { background: rgba(34, 197, 94, 0.15);  color: #4ad982; }
.es-verdict-pill[data-verdict="implemented"] { background: rgba(34, 197, 94, 0.10); color: #22c55e; }

/* Mode hint chip (used for Quick-mode swipe affordances per stage) */
.es-mode-hint {
  font: 500 10px 'Geist Mono', monospace;
  color: #6b7280;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

/* Bulk row */
.es-bulk-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0 12px;
  font-size: 11px;
  color: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════════════════
   Atom-specific styles — referenced by per-stage atom modules.
   ═══════════════════════════════════════════════════════════════════════ */

/* WO summary rows (Propose · Align mission brief) */
.es-wo-summary {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12.5px;
  line-height: 1.55;
}
.es-summary-row { display: contents; }
.es-summary-row__label {
  font: 600 11px 'Geist Mono', monospace;
  color: #a855f7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.es-summary-row__value { color: #cbd5e1; }

/* Propose lane cards */
.es-lane-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.es-lane-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.es-lane-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.04);
}
.es-lane-card.is-active {
  border-color: rgba(168, 85, 247, 0.50);
  background: rgba(168, 85, 247, 0.08);
}
.es-lane-card__weight { display: inline-flex; gap: 3px; }
.es-lane-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.es-lane-dot.is-lit { background: #a855f7; box-shadow: 0 0 4px #a855f7; }
.es-lane-card__name { font: 600 16px Geist, sans-serif; color: #e5e7eb; }
.es-lane-card__current,
.es-lane-card__recommended {
  font: 600 9.5px 'Geist Mono', monospace;
  letter-spacing: 0.08em;
  color: #fbbf24;
  text-transform: uppercase;
}
.es-lane-card__recommended {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  align-self: flex-start;
}
.es-lane-card__time { font: 700 22px Geist, sans-serif; color: #c4b5fd; line-height: 1; }
.es-lane-card__range { font: 500 11px 'Geist Mono', monospace; color: #6b7280; }
.es-lane-card__desc { font-size: 12px; color: #9ca3af; line-height: 1.5; margin-top: 4px; }
.es-lane-hint {
  font-size: 11px; color: #94a3b8; line-height: 1.5; font-style: italic;
  margin: 8px 4px 0; text-align: center;
}

/* Read-only lane card (informational, not selectable) */
.es-lane-card--readonly {
  cursor: default;
  pointer-events: none;
  opacity: 0.55;
  transform: none !important;
}
.es-lane-card--readonly.is-recommended {
  opacity: 1;
  border-color: rgba(34, 211, 238, 0.40);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}

/* Lane-mismatch warning band (Round 2.1) — surfaces when operative
   under-laned the WO. Director adjusts at Align. */
.es-lane-warning {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; margin: 12px 16px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
}
.es-lane-warning__icon {
  font-size: 18px; line-height: 1.2;
  color: #fbbf24;
  flex-shrink: 0;
}
.es-lane-warning__head {
  font: 600 13px Geist, sans-serif;
  color: #fbbf24;
  margin-bottom: 2px;
}
.es-lane-warning__detail {
  font-size: 12px; line-height: 1.5;
  color: #cbd5e1;
}

/* Redacted-token treatment (Round 2.1) — sanitiser tokens that survived
   unmask (cross-entity, masked by design) get a classified-document bar.
   Reinforces the cutout architecture's purpose: 'this content belongs to
   a different entity and the platform is structurally blind to it'. */
.redacted-token {
  display: inline-block;
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 3px;
  padding: 0 6px;
  margin: 0 1px;
  vertical-align: baseline;
  user-select: none;
  cursor: help;
  font-family: 'Geist Mono', monospace;
  font-size: 0.85em;
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.redacted-token::before {
  content: 'CLASSIFIED';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(248, 113, 113, 0.65);
  pointer-events: none;
}
.redacted-token::after {
  content: '';
  position: absolute; inset: 2px;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 2px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  border-radius: 2px;
}
.redacted-token:hover {
  border-color: rgba(248, 113, 113, 0.35);
}

/* Director clarification (Round 2.1) — final review action, after questions */
.es-clarification-hint {
  font-size: 11.5px; color: #94a3b8; line-height: 1.5;
  margin: 0 0 8px;
  font-style: italic;
}

/* Director note (Round 2) */
.es-director-note {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e5e7eb;
  padding: 10px 12px;
  font: 14px Geist, sans-serif;
  resize: vertical;
  min-height: 56px;
}
.es-director-note:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.10);
}

/* Reframed open-questions UI (Round 2) */
.es-q-head {
  display: flex; gap: 8px; align-items: flex-start;
  margin-bottom: 8px;
}
.es-q-sev {
  font: 600 9.5px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.es-q-sev--blocker {
  color: #f87171;
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.30);
}
.es-q-sev--advisory {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.es-q-chip--proposed {
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.30);
  color: #c7d2fe;
}
.es-q-chip--proposed:hover { background: rgba(99, 102, 241, 0.16); }
.es-q-chip--proposed.is-selected {
  background: rgba(99, 102, 241, 0.30);
  border-color: rgba(99, 102, 241, 0.60);
  color: #fff;
}
.es-q-chip--custom {
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}
.es-q-chip--custom.is-selected {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.40);
  color: #67e8f9;
}

/* Answer cards (Round 2.1 — vertical cards with tradeoff line + impact badges) */
.es-q-answers {
  display: flex; flex-direction: column; gap: 8px;
  margin: 6px 0 10px;
}
.es-q-answer {
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.20);
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.es-q-answer:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.40);
}
.es-q-answer.is-selected {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.30);
}
.es-q-answer__label {
  font: 600 13.5px Geist, sans-serif;
  color: #e5e7eb;
  line-height: 1.3;
}
.es-q-answer__tradeoff {
  font: 400 12px Geist, sans-serif;
  color: #94a3b8;
  line-height: 1.45;
}
.es-q-answer__impacts {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 2px;
}
.es-q-impact {
  font: 600 9px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.es-q-impact--time       { color: #fbbf24; border-color: rgba(251, 191, 36, 0.30); }
.es-q-impact--arch       { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.30); }
.es-q-impact--scope      { color: #67e8f9; border-color: rgba(103, 232, 249, 0.30); }
.es-q-impact--cost       { color: #f87171; border-color: rgba(248, 113, 113, 0.30); }
.es-q-impact--complexity { color: #a78bfa; border-color: rgba(167, 139, 250, 0.30); }
.es-q-impact--ux         { color: #34d399; border-color: rgba(52, 211, 153, 0.30); }

.es-q-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 4px;
}
.es-q-custom-input {
  width: 100%;
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #e5e7eb;
  padding: 8px 10px;
  font: 13px Geist, sans-serif;
  resize: vertical;
}
.es-q-custom-input[hidden] { display: none; }
.es-q-custom-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.10);
}

/* Cost preview */
.es-cost-preview {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-top: 14px;
}
.es-cost-preview__time-block { flex: 1; }
.es-cost-preview__time-primary { font: 700 28px Geist, sans-serif; color: #c4b5fd; }
.es-cost-preview__time-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  margin: 6px 0;
}
.es-cost-preview__time-bar-fill {
  position: absolute;
  left: 30%; right: 30%;
  top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.6), rgba(196, 181, 253, 0.4));
  border-radius: 3px;
}
.es-cost-preview__time-range { font: 500 11px 'Geist Mono', monospace; color: #6b7280; }
.es-cost-preview__dev {
  font: 500 11px 'Geist Mono', monospace;
  color: #475569;
  text-align: right;
  align-self: flex-end;
  line-height: 1.5;
}

/* Open-question chips (Propose) */
.es-q-list { display: flex; flex-direction: column; gap: 8px; }
.es-q-row {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}
.es-q-text { font-size: 12.5px; color: #cbd5e1; margin-bottom: 8px; }
.es-q-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.es-q-chip {
  padding: 4px 10px;
  font: 500 11px Geist, sans-serif;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: #cbd5e1;
  cursor: pointer;
}
.es-q-chip:hover { background: rgba(255, 255, 255, 0.08); }
.es-q-chip.is-selected {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.40);
  color: #c4b5fd;
}
.es-q-chip.is-escape {
  border-style: dashed;
  font-style: italic;
  color: #6b7280;
}
.es-q-chip.is-escape.is-selected {
  border-style: dashed;
  background: rgba(168, 85, 247, 0.10);
  color: #c4b5fd;
}

/* Align — confidence ring */
.es-conf-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 11px 'Geist Mono', monospace;
  flex-shrink: 0;
}
.es-conf-ring.is-high   { background: conic-gradient(#22c55e 0% 91%, rgba(255,255,255,0.05) 91% 100%); color: #22c55e; }
.es-conf-ring.is-medium { background: conic-gradient(#fbbf24 0% 64%, rgba(255,255,255,0.05) 64% 100%); color: #fbbf24; }
.es-conf-ring.is-low    { background: conic-gradient(#f87171 0% 34%, rgba(255,255,255,0.05) 34% 100%); color: #f87171; animation: lowPulse 2.4s ease-in-out infinite; }
.es-conf-ring__inner { width: 32px; height: 32px; background: #0e1419; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
@keyframes lowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18); }
}

.es-answer-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  align-items: center;
}
.es-answer-q { color: #9ca3af; font-size: 11.5px; margin-bottom: 4px; font-style: italic; }
.es-answer-a { color: #e5e7eb; font-size: 13px; line-height: 1.5; }
.es-answer-note { font-size: 11.5px; color: #fbbf24; margin-top: 4px; font-style: italic; }
.es-answer-act { display: flex; flex-direction: column; gap: 4px; }
.ans-btn {
  font: 600 11px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}
.ans-btn--approve {
  background: rgba(34, 197, 94, 0.10);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.30);
}
.ans-btn--rephrase {
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.25);
}
.ans-btn.is-selected { box-shadow: 0 0 0 2px currentColor; }

/* Align — tension cards */
.es-tension-stack { position: relative; min-height: 160px; padding: 0 6px; }
.es-tension-card {
  padding: 14px;
  background: rgba(168, 85, 247, 0.04);
  border-left: 3px solid rgba(168, 85, 247, 0.40);
  border-radius: 0 8px 8px 0;
  margin-bottom: 10px;
  transition: transform 220ms ease, opacity 220ms ease;
}
.es-tension-card__title { font: 600 13px Geist, sans-serif; color: #e5e7eb; margin-bottom: 4px; }
.es-tension-card__body  { font-size: 12px; color: #cbd5e1; line-height: 1.5; margin-bottom: 8px; }
.es-tension-card__swipe { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.es-swipe-chip {
  padding: 5px 12px;
  border-radius: 14px;
  font: 600 11px 'Geist Mono', monospace;
  cursor: pointer;
  position: relative;
  transition: transform 140ms;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.es-swipe-chip:hover { transform: translateY(-1px); }
.es-swipe-chip[data-side="left"]  { background: rgba(99, 102, 241, 0.10); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.25); }
.es-swipe-chip[data-side="right"] { background: rgba(34, 197, 94, 0.10); color: #22c55e; border-color: rgba(34, 197, 94, 0.25); }
.es-swipe-chip[data-side="discuss"] { background: rgba(168, 85, 247, 0.10); color: #a855f7; border-color: rgba(168, 85, 247, 0.25); }
.es-swipe-chip.is-selected { box-shadow: 0 0 0 2px currentColor; }
.es-swipe-hint {
  font: 500 10px 'Geist Mono', monospace;
  color: #6b7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: auto;
}

/* Align — squad grid */
.es-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.es-squad-member {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
}
.es-squad-member.is-captain {
  border-color: rgba(251, 191, 36, 0.40);
  background: rgba(251, 191, 36, 0.04);
}
.es-squad-member__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}
.es-squad-member.is-captain .es-squad-member__avatar {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.30);
}
.es-squad-member__body { flex: 1; min-width: 0; }
.es-squad-member__name { font: 600 12.5px Geist, sans-serif; color: #e5e7eb; }
.es-squad-member__class { font: 500 11px 'Geist Mono', monospace; color: #a855f7; margin-top: 2px; }
.es-squad-member__alloc { font-size: 11px; color: #9ca3af; margin-top: 4px; line-height: 1.4; }
.es-squad-member__cap {
  position: absolute;
  top: 6px; right: 6px;
  font: 600 9.5px 'Geist Mono', monospace;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.10);
  color: #fbbf24;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.es-captain-picker { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.es-captain-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 140ms ease;
}
.es-captain-icon:hover { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.30); }
.es-captain-icon.is-active {
  background: rgba(251, 191, 36, 0.18);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.45);
}

/* Align — Continue arrow */
.es-continue-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 4px 4px;
  font: 500 11.5px 'Geist Mono', monospace;
  color: #6b7280;
  letter-spacing: 0.04em;
}
.es-continue-arrow__icon {
  font-size: 18px;
  color: #a855f7;
  animation: arrowBob 1.6s ease-in-out infinite;
}
@keyframes arrowBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* Align — ETA widget */
.es-eta-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.04);
  margin-top: 14px;
}
.es-eta-widget__icon { font-size: 22px; }
.es-eta-widget__value { font: 600 18px Geist, sans-serif; color: #e5e7eb; }
.es-eta-widget__label { font-size: 11.5px; color: #9ca3af; }
.es-eta-widget__bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  position: relative;
}
.es-eta-widget__bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 34%;
  background: linear-gradient(90deg, #22c55e, rgba(34, 197, 94, 0.3));
  border-radius: 3px;
}
.es-eta-widget__pct {
  font: 600 11px 'Geist Mono', monospace;
  color: #22c55e;
  letter-spacing: 0.04em;
}

/* Align — progress rail */
.es-align-layout { display: grid; grid-template-columns: 18px 1fr; gap: 18px; }
.es-progress-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  position: sticky;
  top: 14px;
  align-self: start;
}
.es-progress-rail__node {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.es-progress-rail__node.is-active {
  background: rgba(168, 85, 247, 0.45);
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}
.es-progress-rail__node.is-done {
  background: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}
.es-progress-rail__bar {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.40), rgba(255, 255, 255, 0.05));
  margin-left: 6px;
  min-height: 24px;
}

/* Recon-specific extras (pillar weight bar animations) */
.pillar-chip { position: relative; padding: 6px 10px; border-radius: 12px; background: rgba(168, 85, 247, 0.06); border: 1px solid rgba(168, 85, 247, 0.20); color: #cbd5e1; font: 500 12px Geist, sans-serif; }
.pillar-chip--dim { opacity: 0.6; }
.pillar-chip__weight { font-family: 'Geist Mono', monospace; font-size: 11px; color: #a855f7; margin-left: 4px; }
.pillar-chip[data-weight-bar]::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, rgba(255, 255, 255, 0.10));
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: pillarBar 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes pillarBar { to { transform: scaleX(var(--bar-end, 0.7)); } }

/* Recon — field report */
.es-field-report {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(232, 121, 76, 0.06);
  border: 1px solid rgba(232, 121, 76, 0.20);
  border-radius: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 14px;
}
.es-field-report__icon {
  width: 28px; height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(232, 121, 76, 0.15);
  border: 1px solid rgba(232, 121, 76, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fdba74;
}
.es-field-report__head {
  font: 600 10px Geist, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fdba74;
  margin-bottom: 4px;
}
.es-field-report__quote { font-style: italic; }

/* Recon — finding cards (closer-look amber) */
.finding-card.is-closer-look {
  border-color: rgba(251, 191, 36, 0.30) !important;
  background: rgba(251, 191, 36, 0.04) !important;
  position: relative;
}
.finding-card.is-closer-look::before {
  content: '⚠';
  position: absolute;
  top: 8px; right: 10px;
  color: #fbbf24;
  font-size: 14px;
}

/* Plan-specific (used by plan atom · already partially in entered_stage_A_plan mock CSS) */
.plan-fork {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.plan-card-mock {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.plan-card-mock[data-hover-preview]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.20);
}
.plan-card-mock.is-recommended {
  border-color: rgba(168, 85, 247, 0.40);
  background: rgba(168, 85, 247, 0.04);
}
.plan-card-mock.is-locked-out {
  opacity: 0.40;
  filter: grayscale(0.6);
  border-style: dashed;
  cursor: not-allowed;
  position: relative;
}
.plan-card-mock.is-locked-out::after {
  content: '🔒';
  position: absolute;
  top: 10px; right: 12px;
  font-size: 14px;
  color: #6b7280;
}
.plan-card-mock.is-discrete-segmented .plan-card-mock__title::after {
  content: '';
  display: block;
  height: 3px;
  margin-top: 8px;
  background: linear-gradient(90deg,
    #4ad982 0%, #4ad982 32%,
    rgba(255,255,255,0.05) 32%, rgba(255,255,255,0.05) 34%,
    #4ad982 34%, #4ad982 66%,
    rgba(255,255,255,0.05) 66%, rgba(255,255,255,0.05) 68%,
    #4ad982 68%, #4ad982 100%);
  border-radius: 1px;
}
.plan-card-mock__badge {
  display: inline-block;
  font: 600 10px 'Geist Mono', monospace;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(168, 85, 247, 0.18);
  color: #a855f7;
  align-self: flex-start;
}
.plan-card-mock__why-no-alt {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid rgba(168, 85, 247, 0.30);
  border-radius: 0 4px 4px 0;
  font-size: 10.5px;
  color: #9ca3af;
  font-style: italic;
}
.plan-card-mock__title { font: 600 14px Geist, sans-serif; color: #e5e7eb; }
.plan-card-mock__stats { font: 500 11px 'Geist Mono', monospace; color: #9ca3af; letter-spacing: 0.04em; }
.plan-card-mock__pros, .plan-card-mock__cons { font-size: 12px; line-height: 1.5; }
.plan-card-mock__pros { color: #a7f3d0; }
.plan-card-mock__cons { color: #fca5a5; }
.plan-card-mock__pros::before { content: '✓ '; color: #22c55e; }
.plan-card-mock__cons::before { content: '✗ '; color: #f87171; }
.plan-card-mock__role-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font: 500 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.plan-card-mock__live-clock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 11px 'Geist Mono', monospace;
  color: #a855f7;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 220ms;
}
.plan-card-mock[data-hover-preview]:hover .plan-card-mock__live-clock { opacity: 1; }
.plan-card-mock__live-clock-icon { display: inline-block; animation: clockSpin 1.4s linear infinite; }
@keyframes clockSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.role-run-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px;
}
.role-run-icon[data-role="executor"] {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.30);
}
.role-run-icon[data-role="architect"] {
  background: rgba(168, 85, 247, 0.18);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.30);
}
.exec-style {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font: 600 10px 'Geist Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.exec-style.monolithic { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.exec-style.discrete { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.risk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.risk-low { background: #22c55e; }
.risk-mod, .risk-moderate { background: #fbbf24; }
.risk-high { background: #f87171; }
.quick-fan-hint {
  font: 500 10px 'Geist Mono', monospace;
  color: #6b7280;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  align-self: flex-start;
}

.step-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  margin-bottom: 6px;
  align-items: start;
  background: rgba(255, 255, 255, 0.02);
}
.step-row__id { font: 600 11px 'Geist Mono', monospace; color: #a855f7; padding-top: 2px; }
.step-row__action { color: #e5e7eb; font-size: 13px; line-height: 1.5; }
.step-row__meta { font-size: 11.5px; color: #9ca3af; margin-top: 4px; }
.step-row__quad { display: flex; gap: 4px; }
.step-row__quad .btn { font-size: 11px; padding: 4px 8px; }

/* Design — progress bar */
.es-design-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: rgba(168, 85, 247, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.20);
  border-radius: 10px;
}
.es-design-progress__label {
  font: 600 10.5px 'Geist Mono', monospace;
  color: #a855f7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.es-design-progress__bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.es-design-progress__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #a855f7, #c4b5fd);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
  border-radius: 4px;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.es-design-progress__count { font: 600 12.5px 'Geist Mono', monospace; color: #e5e7eb; }

/* Design — decision card */
.dec-card {
  display: grid;
  grid-template-columns: 130px 1fr 200px;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  align-items: start;
  position: relative;
}
.dec-card.is-locked { border-color: rgba(34, 197, 94, 0.25); background: rgba(34, 197, 94, 0.03); }
.dec-card.has-new-ac { border-color: rgba(168, 85, 247, 0.30); background: rgba(168, 85, 247, 0.04); }
.dec-card__id { font: 600 11px 'Geist Mono', monospace; color: #a855f7; padding-top: 2px; }
.dec-card__title { color: #e5e7eb; font: 600 13px Geist, sans-serif; line-height: 1.4; }
.dec-card__why { color: #cbd5e1; font-size: 12px; line-height: 1.5; margin-top: 6px; }
.dec-card__meta { font-size: 11.5px; color: #9ca3af; margin-top: 6px; line-height: 1.5; }
.dec-card__hint {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(168, 85, 247, 0.06);
  border-left: 2px solid #a855f7;
  font-size: 11.5px;
  color: #cbd5e1;
  border-radius: 0 4px 4px 0;
}
.dec-card__quad { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dec-card__quad .btn { font-size: 11px; padding: 5px 8px; }
.new-ac-panel {
  margin-top: 10px;
  padding: 12px;
  background: rgba(168, 85, 247, 0.08);
  border-radius: 6px;
  border-left: 3px solid #a855f7;
}
.new-ac-panel__hd { font: 600 11px 'Geist Mono', monospace; color: #a855f7; margin-bottom: 4px; letter-spacing: 0.04em; }
.new-ac-panel__statement { font-size: 12px; color: #e5e7eb; line-height: 1.5; margin-bottom: 6px; font-style: italic; }
.new-ac-panel__rationale { font-size: 11px; color: #9ca3af; margin-bottom: 8px; line-height: 1.45; }
.dec-swipe-hint {
  grid-column: 1/-1;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  font: 500 10px 'Geist Mono', monospace;
  color: #6b7280;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  margin-top: 8px;
}
.dec-swipe-hint__left  { color: #a5b4fc; }
.dec-swipe-hint__right { color: #22c55e; }
.sd-card {
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, 0.30);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.05);
  margin-bottom: 10px;
}
.paper-plane-route {
  position: relative;
  padding: 6px 10px;
  font: 500 10px 'Geist Mono', monospace;
  color: #6b7280;
  letter-spacing: 0.04em;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.04);
  border: 1px dashed rgba(168, 85, 247, 0.20);
  margin-top: 8px;
}
.paper-plane-route::after { content: '✈ → Chronicler'; color: #a855f7; margin-left: 6px; font-weight: 600; }

/* Prototype — variant tree + sandbox */
.es-proto-shell { display: grid; grid-template-columns: 300px 1fr; gap: 14px; min-height: 560px; }
.variant-tree {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px;
}
.variant-row {
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  transition: background 140ms;
  position: relative;
}
.variant-row:hover { background: rgba(168, 85, 247, 0.06); }
.variant-row.is-active {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.30);
}
.variant-row__radio {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.20);
  flex-shrink: 0;
}
.variant-row.is-active .variant-row__radio {
  background: #a855f7;
  border-color: #a855f7;
  box-shadow: inset 0 0 0 2px #0e1419;
}
.sub-variant { padding: 6px 10px 6px 32px; font-size: 12px; color: #9ca3af; cursor: pointer; }
.sub-variant.is-active { color: #a855f7; }

.sandbox {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  min-height: 520px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sandbox__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sandbox__viewport {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  color: #1f2937;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: 'Geist', sans-serif;
  transition: max-width 480ms cubic-bezier(0.22, 1, 0.36, 1), max-height 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sandbox--mobile  .sandbox__viewport { max-width: 380px; align-self: center; }
.sandbox--tablet  .sandbox__viewport { max-width: 680px; align-self: center; }
.sandbox.is-comparing .sandbox__viewport {
  background: linear-gradient(135deg, #f3f4f6 0%, #f3f4f6 49.7%, #cbd5e1 49.8%, #cbd5e1 50.2%, #e5e7eb 50.3%, #e5e7eb 100%);
}

/* Prototype — refine 3-dot counter */
.refine-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  font: 600 11px 'Geist Mono', monospace;
  color: #9ca3af;
}
.refine-dots { display: inline-flex; gap: 4px; align-items: center; }
.refine-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 220ms ease, transform 220ms ease;
}
.refine-dot.is-used {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}

/* Prototype — first-visit overlay (legacy + new modes) */
.first-visit-overlay {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: 280px;
  z-index: 8;
  padding: 14px;
  background: #0a0a0d;
  color: #cbd5e1;
  border: 1px solid rgba(168, 85, 247, 0.40);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font: 500 12px Geist, sans-serif;
  line-height: 1.55;
  animation: esFvFadeIn 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.first-visit-overlay__head {
  font: 600 10px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a855f7;
  margin-bottom: 8px;
}
.first-visit-overlay__step { display: flex; gap: 8px; margin-bottom: 6px; }
.first-visit-overlay__step-num {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.40);
  color: #c4b5fd;
  font: 600 10px 'Geist Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}
.first-visit-overlay__close {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font: 500 11px Geist, sans-serif;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.start-here-guide {
  position: absolute;
  top: -6px; left: -72px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font: 600 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  background: #0a0a0d;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.40);
  border-radius: 10px;
  z-index: 3;
  animation: esFvBob 1.2s ease-in-out infinite alternate;
}
.start-here-guide__close {
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  padding: 0 0 0 4px;
}
.form-invariants-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  border-top: 1px solid rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.04);
  font: 500 11.5px Geist, sans-serif;
  color: #cbd5e1;
}
.form-invariants-strip__label {
  font: 600 10px 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4ad982;
}
.form-invariants-strip__items { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.form-invariants-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.20);
}
.form-invariants-strip__check { color: #4ad982; font-size: 12px; }
.form-invariants-strip__conf {
  font: 600 9.5px 'Geist Mono', monospace;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ad982;
}

/* Remediate — iter counter */
.iter-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 600 11px 'Geist Mono', monospace;
  color: #cbd5e1;
}
.iter-counter__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.iter-counter__dot.is-used { background: #fbbf24; }
.iter-counter__dot.is-near-cap {
  background: #ef4444 !important;
  animation: dotFlashRed 0.9s ease-in-out infinite;
}
@keyframes dotFlashRed {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.30); }
}
.iter-counter.is-at-cap {
  border-color: rgba(239, 68, 68, 0.40);
  background: rgba(239, 68, 68, 0.08);
}

/* Validate — triptych + open-dev */
.triptych.is-locked-pending-dev { opacity: 0.45; pointer-events: none; }
.triptych.is-locked-pending-dev::after {
  content: '🔒 Open Dev required before picking a path';
  display: block;
  grid-column: 1 / -1;
  text-align: center;
  padding: 10px;
  font: 500 11px 'Geist Mono', monospace;
  color: #fbbf24;
  letter-spacing: 0.04em;
  background: rgba(251, 191, 36, 0.04);
  border-radius: 6px;
}
.triptych.is-picking .triptych__card.is-picked {
  animation: cardLockIn 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  z-index: 5;
}
.triptych.is-picking .triptych__card:not(.is-picked) {
  animation: cardFadeFold 540ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes cardLockIn {
  0%   { transform: scale(1); }
  60%  { transform: scale(1.06); box-shadow: 0 12px 36px rgba(34, 197, 94, 0.30); }
  100% { transform: scale(1.04); box-shadow: 0 12px 36px rgba(34, 197, 94, 0.30); }
}
@keyframes cardFadeFold {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.92) rotateY(20deg); opacity: 0.20; }
}

/* engagement-tally (used by Verify atom) */
.engagement-tally {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11.5px 'Geist Mono', monospace;
  color: #6b7280;
}

/* Round 2 — Propose live state (construction in progress · entered while
   operative is still drafting). Mirrors the construct modal's steps list. */
.es-construct-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.es-construct-steps li {
  position: relative;
  padding: 8px 14px 8px 32px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: 0 6px 6px 0;
  font: 500 12.5px Geist, sans-serif;
  color: #6b7280;
  letter-spacing: 0.02em;
}
.es-construct-steps li::before {
  content: '○';
  position: absolute;
  left: 12px;
  color: #6b7280;
}
.es-construct-steps li.is-active {
  color: #c4b5fd;
  border-left-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}
.es-construct-steps li.is-active::before {
  content: '▶';
  color: #a855f7;
  animation: esConstructPulse 1.4s ease-in-out infinite;
}
.es-construct-steps li.is-done {
  color: #4ad982;
  border-left-color: #4ad982;
}
.es-construct-steps li.is-done::before {
  content: '✓';
  color: #4ad982;
}
@keyframes esConstructPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.es-construct-hint {
  margin-top: 14px;
  font: 400 11.5px Geist, sans-serif;
  color: #9ca3af;
  text-align: center;
}
.es-construct-hint summary {
  cursor: pointer;
  color: var(--arc-hue, #a5b4fc);
  padding: 2px 0;
}
.es-construct-hint summary:hover { text-decoration: underline; }
.es-construct-hint p {
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Round 2 — inline atom host inside the construct modal's review step.
   The Propose atom renders here (replacing the legacy review tabs)
   without opening a separate modal. */
.review-atom-host {
  padding: 16px 4px;
  max-height: calc(80vh - 120px);
  overflow-y: auto;
}
.review-atom-host .es-section { margin-bottom: 14px; }
.review-atom-host .es-summary-band {
  margin-bottom: 14px;
}

/* Round 2 — re-entry button on completed stage rows in the timeline */
.wt-sub__enter-stage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  margin-left: 8px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.20);
  color: #c4b5fd;
  font: 600 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms;
}
.wt-sub:hover .wt-sub__enter-stage { opacity: 1; }
.wt-sub__enter-stage:hover { background: rgba(168, 85, 247, 0.15); }

/* Round 2 — checkpoint advisory chip (next to Enter stage primary) */
.cp-advisory-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font: 600 11px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  background: rgba(251, 191, 36, 0.10);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.30);
  cursor: pointer;
}
.cp-advisory-chip:hover { background: rgba(251, 191, 36, 0.18); }

/* Round 2 — stage-more menu (... button popover) */
.stage-more-menu {
  z-index: 1000;
  min-width: 240px;
  padding: 6px;
  background: #0a0a0d;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  font-family: 'Geist', sans-serif;
}
.stage-more-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font: 500 12.5px 'Geist', sans-serif;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.stage-more-menu__item:hover { background: rgba(168, 85, 247, 0.10); color: #e5e7eb; }
.stage-more-menu__item small {
  color: #6b7280;
  font: 500 10.5px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
}
.stage-more-menu__sep {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 4px 0;
}

/* ─── Responsive ──────────────────────────────────────────────── */

/* Round 2 (Director-locked 2026-04-27): modal stays modal across the
   typical workshop viewport. Only collapse to fullscreen below 720px
   (true mobile/narrow split-screen). At workshop resolutions (1100-1500px)
   the mode-select gate + decision view should breathe inside a contained
   modal, not take over the screen. */
@media (max-width: 1100px) {
  .es-confine-grid { grid-template-columns: 1fr; }
  .es-confine-right { position: static; }
  .plan-fork { grid-template-columns: 1fr; }
  .es-proto-shell { grid-template-columns: 1fr; }
  .es-align-layout { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .es-lane-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .es-shell--modal { top: 0; left: 0; right: 0; bottom: 0; border-radius: 0; }
}
