/* ==========================================================================
   renten-rechner.net — Portfolio Design System V2
   ========================================================================== */

/* ---------- Self-hosted Fonts (GDPR compliant) ---------- */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/fonts/lexend-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/fonts/lexend-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}

/* ---------- Reset & Global ---------- */

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

html { scroll-behavior: smooth; }

::selection { background: #BFDBFE; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.ar-body {
  background: radial-gradient(ellipse at top, #EFF6FF 0%, #F8FAFC 50%);
  min-height: 100vh;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #0F172A;
}

h1, h2, h3, h4 { font-family: 'Lexend', system-ui, sans-serif; }
code, pre, .font-mono { font-family: 'IBM Plex Mono', monospace; }

a { color: #2563EB; text-decoration: none; transition: color 150ms ease; }
a:hover { color: #1E3A8A; text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Utility ---------- */

.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.text-center { text-align: center; }
.hidden { display: none; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-4 { padding-bottom: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-heading { font-family: 'Lexend', system-ui, sans-serif; }
.leading-relaxed { line-height: 1.625; }

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .md\:text-3xl { font-size: 1.875rem; }
  .md\:text-lg { font-size: 1.125rem; }
  .md\:pt-8 { padding-top: 2rem; }
  .md\:pb-6 { padding-bottom: 1.5rem; }
  .md\:-mt-8 { margin-top: -2rem; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Flex / Grid helpers ---------- */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }

/* ---------- 1. Hero Section ---------- */

.hero-section {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  position: relative;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    radial-gradient(circle at 20% 50%, white 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, white 1px, transparent 1px),
    radial-gradient(circle at 50% 80%, white 1px, transparent 1px);
  background-size: 60px 60px, 80px 80px, 40px 40px;
}

/* ---------- 2. Pill Navigation ---------- */

.nav-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  padding-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: all 200ms ease;
  border: 1px solid transparent;
}

.nav-pill:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.nav-pill--active {
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.15);
}

.nav-pill-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .nav-pills { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .nav-pill { padding: 6px 12px; font-size: 13px; }
  .nav-pill-icon { display: none; }
}

/* ---------- 3. Calculator Card ---------- */

.calc-card {
  background: #FFFFFF;
  border-radius: 20px;
  border-top: 4px solid #3B82F6;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);
  padding: 28px 24px;
  position: relative;
}

@media (min-width: 640px) {
  .calc-card { padding: 36px 32px; border-radius: 24px; }
}

.calc-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.calc-heading-icon {
  width: 28px;
  height: 28px;
  color: #3B82F6;
}

.calc-heading h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0F172A;
}

/* ---------- 4. Input Fields ---------- */

.input-group { margin-bottom: 16px; }

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94A3B8;
  pointer-events: none;
}

.ar-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  color: #0F172A;
  background: #FFFFFF;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ar-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ar-input::placeholder { color: #94A3B8; }

/* Input without icon */
.ar-input--no-icon { padding-left: 16px; }

/* Select styled */
.ar-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  color: #0F172A;
  background: #FFFFFF;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.ar-select:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Toggle / Checkbox styled */
.ar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  color: #475569;
}

.ar-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #2563EB;
  cursor: pointer;
}

/* Slider */
.ar-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #E2E8F0;
  border-radius: 3px;
  outline: none;
}

.ar-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.3);
}

.ar-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  cursor: pointer;
  border: none;
}

/* Collapsible "Erweiterte Einstellungen" */
.collapsible-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: #2563EB;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.collapsible-trigger:hover { color: #1E3A8A; }

.collapsible-chevron {
  width: 16px;
  height: 16px;
  transition: transform 200ms ease;
}

.collapsible-trigger[aria-expanded="true"] .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms ease;
}

.collapsible-content.is-open { max-height: 500px; }

/* CTA Button */
.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  color: #FFFFFF;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  margin-top: 8px;
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  transform: translateY(-1px);
}

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

/* ---------- 5. Result Section ---------- */

.result-card {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border-left: 4px solid #059669;
  border-radius: 14px;
  padding: 24px;
  margin-top: 20px;
  transition: all 300ms ease;
}

.result-card--loss {
  background: linear-gradient(135deg, #FEF2F2 0%, #FECACA 100%);
  border-left-color: #DC2626;
}

.result-label {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.result-number {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #059669;
  line-height: 1.2;
}

.result-number--loss { color: #DC2626; }

@media (min-width: 640px) {
  .result-number { font-size: 2.5rem; }
}

/* Breakdown pills */
.result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
}

.result-pill--green { background: rgba(5,150,105,0.1); color: #047857; }
.result-pill--red { background: rgba(220,38,38,0.1); color: #DC2626; }
.result-pill--amber { background: rgba(217,119,6,0.1); color: #B45309; }
.result-pill--blue { background: rgba(37,99,235,0.1); color: #1D4ED8; }

.result-breakdown {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  background: rgba(5, 150, 105, 0.1);
  border-radius: 9999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: #047857;
}

.result-breakdown:empty { display: none; }

.copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid #D1FAE5;
  color: #059669;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.copy-pill:hover { background: #ECFDF5; border-color: #059669; }

/* Cross-link CTA after result */
.result-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 150ms ease;
}

.result-cta:hover { background: #DBEAFE; text-decoration: none; }

/* ---------- 6. Chart ---------- */

.chart-container {
  width: 100%;
  height: 220px;
  margin-top: 20px;
  position: relative;
}

@media (min-width: 640px) {
  .chart-container { height: 280px; }
}

.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ---------- 7. Result Table ---------- */

.result-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.result-table th {
  background: #1E3A8A;
  color: #FFFFFF;
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  text-align: right;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.result-table th:first-child { text-align: left; }

.result-table td {
  padding: 10px 16px;
  text-align: right;
  border-bottom: 1px solid #F1F5F9;
  white-space: nowrap;
}

.result-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: #475569;
}

.result-table tr:nth-child(even) { background: #F8FAFC; }
.result-table tr:hover { background: #EFF6FF; }

.table-toggle {
  display: block;
  width: 100%;
  padding: 10px;
  text-align: center;
  background: #F8FAFC;
  border: none;
  border-top: 1px solid #E2E8F0;
  color: #2563EB;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0 0 12px 12px;
}

.table-toggle:hover { background: #EFF6FF; }

/* ---------- 8. TOC Pills ---------- */

.toc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.toc-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 150ms ease;
}

.toc-pill:hover {
  border-color: #3B82F6;
  color: #1E3A8A;
  background: #EFF6FF;
  text-decoration: none;
}

[id] { scroll-margin-top: 24px; }

/* ---------- 9. Content Cards ---------- */

.content-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  padding: 28px 24px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .content-card { padding: 36px 32px; }
}

/* ---------- 10. Formula Blocks ---------- */

.formula-block {
  background: #1E3A8A;
  color: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  border-left: 4px solid #3B82F6;
}

.formula-block code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  white-space: pre;
  color: #FFFFFF;
}

.formula-block--compact {
  padding: 16px 24px;
  text-align: center;
}

.formula-block--compact code { font-size: 18px; font-weight: 500; }

/* ---------- 11. Example Cards ---------- */

.example-card {
  position: relative;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.example-card--blue { background: #EFF6FF; border-left: 4px solid #3B82F6; }
.example-card--green { background: #F0FDF4; border-left: 4px solid #059669; }
.example-card--amber { background: #FFFBEB; border-left: 4px solid #D97706; }

.example-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

/* ---------- 12. FAQ Accordion ---------- */

.faq-list { border-top: 1px solid #E2E8F0; }

.faq-item { border-bottom: 1px solid #E2E8F0; }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: #0F172A;
  gap: 12px;
}

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

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #94A3B8;
  transition: transform 200ms ease;
}

details[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  padding: 0 0 16px 0;
  color: #475569;
  line-height: 1.6;
}

/* ---------- 13. Steps List ---------- */

.steps-list { position: relative; padding-left: 20px; }

.steps-list::before {
  content: '';
  position: absolute;
  left: 35px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(to bottom, #3B82F6, #93C5FD);
  border-radius: 1px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ---------- 14. Related Rechner Cards ---------- */

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

@media (min-width: 640px) {
  .rechner-cards { grid-template-columns: repeat(3, 1fr); }
}

.rechner-card {
  display: block;
  padding: 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  text-decoration: none;
  transition: all 200ms ease;
  text-align: center;
}

.rechner-card:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59,130,246,0.12);
  text-decoration: none;
  transform: translateY(-2px);
}

.rechner-card-icon { font-size: 2rem; margin-bottom: 8px; }

.rechner-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 4px;
}

.rechner-card p { font-size: 0.875rem; color: #64748B; }

/* ---------- 15. Footer ---------- */

.ar-footer {
  background: linear-gradient(135deg, #1E3A8A, #0F172A);
  margin-top: 48px;
}

.ar-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  position: relative;
}

.ar-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 200ms ease;
}

.ar-footer a:hover { color: #FFFFFF; text-decoration: none; }
.ar-footer a:hover::after { width: 100%; }

/* ---------- Finance-specific colors ---------- */

.text-gain { color: #059669; }
.text-loss { color: #DC2626; }
.text-tax { color: #D97706; }
.text-neutral { color: #2563EB; }
.text-muted { color: #64748B; }

/* ---------- Accessibility ---------- */

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

/* ---------- 16. Wizard Steps ---------- */

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0 8px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #94A3B8;
  cursor: pointer;
  transition: color 200ms ease;
  white-space: nowrap;
}

.wizard-step--active { color: #1E3A8A; }
.wizard-step--done { color: #059669; }

.wizard-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 14px;
  background: #E2E8F0;
  color: #94A3B8;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.wizard-step--active .wizard-step-num {
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: #FFFFFF;
}

.wizard-step--done .wizard-step-num {
  background: #059669;
  color: #FFFFFF;
}

.wizard-connector {
  width: 40px;
  height: 2px;
  background: #E2E8F0;
  margin: 0 8px;
  flex-shrink: 0;
  transition: background 200ms ease;
}

.wizard-connector--done { background: #059669; }

@media (max-width: 480px) {
  .wizard-step span:not(.wizard-step-num) { display: none; }
  .wizard-connector { width: 24px; margin: 0 4px; }
}

.wizard-panel { display: none; }
.wizard-panel--active { display: block; }

.wizard-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-secondary {
  flex: 1;
  height: 48px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #475569;
  font-family: 'Lexend', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.btn-secondary:hover {
  border-color: #3B82F6;
  color: #1E3A8A;
}

.wizard-nav .btn-primary { flex: 2; margin-top: 0; }

/* ---------- 17. Timeline Visualization ---------- */

.timeline {
  position: relative;
  height: 60px;
  background: #F1F5F9;
  border-radius: 12px;
  margin: 20px 0;
  overflow: hidden;
  display: flex;
}

.timeline-phase {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  transition: width 500ms ease;
}

.timeline-phase--work {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  border-radius: 12px 0 0 12px;
}

.timeline-phase--retire {
  background: linear-gradient(135deg, #059669, #34D399);
  border-radius: 0 12px 12px 0;
}

.timeline-markers {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748B;
  margin-top: 4px;
  padding: 0 4px;
}

/* ---------- 18. Rentenlücke Bar ---------- */

.gap-bar-wrap {
  margin: 20px 0;
}

.gap-bar {
  display: flex;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: #F1F5F9;
}

.gap-bar-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  transition: width 500ms ease;
  min-width: 0;
}

.gap-bar-segment--rente { background: #059669; }
.gap-bar-segment--gap { background: #F59E0B; }

.gap-bar-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
}

.gap-bar-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}

/* ---------- 19. Waterfall Chart (CSS-only) ---------- */

.waterfall {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 20px 0;
}

.waterfall-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

@media (max-width: 480px) {
  .waterfall-row { grid-template-columns: 100px 1fr 70px; font-size: 13px; }
}

.waterfall-label {
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waterfall-bar-wrap {
  height: 28px;
  position: relative;
  display: flex;
  align-items: center;
}

.waterfall-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 500ms ease;
  min-width: 4px;
}

.waterfall-bar--gross { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.waterfall-bar--deduction { background: linear-gradient(135deg, #DC2626, #F87171); }
.waterfall-bar--net { background: linear-gradient(135deg, #059669, #34D399); }

.waterfall-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.waterfall-value--positive { color: #059669; }
.waterfall-value--negative { color: #DC2626; }

.waterfall-divider {
  border: none;
  border-top: 2px dashed #E2E8F0;
  margin: 4px 0;
}

/* ---------- 20. Info Tooltips ---------- */

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
}

.info-tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 400;
  border-radius: 8px;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  z-index: 100;
  margin-bottom: 6px;
  line-height: 1.4;
}

/* ---------- 21. Rentenpunkte Data Table ---------- */

.rp-table-highlight { background: #EFF6FF !important; font-weight: 600; }

/* ---------- 22. Radio Button Group ---------- */

.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
  transition: all 200ms ease;
  color: #475569;
  background: #FFFFFF;
}

.radio-pill:has(input:checked) {
  border-color: #3B82F6;
  background: #EFF6FF;
  color: #1E3A8A;
}

.radio-pill input { display: none; }

/* ---------- 23. Slider with value display ---------- */

.slider-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: #1E3A8A;
  min-width: 48px;
  text-align: right;
}

/* ---------- 24. Touch Target Fixes (min 48px) ---------- */

.wizard-step {
  min-height: 48px;
  padding: 8px 12px;
  border: none;
  background: none;
  font-family: inherit;
}

.toc-pill {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.nav-pill {
  min-height: 48px;
}

.radio-pill {
  min-height: 48px;
}

.faq-question {
  min-height: 48px;
}

.rechner-card {
  min-height: 48px;
}

.btn-primary, .btn-secondary {
  min-height: 48px;
}

.ar-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.result-cta {
  min-height: 48px;
}

.copy-pill {
  min-height: 48px;
}

/* ---------- 25. Range Slider Track Fix (6px → 10px) ---------- */

.ar-slider {
  height: 10px;
  border-radius: 5px;
}

.ar-slider::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
}

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

/* ---------- 26. Formula Block Text Wrap Fix ---------- */

.formula-block code {
  white-space: pre-wrap;
  word-break: break-word;
}

.formula-block--compact code {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 27. Wizard Result State ---------- */

.wizard-step--result {
  color: #059669;
}

.wizard-step--result .wizard-step-num {
  background: linear-gradient(135deg, #059669, #34D399);
  color: #FFFFFF;
}

.wizard-connector--result {
  background: #059669;
}

/* ---------- Print ---------- */

@media print {
  .hero-section, .ar-footer, .copy-pill, .nav-pills, .chart-container, .wizard-nav {
    display: none;
  }
  .content-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  .wizard-panel { display: block !important; }
}
