/* ============================================
   FINANCIAL SIMULATOR — AI DIGITAL TWIN
   Dark glassmorphic theme with chat + behavioral UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Tokens ---- */
:root {
  --bg-deepest: #060a14;
  --bg-deep: #0a0e1a;
  --bg-mid: #111828;
  --bg-surface: #1a1f35;
  --bg-elevated: #222842;

  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;

  --teal: #00d4aa;
  --teal-glow: rgba(0, 212, 170, 0.25);
  --teal-dim: #00a885;
  --coral: #ff6b6b;
  --coral-glow: rgba(255, 107, 107, 0.25);
  --gold: #ffd93d;
  --gold-glow: rgba(255, 217, 61, 0.25);
  --purple: #a78bfa;
  --purple-glow: rgba(167, 139, 250, 0.25);
  --blue: #60a5fa;
  --blue-glow: rgba(96, 165, 250, 0.25);

  --text-primary: #f0f0f5;
  --text-secondary: #9ca3b8;
  --text-muted: #5c6378;
  --text-dim: #3d4252;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow-teal: 0 0 30px var(--teal-glow);
  --shadow-glow-coral: 0 0 30px var(--coral-glow);

  --transition-fast: 0.15s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deepest);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Background Effects ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 212, 170, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 70% 40% at 50% 50%, rgba(96, 165, 250, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout ---- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---- Header ---- */
.app-header {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeInDown 0.6s var(--transition-base);
}

.app-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.app-header__icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-glow-teal);
}

.app-header__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-header__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(0,212,170,0.15), rgba(96,165,250,0.15));
  border: 1px solid rgba(0,212,170,0.25);
  border-radius: 20px;
  color: var(--teal);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(0,212,170,0.1); }
  50% { box-shadow: 0 0 16px rgba(0,212,170,0.25); }
}

.app-header__subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Glass Card ---- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* ---- Sections ---- */
.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---- Input Panel ---- */
.input-panel {
  padding: 32px;
  margin-bottom: 32px;
  animation: fadeInUp 0.5s var(--transition-base);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.form-group input::placeholder {
  color: var(--text-dim);
}

.form-group select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ---- Health Indicators ---- */
.health-indicators {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.health-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  transition: all var(--transition-base);
}

.health-indicator__icon {
  font-size: 1rem;
}

.health-indicator__label {
  color: var(--text-muted);
  font-weight: 500;
}

.health-indicator__value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
}

/* ---- Scenario Cards ---- */
.scenarios-section {
  margin-bottom: 28px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.scenario-card {
  position: relative;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  overflow: hidden;
}

.scenario-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--teal));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.scenario-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.scenario-card:hover::before {
  opacity: 0.6;
}

.scenario-card.active {
  background: rgba(0, 212, 170, 0.06);
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.1);
}

.scenario-card.active::before {
  opacity: 1;
}

.scenario-card__icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  display: block;
}

.scenario-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.scenario-card__desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.scenario-card[data-scenario="baseline"]      { --card-accent: var(--blue); }
.scenario-card[data-scenario="quit_job"]       { --card-accent: var(--coral); }
.scenario-card[data-scenario="aggressive"]     { --card-accent: var(--gold); }
.scenario-card[data-scenario="buy_house"]      { --card-accent: var(--purple); }
.scenario-card[data-scenario="career_switch"]  { --card-accent: var(--teal); }
.scenario-card[data-scenario="custom"]         { --card-accent: var(--text-secondary); }

/* ---- Run Button ---- */
.run-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  color: var(--bg-deepest);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-glow-teal);
  letter-spacing: 0.02em;
}

.run-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--teal-glow), var(--shadow-md);
}

.run-btn:active {
  transform: translateY(0);
}

.run-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.run-btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--bg-deepest);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.run-btn.loading .spinner {
  display: block;
}

.run-btn.loading .btn-text {
  opacity: 0.7;
}

/* ---- Results Section ---- */
.results-section {
  display: none;
  animation: fadeInUp 0.6s var(--transition-base);
}

.results-section.visible {
  display: block;
}

/* ---- Metric Cards ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  position: relative;
  padding: 24px 20px;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--metric-color, var(--teal));
}

.metric-card__label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-card__value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--metric-color, var(--teal));
  line-height: 1.2;
}

.metric-card__sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.metric-card--median   { --metric-color: var(--gold); }
.metric-card--best     { --metric-color: var(--teal); }
.metric-card--worst    { --metric-color: var(--coral); }
.metric-card--goal     { --metric-color: var(--blue); }
.metric-card--ruin     { --metric-color: var(--coral); }
.metric-card--baseline { --metric-color: var(--purple); }

/* ---- Chart Container ---- */
.chart-container {
  padding: 28px;
  margin-bottom: 32px;
  position: relative;
}

.chart-container__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-container__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.chart-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.chart-legend__swatch {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  min-height: 280px;
}

.chart-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- Risk Gauge ---- */
.risk-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.risk-gauge__bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.risk-gauge__bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.risk-gauge__bar--low      { background: linear-gradient(90deg, var(--teal), #4ade80); }
.risk-gauge__bar--medium   { background: linear-gradient(90deg, #4ade80, var(--gold)); }
.risk-gauge__bar--high     { background: linear-gradient(90deg, var(--gold), var(--coral)); }
.risk-gauge__bar--extreme  { background: linear-gradient(90deg, var(--coral), #ef4444); }

.risk-gauge__label {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 100px;
}

.risk-gauge__score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}

/* ---- Narrative ---- */
.narrative-panel {
  padding: 32px;
  margin-bottom: 32px;
}

.narrative-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.narrative-panel__icon {
  width: 32px;
  height: 32px;
  background: rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.narrative-panel__title {
  font-size: 1rem;
  font-weight: 600;
}

.narrative-content {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.narrative-content h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.narrative-content h3:first-child {
  margin-top: 0;
}

.narrative-content .section-icon {
  font-size: 1rem;
}

.narrative-content p {
  margin-bottom: 12px;
}

.narrative-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.narrative-content .highlight-teal { color: var(--teal); font-weight: 600; }
.narrative-content .highlight-coral { color: var(--coral); font-weight: 600; }
.narrative-content .highlight-gold { color: var(--gold); font-weight: 600; }

/* ---- Narrative Sections ---- */
.narrative-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

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

.narrative-section--decision {
  margin-top: 8px;
}

/* ---- Narrative Assumptions ---- */
.narrative-assumptions {
  margin-top: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border-left: 3px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
}

.narrative-assumptions ul {
  margin: 6px 0 0 18px;
  list-style: disc;
}

.narrative-assumptions li {
  margin-bottom: 3px;
  color: var(--text-muted);
}

/* ---- Narrative Outcomes Grid ---- */
.narrative-outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.narrative-outcome {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.04);
}

.narrative-outcome__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.narrative-outcome__value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
}

.narrative-outcome--gold .narrative-outcome__value { color: var(--gold); }
.narrative-outcome--teal .narrative-outcome__value { color: var(--teal); }
.narrative-outcome--coral .narrative-outcome__value { color: var(--coral); }
.narrative-outcome--blue .narrative-outcome__value { color: var(--blue); }

.narrative-outcome__desc {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.narrative-comparison {
  margin-top: 8px;
  font-size: 0.88rem;
}

/* ---- Risk Items ---- */
.risk-item {
  padding-left: 4px;
}

.risk-score-line {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ---- Behavioral Insight Cards in Narrative ---- */
.behavioral-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.behavioral-health-badge__icon { font-size: 1.1rem; }
.behavioral-health-badge__label { color: var(--text-muted); font-weight: 500; }
.behavioral-health-badge__score { font-family: var(--font-mono); font-weight: 700; }

.behavioral-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.behavioral-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
  min-width: 100px;
}

.behavioral-metric__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.behavioral-metric__value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.behavioral-insight-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border-left: 3px solid;
}

.behavioral-insight-card--critical {
  background: rgba(255,107,107,0.05);
  border-left-color: var(--coral);
}

.behavioral-insight-card--warning {
  background: rgba(255,217,61,0.05);
  border-left-color: var(--gold);
}

.behavioral-insight-card--info {
  background: rgba(0,212,170,0.03);
  border-left-color: var(--teal);
}

.behavioral-insight-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.behavioral-insight-card__metric {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 4px;
}

.behavioral-insight-card__rec {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- Decision Verdicts ---- */
.decision-verdict {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-top: 8px;
  border-left: 4px solid;
}

.decision-verdict--safe {
  background: rgba(0,212,170,0.06);
  border-left-color: var(--teal);
}

.decision-verdict--moderate {
  background: rgba(255,217,61,0.05);
  border-left-color: var(--gold);
}

.decision-verdict--risky {
  background: rgba(255,107,107,0.05);
  border-left-color: var(--coral);
}

/* ---- Narrative Source Badge ---- */
.narrative-source {
  margin-left: auto;
}

.source-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 4px;
}

.source-badge--template {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Narrative Loading ---- */
.narrative-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.narrative-loading__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 212, 170, 0.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ---- Comparison Panel ---- */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.comparison-card {
  padding: 24px;
}

.comparison-card__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comparison-card__title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.comparison-card--baseline .dot { background: var(--purple); }
.comparison-card--scenario .dot { background: var(--teal); }

.comparison-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comparison-row:last-child { border-bottom: none; }

.comparison-row__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.comparison-row__value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.comparison-row__value--positive { color: var(--teal); }
.comparison-row__value--negative { color: var(--coral); }
.comparison-row__value--neutral  { color: var(--text-primary); }

/* ---- Custom Scenario Panel ---- */
.custom-panel {
  display: none;
  padding: 24px;
  margin-top: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.custom-panel.visible {
  display: block;
  animation: fadeInUp 0.3s var(--transition-base);
}

.custom-panel .input-grid {
  margin-bottom: 0;
}

/* ---- Scenario Parameter Panels ---- */
.scenario-params-panel {
  display: none;
  padding: 24px;
  margin-top: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
}

.scenario-params-panel.visible {
  display: block;
  animation: fadeInUp 0.3s var(--transition-base);
}

.scenario-params-panel .input-grid {
  margin-bottom: 0;
}

.scenario-params-panel .section-title {
  margin-bottom: 18px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.scenario-params-summary {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(0, 212, 170, 0.04);
  border: 1px solid rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.6;
}

.scenario-params-summary:empty {
  display: none;
}

.scenario-params-summary strong {
  color: var(--teal);
}

/* ===================================================
   CHAT PANEL — Floating conversational AI interface
   =================================================== */

/* ---- FAB Button ---- */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,212,170,0.35), var(--shadow-md);
  transition: all var(--transition-base);
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(0,212,170,0.45), var(--shadow-lg);
}

.chat-fab__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.chat-fab__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  opacity: 0;
  animation: fab-pulse 2.5s ease-in-out infinite;
}

@keyframes fab-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}

.chat-fab.hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

/* ---- Chat Panel ---- */
.chat-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 420px;
  height: 600px;
  max-height: calc(100vh - 56px);
  background: var(--bg-deep);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,212,170,0.08);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
}

.chat-panel.visible {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ---- Chat Header ---- */
.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
}

.chat-panel__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-panel__avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-panel__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-panel__status {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.chat-panel__status[data-mode="live"] {
  color: var(--teal);
}

.chat-panel__status[data-mode="setup"] {
  color: var(--gold);
}

.chat-panel__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.chat-panel__close:hover {
  background: rgba(255,107,107,0.1);
  color: var(--coral);
  border-color: rgba(255,107,107,0.2);
}

/* ---- Chat Messages ---- */
.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.chat-panel__messages::-webkit-scrollbar {
  width: 4px;
}

.chat-panel__messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.chat-message {
  display: flex;
  gap: 10px;
  max-width: 95%;
  animation: fadeInUp 0.3s ease;
}

.chat-message--user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.chat-message--ai {
  align-self: flex-start;
}

.chat-message__avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.chat-message--ai .chat-message__avatar {
  background: linear-gradient(135deg, rgba(0,212,170,0.15), rgba(96,165,250,0.15));
}

.chat-message--user .chat-message__avatar {
  background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(96,165,250,0.15));
}

.chat-message__bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  line-height: 1.6;
}

.chat-message--ai .chat-message__bubble {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.chat-message--user .chat-message__bubble {
  background: linear-gradient(135deg, rgba(0,212,170,0.12), rgba(96,165,250,0.12));
  border: 1px solid rgba(0,212,170,0.2);
  color: var(--text-primary);
}

.chat-message__bubble p { margin-bottom: 8px; }
.chat-message__bubble p:last-child { margin-bottom: 0; }
.chat-message__bubble ul { margin: 6px 0 8px 16px; font-size: 0.82rem; }
.chat-message__bubble li { margin-bottom: 4px; color: var(--text-muted); }

/* ---- Chat Section Blocks (in AI response) ---- */
.chat-section {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.chat-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.chat-section__header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-section__icon {
  font-size: 0.9rem;
}

/* Chat outcomes mini-grid */
.chat-outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}

.chat-outcome {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
  font-size: 0.78rem;
}

.chat-outcome__label { color: var(--text-muted); }
.chat-outcome__value { font-family: var(--font-mono); font-weight: 600; }
.chat-outcome__value--gold { color: var(--gold); }
.chat-outcome__value--teal { color: var(--teal); }
.chat-outcome__value--coral { color: var(--coral); }

.chat-comparison {
  font-size: 0.8rem;
  margin-top: 6px;
}

/* Chat insights */
.chat-insight {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.chat-insight--critical { background: rgba(255,107,107,0.05); }
.chat-insight--warning { background: rgba(255,217,61,0.04); }
.chat-insight--info { background: rgba(0,212,170,0.03); }

.chat-insight__icon { flex-shrink: 0; font-size: 0.9rem; }
.chat-insight__rec { color: var(--text-muted); font-size: 0.75rem; }

/* Chat verdicts */
.chat-verdict {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  border-left: 3px solid;
}

.chat-verdict--safe { background: rgba(0,212,170,0.06); border-left-color: var(--teal); }
.chat-verdict--moderate { background: rgba(255,217,61,0.05); border-left-color: var(--gold); }
.chat-verdict--high-upside { background: rgba(96,165,250,0.06); border-left-color: var(--blue); }
.chat-verdict--risky { background: rgba(255,107,107,0.05); border-left-color: var(--coral); }
.chat-verdict--neutral { background: rgba(255,255,255,0.03); border-left-color: var(--text-muted); }

/* Chat assumptions */
.chat-assumptions {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
  font-size: 0.78rem;
}

.chat-assumptions__label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-assumptions ul {
  margin: 4px 0 0 14px;
  list-style: disc;
}

.chat-assumptions li {
  color: var(--text-muted);
  margin-bottom: 2px;
}

.chat-memory-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

/* ---- Chat Suggested Prompts ---- */
.chat-panel__prompts {
  padding: 8px 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.chat-prompt-chip {
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chat-prompt-chip:hover {
  background: rgba(0,212,170,0.08);
  border-color: rgba(0,212,170,0.2);
  color: var(--teal);
}

.chat-memory {
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.chat-memory__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.chat-memory__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-memory__chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.16);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.chat-memory__empty {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- Chat Input ---- */
.chat-panel__input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
}

.chat-panel__input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.chat-panel__input:focus {
  border-color: var(--teal);
}

.chat-panel__input::placeholder {
  color: var(--text-dim);
}

.chat-panel__send {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-deepest);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-panel__send:hover {
  box-shadow: 0 0 16px var(--teal-glow);
  transform: scale(1.05);
}

.chat-panel__send:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

/* ---- Typing Indicator ---- */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-indicator__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator__dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* ---- Health Indicator Tooltips ---- */
.health-indicator.has-tooltip {
  position: relative;
  cursor: help;
}

.health-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  pointer-events: none;
  animation: fadeInUp 0.2s ease;
}

.health-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-surface);
}

.health-tooltip strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.health-tooltip p {
  margin: 0;
}

.health-indicator.has-tooltip:hover .health-tooltip {
  display: block;
}

.ht-good { color: var(--teal); font-weight: 600; }
.ht-warn { color: var(--gold); font-weight: 600; }
.ht-bad  { color: var(--coral); font-weight: 600; }

/* ---- Run Buttons Row ---- */
.run-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ---- Compare All Button ---- */
.compare-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: rgba(167, 139, 250, 0.1);
  color: var(--purple);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
}

.compare-all-btn:hover {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--purple-glow);
}

.compare-all-btn:active { transform: translateY(0); }

.compare-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.compare-all-btn__icon { font-size: 1.1rem; }

/* ---- Scenario Comparison Table ---- */
.compare-table-section {
  display: none;
  margin-bottom: 32px;
  animation: fadeInUp 0.5s var(--transition-base);
}

.compare-table-section.visible {
  display: block;
}

.compare-table-card {
  padding: 28px;
  overflow: hidden;
}

.compare-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.compare-table-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.compare-table-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.compare-table-close:hover {
  background: rgba(255,107,107,0.1);
  color: var(--coral);
}

.compare-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: center;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}

.compare-table th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  position: sticky;
  top: 0;
  z-index: 2;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  position: sticky;
  left: 0;
  background: var(--bg-deep);
  z-index: 1;
}

.compare-table th:first-child {
  z-index: 3;
}

.compare-table td {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-secondary);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.compare-table .ct-scenario-icon {
  margin-right: 6px;
  font-style: normal;
}

.compare-table .ct-best {
  color: var(--teal);
  font-weight: 700;
  position: relative;
}

.compare-table .ct-worst {
  color: var(--coral);
  font-weight: 600;
}

.compare-table .ct-highlight-row td {
  background: rgba(0, 212, 170, 0.04);
}

/* ---- Confetti Canvas ---- */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ---- Risk Gauge Glow ---- */
.risk-gauge__bar::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: inherit;
  box-shadow: 0 0 12px currentColor, 0 0 4px currentColor;
  animation: gauge-pulse 2s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.risk-gauge__bar[style*="width"]:not([style*="width: 0"]) .risk-gauge__bar::after {
  opacity: 1;
}

@keyframes gauge-pulse {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* ---- Chart Tooltip ---- */
.chart-tooltip {
  position: absolute;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 50;
  min-width: 160px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip__title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.chart-tooltip__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 3px 0;
}

.chart-tooltip__label {
  color: var(--text-muted);
}

.chart-tooltip__value {
  font-family: var(--font-mono);
  font-weight: 600;
}

.chart-tooltip__value--gold { color: var(--gold); }
.chart-tooltip__value--teal { color: var(--teal); }
.chart-tooltip__value--coral { color: var(--coral); }
.chart-tooltip__value--dim { color: var(--text-secondary); }

/* ---- Footer ---- */
.app-footer {
  text-align: center;
  padding: 32px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-in {
  animation: fadeInUp 0.5s var(--transition-base) both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }
.animate-in-delay-5 { animation-delay: 0.5s; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .app-container {
    padding: 20px 16px 48px;
  }

  .app-header__title {
    font-size: 1.5rem;
  }

  .input-panel {
    padding: 20px;
  }

  .input-grid {
    grid-template-columns: 1fr 1fr;
  }

  .scenario-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .chart-canvas-wrap {
    aspect-ratio: 1.5 / 1;
  }

  .chat-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 12px;
    height: calc(100vh - 80px);
  }

  .health-indicators {
    flex-direction: column;
  }

  .narrative-outcomes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .input-grid {
    grid-template-columns: 1fr;
  }

  .scenario-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card__value {
    font-size: 1.3rem;
  }

  .chat-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  .chat-fab {
    bottom: 16px;
    right: 16px;
  }
}

/* ===================================================
   ACTION PLAN — Decision Guidance expanded cards
   =================================================== */
.action-plan {
  margin-top: 18px;
}

.action-plan h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.action-plan__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.action-plan__card {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  font-size: 0.84rem;
}

.action-plan__card ul {
  margin: 8px 0 0 16px;
  list-style: disc;
}

.action-plan__card li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.action-plan__card li:last-child {
  margin-bottom: 0;
}

.action-plan__card-header {
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.action-plan__card--immediate {
  background: rgba(255, 107, 107, 0.04);
  border-left-color: var(--coral);
}

.action-plan__card--immediate .action-plan__card-header {
  color: var(--coral);
}

.action-plan__card--short {
  background: rgba(255, 217, 61, 0.04);
  border-left-color: var(--gold);
}

.action-plan__card--short .action-plan__card-header {
  color: var(--gold);
}

.action-plan__card--long {
  background: rgba(0, 212, 170, 0.04);
  border-left-color: var(--teal);
}

.action-plan__card--long .action-plan__card-header {
  color: var(--teal);
}

/* ===================================================
   EARNING STRATEGIES — New Section 6
   =================================================== */
.narrative-section--earning {
  border-top: 1px solid rgba(255, 217, 61, 0.12);
  padding-top: 20px;
}

.earning-gap-analysis {
  padding: 14px 18px;
  background: rgba(255, 217, 61, 0.05);
  border: 1px solid rgba(255, 217, 61, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.earning-success {
  padding: 14px 18px;
  background: rgba(0, 212, 170, 0.06);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.earning-tip {
  padding: 14px 18px;
  background: rgba(96, 165, 250, 0.05);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.earning-strategies-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .earning-strategies-grid {
    grid-template-columns: 1fr;
  }
}

.earning-strategy-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.earning-strategy-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.earning-strategy-card__icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.earning-strategy-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.earning-strategy-card__body {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.earning-strategy-card__body p {
  margin-bottom: 10px;
}

.earning-strategy-card__body ul {
  margin: 8px 0 0 16px;
  list-style: disc;
}

.earning-strategy-card__body li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.earning-strategy-card__body li:last-child {
  margin-bottom: 0;
}

/* Earning summary callout */
.earning-summary-callout {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06), rgba(96, 165, 250, 0.06));
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.earning-summary-callout strong {
  color: var(--text-primary);
}

.earning-summary-callout--success {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08), rgba(74, 222, 128, 0.06));
  border-color: rgba(0, 212, 170, 0.2);
}
