/* ===== Reset & Variables ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;

  --blue: #3b82f6;
  --rose: #f43f5e;
  --emerald: #10b981;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --pink: #ec4899;

  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);

  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, var(--bg), rgba(238,242,255,0.3), var(--bg));
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Header ===== */
header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 8px rgba(99,102,241,0.25);
  flex-shrink: 0;
}

header h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

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

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.header-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.header-btn:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: #c7d2fe;
  box-shadow: var(--shadow-sm);
}

/* ===== Layout ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px;
}

.layout {
  display: flex;
  gap: 20px;
}

/* ===== Config Panel ===== */
.config-panel {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.config-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.6);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.config-panel h2 { display: none; }

/* ===== Config Sections ===== */
.config-section { margin-bottom: 8px; }

.config-section h3.collapsible {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  min-height: 48px;
}

.config-section h3.collapsible:hover {
  box-shadow: var(--shadow-sm);
}

/* Section color themes */
.section-info h3.collapsible {
  background: #f8fafc; color: #475569; border-color: #cbd5e1;
}

.info-text {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.info-text p {
  margin-bottom: 8px;
}

.info-text p:last-child {
  margin-bottom: 0;
}

.info-text strong {
  color: var(--text);
}

.section-personal h3.collapsible {
  background: #eef2ff; color: #4338ca; border-color: #c7d2fe;
}
.section-market h3.collapsible {
  background: #ecfdf5; color: #047857; border-color: #a7f3d0;
}
.section-tax h3.collapsible {
  background: #fffbeb; color: #b45309; border-color: #fde68a;
}
.section-pension h3.collapsible {
  background: #fff1f2; color: #be123c; border-color: #fecdd3;
}
.section-sim h3.collapsible {
  background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe;
}

.section-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.section-label {
  flex: 1;
  text-align: left;
}

.toggle-icon {
  font-size: 0.65rem;
  opacity: 0.6;
  flex-shrink: 0;
}

.config-content {
  padding: 12px 4px 4px;
}

.config-content h4 {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 12px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.tax-scenario-header {
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  border-left: 3px solid;
}

.tax-scenario-header.box3-current {
  background: #eff6ff;
  color: #1d4ed8;
  border-left-color: var(--blue);
}

.tax-scenario-header.box3-new {
  background: #fff1f2;
  color: #be123c;
  border-left-color: var(--rose);
}

.tax-scenario-header.bv {
  background: #ecfdf5;
  color: #047857;
  border-left-color: var(--emerald);
}

/* ===== Form Inputs ===== */
.form-group {
  margin-bottom: 12px;
}

.form-group > label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.info-icon {
  position: relative;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: help;
  margin-left: 4px;
  padding: 2px;
  -webkit-tap-highlight-color: transparent;
}

.info-tooltip {
  position: fixed;
  z-index: 100;
  background: var(--text);
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  max-width: min(260px, calc(100vw - 16px));
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

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

.form-row {
  display: flex;
  gap: 8px;
  align-items: end;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.input-wrap {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.input-suffix {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  pointer-events: none;
}

.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-group input:hover,
.form-group select:hover {
  border-color: #cbd5e1;
}

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

.input-wrap.has-suffix input,
.input-wrap.has-suffix select {
  padding-right: 36px;
}

/* ===== Toggle Switch ===== */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 20px;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===== Vermogensbestanddelen ===== */
.vermogensbestanddelen-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.vermogensbestanddeel-item {
  position: relative;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #a7f3d0;
  background: rgba(236,253,245,0.3);
  border-left: 3px solid var(--emerald);
  overflow: hidden;
}

.vb-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.vb-header .vb-naam {
  flex: 1;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
}

.vb-header .vb-type {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--surface);
}

.btn-remove-vb {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
  opacity: 0.4;
}

.vermogensbestanddeel-item:hover .btn-remove-vb {
  opacity: 1;
}

.btn-remove-vb:hover {
  background: #fef2f2;
  color: #dc2626;
  opacity: 1;
}

.vb-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vb-fields .form-group {
  margin-bottom: 0;
}

.vb-fields .form-group > label {
  font-size: 0.7rem;
}

/* Stortingen binnen bestanddeel */
.vb-stortingen {
  margin-top: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}

.vb-stortingen-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.vb-stortingen .extra-storting-item {
  border: none;
  border-left: 2px solid var(--border);
  background: rgba(248,250,252,0.5);
  padding: 6px 8px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.vb-stortingen .extra-storting-item.negative {
  border-left-color: var(--rose);
  background: rgba(254,242,242,0.3);
}

.btn-add-storting {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-add-storting:hover {
  color: var(--primary);
}

#addVermogensbestanddeel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

#addVermogensbestanddeel:hover {
  color: var(--primary-dark);
}

/* ===== Inflatie Section ===== */
.section-inflation h3.collapsible {
  background: #f0fdf4; color: #166534; border-color: #bbf7d0;
}

/* ===== Extra Stortingen ===== */
.extra-stortingen-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.extra-storting-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #a7f3d0;
  background: rgba(236,253,245,0.3);
  border-left: 3px solid var(--emerald);
}

.extra-storting-item.negative {
  border-color: #fecaca;
  background: rgba(254,242,242,0.3);
  border-left-color: var(--rose);
}

.storting-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.extra-storting-item input[type="date"] {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  color: var(--text);
  background: var(--surface);
}

.extra-storting-item input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  background: var(--surface);
}

.extra-storting-item.negative input[type="number"] {
  color: #dc2626;
}

.storting-row-extra {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  align-items: center;
}

.storting-omschrijving {
  flex: 1;
  min-width: 0;
  padding: 4px 7px;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: transparent;
  font-style: italic;
}

.storting-omschrijving:focus {
  outline: none;
  background: var(--surface);
  border: 1px solid var(--border);
}

.storting-omschrijving::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.extra-storting-item .btn-remove {
  padding: 4px 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.extra-storting-item .btn-remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* ===== Scenario Pills ===== */
.scenario-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scenario-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.2s;
}

.scenario-pill input[type="checkbox"] {
  display: none;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s;
}

.pill-blue { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.pill-blue .pill-dot { background: var(--blue); }
.pill-blue:has(input:not(:checked)) { background: var(--bg); color: var(--text-muted); border-color: var(--border); }
.pill-blue:has(input:not(:checked)) .pill-dot { background: #cbd5e1; }

.pill-rose { background: #fff1f2; color: #be123c; border-color: #fda4af; }
.pill-rose .pill-dot { background: var(--rose); }
.pill-rose:has(input:not(:checked)) { background: var(--bg); color: var(--text-muted); border-color: var(--border); }
.pill-rose:has(input:not(:checked)) .pill-dot { background: #cbd5e1; }

.pill-emerald { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.pill-emerald .pill-dot { background: var(--emerald); }
.pill-emerald:has(input:not(:checked)) { background: var(--bg); color: var(--text-muted); border-color: var(--border); }
.pill-emerald:has(input:not(:checked)) .pill-dot { background: #cbd5e1; }

/* ===== Primary Button ===== */
.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

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

.btn-primary:disabled {
  background: #a5b4fc;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 0 16px;
}

.privacy-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 16px;
  font-size: 0.72rem;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-sm);
}

.privacy-badge svg {
  flex-shrink: 0;
}

.support-banner {
  position: relative;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 32px 10px 16px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #92400e;
}
.support-banner a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
}
.support-banner-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  color: #92400e;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.6;
}
.support-banner-close:hover {
  opacity: 1;
  background: rgba(146, 64, 14, 0.1);
}

/* ===== Results Panel ===== */
.results-panel {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Results Overlay ===== */
.results-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.6);
  z-index: 10;
  justify-content: center;
  padding-top: min(120px, 20vh);
  border-radius: var(--radius);
}

.results-overlay.visible {
  display: flex;
}

.results-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ===== Summary / Stat Cards ===== */
.summary-section {
  /* No background, just a grid container */
}

.results-disclaimer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 10px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.6);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  transition: box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-bottom-left-radius: 40px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.stat-card:hover .stat-card-bg {
  opacity: 0.8;
}

.stat-card.box3-current .stat-card-bg { background: #eff6ff; }
.stat-card.box3-new .stat-card-bg { background: #fff1f2; }
.stat-card.bv .stat-card-bg { background: #ecfdf5; }

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  position: relative;
}

.stat-card.box3-current .stat-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 8px rgba(59,130,246,0.25); }
.stat-card.box3-new .stat-icon { background: linear-gradient(135deg, #f43f5e, #db2777); box-shadow: 0 4px 8px rgba(244,63,94,0.25); }
.stat-card.bv .stat-icon { background: linear-gradient(135deg, #10b981, #0d9488); box-shadow: 0 4px 8px rgba(16,185,129,0.25); }

.stat-icon svg {
  width: 15px;
  height: 15px;
}

.stat-card h4 {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat-range {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: -0.3px;
}

.stat-range-sep {
  margin: 0 4px;
  color: var(--border);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
  margin-top: 8px;
}

/* ===== Results Actions (share/copy/export buttons) ===== */
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.results-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.results-action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #c7d2fe;
}

.results-action-btn.copied {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}


.share-btn-wa:hover { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.share-btn-x:hover { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
.share-btn-li:hover { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }

/* ===== Embed Modal ===== */
.embed-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.embed-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.embed-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.embed-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.embed-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.embed-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.embed-modal-close:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.embed-modal-description {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.embed-modal-code {
  width: 100%;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--text);
  resize: vertical;
  line-height: 1.5;
}

.embed-modal-code:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.embed-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.embed-modal-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.embed-modal-copy:hover {
  box-shadow: 0 8px 20px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.embed-modal-copy:active {
  transform: translateY(0);
}

.embed-modal-copy.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

/* ===== Chart Cards ===== */
.chart-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.6);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.chart-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chart-export-btn:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: #c7d2fe;
}

.embed-btn {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  border-color: transparent;
  font-weight: 600;
}

.embed-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), #6d28d9);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.chart-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.chart-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.chart-container {
  position: relative;
  height: clamp(220px, 40vh, 350px);
  width: 100%;
}

/* ===== Tables Section ===== */
.tables-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.6);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tables-section > .tables-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 20px 12px;
}

.tables-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  margin-bottom: 16px;
}

.tab-button {
  padding: 10px 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  min-height: 44px;
}

.tab-button:hover {
  color: var(--text-secondary);
  background: var(--bg);
}

.tab-button[data-tab="table-box3-current"] { color: #3b82f6; }
.tab-button[data-tab="table-box3-new"] { color: #f43f5e; }
.tab-button[data-tab="table-bv"] { color: #10b981; }

.tab-button[data-tab="table-box3-current"].active {
  background: #eff6ff; color: #1d4ed8; border-color: #93c5fd;
}
.tab-button[data-tab="table-box3-new"].active {
  background: #fff1f2; color: #be123c; border-color: #fda4af;
}
.tab-button[data-tab="table-bv"].active {
  background: #ecfdf5; color: #047857; border-color: #6ee7b7;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Table Wrapper */
.table-wrapper {
  overflow-x: auto;
  max-height: min(600px, 70vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: rgba(248,250,252,0.8);
  font-weight: 600;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.7rem;
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(238,242,255,0.3);
}

.data-table .text-right { text-align: right; }
.data-table .font-bold { font-weight: 600; }

.data-table .positive { color: #059669; }
.data-table .negative { color: var(--rose); }

.data-table .pension-row { background: rgba(16,185,129,0.04); }
.data-table .pension-row:hover { background: rgba(16,185,129,0.08); }

.data-table .totals-row {
  background: rgba(248,250,252,0.8);
  font-weight: 700;
  border-top: 2px solid var(--border);
  position: sticky;
  bottom: 0;
}

.data-table .totals-row td { border-bottom: none; }

/* Sticky columns */
.data-table th.sticky-col,
.data-table td.sticky-col {
  position: sticky;
  background-color: #ffffff !important;
  z-index: 2;
}

.data-table th.sticky-col {
  background-color: #f8fafc !important;
  z-index: 3;
}

.data-table .sticky-col-1 { left: 0; min-width: 55px; }
.data-table .sticky-col-2 { left: 55px; min-width: 55px; }
.data-table .sticky-col-3 { left: 110px; min-width: 100px; box-shadow: 2px 0 4px rgba(0,0,0,0.06); }

.data-table tbody tr:hover td.sticky-col { background-color: #eef2ff !important; }
.data-table .pension-row td.sticky-col { background-color: #ecfdf5 !important; }
.data-table .totals-row td.sticky-col { background-color: #f8fafc !important; }

/* ===== MPO Upload ===== */
.mpo-upload-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mpo-upload-area .btn-secondary {
  padding: 6px 10px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mpo-upload-area .btn-secondary:hover { background: var(--border); }

.mpo-status { font-size: 0.75rem; }
.mpo-status.success { color: var(--emerald); font-weight: 600; }
.mpo-status.error { color: var(--rose); }

.mpo-info {
  margin-top: 8px;
  padding: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text);
}

.mpo-info em { color: var(--text-muted); font-size: 0.7rem; }
.mpo-detail { color: var(--text-muted); font-size: 0.7rem; }

.field-hint {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Checkbox Group (for non-pill checkboxes) ===== */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
  font-size: 0.8rem;
}

/* ===== Responsive ===== */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tablet and below: stack layout */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .config-panel {
    width: 100%;
    position: static;
    max-height: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 16px;
  }

  .header-inner {
    padding: 10px 16px;
  }

  /* Safe area for notched phones */
  header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  /* Table: reduce sticky columns on tablet */
  .data-table .sticky-col-3 {
    position: static;
    box-shadow: none;
  }

  .data-table th.sticky-col.sticky-col-3 {
    position: sticky;
    top: 0;
    left: auto;
    z-index: 1;
  }

  .results-actions {
    gap: 6px;
  }

  .results-action-btn {
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  /* Chart section spacing */
  .chart-section {
    padding: 16px;
  }

  .results-panel {
    gap: 16px;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .container {
    padding: 10px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  header h1 { font-size: 0.9rem; }
  header .subtitle { font-size: 0.7rem; }

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

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .chart-container {
    height: clamp(200px, 35vh, 280px);
  }

  .chart-section {
    padding: 14px;
  }

  .chart-section h3 {
    font-size: 0.85rem;
  }

  .tabs {
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px;
  }

  .tab-button {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .config-card {
    padding: 12px;
  }

  .info-icon {
    font-size: 1rem;
    padding: 4px;
    min-width: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .vb-fields {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  /* Table: only first column sticky on phone */
  .data-table .sticky-col-2,
  .data-table .sticky-col-3 {
    position: static;
    box-shadow: none;
  }

  .data-table th.sticky-col.sticky-col-2,
  .data-table th.sticky-col.sticky-col-3 {
    position: sticky;
    top: 0;
    left: auto;
    z-index: 1;
  }

  .data-table {
    font-size: 0.7rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }

  .tables-section > .tables-header {
    padding: 14px 14px 10px;
  }

  .results-panel {
    gap: 12px;
  }

  .support-banner {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .scenario-pills {
    gap: 4px;
  }

  .scenario-pill {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  header {
    position: relative;
  }

  .chart-container {
    height: clamp(180px, 50vh, 250px);
  }

  .config-panel {
    position: static;
    max-height: none;
  }
}

/* ===== Feedback Section (inside config panel) ===== */

.feedback-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.feedback-field input[type="text"],
.feedback-field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.feedback-field input[type="text"]:focus,
.feedback-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.feedback-field input[type="text"]:hover,
.feedback-field textarea:hover {
  border-color: #cbd5e1;
}

.feedback-field textarea {
  resize: vertical;
  min-height: 100px;
}

.feedback-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.feedback-submit:hover {
  box-shadow: 0 8px 20px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.feedback-submit:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .feedback-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ===== SEO Footer ===== */
.seo-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.seo-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}

.seo-section {
  margin-bottom: 32px;
}

.seo-section:last-child {
  margin-bottom: 0;
}

.seo-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.seo-section > p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.seo-section > p:last-child {
  margin-bottom: 0;
}

.seo-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

/* FAQ list */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: #c7d2fe;
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.1);
}

.faq-item summary {
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
}

.faq-item[open] summary::before {
  content: "\2212";
  background: var(--primary);
  color: white;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item > p,
.faq-item > ul {
  padding: 0 16px 14px 44px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item > ul {
  padding-left: 62px;
  margin: 0;
}

.faq-item > ul li {
  margin-bottom: 6px;
}

@media (max-width: 480px) {
  .seo-footer-inner {
    padding: 28px 16px 36px;
  }

  .seo-section h2 {
    font-size: 1rem;
  }

  .faq-item summary {
    padding: 12px 14px;
    font-size: 0.825rem;
  }

  .faq-item > p,
  .faq-item > ul {
    padding: 0 14px 12px 38px;
    font-size: 0.8rem;
  }

  .faq-item > ul {
    padding-left: 52px;
  }
}

/* ===== Header Link (Artikelen) ===== */
.header-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.header-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== SEO Footer Article Links ===== */
.seo-article-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-article-links a {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.seo-article-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== Article Pages ===== */

/* Article Header */
.article-header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  position: sticky;
  top: 0;
  z-index: 40;
}

.article-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}

.article-logo:hover {
  color: var(--primary);
}

.article-nav {
  display: flex;
  gap: 4px;
}

.article-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.article-nav a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Article Main Layout */
.article-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.article-container {
  min-height: calc(100vh - 200px);
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 4px;
  color: var(--border);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb li[aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Article Hero */
.article-hero {
  margin-bottom: 32px;
}

.article-hero time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.article-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 8px 0 16px;
  letter-spacing: -0.3px;
}

.article-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Article Table of Contents */
.article-toc {
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.article-toc h2 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

.article-toc ol {
  list-style: decimal;
  margin: 0 0 0 20px;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.8;
}

.article-toc li {
  margin-bottom: 2px;
}

.article-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.article-toc a:hover {
  color: var(--primary);
}

/* Article Content Typography */
article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  letter-spacing: -0.2px;
}

article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}

article p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

article ul, article ol {
  margin: 0 0 16px 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

article li {
  margin-bottom: 6px;
}

article strong {
  color: var(--text);
  font-weight: 600;
}

article a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

article a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Article Chart Figure */
.article-chart {
  margin: 32px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-chart img {
  width: 100%;
  height: auto;
  display: block;
}

.article-chart-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
}

.article-chart-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.article-chart figcaption {
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-light);
}

.article-chart figcaption a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.article-chart figcaption a:hover {
  text-decoration: underline;
}

/* Article Author */
.article-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.article-author-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(99,102,241,0.2);
}

.article-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.article-author-bio {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Article CTA */
.article-cta {
  margin-top: 40px;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--primary-light), rgba(238,242,255,0.5));
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  text-align: center;
}

.article-cta h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

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

.article-cta-btn {
  display: inline-flex;
  width: auto;
  padding: 12px 24px;
  font-size: 0.875rem;
  text-decoration: none;
  color: white;
}

/* Article Hub: Cards */
.hub-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.article-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  overflow: hidden;
}

.article-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card-content {
  padding: 20px 24px;
}

.article-card time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.article-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0 8px;
  line-height: 1.4;
}

.article-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.article-card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.article-card:hover .article-card-link {
  color: var(--primary-dark);
}

/* Article Footer */
.article-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.article-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.article-footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.article-footer-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.article-footer-links a:hover {
  color: var(--primary);
}

.article-footer-sep {
  color: var(--text-muted);
}

.article-footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.article-footer-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--emerald);
}

/* Article Responsive */
@media (max-width: 768px) {
  .article-main {
    padding: 16px 16px 40px;
  }

  .article-header-inner {
    padding: 10px 16px;
  }

  .article-hero h1 {
    font-size: 1.4rem;
  }

  .article-lead {
    font-size: 0.95rem;
  }

  article h2 {
    font-size: 1.1rem;
    margin-top: 24px;
  }

  article p, article ul, article ol {
    font-size: 0.9rem;
  }

  .article-cta {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .article-header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .article-logo span {
    font-size: 0.8rem;
  }

  .article-nav a {
    font-size: 0.75rem;
    padding: 6px 8px;
  }

  .article-main {
    padding: 12px 12px 32px;
  }

  .article-hero h1 {
    font-size: 1.25rem;
  }

  .article-card-content {
    padding: 16px;
  }

  .breadcrumb {
    margin-bottom: 16px;
  }

  .header-link {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
}

/* ===== Print Styles ===== */
@media print {
  /* Basis: witte achtergrond, zwarte tekst */
  * { color-adjust: exact; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: white; font-size: 10pt; }

  /* Verberg niet-relevante elementen */
  header,
  .config-panel,
  .results-overlay,
  .results-actions,
  .chart-export-btn,
  .support-banner,
  .seo-footer,
  .embed-modal,
  noscript,
  .privacy-badge,
  .disclaimer { display: none !important; }

  /* Layout: resultaten vullen de hele pagina */
  .container, main, .layout { display: block; max-width: 100%; padding: 0; }
  .results-panel { display: block; gap: 16pt; }

  /* Stat cards: naast elkaar op een rij */
  .stats-grid { display: flex; flex-wrap: wrap; gap: 8pt; }
  .stat-card { break-inside: avoid; flex: 1 1 22%; min-width: 140pt; border: 1px solid #ccc; padding: 8pt; }
  .stat-card-bg { display: none; }

  /* Charts: voorkom afbreken midden in grafiek */
  .chart-section { break-inside: avoid; page-break-inside: avoid; border: none; box-shadow: none; padding: 8pt 0; }
  .chart-container { max-height: 300pt; }

  /* Tabellen: compacter, duidelijke borders */
  .tables-section { break-before: page; }
  .tab-content { display: block !important; margin-bottom: 16pt; }
  .tab-content:not(.active) { display: block !important; }
  .tabs { display: none; }
  .data-table { font-size: 7pt; border-collapse: collapse; width: 100%; }
  .data-table th, .data-table td { border: 1px solid #ccc; padding: 2pt 4pt; }
  .table-wrapper { overflow: visible; }
  .data-table .sticky-col { position: static; }

  /* Disclaimer onderaan */
  .results-disclaimer { font-size: 8pt; text-align: center; margin-top: 8pt; }
}
