/* Napkin Method CSS - Migrated from Google Apps Script */
:root {
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --secondary: #764ba2;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --bg-light: #f9fafb;
  --border: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  min-height: 100vh;
  color: var(--text-primary);
}

/* Header Bar */
.napkin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.napkin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
}

.logo-icon {
  font-size: 24px;
}

.btn-exit {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-exit:hover {
  background: var(--primary);
  color: #fff;
}

/* Main Container */
#napkinView {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Progress Bar */
.napkin-progress {
  display: none; /* Hidden until mode selected */
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

/* Show progress bar after mode selection */
body.mode-selected .napkin-progress {
  display: flex;
}

.napkin-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 4px;
  background: var(--border);
  z-index: 0;
}

.napkin-progress-line {
  position: absolute;
  top: 20px;
  left: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  width: 0%;
}

/* Back Step - Step 0 */
.napkin-back-step {
  flex: 0 0 auto !important; /* Don't grow/shrink like other steps */
  margin-right: -20px; /* Move closer to Step 1 */
  position: relative;
  z-index: 10 !important; /* Ensure it appears above Step 1 */
}

.napkin-progress-back {
  width: 32px;
  height: 44px;
  border-radius: 8px; /* Soft corners */
  background: #fff;
  border: 3px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.napkin-back-step:hover .napkin-progress-back {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

/* Mode Selector */
.napkin-mode-selector {
  margin-bottom: 40px;
  padding: 0;
  animation: fadeIn 0.5s ease;
}

.mode-selector-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  text-align: center;
}

.mode-selector-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mode-selector-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 32px 0;
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  background: white;
  border: 3px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 180px;
}

.mode-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.mode-btn:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

.mode-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.mode-btn.active .mode-icon {
  transform: scale(1.1);
}

.mode-btn.active .mode-title,
.mode-btn.active .mode-desc {
  color: white;
}

.mode-icon {
  font-size: 48px;
  line-height: 1;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.mode-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.mode-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

/* Mobile responsiveness for mode selector */
@media (max-width: 768px) {
  .mode-selector-card {
    padding: 28px 20px;
  }

  .mode-selector-title {
    font-size: 24px;
  }

  .mode-selector-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .mode-options {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mode-btn {
    padding: 24px 20px;
    min-height: 140px;
  }

  .mode-icon {
    font-size: 40px;
  }

  .mode-title {
    font-size: 18px;
  }

  .mode-desc {
    font-size: 13px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.napkin-progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.napkin-progress-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
}

.napkin-progress-step.active .napkin-progress-circle {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-color: var(--primary);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.napkin-progress-step.completed .napkin-progress-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.napkin-progress-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.napkin-progress-step.active .napkin-progress-label {
  color: var(--primary);
  font-weight: 600;
}

/* Step Container */
.napkin-step {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 2px solid transparent;
  display: none;
  animation: slideUp 0.4s ease;
}

/* FOUC Prevention: Hide steps until JavaScript is ready */
.napkin-step.active {
  display: none;
}

/* Only show active steps after JavaScript has initialized */
body.js-ready .napkin-step.active {
  display: block;
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.napkin-step-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.napkin-step-icon {
  font-size: 36px;
}

.napkin-step-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Input Grid */
.napkin-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.napkin-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.napkin-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.napkin-input-group input {
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.2s ease;
  background: #fff;
}

.napkin-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper.currency {
  position: relative;
}

.input-wrapper.currency .input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-wrapper.currency input {
  padding-left: 32px;
}

/* Spinner Buttons for Input Fields */
.spinner-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.spinner-wrapper input {
  padding-right: 16px;
  flex: 1;
  transition: padding-right 0.2s ease;
}

.spinner-wrapper:hover input,
.spinner-wrapper:focus-within input {
  padding-right: 44px;
}

.spinner-buttons {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spinner-wrapper:hover .spinner-buttons,
.spinner-wrapper:focus-within .spinner-buttons {
  opacity: 1;
  pointer-events: auto;
}

.spinner-btn {
  width: 32px;
  height: 20px;
  border: none;
  background: var(--bg-light);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.spinner-btn:first-child {
  border-radius: 6px 6px 2px 2px;
}

.spinner-btn:last-child {
  border-radius: 2px 2px 6px 6px;
}

.spinner-btn:hover {
  background: var(--primary);
  color: #fff;
}

.spinner-btn:active {
  transform: scale(0.95);
  background: var(--secondary);
}

/* Quote Box */
.napkin-quote {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 24px 28px;
  border-radius: 16px;
  margin: 24px 0;
  font-size: 17px;
  font-style: italic;
  line-height: 1.7;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.napkin-quote strong {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Calculation Boxes */
.napkin-calculation {
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.napkin-calc-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.napkin-calc-step {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 12px;
  margin: 16px 0;
  border-left: 4px solid var(--primary);
}

.napkin-calc-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.napkin-calc-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.napkin-calc-formula {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-family: 'Courier New', monospace;
}

.napkin-calc-highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid var(--warning);
  padding: 28px;
  border-radius: 16px;
  margin: 24px 0;
  text-align: center;
}

.napkin-calc-highlight-label {
  font-size: 13px;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.napkin-calc-highlight-value {
  font-size: 48px;
  font-weight: 800;
  color: #92400e;
}

.napkin-calc-highlight-subtitle {
  font-size: 14px;
  color: #b45309;
  margin-top: 8px;
}

/* ============================================
   Step 2 - Horizontal Equation Layout
   ============================================ */
.step2-intro {
  text-align: center;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.equation-section {
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 16px;
  padding: 28px;
  margin: 24px 0;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.equation-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 24px;
}

.equation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.equation-card {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  position: relative;
  min-width: 140px;
  flex: 1;
  max-width: 200px;
}

.equation-card.result {
  background: linear-gradient(135deg, #f8f5ff 0%, #eef5ff 100%);
  border-color: var(--primary);
  border-width: 3px;
  max-width: 240px;
}

.equation-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.equation-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  margin-top: 4px;
}

.equation-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.equation-card.result .equation-value {
  color: var(--primary);
  font-size: 28px;
}

.equation-sublabel {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.equation-operator {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  padding: 0 8px;
  flex-shrink: 0;
}

/* Collapsible Header */
.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  color: var(--text-primary);
  background: transparent;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.collapsible-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.collapsible-header:active {
  background: rgba(0, 0, 0, 0.04);
}

.collapse-indicator {
  font-size: 0.7rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  transform: rotate(-90deg);
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.collapsible-header:hover .collapse-indicator {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.collapse-indicator.expanded {
  transform: rotate(0deg);
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
  .equation-row {
    flex-direction: column;
    gap: 24px;
  }

  .equation-card {
    width: 100%;
    max-width: none;
  }

  .equation-card.result {
    max-width: none;
  }

  .equation-operator {
    transform: rotate(90deg);
    padding: 8px 0;
  }
}

/* Comparison Cards */
.napkin-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

@media (max-width: 768px) {
  .napkin-comparison {
    grid-template-columns: 1fr;
  }
}

.napkin-comparison-card {
  padding: 28px;
  border-radius: 16px;
  border: 3px solid;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.napkin-comparison-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
}

.napkin-comparison-card.bad {
  border-color: var(--danger);
  background: #fef2f2;
}

.napkin-comparison-card.bad::before {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.napkin-comparison-card.good {
  border-color: var(--success);
  background: #ecfdf5;
}

.napkin-comparison-card.good::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.napkin-comparison-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.napkin-comparison-card .big-number {
  font-size: 48px;
  font-weight: 800;
  margin: 16px 0;
}

.napkin-comparison-card.bad .big-number {
  color: #dc2626;
}

.napkin-comparison-card.good .big-number {
  color: #059669;
}

.napkin-comparison-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.napkin-comparison-detail strong {
  color: var(--text-primary);
}

.napkin-comparison-divider {
  margin: 16px 0;
  border-top: 2px solid;
}

.napkin-comparison-card.bad .napkin-comparison-divider {
  border-color: #fecaca;
}

.napkin-comparison-card.good .napkin-comparison-divider {
  border-color: #a7f3d0;
}

.tax-penalty-callout {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
  text-align: center;
  font-weight: 500;
}

.savings-callout {
  background: #d1fae5;
  color: #065f46;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
  text-align: center;
  font-weight: 600;
}

/* Step 4 - The Reveal */
.napkin-reveal {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  border-radius: 20px;
  padding: 32px;
  margin: 24px 0;
  color: #fff;
}

.napkin-reveal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.reveal-icon {
  font-size: 32px;
}

.reveal-title {
  font-size: 22px;
  font-weight: 700;
}

.napkin-reveal-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin: 24px 0;
}

.napkin-reveal-old,
.napkin-reveal-new {
  background: rgba(255, 255, 255, 0.15);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
}

.napkin-reveal-old-label,
.napkin-reveal-new-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.napkin-reveal-old-value {
  font-size: 28px;
  font-weight: 700;
  text-decoration: line-through;
  opacity: 0.7;
}

.napkin-reveal-arrow {
  font-size: 32px;
  font-weight: 700;
}

.napkin-reveal-new-value {
  font-size: 36px;
  font-weight: 800;
}

.napkin-reveal-new-subtitle {
  font-size: 14px;
  margin-top: 8px;
  opacity: 0.9;
}

.napkin-reveal-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.napkin-reveal-benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.napkin-reveal-benefit-icon {
  background: #fff;
  color: var(--success);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

/* Final Illustration Summary */
.napkin-final-illustration {
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 20px;
  padding: 32px;
  margin: 32px 0;
}

.napkin-final-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.napkin-final-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.napkin-final-metric {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.napkin-final-metric.highlight {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: var(--success);
}

.napkin-final-metric-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.napkin-final-metric-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.napkin-final-metric.highlight .napkin-final-metric-value {
  color: var(--success);
}

.napkin-final-metric-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.death-benefit-row {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  margin-top: 20px;
}

.death-benefit-row .napkin-final-metric-label {
  color: rgba(255, 255, 255, 0.8);
}

.death-benefit-row .napkin-final-metric-value {
  color: #fff;
  font-size: 36px;
}

.death-benefit-row .napkin-final-metric-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* Chart Section */
.chart-section {
  margin: 32px 0;
}

.chart-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.chart-container {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px var(--shadow);
}

/* Reality CTA */
.reality-cta {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid var(--warning);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}

.reality-cta-icon {
  font-size: 48px;
}

.reality-cta-text {
  flex: 1;
}

.reality-cta-text strong {
  font-size: 16px;
  color: #92400e;
}

.reality-cta-text p {
  font-size: 14px;
  color: #b45309;
  margin-top: 4px;
}

.btn-reality {
  background: var(--warning);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-reality:hover {
  background: #d97706;
  transform: translateY(-2px);
}

/* Navigation */
.napkin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-warning {
  background: transparent;
  border: 2px solid var(--warning);
  color: var(--warning);
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-warning:hover {
  background: var(--warning);
  color: #fff;
}

.arrow {
  font-weight: 700;
}

/* Step 5 - Booking */
.step5-container {
  max-width: 800px;
  margin: 0 auto;
}

.step5-header {
  text-align: center;
  margin-bottom: 32px;
}

.step5-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.step5-subtitle {
  color: var(--text-secondary);
}

.step5-loading {
  text-align: center;
  padding: 60px 20px;
}

.step5-loading-content {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 16px 28px;
  border-radius: 50px;
  box-shadow: 0 4px 12px var(--shadow);
}

.step5-spinner-small {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.booking-iframe-container {
  width: 100%;
  height: 600px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px var(--shadow);
  border: 2px solid var(--border);
}

.booking-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 40px;
  position: relative;
  animation: slideUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-title {
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}

.modal-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.modal-chart-container {
  height: 400px;
}

.modal-legend {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.green {
  background: var(--success);
}

.legend-color.red {
  background: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
  #napkinView {
    padding: 20px 16px;
  }

  .napkin-step {
    padding: 24px;
  }

  .napkin-step-title {
    font-size: 22px;
  }

  .napkin-calc-highlight-value {
    font-size: 36px;
  }

  .napkin-reveal-comparison {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .napkin-reveal-arrow {
    transform: rotate(90deg);
  }

  .napkin-reveal-benefits {
    grid-template-columns: 1fr;
  }

  .napkin-final-grid {
    grid-template-columns: 1fr;
  }

  .napkin-nav {
    flex-direction: column;
    gap: 16px;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .reality-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   Strategy Toggle (Standard / Max-Funded)
   ============================================ */
.strategy-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.strategy-toggle {
  display: inline-flex;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.strategy-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: var(--text-secondary);
}

.strategy-btn.active {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.strategy-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Max-Funded Active State */
body.max-funded-active {
  --primary: #764ba2;
  --secondary: #667eea;
}

body.max-funded-active .strategy-btn.active {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
}

body.max-funded-active .napkin-reveal {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

body.max-funded-active .napkin-progress-step.active .napkin-progress-circle {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  border-color: #764ba2;
}

body.max-funded-active .napkin-step.active {
  border-color: #764ba2;
  box-shadow: 0 8px 30px rgba(118, 75, 162, 0.15);
}

/* ============================================
   Customize Your Plan Panel
   ============================================ */
.customize-panel {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.customize-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.2s;
}

.customize-toggle:hover {
  background: rgba(0, 0, 0, 0.03);
}

.customize-toggle-icon {
  font-size: 20px;
}

.customize-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.customize-panel.open .customize-arrow {
  transform: rotate(180deg);
}

.customize-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 20px;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.customize-panel.open .customize-content {
  max-height: 2000px;
  opacity: 1;
  padding: 0 20px 24px;
}

/* Slider Groups */
.slider-group {
  margin-bottom: 24px;
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.slider-header label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.slider-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.slider-value.locked {
  color: #764ba2;
}

.slider-range {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Custom Range Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--success) 0%, var(--success) var(--progress, 50%), var(--border) var(--progress, 50%), var(--border) 100%);
  border-radius: 4px;
  outline: none;
  transition: background 0.2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--success);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--success);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Locked Slider State */
.slider-locked {
  opacity: 0.7;
}

.locked-message {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  border: 2px solid #a855f7;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #7c3aed;
}

.locked-message a {
  display: block;
  margin-top: 8px;
  color: #764ba2;
  font-weight: 600;
}

/* Max-Funded slider theme */
body.max-funded-active .slider {
  background: linear-gradient(90deg, #764ba2 0%, #764ba2 var(--progress, 50%), var(--border) var(--progress, 50%), var(--border) 100%);
}

body.max-funded-active .slider::-webkit-slider-thumb {
  background: #764ba2;
}

body.max-funded-active .slider::-moz-range-thumb {
  background: #764ba2;
}

/* Slider Value Group with Reset Button */
.slider-value-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reset-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.reset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-light);
}

/* Reset All Button */
.reset-all-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reset-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.reset-all-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Clickable Cards */
.napkin-final-metric.clickable {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.napkin-final-metric.clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.clickable-hint {
  color: #667eea;
  font-weight: 600;
}

/* Print-Only Elements (hidden on screen) */
.print-header,
.print-disclaimers,
.print-client-info {
  display: none;
}

/* Rate Comparison Modal */
.rate-comparison-modal {
  max-width: 800px;
}

.rate-comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rate-card {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
  position: relative;
}

.rate-card.active {
  border-color: var(--success);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.rate-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.rate-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rate-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.rate-card.active .rate-value {
  color: var(--success);
}

.rate-chart-container {
  height: 300px;
  margin-bottom: 16px;
}

.rate-disclaimer {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .rate-comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Performance Stress Test Modal Styles
   ============================================ */
.stress-test-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-light);
  position: relative;
  /* Context for badge */
  opacity: 0.7;
  /* Dim by default */
  transition: all 0.3s ease;
}

.info-card.active {
  opacity: 1;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.info-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
}

.info-card.active .info-badge {
  opacity: 1;
  transform: translateY(0);
}

.info-card.floor.active .info-badge {
  background: #10b981;
}

.info-card.cap.active .info-badge {
  background: #8b5cf6;
}

.info-card.floor {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.info-card.cap {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
}

.info-icon {
  font-size: 32px;
}

.info-content {
  flex: 1;
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.info-card.floor .info-value {
  color: #10b981;
}

.info-card.cap .info-value {
  color: #8b5cf6;
}

.info-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Stress Test Slider */
.stress-test-slider-container {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.stress-test-slider-container .slider-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
}

.slider-wrapper {
  position: relative;
  margin: 20px 0;
}

.slider-marker {
  position: absolute;
  top: -25px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.slider-marker::after {
  content: '';
  width: 2px;
  height: 35px;
  /* Extends down to slider track */
  background: #374151;
  opacity: 0.5;
}

.marker-label {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.slider-with-value {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.slider-min,
.slider-max {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 32px;
}

.stress-test-slider-container input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, #10b981 0%, #8b5cf6 100%);
  border-radius: 4px;
  outline: none;
}

.stress-test-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: #fff;
  border: 4px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.stress-test-slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-current-value {
  text-align: center;
  margin-top: 12px;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.scenario-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Scenario Presets */
.scenario-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.scenario-btn {
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.scenario-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-light);
}

.scenario-btn.active {
  border-color: var(--success);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
}

/* Stress Test Results */
.stress-test-results {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.result-card.primary {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: var(--success);
}

.result-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.result-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.result-card.primary .result-value {
  font-size: 28px;
  color: var(--success);
}

.result-change {
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}

/* Reality Check Section */
.stress-test-reality {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.stress-test-reality h4 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #92400e;
}

.stress-test-reality ul {
  margin: 0;
  padding-left: 20px;
}

.stress-test-reality li {
  font-size: 13px;
  color: #78350f;
  margin-bottom: 6px;
  line-height: 1.4;
}

.stress-test-reality li:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .stress-test-info {
    grid-template-columns: 1fr;
  }

  .stress-test-results {
    grid-template-columns: 1fr;
  }

  .scenario-presets {
    flex-direction: column;
    align-items: stretch;
  }

  .scenario-btn {
    width: 100%;
  }
}

/* ============================================
   Rate Card Border Colors - Matching Assumed Returns
   ============================================ */
.rate-card[data-rate="5"] {
  border-color: #60a5fa;
}

.rate-card[data-rate="7.05"] {
  border-color: var(--success);
}

.rate-card[data-rate="9"] {
  border-color: #f59e0b;
}

.rate-card[data-rate="12"] {
  border-color: #ef4444;
}

/* Reality Stats in Modal */
.reality-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.reality-stat {
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.reality-stat.iul {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid var(--success);
}

.reality-stat.roth {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 2px solid #8b5cf6;
}

.reality-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.reality-stat-value {
  font-size: 28px;
  font-weight: 800;
}

.reality-stat.iul .reality-stat-value {
  color: var(--success);
}

.reality-stat.roth .reality-stat-value {
  color: #8b5cf6;
}

/* Reality Rate Toggle */
.reality-rate-toggle {
  text-align: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: 12px;
}

.reality-rate-toggle .toggle-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.reality-rate-toggle .toggle-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.reality-rate-toggle .toggle-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.reality-rate-toggle .toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.reality-rate-toggle .toggle-btn.active {
  border-color: var(--success);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
}

.reality-rate-toggle .toggle-hint {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
}

.reality-rate-toggle .toggle-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Reality Income Display Toggle */
.reality-income-toggle {
  text-align: center;
  margin-bottom: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-radius: 12px;
  border: 1px solid #c4b5fd;
}

.reality-income-toggle .toggle-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.reality-income-toggle .toggle-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.reality-income-toggle .toggle-btn {
  padding: 6px 14px;
  border: 2px solid #c4b5fd;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.reality-income-toggle .toggle-btn:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
}

.reality-income-toggle .toggle-btn.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
}

.reality-income-toggle .toggle-hint {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
}

/* Frosted Overlay for Customize Panel when Max-Funded */
body.max-funded-active .customize-content {
  position: relative;
}

.customize-locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 10;
}

.customize-locked-message {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  border: 2px solid #a855f7;
  border-radius: 12px;
  padding: 24px 32px;
  text-align: center;
  font-size: 16px;
  color: #7c3aed;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
}

.customize-locked-message a {
  display: block;
  margin-top: 12px;
  color: #764ba2;
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .reality-stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PRINT STYLES - PDF Layout Match
   ============================================ */
@media print {

  /* Reset page and set professional margins */
  @page {
    margin: 0.75in 0.75in 0.75in 0.75in;
    size: letter;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #fff !important;
    margin: 0;
    padding: 0;
    font-size: 10pt;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1f2937;
    line-height: 1.3;
  }

  /* Hide non-essential elements */
  .napkin-header-bar,
  .napkin-progress,
  .napkin-nav,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-warning,
  .btn-reality,
  .reality-cta,
  .chart-section,
  .strategy-toggle-container,
  .customize-panel,
  #napkinStep1,
  #napkinStep2,
  #napkinStep3,
  #napkinStep5,
  .modal-overlay,
  .napkin-step-title,
  footer,
  #appFooterContent {
    display: none !important;
  }

  /* Ultra-Compact Professional Print Header */
  .print-header {
    display: block !important;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #1e3a5f;
  }

  .print-logo {
    display: none !important; /* Remove emoji in print */
  }

  .print-title {
    font-size: 18pt;
    font-weight: 800;
    color: #1e3a5f;
    margin: 0 0 2px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
  }

  .print-subtitle {
    font-size: 9pt;
    color: #4b5563;
    margin: 0 0 4px;
    text-align: center;
    font-weight: 500;
  }

  .print-date {
    font-size: 7pt;
    color: #6b7280;
    text-align: center;
    font-weight: 400;
  }

  /* Ultra-Compact Client Information Section */
  .print-client-info {
    display: block !important;
    margin-top: 6px;
    padding: 6px 0 0;
    border-top: 1px solid #d1d5db;
  }

  .print-client-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
  }

  .print-client-field {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .print-field-label {
    font-size: 8pt;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
  }

  .print-field-value {
    font-size: 8pt;
    color: #6b7280;
    border-bottom: 1px solid #d1d5db;
    flex: 1;
  }

  .print-assumptions-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 5px;
    background: #f9fafb;
    border-radius: 3px;
    border: 1px solid #e5e7eb;
  }

  .print-assumption {
    text-align: center;
  }

  .print-assumption-label {
    display: block;
    font-size: 6.5pt;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
  }

  .print-assumption-value {
    display: block;
    font-size: 9pt;
    font-weight: 700;
    color: #1e3a5f;
  }

  /* Show only Step 4 content */
  #napkinView {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  #napkinStep4 {
    display: block !important;
    padding: 0 30px 10px;
    border: none;
    box-shadow: none;
    page-break-inside: avoid;
  }

  /* Hide all emoji icons in print */
  .reveal-icon,
  .napkin-step-icon,
  .napkin-reveal-benefit-icon {
    display: none !important;
  }

  /* Ultra-Compact Reveal Section */
  .napkin-reveal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-radius: 4px;
    padding: 8px;
    margin: 6px 0;
    page-break-inside: avoid;
  }

  .napkin-reveal-header {
    text-align: center;
    margin-bottom: 6px;
  }

  .reveal-title {
    font-size: 10pt !important;
    font-weight: 700 !important;
    color: #fff !important;
  }

  .napkin-reveal-comparison {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  .napkin-reveal-old,
  .napkin-reveal-new {
    padding: 8px 12px;
    text-align: center;
  }

  .napkin-reveal-old-value {
    text-decoration: line-through;
    font-size: 14pt;
  }

  .napkin-reveal-new-value {
    font-size: 18pt;
  }

  /* Hide "Click to Compare" hint in print */
  .clickable-hint {
    display: none !important;
  }

  .napkin-final-metric.highlight .napkin-final-metric-subtitle {
    display: none;
  }

  /* Professional Page Footers */
  #napkinStep4::before {
    content: "";
    display: block;
    position: fixed;
    bottom: 0.5in;
    left: 0.75in;
    right: 0.75in;
    padding-top: 8px;
    border-top: 2px solid #1e3a5f;
    font-size: 8pt;
    color: #6b7280;
    text-align: center;
  }

  body::after {
    content: "Page " counter(page) " | Confidential - For Discussion Purposes Only | Incato Financial Solutions";
    display: block;
    position: fixed;
    bottom: 0.4in;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 7pt;
    color: #9ca3af;
    font-weight: 500;
  }

  /* Ultra-Compact Summary Grid */
  .napkin-final-illustration {
    border: 2px solid #1e3a5f !important;
    border-radius: 4px;
    padding: 8px;
    margin: 6px 0 8px;
    page-break-inside: avoid;
  }

  .napkin-final-title {
    font-size: 9pt;
    color: #1e3a5f;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800;
    margin-bottom: 6px;
  }

  .napkin-final-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .napkin-final-metric {
    background: #f8fafc !important;
    padding: 6px;
    text-align: center;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    cursor: default !important;
    transform: none !important;
  }

  .napkin-final-metric-label {
    font-size: 6.5pt;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
  }

  .napkin-final-metric-value {
    font-size: 13pt;
    color: #1e3a5f;
    font-weight: 800;
  }

  .napkin-final-metric-subtitle {
    font-size: 6.5pt;
    color: #9ca3af;
    margin-top: 2px;
  }

  .napkin-final-metric.highlight {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 2px solid #10b981;
  }

  .napkin-final-metric.highlight .napkin-final-metric-value {
    color: #059669;
  }

  /* Ultra-Compact Death Benefit Row */
  .death-benefit-row {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
    color: #fff !important;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    margin-top: 6px;
  }

  .death-benefit-row .napkin-final-metric-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 6.5pt;
  }

  .death-benefit-row .napkin-final-metric-value {
    font-size: 14pt;
    color: #fff !important;
  }

  .death-benefit-row .napkin-final-metric-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 6.5pt;
  }

  /* Print-Only Legal Disclaimers */
  .print-disclaimers {
    display: block !important;
    margin-top: 32px;
    page-break-before: always;
    font-size: 7.5pt;
    line-height: 1.25;
    padding-bottom: 60px; /* Space for footer */
  }

  .disclaimer-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
  }

  .disclaimer-title {
    font-size: 10pt;
    font-weight: 800;
    color: #1e3a5f;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 3px solid #1e3a5f;
  }

  .disclaimer-content {
    text-align: justify;
    color: #374151;
    column-count: 2;
    column-gap: 20px;
  }

  .disclaimer-content p {
    margin: 0 0 8px 0;
    line-height: 1.3;
    break-inside: avoid;
  }

  .disclaimer-content p strong {
    color: #1e3a5f;
    font-weight: 700;
  }

  .disclaimer-footer {
    margin-top: 16px !important;
    padding-top: 12px;
    border-top: 2px solid #e5e7eb;
    font-size: 6.5pt !important;
    color: #6b7280 !important;
    line-height: 1.3 !important;
    column-span: all;
    break-inside: avoid;
  }

  .disclaimer-footer strong {
    color: #1e3a5f !important;
  }

  /* Ultra-Compact Reveal section benefits */
  .napkin-reveal-benefits {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-top: 6px;
  }

  .napkin-reveal-benefit {
    font-size: 7.5pt;
    padding: 0;
  }

  .napkin-reveal-benefit span {
    color: #fff !important;
  }

  /* Professional watermark */
  #napkinStep4::after {
    content: "CONFIDENTIAL";
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 72pt;
    font-weight: 900;
    color: rgba(30, 58, 95, 0.03);
    letter-spacing: 8px;
    pointer-events: none;
    z-index: -1;
  }

  /* Ultra-Compact comparison section */
  .napkin-reveal-old-label,
  .napkin-reveal-new-label {
    font-size: 7.5pt !important;
    margin-bottom: 3px !important;
  }

  .napkin-reveal-old-value {
    font-size: 14pt !important;
  }

  .napkin-reveal-new-value {
    font-size: 18pt !important;
  }

  .napkin-reveal-new-subtitle {
    font-size: 7.5pt !important;
  }

  .napkin-reveal-arrow {
    font-size: 18pt !important;
    margin: 0 8px !important;
  }
}

/* Compact Info Cards (Full Width 2-Column) */
.stress-test-info.compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  /* Reduced margin */
}

.info-card-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  /* Reduced padding */
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-light);
  position: relative;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.info-card.active {
  opacity: 1;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.info-icon-small {
  font-size: 20px;
  /* Smaller icon */
}

.info-content-compact {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-value-small {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.info-card.floor .info-value-small {
  color: #10b981;
}

.info-card.cap .info-value-small {
  color: #8b5cf6;
}

.info-desc-small {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Comparison Grid Results - Compact */
.stress-comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.comparison-vs {
  font-weight: 800;
  color: var(--text-tertiary);
  font-size: 12px;
  background: var(--bg-light);
  padding: 6px;
  border-radius: 50%;
  z-index: 2;
}

.comparison-col {
  padding: 12px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Dynamic Winning/Losing States */
.comparison-col.winning {
  transform: scale(1.05);
  z-index: 5;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.comparison-col.losing {
  transform: scale(0.95);
  opacity: 0.7;
  z-index: 1;
  background: #f9fafb;
}

/* Specific Strategy Styles */
/* Roth Wins (Market Risk realized negatively) */
.comparison-col.roth.winning {
  border-color: #ef4444;
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}

/* Roth Wins (Positive Return) */
.comparison-col.roth.winning.positive {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
}

/* Humorously Bloated (Unrealistic Boom) */
.comparison-col.roth.bloated {
  border-color: #d946ef;
  /* Hot Pink */
  background: linear-gradient(180deg, #fff 0%, #fdf4ff 100%);
  transform: scale(1.08);
  /* Even bigger */
  box-shadow: 0 12px 30px -5px rgba(217, 70, 239, 0.25);
  z-index: 10;
}

.comparison-col.roth.bloated .col-header {
  color: #be185d;
}


/* Tax Advantage Dynamic States based on Gap */

/* Savior: Winning big in a crash */
.comparison-col.tax-adv.savior {
  border-color: #059669;
  /* Deep Green */
  background: linear-gradient(180deg, #fff 0%, #ecfdf5 100%);
  transform: scale(1.05);
  /* Big win */
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.2);
}

.comparison-col.tax-adv.savior .col-header {
  color: #047857;
}

/* Safe: Winning slightly or flat */
.comparison-col.tax-adv.winning {
  border-color: #10b981;
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

/* Stable: Losing slightly (keeping up) */
.comparison-col.tax-adv.stable {
  border-color: #3b82f6;
  /* Blue */
  background: #fff;
  opacity: 1;
  /* Keep it fully visible */
  transform: scale(1);
  /* Normal size */
}

.comparison-col.tax-adv.stable .col-header {
  color: #2563eb;
}

/* Capped: Losing big to unrealistic boom */
.comparison-col.tax-adv.capped {
  border-color: #9ca3af;
  /* Gray */
  background: #f9fafb;
  opacity: 0.8;
  transform: scale(0.96);
}

.comparison-col.tax-adv.capped .col-header {
  color: #4b5563;
}

/* Header Text Colors */
.col-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: color 0.3s ease;
}

.comparison-col.roth.winning .col-header {
  color: #b91c1c;
}

.comparison-col.roth.winning.positive .col-header {
  color: #b45309;
}

.comparison-col.tax-adv.winning .col-header {
  color: #047857;
}

.col-subtitle {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.metric-group {
  margin-bottom: 8px;
}

.metric-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  transition: transform 0.3s ease;
}

.comparison-col.winning .metric-value {
  transform: scale(1.1);
  display: inline-block;
}

/* Slider Container */
.stress-test-slider-container {
  padding: 16px 20px;
  padding-top: 30px;
  margin-bottom: 16px;
}

/* Scenario Transition */
#stressTestScenario {
  transition: color 0.5s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

/* Chart Container - Fixed Height */
.rate-chart-container {
  height: 220px;
  /* Force height to prevent scrolling */
  width: 100%;
  position: relative;
}

/* Modal Body Spacing */
.modal-body.stress-test-body {
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .stress-comparison-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .comparison-vs {
    display: none;
  }

  .stress-test-info.compact {
    grid-template-columns: 1fr;
  }
}

/* Growth Chart Container - Increased Height */
.chart-container {
  position: relative;
  height: 500px;
  /* Increased separation */
  width: 100%;
  margin-top: 16px;
}

/* Tax Bracket Modal Styles */
.modal-content.tax-modal {
  max-width: 720px;
  padding: 0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-radius: 24px;
  overflow: hidden;
}

.tax-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 28px 32px;
  text-align: center;
}

.tax-modal-header h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tax-modal-header p {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.tax-brackets-container {
  padding: 24px 32px 32px;
}

.tax-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tax-table th,
.tax-table td {
  padding: 14px 16px;
  text-align: left;
}

.tax-table th {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  font-weight: 700;
  font-size: 12px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}

.tax-table tbody tr {
  background: #fff;
  transition: background 0.2s ease;
}

.tax-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.tax-table tbody tr:hover {
  background: #f1f5f9;
}

.tax-table td {
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 500;
}

.tax-table tr:last-child td {
  border-bottom: none;
}

.tax-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  min-width: 50px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Gradient badges for each bracket */
.tax-badge.t-10 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.tax-badge.t-12 {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.tax-badge.t-22 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.tax-badge.t-24 {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.tax-badge.t-32 {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.tax-badge.t-35 {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.tax-badge.t-37 {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

.tax-modal-footer {
  margin-top: 20px;
  padding: 16px 20px;
  background: #f1f5f9;
  border-radius: 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

.tax-modal-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.tax-modal-footer a:hover {
  text-decoration: underline;
}

/* Tax Info Button in Step 3 */
.btn-tax-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-tax-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-tax-info:active {
  transform: translateY(0);
}

/* ========================================
   Roth IRA Reality Section (Step 3) - Collapsible
   ======================================== */
.roth-reality-section {
  max-width: 900px;
  margin: 24px auto 0;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* Toggle Button - Subtle styling */
.roth-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  font-family: inherit;
}

.roth-toggle-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.roth-toggle-icon {
  font-size: 18px;
}

.roth-toggle-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: #94a3b8;
}

.roth-reality-section:not(.collapsed) .roth-toggle-arrow {
  transform: rotate(180deg);
}

/* Collapsible Content */
.roth-reality-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.roth-reality-section:not(.collapsed) .roth-reality-content {
  max-height: 3000px;
  opacity: 1;
  padding: 32px;
  margin-top: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 2px solid #0ea5e9;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.15);
}

.roth-reality-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.roth-reality-icon {
  font-size: 32px;
}

.roth-reality-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.roth-reality-intro {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Roth Math Gap Display */
.roth-math-gap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.roth-math-item {
  flex: 1;
  text-align: center;
}

.roth-math-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.roth-math-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.roth-math-value.roth-goal {
  color: #0ea5e9;
}

.roth-math-value.roth-limit {
  color: #f59e0b;
}

.roth-math-value.roth-gap {
  color: #dc2626;
}

.roth-math-operator {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Roth Reality Callout */
.roth-reality-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 24px;
}

.roth-reality-callout-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.roth-reality-callout div {
  font-size: 14px;
  line-height: 1.6;
  color: #78350f;
}

/* Roth Comparison Table */
.roth-comparison-table {
  margin-bottom: 24px;
}

.roth-comparison-table h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

.roth-comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.roth-comparison-table thead {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
}

.roth-comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.roth-comparison-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.roth-comparison-table tbody tr:last-child {
  border-bottom: none;
}

.roth-comparison-table tbody tr.highlight-row {
  background: #fef3c7;
}

.roth-comparison-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.roth-comparison-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.roth-comparison-table .check {
  color: #10b981;
  font-size: 16px;
  font-weight: 700;
  margin-right: 4px;
}

.roth-comparison-table .x {
  color: #ef4444;
  font-size: 16px;
  font-weight: 700;
  margin-right: 4px;
}

/* Roth Solution Callout */
.roth-solution-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.roth-solution-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.roth-solution-callout div {
  font-size: 15px;
  line-height: 1.7;
  color: #065f46;
}

.roth-solution-callout strong {
  color: #064e3b;
  font-weight: 700;
}

.roth-solution-callout em {
  font-style: italic;
  font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .roth-reality-section {
    margin: 20px 16px 0;
  }

  .roth-toggle-btn {
    padding: 12px 16px;
    font-size: 13px;
  }

  .roth-reality-section:not(.collapsed) .roth-reality-content {
    padding: 24px 20px;
  }

  .roth-reality-header h3 {
    font-size: 20px;
  }

  .roth-math-gap {
    flex-direction: column;
    gap: 8px;
    padding: 20px 16px;
  }

  .roth-math-operator {
    transform: rotate(90deg);
    font-size: 24px;
  }

  .roth-math-value {
    font-size: 24px;
  }

  .roth-comparison-table {
    overflow-x: auto;
  }

  .roth-comparison-table table {
    font-size: 12px;
  }

  .roth-comparison-table th,
  .roth-comparison-table td {
    padding: 8px 10px;
  }

  .roth-solution-callout div {
    font-size: 14px;
  }
}