/* ============================================================
   ROI-Rechner Burnout-Prävention | Burnout LIFEBACK® Guide
   Rebuild — produktionsreife Single-Page-App
   Design: deep blue-slate + teal accent, ruhig, vertrauenswürdig
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root,
[data-theme='light'] {
  /* Type scale — fluide */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.15vw, 0.8125rem);
  --text-sm:   clamp(0.875rem, 0.83rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-md:   clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  --text-lg:   clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-2xl:  clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --text-hero: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);

  /* Spacing — 4px base */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;

  /* Brand palette — deep blue-slate + teal */
  --color-bg:              #f4f6f9;
  --color-surface:         #ffffff;
  --color-surface-2:       #f9fafc;
  --color-surface-offset:  #eef1f6;
  --color-divider:         #e2e6ee;
  --color-border:          #cdd3de;
  --color-border-strong:   #a8b1c2;

  --color-text:        #1a2133;
  --color-text-muted:  #56627a;
  --color-text-faint:  #8d96aa;
  --color-text-inverse: #ffffff;

  /* Primary teal (LIFEBACK brand) */
  --color-primary:         #0c7b7e;
  --color-primary-hover:   #09595c;
  --color-primary-active:  #073f41;
  --color-primary-soft:    #d6ebec;
  --color-primary-tint:    #eaf6f6;

  --color-accent:          #2dbdbd;
  --color-accent-soft:     #c2ecec;

  /* Inverse / dark deep slate (for hero accent + final CTA) */
  --color-deep:            #0f1c2e;
  --color-deep-2:          #16263d;

  /* Semantic */
  --color-danger:    #b02a2a;
  --color-danger-bg: #fdeaea;
  --color-warning:   #b05c00;
  --color-warning-bg:#fff4e5;
  --color-success:   #2d7d3a;
  --color-success-bg:#e8f5eb;
  --color-info:      #1560a0;
  --color-info-bg:   #e5f0fc;

  /* Cost-bar palette — same hues as live, slightly refined */
  --bar-1: #d04848; /* Fehlzeiten */
  --bar-2: #de7a26; /* Präsentismus */
  --bar-3: #c79a14; /* Fluktuation */
  --bar-4: #2d83b8; /* Führung */

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 28, 46, 0.05);
  --shadow-sm: 0 2px 6px rgba(15, 28, 46, 0.06), 0 1px 2px rgba(15, 28, 46, 0.04);
  --shadow-md: 0 6px 20px rgba(15, 28, 46, 0.08), 0 2px 6px rgba(15, 28, 46, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 28, 46, 0.12), 0 4px 12px rgba(15, 28, 46, 0.06);

  /* Motion */
  --t-fast: 120ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-base: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-slow: 360ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --content:       960px;
  --content-wide:  1240px;
  --content-narrow:640px;

  /* Fonts */
  --font-display: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --color-bg:              #0d1320;
  --color-surface:         #15202f;
  --color-surface-2:       #1a2638;
  --color-surface-offset:  #1f2c40;
  --color-divider:         #28344c;
  --color-border:          #2f3b54;
  --color-border-strong:   #3f4d6a;

  --color-text:        #e3e8f1;
  --color-text-muted:  #a0acc2;
  --color-text-faint:  #6c7790;
  --color-text-inverse: #0f1c2e;

  --color-primary:         #2dbdbd;
  --color-primary-hover:   #4fd1d1;
  --color-primary-active:  #79e0e0;
  --color-primary-soft:    #1a3a3c;
  --color-primary-tint:    #142b2d;

  --color-accent:          #4fd1d1;
  --color-accent-soft:     #1d4042;

  --color-deep:            #0a121e;
  --color-deep-2:          #131e30;

  --color-danger:    #ef6b6b;
  --color-danger-bg: #3a1818;
  --color-warning:   #e89a4d;
  --color-warning-bg:#3a2410;
  --color-success:   #5fbe6d;
  --color-success-bg:#142d18;
  --color-info:      #5aa6e8;
  --color-info-bg:   #0e2440;

  --bar-1: #e76b6b;
  --bar-2: #ee9651;
  --bar-3: #d9b441;
  --bar-4: #4ea7d4;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* ---------- BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv01';
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-text);
}

p { margin: 0 0 var(--s-3); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--color-primary); color: #fff; }

.visually-hidden,
.skip-link:not(:focus):not(:active) {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: var(--s-2); left: var(--s-2);
  background: var(--color-primary);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.hidden { display: none !important; }

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--s-6);
}
.container--wide { max-width: var(--content-wide); }
.container--narrow { max-width: var(--content-narrow); }

@media (max-width: 640px) {
  .container { padding-inline: var(--s-4); }
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--s-10);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-title {
  font-size: var(--text-xl);
  margin-bottom: var(--s-3);
}
.section-sub {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  margin: 0;
}

/* ---------- HEADER / NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.nav-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-6);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
}
.logo:hover { text-decoration: none; }
.logo-mark { flex-shrink: 0; }
.logo-text { white-space: nowrap; }
.logo-text strong { font-weight: 700; }
.logo-text sup { font-size: 0.55em; vertical-align: super; }

.nav-actions { display: flex; align-items: center; gap: var(--s-3); }

.nav-cta {
  background: var(--color-primary);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--t-base);
}
.nav-cta:hover { background: var(--color-primary-hover); color: #fff; text-decoration: none; }

.theme-toggle {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base);
}
.theme-toggle:hover { background: var(--color-surface-offset); border-color: var(--color-border-strong); }

@media (max-width: 540px) {
  .nav-cta { display: none; }
  .logo-text { font-size: var(--text-sm); }
}

/* ---------- HERO ---------- */
.hero {
  padding: var(--s-16) 0 var(--s-12);
  background:
    radial-gradient(ellipse at top right, var(--color-primary-tint) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, var(--color-surface-offset) 0%, transparent 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
}
[data-theme='dark'] .hero {
  background:
    radial-gradient(ellipse at top right, var(--color-primary-soft) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, var(--color-surface-2) 0%, transparent 60%),
    var(--color-bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--s-12);
  align-items: center;
}

@media (max-width: 900px) {
  .hero { padding: var(--s-12) 0; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-8); }
}

.hero-copy { max-width: 720px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-tint);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-pill);
  margin-bottom: var(--s-5);
}
.eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
}
.eyebrow--inverse { color: var(--color-accent); background: rgba(45, 189, 189, 0.15); }
.eyebrow--inverse .eyebrow-dot { background: var(--color-accent); }

.hero-title {
  font-size: var(--text-hero);
  font-weight: 500;
  margin-bottom: var(--s-5);
  letter-spacing: -0.025em;
}
.hero-title-accent {
  display: block;
  color: var(--color-primary);
  font-style: italic;
}

.hero-lead {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--s-6);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-8);
}
.badge {
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.hero-stats-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--s-5);
  position: relative;
  overflow: hidden;
}
.hero-stats-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.hero-stat {
  display: grid;
  gap: var(--s-1);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}
.hero-stats-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin: 0;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--color-divider);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--lg {
  font-size: var(--text-base);
  padding: var(--s-4) var(--s-6);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--color-primary-hover); color: #fff; box-shadow: var(--shadow-md); }

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--secondary:hover { background: var(--color-surface-offset); border-color: var(--color-border-strong); color: var(--color-text); }

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover { background: var(--color-surface-offset); color: var(--color-text); border-color: var(--color-border-strong); }

.btn--inverse {
  background: var(--color-accent);
  color: var(--color-deep);
  border-color: var(--color-accent);
}
.btn--inverse:hover { background: #4fd1d1; color: var(--color-deep); border-color: #4fd1d1; }

.link-button {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}
.link-button:hover { text-decoration: underline; }

/* ---------- CALCULATOR SECTION ---------- */
.calculator-section {
  padding: var(--s-16) 0;
}

.assumptions {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  margin-bottom: var(--s-8);
  overflow: hidden;
}
.assumptions[open] { box-shadow: var(--shadow-sm); }
.assumptions-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  user-select: none;
  transition: background var(--t-base);
}
.assumptions-summary::-webkit-details-marker { display: none; }
.assumptions-summary:hover { background: var(--color-surface-offset); }
.assumptions-summary-left {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--color-primary);
}
.assumptions[open] .chevron { transform: rotate(180deg); }
.chevron { transition: transform var(--t-base); color: var(--color-text-muted); }

.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
  padding: var(--s-2) var(--s-5) var(--s-5);
  border-top: 1px solid var(--color-divider);
}
.assumption strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-primary);
  margin-bottom: var(--s-1);
}
.assumption p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--s-8);
  align-items: start;
}

@media (max-width: 1024px) {
  .calc-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

/* ---------- INPUTS ---------- */
.calc-inputs {
  display: grid;
  gap: var(--s-5);
}

.block {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--s-5) var(--s-5) var(--s-3);
  margin: 0;
  position: relative;
}
.block--accent {
  background: linear-gradient(180deg, var(--color-primary-tint), var(--color-surface) 70%);
  border-color: var(--color-primary-soft);
}
.block-legend {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--s-3);
  padding: 0;
}
.block-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
}
.block--accent .block-num { background: var(--color-primary); }

.field {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 540px) {
  .field-grid { grid-template-columns: 1fr; }
}

.field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}

.field-row {
  display: flex;
  align-items: stretch;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.field-row:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}
.field-row input[type='number'] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: var(--s-3) var(--s-4);
  font: inherit;
  color: var(--color-text);
  outline: none;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.field-row input[type='number']::-webkit-outer-spin-button,
.field-row input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border-left: 1px solid var(--color-border);
  white-space: nowrap;
}

/* Sliders */
.slider-row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-1) 0;
}
.slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-primary) var(--slider-pct, 50%), var(--color-divider) var(--slider-pct, 50%));
  outline: none;
  cursor: pointer;
  margin: 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-base);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.1); border-color: var(--color-primary-hover); }
.slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.slider-val {
  min-width: 92px;
  text-align: right;
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
  background: var(--color-primary-tint);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-pill);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

/* ---------- RESULTS ---------- */
.calc-results {
  position: sticky;
  top: 80px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.calc-results::-webkit-scrollbar { width: 8px; }
.calc-results::-webkit-scrollbar-track { background: transparent; }
.calc-results::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-pill); }

@media (max-width: 1024px) {
  .calc-results { position: static; max-height: none; }
}

.results-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s-12) var(--s-6);
  color: var(--color-text-muted);
  gap: var(--s-4);
}
.placeholder-icon {
  width: 80px; height: 80px;
  display: grid; place-items: center;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  border-radius: 50%;
}

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
@media (max-width: 540px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi {
  --kpi-bg: var(--color-surface-offset);
  --kpi-fg: var(--color-text);
  background: var(--kpi-bg);
  border-radius: var(--radius-md);
  padding: var(--s-4) var(--s-5);
  border-left: 4px solid var(--kpi-fg);
}
.kpi-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--s-2);
}
.kpi-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--kpi-fg);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-1);
}
.kpi-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.kpi--danger { --kpi-bg: var(--color-danger-bg); --kpi-fg: var(--color-danger); }
.kpi--warning { --kpi-bg: var(--color-warning-bg); --kpi-fg: var(--color-warning); }
.kpi--success { --kpi-bg: var(--color-primary-tint); --kpi-fg: var(--color-primary); }
.kpi--info { --kpi-bg: var(--color-info-bg); --kpi-fg: var(--color-info); }

/* Net benefit card */
.net-card {
  background: linear-gradient(135deg, var(--color-deep) 0%, var(--color-deep-2) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.net-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-3);
  flex-wrap: wrap;
}
.net-card-label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}
.net-card-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.net-card-bar {
  display: flex;
  height: 12px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: var(--s-3);
}
.net-card-bar-program { background: rgba(255, 255, 255, 0.4); transition: flex var(--t-slow); }
.net-card-bar-savings { background: var(--color-accent); transition: flex var(--t-slow); }
.net-card-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.85);
}
.net-card-legend strong { font-variant-numeric: tabular-nums; color: #fff; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: var(--s-1);
  vertical-align: middle;
}
.dot--program { background: rgba(255, 255, 255, 0.4); }
.dot--savings { background: var(--color-accent); }

/* Breakdown */
.breakdown {
  margin-bottom: var(--s-6);
}
.breakdown-head { margin-bottom: var(--s-4); }
.breakdown-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  margin-bottom: var(--s-1);
}
.breakdown-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
}

.breakdown-bars { display: grid; gap: var(--s-3); }
.breakdown-bar {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--s-3) var(--s-4);
}
.breakdown-bar-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
  font-size: var(--text-sm);
}
.breakdown-bar-name { color: var(--color-text); font-weight: 500; }
.breakdown-bar-amount {
  color: var(--color-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bar-track {
  height: 8px;
  background: var(--color-divider);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width var(--t-slow);
}

/* Tone toggle */
.tone-section { margin-bottom: var(--s-6); }
.tone-toggle {
  display: inline-flex;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: var(--s-4);
  width: 100%;
  max-width: 100%;
}
.tone-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
  white-space: nowrap;
}
.tone-btn.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-xs);
}
.tone-btn:not(.active):hover { color: var(--color-text); }

@media (max-width: 480px) {
  .tone-btn { font-size: var(--text-xs); padding: var(--s-2) var(--s-3); }
}

.tone-panel {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.tone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
  font-weight: 600;
}
.tone-header--hr { color: var(--color-info); background: var(--color-info-bg); }
.tone-header--gl { color: var(--color-primary); background: var(--color-primary-tint); }

.tone-body {
  padding: var(--s-5);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text);
}
.tone-body p { margin: 0 0 var(--s-4); }
.tone-body p:last-child { margin-bottom: 0; }
.tone-body strong { font-weight: 700; color: var(--color-text); }

.tone-body .highlight-box {
  background: var(--color-primary-tint);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-4) 0;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-base);
}
.copy-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Result CTA */
.result-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  align-items: center;
  justify-content: space-between;
  padding: var(--s-6);
  background: linear-gradient(135deg, var(--color-primary-tint), var(--color-surface));
  border: 1px solid var(--color-primary-soft);
  border-radius: var(--radius-md);
}
.result-cta-text { flex: 1; min-width: 240px; }
.result-cta h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--s-2);
}
.result-cta p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- WHY ---------- */
.why {
  padding: var(--s-16) 0;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.why-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--s-6);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.why-card:hover {
  border-color: var(--color-primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.why-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--s-4);
}
.why-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  margin-bottom: var(--s-2);
}
.why-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ---------- FAQ ---------- */
.faq {
  padding: var(--s-16) 0;
  background: var(--color-bg);
}
.faq-list {
  display: grid;
  gap: var(--s-3);
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-4) var(--s-5);
  font-weight: 800;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
}
.faq-item[open] summary {
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-2);
}
.faq-item[open] summary::after { content: '–'; }
.faq-item p {
  margin: 0;
  padding: var(--s-4) var(--s-5) var(--s-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 78ch;
}

/* ---------- FINAL CTA ---------- */
.final-cta { padding: var(--s-16) 0; }
.final-cta-card {
  background: linear-gradient(135deg, var(--color-deep) 0%, var(--color-deep-2) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--s-10) var(--s-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.final-cta-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 60%);
  opacity: 0.25;
  pointer-events: none;
}
.final-cta-card > div { flex: 1; min-width: 280px; position: relative; z-index: 1; }
.final-cta-card .btn { position: relative; z-index: 1; }
.final-cta-card h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: #fff;
  margin-bottom: var(--s-3);
}
.final-cta-card p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: var(--text-md);
  max-width: 60ch;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--s-12) 0 var(--s-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-8);
  margin-bottom: var(--s-10);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .logo { margin-bottom: var(--s-3); }
.footer-claim {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 32ch;
}

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--s-3);
}
.footer-nav ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: var(--s-2);
}
.footer-nav a,
.footer-nav .link-button {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-nav a:hover,
.footer-nav .link-button:hover { color: var(--color-primary); text-decoration: none; }

.footer-contact { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-contact p { margin: 0 0 var(--s-2); }

.footer-legal {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--s-6);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
  max-width: 80ch;
}
.footer-legal p { margin: 0 0 var(--s-2); }

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--s-4);
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 28, 46, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 0;
}
.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  margin: var(--s-8) auto;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn var(--t-slow);
}
.modal-panel--narrow { max-width: 560px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--color-divider);
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  transition: background var(--t-base);
}
.modal-close:hover { background: var(--color-surface-offset); }
.modal-body {
  padding: var(--s-6);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  margin: var(--s-5) 0 var(--s-2);
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  margin: var(--s-4) 0 var(--s-2);
}
.modal-foot {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: flex-end;
  gap: var(--s-3);
}

/* Cookie option */
.cookie-option {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-3);
}
.cookie-option label {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  cursor: pointer;
}
.cookie-option label > span:not(.cookie-note) {
  display: grid;
  gap: var(--s-1);
}
.cookie-option strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.cookie-note {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.cookie-option input[type='checkbox'] {
  margin-top: 3px;
  width: 18px; height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.cookie-option input:disabled { cursor: not-allowed; }
.cookie-info-link {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--s-4);
}

/* ---------- COOKIE BANNER ---------- */
body:has(.cookie-banner:not([hidden])) {
  padding-bottom: 140px;
}
@media (max-width: 720px) {
  body:has(.cookie-banner:not([hidden])) {
    padding-bottom: 220px;
  }
}
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(15, 28, 46, 0.1);
  padding: var(--s-4) 0;
  animation: slideUp var(--t-slow);
}
.cookie-banner[hidden] { display: none; }
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cookie-banner-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: 0 var(--s-6);
  flex-wrap: wrap;
}
.cookie-banner-text { flex: 1; min-width: 260px; }
.cookie-banner-title {
  font-weight: 600;
  margin: 0 0 var(--s-1);
}
.cookie-banner-text p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

@media (max-width: 540px) {
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; min-width: 0; }
}
