/* ==========================================================================
   Credit Card Reality Simulator - Stylesheet (ccsim.css)
   Clean, modern, responsive design for tablets, phones, and desktop
   High School Personal Finance Education Lab
   ========================================================================== */

:root {
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Color Palette */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-dark: #1d4ed8;
  
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  
  --success: #16a34a;
  --success-light: #f0fdf4;
  --success-border: #bbf7d0;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  padding: 1rem 0.75rem 3rem 0.75rem;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1040px;
  margin: 0 auto;
}

/* ==========================================================================
   Header & Badges
   ========================================================================== */
.app-header {
  text-align: center;
  margin-bottom: 0.75rem;
  padding-top: 0.25rem;
}

.currency-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.2rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.cur-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-sub);
  transition: all 0.15s ease;
  min-height: 30px;
}

.cur-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.app-header h1 {
  font-size: clamp(1.4rem, 3.5vw, 1.95rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  max-width: 600px;
  margin: 0 auto 0.5rem auto;
  line-height: 1.4;
}

/* Mode Switcher Pill */
.mode-switch-wrapper {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0 0.5rem 0;
}

.mode-switch-pill {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  padding: 0.2rem;
  gap: 0.2rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 30px;
  touch-action: manipulation;
}

.mode-btn:hover {
  color: var(--text-main);
}

.mode-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.mode-btn.active .mode-badge {
  background: #2563eb;
  color: #ffffff;
}

/* ==========================================================================
   Mobile/Tablet Sticky Reality Summary Bar
   ========================================================================== */
.sticky-reality-bar {
  position: sticky;
  top: 0.5rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
  padding: 0.6rem 0.9rem;
}

.sticky-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
  gap: 0.5rem;
}

.sticky-stat {
  display: flex;
  flex-direction: column;
}

.sticky-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.sticky-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.sticky-sub {
  font-size: 0.72rem;
  font-weight: 600;
}

.sticky-arrow {
  color: var(--text-muted);
  font-weight: bold;
  font-size: 0.9rem;
}

/* ==========================================================================
   Step Cards (Guided Flow)
   ========================================================================== */
.sim-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ==========================================================================
   STORY MODE: Interactive Wizard & Narrative Styles
   ========================================================================== */
.story-mode-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

/* Free Mode Top Control Card */
.free-mode-top-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.5rem;
}

.free-mode-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.story-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.story-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.story-badge {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.story-step-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.story-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.story-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: var(--radius-full);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem;
  transition: all 0.25s ease;
}

@media (min-width: 640px) {
  .story-card {
    padding: 2.25rem 2rem;
  }
}

.story-icon-header {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.story-title {
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.story-narrative {
  color: var(--text-sub);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Item Preview */
.story-item-preview {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.35rem;
}

.item-preview-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.item-preview-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.item-preview-details strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.item-preview-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.item-preview-details small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.story-callout-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
}

.story-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.story-action-row.secondary {
  justify-content: flex-start;
}

.story-action-row.mirror-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.story-primary-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  touch-action: manipulation;
}

.story-primary-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -1px rgba(37, 99, 235, 0.35);
}

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

.story-back-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.story-back-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.story-replay-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.story-replay-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.story-explore-sandbox-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  box-shadow: var(--shadow-sm);
}

.story-explore-sandbox-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Choice Cards Grid */
.story-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .story-choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .story-choice-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.story-choice-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  font-family: inherit;
}

.story-choice-card:hover,
.story-choice-card:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.choice-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.choice-icon {
  font-size: 2rem;
  line-height: 1;
}

.choice-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: #334155;
  letter-spacing: 0.03em;
}

.choice-badge.amber { background: #fef3c7; color: #b45309; }
.choice-badge.red   { background: #fee2e2; color: #b91c1c; }
.choice-badge.blue  { background: #dbeafe; color: #1e40af; }
.choice-badge.green { background: #dcfce7; color: #15803d; }

.choice-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.choice-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.choice-cta {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.choice-cta.red   { color: var(--danger); }
.choice-cta.blue  { color: var(--primary); }
.choice-cta.green { color: var(--success); }
.choice-cta.amber { color: var(--warning); }

.story-choice-card.trap:hover {
  border-color: var(--danger);
}
.story-choice-card.smart:hover {
  border-color: var(--primary);
}
.story-choice-card.hero:hover {
  border-color: var(--success);
}
.story-choice-card.warning:hover {
  border-color: var(--warning);
}

/* Phase 4: Outcome Card */
.story-outcome-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 2px solid #cbd5e1;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
}

.story-outcome-card.trap {
  border-color: #fca5a5;
  background: linear-gradient(180deg, #fffafa, #ffffff);
}

.story-outcome-card.smart {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8faff, #ffffff);
}

.story-outcome-card.hero {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}

.story-outcome-card.warning {
  border-color: #fde047;
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.outcome-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.outcome-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: #1e293b;
}

.outcome-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.outcome-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 580px) {
  .outcome-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.outcome-stat {
  display: flex;
  flex-direction: column;
}

.outcome-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.outcome-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.outcome-stat small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

.outcome-verdict-box {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

/* The Contrast Mirror */
.mirror-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 1.75rem 0 1rem 0;
}

.story-mirror-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .story-mirror-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mirror-card {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.mirror-card.wise {
  border-color: #86efac;
  background: #f0fdf4;
}

.mirror-card.trap {
  border-color: #fca5a5;
  background: #fef2f2;
}

.mirror-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  font-weight: 800;
}

.mirror-card.wise .mirror-card-head {
  color: #166534;
}

.mirror-card.trap .mirror-card-head {
  color: #991b1b;
}

.mirror-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.mirror-tag.green {
  background: #dcfce7;
  color: #15803d;
}

.mirror-tag.red {
  background: #fee2e2;
  color: #b91c1c;
}

.mirror-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.mirror-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mirror-list li {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #334155;
  padding-left: 0.85rem;
  position: relative;
}

.mirror-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: bold;
}

.mirror-card.wise .mirror-list li::before {
  color: var(--success);
}

.mirror-card.trap .mirror-list li::before {
  color: var(--danger);
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.step-header .currency-toggle {
  margin-left: auto;
}

.step-number {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.step-header-text h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.step-header-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ==========================================================================
   Step 1: Purchase Presets & Custom Input
   ========================================================================== */
.preset-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 72px;
  touch-action: manipulation;
}

.chip-icon {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.chip-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.chip-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chip:hover {
  background: var(--bg-hover);
}

.chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.chip.active .chip-price {
  color: var(--primary-dark);
}

.amount-input-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-light);
}

.input-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
}

.input-with-symbol {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  flex: 1;
  min-width: 140px;
}

.currency-prefix {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-right: 0.35rem;
}

.num-input {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  width: 100%;
  outline: none;
}

.purchase-amount-badge {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Step 2: Choose Payment Habit
   ========================================================================== */
.habit-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.habit-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.habit-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.habit-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: #ffffff;
  transition: all 0.2s ease;
  min-height: 130px;
}

.habit-card:hover .habit-card-inner {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.habit-card.active .habit-card-inner {
  box-shadow: var(--shadow-md);
}

.habit-card.trap-card.active .habit-card-inner {
  border-color: var(--danger);
  background: #fffafa;
}

.habit-card.smart-card.active .habit-card-inner {
  border-color: var(--primary);
  background: #f8fbff;
}

.habit-card.hero-card.active .habit-card-inner {
  border-color: var(--success);
  background: #f8fdf9;
}

.habit-card.promo-card.active .habit-card-inner {
  border-color: var(--warning);
  background: #fffdf8;
}

.habit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.habit-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.danger-badge { background: var(--danger-light); color: var(--danger); }
.blue-badge { background: var(--primary-light); color: var(--primary); }
.green-badge { background: var(--success-light); color: var(--success); }
.amber-badge { background: var(--warning-light); color: var(--warning); }

.habit-icon { font-size: 0.95rem; }

.habit-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.habit-desc {
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.35;
  flex: 1;
  margin-bottom: 0.5rem;
}

.habit-highlight {
  font-size: 0.72rem;
  font-weight: 700;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-light);
}

/* Habit Sub-Panels */
.habit-sub-panel {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.sub-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.value-pill {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.value-pill.highlight {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.sub-panel-rule-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.rule-box-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.rule-box-header div {
  flex: 1;
}

.rule-box-header strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.25;
}

.rule-box-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rule-box-icon {
  font-size: 1.25rem;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #cbd5e1;
  outline: none;
  cursor: pointer;
  margin: 0.4rem 0;
  accent-color: var(--primary);
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.sub-panel-hint {
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.4;
  margin-top: 0.4rem;
}

.quick-fixed-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-sub);
  min-height: 38px;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background: var(--bg-hover);
}

.pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.promo-scenario-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem 0;
}

.promo-scen-btn {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.promo-scen-btn:hover {
  border-color: #94a3b8;
  background: var(--bg-hover);
}

.scen-btn-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.scen-icon {
  font-size: 0.95rem;
}

.scen-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-left: 1.3rem;
}

.promo-scen-btn.active[data-promo-scen="ideal"] {
  border-color: var(--success);
  background: #f0fdf4;
}

.promo-scen-btn.active[data-promo-scen="ideal"] .scen-sub {
  color: #15803d;
}

.promo-scen-btn.active[data-promo-scen="slip11"] {
  border-color: var(--warning);
  background: #fffbeb;
}

.promo-scen-btn.active[data-promo-scen="slip11"] .scen-sub {
  color: #b45309;
}

.promo-scen-btn.active[data-promo-scen="slipmin"] {
  border-color: var(--danger);
  background: #fef2f2;
}

.promo-scen-btn.active[data-promo-scen="slipmin"] .scen-sub {
  color: #b91c1c;
}

.promo-scenario-banner {
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.promo-scenario-banner.ideal-banner {
  background: var(--success-light);
  border: 1px solid var(--success-border);
  color: #14532d;
}

.promo-scenario-banner.slip11-banner {
  background: var(--warning-light);
  border: 1px solid var(--warning-border);
  color: #78350f;
}

.promo-scenario-banner.slipmin-banner {
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: #7f1d1d;
}

.success-banner {
  background: var(--success-light);
  border: 1px solid var(--success-border);
  color: #14532d;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Step 3: The 4 Core Financial Realities
   ========================================================================== */
.reality-dashboard-card {
  border-color: #94a3b8;
  background: #ffffff;
}

.realities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 820px) {
  .realities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.reality-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
}

.reality-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.reality-num {
  background: #0f172a;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.reality-box-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
}

.reality-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.danger-tag { background: var(--danger-light); color: var(--danger); }
.time-tag { background: #ede9fe; color: #5b21b6; }
.alert-tag { background: #fef3c7; color: #92400e; }
.hero-tag { background: var(--success-light); color: var(--success); }

/* Reality 1: True Price Tag / Receipt */
.receipt-card {
  background: #ffffff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--text-sub);
}

.receipt-row.interest-row {
  color: var(--danger);
  font-weight: 700;
}

.receipt-divider {
  border-bottom: 1px dashed #cbd5e1;
  margin: 0.5rem 0;
}

.receipt-row.total-row {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0;
}

.receipt-total-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.stacked-bar-container {
  margin-bottom: 0.85rem;
}

.stacked-bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.stacked-bar {
  display: flex;
  height: 14px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: #e2e8f0;
}

.bar-principal {
  background: #3b82f6;
  transition: width 0.3s ease;
}

.bar-interest {
  background: #ef4444;
  transition: width 0.3s ease;
}

.opp-punchline-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin-top: auto;
}

.opp-icon {
  font-size: 1.1rem;
}

.opp-text strong {
  display: block;
  font-size: 0.78rem;
  color: #92400e;
  margin-bottom: 0.15rem;
}

.opp-text p {
  font-size: 0.78rem;
  color: #78350f;
  line-height: 1.35;
}

/* Reality 2: Payoff Horizon & Paycheck Drain */
.freedom-badge-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.freedom-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.freedom-date-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #4338ca;
  margin: 0.15rem 0;
}

.freedom-sub-text {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.product-age-warning {
  background: #fef2f2;
  border-left: 3px solid var(--danger);
  padding: 0.55rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.78rem;
  color: #991b1b;
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.paycheck-slice-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: auto;
}

.paycheck-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
  color: var(--text-sub);
}

.debt-slice-badge {
  font-weight: 800;
  color: var(--danger);
}

.paycheck-bar {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 24px;
  margin-bottom: 0.5rem;
}

.slice-debt {
  background: #dc2626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.3rem;
  transition: width 0.3s ease;
}

.slice-living {
  background: #16a34a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.3rem;
  transition: width 0.3s ease;
}

.debt-stack-tip {
  font-size: 0.73rem;
  color: var(--text-sub);
  line-height: 1.35;
}

/* Reality 3: Minimum Payment Treadmill */
.trap-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.payment-split-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.split-total-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--border-light);
  margin-bottom: 0.6rem;
}

.split-columns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 0.5rem;
}

.split-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.split-col-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.split-col-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.15rem 0;
}

.split-col-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.split-col-plus {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
}

.treadmill-note {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  font-size: 0.76rem;
  color: var(--text-sub);
  line-height: 1.4;
  margin-top: auto;
}

/* Reality 4: The Antidote */
.antidote-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.antidote-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.antidote-col {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 105px;
}

.antidote-col.trap { border-color: var(--danger-border); }
.antidote-col.smart { border-color: #93c5fd; background: #f8fbff; }
.antidote-col.hero { border-color: var(--success-border); background: #f8fdf9; }

.antidote-head {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.antidote-metric {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.2rem 0;
}

.antidote-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.antidote-tag {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-full);
  margin-top: 0.3rem;
  background: #f1f5f9;
  color: var(--text-sub);
}

.antidote-tag.green { background: #dcfce7; color: #15803d; }
.antidote-tag.gold { background: #fef08a; color: #854d0e; }

.hero-rule-box {
  background: #f0fdf4;
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  font-size: 0.78rem;
  color: #14532d;
  line-height: 1.4;
  margin-top: auto;
}

/* ==========================================================================
   Step 4: Deep Dive Accordion & Teacher Tools
   ========================================================================== */
.deep-dive-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0;
  overflow: hidden;
}

.deep-dive-accordion summary {
  list-style: none;
}

.deep-dive-accordion summary::-webkit-details-marker {
  display: none;
}

.deep-dive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  background: #ffffff;
  user-select: none;
  min-height: 60px;
}

.deep-dive-summary:hover {
  background: var(--bg-subtle);
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.summary-icon {
  font-size: 1.3rem;
}

.summary-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.summary-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.summary-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.deep-dive-accordion[open] .summary-chevron {
  transform: rotate(180deg);
}

.deep-dive-content {
  padding: 1.25rem;
  border-top: 1px solid var(--border-light);
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.deep-dive-control-group {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.deep-dive-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.rate-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rate-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-sub);
  min-height: 38px;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.rate-btn:hover { background: var(--bg-hover); }
.rate-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Amortization Chart */
.amortization-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.chart-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.chart-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.bar-swatch-principal { background: #3b82f6; }
.bar-swatch-debt { background: #ef4444; }

.chart-wrapper {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.svg-container {
  width: 100%;
  height: 220px;
  touch-action: none;
  cursor: ew-resize;
}

.svg-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.touch-hint-bar {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
}

/* Month Detail Card */
.month-detail-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.detail-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-badge {
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.detail-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.detail-progress-pill {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}

.detail-stat-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.15rem 0;
}

.stat-sub-pills {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.sub-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.sub-pill.blue { background: #dbeafe; color: #1e40af; }
.sub-pill.red { background: #fee2e2; color: #991b1b; }

.stat-note {
  font-size: 0.72rem;
  color: var(--text-sub);
}

/* Comparison Table */
.comparison-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.comparison-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
  background: var(--bg-subtle);
  font-weight: 800;
  color: var(--text-sub);
}

.comparison-table tr.highlight-row {
  background: #eff6ff;
  font-weight: 600;
}

.badge-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  margin-left: 0.3rem;
}

.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* Opportunity Cost Expanded */
.opportunity-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

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

.opportunity-header h4 {
  font-size: 0.95rem;
  font-weight: 800;
}

.opp-intro {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
}

.opp-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}

.opp-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  text-align: center;
}

.opp-item-icon { font-size: 1.4rem; }
.opp-item-count { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin: 0.15rem 0; }
.opp-item-name { font-size: 0.72rem; color: var(--text-sub); font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-columns .col h4 {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.footer-columns .col ul {
  list-style: none;
}

.footer-columns .col ul li {
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.45;
  margin-bottom: 0.45rem;
  padding-left: 0.75rem;
  position: relative;
}

.footer-columns .col ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.danger-text { color: var(--danger) !important; }
.green-text { color: var(--success) !important; }
.blue-text { color: var(--primary) !important; }
.amber-text { color: var(--warning) !important; }

/* SVG Bar styling */
.bar-group rect.bar-principal { fill: #3b82f6; }
.bar-group rect.bar-debt { fill: #ef4444; }
.bar-group.selected rect.bar-principal { fill: #1d4ed8; }
.bar-group.selected rect.bar-debt { fill: #b91c1c; }
