/* styles.css — Canadian Retirement Calculator */

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

:root {
  --primary: #2b5c8f;
  --primary-dark: #1f4266;
  --accent: #27ae60;
  --warning: #d68910;
  --danger: #c0392b;
  --bg: #fcfaf7;
  --surface: #ffffff;
  --border: #d4cfc7;
  --text: #1a1918;
  --text-muted: #4a453d;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 24px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.calc-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.calc-header {
  text-align: center;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.back-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.back-link:hover { text-decoration: underline; }

.calc-header h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.calc-header .subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* ── SEO intro ──────────────────────────────────────────────────────────── */

.seo-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.85;
}

.seo-intro ul {
  margin: 12px 0 12px 8px;
  padding-left: 20px;
}

.seo-intro ul li {
  margin-bottom: 4px;
}

/* ── Disclaimer ─────────────────────────────────────────────────────────── */

.disclaimer {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 1rem;
  color: #4a3000;
  line-height: 1.75;
  margin-bottom: 24px;
}

.disclaimer-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 48px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Progress bar ───────────────────────────────────────────────────────── */

.progress-container {
  margin-bottom: 28px;
}

.progress-bar {
  background: var(--border);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.step-labels {
  display: flex;
  justify-content: space-between;
}

.step-labels span {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
}

.step-labels span.active {
  color: var(--primary);
  font-weight: 700;
}

/* ── Error box ──────────────────────────────────────────────────────────── */

.error-box {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: var(--radius);
  padding: 16px 20px;
  color: #721c24;
  font-size: 1.05rem;
  margin-bottom: 20px;
  display: none;
}

.error-box.visible { display: block; }

.error-box ul { padding-left: 20px; }
.error-box ul li { margin-top: 4px; }

/* ── Form steps ─────────────────────────────────────────────────────────── */

.form-step {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px 40px;
  box-shadow: var(--shadow);
}

.form-step h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg);
}

.form-step .step-note {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Form controls ──────────────────────────────────────────────────────── */

.field-group {
  margin-bottom: 20px;
}

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

label {
  display: block;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

label .label-hint {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 20px 24px;
  border: 3px solid var(--border);
  border-radius: 12px;
  font-size: 1.25rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input:focus, select:focus {
  outline: 4px solid var(--primary);
  outline-offset: 4px;
  border-color: var(--primary);
  box-shadow: none;
}

input.error, select.error {
  border-color: var(--danger);
}

/* ── DOB row ────────────────────────────────────────────────────────────── */

.dob-row {
  display: flex;
  gap: 12px;
}

.dob-row select { flex: 1; }

/* ── Radio groups ───────────────────────────────────────────────────────── */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 500;
  cursor: pointer;
  padding: 24px 28px;
  border: 3px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.radio-group label:hover {
  border-color: var(--primary);
  background: #f0f5fb;
}

.radio-group input[type="radio"] {
  width: 32px;
  height: 32px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

.radio-group input[type="radio"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.radio-group input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--primary);
}

.radio-group label:has(input:checked) {
  border-color: var(--primary);
  background: #f0f5fb;
}

/* ── Range sliders ──────────────────────────────────────────────────────── */

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

input[type="range"] {
  flex: 1;
  height: 10px;
  accent-color: var(--primary);
  cursor: pointer;
}

.slider-value {
  min-width: 54px;
  text-align: right;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.15rem;
}

.slider-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.slider-meta.highlight {
  color: var(--primary);
  font-weight: 500;
}

/* ── CAD prefix input ───────────────────────────────────────────────────── */

.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
}

.input-prefix-wrap input {
  padding-left: 48px;
}

/* ── Tooltip ────────────────────────────────────────────────────────────── */

.tooltip-trigger {
  position: relative;
  display: inline;
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
  white-space: nowrap;
}

.tooltip-trigger .tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
  cursor: help;
}

.tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  width: max-content;
  max-width: 300px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:focus-within::after {
  opacity: 1;
}

/* ── Assumptions collapsible ────────────────────────────────────────────── */

details summary {
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--primary);
  padding: 12px 0;
  user-select: none;
  list-style: none;
  font-weight: 600;
}

details summary::before {
  content: '▶ ';
  font-size: 0.9rem;
}

details[open] summary::before {
  content: '▼ ';
}

details .assumptions-content {
  padding-top: 16px;
}

/* ── Navigation buttons ─────────────────────────────────────────────────── */

.form-nav {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 26px 52px;
  border-radius: 16px;
  font-size: 1.4rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 3px solid var(--border);
  padding: 24px 48px;
  border-radius: 16px;
  font-size: 1.4rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: var(--border); }
.btn-secondary:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.btn-ghost:hover { color: var(--text); }
.btn-ghost:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── Results page ───────────────────────────────────────────────────────── */

.result-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.result-section h2 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg);
}

/* ── Headline result card ───────────────────────────────────────────────── */

.result-headline {
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-headline .headline-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.result-headline .headline-text {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.result-headline .headline-sub {
  font-size: 0.95rem;
  opacity: 0.8;
}

.result-headline.good {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.result-headline.warn {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.result-headline.bad {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ── Income breakdown table ─────────────────────────────────────────────── */

.income-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.income-table th,
.income-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--bg);
}

.income-table th:first-child,
.income-table td:first-child {
  text-align: left;
}

.income-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.income-table tr:last-child td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  border-bottom: none;
  color: var(--primary);
}

/* ── Chart ──────────────────────────────────────────────────────────────── */

.chart-container {
  position: relative;
  height: 300px;
}

@media (max-width: 480px) {
  .chart-container { height: 240px; }
}

/* ── Scenario cards ─────────────────────────────────────────────────────── */

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

.scenario-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  text-align: center;
}

.scenario-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(26,82,118,0.12);
  background: #f0f5fb;
}

.scenario-card.active {
  border-color: var(--primary);
  background: #eaf1f8;
}

.scenario-card .sc-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.scenario-card .sc-result {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.scenario-card .sc-result.good { color: #155724; }
.scenario-card .sc-result.bad  { color: var(--danger); }

/* ── AI summary box ─────────────────────────────────────────────────────── */

.ai-summary-box {
  background: #eaf4fb;
  border: 1px solid #bee3f8;
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #2c5282;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* ── Assumptions list ───────────────────────────────────────────────────── */

.assumptions-list {
  display: grid;
  gap: 10px;
}

.assumptions-list .assumption-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 0.9rem;
  gap: 12px;
}

.assumptions-list .assumption-row:last-child { border-bottom: none; }

.assumption-label { color: var(--text-muted); }
.assumption-value { font-weight: 600; color: var(--text); }

.tax-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 14px;
  line-height: 1.6;
}

/* ── Conditional input ──────────────────────────────────────────────────── */

.conditional-field {
  display: none;
  margin-top: 12px;
}

.conditional-field.visible { display: block; }

/* ── Utilities ──────────────────────────────────────────────────────────── */

.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .calc-wrapper { padding: 12px 14px 48px; }

  .form-step { padding: 20px 16px; }
  .result-section { padding: 18px 16px; }

  .form-nav { flex-direction: column; }
  .form-nav .btn-primary,
  .form-nav .btn-secondary { width: 100%; text-align: center; }

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

  .income-table th,
  .income-table td { padding: 8px 6px; font-size: 0.85rem; }
}

@media (max-width: 400px) {
  .scenario-grid { grid-template-columns: 1fr; }
  .dob-row { flex-direction: column; }
}

/* ── Retire Abroad section ──────────────────────────────────────────────── */

.abroad-tier {
  margin-bottom: 12px;
}

.abroad-tier-header {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.abroad-tier-header:hover { background: #e3ecf5; }

.abroad-tier-header.good  { border-left: 4px solid var(--accent); }
.abroad-tier-header.warn  { border-left: 4px solid var(--warning); }
.abroad-tier-header.stretch { border-left: 4px solid var(--border); }

.abroad-tier-header .tier-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.abroad-tier-header .tier-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.abroad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.abroad-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.abroad-card:hover { border-color: var(--primary); }

.abroad-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.abroad-flag { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }

.abroad-card-info { flex: 1; min-width: 0; }

.abroad-country {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}

.abroad-cities {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.abroad-years {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 2px;
}

.abroad-years.good   { background: #d4edda; color: #155724; }
.abroad-years.warn   { background: #fff3cd; color: #856404; }
.abroad-years.stretch { background: #f0f4f8; color: var(--text-muted); }

.abroad-cost {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.abroad-visa {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

.abroad-detail-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-style: normal;
}

.abroad-none-msg {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .abroad-tier-header { font-size: 0.92rem; padding: 12px 14px; }
  .abroad-card { padding: 12px 14px; }
}

/* ── Print styles ───────────────────────────────────────────────────────────── */

@media print {
  body { font-size: 11pt; background: white; }

  .calc-header .back-link,
  .form-nav,
  .disclaimer-footer,
  .scenario-grid p.text-muted { display: none !important; }

  .calc-wrapper { max-width: 100%; padding: 0; }

  .result-section {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }

  .result-headline {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .chart-container { height: 200px; }

  /* Expand all abroad tiers (printResults() also does this via JS) */
  .abroad-grid { display: grid !important; }

  /* Abroad cards smaller for print */
  .abroad-card { padding: 6pt 8pt; font-size: 9pt; }
  .abroad-flag { font-size: 1.2rem; }
  .abroad-country { font-size: 9pt; }
  .abroad-cities, .abroad-visa, .abroad-detail-link { font-size: 8pt; }
  .abroad-cost { font-size: 9pt; }

  /* Scenario cards — remove hover state */
  .scenario-card { border: 1px solid #ccc; background: white; }

  .ai-summary-box { background: #f5f5f5; border: 1px solid #ccc; }
}

/* ── Sub-tool form utilities (GIS / Clawback / CPP pages) ───────────────── */

.field-label {
  display: block;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

.field-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.field-input { /* styled via input[type] selectors above */ }

.radio-option {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 500;
  cursor: pointer;
  padding: 18px 22px;
  border: 3px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 0;
}

.radio-option:hover { border-color: var(--primary); background: #f0f5fb; }
.radio-option input[type="radio"] { width: 26px; height: 26px; accent-color: var(--primary); flex-shrink: 0; }
.radio-option:has(input:checked) { border-color: var(--primary); background: #f0f5fb; }

.tooltip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 6px;
  padding: 0;
  font-family: inherit;
  line-height: 1;
}

.tooltip-btn:hover { background: var(--primary); color: #fff; }

.tooltip-box {
  background: #eaf4fb;
  border: 1px solid #b3d7ee;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 12px;
}

/* ── Suite Navigation ───────────────────────────────────────────────────── */

.country-switcher {
  text-align: center;
  padding: 6px 16px;
  background: var(--primary-dark);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
}
.country-switcher a { color: rgba(255,255,255,0.75); text-decoration: none; }
.country-switcher a:hover { color: #fff; text-decoration: underline; }
.country-switcher strong { color: #fff; }
.country-switcher .cs-sep { margin: 0 8px; opacity: 0.5; }

.suite-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  background: var(--primary-dark);
  justify-content: center;
}

.suite-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 5px 13px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.suite-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.18);
}

.suite-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.25);
  font-weight: 600;
}

/* ── Insight / Tip Boxes ─────────────────────────────────────────────────── */

.insight-box {
  background: #eaf4fb;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 0.92rem;
  margin: 16px 0;
  line-height: 1.6;
}

.tip-box {
  background: #fef9e7;
  border-left: 4px solid var(--warning);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 0.92rem;
  margin: 16px 0;
  line-height: 1.6;
}

.tip-box strong, .insight-box strong { display: block; margin-bottom: 4px; }

/* ── Qualify Banner ──────────────────────────────────────────────────────── */

.qualify-banner {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.1rem;
  font-weight: 600;
}

.qualify-banner.qualify-yes { background: #d4edda; color: #155724; }
.qualify-banner.qualify-no  { background: #f8d7da; color: #721c24; }
.qualify-banner .qualify-icon { font-size: 1.8rem; flex-shrink: 0; }
.qualify-amount { font-size: 0.95rem; font-weight: 400; margin-top: 2px; }

/* ── Clawback Bar ────────────────────────────────────────────────────────── */

.clawback-bar-wrap {
  background: #e9ecef;
  border-radius: 8px;
  height: 28px;
  overflow: hidden;
  margin: 12px 0 4px;
  display: flex;
}

.clawback-bar-kept {
  background: var(--accent);
  height: 100%;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 0.78rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.clawback-bar-lost {
  background: var(--danger);
  height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 0.78rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.clawback-legend {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.clawback-legend span { display: flex; align-items: center; gap: 5px; }
.clawback-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.clawback-legend .dot-kept { background: var(--accent); }
.clawback-legend .dot-lost { background: var(--danger); }

/* ── CPP Cards ───────────────────────────────────────────────────────────── */

.cpp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}

@media (max-width: 600px) {
  .cpp-cards { grid-template-columns: 1fr; }
}

.cpp-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  background: var(--surface);
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cpp-card.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(39,174,96,0.15);
}

.cpp-card-age {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.cpp-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cpp-card-monthly {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.cpp-card-annual { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }

.cpp-card-lifetime {
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
}

.cpp-card-breakeven {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cpp-recommended-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
