/* HSA Growth Calculator Styles (v2.0) */

/* ===== Calculator Container ===== */
.calculator-container {
  max-width: 700px;
  margin: 0 auto;
}

/* ===== Tool Hero ===== */
.tool-hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.tool-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: rgba(124, 197, 174, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.tool-icon .lucide {
  width: 2rem;
  height: 2rem;
}

.tool-hero h1 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tool-tagline {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Autopilot Pre-fill Label ===== */
.autopilot-prefill-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(124, 197, 174, 0.1);
  border: 1px solid rgba(124, 197, 174, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-primary);
}

.autopilot-prefill-icon {
  display: flex;
  align-items: center;
  font-size: 1rem;
}

/* ===== Affordability Note ===== */
.affordability-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.affordability-note-icon {
  flex-shrink: 0;
  color: var(--accent-secondary, #3b82f6);
  margin-top: 0.125rem;
}

.affordability-note p {
  margin: 0;
}

[data-theme="light"] .affordability-note {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}

/* ===== Form Section (Glassmorphism) ===== */
.form-section {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

@supports not (backdrop-filter: blur(12px)) {
  .form-section {
    background: var(--bg-card);
  }
}

[data-theme="light"] .form-section {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* ===== Form Groups ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-group .hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Form row for side-by-side inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== Input with prefix/suffix ===== */
.input-with-addon {
  display: flex;
  align-items: stretch;
}

.input-with-addon input {
  height: 2.5rem;
  border-radius: 0;
  flex: 1;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.input-with-addon input:first-child {
  border-radius: 6px 0 0 6px;
}

.input-with-addon input:last-child {
  border-radius: 0 6px 6px 0;
}

.input-with-addon input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 197, 174, 0.15);
}

.input-with-addon input:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.input-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  box-sizing: border-box;
}

.input-addon-left {
  border-right: none;
  border-radius: 6px 0 0 6px;
}

.input-addon-right {
  border-left: none;
  border-radius: 0 6px 6px 0;
}

/* Hide number input spinners */
.form-group input::-webkit-outer-spin-button,
.form-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-group input[type="number"] {
  -moz-appearance: textfield;
}

/* ===== Time Horizon Slider ===== */
.slider-group {
  margin-top: 0.5rem;
}

.slider-group label {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.slider-value {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.growth-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  outline: none;
  -webkit-appearance: none;
  margin: 0.75rem 0 0.5rem;
  cursor: pointer;
}

.growth-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.growth-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: -6px;
}

.growth-slider::-moz-range-track {
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: none;
}

.growth-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.growth-slider:focus {
  outline: none;
}

.growth-slider:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.growth-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(124, 197, 174, 0.3);
}

.growth-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(124, 197, 174, 0.3);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Return rate group - narrower */
.return-group {
  max-width: 260px;
}

/* ===== Impact Display ===== */
.impact-display {
  background: linear-gradient(135deg, rgba(124, 197, 174, 0.15) 0%, rgba(124, 197, 174, 0.1) 100%);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(124, 197, 174, 0.2);
}

.impact-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.impact-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.impact-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.impact-multiplier-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: rgba(124, 197, 174, 0.2);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
}

.impact-meta-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

[data-theme="light"] .impact-display {
  background: linear-gradient(135deg, rgba(91, 168, 142, 0.12) 0%, rgba(91, 168, 142, 0.06) 100%);
  border-color: rgba(91, 168, 142, 0.2);
}

[data-theme="light"] .impact-multiplier-badge {
  background: rgba(91, 168, 142, 0.15);
}

/* ===== Growth Chart Container ===== */
.growth-chart-container {
  position: relative;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  height: 350px;
}

@supports not (backdrop-filter: blur(12px)) {
  .growth-chart-container {
    background: var(--bg-card);
  }
}

[data-theme="light"] .growth-chart-container {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#chart-canvas {
  background: transparent;
  width: 100% !important;
}

/* ===== Comparison Cards ===== */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: center;
  margin-bottom: 1.5rem;
}

.comparison-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@supports not (backdrop-filter: blur(12px)) {
  .comparison-card {
    background: var(--bg-card);
  }
}

[data-theme="light"] .comparison-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Winner card (delayed growth) */
.comparison-card--winner {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 20px rgba(124, 197, 174, 0.15);
}

[data-theme="light"] .comparison-card--winner {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 16px rgba(91, 168, 142, 0.1);
}

.comparison-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.comparison-card-icon {
  color: var(--text-muted);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.comparison-card--winner .comparison-card-icon {
  color: var(--accent-primary);
}

.comparison-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.comparison-card--winner .comparison-card-header h3 {
  color: var(--accent-primary);
}

.comparison-card-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.comparison-card--winner .comparison-card-amount {
  color: var(--accent-primary);
}

.comparison-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Delta badge between cards */
.comparison-delta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
}

.delta-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(124, 197, 174, 0.15);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

[data-theme="light"] .delta-badge {
  background: rgba(91, 168, 142, 0.12);
}

/* Hover lift for cards */
@media (hover: hover) {
  .comparison-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  [data-theme="light"] .comparison-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .comparison-card--winner:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 28px rgba(124, 197, 174, 0.2);
  }

  [data-theme="light"] .comparison-card--winner:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 20px rgba(91, 168, 142, 0.15);
  }
}

/* ===== Tax Callout ===== */
.tax-callout {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

@supports not (backdrop-filter: blur(12px)) {
  .tax-callout {
    background: var(--bg-card);
  }
}

[data-theme="light"] .tax-callout {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tax-callout-icon {
  color: var(--accent-primary);
  font-size: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 0.125rem;
}

.tax-callout-content p {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.tax-callout-content strong {
  color: var(--accent-primary);
  font-weight: 700;
}

.tax-callout-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ===== Vault CTA Section ===== */
.autopilot-cta-section {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

@supports not (backdrop-filter: blur(12px)) {
  .autopilot-cta-section {
    background: var(--bg-card);
  }
}

[data-theme="light"] .autopilot-cta-section {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.autopilot-cta-section h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.autopilot-cta-section p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Vault CTA Button — hero-cta-btn gradient with shine */
.autopilot-cta-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-primary), var(--gradient-end));
  box-shadow: 0 4px 20px rgba(124, 197, 174, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  color: #141c24;
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.autopilot-cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

@media (hover: hover) {
  .autopilot-cta-btn:hover::before {
    left: 100%;
  }

  .autopilot-cta-btn:hover {
    box-shadow: 0 6px 28px rgba(124, 197, 174, 0.4);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .autopilot-cta-btn::before {
    display: none;
  }
}

/* ===== Cross-Links ===== */
.cross-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.cross-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}

@media (hover: hover) {
  .cross-link:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
  }
}

.cross-link-icon {
  font-size: 1.5rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
}

.cross-link-text {
  display: flex;
  flex-direction: column;
}

.cross-link-text span:first-child {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
}

.cross-link-text span:last-child {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* ===== Disclaimer ===== */
.calculator-disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.calculator-disclaimer strong {
  color: var(--text-secondary);
}

/* ===== Radio Group ===== */
.radio-group {
  display: flex;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.625rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  flex: 1;
  text-align: center;
}

.radio-option:hover {
  border-color: var(--text-muted);
}

.radio-option:has(input:checked) {
  border-color: var(--accent-primary);
  background: rgba(124, 197, 174, 0.1);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option span {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* ===== Form Select ===== */
.form-select {
  width: 100%;
  height: 2.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 197, 174, 0.15);
}

.form-select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.form-select option[value=""] {
  color: var(--text-muted);
}

/* ===== Receipts Upsell Hint ===== */
.receipts-upsell-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  font-style: italic;
}

.receipts-upsell-hint a {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* ===== Why Defer Callout ===== */
.why-defer-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(124, 197, 174, 0.08);
  border: 1px solid rgba(124, 197, 174, 0.2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.why-defer-callout-icon {
  flex-shrink: 0;
  color: var(--accent-primary);
  margin-top: 0.125rem;
}

.why-defer-callout strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.why-defer-callout p {
  margin: 0;
}

/* ===== Recommendation Card ===== */
.rec-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@supports not (backdrop-filter: blur(12px)) {
  .rec-card {
    background: var(--bg-card);
  }
}

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

.rec-icon {
  font-size: 1.5rem;
}

.rec-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rec-confidence-badge {
  margin-left: auto;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

/* Recommendation color themes */
.rec-card--defer {
  border-color: rgba(124, 197, 174, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 16px rgba(124, 197, 174, 0.1);
}

.rec-card--defer .rec-icon { color: #7cc5ae; }
.rec-card--defer .rec-label { color: #7cc5ae; }
.rec-card--defer .rec-confidence-badge {
  background: rgba(124, 197, 174, 0.15);
  color: #7cc5ae;
}

.rec-card--partial {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 16px rgba(59, 130, 246, 0.1);
}

.rec-card--partial .rec-icon { color: #3b82f6; }
.rec-card--partial .rec-label { color: #3b82f6; }
.rec-card--partial .rec-confidence-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.rec-card--reimburse {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 16px rgba(245, 158, 11, 0.1);
}

.rec-card--reimburse .rec-icon { color: #f59e0b; }
.rec-card--reimburse .rec-label { color: #f59e0b; }
.rec-card--reimburse .rec-confidence-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Reasoning list */
.rec-reasoning {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.rec-reasoning li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rec-reasoning li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Split display (sub-card) */
.rec-split {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.rec-split-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
}

.rec-split-row + .rec-split-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rec-split-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.rec-split-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rec-split-reason {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Safety net callout (inset) */
.rec-safety-net {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rec-safety-net strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.rec-safety-net ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.rec-safety-net li {
  margin-bottom: 0.25rem;
}

.rec-safety-net-disclaimer {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* State warning */
.rec-state-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Savings Callout ===== */
.savings-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(124, 197, 174, 0.08);
  border: 1px solid rgba(124, 197, 174, 0.2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.savings-callout-icon {
  flex-shrink: 0;
  color: var(--accent-primary);
  margin-top: 0.125rem;
}

.savings-callout-content p {
  margin: 0 0 0.25rem 0;
}

.savings-callout-content strong {
  color: var(--accent-primary);
  font-weight: 700;
}

.savings-callout-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.savings-rate-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(124, 197, 174, 0.12);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ===== Extended Animation Stagger Delays ===== */
/* animations.css defines delays 1-4; calculator uses up to 9 */
[data-animate-delay="5"] { transition-delay: 0.5s; }
[data-animate-delay="6"] { transition-delay: 0.6s; }
[data-animate-delay="7"] { transition-delay: 0.7s; }
[data-animate-delay="8"] { transition-delay: 0.8s; }
[data-animate-delay="9"] { transition-delay: 0.9s; }

/* ===== Animating class (toggled by JS during number transitions) ===== */
.animating {
  transition: color 0.2s ease;
}

/* ===== Focus States for Accessibility ===== */
.growth-slider:focus-visible,
.autopilot-cta-btn:focus-visible,
.cross-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 197, 174, 0.3);
}

.input-with-addon input:focus-visible {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 197, 174, 0.15);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .comparison-card,
  .cross-link,
  .autopilot-cta-btn {
    transition: none;
  }

  .rec-card {
    transition: none;
  }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ===== Light Theme Adjustments ===== */
[data-theme="light"] .autopilot-prefill-label {
  background: rgba(91, 168, 142, 0.1);
  border-color: rgba(91, 168, 142, 0.25);
  color: #5ba88e;
}

[data-theme="light"] .impact-amount {
  color: var(--accent-primary);
}

[data-theme="light"] .comparison-card-amount {
  color: var(--text-primary);
}

[data-theme="light"] .comparison-card--winner .comparison-card-amount {
  color: var(--accent-primary);
}

[data-theme="light"] .tax-callout-content strong {
  color: var(--accent-primary);
}

[data-theme="light"] .rec-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .rec-card--defer {
  border-color: rgba(91, 168, 142, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 12px rgba(91, 168, 142, 0.08);
}

[data-theme="light"] .rec-card--partial {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 12px rgba(37, 99, 235, 0.06);
}

[data-theme="light"] .rec-card--reimburse {
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 12px rgba(217, 119, 6, 0.06);
}

[data-theme="light"] .rec-split {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .rec-split-row + .rec-split-row {
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .rec-safety-net {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
}

[data-theme="light"] .rec-state-warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .why-defer-callout {
  background: rgba(91, 168, 142, 0.06);
  border-color: rgba(91, 168, 142, 0.15);
}

[data-theme="light"] .savings-callout {
  background: rgba(91, 168, 142, 0.06);
  border-color: rgba(91, 168, 142, 0.15);
}

[data-theme="light"] .savings-rate-badge {
  background: rgba(91, 168, 142, 0.1);
}

[data-theme="light"] .form-select {
  background-color: var(--bg-secondary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
}

/* ========================================================
   RESPONSIVE BREAKPOINTS
   ======================================================== */

/* ----- 768px: Tablet ----- */
@media (max-width: 768px) {
  /* Impact number scales down */
  .impact-amount {
    font-size: 1.75rem;
  }

  /* Comparison cards stack vertically */
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Winner card on top */
  .comparison-card--winner {
    order: -1;
  }

  .comparison-delta {
    padding: 0.75rem 0;
  }

  /* Chart container reduces height */
  .growth-chart-container {
    height: 280px;
    padding: 1rem;
  }

  /* Slider thumb enlarges */
  .growth-slider {
    height: 12px;
  }

  .growth-slider::-webkit-slider-runnable-track {
    height: 12px;
  }

  .growth-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -8px;
  }

  .growth-slider::-moz-range-track {
    height: 12px;
  }

  .growth-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .radio-group {
    flex-direction: column;
  }

  .rec-card {
    padding: 1.25rem;
  }

  .rec-split-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* ----- 600px: Small tablet ----- */
@media (max-width: 480px) {
  /* CTA full-width */
  .autopilot-cta-btn {
    width: 100%;
    min-height: 48px;
  }

  /* Form inputs single-column */
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ----- 480px: Phone ----- */
@media (max-width: 480px) {
  /* Container padding shrinks */
  .calculator-container {
    padding: 0 0.25rem;
  }

  .form-section {
    padding: 1.25rem;
  }

  /* Impact number final reduction */
  .impact-amount {
    font-size: 1.5rem;
  }

  .impact-display {
    padding: 1.5rem 1rem;
  }

  /* Comparison card padding reduces */
  .comparison-card {
    padding: 1.25rem;
  }

  .comparison-card-amount {
    font-size: 1.5rem;
  }

  /* Cross-links stack */
  .cross-links {
    grid-template-columns: 1fr;
  }

  /* Tax callout compact */
  .tax-callout {
    padding: 1rem;
  }

  /* Vault CTA compact */
  .autopilot-cta-section {
    padding: 1.5rem 1rem;
  }

  /* Growth chart compact */
  .growth-chart-container {
    height: 240px;
    padding: 0.75rem;
  }

  /* Disclaimer compact */
  .calculator-disclaimer {
    padding: 0.75rem;
  }

  .why-defer-callout,
  .savings-callout {
    padding: 0.875rem 1rem;
  }

  .rec-card {
    padding: 1rem;
  }

  .rec-safety-net {
    padding: 0.75rem;
  }
}

/* ----- Touch target for slider ----- */
@media (pointer: coarse) {
  .growth-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    /* Ensure 44px touch target with padding */
  }

  .growth-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .slider-group {
    padding: 0.5rem 0;
  }
}
