/* === DESIGN TOKENS === */
:root,
[data-theme='light'] {
  --color-bg: #f5f4f0;
  --color-surface: #fafaf8;
  --color-surface-2: #ffffff;
  --color-surface-offset: #eeece7;
  --color-surface-offset-2: #e6e3de;
  --color-divider: #dcdad5;
  --color-border: #d0cdc6;
  --color-text: #1e1c15;
  --color-text-muted: #6b6a65;
  --color-text-faint: #b0afa9;
  --color-text-inverse: #f9f8f4;

  /* Dutch orange-inspired primary */
  --color-primary: #c7521a;
  --color-primary-hover: #a83e0f;
  --color-primary-active: #832e09;
  --color-primary-highlight: #f0ddd1;
  --color-primary-subtle: #fdf5f0;

  /* Accent — Dutch blue */
  --color-accent: #1a5f96;
  --color-accent-hover: #134779;
  --color-accent-highlight: #d0e4f5;

  --color-success: #2e7a3a;
  --color-success-hover: #1f5a29;
  --color-success-highlight: #d4ecd8;

  --color-warning: #a07c00;
  --color-warning-highlight: #fef3c7;

  --color-error: #b52c2c;
  --color-error-highlight: #fde8e8;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(30, 28, 21, 0.07);
  --shadow-md: 0 4px 16px rgba(30, 28, 21, 0.09);
  --shadow-lg: 0 12px 36px rgba(30, 28, 21, 0.12);

  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;

  --text-xs: clamp(0.72rem, 0.68rem + 0.2vw, 0.8rem);
  --text-sm: clamp(0.82rem, 0.78rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.3vw, 1rem);
  --text-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --text-lg: clamp(1.1rem, 0.9rem + 0.8vw, 1.4rem);
  --text-xl: clamp(1.4rem, 1rem + 1.5vw, 2rem);
  --text-2xl: clamp(1.8rem, 1rem + 3vw, 3rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --content-default: 1200px;
}

[data-theme='dark'] {
  --color-bg: #161512;
  --color-surface: #1d1c19;
  --color-surface-2: #222120;
  --color-surface-offset: #1a1917;
  --color-surface-offset-2: #242320;
  --color-divider: #2a2926;
  --color-border: #3a3935;
  --color-text: #d8d6d0;
  --color-text-muted: #7a7975;
  --color-text-faint: #52514d;
  --color-text-inverse: #1e1c15;
  --color-primary: #e07040;
  --color-primary-hover: #f08050;
  --color-primary-active: #f09060;
  --color-primary-highlight: #3d2518;
  --color-primary-subtle: #2a1a10;
  --color-accent: #5fa0d8;
  --color-accent-hover: #7ab5e4;
  --color-accent-highlight: #1a3050;
  --color-success: #5cb96a;
  --color-success-hover: #3da04e;
  --color-success-highlight: #1c3822;
  --color-warning: #d4b840;
  --color-warning-highlight: #3a3010;
  --color-error: #e05555;
  --color-error-highlight: #3a1818;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #161512;
    --color-surface: #1d1c19;
    --color-surface-2: #222120;
    --color-surface-offset: #1a1917;
    --color-surface-offset-2: #242320;
    --color-divider: #2a2926;
    --color-border: #3a3935;
    --color-text: #d8d6d0;
    --color-text-muted: #7a7975;
    --color-text-faint: #52514d;
    --color-text-inverse: #1e1c15;
    --color-primary: #e07040;
    --color-primary-hover: #f08050;
    --color-primary-active: #f09060;
    --color-primary-highlight: #3d2518;
    --color-primary-subtle: #2a1a10;
    --color-accent: #5fa0d8;
    --color-accent-hover: #7ab5e4;
    --color-accent-highlight: #1a3050;
    --color-success: #5cb96a;
    --color-success-hover: #3da04e;
    --color-success-highlight: #1c3822;
    --color-warning: #d4b840;
    --color-warning-highlight: #3a3010;
    --color-error: #e05555;
    --color-error-highlight: #3a1818;
  }
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
img, svg { display: block; max-width: 100%; }
input, button, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.2; }
p, li { text-wrap: pretty; max-width: 70ch; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; background: none; border: none; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}
.header-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}
.logo-text {
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover {
  background: var(--color-surface-offset-2);
  color: var(--color-text);
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--color-primary-subtle) 0%, var(--color-bg) 60%);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-12) var(--space-6);
}
.hero-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.hero-text h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  font-weight: 400;
}
.hero-text h1 em {
  color: var(--color-primary);
  font-style: italic;
}
.hero-text p {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 50ch;
}
.hero-stats {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 90px;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

/* === LAYOUT === */
.calculator-layout {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* === INPUT PANEL === */
.input-panel {
  position: sticky;
  top: 72px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.panel-header {
  padding: var(--space-5) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
[data-theme='dark'] .panel-header {
  color: var(--color-bg);
}
.panel-header h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.panel-header p {
  font-size: var(--text-sm);
  opacity: 0.85;
}
.calc-form {
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.form-section {
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.form-section legend {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
  width: 100%;
  margin-bottom: var(--space-2);
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.form-row label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 20%, transparent);
}
.input-prefix {
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--color-border);
  align-self: stretch;
}
.input-wrap input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-sm);
}
input[type="number"].slim-input,
input[type="number"]:not(.slim-input) {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:not(.input-wrap input):focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 20%, transparent);
  outline: none;
}
select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: auto;
}
.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.checkbox-row { flex-direction: row; align-items: center; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* === OUTPUT PANEL === */
.output-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* === RESULT CARDS === */
.result-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--color-surface-offset);
}
.card-header h3 {
  font-size: var(--text-md);
  font-weight: 600;
}
.costs-scenario {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}
.badge.green { background: var(--color-success-highlight); color: var(--color-success); }
.badge.yellow { background: var(--color-warning-highlight); color: var(--color-warning); }
.badge.red { background: var(--color-error-highlight); color: var(--color-error); }
.badge-orange { background: var(--color-primary-highlight); color: var(--color-primary); }

/* SUMMARY CARD */
.summary-grid {
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.summary-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.summary-item.primary { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.summary-item.accent { background: var(--color-accent); border-color: var(--color-accent); color: white; }
.summary-item.primary .summary-label,
.summary-item.accent .summary-label { color: rgba(255,255,255,0.75); }
.summary-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.summary-value {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.summary-value.sm { font-size: var(--text-lg); }

.affordability-bar-wrap {
  padding: 0 var(--space-6) var(--space-3);
}
.affordability-bar {
  height: 8px;
  background: var(--color-surface-offset-2);
  border-radius: var(--radius-full);
  position: relative;
  overflow: visible;
  margin-bottom: var(--space-2);
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success), var(--color-primary));
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 100%;
}
.bar-ideal {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 16px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.nhg-note {
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--text-sm);
}

/* COSTS TABLE */
.costs-table {
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  gap: var(--space-4);
}
.cost-row:hover { background: var(--color-surface-offset); }
.cost-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.cost-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
.cost-value.green { color: var(--color-success); }
.total-row {
  border-top: 2px solid var(--color-divider);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
}
.total-row .cost-label { font-weight: 700; color: var(--color-text); font-size: var(--text-base); }
.total-row .cost-value { font-size: var(--text-md); }
.net-row .cost-label { color: var(--color-success); font-weight: 600; }
.budget-comparison,
.savings-warning {
  margin: 0 var(--space-6) var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.budget-comparison.ok { background: var(--color-success-highlight); color: var(--color-success); }
.budget-comparison.warn { background: var(--color-warning-highlight); color: var(--color-warning); }
.budget-comparison.over { background: var(--color-error-highlight); color: var(--color-error); }
.savings-warning.ok { background: var(--color-success-highlight); color: var(--color-success); }
.savings-warning.warn { background: var(--color-warning-highlight); color: var(--color-warning); }
.savings-warning.danger { background: var(--color-error-highlight); color: var(--color-error); }

/* BIDDING CARD */
.bidding-card .card-header { background: color-mix(in oklab, var(--color-primary-highlight) 60%, var(--color-surface-offset)); }
.bidding-grid {
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.bid-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.bid-item.accent-bid {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.bid-item.accent-bid .bid-label { color: rgba(255,255,255,0.75); }
.bid-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.bid-value {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.bid-value.red { color: var(--color-error); }
.bidding-tips,
.location-context {
  margin: 0 var(--space-6) var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.bidding-tips { background: var(--color-primary-subtle); border: 1px solid var(--color-primary-highlight); }
.bidding-tips ul { padding-left: var(--space-5); }
.bidding-tips ul li { margin-bottom: var(--space-2); color: var(--color-text); }
.bidding-tips strong { color: var(--color-primary); }
.location-context { background: var(--color-accent-highlight); border: 1px solid color-mix(in oklab, var(--color-accent) 30%, transparent); color: var(--color-text); margin-top: 0; }

/* TIMELINE */
.timeline {
  list-style: none;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: calc(var(--space-6) + 16px);
  top: var(--space-6);
  bottom: var(--space-6);
  width: 2px;
  background: var(--color-divider);
  z-index: 0;
}
.timeline-step {
  display: flex;
  gap: var(--space-5);
  position: relative;
  padding-bottom: var(--space-6);
}
.timeline-step:last-child { padding-bottom: 0; }
.step-marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--color-surface);
}
.step-body {
  padding-top: var(--space-1);
}
.step-body strong {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}
.step-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.step-meta {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

/* RULES GRID */
.rules-grid {
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.rule-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}
.rule-item.highlight {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}
.rule-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.rule-value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-1);
}
.rule-item.highlight .rule-value { color: var(--color-primary); }
.rule-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* AANKOOPMAKELAAR TOGGLE ROW */
.aankoopmakelaar-row {
  background: color-mix(in oklab, var(--color-accent-highlight) 60%, transparent);
  border: 1px solid color-mix(in oklab, var(--color-accent) 25%, transparent);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3) !important;
  margin-top: var(--space-2);
}
.aankoopmakelaar-row:hover {
  background: var(--color-accent-highlight) !important;
}
.makelaar-label {
  max-width: none !important;
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  user-select: none;
}
.toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.toggle-track {
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition);
}
.toggle-label input:checked ~ .toggle-track {
  background: var(--color-accent);
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: var(--radius-full);
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-label input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(16px);
}
.aankoopmakelaar-row .cost-value {
  color: var(--color-text-muted);
  font-style: italic;
}
.aankoopmakelaar-row.active .cost-value {
  color: var(--color-text);
  font-style: normal;
  font-weight: 600;
}
.makelaar-detail {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 0 var(--space-3) var(--space-2);
  display: none;
  line-height: 1.5;
}
.makelaar-detail.visible {
  display: block;
}
.makelaar-detail .range-bar {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-2);
  flex-wrap: wrap;
}
.range-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-accent-highlight);
  color: var(--color-accent);
  border: 1px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
  white-space: nowrap;
}
.range-tag.active-tag {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
  padding: var(--space-6);
  margin-top: var(--space-8);
}
.footer-inner {
  max-width: var(--content-default);
  margin: 0 auto;
}
.footer-inner p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 90ch;
}
.footer-copy {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  color: var(--color-text-faint) !important;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .calculator-layout {
    grid-template-columns: 1fr;
    padding: var(--space-5) var(--space-4);
  }
  .input-panel {
    position: static;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .bidding-grid {
    grid-template-columns: 1fr;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: var(--space-8) var(--space-4); }
  .hero-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 580px) {
  .summary-grid,
  .bidding-grid,
  .rules-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--space-2); }
  .stat-pill { min-width: 80px; padding: var(--space-2) var(--space-3); }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-card {
  animation: fadeInUp 0.3s ease both;
}
.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.2s; }
.result-card:nth-child(5) { animation-delay: 0.25s; }
.result-card:nth-child(6) { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .result-card { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
