/* ══════════════════════════════════════════════════════════════════
   Office of FFA Enrichment — Modal CSS
   Full-screen overlay with tabbed navigation across 4 operational views.
   ══════════════════════════════════════════════════════════════════ */

/* ── Overlay & Modal Shell ────────────────────────────────────────── */

.eo-overlay {
  position: fixed;
  top: var(--nav-height, 60px);
  left: var(--side-nav-width, 60px);
  right: 0;
  bottom: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: eoFadeIn 0.2s ease;
}

@keyframes eoFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.eo-modal {
  background: #fff;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: eoSlideUp 0.25s ease;
}

@keyframes eoSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ───────────────────────────────────────────────────────── */

.eo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.75rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5986 50%, #1a4a7a 100%);
  color: #fff;
  flex-shrink: 0;
  gap: 1rem;
}

.eo-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.eo-crest {
  font-size: calc(2rem * var(--type-scale, 1));
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.eo-header-title h2 {
  margin: 0 0 0.15rem;
  font-size: calc(1.2rem * var(--type-scale, 1));
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.eo-header-title p {
  margin: 0;
  font-size: calc(0.8rem * var(--type-scale, 1));
  color: rgba(255,255,255,0.7);
}

.eo-header-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: calc(0.78rem * var(--type-scale, 1));
  color: rgba(255,255,255,0.65);
}

.eo-header-stat {
  text-align: center;
}

.eo-header-stat strong {
  display: block;
  font-size: calc(1.1rem * var(--type-scale, 1));
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.eo-close-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.8);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: calc(1.1rem * var(--type-scale, 1));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.eo-close-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* ── Tab Navigation ───────────────────────────────────────────────── */

.eo-tabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  background: #f8fafc;
  flex-shrink: 0;
}

.eo-tab {
  padding: 0.75rem 1.4rem;
  border: none;
  background: transparent;
  font-size: calc(0.85rem * var(--type-scale, 1));
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
  white-space: nowrap;
}

.eo-tab:hover { color: #1e3a5f; background: rgba(30,58,95,0.05); }

.eo-tab.active {
  color: #1e3a5f;
  border-bottom-color: #1e3a5f;
  font-weight: 600;
  background: #fff;
}

.eo-tab-icon { font-size: 0.95em; }

/* ── Panel Area ───────────────────────────────────────────────────── */

/* Panels are direct children of .eo-modal (no .eo-body wrapper in HTML).
   Each active panel IS the scroll container. */

.eo-panel { display: none; }
.eo-panel.active {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Shared Panel Utilities ───────────────────────────────────────── */

.eo-section {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.eo-section:last-child { border-bottom: none; }

.eo-section-title {
  font-size: calc(0.78rem * var(--type-scale, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 0 0 1rem;
}

.eo-loading { color: var(--ffvr-ink-faint, #94a3b8); font-size: calc(0.9rem * var(--type-scale, 1)); padding: 2rem; text-align: center; }
.eo-error   { color: #dc2626; font-size: calc(0.88rem * var(--type-scale, 1)); padding: 1rem; }

/* ── Entry Banner (in admin panel) ────────────────────────────────── */

.eo-entry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #1e3a5f08 0%, #2d598612 100%);
  border: 1px solid #1e3a5f22;
  border-radius: 10px;
  margin: 0 0 1rem 0;
}

.eo-entry-info h3 {
  margin: 0 0 0.2rem;
  font-size: calc(1rem * var(--type-scale, 1));
  color: #1e3a5f;
}

.eo-entry-info p {
  margin: 0;
  font-size: calc(0.82rem * var(--type-scale, 1));
  color: #64748b;
}

.eo-entry-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: calc(0.8rem * var(--type-scale, 1));
  color: #475569;
}

.eo-entry-stat strong { display: block; font-size: calc(1.2rem * var(--type-scale, 1)); font-weight: 700; color: #1e3a5f; }

.eo-open-btn {
  background: #1e3a5f;
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: calc(0.88rem * var(--type-scale, 1));
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.eo-open-btn:hover { background: #2d5986; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,58,95,0.25); }

/* ══════════════════════════════════════════════════════════════════
   TAB 1: LANES
   ══════════════════════════════════════════════════════════════════ */

.eo-lanes-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  /* Let the body scroll — don't fight it */
}

.eo-lanes-list {
  border-right: 1px solid var(--ffvr-rule, #e5e7eb);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eo-lane-detail {
  padding: 1.5rem 1.75rem;
}

.eo-lane-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
  text-align: center;
  gap: 0.5rem;
  padding: 3rem;
  min-height: 400px;
}

.eo-lane-detail-empty span { font-size: calc(3rem * var(--type-scale, 1)); }
.eo-lane-detail-empty p { font-size: calc(0.88rem * var(--type-scale, 1)); max-width: 240px; }

@media (max-width: 780px) {
  .eo-lanes-layout { grid-template-columns: 1fr; }
  .eo-lanes-list { border-right: none; border-bottom: 1px solid #e5e7eb; }
}

/* ── Lane Cards ──────────────────────────────────────────────────── */

.eo-lane-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.eo-lane-card:hover {
  border-color: #1e3a5f44;
  box-shadow: 0 2px 8px rgba(30,58,95,0.1);
  transform: translateY(-1px);
}

.eo-lane-card.active {
  border-color: #1e3a5f;
  background: #f0f6ff;
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

.eo-lane-card.eo-lane-suspended {
  opacity: 0.55;
  border-color: #ef4444;
  border-style: dashed;
}

.eo-suspended-badge {
  background: #fee2e2;
  color: #991b1b;
  font-size: calc(0.65rem * var(--type-scale, 1));
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.eo-lane-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.eo-lane-icon { font-size: calc(1.2rem * var(--type-scale, 1)); }

.eo-lane-label {
  font-weight: 600;
  font-size: calc(0.9rem * var(--type-scale, 1));
  color: #1e293b;
  flex: 1;
}

.eo-lane-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.eo-priority-badge {
  font-size: calc(0.68rem * var(--type-scale, 1));
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.eo-priority-badge.high   { background: #fef2f2; color: #b91c1c; }
.eo-priority-badge.medium { background: #fef3c7; color: #92400e; }
.eo-priority-badge.low    { background: #f1f5f9; color: #475569; }

.eo-model-badge {
  font-size: calc(0.7rem * var(--type-scale, 1));
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
}

.eo-model-badge.benchmark-driven { background: #fef3c7; color: #92400e; }
.eo-model-badge.free-tier        { background: #f0fdf4; color: #166534; }
.eo-model-badge.elevenlabs       { background: #f3e8ff; color: #7c3aed; }

/* ── Section dividers (between lane categories) ── */

.eo-section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid #e5e7eb;
}

.eo-section-label {
  font-weight: 600;
  font-size: calc(0.85rem * var(--type-scale, 1));
  color: #374151;
  white-space: nowrap;
}

.eo-section-note {
  font-size: calc(0.75rem * var(--type-scale, 1));
  color: #9ca3af;
}

.eo-lane-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.eo-progress-bar {
  flex: 1;
  height: 5px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.eo-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e3a5f, #3b82f6);
  transition: width 0.4s ease;
}

.eo-progress-fill.complete { background: #10b981; }

.eo-progress-pct {
  font-size: calc(0.72rem * var(--type-scale, 1));
  font-weight: 600;
  color: #475569;
  min-width: 2.5rem;
  text-align: right;
}

.eo-lane-meta {
  display: flex;
  gap: 1rem;
  font-size: calc(0.73rem * var(--type-scale, 1));
  color: #94a3b8;
}

.eo-lane-meta span { white-space: nowrap; }

/* ── Lane Detail Panel ───────────────────────────────────────────── */

.eo-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #1e3a5f18;
}

.eo-detail-icon { font-size: calc(2rem * var(--type-scale, 1)); }

.eo-detail-title h3 {
  margin: 0 0 0.25rem;
  font-size: calc(1.05rem * var(--type-scale, 1));
  color: #1e293b;
}

.eo-detail-title p {
  margin: 0;
  font-size: calc(0.83rem * var(--type-scale, 1));
  color: #64748b;
}

.eo-detail-section {
  margin-bottom: 1.25rem;
}

.eo-detail-label {
  font-size: calc(0.72rem * var(--type-scale, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.eo-detail-text {
  font-size: calc(0.88rem * var(--type-scale, 1));
  color: #374151;
  line-height: 1.55;
}

.eo-benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.eo-benefits-list li {
  font-size: calc(0.85rem * var(--type-scale, 1));
  color: #374151;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.45;
}

.eo-benefits-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}

.eo-tradeoff-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: calc(0.83rem * var(--type-scale, 1));
  color: #78350f;
  line-height: 1.5;
}

.eo-model-comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(0.82rem * var(--type-scale, 1));
  margin-top: 0.5rem;
}

.eo-model-comparison th,
.eo-model-comparison td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.eo-model-comparison th {
  font-size: calc(0.7rem * var(--type-scale, 1));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: #f8fafc;
  font-weight: 600;
}

.eo-verdict-chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: calc(0.7rem * var(--type-scale, 1));
  font-weight: 600;
}

.eo-verdict-chip.free-tier       { background: #dcfce7; color: #166534; }
.eo-verdict-chip.quality-ceiling { background: #dbeafe; color: #1e40af; }
.eo-verdict-chip.strong-value    { background: #fef3c7; color: #92400e; }
.eo-verdict-chip.acceptable      { background: #f1f5f9; color: #475569; }
.eo-verdict-chip.below-floor     { background: #fee2e2; color: #991b1b; }
.eo-verdict-chip.no-data         { background: #f1f5f9; color: #94a3b8; font-style: italic; }

/* ══════════════════════════════════════════════════════════════════
   TAB 2: RESOURCES
   ══════════════════════════════════════════════════════════════════ */

.eo-resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1.5rem 1.75rem;
}

.eo-resource-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.eo-resource-card h4 {
  margin: 0 0 1rem;
  font-size: calc(0.88rem * var(--type-scale, 1));
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.eo-resource-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: calc(0.83rem * var(--type-scale, 1));
  border-bottom: 1px solid #f1f5f9;
  gap: 0.5rem;
}

.eo-resource-row:last-child { border-bottom: none; }
.eo-resource-row .label { color: #64748b; }
.eo-resource-row .value { font-weight: 500; color: #1e293b; text-align: right; }
.eo-resource-row .ok    { color: #10b981; font-weight: 600; }
.eo-resource-row .warn  { color: #f59e0b; font-weight: 600; }
.eo-resource-row .off   { color: #94a3b8; }

.eo-cost-table {
  width: 100%;
  padding: 1rem 1.75rem 0;
}

.eo-cost-table h4 { font-size: calc(0.88rem * var(--type-scale, 1)); color: #1e293b; margin: 0 0 0.75rem; }

.eo-cost-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(0.83rem * var(--type-scale, 1));
}

.eo-cost-table th, .eo-cost-table td {
  padding: 0.45rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.eo-cost-table th {
  font-size: calc(0.7rem * var(--type-scale, 1));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: #f8fafc;
  font-weight: 600;
}

.eo-cost-table tfoot td {
  font-weight: 700;
  border-top: 2px solid #e5e7eb;
  background: #f8fafc;
}

.eo-budget-lanes {
  padding: 1rem 1.75rem 1.5rem;
}

.eo-budget-lanes h4 { font-size: calc(0.88rem * var(--type-scale, 1)); color: #1e293b; margin: 0 0 0.75rem; }

.eo-budget-lane-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f8fafc;
  font-size: calc(0.83rem * var(--type-scale, 1));
  gap: 1rem;
}

.eo-budget-lane-row .bl-name   { color: #374151; flex: 1; }
.eo-budget-lane-row .bl-model  { color: #94a3b8; font-size: calc(0.78rem * var(--type-scale, 1)); }
.eo-budget-lane-row .bl-cap    { font-weight: 600; color: #1e293b; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════
   TAB 3: SCHEDULE
   ══════════════════════════════════════════════════════════════════ */

.eo-schedule-section {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.eo-schedule-section h4 {
  font-size: calc(0.88rem * var(--type-scale, 1));
  color: #1e293b;
  margin: 0 0 0.75rem;
}

/* Nightly timeline */
.eo-nightly-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eo-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  position: relative;
  padding-bottom: 0.85rem;
}

.eo-timeline-item:last-child { padding-bottom: 0; }

.eo-timeline-item::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 1.5rem;
  bottom: 0;
  width: 1px;
  background: #e5e7eb;
}

.eo-timeline-item:last-child::before { display: none; }

.eo-timeline-dot {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(0.6rem * var(--type-scale, 1));
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
  z-index: 1;
}

.eo-timeline-dot.full-speed { background: #dcfce7; color: #166534; border: 1.5px solid #86efac; }
.eo-timeline-dot.maintenance { background: #dbeafe; color: #1e40af; border: 1.5px solid #93c5fd; }
.eo-timeline-dot.trickle     { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; }
.eo-timeline-dot.paused      { background: #f1f5f9; color: #94a3b8; border: 1.5px solid #cbd5e1; }

.eo-timeline-content { flex: 1; }

.eo-timeline-time {
  font-size: calc(0.75rem * var(--type-scale, 1));
  font-weight: 700;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.eo-timeline-desc {
  font-size: calc(0.82rem * var(--type-scale, 1));
  color: #64748b;
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* Phase status cards */
.eo-phases-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-top: 0.25rem;
}

@media (max-width: 780px) {
  .eo-phases-grid { grid-template-columns: 1fr 1fr; }
}

.eo-phase-card {
  background: #f8fafc;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 0.6rem;
  text-align: center;
}

.eo-phase-card.done    { border-color: #86efac; background: #f0fdf4; }
.eo-phase-card.running { border-color: #93c5fd; background: #eff6ff; }
.eo-phase-card.pending { border-color: #e5e7eb; background: #f8fafc; }
.eo-phase-card.failed  { border-color: #fca5a5; background: #fef2f2; }

.eo-phase-num {
  font-size: calc(0.65rem * var(--type-scale, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.eo-phase-name {
  font-size: calc(0.75rem * var(--type-scale, 1));
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.eo-phase-status {
  font-size: calc(0.7rem * var(--type-scale, 1));
  font-weight: 600;
  color: #64748b;
}

.eo-phase-card.done .eo-phase-status    { color: #166534; }
.eo-phase-card.running .eo-phase-status { color: #1d4ed8; }
.eo-phase-card.failed .eo-phase-status  { color: #dc2626; }

.eo-phase-time {
  font-size: calc(0.68rem * var(--type-scale, 1));
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* Recent history */
.eo-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.eo-history-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: calc(0.82rem * var(--type-scale, 1));
  padding: 0.45rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
}

.eo-history-item .hi-time  { color: #94a3b8; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 90px; }
.eo-history-item .hi-task  { flex: 1; color: #374151; font-weight: 500; }
.eo-history-item .hi-model { color: #64748b; font-size: calc(0.78rem * var(--type-scale, 1)); }
.eo-history-item .hi-winner { color: #10b981; font-weight: 600; font-size: calc(0.78rem * var(--type-scale, 1)); }

/* ══════════════════════════════════════════════════════════════════
   TAB 4: BENCHMARKS (re-uses .bench-* from styles.css)
   ══════════════════════════════════════════════════════════════════ */

.eo-benchmarks-content {
  padding: 1.5rem 1.75rem;
}

.eo-benchmarks-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.eo-benchmarks-toolbar h4 { margin: 0; font-size: calc(0.9rem * var(--type-scale, 1)); color: #1e293b; }

/* ══════════════════════════════════════════════════════════════════
   TAB 0: GOVERNANCE (frolicking-stargazing-hummingbird Session 4)
   ══════════════════════════════════════════════════════════════════ */

#eo-panel-governance { padding: 1.5rem 1.75rem; }

/* ── Banner ─────────────────────────────────────────────────────── */

.eo-governance-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.eo-governance-banner.frozen {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
  color: #991b1b;
}

.eo-governance-banner.live {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
  color: #166534;
}

.eo-governance-banner-icon {
  font-size: calc(1.6rem * var(--type-scale, 1));
  line-height: 1;
  flex-shrink: 0;
}

.eo-governance-banner-body { flex: 1; min-width: 0; }

.eo-governance-banner-label {
  font-size: calc(1.05rem * var(--type-scale, 1));
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eo-governance-banner-reason {
  font-size: calc(0.88rem * var(--type-scale, 1));
  margin-top: 0.25rem;
  font-weight: 500;
  word-break: break-word;
}

.eo-governance-banner-meta {
  font-size: calc(0.78rem * var(--type-scale, 1));
  margin-top: 0.2rem;
  opacity: 0.75;
}

/* ── Section wrapper ────────────────────────────────────────────── */

.eo-governance-section {
  padding: 1.1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.eo-governance-section:last-child { border-bottom: none; }

.eo-governance-section-label {
  font-size: calc(0.78rem * var(--type-scale, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Calibration staleness badge (Session 6) ─────────────────── */

.eo-governance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: calc(0.68rem * var(--type-scale, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}

.eo-governance-badge.fresh {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.eo-governance-badge.aging {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.eo-governance-badge.stale {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* ── Paste Screenshot Values form (Session 6) ───────────────── */

.eo-governance-calibrate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem 1rem;
  margin-bottom: 0.9rem;
}

.eo-governance-calibrate-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: calc(0.76rem * var(--type-scale, 1));
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eo-governance-calibrate-grid .eo-governance-input {
  width: 100%;
}

.eo-governance-section-help {
  font-size: calc(0.83rem * var(--type-scale, 1));
  color: #64748b;
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.eo-governance-section-help code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: calc(0.78rem * var(--type-scale, 1));
}

/* ── Pool bars ──────────────────────────────────────────────────── */

.eo-governance-pool { margin-bottom: 1rem; }
.eo-governance-pool:last-child { margin-bottom: 0; }

.eo-governance-pool-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.eo-governance-pool-name {
  font-size: calc(0.9rem * var(--type-scale, 1));
  font-weight: 600;
  color: #1e293b;
}

.eo-governance-pool-note {
  font-size: calc(0.76rem * var(--type-scale, 1));
  color: #94a3b8;
  flex: 1;
}

.eo-governance-pool-pct {
  font-size: calc(0.82rem * var(--type-scale, 1));
  font-variant-numeric: tabular-nums;
  color: #475569;
  font-weight: 600;
}

.eo-governance-pool-bar {
  position: relative;
  width: 100%;
  height: 18px;
  background: #f1f5f9;
  border-radius: 9px;
  overflow: hidden;
}

.eo-governance-pool-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 9px;
  transition: width 0.4s ease;
}

.eo-governance-pool-fill.sonnet {
  background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
}

.eo-governance-pool-fill.all-models {
  background: linear-gradient(90deg, #a855f7 0%, #7c3aed 100%);
}

.eo-governance-pool-threshold {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 0;
  border-left: 2px dashed #dc2626;
  pointer-events: auto;
  cursor: help;
}

.eo-governance-pool-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-size: calc(0.74rem * var(--type-scale, 1));
  color: #94a3b8;
}

.eo-governance-pool-legend-marker {
  display: inline-block;
  width: 14px;
  height: 0;
  border-top: 2px dashed #dc2626;
}

/* ── Inputs + buttons ──────────────────────────────────────────── */

.eo-governance-reserve-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eo-governance-reserve-row label {
  font-size: calc(0.85rem * var(--type-scale, 1));
  color: #475569;
  font-weight: 500;
}

.eo-governance-input {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: calc(0.88rem * var(--type-scale, 1));
  color: #1e293b;
  background: #fff;
  font-family: inherit;
  width: 5.5rem;
}

.eo-governance-input.wide {
  width: 100%;
  max-width: 420px;
}

.eo-governance-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.eo-governance-textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: calc(0.85rem * var(--type-scale, 1));
  color: #1e293b;
  background: #fff;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 4.5rem;
  margin-bottom: 0.6rem;
}

.eo-governance-textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.eo-governance-btn {
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-size: calc(0.85rem * var(--type-scale, 1));
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
}

.eo-governance-btn:active { transform: translateY(1px); }

.eo-governance-btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}
.eo-governance-btn.secondary:hover { background: #cbd5e1; }

.eo-governance-btn.danger {
  background: #dc2626;
  color: #fff;
  margin-top: 0.5rem;
}
.eo-governance-btn.danger:hover { background: #b91c1c; }

/* ── Notes list ─────────────────────────────────────────────────── */

.eo-governance-note-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.eo-governance-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.eo-governance-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
}

.eo-governance-note-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: calc(0.74rem * var(--type-scale, 1));
}

.eo-governance-note-by {
  font-weight: 600;
  color: #475569;
}

.eo-governance-note-ts {
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.eo-governance-note-body {
  font-size: calc(0.85rem * var(--type-scale, 1));
  color: #1e293b;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.eo-governance-note-empty {
  font-size: calc(0.82rem * var(--type-scale, 1));
  color: #94a3b8;
  font-style: italic;
  margin: 0;
}

/* ── Schedule chip ──────────────────────────────────────────────── */

.eo-governance-schedule-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.eo-governance-schedule-chip {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 999px;
  font-size: calc(0.78rem * var(--type-scale, 1));
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.eo-governance-schedule-note {
  font-size: calc(0.78rem * var(--type-scale, 1));
  color: #64748b;
  flex: 1;
  min-width: 12rem;
}

.eo-governance-schedule-note em {
  color: #1e293b;
  font-style: normal;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
 * Worker Freshness (rustling-toasting-quasar Session 3)
 * Visual indicator for LESSONS §157 — long-running workers
 * holding pre-fix shared-cache code.
 * ───────────────────────────────────────────────────────────── */
.eo-worker-freshness {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.eo-worker-row {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
}

.eo-worker-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.eo-worker-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: calc(0.82rem * var(--type-scale, 1));
  color: #1e293b;
  font-weight: 600;
}

.eo-worker-meta {
  font-size: calc(0.75rem * var(--type-scale, 1));
  color: #64748b;
  margin-left: auto;
}

.eo-worker-meta-sub {
  font-size: calc(0.7rem * var(--type-scale, 1));
  color: #94a3b8;
  margin-top: 0.15rem;
}

.eo-worker-service {
  font-size: calc(0.74rem * var(--type-scale, 1));
  color: #475569;
  margin-top: 0.25rem;
}

.eo-worker-service code {
  font-size: calc(0.72rem * var(--type-scale, 1));
  background: #e2e8f0;
  padding: 0.05rem 0.3rem;
  border-radius: 0.25rem;
  color: #1e293b;
}

.eo-worker-service-err {
  color: #b91c1c;
  font-style: italic;
  margin-left: 0.4rem;
}

.eo-worker-service-note {
  color: #94a3b8;
  font-size: calc(0.68rem * var(--type-scale, 1));
  font-style: italic;
}

.eo-worker-stale-reason {
  margin-top: 0.4rem;
  padding: 0.35rem 0.55rem;
  background: #fee2e2;
  border-left: 3px solid #dc2626;
  color: #991b1b;
  font-size: calc(0.74rem * var(--type-scale, 1));
  border-radius: 0.25rem;
}

.eo-worker-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: calc(0.66rem * var(--type-scale, 1));
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.eo-worker-badge-fresh {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.eo-worker-badge-stale {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.eo-worker-badge-unknown {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.eo-worker-empty {
  font-size: calc(0.78rem * var(--type-scale, 1));
  color: #64748b;
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════
   ROLE ACCENT COLORS — Sensei / CFO / CEO
   Sensei (amber): proposes enrichment lanes
   CFO (blue): gates resources
   CEO (green/red): governance banner already handles this
   ══════════════════════════════════════════════════════════════════ */

.eo-detail-label.sensei-accent {
  padding-left: 0.75rem;
  border-left: 3px solid #f59e0b;
}

.eo-resource-card.cfo-managed {
  border-left: 3px solid #3b82f6;
}

/* ══════════════════════════════════════════════════════════════════
   SENSEI TRIGGERS — Pending notifications banner
   (spirited-chronicling-owl Session 3)
   ══════════════════════════════════════════════════════════════════ */

.eo-sensei-triggers:empty { display: none; }

.eo-triggers-banner {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.eo-triggers-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.eo-triggers-icon { font-size: calc(1.1rem * var(--type-scale, 1)); }

.eo-triggers-title {
  font-weight: 600;
  font-size: calc(0.85rem * var(--type-scale, 1));
  color: #92400e;
}

.eo-triggers-count {
  font-size: calc(0.75rem * var(--type-scale, 1));
  background: #f59e0b;
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}

.eo-triggers-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.eo-trigger-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #fde68a;
}

.eo-trigger-action-icon { font-size: calc(0.9rem * var(--type-scale, 1)); flex-shrink: 0; padding-top: 0.1rem; }

.eo-trigger-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.eo-trigger-slug {
  font-weight: 600;
  font-size: calc(0.8rem * var(--type-scale, 1));
  color: #1e293b;
}

.eo-trigger-desc {
  font-size: calc(0.78rem * var(--type-scale, 1));
  color: #475569;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.eo-trigger-meta {
  font-size: calc(0.72rem * var(--type-scale, 1));
  color: #94a3b8;
}

.eo-trigger-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.eo-trigger-actions .btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: calc(0.72rem * var(--type-scale, 1));
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  line-height: 1;
}

.eo-trigger-actions .btn-success {
  color: #16a34a;
  border-color: #86efac;
}
.eo-trigger-actions .btn-success:hover {
  background: #f0fdf4;
}

.eo-trigger-actions .btn-muted {
  color: #9ca3af;
  border-color: #e5e7eb;
}
.eo-trigger-actions .btn-muted:hover {
  background: #f9fafb;
}

.eo-priority-urgent { color: #dc2626; font-weight: 600; }
.eo-priority-normal { color: #92400e; }
.eo-priority-low    { color: #94a3b8; }

/* ══════════════════════════════════════════════════════════════════
   Compute Lanes — Pure OSS, unlimited, $0, no AI quota
   Green-accented to differentiate from AI lanes (amber/purple).
   ══════════════════════════════════════════════════════════════════ */

.eo-compute-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eo-compute-summary-stat {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.eo-compute-stat-value {
  display: block;
  font-size: calc(1.75rem * var(--type-scale, 1));
  font-weight: 700;
  color: #16a34a;
}

.eo-compute-stat-label {
  display: block;
  font-size: calc(0.75rem * var(--type-scale, 1));
  color: #4b5563;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eo-compute-doctrine {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: calc(0.84rem * var(--type-scale, 1));
  color: #1e293b;
  line-height: 1.55;
}

.eo-compute-doctrine strong {
  color: #16a34a;
}

.eo-compute-lane-card {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.eo-compute-lane-card:hover {
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.12);
}

.eo-compute-lane-card.expanded {
  border-color: #16a34a;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15);
}

.eo-compute-lane-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  gap: 1rem;
}

.eo-compute-lane-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.eo-compute-lane-title h4 {
  margin: 0;
  font-size: calc(0.95rem * var(--type-scale, 1));
  color: #1e293b;
}

.eo-compute-badge {
  display: inline-block;
  font-size: calc(0.6rem * var(--type-scale, 1));
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.eo-compute-model-badge {
  display: inline-block;
  font-size: calc(0.7rem * var(--type-scale, 1));
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.eo-compute-lane-stats {
  display: flex;
  gap: 1rem;
  font-size: calc(0.8rem * var(--type-scale, 1));
  color: #6b7280;
  white-space: nowrap;
}

.eo-compute-cost {
  color: #16a34a;
  font-weight: 600;
}

.eo-compute-pct {
  font-weight: 600;
  color: #1e293b;
}

.eo-compute-lane-progress {
  padding: 0 1.25rem 0.75rem;
}

.eo-progress-bar.compute {
  background: #ecfdf5;
}

.eo-progress-bar.compute .eo-progress-fill {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}

.eo-compute-lane-detail {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  background: #fafafa;
}

.eo-compute-comparison {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e5e7eb;
}

.eo-compute-comparison h4 {
  margin: 0 0 1rem;
  font-size: calc(0.95rem * var(--type-scale, 1));
  color: #1e293b;
}

.eo-compute-row td {
  background: #f0fdf4;
}

/* ── Pool impact warning (Resources tab) ── abstract-rolling-fountain S3 */

.eo-pool-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: calc(0.78rem * var(--type-scale, 1));
  color: #92400e;
  line-height: 1.4;
}

.eo-pool-warning strong {
  display: block;
  font-size: calc(0.82rem * var(--type-scale, 1));
  margin-bottom: 0.15rem;
}

/* ── Lane pool impact badge ── */

.eo-lane-pool-impact {
  display: inline-block;
  font-size: calc(0.68rem * var(--type-scale, 1));
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  white-space: nowrap;
}

/* ── Pool impact summary (Lanes tab footer) ── */

.eo-pool-impact-summary {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: calc(0.82rem * var(--type-scale, 1));
}

.eo-pool-impact-summary.impact-green {
  background: #f0fdf4;
  border-color: #86efac;
}
.eo-pool-impact-summary.impact-yellow {
  background: #fffbeb;
  border-color: #fbbf24;
}
.eo-pool-impact-summary.impact-red {
  background: #fef2f2;
  border-color: #f87171;
}

.eo-impact-label {
  font-weight: 700;
  color: #1e293b;
}

.eo-impact-value {
  font-weight: 600;
}
.impact-green .eo-impact-value { color: #16a34a; }
.impact-yellow .eo-impact-value { color: #d97706; }
.impact-red .eo-impact-value { color: #dc2626; }

.eo-impact-note {
  font-size: calc(0.73rem * var(--type-scale, 1));
  color: #94a3b8;
  width: 100%;
}

/* ── Forecast banner (Schedule tab) ── */

.eo-forecast-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.35rem 1.5rem;
}

.eo-forecast-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: calc(0.82rem * var(--type-scale, 1));
}

.eo-forecast-label {
  color: #64748b;
}

.eo-forecast-value {
  font-weight: 600;
  color: #1e293b;
}

.eo-forecast-value.ok { color: #16a34a; }
.eo-forecast-value.warn { color: #d97706; }

/* ── Phase tags in timeline ── */

.eo-phase-tag {
  display: inline-block;
  font-size: calc(0.6rem * var(--type-scale, 1));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.eo-phase-tag.phase-compute { color: #16a34a; background: #dcfce7; }
.eo-phase-tag.phase-ai_full { color: #7c3aed; background: #ede9fe; }
.eo-phase-tag.phase-maintenance { color: #0369a1; background: #e0f2fe; }
.eo-phase-tag.phase-trickle { color: #6b7280; background: #f3f4f6; }
.eo-phase-tag.phase-paused { color: #94a3b8; background: #f1f5f9; }

/* Compute phase dot color in timeline */
.eo-timeline-dot.compute {
  background: #16a34a;
  color: white;
}

/* Disabled timeline items (LaunchAgent disabled) */
.eo-timeline-item.disabled {
  opacity: 0.5;
}

.eo-disabled-note {
  font-size: calc(0.72rem * var(--type-scale, 1));
  color: #94a3b8;
  font-style: italic;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .eo-compute-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .eo-compute-lane-header {
    flex-wrap: wrap;
  }
  .eo-compute-lane-stats {
    width: 100%;
    justify-content: space-between;
  }
  .eo-forecast-banner {
    grid-template-columns: 1fr;
  }
  .eo-pool-impact-summary {
    flex-direction: column;
  }
}

/* ─────────────────────────────────────────────────
   Producer AI Activity Panel (.producer-*)
   ───────────────────────────────────────────────── */

.producer-snapshot-banner {
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.producer-snapshot-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.producer-pool-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 7rem;
}

.producer-pool-label {
  font-size: calc(0.7rem * var(--type-scale, 1));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
}

.producer-pool-bar {
  height: 4px;
  background: var(--border, #334155);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.producer-pool-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--pct, 0%);
  background: var(--color, #6366f1);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.producer-pool-value {
  font-size: calc(1.1rem * var(--type-scale, 1));
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  line-height: 1;
}

.producer-pool-sub {
  font-size: calc(0.7rem * var(--type-scale, 1));
  color: var(--text-muted, #64748b);
}

.producer-snapshot-date {
  font-size: calc(0.7rem * var(--type-scale, 1));
  color: var(--text-muted, #64748b);
  margin-top: 0.4rem;
  font-style: italic;
}

/* Log Usage form */
.producer-form {
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.producer-form h4 {
  margin: 0 0 0.75rem;
  font-size: calc(0.9rem * var(--type-scale, 1));
  color: var(--text-primary, #f1f5f9);
}

.producer-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.producer-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: calc(0.75rem * var(--type-scale, 1));
  color: var(--ffvr-ink-muted, var(--text-muted, #64748b));
}

.producer-form-grid input {
  padding: 0.3rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border, #334155);
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary, #f1f5f9);
  font-size: calc(0.85rem * var(--type-scale, 1));
}

.producer-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Two-column layout */
.producer-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.producer-section {
  margin-bottom: 1.5rem;
}

.producer-section-title {
  font-size: calc(0.85rem * var(--type-scale, 1));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ffvr-ink-muted, var(--text-muted, #64748b));
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.producer-period-label {
  font-size: calc(0.7rem * var(--type-scale, 1));
  font-weight: 400;
  color: var(--ffvr-ink-muted, var(--text-muted, #64748b));
  font-style: italic;
}

/* Category chart */
.producer-cat-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.producer-cat-label {
  font-size: calc(0.75rem * var(--type-scale, 1));
  color: var(--text-secondary, #94a3b8);
  min-width: 10rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.producer-cat-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--bg-secondary, #1e293b);
  border-radius: 5px;
  overflow: hidden;
}

.producer-cat-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

.producer-cat-count {
  font-size: calc(0.75rem * var(--type-scale, 1));
  color: var(--text-primary, #f1f5f9);
  font-weight: 600;
  min-width: 2.5rem;
  text-align: right;
}

/* Weekly sparkline */
.producer-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  padding-top: 4px;
}

.producer-spark-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 3px;
}

.producer-spark-bar {
  width: 100%;
  background: #6366f1;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.producer-spark-label {
  font-size: calc(0.55rem * var(--type-scale, 1));
  color: var(--text-muted, #64748b);
  transform: rotate(-45deg);
  transform-origin: center;
  white-space: nowrap;
  display: block;
  height: 14px;
}

/* Snapshot history table */
.producer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(0.8rem * var(--type-scale, 1));
}

.producer-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border, #334155);
  color: var(--text-muted, #64748b);
  font-size: calc(0.72rem * var(--type-scale, 1));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.producer-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary, #94a3b8);
  vertical-align: top;
}

.producer-table-date { font-family: monospace; font-size: calc(0.75rem * var(--type-scale, 1)); }
.producer-table-notes { color: var(--text-muted, #64748b); font-style: italic; }

/* Recent sessions */
.producer-sessions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.producer-session-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: calc(0.78rem * var(--type-scale, 1));
}

.producer-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.producer-session-date {
  font-family: monospace;
  font-size: calc(0.72rem * var(--type-scale, 1));
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
  min-width: 6rem;
}

.producer-chain-tag {
  font-size: calc(0.7rem * var(--type-scale, 1));
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.producer-session-desc {
  color: var(--text-secondary, #94a3b8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.producer-total-note {
  font-size: calc(0.72rem * var(--type-scale, 1));
  color: var(--text-muted, #64748b);
  margin-top: 0.5rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .producer-two-col { grid-template-columns: 1fr; }
  .producer-cat-label { min-width: 7rem; }
  .producer-snapshot-row { gap: 0.75rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   Office Chat — Conversational AI in Enrichment Panel
   ═══════════════════════════════════════════════════════════════════ */

.eo-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
  max-height: 70vh;
}

.eo-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.eo-chat-header h3 {
  margin: 0;
  font-size: calc(1rem * var(--type-scale, 1));
  font-weight: 600;
}

.eo-chat-session-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.eo-chat-session-controls select {
  max-width: 220px;
  font-size: calc(0.8rem * var(--type-scale, 1));
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--ffvr-rule, var(--border-subtle, #e2e8f0));
  background: var(--ffvr-surface-raised, var(--bg-card, #fff));
}

.eo-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eo-chat-welcome {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ffvr-ink-muted, var(--text-muted, #64748b));
  font-size: calc(0.9rem * var(--type-scale, 1));
}

.eo-chat-msg {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: calc(0.88rem * var(--type-scale, 1));
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}

.eo-chat-msg-user {
  align-self: flex-end;
  background: var(--accent-blue, #3b82f6);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.eo-chat-msg-assistant {
  align-self: flex-start;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

.eo-chat-msg-content {
  white-space: pre-wrap;
}

.eo-chat-duration {
  display: block;
  font-size: calc(0.7rem * var(--type-scale, 1));
  color: rgba(0, 0, 0, 0.4);
  text-align: right;
  margin-top: 0.25rem;
}

.eo-chat-msg-user .eo-chat-duration {
  color: rgba(255, 255, 255, 0.6);
}

.eo-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.eo-chat-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: calc(0.72rem * var(--type-scale, 1));
  font-weight: 600;
}

.eo-badge-success {
  background: #dcfce7;
  color: #166534;
}

.eo-badge-fail {
  background: #fee2e2;
  color: #991b1b;
}

.eo-chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--ffvr-rule, var(--border-subtle, #e2e8f0));
  background: var(--ffvr-surface-raised, var(--bg-card, #fff));
}

.eo-chat-input-row textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--ffvr-rule, var(--border-subtle, #e2e8f0));
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: calc(0.88rem * var(--type-scale, 1));
  font-family: inherit;
  line-height: 1.4;
}

.eo-chat-input-row textarea:focus {
  outline: none;
  border-color: var(--accent-blue, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.eo-chat-input-row button {
  align-self: flex-end;
  padding: 0.5rem 1rem;
  background: var(--accent-blue, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: calc(0.85rem * var(--type-scale, 1));
  white-space: nowrap;
}

.eo-chat-input-row button:hover {
  background: #2563eb;
}

.eo-chat-input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Thinking dots animation */
.eo-chat-thinking .eo-dots span {
  display: inline-block;
  animation: eoDotPulse 1.4s infinite ease-in-out both;
  font-size: calc(1.4rem * var(--type-scale, 1));
  line-height: 1;
}

.eo-chat-thinking .eo-dots span:nth-child(1) { animation-delay: 0s; }
.eo-chat-thinking .eo-dots span:nth-child(2) { animation-delay: 0.2s; }
.eo-chat-thinking .eo-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes eoDotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 768px) {
  .eo-chat-container { min-height: 400px; max-height: 60vh; }
  .eo-chat-msg { max-width: 92%; }
  .eo-chat-session-controls select { max-width: 140px; }
  .eo-chat-header { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}

/* Internet Enrichment: per-person governance UI
   (lucid-sourcing-constellation S2, 2026-04-22) */

.eo-btn-mini {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 0.2rem 0.6rem;
  font-size: calc(0.72rem * var(--type-scale, 1));
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}
.eo-btn-mini:hover { background: #4338ca; }

.ie-chip-yes     { background: #d1fae5; color: #065f46; font-weight: 500; }
.ie-chip-no      { background: #fee2e2; color: #991b1b; font-weight: 500; }
.ie-chip-neutral { background: #e5e7eb; color: #4b5563; }

/* ══════════════════════════════════════════════════════════════════
   Prose Board — read-only view of the net-priority snapshot
   (ranking-prose-priority, 2026-09-14; canon PROSE_PRIORITY_MODEL.md)

   Colour carries meaning here, never decoration:
     indigo  = priority / the order
     teal    = coverage achieved (C2, the finish line)
     amber   = owed work and a stale audio factor
     slate   = a signal too blind to order anything
   ══════════════════════════════════════════════════════════════════ */

.eo-pb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.eo-pb-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #4f46e5;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.eo-pb-stat-v {
  font-size: calc(1.05rem * var(--type-scale, 1));
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.eo-pb-stat-k {
  font-size: calc(0.68rem * var(--type-scale, 1));
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* An audio factor the snapshot did not use is a real staleness, not a nuance. */
.eo-pb-stat-warn { border-left-color: #d97706; background: #fffbeb; }
.eo-pb-stat-warn .eo-pb-stat-k { color: #92400e; }

.eo-pb-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin: 0 0 0.9rem;
  font-size: calc(0.78rem * var(--type-scale, 1));
  color: #92400e;
}

.eo-pb-h {
  margin: 1.4rem 0 0.6rem;
  font-size: calc(0.86rem * var(--type-scale, 1));
  color: #1e293b;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e2e8f0;
}

.eo-pb-note {
  font-size: calc(0.73rem * var(--type-scale, 1));
  color: #64748b;
  margin: 0.45rem 0 0;
  line-height: 1.5;
}

.eo-pb-foot {
  margin-top: 1.4rem;
  padding-top: 0.7rem;
  border-top: 1px dashed #cbd5e1;
  font-size: calc(0.72rem * var(--type-scale, 1));
  color: #64748b;
  line-height: 1.55;
}

.eo-pb-foot code {
  background: #f1f5f9;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.95em;
}

/* ── Coverage ─────────────────────────────────────────────────────── */

.eo-pb-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.eo-pb-coverage {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.eo-pb-coverage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.eo-pb-coverage-name {
  font-weight: 600;
  color: #1e293b;
  font-size: calc(0.82rem * var(--type-scale, 1));
}

.eo-pb-coverage-pct {
  font-weight: 700;
  color: #0f766e;
  font-size: calc(1rem * var(--type-scale, 1));
  font-variant-numeric: tabular-nums;
}

.eo-pb-bar {
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.eo-pb-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #0f766e);
  border-radius: 4px;
}

.eo-pb-coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: calc(0.72rem * var(--type-scale, 1));
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.eo-pb-owed { color: #b45309; font-weight: 600; }

/* ── Tables ───────────────────────────────────────────────────────── */

.eo-pb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.7rem;
  font-size: calc(0.75rem * var(--type-scale, 1));
}

.eo-pb-table th {
  text-align: left;
  padding: 0.4rem 0.55rem;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.eo-pb-th-sub {
  font-weight: 400;
  color: #94a3b8;
  font-size: 0.9em;
}

.eo-pb-table td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}

.eo-pb-table tbody tr:hover { background: #f8fafc; }

.eo-pb-right { text-align: right; font-variant-numeric: tabular-nums; }

.eo-pb-locked-n { color: #94a3b8; font-weight: 400; }

/* The top-N table is the one an operator reads left to right; the reason
   column is the point of it, so it gets the room. */
.eo-pb-top { table-layout: auto; }

.eo-pb-top td.eo-pb-right strong { color: #4f46e5; }

.eo-pb-mid {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #64748b;
  white-space: nowrap;
}

.eo-pb-reason {
  color: #475569;
  line-height: 1.45;
  min-width: 16rem;
}

/* ── Signal coverage ──────────────────────────────────────────────── */

.eo-pb-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.eo-pb-signal {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: calc(0.72rem * var(--type-scale, 1));
  font-variant-numeric: tabular-nums;
}

.eo-pb-signal b { font-weight: 700; }

/* A blind signal must not look like a working one. */
.eo-pb-signal-blind {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}

@media (max-width: 640px) {
  .eo-pb-table { font-size: calc(0.7rem * var(--type-scale, 1)); }
  .eo-pb-reason { min-width: 0; }
  .eo-pb-strip { grid-template-columns: 1fr 1fr; }
}
