/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 240px;
  --sidebar-bg: #0F172A;
  --sidebar-border: rgba(255,255,255,0.06);
  --accent: #6366F1;
  --accent-hover: #4F46E5;
  --accent-light: rgba(99,102,241,0.12);
  --bg: #F1F5F9;
  --card-bg: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --topbar-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); display: flex; min-height: 100vh; overflow-x: hidden; }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #475569;
  padding: 8px 8px 4px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: #94A3B8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #E2E8F0; }
.nav-item.active { background: var(--accent-light); color: #A5B4FC; }
.nav-item.active svg { color: var(--accent); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; overflow: hidden; }
.user-name { font-size: 0.85rem; font-weight: 600; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.75rem; color: #64748B; }

/* ── Main Layout ───────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background 0.15s;
}
.sidebar-toggle:hover { background: var(--bg); }
.breadcrumb { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 0.82rem; color: var(--text-muted); }

.btn-icon {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--bg); }
.badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: #EF4444;
  color: #fff;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ── Content ───────────────────────────────────────────────────── */
.content { flex: 1; padding: 28px 28px 48px; }

/* ── Pages ─────────────────────────────────────────────────────── */
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.4px; }
.page-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-top: 3px; }

/* ── CFIS unified strategic summary (Credit & Funding page) ──────── */
.cfis-summary {
  margin: .75rem 0 1.25rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, rgba(27, 45, 90, .55), rgba(212, 179, 106, .08));
  border: 1px solid rgba(212, 179, 106, .22);
  border-radius: 14px;
  color: #f3ede0;
}
.cfis-summary[hidden] { display: none; }
.cfis-summary-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #e9cf8f; display: inline-block; margin-bottom: .35rem;
}
.cfis-summary-headline {
  font-size: .95rem; color: rgba(225, 230, 245, .88);
  line-height: 1.5; margin-bottom: .35rem;
}
.cfis-summary-block { margin-top: .65rem; }
.cfis-summary-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #8e86b0; margin-bottom: .18rem;
}
.cfis-summary-move { font-size: 1.02rem; font-weight: 700; color: #fff; letter-spacing: .005em; }
.cfis-summary-why  { font-size: .88rem; line-height: 1.52; color: rgba(225, 230, 245, .85); }
.cfis-summary-avoid {
  margin: .15rem 0 0; padding-left: 1.1rem;
  font-size: .85rem; line-height: 1.5; color: rgba(225, 230, 245, .78);
}
.cfis-summary-avoid li { margin: .18rem 0; }
.cfis-summary-avoid li::marker { color: #e9cf8f; }

/* ── CFIS Control Layer ─────────────────────────────────────────────── */

/* Recommended action — gold glow + slight lift so the eye finds it. */
.cfis-recommended {
  position: relative;
  box-shadow: 0 0 0 2px rgba(212, 179, 106, .55), 0 0 26px rgba(212, 179, 106, .35) !important;
  outline: none;
  animation: cfisPulseRecommended 2.6s ease-in-out infinite;
}
@keyframes cfisPulseRecommended {
  0%, 100% { box-shadow: 0 0 0 2px rgba(212, 179, 106, .42), 0 0 18px rgba(212, 179, 106, .25); }
  50%      { box-shadow: 0 0 0 4px rgba(212, 179, 106, .65), 0 0 36px rgba(212, 179, 106, .55); }
}

/* Dimmed unrelated actions — visible enough to use, low enough to defer. */
.cfis-dimmed {
  opacity: .42 !important;
  filter: saturate(.55);
  transition: opacity .25s ease, filter .25s ease;
}
.cfis-dimmed:hover { opacity: .68 !important; filter: saturate(.85); }

/* Readiness indicator (% + confidence band). */
.cfis-readiness {
  margin: 0 0 .85rem;
  padding: .85rem 1.05rem;
  background: rgba(13, 26, 56, .42);
  border: 1px solid rgba(212, 179, 106, .18);
  border-radius: 12px;
  color: #f3ede0;
}
.cfis-readiness[hidden] { display: none; }
.cfis-readiness-row { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.cfis-readiness-score { display: flex; align-items: baseline; gap: .3rem; }
.cfis-readiness-num { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.cfis-readiness-pct { font-size: 1rem; font-weight: 600; color: rgba(245, 240, 230, .72); }
.cfis-readiness-lbl { margin-left: .55rem; font-size: .76rem; color: rgba(225, 230, 245, .72); letter-spacing: .04em; text-transform: uppercase; }
.cfis-readiness-conf {
  font-size: .78rem; color: rgba(225, 230, 245, .72);
  padding: .35rem .7rem; border-radius: 999px;
  background: rgba(212, 179, 106, .08);
  border: 1px solid rgba(212, 179, 106, .18);
}
.cfis-readiness-conf strong { color: #e9cf8f; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.cfis-readiness-conf.cfis-readiness-conf-low strong    { color: #fb923c; }
.cfis-readiness-conf.cfis-readiness-conf-medium strong { color: #e9cf8f; }
.cfis-readiness-conf.cfis-readiness-conf-high strong   { color: #86efac; }

/* Timing pill ("Do this now" / "Wait" / etc) */
.cfis-timing { margin: 0 0 .85rem; }
.cfis-timing[hidden] { display: none; }
.cfis-timing-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .42rem .9rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.cfis-timing-pill.cfis-timing-now {
  background: rgba(134, 239, 172, .14);
  color: #86efac; border: 1px solid rgba(134, 239, 172, .35);
}
.cfis-timing-pill.cfis-timing-soon {
  background: rgba(212, 179, 106, .14);
  color: #e9cf8f; border: 1px solid rgba(212, 179, 106, .35);
}
.cfis-timing-pill.cfis-timing-wait {
  background: rgba(251, 146, 60, .12);
  color: #fb923c; border: 1px solid rgba(251, 146, 60, .35);
}

/* Guardrail chips — short warnings rendered above the action area. */
.cfis-guardrails { margin: 0 0 .9rem; display: flex; flex-direction: column; gap: .4rem; }
.cfis-guardrails[hidden] { display: none; }
.cfis-guard-chip {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .55rem .8rem; border-radius: 10px;
  background: rgba(251, 146, 60, .06);
  border: 1px solid rgba(251, 146, 60, .26);
  color: rgba(245, 240, 230, .9);
  font-size: .82rem; line-height: 1.45;
}
.cfis-guard-icon { color: #fb923c; font-size: .9rem; flex: 0 0 auto; line-height: 1.4; }
.cfis-guard-text { flex: 1; }

/* Soft-lock warning toast */
.cfis-warn-toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%) scale(.96);
  z-index: 100100;
  width: min(440px, calc(100vw - 32px));
  padding: 1.2rem 1.3rem;
  background: rgba(13, 26, 56, .96);
  border: 1px solid rgba(212, 179, 106, .42);
  border-radius: 16px;
  color: #f3ede0;
  box-shadow: 0 24px 80px rgba(5, 12, 30, .65);
  opacity: 0;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}
.cfis-warn-toast.cfis-warn-shown {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.cfis-warn-head {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #e9cf8f; margin-bottom: .55rem;
}
.cfis-warn-body { font-size: .94rem; line-height: 1.55; color: rgba(245, 240, 230, .92); margin-bottom: .55rem; }
.cfis-warn-recommended { font-size: .85rem; color: rgba(225, 230, 245, .82); margin-bottom: .85rem; }
.cfis-warn-recommended strong { color: #fff; font-weight: 700; }
.cfis-warn-actions { display: flex; gap: .55rem; justify-content: flex-end; }
.cfis-warn-btn {
  padding: .55rem 1rem; border-radius: 999px;
  font-family: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.cfis-warn-primary {
  background: linear-gradient(135deg, #1b2d5a 0%, #2a4a82 55%, #d4b36a 100%);
  color: #fff; border: 1px solid rgba(233, 207, 143, .55);
}
.cfis-warn-primary:hover { transform: translateY(-1px); }
.cfis-warn-ghost {
  background: rgba(255, 255, 255, .04);
  color: rgba(245, 240, 230, .65);
  border: 1px solid rgba(255, 255, 255, .14);
}
.cfis-warn-ghost:hover { color: #fff; }

/* ── CFIS Progression toast — completion + deviation feedback ────── */
.cfis-progress-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 8px);
  z-index: 100090;
  display: inline-flex; align-items: center; gap: .75rem;
  padding: .85rem 1.1rem;
  min-width: 280px; max-width: min(440px, calc(100vw - 32px));
  background: rgba(13, 26, 56, .96);
  border: 1px solid rgba(134, 239, 172, .42);
  border-radius: 14px;
  color: #f3ede0;
  box-shadow: 0 18px 50px rgba(5, 12, 30, .55);
  opacity: 0;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}
.cfis-progress-toast.cfis-progress-shown {
  opacity: 1; transform: translate(-50%, 0);
}
.cfis-progress-toast--deviation {
  border-color: rgba(212, 179, 106, .42);
}
.cfis-progress-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 50%;
  background: rgba(134, 239, 172, .18);
  color: #86efac; font-weight: 700;
}
.cfis-progress-toast--deviation .cfis-progress-icon {
  background: rgba(212, 179, 106, .18);
  color: #e9cf8f;
}
.cfis-progress-body { display: flex; flex-direction: column; gap: 2px; }
.cfis-progress-title {
  font-size: .92rem; font-weight: 700; color: #fff;
}
.cfis-progress-sub {
  font-size: .8rem; color: rgba(225, 230, 245, .78); line-height: 1.4;
}
.cfis-progress-sub strong { color: #e9cf8f; font-weight: 700; }

/* ── CFIS Strategy intelligence panel ───────────────────────────────── */
.cfis-strategy {
  margin: 0 0 1rem;
  padding: 1.05rem 1.2rem;
  background: linear-gradient(135deg, rgba(13, 26, 56, .58), rgba(212, 179, 106, .06));
  border: 1px solid rgba(212, 179, 106, .22);
  border-radius: 14px;
  color: #f3ede0;
}
.cfis-strategy[hidden] { display: none; }
.cfis-strategy-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .55rem; flex-wrap: wrap; gap: .55rem;
}
.cfis-strategy-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #e9cf8f;
}
.cfis-strategy-cap {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .28rem .7rem; border-radius: 999px;
  background: rgba(134, 239, 172, .14);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, .35);
}
.cfis-strategy-cap--zero {
  background: rgba(251, 146, 60, .12);
  color: #fb923c;
  border-color: rgba(251, 146, 60, .35);
}
.cfis-strategy-cap--deviated {
  background: rgba(239, 68, 68, .12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, .42);
}
.cfis-strategy-memchip {
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  padding: .22rem .6rem; border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .28);
}

/* CFIS Memory — outcome capture card */
.cfis-memory-outcome {
  margin: .65rem 0 0;
  padding: .8rem .9rem;
  border-radius: 12px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .28);
  display: flex; flex-direction: column; gap: .6rem;
}
.cfis-memory-outcome[hidden] { display: none; }
.cfis-memory-outcome-head {
  font-size: .78rem; font-weight: 700;
  color: #c7d2fe; letter-spacing: .04em;
}
.cfis-memory-outcome-body {
  font-size: .82rem; line-height: 1.5; color: rgba(225, 230, 245, .88);
}
.cfis-memory-outcome-actions {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.cfis-memory-outcome-btn {
  font-size: .78rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .14);
  cursor: pointer;
}
.cfis-memory-outcome-btn:hover { background: rgba(255, 255, 255, .1); }
.cfis-memory-outcome-btn[data-outcome="approved"] {
  background: rgba(134, 239, 172, .12);
  color: #86efac;
  border-color: rgba(134, 239, 172, .35);
}
.cfis-memory-outcome-btn[data-outcome="denied"] {
  background: rgba(239, 68, 68, .1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .35);
}
.cfis-memory-outcome-btn[data-outcome="pending"] {
  background: rgba(251, 191, 36, .1);
  color: #fde68a;
  border-color: rgba(251, 191, 36, .35);
}
.cfis-memory-outcome-input {
  margin-top: .35rem;
  padding: .45rem .6rem;
  font-size: .82rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, .55);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .15);
  width: 100%;
}
.cfis-memory-outcome-saved {
  font-size: .78rem; color: #86efac; font-weight: 600;
}

/* CFIS Outcome Intelligence (Phase 2) */
.cfis-outcome-intel {
  margin: .65rem 0 0;
  padding: .85rem .95rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(148, 163, 184, .22);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-outcome-intel[hidden] { display: none; }
.cfis-outcome-intel.cfis-outcome-band--high   { border-color: rgba(134, 239, 172, .35); background: rgba(134, 239, 172, .06); }
.cfis-outcome-intel.cfis-outcome-band--medium { border-color: rgba(233, 207, 143, .35); background: rgba(233, 207, 143, .06); }
.cfis-outcome-intel.cfis-outcome-band--low    { border-color: rgba(148, 163, 184, .25); background: rgba(148, 163, 184, .04); }
.cfis-outcome-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  flex-wrap: wrap;
}
.cfis-outcome-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #cbd5e1;
}
.cfis-outcome-band {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .22rem .6rem; border-radius: 999px;
  background: rgba(148, 163, 184, .14);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, .28);
}
.cfis-outcome-band--high   .cfis-outcome-band { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-outcome-band--medium .cfis-outcome-band { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-outcome-counts {
  display: flex; gap: .55rem; flex-wrap: wrap;
}
.cfis-outcome-count {
  display: inline-flex; align-items: baseline; gap: .35rem;
  padding: .3rem .65rem; border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
.cfis-outcome-count-num { font-size: .98rem; font-weight: 700; color: #fff; }
.cfis-outcome-count-lbl { font-size: .72rem; color: rgba(225, 230, 245, .7); letter-spacing: .04em; }
.cfis-outcome-count--approved .cfis-outcome-count-num { color: #86efac; }
.cfis-outcome-count--denied   .cfis-outcome-count-num { color: #fca5a5; }
.cfis-outcome-count--pending  .cfis-outcome-count-num { color: #fde68a; }
.cfis-outcome-insight {
  font-size: .92rem; line-height: 1.55; color: #fff;
}
.cfis-outcome-adjust {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-outcome-adjust-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-outcome-adjust-text {
  font-size: .85rem; line-height: 1.45; color: rgba(245, 240, 230, .92);
}

/* CFIS Network Pattern Intelligence (Phase 3) */
.cfis-network-intel {
  margin: .65rem 0 0;
  padding: .75rem .9rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px dashed rgba(148, 163, 184, .28);
  display: flex; flex-direction: column; gap: .45rem;
}
.cfis-network-intel[hidden] { display: none; }
.cfis-network-intel.cfis-network-band--strong   { border-color: rgba(99, 102, 241, .35); background: rgba(99, 102, 241, .06); border-style: solid; }
.cfis-network-intel.cfis-network-band--cautious { border-color: rgba(148, 163, 184, .35); background: rgba(148, 163, 184, .04); border-style: solid; }
.cfis-network-intel.cfis-network-band--pending  { opacity: .82; }
.cfis-network-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  flex-wrap: wrap;
}
.cfis-network-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #a5b4fc;
}
.cfis-network-band {
  font-size: .66rem; font-weight: 700; letter-spacing: .04em;
  padding: .2rem .55rem; border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .25);
}
.cfis-network-band--strong   .cfis-network-band { background: rgba(99, 102, 241, .14); color: #c7d2fe; border-color: rgba(99, 102, 241, .35); }
.cfis-network-band--cautious .cfis-network-band { background: rgba(233, 207, 143, .12); color: #e9cf8f; border-color: rgba(233, 207, 143, .3); }
.cfis-network-insight {
  font-size: .88rem; line-height: 1.5; color: #fff;
}
.cfis-network-caution {
  font-size: .8rem; line-height: 1.45; color: rgba(225, 230, 245, .76);
  font-style: italic;
}
.cfis-network-priority {
  font-size: .7rem; color: rgba(225, 230, 245, .55);
  letter-spacing: .02em;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  padding-top: .35rem;
}

/* CFIS Funding Fit (Underwriting-type layer) */
.cfis-fit {
  margin: .65rem 0 0;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .65);
  border: 1px solid rgba(99, 102, 241, .28);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-fit[hidden] { display: none; }
.cfis-fit.cfis-fit-band--high   { border-color: rgba(134, 239, 172, .35); }
.cfis-fit.cfis-fit-band--medium { border-color: rgba(233, 207, 143, .35); }
.cfis-fit.cfis-fit-band--low    { border-color: rgba(148, 163, 184, .25); opacity: .85; }
.cfis-fit-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  flex-wrap: wrap;
}
.cfis-fit-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-fit-band {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .22rem .6rem; border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .28);
}
.cfis-fit-band--high   .cfis-fit-band { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-fit-band--medium .cfis-fit-band { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-fit-title {
  font-size: 1.05rem; font-weight: 700; color: #fff;
}
.cfis-fit-why {
  font-size: .9rem; line-height: 1.55; color: rgba(245, 240, 230, .92);
}
.cfis-fit-list {
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-fit-list--avoid {
  background: rgba(239, 68, 68, .06);
  border-color: rgba(239, 68, 68, .25);
}
.cfis-fit-list-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
  margin-bottom: .3rem;
}
.cfis-fit-list ul { list-style: disc; padding-left: 1.1rem; margin: 0; }
.cfis-fit-list li {
  font-size: .85rem; line-height: 1.45; color: rgba(245, 240, 230, .92);
  margin: .15rem 0;
}
.cfis-fit-secondary {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .35rem .65rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  align-self: flex-start;
}
.cfis-fit-secondary-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .6);
}
.cfis-fit-secondary-title { font-size: .82rem; color: #fff; font-weight: 600; }
.cfis-fit-timing {
  font-size: .82rem; line-height: 1.45;
  color: rgba(225, 230, 245, .85);
  font-style: italic;
}
.cfis-fit-priority {
  font-size: .7rem; color: rgba(225, 230, 245, .55);
  letter-spacing: .02em;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  padding-top: .35rem;
}

/* Refinement: head-right cluster + strength badge */
.cfis-fit-head-right { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.cfis-fit-strength {
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .22rem .55rem; border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(148, 163, 184, .12); color: #cbd5e1;
}
.cfis-fit-strength--strong   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-fit-strength--moderate { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-fit-strength--weak     { background: rgba(239, 68, 68, .1);    color: #fca5a5; border-color: rgba(239, 68, 68, .3); }

/* Refinement: ordered prep steps */
.cfis-fit-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.cfis-fit-step  { display: flex; gap: .55rem; align-items: flex-start; }
.cfis-fit-step-num {
  flex: 0 0 1.4rem; height: 1.4rem; width: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(99, 102, 241, .18); color: #c7d2fe;
  font-size: .78rem; font-weight: 700;
  border: 1px solid rgba(99, 102, 241, .35);
}
.cfis-fit-step-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.cfis-fit-step-text { font-size: .85rem; line-height: 1.45; color: rgba(245, 240, 230, .92); }
.cfis-fit-when {
  display: inline-flex; align-self: flex-start;
  font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .75);
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-fit-when--short-term  { background: rgba(134, 239, 172, .12); color: #86efac; border-color: rgba(134, 239, 172, .3); }
.cfis-fit-when--mid-term    { background: rgba(233, 207, 143, .12); color: #e9cf8f; border-color: rgba(233, 207, 143, .3); }
.cfis-fit-when--longer-term { background: rgba(99, 102, 241, .12);  color: #a5b4fc; border-color: rgba(99, 102, 241, .3); }

/* Refinement: refine prompt for missing inputs */
.cfis-fit-refine {
  display: flex; gap: .55rem; align-items: flex-start;
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .28);
  font-size: .82rem; line-height: 1.45; color: rgba(225, 230, 245, .9);
}
.cfis-fit-refine-icon {
  flex: 0 0 auto; width: 1.1rem; height: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(99, 102, 241, .25); color: #c7d2fe;
  font-size: .72rem; font-weight: 700;
}

/* Refinement: depth toggle + deep block */
.cfis-fit-toggle {
  align-self: flex-start; background: transparent; border: 0;
  padding: 0; cursor: pointer;
  font-size: .78rem; font-weight: 600; color: #a5b4fc;
  text-decoration: underline; text-underline-offset: .2rem;
}
.cfis-fit-toggle:hover { color: #c7d2fe; }
.cfis-fit-deep {
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .45rem;
}
.cfis-fit-deep-row { display: flex; flex-direction: column; gap: .2rem; }
.cfis-fit-deep-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-fit-deep-list { list-style: disc; padding-left: 1.1rem; margin: 0; }
.cfis-fit-deep-list li { font-size: .82rem; color: rgba(245, 240, 230, .9); }
.cfis-fit-deep-list--conflict li { color: #fca5a5; }

/* Refinement: secondary fallback explanation */
.cfis-fit-secondary {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .12);
}
.cfis-fit-secondary-head { display: inline-flex; gap: .45rem; align-items: baseline; }
.cfis-fit-secondary-why {
  font-size: .8rem; line-height: 1.45;
  color: rgba(225, 230, 245, .76); font-style: italic;
}

/* CFIS Intake (CIIE) — entry buttons + modal */
.cfis-intake-entry {
  margin: .65rem 0;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(99, 102, 241, .28);
  display: flex; flex-direction: column; gap: .6rem;
}
.cfis-intake-entry-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cfis-intake-entry-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-intake-entry-note {
  font-size: .72rem; color: rgba(225, 230, 245, .65);
  letter-spacing: .02em;
}
.cfis-intake-entry-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cfis-intake-btn {
  padding: .55rem 1rem; border-radius: 999px; border: 1px solid transparent;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  background: rgba(255, 255, 255, .05); color: #fff;
  border-color: rgba(255, 255, 255, .12);
}
.cfis-intake-btn--primary {
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  border-color: rgba(99, 102, 241, .45);
}
.cfis-intake-btn--primary:hover { background: rgba(99, 102, 241, .35); }
.cfis-intake-btn--ghost:hover   { background: rgba(255, 255, 255, .1); }

.cfis-intake-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .55);
  display: none; align-items: center; justify-content: center;
  z-index: 9999;
}
.cfis-intake-modal--open { display: flex; }
.cfis-intake-dialog {
  width: min(560px, 92vw); max-height: 88vh; overflow: auto;
  background: #0f172a; color: #e2e8f0;
  border: 1px solid rgba(99, 102, 241, .35);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: .65rem;
}
.cfis-intake-head {
  display: flex; justify-content: space-between; align-items: center;
}
.cfis-intake-head h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.cfis-intake-x {
  background: transparent; color: rgba(225, 230, 245, .65);
  border: 0; font-size: 1.4rem; cursor: pointer;
  padding: 0 .35rem; line-height: 1;
}
.cfis-intake-x:hover { color: #fff; }
.cfis-intake-tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.cfis-intake-tab {
  padding: .4rem .75rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04); color: rgba(225, 230, 245, .8);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: .8rem; font-weight: 600; cursor: pointer;
}
.cfis-intake-tab--active {
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  border-color: rgba(99, 102, 241, .45);
}
.cfis-intake-help {
  font-size: .82rem; line-height: 1.5; color: rgba(225, 230, 245, .85);
  margin: 0;
}
.cfis-intake-help--small { font-size: .75rem; color: rgba(225, 230, 245, .65); }
.cfis-intake-file, .cfis-intake-textarea {
  width: 100%; box-sizing: border-box; font: inherit;
  background: rgba(15, 23, 42, .8); color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px;
  padding: .55rem .6rem;
}
.cfis-intake-textarea { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .82rem; }
.cfis-intake-form { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .7rem; }
.cfis-intake-field { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; }
.cfis-intake-field-label { color: rgba(225, 230, 245, .8); font-size: .72rem; letter-spacing: .04em; }
.cfis-intake-field-label em { color: rgba(225, 230, 245, .55); font-style: normal; font-weight: 400; margin-left: .25rem; }
.cfis-intake-field input, .cfis-intake-field select,
.cfis-intake-confirm input, .cfis-intake-confirm select {
  background: rgba(15, 23, 42, .8); color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px;
  padding: .4rem .5rem; font: inherit; font-size: .85rem;
}
.cfis-intake-confirm { display: flex; flex-direction: column; gap: .55rem; }
.cfis-intake-confirm-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .25rem .7rem; align-items: center;
  padding: .55rem .65rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-intake-confirm-label { font-size: .82rem; color: rgba(225, 230, 245, .9); font-weight: 600; }
.cfis-intake-confirm-evidence {
  grid-column: 1 / span 2;
  font-size: .68rem; color: rgba(225, 230, 245, .55);
}
.cfis-intake-confirm-evidence code {
  background: rgba(255, 255, 255, .05); padding: .05rem .3rem; border-radius: 3px;
  color: rgba(225, 230, 245, .8);
}
.cfis-intake-confirm-evidence--empty { color: rgba(225, 230, 245, .4); font-style: italic; }
.cfis-intake-accounts {
  padding: .55rem .65rem; border-radius: 10px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .25);
  font-size: .82rem;
}
.cfis-intake-accounts-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c7d2fe; margin-bottom: .2rem;
}
.cfis-intake-accounts ul { padding-left: 1.1rem; margin: 0; list-style: disc; }
.cfis-intake-accounts li { margin: .1rem 0; color: rgba(245, 240, 230, .9); }
.cfis-intake-actions { display: flex; justify-content: flex-end; gap: .45rem; margin-top: .35rem; }
.cfis-intake-err {
  padding: .55rem .65rem; border-radius: 10px;
  background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35);
  color: #fca5a5; font-size: .82rem;
}
.cfis-intake-summary {
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(134, 239, 172, .08); border: 1px solid rgba(134, 239, 172, .3);
  color: #f1f5f9; font-size: .9rem; line-height: 1.5; margin: 0;
}

/* CFIS Intake — JSON dashboard, color legend, bureau grid, flags */
.cfis-intake-edu {
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .15rem;
}
.cfis-intake-edu-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-intake-edu-text { font-size: .82rem; line-height: 1.5; color: rgba(225, 230, 245, .9); }
.cfis-intake-section-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .75);
  margin-bottom: .25rem;
}
.cfis-intake-dashboard {
  display: flex; flex-direction: column; gap: .55rem;
  padding: .65rem .75rem; border-radius: 10px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-intake-legend-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.cfis-intake-legend {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .55rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: .72rem; color: rgba(225, 230, 245, .85);
  letter-spacing: .04em;
}
.cfis-intake-legend[data-count="0"] { opacity: .45; }
.cfis-intake-legend-label { text-transform: uppercase; font-weight: 700; }
.cfis-intake-legend-count { font-weight: 700; color: #fff; }
.cfis-intake-legend--green  .cfis-intake-dot { background: #86efac; box-shadow: 0 0 8px rgba(134, 239, 172, .55); }
.cfis-intake-legend--yellow .cfis-intake-dot { background: #fde68a; box-shadow: 0 0 8px rgba(253, 230, 138, .5); }
.cfis-intake-legend--orange .cfis-intake-dot { background: #fb923c; box-shadow: 0 0 8px rgba(251, 146, 60, .55); }
.cfis-intake-legend--red    .cfis-intake-dot { background: #fca5a5; box-shadow: 0 0 8px rgba(252, 165, 165, .55); }
.cfis-intake-legend--blue   .cfis-intake-dot { background: #93c5fd; box-shadow: 0 0 8px rgba(147, 197, 253, .55); }
.cfis-intake-legend--purple .cfis-intake-dot { background: #c4b5fd; box-shadow: 0 0 8px rgba(196, 181, 253, .55); }

.cfis-intake-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px;
  background: rgba(148, 163, 184, .65);
}
.cfis-intake-dot--green  { background: #86efac; }
.cfis-intake-dot--yellow { background: #fde68a; }
.cfis-intake-dot--orange { background: #fb923c; }
.cfis-intake-dot--red    { background: #fca5a5; }
.cfis-intake-dot--blue   { background: #93c5fd; }
.cfis-intake-dot--purple { background: #c4b5fd; }

.cfis-intake-bureaus { display: flex; flex-direction: column; gap: .3rem; }
.cfis-intake-bureau-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .45rem;
}
.cfis-intake-bureau {
  padding: .5rem .65rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .78rem; color: rgba(225, 230, 245, .85);
  display: flex; flex-direction: column; gap: .15rem;
}
.cfis-intake-bureau-name { font-weight: 700; color: #c7d2fe; text-transform: capitalize; font-size: .82rem; margin-bottom: .15rem; }
.cfis-intake-bureau-row { display: flex; justify-content: space-between; gap: .5rem; }
.cfis-intake-bureau-row span:last-child { color: #fff; font-weight: 600; }

.cfis-intake-disc, .cfis-intake-flags { display: flex; flex-direction: column; gap: .25rem; }
.cfis-intake-disc ul, .cfis-intake-flags ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .25rem;
}
.cfis-intake-disc li, .cfis-intake-flags li {
  display: flex; align-items: flex-start; gap: .45rem;
  padding: .4rem .6rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .8rem; color: rgba(225, 230, 245, .9); line-height: 1.45;
}
.cfis-intake-flag--red    { border-color: rgba(252, 165, 165, .3); background: rgba(239, 68, 68, .06); }
.cfis-intake-flag--orange { border-color: rgba(251, 146, 60,  .3); background: rgba(251, 146, 60, .06); }
.cfis-intake-flag--yellow { border-color: rgba(253, 230, 138, .3); background: rgba(253, 230, 138, .04); }
.cfis-intake-flag--green  { border-color: rgba(134, 239, 172, .3); background: rgba(134, 239, 172, .05); }
.cfis-intake-flag--blue   { border-color: rgba(147, 197, 253, .3); background: rgba(147, 197, 253, .05); }
.cfis-intake-flag--purple { border-color: rgba(196, 181, 253, .3); background: rgba(196, 181, 253, .05); }
.cfis-intake-purple-note {
  font-size: .8rem; line-height: 1.5;
  padding: .5rem .65rem; border-radius: 8px;
  background: rgba(196, 181, 253, .08);
  border: 1px solid rgba(196, 181, 253, .3);
  color: rgba(245, 240, 245, .92);
}
.cfis-intake-purple-note strong { color: #c4b5fd; }

/* CFIS Mode bar — Personal / Business toggle */
.cfis-mode-bar {
  display: flex; flex-direction: column; gap: .35rem;
  margin-bottom: .65rem;
  padding: .75rem .9rem;
  border-radius: 14px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .3);
}
.cfis-mode-toggle {
  display: inline-flex; padding: .25rem; border-radius: 999px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .1);
  align-self: flex-start; gap: .15rem;
}
.cfis-mode-btn {
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  padding: .4rem 1.1rem; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: rgba(225, 230, 245, .8);
}
.cfis-mode-btn--active {
  background: rgba(99, 102, 241, .35); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset;
}
.cfis-mode-narration { display: flex; flex-direction: column; gap: .15rem; }
.cfis-mode-line {
  font-size: .9rem; font-weight: 600; color: #fff;
}
.cfis-mode-foot {
  font-size: .72rem; color: rgba(225, 230, 245, .65);
}

/* CFIS Gate overlay (locks downstream sections until intake) */
.cfis-section--locked { position: relative; min-height: 110px; }
.cfis-section--locked > .cfis-section-body { filter: blur(2px); pointer-events: none; }
.cfis-gate-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .82);
  border-radius: 14px;
  padding: 1rem;
}
.cfis-gate-card {
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: 1rem 1.2rem; max-width: 26rem; text-align: center;
  background: rgba(15, 23, 42, .9);
  border: 1px solid rgba(99, 102, 241, .35);
  border-radius: 12px;
}
.cfis-gate-icon {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(99, 102, 241, .18);
  border: 1px solid rgba(99, 102, 241, .35);
  font-size: 1rem;
}
.cfis-gate-title { font-size: .98rem; font-weight: 700; color: #fff; }
.cfis-gate-sub   { font-size: .82rem; color: rgba(225, 230, 245, .8); line-height: 1.45; }
.cfis-gate-btn {
  margin-top: .25rem;
  padding: .55rem 1rem; border-radius: 999px; border: 1px solid rgba(99, 102, 241, .45);
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  font-size: .85rem; font-weight: 600; cursor: pointer;
}
.cfis-gate-btn:hover { background: rgba(99, 102, 241, .35); }

/* Tier-2 picker */
.cfis-tier2-picker {
  display: flex; flex-direction: column; gap: .35rem;
  padding: .55rem .9rem;
  border-radius: 12px;
  background: rgba(99, 102, 241, .06);
  border: 1px solid rgba(99, 102, 241, .25);
  margin-bottom: .15rem;
}
.cfis-tier2-eyebrow {
  font-size: .58rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(199, 210, 254, .85);
}
.cfis-tier2-tabs { display: inline-flex; gap: .15rem; padding: .15rem; border-radius: 999px; background: rgba(15, 23, 42, .55); border: 1px solid rgba(255, 255, 255, .08); align-self: flex-start; }
.cfis-tier2-tab {
  font-size: .8rem; font-weight: 600; padding: .35rem .9rem;
  border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: rgba(225, 230, 245, .75);
}
.cfis-tier2-tab--active { background: rgba(99, 102, 241, .35); color: #fff; }

/* Tier 3 sections — slightly tighter look so deep work feels secondary */
.cfis-section--tier3 { background: rgba(15, 23, 42, .45); }

/* Dispute workspace stats + bestie line */
.cfis-disputes-bestie {
  font-size: .85rem; line-height: 1.5; color: #fff; font-weight: 600;
  margin: .25rem 0;
}
.cfis-disputes-stats { display: flex; flex-wrap: wrap; gap: .45rem; margin: .35rem 0; }
.cfis-disputes-stat {
  font-size: .76rem; padding: .25rem .6rem; border-radius: 999px;
  background: rgba(99, 102, 241, .14); color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, .3);
}
.cfis-disputes-stat strong { font-weight: 700; color: #fff; }

/* CFIS Letters Tier 3 panel */
.cfis-letters {
  padding: .85rem 1rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-letters[hidden] { display: none; }
.cfis-letters-head { display: flex; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.cfis-letters-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-letters-headline { font-size: .98rem; font-weight: 700; color: #fff; margin-top: .15rem; }
.cfis-letters-help { font-size: .78rem; color: rgba(225, 230, 245, .72); margin-top: .15rem; line-height: 1.45; }
.cfis-letters-actions { display: flex; gap: .35rem; align-self: flex-start; }
.cfis-letters-group {
  padding: .55rem .7rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .35rem;
}
.cfis-letters-group-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .7);
}
.cfis-letters-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.cfis-letters-item {
  padding: .4rem .55rem; border-radius: 8px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: .15rem;
}
.cfis-letters-item-recipient { font-size: .78rem; font-weight: 700; color: #fff; }
.cfis-letters-item-subject { font-size: .78rem; color: rgba(225, 230, 245, .85); }
.cfis-letters-item-meta { font-size: .68rem; color: rgba(225, 230, 245, .55); letter-spacing: .04em; }

/* CFIS Snapshots Tier 3 panel */
.cfis-snapshots {
  padding: .8rem 1rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .45rem;
}
.cfis-snapshots[hidden] { display: none; }
.cfis-snapshots-head { display: flex; justify-content: space-between; align-items: baseline; }
.cfis-snapshots-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(199, 210, 254, .85);
}
.cfis-snapshots-when { font-size: .76rem; color: rgba(225, 230, 245, .65); }
.cfis-snapshots-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .35rem; }
.cfis-snapshots-row {
  padding: .4rem .55rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: .1rem;
}
.cfis-snapshots-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-snapshots-row span:last-child { font-size: .82rem; color: #fff; }
.cfis-snapshots-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.cfis-snapshots-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .55rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: .68rem; color: rgba(225, 230, 245, .85);
  text-transform: uppercase; letter-spacing: .08em;
}

/* ─── Phase-2: Focus Mode ──────────────────────────────────────────── */
#page-credit.cfis-focus-mode .cfis-section--tier3:not(.cfis-focus-active) {
  opacity: .35;
  pointer-events: none;
  filter: blur(0.5px);
  transition: opacity .25s ease;
}
#page-credit.cfis-focus-mode .cfis-section--tier2 {
  opacity: .6;
  transition: opacity .25s ease;
}
#page-credit.cfis-focus-mode .cfis-tier2-picker { opacity: .55; }
.cfis-section.cfis-focus-active {
  outline: 1px solid rgba(99, 102, 241, .5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
  transition: box-shadow .25s ease;
}

/* ─── Phase-2: Next Move Tier 1 panel ─────────────────────────────── */
.cfis-nextmove {
  padding: .9rem 1rem; border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(99, 102, 241, .04));
  border: 1px solid rgba(99, 102, 241, .35);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-nextmove-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-nextmove-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-nextmove-bestie {
  font-size: .78rem; color: rgba(225, 230, 245, .8);
  font-style: italic;
}
.cfis-nextmove-card {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
  padding: .65rem .75rem; border-radius: 10px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-nextmove-card--intake    { border-color: rgba(233, 207, 143, .35); }
.cfis-nextmove-card--disputes  { border-color: rgba(252, 165, 165, .35); }
.cfis-nextmove-card--credit    { border-color: rgba(99, 102, 241, .35); }
.cfis-nextmove-card--execution { border-color: rgba(134, 239, 172, .35); }
.cfis-nextmove-label {
  font-size: 1.02rem; font-weight: 700; color: #fff;
  flex: 1 1 auto; min-width: 60%;
}
.cfis-nextmove-cta {
  padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .45);
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  font-size: .82rem; font-weight: 600; cursor: pointer;
}
.cfis-nextmove-cta:hover { background: rgba(99, 102, 241, .35); }
.cfis-nextmove-status-row {
  display: flex; gap: .35rem; flex-wrap: wrap; align-items: center;
  width: 100%; margin-top: .15rem;
}
.cfis-nextmove-status-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
  margin-right: .25rem;
}
.cfis-nextmove-statbtn {
  padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .82);
  font-size: .72rem; font-weight: 600; cursor: pointer;
}
.cfis-nextmove-statbtn--active {
  background: rgba(99, 102, 241, .3); color: #fff;
  border-color: rgba(99, 102, 241, .5);
}

/* ─── Phase-2: Timeline ───────────────────────────────────────────── */
.cfis-timeline {
  padding: .85rem 1rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-timeline[hidden] { display: none; }
.cfis-timeline-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-timeline-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-timeline-help { font-size: .76rem; color: rgba(225, 230, 245, .7); }
.cfis-timeline-list {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem;
}
.cfis-timeline-row {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .5rem .65rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}
.cfis-timeline-row--projected { border-style: dashed; opacity: .85; }
.cfis-timeline-row--milestone { border-color: rgba(99, 102, 241, .25); }
.cfis-timeline-when { display: flex; flex-direction: column; min-width: 85px; gap: .1rem; }
.cfis-timeline-day {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-timeline-rel { font-size: .72rem; color: rgba(225, 230, 245, .65); }
.cfis-timeline-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.cfis-timeline-label { font-size: .85rem; color: #fff; font-weight: 600; }
.cfis-timeline-meta { display: flex; gap: .35rem; flex-wrap: wrap; }
.cfis-timeline-group {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .25);
}
.cfis-timeline-status {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
}
.cfis-timeline-status--not_started { background: rgba(148, 163, 184, .14); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, .25); }
.cfis-timeline-status--in_progress { background: rgba(233, 207, 143, .14); color: #e9cf8f; border: 1px solid rgba(233, 207, 143, .35); }
.cfis-timeline-status--waiting     { background: rgba(147, 197, 253, .12); color: #93c5fd; border: 1px solid rgba(147, 197, 253, .3);  }
.cfis-timeline-status--completed   { background: rgba(134, 239, 172, .14); color: #86efac; border: 1px solid rgba(134, 239, 172, .35); }

/* ─── Phase-2: Dispute target status row ───────────────────────────── */
.cfis-disputes-status-badge {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .25);
  margin-left: auto;
}
.cfis-disputes-status-badge--in_progress { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-disputes-status-badge--waiting     { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3);  }
.cfis-disputes-status-badge--completed   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-disputes-target-statusrow {
  display: flex; gap: .85rem; flex-wrap: wrap;
  font-size: .76rem; color: rgba(225, 230, 245, .8);
}
.cfis-disputes-target-statusbar { display: flex; gap: .25rem; flex-wrap: wrap; }
.cfis-disputes-statbtn {
  padding: .25rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04); color: rgba(225, 230, 245, .8);
  font-size: .68rem; font-weight: 600; cursor: pointer;
}
.cfis-disputes-statbtn--active {
  background: rgba(99, 102, 241, .3); color: #fff;
  border-color: rgba(99, 102, 241, .5);
}

/* ─── Phase-3: Bureau Viewer ──────────────────────────────────────── */
.cfis-bv {
  padding: .85rem 1rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-bv[hidden] { display: none; }
.cfis-bv-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-bv-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-bv-help { font-size: .76rem; color: rgba(225, 230, 245, .72); }
.cfis-bv-tabs {
  display: inline-flex; gap: .15rem; padding: .15rem; border-radius: 999px;
  background: rgba(15, 23, 42, .55); border: 1px solid rgba(255, 255, 255, .1);
  align-self: flex-start;
}
.cfis-bv-tab {
  padding: .35rem .9rem; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: rgba(225, 230, 245, .8);
  font-size: .82rem; font-weight: 600;
  text-transform: capitalize;
}
.cfis-bv-tab--active { background: rgba(99, 102, 241, .35); color: #fff; }
.cfis-bv-bureau-head { display: flex; flex-direction: column; gap: .35rem; }
.cfis-bv-bureau-name {
  font-size: 1rem; font-weight: 700; color: #fff; text-transform: capitalize;
}
.cfis-bv-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .4rem;
}
.cfis-bv-stat {
  padding: .45rem .6rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: .15rem;
}
.cfis-bv-stat-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-bv-stat-val { font-size: .92rem; font-weight: 700; color: #fff; }
.cfis-bv-accounts { display: flex; flex-direction: column; gap: .35rem; }
.cfis-bv-accounts-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-bv-acct {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
  overflow: hidden;
}
.cfis-bv-acct--open { border-color: rgba(99, 102, 241, .35); }
.cfis-bv-acct-head {
  width: 100%; display: flex; align-items: center; gap: .55rem;
  background: transparent; border: 0; cursor: pointer;
  padding: .55rem .65rem; text-align: left;
}
.cfis-bv-acct-statusband {
  width: 4px; align-self: stretch; border-radius: 4px;
}
.cfis-bv-acct-statusband--green  { background: #86efac; }
.cfis-bv-acct-statusband--orange { background: #fb923c; }
.cfis-bv-acct-statusband--red    { background: #fca5a5; }
.cfis-bv-acct-statusband--blue   { background: #93c5fd; }
.cfis-bv-acct-statusband--purple { background: #c4b5fd; }
.cfis-bv-acct-summary { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.cfis-bv-acct-row { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; }
.cfis-bv-acct-creditor { font-size: .92rem; font-weight: 700; color: #fff; flex: 1; }
.cfis-bv-acct-status {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-bv-acct-flags { display: inline-flex; gap: .2rem; }
.cfis-bv-flag {
  font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .1rem .4rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-bv-flag--red    { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.cfis-bv-flag--orange { background: rgba(251, 146, 60, .14); color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-bv-flag--blue   { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3);  }
.cfis-bv-flag--purple { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3);  }
.cfis-bv-acct-row--meta { font-size: .76rem; color: rgba(225, 230, 245, .75); }
.cfis-bv-acct-chev { color: rgba(225, 230, 245, .65); transition: transform .18s ease; flex: 0 0 auto; }
.cfis-bv-acct--open .cfis-bv-acct-chev { transform: rotate(180deg); }
.cfis-bv-acct-body {
  padding: .65rem .75rem;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .45rem;
}
.cfis-bv-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .35rem;
}
.cfis-bv-detail-grid > div { display: flex; flex-direction: column; gap: .15rem; }
.cfis-bv-detail-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-bv-detail-flags { display: flex; flex-direction: column; gap: .25rem; }
.cfis-bv-detail-flag {
  padding: .35rem .55rem; border-radius: 8px;
  font-size: .8rem; line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
}
.cfis-bv-detail-flag--red    { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .35); color: #fca5a5; }
.cfis-bv-detail-flag--orange { background: rgba(251, 146, 60, .08); border-color: rgba(251, 146, 60, .35); color: #fb923c; }
.cfis-bv-detail-flag--blue   { background: rgba(147, 197, 253, .08); border-color: rgba(147, 197, 253, .3);  color: #93c5fd; }
.cfis-bv-detail-flag--purple { background: rgba(196, 181, 253, .08); border-color: rgba(196, 181, 253, .3);  color: #c4b5fd; }
.cfis-bv-detail-path {
  font-size: .72rem; color: rgba(225, 230, 245, .55);
}
.cfis-bv-detail-path code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: rgba(255, 255, 255, .06);
  padding: .05rem .3rem; border-radius: 3px;
}
.cfis-bv-empty {
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .12);
  font-size: .82rem; color: rgba(225, 230, 245, .8);
}
.cfis-bv-actions { display: flex; justify-content: flex-end; }
.cfis-bv-fullbtn {
  padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .45);
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  font-size: .76rem; font-weight: 600; cursor: pointer;
}
.cfis-bv-fullbtn--active { background: rgba(99, 102, 241, .45); color: #fff; }
.cfis-bv-raw {
  margin: 0;
  padding: .6rem .75rem; border-radius: 8px;
  background: rgba(15, 23, 42, .8); color: rgba(225, 230, 245, .85);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .72rem; line-height: 1.45;
  max-height: 320px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, monospace;
  white-space: pre-wrap; word-break: break-word;
}

/* ─── Phase-3: Momentum panel ─────────────────────────────────────── */
.cfis-progress {
  padding: .85rem 1rem; border-radius: 12px;
  background: linear-gradient(135deg, rgba(134, 239, 172, .08), rgba(99, 102, 241, .04));
  border: 1px solid rgba(134, 239, 172, .25);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-progress[hidden] { display: none; }
.cfis-progress--done { border-color: rgba(134, 239, 172, .55); }
.cfis-progress-head {
  display: flex; align-items: baseline; gap: .65rem; flex-wrap: wrap;
}
.cfis-progress-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #86efac;
}
.cfis-progress-stat {
  font-size: .82rem; color: rgba(225, 230, 245, .9); flex: 1;
}
.cfis-progress-pct { font-size: 1.05rem; font-weight: 800; color: #fff; }
.cfis-progress-bar {
  height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.cfis-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #86efac, #4ade80);
  transition: width .35s ease;
}
@keyframes cfisProgressPulse {
  0%   { transform: scaleY(1);    filter: brightness(1); }
  40%  { transform: scaleY(1.4);  filter: brightness(1.3); }
  100% { transform: scaleY(1);    filter: brightness(1); }
}
.cfis-progress-bar-fill--pulse { animation: cfisProgressPulse 600ms ease; }
.cfis-progress-line { font-size: .85rem; color: #fff; }
.cfis-progress-meta {
  display: flex; gap: .85rem; flex-wrap: wrap;
  font-size: .76rem; color: rgba(225, 230, 245, .75);
}
.cfis-progress-meta strong { color: #fff; font-weight: 700; }

/* ─── Phase-4: Plan Lock-In ───────────────────────────────────────── */
.cfis-planlock {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem .95rem; border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(99, 102, 241, .04));
  border: 1px solid rgba(99, 102, 241, .35);
}
.cfis-planlock[hidden] { display: none; }
.cfis-planlock--locked {
  background: linear-gradient(135deg, rgba(134, 239, 172, .12), rgba(99, 102, 241, .04));
  border-color: rgba(134, 239, 172, .45);
}
.cfis-planlock-icon {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, .45);
  font-size: 1.05rem; font-weight: 700;
  flex: 0 0 auto;
}
.cfis-planlock--locked .cfis-planlock-icon {
  background: rgba(134, 239, 172, .25); color: #86efac; border-color: rgba(134, 239, 172, .45);
}
.cfis-planlock-icon--ready { background: rgba(233, 207, 143, .25); color: #e9cf8f; border-color: rgba(233, 207, 143, .45); }
.cfis-planlock-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.cfis-planlock-title { font-size: .98rem; font-weight: 700; color: #fff; }
.cfis-planlock-help { font-size: .8rem; color: rgba(225, 230, 245, .82); line-height: 1.45; }
.cfis-planlock-confirm {
  padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .55);
  background: rgba(99, 102, 241, .35); color: #fff;
  font-size: .85rem; font-weight: 700; cursor: pointer;
}
.cfis-planlock-confirm:hover { background: rgba(99, 102, 241, .5); }
.cfis-planlock-edit {
  padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
  font-size: .78rem; font-weight: 600; cursor: pointer;
}

/* ─── Phase-4: Completion Toast ──────────────────────────────────── */
.cfis-completion-toast {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; align-items: center; gap: .65rem;
  padding: .7rem .9rem; border-radius: 12px;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(134, 239, 172, .5);
  color: #f1f5f9;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease;
  z-index: 99999;
  max-width: 360px;
}
.cfis-completion-toast--shown { opacity: 1; transform: translateY(0); }
.cfis-completion-icon {
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(134, 239, 172, .25); color: #86efac;
  border: 1px solid rgba(134, 239, 172, .5);
  font-size: 1rem; font-weight: 700;
  flex: 0 0 auto;
}
.cfis-completion-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.cfis-completion-headline { font-size: .92rem; font-weight: 700; color: #fff; }
.cfis-completion-sub { font-size: .78rem; color: rgba(225, 230, 245, .85); }

/* ─── Phase-4: Confidence chips ───────────────────────────────────── */
.cfis-nextmove-card-head { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; width: 100%; }
.cfis-nextmove-conf, .cfis-disputes-confidence {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
}
.cfis-nextmove-conf--high,    .cfis-disputes-confidence--high     { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-nextmove-conf--moderate,.cfis-disputes-confidence--moderate { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-nextmove-conf--low,     .cfis-disputes-confidence--low      { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-nextmove-explain {
  font-size: .76rem; color: rgba(225, 230, 245, .8);
  font-style: italic;
  margin-top: .15rem;
}
/* Phase 6.1: short priority reason line — same source string everywhere */
.cfis-nextmove-priority {
  margin-top: .4rem; font-size: .76rem; color: rgba(225, 230, 245, .82);
  padding: .35rem .55rem; border-radius: 8px;
  background: rgba(192, 132, 252, .08); border: 1px solid rgba(192, 132, 252, .22);
}
.cfis-nextmove-priority-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .62rem; margin-right: .35rem; color: #d8b4fe;
}
.cfis-sli-priority {
  margin-top: .35rem; font-size: .76rem; color: rgba(225, 230, 245, .82);
  padding: .3rem .5rem; border-radius: 7px;
  background: rgba(192, 132, 252, .08); border: 1px solid rgba(192, 132, 252, .22);
}
.cfis-sli-priority-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .62rem; margin-right: .3rem; color: #d8b4fe;
}
.cfis-letters-item-reason {
  font-size: .72rem; color: rgba(225, 230, 245, .7);
  margin-top: .15rem; font-style: italic;
}
.cfis-timeline-priority {
  margin-left: auto; font-size: .72rem; color: #d8b4fe;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(192, 132, 252, .08); border: 1px solid rgba(192, 132, 252, .22);
}
.cfis-sd-issue-reason {
  font-size: .76rem; color: rgba(225, 230, 245, .78);
  font-style: italic;
  padding: .25rem .5rem; border-radius: 6px;
  background: rgba(192, 132, 252, .06); border-left: 2px solid rgba(192, 132, 252, .35);
}
/* Phase 7.1+7.2 — Precision Attack Packet summary card. Calm accent
   (warm gold / amber) distinct from priority (purple) and strategy
   (cyan/teal), so the user reads "this is the full attack plan" without
   confusing it with per-target reasoning. */
.cfis-sd-pkt-summary {
  margin: .5rem 0 .25rem 0;
  padding: .55rem .7rem;
  border-radius: 8px;
  background: rgba(251, 191, 36, .07);
  border: 1px solid rgba(251, 191, 36, .25);
  display: flex; flex-direction: column; gap: .3rem;
}
.cfis-sd-pkt-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fbbf24;
}
.cfis-sd-pkt-stats {
  display: flex; flex-wrap: wrap; gap: .9rem;
  font-size: .76rem; color: rgba(225, 230, 245, .85);
}
.cfis-sd-pkt-stats strong { color: #fff; }
.cfis-sd-pkt-excluded { color: rgba(225, 230, 245, .55); }
.cfis-sd-pkt-safety {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-sd-pkt-safety--ok      { background: rgba(134, 239, 172, .12); color: #86efac; border-color: rgba(134, 239, 172, .3); }
.cfis-sd-pkt-safety--blocked { background: rgba(239, 68, 68, .14);  color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
/* Packet exec option uses the same row layout as the existing options. */
.cfis-sd-exec-option--pkt {
  background: rgba(251, 191, 36, .04);
  border: 1px solid rgba(251, 191, 36, .18);
}
/* Phase 7.3 — packet mode toggle (compact / expanded). */
.cfis-sd-pkt-modes {
  display: inline-flex; gap: .25rem; margin-top: .35rem;
  padding: .15rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-sd-pkt-mode {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  padding: .2rem .65rem; border-radius: 999px; cursor: pointer;
  background: transparent; border: none;
  color: rgba(225, 230, 245, .7);
}
.cfis-sd-pkt-mode--on {
  background: rgba(251, 191, 36, .18); color: #fbbf24;
}
.cfis-sd-pkt-mode:hover { color: rgba(225, 230, 245, .95); }
.cfis-sd-pkt-mode--on:hover { color: #fff; }
/* Phase 7.3 — pattern summary line below stats row. */
.cfis-sd-pkt-pattern {
  margin-top: .35rem; font-size: .76rem; color: rgba(225, 230, 245, .82);
  padding: .3rem .55rem; border-radius: 6px;
  background: rgba(94, 234, 212, .06); border-left: 2px solid rgba(94, 234, 212, .35);
}
/* Phase 7.3 — merged + large-packet pills. */
.cfis-sd-pkt-merged {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px;
  background: rgba(96, 165, 250, .12); color: #93c5fd; border: 1px solid rgba(96, 165, 250, .25);
}
.cfis-sd-pkt-large {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px;
  background: rgba(251, 191, 36, .14); color: #fbbf24; border: 1px solid rgba(251, 191, 36, .35);
}
/* Phase 7.4 — escalation level chip. Three intensity tiers; never shows
   numeric scores or formula inputs in the UI, just the level label. */
.cfis-sd-pkt-esc {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-sd-pkt-esc--low    { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sd-pkt-esc--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sd-pkt-esc--high   { background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }

/* ─── Phase 7.5 — Decision type badges ───────────────────────────────
   Six decision types, each with its own subtle accent. Used in three
   places: drilldown issue cards, Insights pills, Timeline pills. */
.cfis-sd-issue-decision,
.cfis-sli-dpill,
.cfis-timeline-decision-pill {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
}
.cfis-sd-issue-decision--verified,
.cfis-sli-dpill--verified,
.cfis-timeline-decision-pill--verified {
  background: rgba(96, 165, 250, .14); color: #93c5fd; border-color: rgba(96, 165, 250, .35);
}
.cfis-sd-issue-decision--corrected,
.cfis-sli-dpill--corrected,
.cfis-timeline-decision-pill--corrected {
  background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35);
}
.cfis-sd-issue-decision--removed,
.cfis-sli-dpill--removed,
.cfis-timeline-decision-pill--removed {
  background: rgba(52, 211, 153, .14); color: #6ee7b7; border-color: rgba(52, 211, 153, .35);
}
.cfis-sd-issue-decision--unchanged,
.cfis-sli-dpill--unchanged,
.cfis-timeline-decision-pill--unchanged {
  background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35);
}
.cfis-sd-issue-decision--no_response,
.cfis-sli-dpill--no_response,
.cfis-timeline-decision-pill--no_response {
  background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25);
}
.cfis-sd-issue-decision--updated_unresolved,
.cfis-sli-dpill--updated_unresolved,
.cfis-timeline-decision-pill--updated_unresolved {
  background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35);
}

/* Insights "Decisions on file" block layout. */
.cfis-sli-decisions {
  margin-top: .35rem;
  padding: .4rem .55rem;
  border-radius: 7px;
  background: rgba(94, 234, 212, .04);
  border: 1px solid rgba(94, 234, 212, .14);
  display: flex; flex-direction: column; gap: .35rem;
}
.cfis-sli-decisions-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cfis-sli-decisions-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .82);
}
.cfis-sli-decisions-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-sli-decisions-conf--high     { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sli-decisions-conf--medium   { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sli-decisions-conf--low      { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sli-decisions-pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.cfis-sli-decisions-sub   { font-size: .76rem; color: rgba(225, 230, 245, .72); }

/* Timeline decision row. */
.cfis-timeline-decisions {
  margin: .15rem 0 .5rem 0;
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
  padding: .3rem .55rem;
  border-radius: 7px;
  background: rgba(94, 234, 212, .04);
  border: 1px solid rgba(94, 234, 212, .14);
}
.cfis-timeline-decisions-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .72);
  margin-right: .3rem;
}

/* ─── Phase 7.6 — Observed Patterns block ────────────────────────────
   Calmer indigo/violet accent distinct from decisions (teal) and
   strategy (cyan). Used in Insights "Observed Patterns" + Timeline. */
.cfis-sli-patterns {
  margin-top: .35rem;
  padding: .4rem .55rem;
  border-radius: 7px;
  background: rgba(129, 140, 248, .04);
  border: 1px solid rgba(129, 140, 248, .18);
  display: flex; flex-direction: column; gap: .35rem;
}
.cfis-sli-patterns-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cfis-sli-patterns-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .82);
}
.cfis-sli-patterns-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-sli-patterns-conf--high     { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sli-patterns-conf--medium   { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sli-patterns-conf--low      { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sli-pat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.cfis-sli-pat-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .76rem; color: rgba(225, 230, 245, .82);
}
.cfis-sli-pat-tag {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .45rem; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(225, 230, 245, .85);
  min-width: 4.4rem; text-align: center;
}
.cfis-sli-pat-tag--creditor   { background: rgba(248, 113, 113, .12); color: #fca5a5; border-color: rgba(248, 113, 113, .3); }
.cfis-sli-pat-tag--bureau     { background: rgba(96, 165, 250, .12);  color: #93c5fd; border-color: rgba(96, 165, 250, .3); }
.cfis-sli-pat-tag--issue      { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3); }
.cfis-sli-pat-tag--escalation { background: rgba(94, 234, 212, .12);  color: #5eead4; border-color: rgba(94, 234, 212, .3); }
.cfis-sli-pat-text { flex: 1; }
.cfis-sli-pat-conf {
  font-size: .56rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .1rem .4rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  color: rgba(225, 230, 245, .8);
}
.cfis-sli-pat-conf--high   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sli-pat-conf--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sli-pat-conf--low    { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sli-pat-early {
  font-size: .72rem; color: rgba(225, 230, 245, .6); font-style: italic;
}

/* Timeline pattern row */
.cfis-timeline-patterns {
  margin: .15rem 0 .5rem 0;
  padding: .35rem .55rem;
  border-radius: 7px;
  background: rgba(129, 140, 248, .04);
  border: 1px solid rgba(129, 140, 248, .18);
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
}
.cfis-timeline-patterns-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .72);
}
.cfis-timeline-pattern-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .15rem; flex: 1;
}
.cfis-timeline-pattern-line { font-size: .76rem; color: rgba(225, 230, 245, .85); }
.cfis-timeline-patterns-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-timeline-patterns-conf--high   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-timeline-patterns-conf--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-timeline-patterns-conf--low    { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }

/* ─── Phase 7.7 — Strategy Mode block + timeline row ─────────────────
   Five modes, each with a subtle accent. Mode block sits in Insights,
   compact row sits in Timeline. Never exposes formulas — only label,
   reason, and confidence chip. */
.cfis-sli-stratmode {
  margin-top: .35rem;
  padding: .45rem .55rem;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  display: flex; flex-direction: column; gap: .25rem;
}
.cfis-sli-stratmode-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cfis-sli-stratmode-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .82);
}
.cfis-sli-stratmode-name {
  font-size: .82rem; font-weight: 700;
  color: #fff;
}
.cfis-sli-stratmode-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-sli-stratmode-conf--high   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sli-stratmode-conf--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sli-stratmode-conf--low    { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sli-stratmode-reason       { font-size: .76rem; color: rgba(225, 230, 245, .78); }

/* Mode-specific accents (very subtle — left border only). */
.cfis-sli-stratmode--cleanup        { border-left: 3px solid rgba(134, 239, 172, .55); }
.cfis-sli-stratmode--pressure       { border-left: 3px solid rgba(248, 113, 113, .55); }
.cfis-sli-stratmode--balanced       { border-left: 3px solid rgba(96, 165, 250, .55); }
.cfis-sli-stratmode--stall_recovery { border-left: 3px solid rgba(196, 181, 253, .55); }
.cfis-sli-stratmode--validation     { border-left: 3px solid rgba(148, 163, 184, .55); }

/* Timeline strategy mode row. */
.cfis-timeline-stratmode {
  margin: .15rem 0 .35rem 0;
  padding: .35rem .55rem;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .76rem;
  color: rgba(225, 230, 245, .82);
}
.cfis-timeline-stratmode-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .72);
}
.cfis-timeline-stratmode-name { font-weight: 700; color: #fff; }
.cfis-timeline-stratmode-reason { flex: 1; color: rgba(225, 230, 245, .72); }
.cfis-timeline-stratmode-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-timeline-stratmode-conf--high   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-timeline-stratmode-conf--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-timeline-stratmode-conf--low    { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-timeline-stratmode--cleanup        { border-left: 3px solid rgba(134, 239, 172, .55); }
.cfis-timeline-stratmode--pressure       { border-left: 3px solid rgba(248, 113, 113, .55); }
.cfis-timeline-stratmode--balanced       { border-left: 3px solid rgba(96, 165, 250, .55); }
.cfis-timeline-stratmode--stall_recovery { border-left: 3px solid rgba(196, 181, 253, .55); }
.cfis-timeline-stratmode--validation     { border-left: 3px solid rgba(148, 163, 184, .55); }

/* ─── Phase 8.0 — Funding Readiness panel ────────────────────────────
   Standalone Tier 1-style panel mounted near CfisFundingFit. Uses a
   warm amber accent distinct from prior phases. */
.cfis-funding {
  margin-top: .5rem;
  padding: .65rem .75rem;
  border-radius: 9px;
  background: rgba(251, 191, 36, .04);
  border: 1px solid rgba(251, 191, 36, .18);
  display: flex; flex-direction: column; gap: .35rem;
}
.cfis-funding-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
}
.cfis-funding-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fbbf24;
}
.cfis-funding-level {
  font-size: .76rem; font-weight: 700;
  padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-funding-level--not_ready  { background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }
.cfis-funding-level--improving  { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-funding-level--near_ready { background: rgba(96, 165, 250, .14);  color: #93c5fd; border-color: rgba(96, 165, 250, .35); }
.cfis-funding-level--ready      { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }

.cfis-funding-risklevel {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-funding-risklevel--low    { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-funding-risklevel--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-funding-risklevel--high   { background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }

.cfis-funding-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-funding-conf--high   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-funding-conf--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-funding-conf--low    { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }

.cfis-funding-bestie  { font-size: .82rem; color: #fff; font-weight: 600; }
.cfis-funding-reason  { font-size: .76rem; color: rgba(225, 230, 245, .78); }
.cfis-funding-empty   { font-size: .76rem; color: rgba(225, 230, 245, .6); padding: .25rem 0; }

.cfis-funding-timing {
  margin-top: .25rem;
  padding: .35rem .55rem;
  border-radius: 7px;
  font-size: .76rem; color: rgba(225, 230, 245, .82);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
}
.cfis-funding-timing--apply       { border-left: 3px solid rgba(134, 239, 172, .55); }
.cfis-funding-timing--wait        { border-left: 3px solid rgba(233, 207, 143, .55); }
.cfis-funding-timing--do-not-apply{ border-left: 3px solid rgba(248, 113, 113, .55); }
.cfis-funding-timing-label { text-transform: uppercase; letter-spacing: .08em; font-size: .62rem; font-weight: 700; color: rgba(225, 230, 245, .65); margin-right: .35rem; }

.cfis-funding-risks { display: flex; flex-wrap: wrap; gap: .3rem; }
.cfis-funding-risk {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-funding-risk--high_utilization { background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }
.cfis-funding-risk--negative_items   { background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }
.cfis-funding-risk--recent_inquiries { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-funding-risk--thin_file        { background: rgba(96, 165, 250, .14);  color: #93c5fd; border-color: rgba(96, 165, 250, .35); }
.cfis-funding-risk--unstable_profile { background: rgba(196, 181, 253, .14); color: #c4b5fd; border-color: rgba(196, 181, 253, .35); }

.cfis-funding-block {
  margin-top: .25rem;
  padding: .35rem .55rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-funding-block-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .72); margin-bottom: .2rem;
}
.cfis-funding-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.cfis-funding-blocker  { font-size: .76rem; color: #fca5a5; }
.cfis-funding-strength { font-size: .76rem; color: #86efac; }

.cfis-funding-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.cfis-funding-step  { display: flex; gap: .55rem; align-items: flex-start; }
.cfis-funding-step-num {
  flex-shrink: 0;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: rgba(251, 191, 36, .18); color: #fbbf24;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  border: 1px solid rgba(251, 191, 36, .35);
}
.cfis-funding-step-action { font-size: .82rem; font-weight: 600; color: #fff; }
.cfis-funding-step-reason { font-size: .72rem; color: rgba(225, 230, 245, .65); margin-top: .1rem; }

/* ─── Phase 8.B — UX hardening micro-copy ────────────────────────────
   Single-line clarifiers. Subtle accent so they read as helper text,
   not like new feature surfaces. */
.cfis-sd-pkt-closing {
  margin-top: .5rem;
  font-size: .76rem; font-weight: 600;
  color: rgba(225, 230, 245, .85);
}
.cfis-sd-pkt-optimizing {
  margin-top: .25rem;
  font-size: .72rem; font-style: italic;
  color: rgba(251, 191, 36, .75);
}
.cfis-funding-cta-row {
  margin-top: .5rem;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.cfis-funding-cta {
  font-size: .76rem; font-weight: 700;
  padding: .35rem .85rem;
  border-radius: 6px;
  background: rgba(134, 239, 172, .14); color: #86efac;
  border: 1px solid rgba(134, 239, 172, .35);
  cursor: pointer;
}
.cfis-funding-cta:hover {
  background: rgba(134, 239, 172, .22);
}
.cfis-funding-cta-note {
  font-size: .72rem; font-style: italic;
  color: rgba(225, 230, 245, .65);
}
.cfis-sli-optimizing {
  margin-top: .25rem;
  font-size: .72rem; font-style: italic;
  color: rgba(94, 234, 212, .75);
}
/* Phase 6.2: system-level strategy line — calmer accent (cyan/teal)
   than per-target priority (purple) so users distinguish "what's the
   plan" from "why this item". Subtle, single-line, no layout change. */
.cfis-nextmove-strategy {
  margin-top: .35rem; font-size: .76rem; color: rgba(225, 230, 245, .82);
  padding: .35rem .55rem; border-radius: 8px;
  background: rgba(94, 234, 212, .07); border: 1px solid rgba(94, 234, 212, .22);
}
.cfis-nextmove-strategy-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .62rem; margin-right: .35rem; color: #5eead4;
}
.cfis-sli-strategy {
  margin-top: .35rem; font-size: .76rem; color: rgba(225, 230, 245, .82);
  padding: .3rem .5rem; border-radius: 7px;
  background: rgba(94, 234, 212, .07); border: 1px solid rgba(94, 234, 212, .22);
}
.cfis-sli-strategy-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .62rem; margin-right: .3rem; color: #5eead4;
}
.cfis-timeline-strategy {
  margin: .15rem 0 .5rem 0; font-size: .76rem; color: rgba(225, 230, 245, .82);
  padding: .3rem .55rem; border-radius: 7px;
  background: rgba(94, 234, 212, .07); border: 1px solid rgba(94, 234, 212, .22);
}
.cfis-timeline-strategy-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .62rem; margin-right: .35rem; color: #5eead4;
}

/* Reason chips per dispute target */
.cfis-disputes-reason {
  font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(99, 102, 241, .12); color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, .3);
}
.cfis-disputes-reason--negative-impact   { background: rgba(252, 165, 165, .12); color: #fca5a5; border-color: rgba(252, 165, 165, .35); }
.cfis-disputes-reason--inconsistency     { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3);  }
.cfis-disputes-reason--reporting-review  { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3);  }

/* Phase-4: Batch confirmation row in dispute picker */
.cfis-disputes-batch {
  margin-top: .25rem; padding: .65rem .8rem; border-radius: 10px;
  background: rgba(99, 102, 241, .07);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .45rem;
}
.cfis-disputes-batch-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-disputes-batch-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-disputes-batch-trust {
  font-size: .82rem; color: #fff;
}
.cfis-disputes-batch-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.cfis-disputes-btn--done {
  background: rgba(134, 239, 172, .18) !important;
  color: #86efac !important;
  border-color: rgba(134, 239, 172, .4) !important;
}

/* ─── SINE Phase 2 ───────────────────────────────────────────────── */
.cfis-sine {
  padding: .9rem 1rem; border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(15, 23, 42, .55));
  border: 1px solid rgba(99, 102, 241, .3);
  display: flex; flex-direction: column; gap: .65rem;
}
.cfis-sine[hidden] { display: none; }
.cfis-sine-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-sine-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-sine-bestie { font-size: .85rem; color: #fff; line-height: 1.5; font-style: italic; }

/* Summary strip */
.cfis-sine-summary {
  display: flex; flex-wrap: wrap; gap: .55rem;
  padding: .5rem .65rem; border-radius: 10px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-sine-summary-stat {
  font-size: .78rem; color: rgba(225, 230, 245, .85);
  padding-right: .55rem;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.cfis-sine-summary-stat:last-of-type { border-right: 0; }
.cfis-sine-summary-stat strong { color: #fff; font-weight: 700; }
.cfis-sine-summary-impact {
  margin-left: auto;
  font-size: .78rem; padding: .2rem .65rem; border-radius: 999px;
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .25);
}
.cfis-sine-summary-impact strong { color: inherit; font-weight: 800; letter-spacing: .04em; }
.cfis-sine-impact--low      { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sine-impact--medium   { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sine-impact--high     { background: rgba(251, 146, 60, .14);  color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-sine-impact--critical { background: rgba(239, 68, 68, .14);   color: #fca5a5; border-color: rgba(239, 68, 68, .4); }

/* Dot nav */
.cfis-sine-nav {
  display: flex; gap: .35rem; flex-wrap: wrap; align-items: center;
  padding: .25rem;
}
.cfis-sine-navbtn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .55rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(225, 230, 245, .85);
  font-size: .76rem; font-weight: 700; cursor: pointer;
}
.cfis-sine-navbtn:hover { background: rgba(255, 255, 255, .1); }
.cfis-sine-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(148, 163, 184, .5);
  flex: 0 0 10px;
}
.cfis-sine-dot--green  { background: #86efac; box-shadow: 0 0 8px rgba(134, 239, 172, .55); }
.cfis-sine-dot--yellow { background: #fde68a; box-shadow: 0 0 8px rgba(253, 230, 138, .5); }
.cfis-sine-dot--orange { background: #fb923c; box-shadow: 0 0 8px rgba(251, 146, 60, .55); }
.cfis-sine-dot--red    { background: #fca5a5; box-shadow: 0 0 8px rgba(252, 165, 165, .55); }
.cfis-sine-dot--purple { background: #c4b5fd; box-shadow: 0 0 8px rgba(196, 181, 253, .55); }
.cfis-sine-navnum { letter-spacing: .04em; }

/* Section cards */
.cfis-sine-cards { display: flex; flex-direction: column; gap: .4rem; }
.cfis-sine-card {
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .4rem;
}
.cfis-sine-card--critical        { border-color: rgba(239, 68, 68, .4);  background: rgba(239, 68, 68, .05); }
.cfis-sine-card--needs_action    { border-color: rgba(251, 146, 60, .35); background: rgba(251, 146, 60, .05); }
.cfis-sine-card--reporting_review{ border-color: rgba(196, 181, 253, .35); background: rgba(196, 181, 253, .05); }
.cfis-sine-card--watch           { border-color: rgba(253, 230, 138, .3);  background: rgba(253, 230, 138, .04); }
.cfis-sine-card--clean           { opacity: .9; }
.cfis-sine-card--flash {
  animation: cfisSineFlash 1.1s ease;
}
@keyframes cfisSineFlash {
  0%  { box-shadow: 0 0 0 0 rgba(99, 102, 241, .55); transform: scale(1); }
  40% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); transform: scale(1.01); }
  100%{ box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); transform: scale(1); }
}
.cfis-sine-card-head {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
}
.cfis-sine-num {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 999px;
  background: rgba(99, 102, 241, .14); color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, .35);
}
.cfis-sine-label { font-size: .98rem; font-weight: 700; color: #fff; flex: 1; }
.cfis-sine-status {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .15rem .6rem; border-radius: 999px;
}
.cfis-sine-status--clean            { background: rgba(134, 239, 172, .14); color: #86efac; border: 1px solid rgba(134, 239, 172, .35); }
.cfis-sine-status--watch            { background: rgba(253, 230, 138, .12); color: #fde68a; border: 1px solid rgba(253, 230, 138, .3); }
.cfis-sine-status--needs_action     { background: rgba(251, 146, 60, .14);  color: #fb923c; border: 1px solid rgba(251, 146, 60, .35); }
.cfis-sine-status--critical         { background: rgba(239, 68, 68, .14);   color: #fca5a5; border: 1px solid rgba(239, 68, 68, .4); }
.cfis-sine-status--reporting_review { background: rgba(196, 181, 253, .14); color: #c4b5fd; border: 1px solid rgba(196, 181, 253, .35); }
.cfis-sine-card-body { display: flex; flex-direction: column; gap: .25rem; }
.cfis-sine-card-row { display: flex; gap: .55rem; align-items: baseline; font-size: .78rem; }
.cfis-sine-meta-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55); width: 8rem;
}
.cfis-sine-meta-val {
  font-size: .78rem; font-weight: 700;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .9);
  border: 1px solid rgba(255, 255, 255, .12);
  text-transform: capitalize;
}
.cfis-sine-meta-val--low      { background: rgba(134, 239, 172, .12); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sine-meta-val--moderate { background: rgba(253, 230, 138, .12); color: #fde68a; border-color: rgba(253, 230, 138, .3); }
.cfis-sine-meta-val--high     { background: rgba(251, 146, 60, .12);  color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-sine-meta-val--critical { background: rgba(239, 68, 68, .12);   color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
.cfis-sine-card-reason { font-size: .85rem; line-height: 1.45; color: rgba(225, 230, 245, .9); }
.cfis-sine-card-action {
  font-size: .85rem; line-height: 1.45; color: #fff;
  padding: .45rem .6rem; border-radius: 8px;
  background: rgba(99, 102, 241, .1);
  border: 1px solid rgba(99, 102, 241, .25);
}
.cfis-sine-card-action-label {
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  font-size: .68rem; color: #c7d2fe; margin-right: .3rem;
}
.cfis-sine-card { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.cfis-sine-card:hover, .cfis-sine-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .15);
  outline: 0;
}
.cfis-sine-card-cta {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #a5b4fc;
  align-self: flex-end;
}

/* ─── SINE Phase 3 — Drilldown ─────────────────────────────────────── */
.cfis-sd-modal { z-index: 10000; }
.cfis-sd-dialog {
  width: min(820px, 96vw); max-height: 92vh; overflow: auto;
  background: #0f172a; color: #e2e8f0;
  border: 1px solid rgba(99, 102, 241, .35);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
  display: flex; flex-direction: column; gap: .7rem;
}
.cfis-sd-head-titles { display: flex; gap: .5rem; align-items: baseline; }
.cfis-sd-head-num {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 999px;
  background: rgba(99, 102, 241, .14); color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, .35);
}
.cfis-sd-head-title { font-size: 1.1rem; font-weight: 800; color: #fff; }
.cfis-sd-bestie {
  font-size: .9rem; color: #fff; line-height: 1.5; font-style: italic;
  padding: .55rem .7rem; border-radius: 10px;
  background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .25);
}
.cfis-sd-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .35rem;
}
.cfis-sd-meta-grid > div {
  padding: .45rem .6rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .15rem;
}
.cfis-sd-meta-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-sd-reason { font-size: .9rem; line-height: 1.5; color: rgba(225, 230, 245, .9); }
.cfis-sd-action {
  font-size: .85rem; line-height: 1.45; color: #fff;
  padding: .5rem .65rem; border-radius: 8px;
  background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .25);
}
.cfis-sd-action-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c7d2fe; margin-right: .3rem;
}

/* Section data tables */
.cfis-sd-section { display: flex; flex-direction: column; gap: .35rem; }
.cfis-sd-section h4 { margin: 0; font-size: .82rem; font-weight: 700; color: #c7d2fe; letter-spacing: .04em; }
.cfis-sd-table {
  width: 100%; border-collapse: collapse;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px;
  overflow: hidden;
  font-size: .82rem;
}
.cfis-sd-table th, .cfis-sd-table td {
  padding: .45rem .6rem; text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  vertical-align: top;
  color: rgba(245, 240, 230, .9);
}
.cfis-sd-table th {
  background: rgba(255, 255, 255, .04);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .7);
}
.cfis-sd-rowhead { font-weight: 700; color: #fff !important; }
.cfis-sd-mismatch {
  background: rgba(147, 197, 253, .14); color: #93c5fd;
  border-left: 3px solid #93c5fd; padding: 1px 4px; border-radius: 3px;
}
.cfis-sd-missing { color: rgba(225, 230, 245, .55); font-style: italic; }
.cfis-sd-legend { font-size: .72rem; color: rgba(225, 230, 245, .65); }
.cfis-sd-empty {
  padding: .65rem .75rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03); border: 1px dashed rgba(255, 255, 255, .12);
  font-size: .82rem; color: rgba(225, 230, 245, .8);
}
.cfis-sd-sev {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .12rem .55rem; border-radius: 999px;
}
.cfis-sd-sev--high     { background: rgba(239, 68, 68, .14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .4); }
.cfis-sd-sev--moderate { background: rgba(251, 146, 60, .14); color: #fb923c; border: 1px solid rgba(251, 146, 60, .35); }

.cfis-sd-linkbtn {
  background: transparent; border: 0; padding: 0;
  font-size: .76rem; font-weight: 600; color: #a5b4fc; cursor: pointer;
  text-decoration: underline;
}
.cfis-sd-linkbtn:hover { color: #c7d2fe; }
.cfis-sd-raw {
  margin: 0;
  padding: .55rem .7rem; border-radius: 8px;
  background: rgba(15, 23, 42, .9); color: rgba(225, 230, 245, .85);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .72rem; line-height: 1.45;
  max-height: 240px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, monospace;
  white-space: pre-wrap; word-break: break-word;
}

/* Issue cards */
.cfis-sd-issues { display: flex; flex-direction: column; gap: .4rem; }
.cfis-sd-issues h4 { margin: 0; font-size: .82rem; font-weight: 700; color: #c7d2fe; letter-spacing: .04em; }
.cfis-sd-issue {
  padding: .55rem .7rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .4rem;
}
.cfis-sd-issue--off { opacity: .55; filter: saturate(.6); }
/* Phase 6: top-impact accent — subtle ring + chip, no layout change. */
.cfis-sd-issue--top {
  border-color: rgba(192, 132, 252, .45);
  box-shadow: 0 0 0 1px rgba(192, 132, 252, .25), 0 4px 14px -8px rgba(192, 132, 252, .35);
}
.cfis-sd-issue-top {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(192, 132, 252, .14); color: #d8b4fe; border: 1px solid rgba(192, 132, 252, .35);
}
.cfis-sd-issue-head { display: flex; gap: .55rem; align-items: flex-start; flex-wrap: wrap; }
.cfis-sd-issue-toggle {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  font-size: .72rem;
}
.cfis-sd-issue-toggle-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(225, 230, 245, .7);
}
.cfis-sd-issue-titleblock { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 50%; }
.cfis-sd-issue-title { font-size: .9rem; font-weight: 700; color: #fff; }
.cfis-sd-issue-meta { display: flex; gap: .65rem; flex-wrap: wrap; font-size: .76rem; color: rgba(225, 230, 245, .82); }
.cfis-sd-issue-flag {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
}
.cfis-sd-issue-flag--red    { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.cfis-sd-issue-flag--orange { background: rgba(251, 146, 60, .14); color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-sd-issue-flag--blue   { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3); }
.cfis-sd-issue-flag--purple { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3); }
.cfis-sd-issue-conf {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
}
.cfis-sd-issue-conf--high     { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sd-issue-conf--moderate { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sd-issue-conf--low      { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sd-issue-evidence {
  font-size: .72rem; color: rgba(225, 230, 245, .65);
}
.cfis-sd-issue-evidence code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: rgba(255, 255, 255, .06);
  padding: .05rem .3rem; border-radius: 3px;
}

/* Agency routing */
.cfis-sd-routing {
  display: flex; flex-direction: column; gap: .35rem;
  padding: .5rem .6rem; border-radius: 8px;
  background: rgba(15, 23, 42, .55); border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-sd-routing-label, .cfis-sd-routing-sublabel {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-sd-agencies { display: flex; flex-wrap: wrap; gap: .25rem; }
.cfis-sd-agency {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .5rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: .72rem; cursor: pointer;
  color: rgba(225, 230, 245, .8);
}
.cfis-sd-agency--checked {
  background: rgba(99, 102, 241, .25); color: #fff;
  border-color: rgba(99, 102, 241, .5);
}
.cfis-sd-agency--extended { opacity: .85; }
.cfis-sd-agency input { margin: 0; }
.cfis-sd-agency-short {
  font-weight: 700; letter-spacing: .04em;
}
.cfis-sd-agency-name {
  font-size: .68rem; opacity: .85;
}

/* Execution panel */
.cfis-sd-exec {
  display: flex; flex-direction: column; gap: .55rem;
  padding: .65rem .8rem; border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(15, 23, 42, .55));
  border: 1px solid rgba(99, 102, 241, .35);
}
.cfis-sd-exec h4 { margin: 0; font-size: .82rem; font-weight: 700; color: #c7d2fe; letter-spacing: .04em; }
.cfis-sd-exec-options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem;
}
.cfis-sd-exec-option {
  padding: .55rem .65rem; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-direction: column; gap: .35rem;
}
.cfis-sd-exec-option-title { font-size: .9rem; font-weight: 700; color: #fff; }
.cfis-sd-exec-option-help { font-size: .76rem; color: rgba(225, 230, 245, .75); line-height: 1.4; }
.cfis-sd-exec-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.cfis-sd-btn {
  padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .05); color: #fff;
  font-size: .8rem; font-weight: 700; cursor: pointer;
}
.cfis-sd-btn:hover { background: rgba(255, 255, 255, .1); }
.cfis-sd-btn--primary {
  background: rgba(99, 102, 241, .35); color: #fff;
  border-color: rgba(99, 102, 241, .55);
}
.cfis-sd-btn--primary:hover { background: rgba(99, 102, 241, .5); }
.cfis-sd-exec-stat { font-size: .76rem; color: rgba(225, 230, 245, .75); }
.cfis-sd-exec-stat strong { color: #fff; font-weight: 700; }

/* Execution history */
.cfis-sd-history {
  display: flex; flex-direction: column; gap: .35rem;
  padding: .6rem .75rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-sd-history h4 { margin: 0; font-size: .82rem; font-weight: 700; color: #c7d2fe; letter-spacing: .04em; }
.cfis-sd-history-empty { font-size: .82rem; color: rgba(225, 230, 245, .7); padding: .35rem 0; }
.cfis-sd-history-table { font-size: .76rem; }
.cfis-sd-history-status {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .25);
}
.cfis-sd-history-status--queued     { background: rgba(99, 102, 241, .14); color: #c7d2fe; border-color: rgba(99, 102, 241, .35); }
.cfis-sd-history-status--downloaded { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sd-history-status--printed    { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sd-history-status--reopened   { background: rgba(251, 146, 60, .14);  color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-sd-history-status--sent       { background: rgba(134, 239, 172, .25); color: #86efac; border-color: rgba(134, 239, 172, .55); }
.cfis-sd-history-actions { display: flex; gap: .55rem; flex-wrap: wrap; }

/* ─── SINE Phase 4 — cadence + escalation banner ───────────────── */
.cfis-sd-cadence {
  padding: .55rem .7rem; border-radius: 10px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .25rem;
}
.cfis-sd-cadence--ready {
  background: rgba(134, 239, 172, .1);
  border-color: rgba(134, 239, 172, .45);
}
.cfis-sd-cadence--waiting {
  background: rgba(233, 207, 143, .08);
  border-color: rgba(233, 207, 143, .35);
}
.cfis-sd-cadence-row { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; }
.cfis-sd-cadence-line { font-size: .9rem; color: #fff; }
.cfis-sd-cadence-meta { font-size: .72rem; color: rgba(225, 230, 245, .65); margin-left: auto; letter-spacing: .04em; }
.cfis-sd-cadence-bestie { font-size: .82rem; color: rgba(225, 230, 245, .85); font-style: italic; }
.cfis-sd-cadence-esc {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(199, 210, 254, .85);
}

/* ─── SINE Phase 4 — issue-state chip on issue cards ─────────────── */
.cfis-sd-issue-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
}
.cfis-sd-issue-state--unchanged { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-sd-issue-state--changed   { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sd-issue-state--resolved  { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sd-issue-state--new       { background: rgba(196, 181, 253, .14); color: #c4b5fd; border-color: rgba(196, 181, 253, .35); }

/* ─── SINE Phase 4 — summary cadence chip (Phase 2 strip) ───────── */
.cfis-sine-cad-chip {
  margin-left: auto;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .2rem .65rem; border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .35);
  background: rgba(99, 102, 241, .14); color: #c7d2fe;
}
.cfis-sine-cad-chip--ready   { background: rgba(134, 239, 172, .18); color: #86efac; border-color: rgba(134, 239, 172, .45); }
.cfis-sine-cad-chip--waiting { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }

/* ─── SINE Phase 5 — Learning Insights panel ──────────────────── */
.cfis-sli {
  padding: .85rem 1rem; border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(134, 239, 172, .04));
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .45rem;
}
.cfis-sli[hidden] { display: none; }
.cfis-sli-head { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; flex-wrap: wrap; }
.cfis-sli-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-sli-conf {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 999px;
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .25);
}
.cfis-sli-conf--medium { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sli-conf--high   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sli-primary { font-size: .98rem; font-weight: 700; color: #fff; }
.cfis-sli-sub     { font-size: .82rem; color: rgba(225, 230, 245, .85); line-height: 1.45; }
.cfis-sli-pills   { display: flex; gap: .35rem; flex-wrap: wrap; }
.cfis-sli-pill {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .2rem .6rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .85);
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-sli-pill--removed    { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sli-pill--updated    { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sli-pill--unchanged  { background: rgba(251, 146, 60, .14);  color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-sli-pill--noresponse { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3); }
.cfis-sli-pill--new        { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3); }
.cfis-sli-tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.cfis-sli-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .12rem .55rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(225, 230, 245, .8);
}
.cfis-sli-tag--win      { background: rgba(134, 239, 172, .12); color: #86efac; border-color: rgba(134, 239, 172, .3); }
.cfis-sli-tag--stubborn { background: rgba(251, 146, 60, .12);  color: #fb923c; border-color: rgba(251, 146, 60, .3); }
.cfis-sli-tag--repeat   { background: rgba(252, 165, 165, .12); color: #fca5a5; border-color: rgba(252, 165, 165, .3); }
.cfis-sli-bestie {
  font-size: .82rem; color: rgba(225, 230, 245, .85); font-style: italic;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  padding-top: .35rem;
}

/* ─── SINE Phase 5 — Outcome capture row in issue cards ─────────── */
.cfis-sd-outcome-row {
  display: flex; gap: .25rem; flex-wrap: wrap; align-items: center;
  padding: .35rem .5rem;
  border-top: 1px dashed rgba(255, 255, 255, .08);
}
.cfis-sd-outcome-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55); margin-right: .25rem;
}
.cfis-sd-outcome-btn {
  padding: .25rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04); color: rgba(225, 230, 245, .8);
  font-size: .68rem; font-weight: 700; cursor: pointer;
  letter-spacing: .04em;
}
.cfis-sd-outcome-btn:hover { background: rgba(255, 255, 255, .1); }
.cfis-sd-outcome-btn--active                       { background: rgba(99, 102, 241, .3);  color: #fff; border-color: rgba(99, 102, 241, .55); }
.cfis-sd-outcome-btn--removed.cfis-sd-outcome-btn--active            { background: rgba(134, 239, 172, .25); color: #86efac; border-color: rgba(134, 239, 172, .5); }
.cfis-sd-outcome-btn--updated.cfis-sd-outcome-btn--active            { background: rgba(233, 207, 143, .25); color: #e9cf8f; border-color: rgba(233, 207, 143, .5); }
.cfis-sd-outcome-btn--verified_unchanged.cfis-sd-outcome-btn--active { background: rgba(251, 146, 60, .25);  color: #fb923c; border-color: rgba(251, 146, 60, .5); }
.cfis-sd-outcome-btn--no_response.cfis-sd-outcome-btn--active        { background: rgba(147, 197, 253, .22); color: #93c5fd; border-color: rgba(147, 197, 253, .45); }
.cfis-sd-outcome-btn--new_issue.cfis-sd-outcome-btn--active          { background: rgba(196, 181, 253, .22); color: #c4b5fd; border-color: rgba(196, 181, 253, .45); }
.cfis-sd-outcome-btn--pending.cfis-sd-outcome-btn--active            { background: rgba(148, 163, 184, .22); color: #cbd5e1; border-color: rgba(148, 163, 184, .4); }
.cfis-sd-outcome-last {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .85);
}
.cfis-sd-outcome-last--removed            { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-sd-outcome-last--updated            { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-sd-outcome-last--verified_unchanged { background: rgba(251, 146, 60, .14);  color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-sd-outcome-last--no_response        { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3); }
.cfis-sd-outcome-last--new_issue          { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3); }
.cfis-sd-outcome-last--pending            { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }

/* Personal Credit Profile panel */
.cfis-personal-profile {
  padding: .85rem 1rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .5rem;
}
.cfis-personal-profile-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-personal-profile-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-personal-profile-note {
  font-size: .76rem; color: rgba(225, 230, 245, .68); line-height: 1.45;
}
.cfis-personal-profile-rows {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .45rem;
}
.cfis-personal-profile-row {
  padding: .55rem .7rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .2rem;
}
.cfis-personal-profile-row--empty { opacity: .65; }
.cfis-personal-profile-row-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-personal-profile-row-value {
  display: flex; align-items: baseline; gap: .45rem;
  font-size: 1rem; font-weight: 700; color: #fff;
  flex-wrap: wrap;
}
.cfis-personal-profile-row-tag {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(134, 239, 172, .12); color: #86efac;
  border: 1px solid rgba(134, 239, 172, .3);
}
.cfis-personal-profile-row-tag--empty {
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border-color: rgba(148, 163, 184, .25);
}
.cfis-personal-profile-row-meta {
  font-size: .72rem; color: rgba(225, 230, 245, .6);
}
.cfis-personal-profile-empty {
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .15);
  font-size: .82rem; color: rgba(225, 230, 245, .8);
}

/* Business Credit Profile panel */
.cfis-business-profile {
  padding: .85rem 1rem; border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(99, 102, 241, .25);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-business-profile-head { display: flex; flex-direction: column; gap: .15rem; }
.cfis-business-profile-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-business-profile-note {
  font-size: .76rem; color: rgba(225, 230, 245, .68); line-height: 1.45;
}
.cfis-business-profile-group { display: flex; flex-direction: column; gap: .35rem; }
.cfis-business-profile-group-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-business-profile-rows {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .4rem;
}
.cfis-business-profile-row {
  padding: .5rem .65rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .2rem;
}
.cfis-business-profile-row--empty { opacity: .65; }
.cfis-business-profile-row-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .6);
}
.cfis-business-profile-row-value {
  display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap;
  font-size: .92rem; font-weight: 700; color: #fff;
}
.cfis-business-profile-row-tag {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(134, 239, 172, .12); color: #86efac;
  border: 1px solid rgba(134, 239, 172, .3);
}
.cfis-business-profile-row-tag--empty {
  background: rgba(148, 163, 184, .14); color: #cbd5e1;
  border-color: rgba(148, 163, 184, .25);
}

/* Read-only confirm rows (intake review) */
.cfis-intake-confirm-row--readonly { grid-template-columns: 1fr 1fr; }
.cfis-intake-confirm-readonly {
  display: inline-flex; align-items: baseline; gap: .45rem; flex-wrap: wrap;
  font-size: .9rem; font-weight: 700; color: #fff;
}
.cfis-intake-confirm-readonly-tag {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  background: rgba(134, 239, 172, .12); color: #86efac;
  border: 1px solid rgba(134, 239, 172, .3);
}

/* CFIS Sections — collapsible Credit & Funding workspace */
.cfis-sections-root {
  display: flex; flex-direction: column; gap: .65rem;
}
.cfis-section {
  border-radius: 14px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
}
.cfis-section--always { background: rgba(99, 102, 241, .07); border-color: rgba(99, 102, 241, .3); }
.cfis-section--open  { border-color: rgba(99, 102, 241, .35); }
.cfis-section-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: .65rem; padding: .85rem 1rem;
  background: transparent; color: #fff; border: 0; cursor: pointer;
  text-align: left;
}
.cfis-section--always .cfis-section-head { cursor: default; }
.cfis-section-titles { display: flex; flex-direction: column; gap: .15rem; }
.cfis-section-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(225, 230, 245, .6);
}
.cfis-section-title { font-size: 1rem; font-weight: 700; color: #fff; }
.cfis-section-meta { display: inline-flex; align-items: center; gap: .55rem; }
.cfis-section-count {
  font-size: .7rem; color: rgba(225, 230, 245, .55); letter-spacing: .04em;
}
.cfis-section-chev {
  font-size: 1rem; color: rgba(225, 230, 245, .65);
  transition: transform .18s ease;
}
.cfis-section[aria-expanded="false"] .cfis-section-chev,
.cfis-section .cfis-section-head[aria-expanded="false"] .cfis-section-chev { transform: rotate(-90deg); }
.cfis-section-body {
  padding: .25rem 1rem 1rem; display: flex; flex-direction: column; gap: .55rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.cfis-section-body[hidden] { display: none; }

/* CFIS Dispute Workspace */
.cfis-disputes {
  margin: 0; padding: .8rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(99, 102, 241, .25);
}
.cfis-disputes-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.cfis-disputes-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe; margin-bottom: .25rem;
}
.cfis-disputes-help {
  font-size: .82rem; line-height: 1.5; color: rgba(225, 230, 245, .85);
}
.cfis-disputes-empty {
  font-size: .82rem; line-height: 1.5; color: rgba(225, 230, 245, .7);
  padding: .8rem .9rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .12);
}
.cfis-disputes-btn {
  padding: .55rem 1rem; border-radius: 999px; border: 1px solid transparent;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  background: rgba(255, 255, 255, .05); color: #fff;
  border-color: rgba(255, 255, 255, .12);
}
.cfis-disputes-btn--primary {
  background: rgba(99, 102, 241, .25); color: #c7d2fe;
  border-color: rgba(99, 102, 241, .45);
}
.cfis-disputes-btn--primary:hover { background: rgba(99, 102, 241, .35); }
.cfis-disputes-btn--ghost:hover   { background: rgba(255, 255, 255, .1); }
.cfis-disputes-btn[disabled] { opacity: .5; cursor: not-allowed; }

.cfis-disputes-dialog { max-height: 88vh; overflow: auto; }
.cfis-disputes-targets {
  display: flex; flex-direction: column; gap: .5rem;
}
.cfis-disputes-target {
  display: flex; gap: .55rem; align-items: flex-start;
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer;
}
.cfis-disputes-target--checked { background: rgba(99, 102, 241, .08); border-color: rgba(99, 102, 241, .35); }
.cfis-disputes-check { margin-top: .25rem; flex: 0 0 auto; }
.cfis-disputes-target-body { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.cfis-disputes-target-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cfis-disputes-target-issue { font-size: .92rem; font-weight: 700; color: #fff; }
.cfis-disputes-flag {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .85);
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-disputes-flag--red    { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.cfis-disputes-flag--orange { background: rgba(251, 146, 60, .14); color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-disputes-flag--blue   { background: rgba(147, 197, 253, .12); color: #93c5fd; border-color: rgba(147, 197, 253, .3); }
.cfis-disputes-flag--purple { background: rgba(196, 181, 253, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3); }
.cfis-disputes-rec {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(134, 239, 172, .14); color: #86efac; border: 1px solid rgba(134, 239, 172, .35);
}
.cfis-disputes-target-meta { display: flex; gap: .85rem; flex-wrap: wrap; font-size: .78rem; color: rgba(225, 230, 245, .82); }
.cfis-disputes-target-explain { font-size: .82rem; line-height: 1.45; color: rgba(225, 230, 245, .82); }
.cfis-disputes-target-evidence {
  font-size: .72rem; color: rgba(225, 230, 245, .6);
}
.cfis-disputes-target-evidence code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: rgba(255, 255, 255, .06);
  padding: .05rem .3rem; border-radius: 3px;
}
.cfis-disputes-target-recipient {
  display: flex; gap: .45rem; align-items: center;
}
.cfis-disputes-target-recipient label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .6);
}
.cfis-disputes-target-recipient select {
  background: rgba(15, 23, 42, .8); color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px;
  padding: .35rem .5rem; font: inherit; font-size: .82rem;
  flex: 1;
}
.cfis-disputes-actions {
  display: flex; justify-content: flex-end; gap: .45rem;
  align-items: center; flex-wrap: wrap;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  padding-top: .55rem; margin-top: .35rem;
}
.cfis-disputes-pickcount {
  margin-right: auto;
  font-size: .78rem; font-weight: 600; color: rgba(225, 230, 245, .82);
}

.cfis-disputes-draft {
  padding: .75rem .85rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .35rem;
}
.cfis-disputes-draft-head { display: flex; justify-content: space-between; gap: .55rem; }
.cfis-disputes-draft-num {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-disputes-draft-recipient { font-size: .78rem; color: rgba(225, 230, 245, .85); font-weight: 600; }
.cfis-disputes-draft-subject { font-size: .85rem; color: #fff; }
.cfis-disputes-draft-body {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: rgba(15, 23, 42, .8);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: .55rem .65rem;
  font-size: .78rem; line-height: 1.55;
  color: rgba(245, 240, 230, .9);
  white-space: pre-wrap;
  margin: 0;
  max-height: 280px; overflow: auto;
}
.cfis-disputes-draft-meta {
  font-size: .68rem; color: rgba(225, 230, 245, .55);
  letter-spacing: .04em;
}
.cfis-intake-evidence {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: rgba(255, 255, 255, .06);
  padding: .05rem .3rem; border-radius: 3px;
  font-size: .72rem; color: rgba(225, 230, 245, .8);
}

/* CFIS Credit Intelligence (CIAE) panel */
.cfis-ci {
  margin: .65rem 0 0;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .65);
  border: 1px solid rgba(148, 163, 184, .25);
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-ci[hidden] { display: none; }
.cfis-ci-band--high   { border-color: rgba(134, 239, 172, .35); }
.cfis-ci-band--medium { border-color: rgba(233, 207, 143, .35); }
.cfis-ci-band--low    { opacity: .92; }

.cfis-ci-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cfis-ci-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-ci-band {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .22rem .6rem; border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .28);
}
.cfis-ci-band--high   .cfis-ci-band { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-ci-band--medium .cfis-ci-band { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }

.cfis-ci-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.cfis-ci-pill {
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: .22rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: rgba(225, 230, 245, .85);
}
.cfis-ci-pill--green  { background: rgba(134, 239, 172, .12); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-ci-pill--amber  { background: rgba(233, 207, 143, .12); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-ci-pill--orange { background: rgba(251, 146, 60,  .14); color: #fb923c; border-color: rgba(251, 146, 60, .35); }
.cfis-ci-pill--red    { background: rgba(239, 68, 68,   .12); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.cfis-ci-pill--ghost  { background: rgba(148, 163, 184, .12); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }

.cfis-ci-priorities-wrap { display: flex; flex-direction: column; gap: .35rem; }
.cfis-ci-priorities-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-ci-priorities { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.cfis-ci-priority {
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .25rem;
}
.cfis-ci-priority-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cfis-ci-priority-rank {
  flex: 0 0 1.4rem; height: 1.4rem; width: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(99, 102, 241, .18); color: #c7d2fe;
  font-size: .78rem; font-weight: 700;
  border: 1px solid rgba(99, 102, 241, .35);
}
.cfis-ci-priority-title { font-size: .9rem; font-weight: 700; color: #fff; }
.cfis-ci-priority-when {
  display: inline-flex;
  font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .75);
  border: 1px solid rgba(255, 255, 255, .12);
  margin-left: auto;
}
.cfis-ci-priority-when--now  { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.cfis-ci-priority-when--30d  { background: rgba(233, 207, 143, .12); color: #e9cf8f; border-color: rgba(233, 207, 143, .3); }
.cfis-ci-priority-when--60d  { background: rgba(99, 102, 241, .14);  color: #a5b4fc; border-color: rgba(99, 102, 241, .35); }
.cfis-ci-priority-why { font-size: .82rem; line-height: 1.45; color: rgba(225, 230, 245, .82); }
.cfis-ci-priority-action { font-size: .82rem; line-height: 1.45; color: rgba(245, 240, 230, .92); }

.cfis-ci-strengths {
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(134, 239, 172, .06);
  border: 1px solid rgba(134, 239, 172, .25);
}
.cfis-ci-strengths-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #86efac; margin-bottom: .2rem;
}
.cfis-ci-strengths ul { list-style: disc; padding-left: 1.1rem; margin: 0; }
.cfis-ci-strengths li { font-size: .82rem; color: rgba(245, 240, 230, .92); }

.cfis-ci-hint {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(99, 102, 241, .06);
  border: 1px solid rgba(99, 102, 241, .22);
}
.cfis-ci-hint-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c7d2fe;
}

.cfis-ci-missing {
  display: flex; gap: .55rem; align-items: flex-start;
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(99, 102, 241, .06);
  border: 1px dashed rgba(99, 102, 241, .25);
  font-size: .82rem; line-height: 1.45; color: rgba(225, 230, 245, .82);
}
.cfis-ci-missing-icon {
  flex: 0 0 auto; width: 1.1rem; height: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(99, 102, 241, .25); color: #c7d2fe;
  font-size: .72rem; font-weight: 700;
}

/* CFIS Execution Plan (AEL) panel */
.cfis-exec {
  margin: .65rem 0 0;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .65);
  border: 1px solid rgba(99, 102, 241, .28);
  display: flex; flex-direction: column; gap: .65rem;
}
.cfis-exec[hidden] { display: none; }
.cfis-exec--slowed { border-color: rgba(233, 207, 143, .35); }

.cfis-exec-head {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.cfis-exec-eyebrow {
  font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #c7d2fe;
}
.cfis-exec-pace {
  font-size: .66rem; font-weight: 700; letter-spacing: .04em;
  padding: .22rem .6rem; border-radius: 999px;
  background: rgba(233, 207, 143, .14); color: #e9cf8f;
  border: 1px solid rgba(233, 207, 143, .35);
}

.cfis-exec-plan {
  padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: .4rem;
}
.cfis-exec-plan-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cfis-exec-plan-rank {
  flex: 0 0 1.5rem; height: 1.5rem; width: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(99, 102, 241, .22); color: #c7d2fe;
  font-size: .82rem; font-weight: 700;
  border: 1px solid rgba(99, 102, 241, .4);
}
.cfis-exec-plan-title { font-size: .98rem; font-weight: 700; color: #fff; }
.cfis-exec-plan-goal {
  font-size: .85rem; line-height: 1.5; color: rgba(225, 230, 245, .85);
}

.cfis-exec-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .4rem;
}
.cfis-exec-step {
  display: flex; gap: .55rem; align-items: flex-start;
  padding: .5rem .65rem; border-radius: 8px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .06);
}
.cfis-exec-step-num {
  flex: 0 0 1.4rem; height: 1.4rem; width: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18); color: #cbd5e1;
  font-size: .76rem; font-weight: 700;
  border: 1px solid rgba(148, 163, 184, .35);
}
.cfis-exec-step-body { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.cfis-exec-step-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cfis-exec-step-action { font-size: .88rem; font-weight: 600; color: #fff; flex: 1; }
.cfis-exec-step-when {
  display: inline-flex;
  font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .75);
  border: 1px solid rgba(255, 255, 255, .12);
  margin-left: auto;
}
.cfis-exec-step-when--now { background: rgba(239, 68, 68,    .14); color: #fca5a5; border-color: rgba(239, 68, 68,    .35); }
.cfis-exec-step-when--30d { background: rgba(233, 207, 143,  .12); color: #e9cf8f; border-color: rgba(233, 207, 143,  .3); }
.cfis-exec-step-when--60d { background: rgba(99, 102, 241,   .14); color: #a5b4fc; border-color: rgba(99, 102, 241,   .35); }
.cfis-exec-step-details { font-size: .8rem; line-height: 1.45; color: rgba(225, 230, 245, .78); }
.cfis-strategy-line {
  font-size: .98rem; line-height: 1.55; color: #fff; margin-bottom: .85rem;
}
.cfis-strategy-velocity {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: .65rem;
}
.cfis-strategy-vel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: .42rem; flex: 0 0 10px;
}
.cfis-strategy-vel-safe .cfis-strategy-vel-dot    { background: #86efac; box-shadow: 0 0 10px rgba(134, 239, 172, .55); }
.cfis-strategy-vel-caution .cfis-strategy-vel-dot { background: #e9cf8f; box-shadow: 0 0 10px rgba(233, 207, 143, .55); }
.cfis-strategy-vel-pause .cfis-strategy-vel-dot   { background: #fb923c; box-shadow: 0 0 10px rgba(251, 146, 60, .55); }
.cfis-strategy-vel-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cfis-strategy-vel-label { font-size: .9rem; font-weight: 700; color: #fff; }
.cfis-strategy-vel-note  { font-size: .82rem; line-height: 1.45; color: rgba(225, 230, 245, .78); }

.cfis-strategy-risks { display: flex; flex-direction: column; gap: .42rem; margin-bottom: .65rem; }
.cfis-strategy-risk {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .55rem .8rem; border-radius: 10px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .35);
  font-size: .82rem; line-height: 1.45; color: rgba(245, 240, 230, .92);
}
.cfis-strategy-risk-icon { color: #ef4444; flex: 0 0 auto; }

.cfis-strategy-bureau {
  display: flex; flex-direction: column; gap: .25rem;
  margin-bottom: .65rem; padding: .65rem .8rem;
  border-radius: 10px;
  background: rgba(13, 26, 56, .42);
  border: 1px solid rgba(212, 179, 106, .14);
  font-size: .8rem; line-height: 1.5; color: rgba(225, 230, 245, .82);
}
.cfis-strategy-bureau-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #8e86b0;
}

.cfis-strategy-path-wrap { margin-top: .25rem; }
.cfis-strategy-path-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #8e86b0; margin-bottom: .35rem;
}
.cfis-strategy-path {
  margin: 0; padding-left: 1.1rem;
  font-size: .85rem; line-height: 1.5; color: rgba(225, 230, 245, .85);
}
.cfis-strategy-path li { margin: .22rem 0; }
.cfis-strategy-path li::marker { color: #e9cf8f; }

/* ── Tone escalation — visual signal of how the strategist is reading
   the moment. Calm = neutral, caution = warm gold edge, firm = red edge.
   Always advisory; never restrictive in language. ────────────────── */
.cfis-strategy-tone-calm    { border-color: rgba(212, 179, 106, .22); }
.cfis-strategy-tone-caution { border-color: rgba(233, 207, 143, .55); }
.cfis-strategy-tone-firm    { border-color: rgba(239, 68, 68, .50); }
.cfis-strategy-tone-firm .cfis-strategy-eyebrow { color: #fb923c; }

/* Deviation depth — explains the consequence in real-world terms. */
.cfis-strategy-deviation {
  margin: 0 0 .65rem;
  padding: .65rem .85rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, .07);
  border: 1px solid rgba(239, 68, 68, .28);
  color: rgba(245, 240, 230, .9);
  font-size: .82rem; line-height: 1.5;
}
.cfis-strategy-deviation-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #fb923c; margin-bottom: .25rem;
}
.cfis-strategy-deviation-body { color: rgba(245, 240, 230, .95); }

/* Recovery section — strategist's "Here's how we stabilize from here" */
.cfis-strategy-recovery {
  margin: 0 0 .65rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(13, 26, 56, .5);
  border: 1px solid rgba(212, 179, 106, .28);
}
.cfis-strategy-recovery-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #e9cf8f; margin-bottom: .45rem;
}
.cfis-strategy-recovery-list {
  margin: 0; padding-left: 1.25rem;
  font-size: .87rem; line-height: 1.55; color: rgba(225, 230, 245, .92);
}
.cfis-strategy-recovery-list li { margin: .28rem 0; }
.cfis-strategy-recovery-list li::marker { color: #e9cf8f; font-weight: 700; }

/* ── Attention sync — visual focus while Bestie speaks ─────────────────
   Soft pulse on the strategy panel + the recommended button so the user
   knows where the narration is pointing. Subtle by design; never loud.
   The classes are added when speech starts, removed when it ends. */
.cfis-strategy-speaking {
  animation: cfisStrategySpeakingPulse 2.6s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(212, 179, 106, .42), 0 0 28px rgba(212, 179, 106, .18);
}
@keyframes cfisStrategySpeakingPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(212, 179, 106, .32), 0 0 18px rgba(212, 179, 106, .14); }
  50%      { box-shadow: 0 0 0 2px rgba(212, 179, 106, .55), 0 0 36px rgba(212, 179, 106, .28); }
}

/* The recommended button already pulses gold (.cfis-recommended). When
   Bestie is actively speaking ABOUT it, we deepen the pulse + add a
   gentle inner glow so the user's eye locks on. */
.cfis-attention-spoken {
  animation: cfisAttentionSpokenPulse 2.2s ease-in-out infinite !important;
}
@keyframes cfisAttentionSpokenPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(212, 179, 106, .55), 0 0 22px rgba(212, 179, 106, .32),
                          inset 0 0 0 0 rgba(233, 207, 143, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(212, 179, 106, .72), 0 0 44px rgba(212, 179, 106, .55),
                          inset 0 0 12px rgba(233, 207, 143, .25); }
}

@media (prefers-reduced-motion: reduce) {
  .cfis-strategy-speaking,
  .cfis-attention-spoken { animation: none !important; }
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

/* ── Stat Cards ────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon--blue { background: #DBEAFE; color: #2563EB; }
.stat-icon--indigo { background: #E0E7FF; color: var(--accent); }
.stat-icon--green { background: #DCFCE7; color: #16A34A; }
.stat-icon--amber { background: #FEF3C7; color: #D97706; }

.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 1.65rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1; margin-bottom: 6px; }
.stat-change { font-size: 0.75rem; color: var(--text-muted); }
.stat-change.positive { color: #16A34A; }
.stat-change.warning { color: #D97706; }

/* ── Dashboard Grid ────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
}

/* ── Card ──────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.card-link { font-size: 0.8rem; color: var(--accent); font-weight: 500; }
.card-link:hover { text-decoration: underline; }
.card-body { padding: 16px 20px; }

/* ── Upcoming Appointments ─────────────────────────────────────── */
.appt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.appt-item:last-child { border-bottom: none; }
.appt-date {
  width: 44px; height: 44px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.appt-date .day { font-size: 1rem; font-weight: 700; color: var(--accent); line-height: 1; }
.appt-date .mon { font-size: 0.65rem; font-weight: 600; color: var(--accent); text-transform: uppercase; }
.appt-date--today { background: var(--accent); }
.appt-date--today .day, .appt-date--today .mon { color: #fff; }
.appt-info { flex: 1; min-width: 0; }
.appt-client { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.appt-service { font-size: 0.78rem; color: var(--text-secondary); }
.appt-time { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* ── Quick Actions ─────────────────────────────────────────────── */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background 0.15s;
  width: 100%;
}
.quick-action-btn:hover { background: var(--bg); }
.qa-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qa-icon svg { width: 17px; height: 17px; }
.qa-icon--blue { background: #DBEAFE; color: #2563EB; }
.qa-icon--indigo { background: #E0E7FF; color: var(--accent); }
.qa-icon--green { background: #DCFCE7; color: #16A34A; }
.qa-icon--purple { background: #F3E8FF; color: #9333EA; }
.qa-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.qa-sub { font-size: 0.75rem; color: var(--text-muted); }

/* ── Table ─────────────────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  flex: 1;
  min-width: 180px;
}
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input { border: none; background: none; outline: none; font-size: 0.875rem; color: var(--text-primary); width: 100%; }
.search-box input::placeholder { color: var(--text-muted); }

.filter-group { display: flex; gap: 8px; }
.filter-group select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
}
.filter-group select:focus { border-color: var(--accent); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: #FAFAFA;
}
.data-table td {
  padding: 13px 16px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #FAFBFF; }
.table-empty { text-align: center; color: var(--text-muted); padding: 40px !important; }
/* Load-error state — deliberately distinct from the neutral .table-empty so a
   transient failure never reads as "no data yet". Calm, not alarming: a
   slightly stronger tone than empty plus an honest, clickable Retry. */
.table-error { text-align: center; color: var(--text-secondary, #64748b); padding: 40px !important; }
.table-retry { color: var(--c-primary, #6366f1); font-weight: 600; text-decoration: underline; cursor: pointer; }
/* AI Coach thinking state — calm, alive, honest "actively preparing" indicator.
   Communicates in-progress reasoning (present tense), never fake progress or
   completion. Soft pulsing dots; motion fully disabled under reduced-motion. */
.coach-thinking { display: flex; align-items: center; gap: .6rem; font-size: .84rem;
  color: var(--c-text-secondary); padding: .8rem .9rem; border: 1px solid rgba(99,102,241,.18);
  border-radius: .6rem; background: rgba(99,102,241,.06); }
.coach-thinking-dots { display: inline-flex; gap: .25rem; flex: 0 0 auto; }
.coach-thinking-dots span { width: .4rem; height: .4rem; border-radius: 50%;
  background: var(--c-primary, #6366f1); opacity: .35;
  animation: coachThinkingPulse 1.2s ease-in-out infinite; }
.coach-thinking-dots span:nth-child(2) { animation-delay: .2s; }
.coach-thinking-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes coachThinkingPulse { 0%, 100% { opacity: .3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .coach-thinking-dots span { animation: none; opacity: .6; } }

/* ── Badges / Status ───────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-active, .badge-confirmed, .badge-paid { background: #DCFCE7; color: #15803D; }
.badge-active::before, .badge-confirmed::before, .badge-paid::before { background: #16A34A; }
.badge-pending { background: #FEF9C3; color: #92400E; }
.badge-pending::before { background: #D97706; }
.badge-inactive, .badge-cancelled { background: #F1F5F9; color: #64748B; }
.badge-inactive::before, .badge-cancelled::before { background: #94A3B8; }
.badge-completed { background: #E0E7FF; color: #4338CA; }
.badge-completed::before { background: #6366F1; }
.badge-overdue { background: #FEE2E2; color: #991B1B; }
.badge-overdue::before { background: #EF4444; }

/* ── Table Actions ─────────────────────────────────────────────── */
.table-actions { display: flex; gap: 6px; align-items: center; }
.action-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s;
}
.action-btn:hover { background: var(--bg); color: var(--text-primary); }
.action-btn.danger:hover { background: #FEE2E2; color: #EF4444; }
.action-btn svg { width: 14px; height: 14px; }

/* ── Payments Summary ──────────────────────────────────────────── */
.payments-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.pay-sum-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.pay-sum-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 6px; }
.pay-sum-value { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.4px; }
.pay-sum-value.green { color: #16A34A; }
.pay-sum-value.amber { color: #D97706; }
.pay-sum-value.red { color: #EF4444; }

/* ── Settings ──────────────────────────────────────────────────── */
.settings-list { display: flex; flex-direction: column; gap: 0; }
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.setting-row:last-child { border-bottom: none; }
.setting-row span { color: var(--text-secondary); }

/* ── Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #1E293B;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
  pointer-events: none;
  z-index: 2000;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 3px solid #22C55E; }
.toast.error { border-left: 3px solid #EF4444; }

/* ── Module Stats Bar ──────────────────────────────────────────── */
.module-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.module-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  flex: 1;
  min-width: 120px;
  box-shadow: var(--shadow);
}
.module-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.module-stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.module-stat--blue .module-stat-value { color: #2563EB; }
.module-stat--green .module-stat-value { color: #16A34A; }
.module-stat--amber .module-stat-value { color: #D97706; }
.module-stat--indigo .module-stat-value { color: #6366F1; }

/* ── Pipeline Summary ──────────────────────────────────────────── */
.pipeline-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* ── Badge variants ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--blue { background: #DBEAFE; color: #1D4ED8; }
.badge--indigo { background: #E0E7FF; color: #4338CA; }
.badge--green { background: #DCFCE7; color: #15803D; }
.badge--amber { background: #FEF3C7; color: #92400E; }
.badge--red { background: #FEE2E2; color: #991B1B; }
.badge--gray { background: #F1F5F9; color: #64748B; }
.badge--purple { background: #F3E8FF; color: #7C3AED; }

/* ── Settings Grid ─────────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* ── Client Avatar ─────────────────────────────────────────────── */
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.client-name { font-weight: 600; font-size: 0.875rem; }

/* ── Form Groups ───────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  color: var(--text-primary);
  background: var(--card-bg);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Responsive additions ──────────────────────────────────────── */
/* ── Skeleton loading ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.skeleton-list::before, .skeleton-list::after, .skeleton-list > * {
  content: '';
  display: block;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  gap: 1rem;
  text-align: center;
}
.empty-state svg { color: #CBD5E1; }
.empty-state p { font-size: 0.875rem; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .pipeline-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 20px 16px 40px; }
  .payments-summary { grid-template-columns: 1fr; }
  .pipeline-summary { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .topbar-date { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2 — New Module Styles + Digital Human Widget + Cinematic
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Grid layouts ────────────────────────────────────────────── */
.grid-2col { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.grid-3col { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* ── Tab buttons ─────────────────────────────────────────────── */
.tab-btn {
  padding: 0.75rem 1.25rem; border: none; background: transparent;
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-primary); background: var(--accent-light); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Checkbox labels ─────────────────────────────────────────── */
.check-label {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; cursor: pointer; padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm); transition: background 0.15s;
}
.check-label:hover { background: var(--accent-light); }
.check-label input[type="checkbox"] { accent-color: var(--accent); }

/* ── Cinematic page transitions ──────────────────────────────── */
.page { animation: pageIn 0.3s ease-out; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Digital Human Widget ────────────────────────────────────── */
#dh-widget {
  position: fixed; bottom: 80px; right: 24px; z-index: 1500;
  font-family: inherit;
  /* Grab cursor hints the widget is draggable. Switched to `grabbing`
     when actively dragged. touch-action: none prevents the browser from
     hijacking touch-drag as a scroll gesture on mobile. */
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#dh-widget.dh-dragging {
  cursor: grabbing;
  transition: none !important;
}
/* ── DH Avatar Container — Cinematic Portrait ─────────────── */
#dh-avatar-container {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #1e1740 0%, #0d0a1f 100%);
  cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
  animation: dhBreathe 4s ease-in-out infinite;
}
@keyframes dhBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
#dh-avatar-container:hover {
  animation-play-state: paused;
  transform: scale(1.06);
}

/* Glow ring — state-driven */
#dh-glow-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.25);
  box-shadow: 0 0 12px rgba(99,102,241,0.15);
  transition: border-color 0.4s, box-shadow 0.4s;
  pointer-events: none;
}

/* Video presence (primary) */
#dh-video {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  pointer-events: none;
}
/* Portrait image (fallback — shows when video fails or isn't available) */
#dh-portrait {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  pointer-events: none; position: relative; z-index: 1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  transition: filter 0.4s;
}

/* State dot */
#dh-state-dot {
  position: absolute; bottom: 1px; right: 1px; z-index: 2;
  width: 12px; height: 12px; border-radius: 50%;
  background: #10B981; border: 2px solid #0d0a1f;
  transition: background 0.3s, box-shadow 0.3s;
}

/* ── State: Speaking → indigo glow pulse ─────────────────── */
#dh-avatar-container[data-state="speaking"] #dh-glow-ring {
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 20px rgba(99,102,241,0.4), 0 0 40px rgba(99,102,241,0.15);
  animation: dhGlowPulse 1.2s ease-in-out infinite;
}
@keyframes dhGlowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.06); }
}
#dh-avatar-container[data-state="speaking"] {
  animation: none; /* stop breathing during speech */
}
#dh-avatar-container[data-state="speaking"] #dh-state-dot {
  background: #6366F1;
  box-shadow: 0 0 6px rgba(99,102,241,0.5);
}

/* ── State: Listening → green tint ───────────────────────── */
#dh-avatar-container[data-state="listening"] #dh-glow-ring {
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 16px rgba(16,185,129,0.3), 0 0 32px rgba(16,185,129,0.1);
  animation: dhGlowPulse 1.8s ease-in-out infinite;
}
#dh-avatar-container[data-state="listening"] #dh-portrait {
  filter: brightness(1.05) saturate(0.9);
}
#dh-avatar-container[data-state="listening"] #dh-state-dot {
  background: #10B981;
  box-shadow: 0 0 6px rgba(16,185,129,0.5);
}

/* ── State: Thinking → dimmed amber focus ────────────────── */
#dh-avatar-container[data-state="thinking"] #dh-glow-ring {
  border-color: rgba(245,158,11,0.4);
  box-shadow: 0 0 14px rgba(245,158,11,0.2);
  animation: dhGlowSpin 2.5s linear infinite;
}
@keyframes dhGlowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#dh-avatar-container[data-state="thinking"] #dh-portrait {
  filter: brightness(0.85) saturate(0.8);
}
#dh-avatar-container[data-state="thinking"] #dh-state-dot {
  background: #F59E0B;
  box-shadow: 0 0 6px rgba(245,158,11,0.5);
}

/* ── State: Idle → breathing only (default) ──────────────── */
#dh-avatar-container[data-state="idle"] #dh-glow-ring {
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 0 8px rgba(99,102,241,0.1);
}
#dh-pulse {
  position: absolute; inset: -4px; border-radius: 50%;
  pointer-events: none;
}
#dh-pulse.dh-pulse-listening {
  animation: dhPulse 1.2s ease-in-out infinite;
  border: 2px solid #10B981;
}
#dh-pulse.dh-pulse-thinking {
  animation: dhPulse 0.8s ease-in-out infinite;
  border: 2px solid #F59E0B;
}
#dh-pulse.dh-pulse-speaking {
  animation: dhPulse 0.6s ease-in-out infinite;
  border: 2px solid #6366F1;
}
@keyframes dhPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

/* Chat panel */
#dh-chat-panel {
  position: absolute; bottom: 76px; right: 0;
  width: 360px; max-height: 480px;
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  flex-direction: column; overflow: hidden;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
#dh-chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 0.9rem;
}
#dh-chat-header button {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px; border-radius: 4px; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
#dh-chat-header button:hover { background: var(--accent-light); color: var(--accent); }
#dh-chat-header button.active { color: #10B981; }

#dh-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  min-height: 200px; max-height: 320px;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.dh-msg {
  max-width: 85%; padding: 0.5rem 0.75rem;
  border-radius: 12px; font-size: 0.85rem; line-height: 1.4;
  word-wrap: break-word;
}
.dh-msg-user {
  align-self: flex-end;
  background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px;
}
.dh-msg-avatar {
  align-self: flex-start;
  background: #F1F5F9; color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

#dh-input-row {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
#dh-input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.5rem 0.75rem; font-size: 0.85rem;
  outline: none; transition: border-color 0.2s;
}
#dh-input:focus { border-color: var(--accent); }
#dh-input-row button {
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; padding: 0.5rem 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#dh-input-row button:hover { background: var(--accent-hover); }

/* ══════════════════════════════════════════════════════════════════
   FULLSCREEN BESTIE — Cinematic Video-First Welcome
   ═════════════════════════════════════════════════════════════════ */

.bx-overlay {
  position: fixed; inset: 0; z-index: 100000;
  pointer-events: none; opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.bx-overlay.bx--active { pointer-events: all; opacity: 1; }
.bx-overlay.bx--exiting {
  opacity: 0; pointer-events: none;
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
  transform: scale(0.98);
}
body.bestie-experience-active { overflow: hidden; }

/* Backdrop — deep cinematic dark with slow gradient motion */
.bx-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(99,102,241,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at center, rgba(10,8,22,0.94) 0%, rgba(6,4,16,0.99) 100%);
  backdrop-filter: blur(20px) saturate(1.2);
}
/* Slow ambient gradient shift */
.bx--active .bx-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 120% 80% at 45% 35%, rgba(99,102,241,0.06) 0%, transparent 50%);
  animation: bxAmbient 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes bxAmbient {
  0% { opacity: 0.3; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.6; transform: translate(2%, -1%) scale(1.05); }
  100% { opacity: 0.4; transform: translate(-1%, 1%) scale(1.02); }
}
/* Deeper vignette overlay */
.bx--active .bx-backdrop::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

/* Scene layout */
.bx-scene {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100vh; width: 100%;
  padding: 2rem;
}

/* ── Hero media (video / poster image) ─────────────────────── */
.bx-hero {
  position: relative;
  width: 300px; height: 300px;
  margin-bottom: 2.5rem;
  animation: bxHeroIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
@keyframes bxHeroIn {
  0% { opacity: 0; transform: scale(0.7) translateY(30px); filter: blur(8px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
/* Eye contact illusion: slow scale-in + micro vertical drift */
.bx--active .bx-hero {
  animation: bxHeroIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both,
             bxEyeContact 8s ease-in-out 2s both;
}
@keyframes bxEyeContact {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.05) translateY(-2px); }
}

.bx-hero-glow {
  position: absolute; inset: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, rgba(139,92,246,0.1) 40%, transparent 70%);
  animation: bxGlow 4s ease-in-out infinite;
  pointer-events: none;
  transition: background 0.8s ease;
}
@keyframes bxGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Emotion-driven glow */
.bx-overlay[data-emotion="encouraging"] .bx-hero-glow { background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 65%); }
.bx-overlay[data-emotion="celebratory"] .bx-hero-glow { background: radial-gradient(circle, rgba(245,158,11,0.3) 0%, transparent 65%); }
.bx-overlay[data-emotion="recovery"] .bx-hero-glow { background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, transparent 65%); }
.bx-overlay[data-emotion="calm"] .bx-hero-glow { background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 65%); }
.bx-overlay[data-emotion="welcoming"] .bx-hero-glow { background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, rgba(236,72,153,0.08) 50%, transparent 70%); }
.bx-overlay[data-emotion="focused"] .bx-hero-glow { background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 65%); opacity: 0.7; }

.bx-hero-media {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(99,102,241,0.2),
    0 0 40px rgba(99,102,241,0.15),
    0 20px 60px rgba(0,0,0,0.5);
  animation: bxBreathe 6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
@keyframes bxBreathe {
  0%, 100% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.015) translateY(-2px); }
  60% { transform: scale(1.015) translateY(-2px); }
}

.bx-video, .bx-poster {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; display: block;
}
.bx-video { position: absolute; inset: 0; z-index: 2; }
.bx-poster { position: relative; z-index: 1; }
.bx-video[src=""], .bx-video:not([src]) { display: none; }
.bx-hero-vignette {
  position: absolute; inset: 0; z-index: 3; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, transparent 50%, rgba(10,8,22,0.35) 100%);
  pointer-events: none;
}

/* ── Dialogue ──────────────────────────────────────────────── */
.bx-dialogue {
  text-align: center; color: #fff; max-width: 500px;
  margin-bottom: 2rem;
  animation: bxTextIn 1s ease-out 1.2s both;
}
.bx-dialogue-name {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: rgba(99,102,241,0.7); font-weight: 600; margin-bottom: 0.75rem;
}
.bx-dialogue-text {
  font-size: 1.35rem; line-height: 1.7; font-weight: 300;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
.bx-dialogue-sub {
  font-size: 0.8rem; color: rgba(255,255,255,0.4);
  margin-top: 0.5rem; font-weight: 400;
}
@keyframes bxTextIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── CTA row ───────────────────────────────────────────────── */
.bx-cta-row {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  animation: bxTextIn 1s ease-out 1.8s both;
}
.bx-cta {
  border: none; border-radius: 14px; padding: 0.85rem 2.5rem;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  min-width: 260px; transition: all 0.2s ease; font-family: inherit;
}
.bx-cta--primary {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99,102,241,0.4), 0 1px 3px rgba(0,0,0,0.2);
}
.bx-cta--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.5), 0 2px 6px rgba(0,0,0,0.2);
}
.bx-cta--ghost {
  background: transparent; color: rgba(255,255,255,0.45);
  font-size: 0.8rem; font-weight: 400; padding: 0.5rem 1rem;
}
.bx-cta--ghost:hover { color: rgba(255,255,255,0.7); }

/* Dashboard handoff — Bestie stays visible after welcome */
.dh-entrance-pulse {
  animation: dhPulseEntrance 2s ease-out !important;
}
@keyframes dhPulseEntrance {
  0% { transform: scale(1); box-shadow: 0 4px 20px rgba(99,102,241,0.2); }
  30% { transform: scale(1.15); box-shadow: 0 6px 32px rgba(99,102,241,0.5); }
  100% { transform: scale(1); box-shadow: 0 4px 20px rgba(99,102,241,0.2); }
}
.bestie-entrance-pulse {
  animation: bestiePulseEntrance 2s ease-out !important;
}
@keyframes bestiePulseEntrance {
  0% { opacity: 1; }
  30% { opacity: 1; filter: brightness(1.3) drop-shadow(0 0 12px rgba(99,102,241,0.5)); }
  100% { opacity: 1; filter: none; }
}

/* ── Video Avatar Mode ────────────────────────────────────────── */
.bestie-video-canvas {
  border-radius: 50%;
  image-rendering: crisp-edges;
}
.bestie-video-el {
  border-radius: 50%;
  object-fit: cover;
}
.bestie-video-state-ring {
  position: absolute; inset: -3px;
  border-radius: 50%; pointer-events: none;
  border: 2px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* State-driven ring colors via parent data-state */
[data-state="speaking"] .bestie-video-state-ring {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
  animation: videoRingPulse 1s ease-in-out infinite;
}
[data-state="listening"] .bestie-video-state-ring {
  border-color: #10B981;
  box-shadow: 0 0 12px rgba(16,185,129,0.4);
  animation: videoRingPulse 1.5s ease-in-out infinite;
}
[data-state="thinking"] .bestie-video-state-ring {
  border-color: #F59E0B;
  box-shadow: 0 0 8px rgba(245,158,11,0.3);
  animation: videoRingSpin 2s linear infinite;
}
[data-state="guiding"] .bestie-video-state-ring {
  border-color: #8B5CF6;
  box-shadow: 0 0 10px rgba(139,92,246,0.3);
}
@keyframes videoRingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.04); }
}
@keyframes videoRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* Video mode in fullscreen experience */
.bx-avatar .bestie-video-canvas {
  width: 120px !important; height: 120px !important;
}
.bx-avatar .bestie-video-el {
  width: 120px !important; height: 120px !important;
}

/* ── Responsive tweaks for Phase 2 modules ────────────────────── */
@media (max-width: 768px) {
  .grid-2col { grid-template-columns: 1fr; }
  .grid-3col { grid-template-columns: 1fr; }
  #dh-chat-panel { width: calc(100vw - 40px); right: -10px; }
  .bx-message { font-size: 1.05rem; }
  .bx-action { min-width: 200px; }
}

/* ═════════════════════════════════════════════════════════════════════
   PHASE 8.B — Visual Authority Polish (additive only)
   ─────────────────────────────────────────────────────────────────────
   Purely cosmetic layer. Logic, structure, selectors are unchanged. Each
   rule below extends an existing class without overriding its semantic
   intent — it adds shadow, hover, animation, hierarchy, or trust-signal
   styling. Safe to remove without breaking any prior phase.
   ═════════════════════════════════════════════════════════════════════ */

/* Shared panel elevation + entrance animation. Applies to the 4 top-level
   panels named in the directive (Next Move, Insights, Strategy Mode block
   inside Insights, Funding) — but is scoped narrowly so it won't affect
   inner sub-blocks. */
.cfis-nextmove,
.cfis-sli,
.cfis-funding {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .03) inset,
    0 8px 24px -16px rgba(0, 0, 0, .55);
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-nextmove:hover,
.cfis-sli:hover,
.cfis-funding:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .04) inset,
    0 14px 28px -18px rgba(0, 0, 0, .65);
}

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

/* Vertical rhythm — enforce breathing room between top-level panels
   without changing each panel's inner padding. */
#cfisNextMove,
#cfisSineInsights,
#cfisFundingReadiness,
#cfisSine {
  margin-top: .85rem;
}

/* Typography hierarchy lock — use existing colors but tighten the
   primary→secondary→tertiary scale. Pure cosmetic; no markup change. */
.cfis-nextmove-label,
.cfis-funding-bestie {
  /* PRIMARY focal text */
  letter-spacing: -.005em;
  line-height: 1.35;
}
.cfis-nextmove-eyebrow,
.cfis-sli-eyebrow,
.cfis-funding-eyebrow,
.cfis-sli-strategy-label,
.cfis-sli-decisions-label,
.cfis-sli-patterns-label,
.cfis-sli-stratmode-label {
  /* TERTIARY uppercase eyebrows */
  text-rendering: geometricPrecision;
}
.cfis-nextmove-explain,
.cfis-funding-reason,
.cfis-sli-sub {
  /* SECONDARY explainers */
  line-height: 1.5;
}

/* Buttons — universal press + hover micro-interaction. Targets the
   button classes already in use; never restyles their colors. */
.cfis-nextmove-cta,
.cfis-disputes-btn,
.cfis-sd-btn,
.cfis-funding-cta,
.cfis-sd-pkt-mode {
  transition:
    transform 120ms ease-out,
    background-color 160ms ease-out,
    border-color 160ms ease-out,
    box-shadow 160ms ease-out;
  will-change: transform;
}
.cfis-nextmove-cta:hover,
.cfis-disputes-btn:hover,
.cfis-sd-btn:hover,
.cfis-funding-cta:hover {
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .55);
}
.cfis-nextmove-cta:active,
.cfis-disputes-btn:active,
.cfis-sd-btn:active,
.cfis-funding-cta:active,
.cfis-sd-pkt-mode:active {
  transform: scale(0.98);
}
.cfis-disputes-btn:disabled,
.cfis-sd-btn:disabled,
.cfis-funding-cta:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Trust-signal micro-text — single subtle italic line directly under a
   panel's eyebrow / header. Always in a quiet color so it never competes
   with primary content. */
.cfis-trust-signal {
  font-size: .68rem;
  font-style: italic;
  color: rgba(225, 230, 245, .55);
  letter-spacing: .02em;
  margin-top: -.1rem;
}

/* Section separators inside the packet summary card — soft divider so
   stats / mode toggle / pattern line / closing read as distinct blocks
   without harsh borders. */
.cfis-sd-pkt-summary > * + * {
  position: relative;
}
.cfis-sd-pkt-stats {
  padding-bottom: .3rem;
  border-bottom: 1px dashed rgba(255, 255, 255, .06);
}

/* Stronger packet eyebrow — feels like an official document section
   header without changing structure. */
.cfis-sd-pkt-eyebrow {
  text-shadow: 0 0 .4em rgba(251, 191, 36, .12);
}

/* Step-number circle — slight glow lift to feel premium. */
.cfis-funding-step-num,
.cfis-exec-step-num {
  box-shadow: 0 0 0 4px rgba(251, 191, 36, .04);
}

/* Insights pills + decision pills — gentle hover for interactivity hint
   even though they're informational. Never changes the color band. */
.cfis-sli-pill,
.cfis-sli-dpill,
.cfis-timeline-decision-pill,
.cfis-funding-risk {
  transition: transform 140ms ease-out, filter 140ms ease-out;
}
.cfis-sli-pill:hover,
.cfis-sli-dpill:hover,
.cfis-timeline-decision-pill:hover,
.cfis-funding-risk:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Background depth — subtle radial wash behind the credit page panels
   so the system reads as layered rather than flat. Applied only on the
   active credit page so it doesn't bleed into other routes. */
#page-credit.active {
  background-image:
    radial-gradient(60% 40% at 50% 0%, rgba(94, 234, 212, .035) 0%, transparent 70%),
    radial-gradient(40% 30% at 90% 90%, rgba(251, 191, 36, .03) 0%, transparent 70%);
  background-attachment: fixed;
}

/* Reduce motion — respect users who opt out of animations. */
@media (prefers-reduced-motion: reduce) {
  .cfis-nextmove,
  .cfis-sli,
  .cfis-funding {
    animation: none;
    transition: none;
  }
  .cfis-nextmove-cta,
  .cfis-disputes-btn,
  .cfis-sd-btn,
  .cfis-funding-cta,
  .cfis-sd-pkt-mode,
  .cfis-sli-pill,
  .cfis-sli-dpill,
  .cfis-timeline-decision-pill,
  .cfis-funding-risk {
    transition: none;
  }
  .cfis-nextmove-cta:active,
  .cfis-disputes-btn:active,
  .cfis-sd-btn:active,
  .cfis-funding-cta:active,
  .cfis-sd-pkt-mode:active {
    transform: none;
  }
}

/* Mobile breathing room tightening for polish-pass panels. */
@media (max-width: 640px) {
  #cfisNextMove,
  #cfisSineInsights,
  #cfisFundingReadiness {
    margin-top: .6rem;
  }
  .cfis-funding-head,
  .cfis-sli-head,
  .cfis-nextmove-head {
    flex-wrap: wrap;
    row-gap: .35rem;
  }
}

/* ─── Phase 8.B Final UX Dominance — progress + narrative lines ──────
   Single subtle line per surface; uses existing accent palette so
   nothing new visually competes with primary content. */
.cfis-sli-progress {
  margin-top: .25rem;
  font-size: .76rem; font-weight: 600;
  color: rgba(134, 239, 172, .85);
  letter-spacing: -.005em;
}
.cfis-funding-progress {
  margin-top: .15rem;
  font-size: .76rem; font-weight: 600;
  color: rgba(252, 165, 165, .85);
}
.cfis-funding-progress::before {
  content: '\2192  ';   /* → arrow */
  color: rgba(252, 165, 165, .55);
  font-weight: 400;
}
.cfis-timeline-narrative {
  margin: .15rem 0 .5rem 0;
  padding: .35rem .55rem;
  border-radius: 7px;
  background: rgba(134, 239, 172, .04);
  border-left: 3px solid rgba(134, 239, 172, .35);
  font-size: .76rem;
  color: rgba(225, 230, 245, .85);
  line-height: 1.5;
}

/* ─── Phase 8.C — Adaptive Command Layer ─────────────────────────────
   State tag chip in NextMove head + adaptive command line + hesitation
   reinforcement. All additions are subtle — they coexist with the
   existing card layout without restyling any prior element. */
.cfis-nextmove-statetag {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
  background: rgba(255, 255, 255, .06);
  color: rgba(225, 230, 245, .82);
}
.cfis-nextmove-statetag--ready,
.cfis-nextmove-statetag--momentum {
  background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35);
}
.cfis-nextmove-statetag--active_progress {
  background: rgba(96, 165, 250, .14); color: #93c5fd; border-color: rgba(96, 165, 250, .35);
}
.cfis-nextmove-statetag--idle {
  background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35);
}
.cfis-nextmove-statetag--stalled {
  background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35);
}
.cfis-nextmove-statetag--waiting {
  background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25);
}

/* Adaptive command line — sits between the explain and the priority
   line. Tone-driven accent via the urgency class. */
.cfis-nextmove-adaptive {
  margin-top: .35rem;
  padding: .35rem .55rem;
  border-radius: 7px;
  font-size: .82rem; font-weight: 600;
  line-height: 1.4;
  border-left: 3px solid rgba(134, 239, 172, .35);
  background: rgba(134, 239, 172, .04);
  color: #fff;
}
.cfis-nextmove-adaptive--low {
  border-left-color: rgba(148, 163, 184, .35);
  background: rgba(148, 163, 184, .04);
}
.cfis-nextmove-adaptive--medium {
  border-left-color: rgba(96, 165, 250, .35);
  background: rgba(96, 165, 250, .04);
}
.cfis-nextmove-adaptive--high {
  border-left-color: rgba(134, 239, 172, .55);
  background: rgba(134, 239, 172, .07);
}
.cfis-nextmove-adaptive-sub {
  margin-top: .15rem;
  font-size: .72rem; font-style: italic;
  color: rgba(225, 230, 245, .65);
}

/* Hesitation reinforcement — sits beneath the CTA. Always quiet. */
.cfis-nextmove-hesitation {
  margin-top: .35rem;
  font-size: .72rem; font-style: italic;
  color: rgba(225, 230, 245, .55);
}

/* ─── Client Intake Layer — Operator Panel ───────────────────────────
   Lightweight clients list. Mounted above NextMove on #page-credit.
   Pure additive — none of the styles below cascade into other panels. */
.cfis-ops {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(96, 165, 250, .04) 0%, rgba(255, 255, 255, .02) 100%);
  border: 1px solid rgba(96, 165, 250, .18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .5rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-ops-head {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
}
.cfis-ops-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #93c5fd;
}
.cfis-ops-count {
  font-size: .72rem; color: rgba(225, 230, 245, .65);
}
.cfis-ops-empty {
  font-size: .82rem; color: rgba(225, 230, 245, .65);
  padding: .35rem 0;
}
.cfis-ops-list {
  display: flex; flex-direction: column; gap: .4rem;
}
.cfis-ops-row {
  padding: .55rem .65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  transition: background-color 160ms, border-color 160ms;
}
.cfis-ops-row:hover { background: rgba(255, 255, 255, .045); }
.cfis-ops-row--active {
  border-color: rgba(134, 239, 172, .35);
  background: rgba(134, 239, 172, .04);
}
.cfis-ops-row-main { flex: 1 1 200px; display: flex; flex-direction: column; gap: .15rem; }
.cfis-ops-row-name {
  font-size: .92rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: .4rem;
}
.cfis-ops-active-pill {
  font-size: .56rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .1rem .4rem; border-radius: 999px;
  background: rgba(134, 239, 172, .18); color: #86efac; border: 1px solid rgba(134, 239, 172, .45);
}
.cfis-ops-row-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.cfis-ops-status {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-ops-status--pending { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-ops-status--ready   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-ops-meta-bit { font-size: .72rem; color: rgba(225, 230, 245, .7); }
.cfis-ops-meta-bit--ok   { color: #86efac; }
.cfis-ops-meta-bit--warn { color: #e9cf8f; }
.cfis-ops-meta-label {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}

/* Three-letter doc checks (ID / SSN / ADDR) */
.cfis-ops-row-checks { display: flex; gap: .25rem; }
.cfis-ops-check {
  font-size: .56rem; font-weight: 700; letter-spacing: .12em;
  padding: .1rem .4rem; border-radius: 5px;
  background: rgba(255, 255, 255, .04); color: rgba(225, 230, 245, .55);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-ops-check--ok {
  background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35);
}

.cfis-ops-row-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.cfis-ops-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .7rem; border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 120ms, background-color 160ms, border-color 160ms;
}
.cfis-ops-btn:hover { background: rgba(255, 255, 255, .12); }
.cfis-ops-btn:active { transform: scale(.98); }
.cfis-ops-btn--primary {
  background: rgba(96, 165, 250, .18); color: #93c5fd; border-color: rgba(96, 165, 250, .35);
}
.cfis-ops-btn--primary:hover { background: rgba(96, 165, 250, .28); }
.cfis-ops-btn--ghost {
  background: transparent; color: rgba(225, 230, 245, .65);
}

/* Execution preference + invoice row (visible only on active client) */
.cfis-ops-row-exec {
  flex-basis: 100%;
  margin-top: .35rem;
  padding-top: .4rem;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  font-size: .76rem;
}
.cfis-ops-pill {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  padding: .2rem .65rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04); color: rgba(225, 230, 245, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
  transition: background-color 160ms, color 160ms;
}
.cfis-ops-pill--on { background: rgba(96, 165, 250, .18); color: #93c5fd; border-color: rgba(96, 165, 250, .35); }
.cfis-ops-invoice-status {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
}
.cfis-ops-invoice-status--draft     { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-ops-invoice-status--sent      { background: rgba(96, 165, 250, .14);  color: #93c5fd; border-color: rgba(96, 165, 250, .35); }
.cfis-ops-invoice-status--paid      { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-ops-invoice-status--cancelled { background: rgba(248, 113, 113, .14); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }

/* ─── Consultant Mode ────────────────────────────────────────────────
   Sits adjacent to Funding/Operator panels. Indigo accent — distinct
   from prior phases. Plan modal renders the printable HTML inline. */
.cfis-consult {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: rgba(129, 140, 248, .04);
  border: 1px solid rgba(129, 140, 248, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .4rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-consult-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.cfis-consult-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #c4b5fd;
}
.cfis-consult-name {
  font-size: .92rem; font-weight: 700; color: #fff;
}
.cfis-consult-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-consult-state--idle  { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-consult-state--none  { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-consult-state--has   { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-consult-bestie {
  font-size: .82rem; color: #fff; font-weight: 600;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(129, 140, 248, .08); border-left: 3px solid rgba(129, 140, 248, .55);
}
.cfis-consult-empty {
  font-size: .76rem; color: rgba(225, 230, 245, .65); font-style: italic;
}
.cfis-consult-actions {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.cfis-consult-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 6px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 120ms, background-color 160ms;
}
.cfis-consult-btn:hover { background: rgba(255, 255, 255, .12); }
.cfis-consult-btn:active { transform: scale(.98); }
.cfis-consult-btn:disabled { opacity: .5; cursor: not-allowed; }
.cfis-consult-btn--primary {
  background: rgba(129, 140, 248, .18); color: #c4b5fd; border-color: rgba(129, 140, 248, .45);
}
.cfis-consult-btn--primary:hover { background: rgba(129, 140, 248, .28); }

/* Inline modal viewer — opens on Generate / View. */
.cfis-consult-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 32px 16px;
}
.cfis-consult-modal--open { display: flex; }
.cfis-consult-dialog {
  width: 100%; max-width: 820px;
  background: #0f172a;
  border-radius: 12px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .8);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-consult-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cfis-consult-dialog-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c4b5fd;
}
.cfis-consult-x {
  background: transparent; border: none; color: rgba(225, 230, 245, .7);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.cfis-consult-x:hover { color: #fff; }
.cfis-consult-dialog-body {
  background: #fff;
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Creator Mode (Phase B umbrella orchestration layer) ─────────────
   Mirrors the Consultant Mode skin so the credit page reads as one
   coherent stack. Pure additive — never overrides existing rules. */
.cfis-creator {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: rgba(244, 114, 182, .04);
  border: 1px solid rgba(244, 114, 182, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .45rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-creator-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.cfis-creator-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #f9a8d4;
}
.cfis-creator-name {
  font-size: .92rem; font-weight: 700; color: #fff;
}
.cfis-creator-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-creator-state--idle { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-creator-bestie {
  font-size: .82rem; color: #fff; font-weight: 600;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(244, 114, 182, .08); border-left: 3px solid rgba(244, 114, 182, .55);
}
.cfis-creator-empty {
  font-size: .76rem; color: rgba(225, 230, 245, .65); font-style: italic;
}
.cfis-creator-progress {
  display: flex; flex-direction: column; gap: .35rem;
  padding: .4rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-creator-progress-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .75);
}
.cfis-creator-checklist {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .25rem .55rem;
}
.cfis-creator-check {
  display: flex; align-items: center; gap: .35rem;
  font-size: .76rem; color: rgba(225, 230, 245, .75);
}
.cfis-creator-check--done { color: #86efac; }
.cfis-creator-check-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05rem; height: 1.05rem; border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .75);
  font-size: .7rem; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-creator-check--done .cfis-creator-check-dot {
  background: rgba(134, 239, 172, .18); color: #86efac;
  border-color: rgba(134, 239, 172, .45);
}
.cfis-creator-actions {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.cfis-creator-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 6px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 120ms, background-color 160ms;
}
.cfis-creator-btn:hover  { background: rgba(255, 255, 255, .12); }
.cfis-creator-btn:active { transform: scale(.98); }
.cfis-creator-btn:disabled { opacity: .5; cursor: not-allowed; }
.cfis-creator-btn--primary {
  background: rgba(244, 114, 182, .18); color: #f9a8d4; border-color: rgba(244, 114, 182, .45);
}
.cfis-creator-btn--primary:hover { background: rgba(244, 114, 182, .28); }

/* Inline modal viewer — opens on Generate / View. */
.cfis-creator-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 32px 16px;
}
.cfis-creator-modal--open { display: flex; }
.cfis-creator-dialog {
  width: 100%; max-width: 820px;
  background: #0f172a;
  border-radius: 12px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .8);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-creator-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cfis-creator-dialog-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #f9a8d4;
}
.cfis-creator-x {
  background: transparent; border: none; color: rgba(225, 230, 245, .7);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.cfis-creator-x:hover { color: #fff; }
.cfis-creator-dialog-body {
  background: #fff;
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Phase B.2.1 — Inline branch editor ─────────────────────────────
   Clickable checklist rows + accordion-style editor below the progress
   block. Mobile-safe: rows stack to single column on narrow widths;
   editor fields are full-width with comfortable tap targets. */
.cfis-creator-check-btn {
  display: flex; align-items: center; gap: .35rem;
  width: 100%;
  padding: .35rem .45rem;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  transition: background-color 140ms, border-color 140ms;
}
.cfis-creator-check-btn:hover { background: rgba(244, 114, 182, .08); border-color: rgba(244, 114, 182, .25); }
.cfis-creator-check-btn:focus-visible { outline: 2px solid rgba(244, 114, 182, .55); outline-offset: 1px; }
.cfis-creator-check--open .cfis-creator-check-btn { background: rgba(244, 114, 182, .12); border-color: rgba(244, 114, 182, .45); }
.cfis-creator-check-edit-hint {
  margin-left: auto;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .5);
  padding: .1rem .4rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
}
.cfis-creator-check-btn:hover .cfis-creator-check-edit-hint { color: #f9a8d4; border-color: rgba(244, 114, 182, .4); }
.cfis-creator-check--done .cfis-creator-check-edit-hint { color: rgba(134, 239, 172, .65); border-color: rgba(134, 239, 172, .25); }

.cfis-creator-editor {
  margin: .35rem 0 .15rem 0;
  padding: .65rem .75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(244, 114, 182, .35);
  display: flex; flex-direction: column; gap: .55rem;
  animation: cfisPanelFadeIn 180ms ease-out both;
}
.cfis-creator-editor-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.cfis-creator-editor-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #f9a8d4;
}
.cfis-creator-editor-close {
  background: transparent; border: none; color: rgba(225, 230, 245, .65);
  font-size: 1.2rem; cursor: pointer; line-height: 1;
  padding: 0 .25rem;
}
.cfis-creator-editor-close:hover { color: #fff; }
.cfis-creator-editor-body {
  display: grid; grid-template-columns: 1fr; gap: .5rem;
}
@media (min-width: 560px) {
  .cfis-creator-editor-body { grid-template-columns: 1fr 1fr; }
  .cfis-creator-editor-body .cfis-creator-field--platforms,
  .cfis-creator-editor-body .cfis-creator-field:has(textarea) { grid-column: 1 / -1; }
}
.cfis-creator-field {
  display: flex; flex-direction: column; gap: .2rem;
}
.cfis-creator-field-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  color: rgba(225, 230, 245, .75);
}
.cfis-creator-field input[type="text"],
.cfis-creator-field input[type="date"],
.cfis-creator-field select,
.cfis-creator-field textarea {
  font: inherit;
  width: 100%;
  padding: .4rem .55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  outline: none;
  transition: border-color 140ms, background-color 140ms;
}
.cfis-creator-field input:focus,
.cfis-creator-field select:focus,
.cfis-creator-field textarea:focus {
  border-color: rgba(244, 114, 182, .65);
  background: rgba(255, 255, 255, .07);
}
.cfis-creator-field textarea { resize: vertical; min-height: 36px; line-height: 1.4; }
.cfis-creator-field select { appearance: none; -webkit-appearance: none; }
.cfis-creator-field--platforms .cfis-creator-platforms {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.cfis-creator-platform {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  font-size: .76rem; color: rgba(225, 230, 245, .85);
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.cfis-creator-platform input { margin: 0; accent-color: #f472b6; }
.cfis-creator-platform:has(input:checked) {
  background: rgba(244, 114, 182, .18);
  border-color: rgba(244, 114, 182, .55);
  color: #f9a8d4;
}
.cfis-creator-editor-actions {
  display: flex; gap: .35rem; justify-content: flex-end;
}

/* Phase B.2.2 — short-lived "Plan updated" feedback chip. Soft success
   accent; auto-dismisses after a few seconds via re-render. */
.cfis-creator-feedback {
  font-size: .76rem; font-weight: 600;
  color: #86efac;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(134, 239, 172, .08);
  border: 1px solid rgba(134, 239, 172, .3);
  animation: cfisPanelFadeIn 200ms ease-out both;
}

/* ── Phase C — Creator Execution Tracking ───────────────────────────
   Mounts AFTER Creator Mode. Same family palette so the two panels
   read as one stack; uses a slightly cooler tint to signal "execution"
   vs. "planning". Mobile-safe: progress meter and step list reflow
   without overflow. */
.cfis-tracking {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: rgba(244, 114, 182, .03);
  border: 1px solid rgba(244, 114, 182, .18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .45rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-tracking-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.cfis-tracking-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #f9a8d4;
}
.cfis-tracking-name {
  font-size: .92rem; font-weight: 700; color: #fff;
}
.cfis-tracking-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
/* Phase C.1 — status color coding aligned with directive:
   Not Started = gray · In Progress = yellow · Near Completion = blue · Ready to Launch = green */
.cfis-tracking-state--idle       { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-tracking-state--inprogress { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-tracking-state--near       { background: rgba(96, 165, 250, .14); color: #93c5fd; border-color: rgba(96, 165, 250, .4); }
.cfis-tracking-state--ready      { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }
.cfis-tracking-bestie {
  font-size: .82rem; color: #fff; font-weight: 600;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(244, 114, 182, .08); border-left: 3px solid rgba(244, 114, 182, .55);
}
.cfis-tracking-progress {
  display: flex; flex-direction: column; gap: .3rem;
  padding: .4rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-tracking-progress-meta {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .75);
}
.cfis-tracking-progress-pct { color: #f9a8d4; }
.cfis-tracking-progress-bar {
  height: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}
.cfis-tracking-progress-fill {
  display: block; height: 100%;
  background: rgba(148, 163, 184, .55);
  transition: width 220ms ease-out, background-color 220ms ease-out;
}
/* Phase C.1 — progress fill mirrors the status color so the bar alone
   communicates the same level the chip does. */
.cfis-tracking-progress-fill--idle       { background: rgba(148, 163, 184, .55); }
.cfis-tracking-progress-fill--inprogress { background: linear-gradient(90deg, rgba(148, 163, 184, .55), rgba(233, 207, 143, .85)); }
.cfis-tracking-progress-fill--near       { background: linear-gradient(90deg, rgba(233, 207, 143, .85), rgba(96, 165, 250, .9)); }
.cfis-tracking-progress-fill--ready      { background: linear-gradient(90deg, rgba(96, 165, 250, .9), rgba(134, 239, 172, .9)); }
.cfis-tracking-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: .25rem;
}
@media (min-width: 560px) {
  .cfis-tracking-steps { grid-template-columns: 1fr 1fr; }
}
.cfis-tracking-step-btn {
  display: flex; align-items: center; gap: .35rem;
  width: 100%;
  padding: .35rem .45rem;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: rgba(225, 230, 245, .85); font: inherit; text-align: left;
  cursor: pointer;
  transition: background-color 140ms, border-color 140ms, color 140ms;
}
.cfis-tracking-step-btn:hover {
  background: rgba(244, 114, 182, .08);
  border-color: rgba(244, 114, 182, .25);
}
.cfis-tracking-step-btn:focus-visible {
  outline: 2px solid rgba(244, 114, 182, .55); outline-offset: 1px;
}
.cfis-tracking-step--done .cfis-tracking-step-btn { color: #86efac; }
.cfis-tracking-step-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05rem; height: 1.05rem; border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .75);
  font-size: .7rem; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-tracking-step--done .cfis-tracking-step-dot {
  background: rgba(134, 239, 172, .18); color: #86efac;
  border-color: rgba(134, 239, 172, .45);
}
.cfis-tracking-step-label { font-size: .82rem; font-weight: 600; }
.cfis-tracking-step-state {
  margin-left: auto;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .5);
  padding: .1rem .4rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
}
.cfis-tracking-step-btn:hover .cfis-tracking-step-state {
  color: #f9a8d4; border-color: rgba(244, 114, 182, .4);
}
.cfis-tracking-step--done .cfis-tracking-step-state {
  color: rgba(134, 239, 172, .65); border-color: rgba(134, 239, 172, .25);
}
.cfis-tracking-notes {
  display: flex; flex-direction: column; gap: .3rem;
  padding-top: .25rem;
}
.cfis-tracking-notes-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .75);
}
.cfis-tracking-notes-area {
  font: inherit;
  width: 100%;
  padding: .45rem .55rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  outline: none; resize: vertical; min-height: 40px; line-height: 1.4;
  transition: border-color 140ms, background-color 140ms;
}
.cfis-tracking-notes-area:focus {
  border-color: rgba(244, 114, 182, .55);
  background: rgba(255, 255, 255, .07);
}
.cfis-tracking-notes-actions {
  display: flex; justify-content: flex-end;
}
.cfis-tracking-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 6px;
  background: rgba(244, 114, 182, .14); color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, .35);
  cursor: pointer;
  transition: background-color 140ms, transform 120ms;
}
.cfis-tracking-btn:hover  { background: rgba(244, 114, 182, .24); }
.cfis-tracking-btn:active { transform: scale(.98); }
.cfis-tracking-meta {
  font-size: .7rem; color: rgba(225, 230, 245, .55);
  text-align: right;
}

/* ── Phase C.1 — section headers, suggestions, insights, feedback ── */
.cfis-tracking-section {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .25rem 0;
}
.cfis-tracking-section + .cfis-tracking-section {
  border-top: 1px dashed rgba(255, 255, 255, .05);
  padding-top: .4rem;
  margin-top: .15rem;
}
.cfis-tracking-section-title {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
  margin: 0;
}
.cfis-tracking-section--done .cfis-tracking-section-title { color: rgba(134, 239, 172, .65); }
.cfis-tracking-step-suggestion {
  font-size: .76rem;
  color: rgba(225, 230, 245, .65);
  padding: 0 .55rem 0 1.65rem;
  font-style: italic;
}
.cfis-tracking-insights {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .35rem .55rem;
  background: rgba(96, 165, 250, .06);
  border: 1px solid rgba(96, 165, 250, .22);
  border-radius: 7px;
}
.cfis-tracking-insight {
  font-size: .78rem; color: rgba(225, 230, 245, .85);
  line-height: 1.4;
}
.cfis-tracking-nextstep {
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
  padding: .3rem .55rem;
  background: rgba(244, 114, 182, .06);
  border-left: 3px solid rgba(244, 114, 182, .55);
  border-radius: 5px;
}
.cfis-tracking-nextstep-label {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #f9a8d4;
}
.cfis-tracking-nextstep-text {
  font-size: .82rem; color: #fff;
}
.cfis-tracking-feedback {
  align-self: flex-end;
  font-size: .72rem; font-weight: 600;
  color: #86efac;
  padding: .2rem .55rem; border-radius: 999px;
  background: rgba(134, 239, 172, .08);
  border: 1px solid rgba(134, 239, 172, .3);
  animation: cfisPanelFadeIn 180ms ease-out both;
}
.cfis-tracking-notes-history {
  list-style: none; margin: .35rem 0 0 0; padding: 0;
  display: flex; flex-direction: column; gap: .25rem;
}
.cfis-tracking-notes-entry {
  padding: .35rem .5rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
}
.cfis-tracking-notes-entry-text {
  font-size: .8rem; color: rgba(225, 230, 245, .9);
  white-space: pre-wrap;
  line-height: 1.4;
}
.cfis-tracking-notes-entry-meta {
  margin-top: .15rem;
  font-size: .65rem; color: rgba(225, 230, 245, .5);
}
.cfis-tracking-notes-older {
  margin-top: .25rem;
  font-size: .68rem; color: rgba(225, 230, 245, .55);
  font-style: italic;
}

/* ── Phase C.2 — System flow breadcrumb + unified status variants ──
   Shared chip rendered in each major panel head. The current step is
   highlighted in the panel's accent color so the user always sees
   their place in the pipeline. */
.cfis-flow-chip {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  align-self: flex-start;
  padding: .2rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-flow-step              { color: rgba(225, 230, 245, .55); }
.cfis-flow-sep               { color: rgba(225, 230, 245, .35); margin: 0 .1rem; }
.cfis-flow-step--current     {
  color: #f9a8d4;
  text-shadow: 0 0 12px rgba(244, 114, 182, .35);
}

/* Unified Creator Mode status variants — match Tracking's 4-tier ramp
   so both panels read the same status colors. The earlier --has /
   --none variants are intentionally preserved (no JS path emits them
   today, but external callers may rely on the rule). */
.cfis-creator-state--idle       { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-creator-state--inprogress { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-creator-state--near       { background: rgba(96, 165, 250, .14);  color: #93c5fd; border-color: rgba(96, 165, 250, .4);  }
.cfis-creator-state--ready      { background: rgba(134, 239, 172, .14); color: #86efac; border-color: rgba(134, 239, 172, .35); }

/* Plan meta — small "Latest plan: …" sub-line that lives below the
   panel head, separated from the status chip. */
.cfis-creator-meta {
  font-size: .7rem; color: rgba(225, 230, 245, .55);
  text-align: right;
}

/* ── Phase C.2 — Operator Visibility (read-only) ──────────────────
   Collapsible multi-client overview. Mounts after the Tracking panel
   on the credit page. Read-only by design: no edit affordances, no
   row-click handlers that mutate state. */
.cfis-operator-view {
  margin: .85rem 0;
  padding: .35rem .55rem;
  border-radius: 9px;
  background: rgba(15, 23, 42, .35);
  border: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: .35rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-operator-view-head {
  display: flex; align-items: center;
}
.cfis-operator-view-toggle {
  display: flex; flex: 1 1 auto; align-items: center; gap: .55rem;
  padding: .35rem .25rem;
  background: transparent; border: none;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 140ms;
}
.cfis-operator-view-toggle:hover  { background: rgba(255, 255, 255, .03); }
.cfis-operator-view-toggle:focus-visible { outline: 2px solid rgba(244, 114, 182, .55); outline-offset: 1px; }
.cfis-operator-view-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-operator-view-totals {
  flex: 1 1 auto;
  font-size: .76rem; color: rgba(225, 230, 245, .85);
}
.cfis-operator-view-caret {
  font-size: .7rem; color: rgba(225, 230, 245, .55);
  margin-left: auto;
}
.cfis-operator-view-body {
  display: block;
  overflow-x: auto;
  padding: .25rem 0 .15rem 0;
}
.cfis-operator-view-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  color: rgba(225, 230, 245, .9);
}
.cfis-operator-view-table th,
.cfis-operator-view-table td {
  padding: .35rem .5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  white-space: nowrap;
  vertical-align: middle;
}
.cfis-operator-view-table th {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
  background: rgba(255, 255, 255, .03);
}
.cfis-operator-view-table tbody tr:last-child td { border-bottom: none; }
.cfis-operator-view-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.cfis-operator-view-name {
  font-weight: 600; color: #fff;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.cfis-operator-view-meta {
  color: rgba(225, 230, 245, .6);
  font-size: .72rem;
}
.cfis-operator-yes {
  display: inline-block; padding: .1rem .45rem; border-radius: 999px;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  background: rgba(134, 239, 172, .14); color: #86efac;
  border: 1px solid rgba(134, 239, 172, .3);
}
.cfis-operator-no {
  display: inline-block; padding: .1rem .45rem; border-radius: 999px;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  background: rgba(148, 163, 184, .12); color: rgba(225, 230, 245, .6);
  border: 1px solid rgba(148, 163, 184, .25);
}
.cfis-operator-bar {
  display: inline-block; vertical-align: middle;
  width: 80px; height: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
  margin-right: .35rem;
}
.cfis-operator-bar-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, rgba(96, 165, 250, .8), rgba(134, 239, 172, .9));
  transition: width 220ms ease-out;
}
.cfis-operator-bar-pct {
  font-size: .72rem; font-weight: 600; color: rgba(225, 230, 245, .8);
  vertical-align: middle;
}

/* Mobile — table scrolls horizontally inside its body container so
   long client names + status chips never break the panel width. The
   collapse toggle stays one-line on every viewport. */
@media (max-width: 559px) {
  .cfis-operator-view-totals { font-size: .72rem; }
  .cfis-operator-view-table th,
  .cfis-operator-view-table td { padding: .3rem .35rem; }
  .cfis-operator-bar           { width: 56px; }
}

/* ── Phase D — Funnel Generator panel ───────────────────────────────
   Sits between Tracking and Operator View. Same family palette as
   Creator Mode, slightly cooler accent so the two panels read as
   different stages of the same flow. */
.cfis-funnelgen {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: rgba(96, 165, 250, .04);
  border: 1px solid rgba(96, 165, 250, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .45rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-funnelgen-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.cfis-funnelgen-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #93c5fd;
}
.cfis-funnelgen-name { font-size: .92rem; font-weight: 700; color: #fff; }
.cfis-funnelgen-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-funnelgen-state--idle  { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-funnelgen-state--ready { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-funnelgen-state--has   { background: rgba(96, 165, 250, .14);  color: #93c5fd; border-color: rgba(96, 165, 250, .4);  }
.cfis-funnelgen-bestie {
  font-size: .82rem; color: #fff; font-weight: 600;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(96, 165, 250, .08); border-left: 3px solid rgba(96, 165, 250, .55);
}
.cfis-funnelgen-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .55rem;
  padding: .4rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-funnelgen-summary-row {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  font-size: .76rem; color: rgba(225, 230, 245, .75);
}
.cfis-funnelgen-summary-row strong { color: #fff; font-weight: 600; }
@media (max-width: 559px) { .cfis-funnelgen-summary { grid-template-columns: 1fr; } }
.cfis-funnelgen-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.cfis-funnelgen-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 6px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 120ms, background-color 160ms;
}
.cfis-funnelgen-btn:hover  { background: rgba(255, 255, 255, .12); }
.cfis-funnelgen-btn:active { transform: scale(.98); }
.cfis-funnelgen-btn:disabled { opacity: .5; cursor: not-allowed; }
.cfis-funnelgen-btn--primary {
  background: rgba(96, 165, 250, .18); color: #93c5fd; border-color: rgba(96, 165, 250, .45);
}
.cfis-funnelgen-btn--primary:hover { background: rgba(96, 165, 250, .28); }

/* Inline modal viewer — opens on Generate / View. */
.cfis-funnelgen-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 32px 16px;
}
.cfis-funnelgen-modal--open { display: flex; }
.cfis-funnelgen-dialog {
  width: 100%; max-width: 820px;
  background: #0f172a;
  border-radius: 12px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .8);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-funnelgen-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cfis-funnelgen-dialog-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #93c5fd;
}
.cfis-funnelgen-x {
  background: transparent; border: none; color: rgba(225, 230, 245, .7);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.cfis-funnelgen-x:hover { color: #fff; }
.cfis-funnelgen-dialog-body {
  background: #fff;
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Phase E — Website Generator panel ──────────────────────────────
   Sits between Funnel Generator (blue) and Operator View. Uses a
   violet accent so the user sees it as a distinct stage between
   funnel and execution. */
.cfis-webgen {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: rgba(167, 139, 250, .04);
  border: 1px solid rgba(167, 139, 250, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .45rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-webgen-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.cfis-webgen-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #c4b5fd;
}
.cfis-webgen-name { font-size: .92rem; font-weight: 700; color: #fff; }
.cfis-webgen-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-webgen-state--idle  { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-webgen-state--ready { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-webgen-state--has   { background: rgba(167, 139, 250, .14); color: #c4b5fd; border-color: rgba(167, 139, 250, .4);  }
.cfis-webgen-bestie {
  font-size: .82rem; color: #fff; font-weight: 600;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(167, 139, 250, .08); border-left: 3px solid rgba(167, 139, 250, .55);
}
.cfis-webgen-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .55rem;
  padding: .4rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-webgen-summary-row {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  font-size: .76rem; color: rgba(225, 230, 245, .75);
}
.cfis-webgen-summary-row strong { color: #fff; font-weight: 600; }
@media (max-width: 559px) { .cfis-webgen-summary { grid-template-columns: 1fr; } }
.cfis-webgen-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.cfis-webgen-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 6px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 120ms, background-color 160ms;
}
.cfis-webgen-btn:hover  { background: rgba(255, 255, 255, .12); }
.cfis-webgen-btn:active { transform: scale(.98); }
.cfis-webgen-btn:disabled { opacity: .5; cursor: not-allowed; }
.cfis-webgen-btn--primary {
  background: rgba(167, 139, 250, .18); color: #c4b5fd; border-color: rgba(167, 139, 250, .45);
}
.cfis-webgen-btn--primary:hover { background: rgba(167, 139, 250, .28); }

/* Inline modal viewer — opens on Generate / View. */
.cfis-webgen-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 32px 16px;
}
.cfis-webgen-modal--open { display: flex; }
.cfis-webgen-dialog {
  width: 100%; max-width: 820px;
  background: #0f172a;
  border-radius: 12px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .8);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-webgen-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cfis-webgen-dialog-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c4b5fd;
}
.cfis-webgen-x {
  background: transparent; border: none; color: rgba(225, 230, 245, .7);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.cfis-webgen-x:hover { color: #fff; }
.cfis-webgen-dialog-body {
  background: #fff;
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Phase S — Social + Messaging Automation panel ──────────────────
   Sits between Website Generator (violet) and Operator View. Uses a
   cyan/teal accent to signal "distribution + automation" stage. All
   states are simulated; nothing connects to real platforms. */
.cfis-social {
  margin: .85rem 0;
  padding: .75rem .85rem;
  border-radius: 9px;
  background: rgba(45, 212, 191, .04);
  border: 1px solid rgba(45, 212, 191, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .45rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-social-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.cfis-social-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #5eead4;
}
.cfis-social-name { font-size: .92rem; font-weight: 700; color: #fff; }
.cfis-social-state {
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}
.cfis-social-state--idle  { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }
.cfis-social-state--ready { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-social-state--has   { background: rgba(45, 212, 191, .14);  color: #5eead4; border-color: rgba(45, 212, 191, .4);  }
.cfis-social-bestie {
  font-size: .82rem; color: #fff; font-weight: 600;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(45, 212, 191, .08); border-left: 3px solid rgba(45, 212, 191, .55);
}
.cfis-social-disclaimer {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fde68a;
  padding: .25rem .55rem; border-radius: 7px;
  background: rgba(253, 224, 71, .07);
  border: 1px dashed rgba(253, 224, 71, .35);
}
.cfis-social-disclaimer--inline {
  margin: .25rem 0;
  letter-spacing: .04em; text-transform: none; font-weight: 600;
  color: #fde68a;
}
.cfis-social-disclaimer-note {
  margin: .35rem 0 0 0;
  font-size: .68rem; color: rgba(225, 230, 245, .55); font-style: italic;
}
.cfis-social-suggestions {
  display: flex; flex-direction: column; gap: .25rem;
  padding: .35rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-social-suggestions-head {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-social-suggestions-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .2rem;
}
.cfis-social-suggestion-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #5eead4;
  margin-right: .35rem;
}
.cfis-social-queue,
.cfis-social-autos {
  display: flex; flex-direction: column; gap: .25rem;
  padding: .35rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-social-queue-head,
.cfis-social-autos-head {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-social-queue-list,
.cfis-social-autos-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .25rem;
}
.cfis-social-queue-item,
.cfis-social-auto-item {
  display: grid;
  grid-template-columns: minmax(120px, auto) auto 1fr;
  gap: .35rem .65rem;
  align-items: baseline;
  font-size: .78rem; color: rgba(225, 230, 245, .85);
  padding: .25rem .35rem;
  border-bottom: 1px dashed rgba(255, 255, 255, .05);
}
.cfis-social-queue-item:last-child,
.cfis-social-auto-item:last-child { border-bottom: none; }
.cfis-social-queue-when { color: #5eead4; font-weight: 600; white-space: nowrap; }
.cfis-social-queue-platforms {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: lowercase;
  color: rgba(225, 230, 245, .65);
  white-space: nowrap;
}
.cfis-social-queue-content { color: rgba(225, 230, 245, .85); }
.cfis-social-auto-trigger { color: rgba(225, 230, 245, .85); }
.cfis-social-auto-arrow   { color: #5eead4; }
.cfis-social-auto-action  { color: rgba(225, 230, 245, .85); }
.cfis-social-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.cfis-social-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 6px;
  background: rgba(255, 255, 255, .06); color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 120ms, background-color 160ms;
  text-align: left;
}
.cfis-social-btn:hover  { background: rgba(255, 255, 255, .12); }
.cfis-social-btn:active { transform: scale(.98); }
.cfis-social-btn:disabled { opacity: .5; cursor: not-allowed; }
.cfis-social-btn--primary {
  background: rgba(45, 212, 191, .18); color: #5eead4; border-color: rgba(45, 212, 191, .45);
}
.cfis-social-btn--primary:hover { background: rgba(45, 212, 191, .28); }
.cfis-social-btn--ghost {
  background: transparent; color: rgba(225, 230, 245, .9);
  border: 1px solid rgba(255, 255, 255, .08);
  width: 100%;
}
.cfis-social-btn--ghost:hover { background: rgba(45, 212, 191, .08); border-color: rgba(45, 212, 191, .35); }

/* Modal (composer + viewer). */
.cfis-social-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 32px 16px;
}
.cfis-social-modal--open { display: flex; }
.cfis-social-dialog {
  width: 100%; max-width: 720px;
  background: #0f172a;
  border-radius: 12px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .8);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.cfis-social-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cfis-social-dialog-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #5eead4;
}
.cfis-social-x {
  background: transparent; border: none; color: rgba(225, 230, 245, .7);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.cfis-social-x:hover { color: #fff; }
.cfis-social-dialog-body {
  padding: 14px 18px;
  max-height: 70vh;
  overflow-y: auto;
}
.cfis-social-form {
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: .55rem;
}
.cfis-social-field { display: flex; flex-direction: column; gap: .2rem; }
.cfis-social-field-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  color: rgba(225, 230, 245, .75);
}
.cfis-social-field input[type="text"],
.cfis-social-field input[type="datetime-local"],
.cfis-social-field select,
.cfis-social-field textarea {
  font: inherit;
  width: 100%;
  padding: .4rem .55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  outline: none;
  transition: border-color 140ms;
}
.cfis-social-field input:focus,
.cfis-social-field select:focus,
.cfis-social-field textarea:focus {
  border-color: rgba(45, 212, 191, .55);
}
.cfis-social-field textarea { resize: vertical; min-height: 60px; line-height: 1.4; }
.cfis-social-field--platforms .cfis-social-platforms {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.cfis-social-platform {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  font-size: .76rem; color: rgba(225, 230, 245, .85);
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.cfis-social-platform input { margin: 0; accent-color: #5eead4; }
.cfis-social-platform:has(input:checked) {
  background: rgba(45, 212, 191, .18);
  border-color: rgba(45, 212, 191, .55);
  color: #5eead4;
}
.cfis-social-form-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.cfis-social-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  color: rgba(225, 230, 245, .9);
  margin-top: .35rem;
}
.cfis-social-table th,
.cfis-social-table td {
  padding: .35rem .5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  vertical-align: top;
}
.cfis-social-table th {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
  background: rgba(255, 255, 255, .03);
}
.cfis-social-empty-row {
  text-align: center !important;
  font-style: italic;
  color: rgba(225, 230, 245, .55);
}
@media (max-width: 559px) {
  .cfis-social-queue-item,
  .cfis-social-auto-item { grid-template-columns: 1fr; }
}

/* Phase S.2A — Per-provider connection status row. Rendered only after
   GET /api/social/connections returns. Read-only; no edit affordance. */
.cfis-social-conn {
  display: flex; flex-direction: column; gap: .25rem;
  padding: .35rem .55rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 7px;
}
.cfis-social-conn-head {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
}
.cfis-social-conn-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.cfis-social-conn-item {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: rgba(225, 230, 245, .85);
}
.cfis-social-conn-platform {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-social-conn--has    { background: rgba(45, 212, 191, .14);  color: #5eead4; border-color: rgba(45, 212, 191, .4); }
.cfis-social-conn--has    .cfis-social-conn-platform { color: #5eead4; }
.cfis-social-conn--ready  { background: rgba(233, 207, 143, .14); color: #e9cf8f; border-color: rgba(233, 207, 143, .35); }
.cfis-social-conn--ready  .cfis-social-conn-platform { color: #e9cf8f; }
.cfis-social-conn--idle   { background: rgba(148, 163, 184, .12); color: rgba(225, 230, 245, .65); border-color: rgba(148, 163, 184, .25); }

/* ── Crossover Credit Shell — Surgical UX correction ──────────────────
   Three layers in this block:
     1. Primary Action Bar (top of #page-credit)
     2. Mode-aware panel visibility flags
     3. Collapse-by-default for the generator chain */

/* 1 ── Primary Action Bar ───────────────────────────────────────── */
.cfis-credit-actionbar {
  margin: .5rem 0 1rem 0;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(129, 140, 248, .12), rgba(244, 114, 182, .08));
  border: 1px solid rgba(129, 140, 248, .25);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .65rem;
}
.cfis-credit-actionbar-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .55rem;
}
.cfis-credit-actionbar-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #c4b5fd;
}
.cfis-credit-actionbar-sub {
  font-size: .82rem; color: rgba(225, 230, 245, .85);
}
.cfis-credit-actionbar-buttons {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem;
}
@media (max-width: 720px) { .cfis-credit-actionbar-buttons { grid-template-columns: 1fr; } }
.cfis-credit-actionbtn {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  padding: .65rem .8rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(225, 230, 245, .92);
  cursor: pointer; text-align: left;
  transition: transform 120ms, background-color 160ms, border-color 160ms;
}
.cfis-credit-actionbtn:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .22); }
.cfis-credit-actionbtn:active { transform: scale(.99); }
.cfis-credit-actionbtn:disabled { opacity: .5; cursor: not-allowed; }
.cfis-credit-actionbtn:disabled:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
.cfis-credit-actionbtn-label {
  font-size: .9rem; font-weight: 700; color: #fff; letter-spacing: .01em;
}
.cfis-credit-actionbtn-hint {
  font-size: .72rem; color: rgba(225, 230, 245, .65);
}
.cfis-credit-actionbtn--primary {
  background: rgba(129, 140, 248, .22);
  border-color: rgba(129, 140, 248, .55);
}
.cfis-credit-actionbtn--primary .cfis-credit-actionbtn-label { color: #c4b5fd; }
.cfis-credit-actionbtn--primary:hover { background: rgba(129, 140, 248, .32); }

/* 2 ── Mode-aware visibility ─────────────────────────────────────────
   Personal mode hides the Creator chain (Creator / Tracking / Funnel /
   Website / Social). Operator View stays visible in both modes. The
   surgical fix toggles visibility only — no logic change. */
#page-credit.cfis-shell-personal #cfisCreator,
#page-credit.cfis-shell-personal #cfisCreatorTracking,
#page-credit.cfis-shell-personal #cfisFunnelGenerator,
#page-credit.cfis-shell-personal #cfisWebsiteGenerator,
#page-credit.cfis-shell-personal #cfisSocialAutomation {
  display: none !important;
}

/* 3 ── Collapse-by-default for the generator chain ─────────────────── */
.cfis-shell-collapse-header {
  display: flex; align-items: center; justify-content: space-between; gap: .55rem;
  width: 100%;
  padding: .35rem .55rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  color: rgba(225, 230, 245, .9);
  font: inherit; cursor: pointer;
  transition: background-color 140ms, border-color 140ms;
}
.cfis-shell-collapse-header:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.cfis-shell-collapse-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .7);
}
.cfis-shell-collapse-chevron {
  width: 10px; height: 10px;
  border-right: 2px solid rgba(225, 230, 245, .55);
  border-bottom: 2px solid rgba(225, 230, 245, .55);
  transform: rotate(45deg);
  transition: transform 200ms;
}
.cfis-shell-active .cfis-shell-collapse-chevron { transform: rotate(225deg); }

/* Collapsed state: clip the panel below the header. The header itself
   stays visible so the user can re-expand. */
.cfis-shell-collapsed > *:not(.cfis-shell-collapse-header) {
  display: none !important;
}
.cfis-shell-collapsed {
  padding-top: .35rem !important;
  padding-bottom: .35rem !important;
}
.cfis-shell-collapsed .cfis-shell-collapse-header {
  background: rgba(255, 255, 255, .02);
}

/* Active state: subtle ring so the user can see which panel is current. */
.cfis-shell-active > .cfis-shell-collapse-header {
  border-color: rgba(244, 114, 182, .35);
}

/* ── Crossover Credit Snapshot — At-a-glance summary ────────────────
   Mounts directly under the Action Bar. Status row + Bestie line +
   What's wrong / What to do next + View Full Analysis toggle. */
.cfis-snapshot {
  margin: 0 0 1rem 0;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(96, 165, 250, .07), rgba(45, 212, 191, .04));
  border: 1px solid rgba(96, 165, 250, .25);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: .65rem;
  animation: cfisPanelFadeIn 220ms ease-out both;
}
.cfis-snapshot-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .55rem;
}
.cfis-snapshot-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #93c5fd;
}
.cfis-snapshot-mode {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  color: rgba(225, 230, 245, .65);
  padding: .12rem .55rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1);
}
.cfis-snapshot-empty-banner {
  font-size: .76rem; color: #fde68a;
  padding: .35rem .55rem; border-radius: 7px;
  background: rgba(253, 224, 71, .07);
  border: 1px dashed rgba(253, 224, 71, .35);
}
.cfis-snapshot-status-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem;
}
@media (max-width: 559px) { .cfis-snapshot-status-row { grid-template-columns: 1fr; } }
.cfis-snapshot-status {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .55rem .8rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
}
.cfis-snapshot-status-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(225, 230, 245, .55);
}
.cfis-snapshot-status-value {
  font-size: 1.05rem; font-weight: 700;
  color: #fff;
}
.cfis-snapshot-status--good {
  background: rgba(134, 239, 172, .1); border-color: rgba(134, 239, 172, .35);
}
.cfis-snapshot-status--good  .cfis-snapshot-status-value { color: #86efac; }
.cfis-snapshot-status--mid {
  background: rgba(96, 165, 250, .1); border-color: rgba(96, 165, 250, .4);
}
.cfis-snapshot-status--mid   .cfis-snapshot-status-value { color: #93c5fd; }
.cfis-snapshot-status--low {
  background: rgba(252, 165, 165, .1); border-color: rgba(252, 165, 165, .35);
}
.cfis-snapshot-status--low   .cfis-snapshot-status-value { color: #fca5a5; }
.cfis-snapshot-status--idle {
  background: rgba(148, 163, 184, .1); border-color: rgba(148, 163, 184, .25);
}
.cfis-snapshot-status--idle  .cfis-snapshot-status-value { color: #cbd5e1; }
.cfis-snapshot-bestie {
  font-size: .85rem; color: #fff; font-weight: 600;
  padding: .4rem .6rem; border-radius: 7px;
  background: rgba(96, 165, 250, .08);
  border-left: 3px solid rgba(96, 165, 250, .55);
  line-height: 1.45;
}
.cfis-snapshot-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem;
}
@media (max-width: 559px) { .cfis-snapshot-grid { grid-template-columns: 1fr; } }
.cfis-snapshot-section {
  padding: .55rem .8rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
}
.cfis-snapshot-section-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(225, 230, 245, .65);
  margin: 0 0 .35rem 0;
}
.cfis-snapshot-section--problems .cfis-snapshot-section-title { color: #fca5a5; }
.cfis-snapshot-section--actions  .cfis-snapshot-section-title { color: #86efac; }
.cfis-snapshot-list {
  margin: 0; padding: 0 0 0 1.1rem;
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .82rem; color: rgba(225, 230, 245, .92); line-height: 1.45;
}
.cfis-snapshot-list--problems li::marker { color: rgba(252, 165, 165, .85); }
.cfis-snapshot-list--actions  li::marker { color: rgba(134, 239, 172, .85); font-weight: 700; }
.cfis-snapshot-empty {
  font-size: .78rem; color: rgba(225, 230, 245, .55); font-style: italic;
}
.cfis-snapshot-deep-toggle {
  display: flex; justify-content: flex-end;
}
.cfis-snapshot-deeptoggle-btn {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .85rem; border-radius: 6px;
  background: rgba(255, 255, 255, .05); color: rgba(225, 230, 245, .92);
  border: 1px solid rgba(255, 255, 255, .14);
  cursor: pointer;
  transition: background-color 140ms, border-color 140ms;
}
.cfis-snapshot-deeptoggle-btn:hover  { background: rgba(255, 255, 255, .12); border-color: rgba(96, 165, 250, .4); color: #93c5fd; }
.cfis-snapshot-deeptoggle-btn[aria-expanded="true"] {
  background: rgba(96, 165, 250, .15); border-color: rgba(96, 165, 250, .45); color: #93c5fd;
}

/* ═════════════════════════════════════════════════════════════════════
   1% Visual Polish Layer — applies ONLY to #page-credit so no other
   page is affected. Uses higher specificity to normalize spacing,
   typography, card surface, button consistency, status palette, and
   Bestie placement without modifying any layout structure or logic.

   Design tokens — local to this block. Don't propagate to other pages.
   ────────────────────────────────────────────────────────────────── */
#page-credit {
  --cxp-radius-sm:        8px;
  --cxp-radius-md:        12px;
  --cxp-radius-lg:        14px;
  --cxp-section-gap:      24px;
  --cxp-card-padding:     18px;
  --cxp-internal-gap:     12px;
  --cxp-shadow-soft:      0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -20px rgba(0, 0, 0, .55);
  --cxp-border-soft:      rgba(255, 255, 255, .08);
  --cxp-text-primary:     #fff;
  --cxp-text-secondary:   rgba(225, 230, 245, .82);
  --cxp-text-tertiary:    rgba(225, 230, 245, .58);
  --cxp-color-good:       #86efac;   /* green */
  --cxp-color-caution:    #fcd34d;   /* yellow — replaces ambiguous amber */
  --cxp-color-problem:    #fca5a5;   /* red */
  --cxp-color-neutral:    #cbd5e1;   /* gray */
  --cxp-color-info:       #93c5fd;   /* blue — primary action only */
  --cxp-bestie-pink:      #f9a8d4;
}

/* 1 — Section spacing rhythm. Top-level CFIS panels on the credit page
       share the same outer gap so the page reads as one breathing
       column instead of stacked dense cards. */
#page-credit > #cfisCreditActionBar,
#page-credit > #cfisCreditSnapshot,
#page-credit > #cfisModeBar,
#page-credit > #cfisOperatorClients,
#page-credit > #cfisConsultant,
#page-credit > #cfisCreator,
#page-credit > #cfisCreatorTracking,
#page-credit > #cfisFunnelGenerator,
#page-credit > #cfisWebsiteGenerator,
#page-credit > #cfisSocialAutomation,
#page-credit > #cfisOperatorView,
#page-credit > #cfisNextMove,
#page-credit > #cfisFundingReadiness {
  margin-top:    0;
  margin-bottom: var(--cxp-section-gap);
  border-radius: var(--cxp-radius-md);
  border-color:  var(--cxp-border-soft);
  box-shadow:    var(--cxp-shadow-soft);
}
/* Tight pair: action bar sits flush above snapshot for a clear top group. */
#page-credit > #cfisCreditActionBar { margin-bottom: 12px; }
#page-credit > #cfisCreditSnapshot  { margin-bottom: var(--cxp-section-gap); }

/* 2 — Typography hierarchy normalization on credit page panels.
       Eyebrow (uppercase label) + Name/Title + Body text in 3 tiers. */
#page-credit .cfis-snapshot-eyebrow,
#page-credit .cfis-creator-eyebrow,
#page-credit .cfis-tracking-eyebrow,
#page-credit .cfis-funnelgen-eyebrow,
#page-credit .cfis-webgen-eyebrow,
#page-credit .cfis-social-eyebrow,
#page-credit .cfis-consult-eyebrow,
#page-credit .cfis-credit-actionbar-eyebrow {
  font-size:      .65rem;
  font-weight:    700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height:    1.2;
}
#page-credit .cfis-snapshot-status-value,
#page-credit .cfis-snapshot-section-title,
#page-credit .cfis-credit-actionbtn-label,
#page-credit .cfis-creator-name,
#page-credit .cfis-tracking-name,
#page-credit .cfis-funnelgen-name,
#page-credit .cfis-webgen-name,
#page-credit .cfis-social-name {
  letter-spacing: -0.005em;
}
#page-credit .cfis-snapshot-bestie,
#page-credit .cfis-creator-bestie,
#page-credit .cfis-tracking-bestie,
#page-credit .cfis-funnelgen-bestie,
#page-credit .cfis-webgen-bestie,
#page-credit .cfis-social-bestie,
#page-credit .cfis-nextmove-bestie {
  line-height: 1.5;
}
#page-credit .cfis-trust-signal {
  font-size: .76rem;
  color:     var(--cxp-text-tertiary);
  line-height: 1.5;
}

/* 3 — Snapshot status cards — refined surface + simplified palette.
       Replaces the previous "low/mid/good/idle" tones with the strict
       4-color rule (green/yellow/red/gray). Blue is reserved for info. */
#page-credit .cfis-snapshot-status {
  padding:        14px 16px;
  border-radius:  var(--cxp-radius-sm);
  gap:            4px;
}
#page-credit .cfis-snapshot-status--good {
  background:   rgba(134, 239, 172, .12);
  border-color: rgba(134, 239, 172, .35);
}
#page-credit .cfis-snapshot-status--good  .cfis-snapshot-status-value { color: var(--cxp-color-good); }
#page-credit .cfis-snapshot-status--mid {
  background:   rgba(252, 211, 77, .10);
  border-color: rgba(252, 211, 77, .32);
}
#page-credit .cfis-snapshot-status--mid   .cfis-snapshot-status-value { color: var(--cxp-color-caution); }
#page-credit .cfis-snapshot-status--low {
  background:   rgba(252, 165, 165, .10);
  border-color: rgba(252, 165, 165, .32);
}
#page-credit .cfis-snapshot-status--low   .cfis-snapshot-status-value { color: var(--cxp-color-problem); }
#page-credit .cfis-snapshot-status--idle {
  background:   rgba(148, 163, 184, .08);
  border-color: rgba(148, 163, 184, .22);
}
#page-credit .cfis-snapshot-status--idle  .cfis-snapshot-status-value { color: var(--cxp-color-neutral); }

/* 4 — Snapshot: problem and action lists with clean indicators.
       Replaces default bullets with subtle dot/check glyphs so the
       lists scan visually as "problems" vs "actions" without colors
       fighting other UI. */
#page-credit .cfis-snapshot-list {
  list-style: none;
  padding:    0;
  gap:        10px;
}
#page-credit .cfis-snapshot-list li {
  position:     relative;
  padding-left: 22px;
  font-size:    .86rem;
  color:        var(--cxp-text-primary);
  line-height:  1.45;
}
#page-credit .cfis-snapshot-list--problems li::before {
  content:        '';
  position:       absolute;
  left:           4px;
  top:            7px;
  width:          8px;  height: 8px;
  border-radius:  50%;
  background:     var(--cxp-color-problem);
  box-shadow:     0 0 0 3px rgba(252, 165, 165, .18);
}
#page-credit .cfis-snapshot-list--actions {
  counter-reset: cxp-action;
}
#page-credit .cfis-snapshot-list--actions li {
  counter-increment: cxp-action;
}
#page-credit .cfis-snapshot-list--actions li::before {
  content:        counter(cxp-action);
  position:       absolute;
  left:           0;
  top:            0;
  width:          18px;  height: 18px;
  border-radius:  50%;
  background:     rgba(134, 239, 172, .14);
  border:         1px solid rgba(134, 239, 172, .4);
  color:          var(--cxp-color-good);
  font-size:      .68rem;
  font-weight:    700;
  display:        flex;
  align-items:    center;
  justify-content:center;
  line-height:    1;
}
#page-credit .cfis-snapshot-section-title {
  font-size:      .68rem;
  letter-spacing: .12em;
  margin-bottom:  10px;
}

/* 5 — Snapshot bestie line — softer surface + better readability. */
#page-credit .cfis-snapshot-bestie {
  padding:        14px 16px;
  border-radius:  var(--cxp-radius-sm);
  background:     rgba(96, 165, 250, .08);
  border:         1px solid rgba(96, 165, 250, .22);
  border-left:    3px solid rgba(96, 165, 250, .55);
}

/* 6 — Action bar — tighten button rhythm + premium primary stroke. */
#page-credit .cfis-credit-actionbar {
  padding:       16px 18px;
  border-radius: var(--cxp-radius-md);
}
#page-credit .cfis-credit-actionbar-buttons { gap: 10px; }
#page-credit .cfis-credit-actionbtn {
  padding:       12px 14px;
  border-radius: var(--cxp-radius-sm);
  gap:           4px;
  transition:    transform 120ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
#page-credit .cfis-credit-actionbtn:hover:not(:disabled) {
  transform:  translateY(-1px);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .55);
}
#page-credit .cfis-credit-actionbtn--primary {
  background:   linear-gradient(135deg, rgba(129, 140, 248, .28), rgba(244, 114, 182, .18));
  border-color: rgba(129, 140, 248, .55);
}
#page-credit .cfis-credit-actionbtn--primary .cfis-credit-actionbtn-label {
  color: #fff;
}
#page-credit .cfis-credit-actionbtn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(129, 140, 248, .38), rgba(244, 114, 182, .26));
}

/* 7 — Buttons: standardize generic CFIS panel buttons to one rhythm. */
#page-credit .cfis-creator-btn,
#page-credit .cfis-funnelgen-btn,
#page-credit .cfis-webgen-btn,
#page-credit .cfis-social-btn,
#page-credit .cfis-tracking-btn,
#page-credit .cfis-consult-btn {
  padding:       7px 14px;
  border-radius: 7px;
  font-weight:   600;
  letter-spacing: .005em;
  transition:    transform 120ms ease, background-color 160ms ease, border-color 160ms ease;
}
#page-credit .cfis-creator-btn:hover,
#page-credit .cfis-funnelgen-btn:hover,
#page-credit .cfis-webgen-btn:hover,
#page-credit .cfis-social-btn:hover,
#page-credit .cfis-tracking-btn:hover,
#page-credit .cfis-consult-btn:hover {
  transform: translateY(-1px);
}

/* 8 — Collapse headers (generator chain + snapshot deep toggle):
       quieter when collapsed, clearer when active. */
#page-credit .cfis-shell-collapse-header {
  padding:       10px 14px;
  border-radius: var(--cxp-radius-sm);
}
#page-credit .cfis-shell-collapsed > .cfis-shell-collapse-header {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .06);
}
#page-credit .cfis-shell-active > .cfis-shell-collapse-header {
  background:   rgba(244, 114, 182, .08);
  border-color: rgba(244, 114, 182, .35);
}
#page-credit .cfis-snapshot-deeptoggle-btn {
  padding:       9px 18px;
  border-radius: 999px;
  letter-spacing: .02em;
}

/* 9 — Reduce noise: trust-signal lines collapse to single tone. */
#page-credit .cfis-trust-signal {
  padding:       10px 14px;
  border-radius: var(--cxp-radius-sm);
  background:    rgba(255, 255, 255, .025);
  border:        1px solid rgba(255, 255, 255, .05);
}

/* 10 — Bestie floating widget: subtler shadow + smoother transition,
        slightly larger safe margin from page edges. */
#dh-widget {
  bottom: 24px;
  right:  24px;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, .35));
  transition: transform 200ms ease, filter 200ms ease;
}
#dh-widget:not(.dh-dragging):hover {
  transform: translateY(-2px);
  filter:    drop-shadow(0 20px 48px rgba(0, 0, 0, .4));
}
#dh-chat-panel {
  border-radius: var(--cxp-radius-md);
  box-shadow:    0 24px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .04);
}

/* 11 — Eyebrow color normalization: avoid the dim-gray + accent-pink
        fight by giving every eyebrow the same muted tone. Each panel's
        accent comes from its accent border + status chip — not the
        eyebrow itself. */
#page-credit .cfis-snapshot-eyebrow,
#page-credit .cfis-credit-actionbar-eyebrow {
  color: var(--cxp-text-tertiary);
}

/* 12 — Status chips — soften background, sharpen text. Applies to all
        the *-state chips across panel heads. */
#page-credit [class*="-state--"] {
  letter-spacing: .1em;
  padding:        4px 12px;
  border-radius:  999px;
}

/* 13 — Vertical rhythm inside panels (e.g. 12px between consecutive
        children). Applied to the Snapshot grid + similar dense layouts. */
#page-credit .cfis-snapshot {
  padding: var(--cxp-card-padding);
  gap:     14px;
}
#page-credit .cfis-snapshot-grid { gap: 12px; }
#page-credit .cfis-snapshot-section { padding: 14px 16px; }
#page-credit .cfis-snapshot-status-row { gap: 12px; }
