/**
 * Rentenlueckenrechner - Styles (Mobile First)
 *
 * Design-System basierend auf FrauFinanzen.de Branding.
 * Alle visuellen Werte als CSS Custom Properties (--ff-* Prefix).
 */

/* ========================================
   1. DESIGN TOKENS
   ======================================== */

:root {
  /* Farben - Primaer */
  --ff-color-primary: #FF4FB2;
  --ff-color-primary-hover: #D80587;
  --ff-color-primary-light: #F4E7FB;

  /* Farben - Sekundaer */
  --ff-color-secondary: #00B7B1;
  --ff-color-secondary-light: #44D6B2;

  /* Farben - Text */
  --ff-color-text-heading: #000000;
  --ff-color-text-body: #828282;
  --ff-color-text-label: rgba(0, 0, 0, 0.85);
  --ff-color-text-sublabel: rgba(0, 0, 0, 0.55);
  --ff-color-text-field: rgba(0, 0, 0, 0.7);
  --ff-color-text-white: #ffffff;

  /* Farben - Status */
  --ff-color-error: #d63637;
  --ff-color-success: #31BD81;
  --ff-color-success-light: #D8F4E8;
  --ff-color-warning: #FBE085;
  --ff-color-warning-light: #FEF8E1;

  /* Farben - Hintergruende */
  --ff-color-bg-page: #ffffff;
  --ff-color-bg-sidebar: #F6FFFD;
  --ff-color-bg-neutral: #EEEEEE;

  /* Farben - Borders */
  --ff-color-border: rgba(0, 0, 0, 0.25);
  --ff-color-border-light: #EEEEEE;

  /* Farben - Chart */
  --ff-chart-benoetigte-rente: #CCCCCC;
  --ff-chart-gesetzliche-rente: #31BD81;
  --ff-chart-rentenluecke: #d63637;
  --ff-chart-label-luecke: #d63637;

  /* Typografie */
  --ff-font-heading: archivo, Arial, Helvetica, sans-serif;
  --ff-font-body: proxima-nova, Arial, Helvetica, sans-serif;

  --ff-font-size-xs: 13px;
  --ff-font-size-sm: 14px;
  --ff-font-size-base: 18px;
  --ff-font-size-md: 20px;
  --ff-font-size-lg: 24px;
  --ff-font-size-xl: 30px;
  --ff-font-size-2xl: 36px;
  --ff-font-size-3xl: 48px;

  --ff-font-weight-light: 300;
  --ff-font-weight-regular: 400;
  --ff-font-weight-medium: 500;
  --ff-font-weight-semibold: 600;
  --ff-font-weight-bold: 700;

  --ff-line-height-tight: 1.2;
  --ff-line-height-base: 1.7;

  /* Spacing */
  --ff-space-xs: 4px;
  --ff-space-sm: 8px;
  --ff-space-md: 16px;
  --ff-space-lg: 24px;
  --ff-space-xl: 32px;
  --ff-space-2xl: 48px;

  /* Borders & Radii */
  --ff-border-radius-sm: 3px;
  --ff-border-radius-md: 4px;
  --ff-border-radius-lg: 8px;
  --ff-border-radius-round: 50%;

  /* Shadows */
  --ff-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --ff-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --ff-transition-fast: 150ms ease;
  --ff-transition-base: 250ms ease;
  --ff-transition-slow: 400ms ease;

  /* Layout */
  --ff-container-max-width: 1140px;
  --ff-container-padding: var(--ff-space-md);
  --ff-wizard-sidebar-width: 300px;
}

/* ========================================
   2. BASE & RESET
   ======================================== */

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

.ff-rechner {
  font-family: var(--ff-font-body);
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-light);
  line-height: var(--ff-line-height-base);
  color: var(--ff-color-text-body);
  background: var(--ff-color-bg-page);
  max-width: var(--ff-container-max-width);
  margin: 0 auto;
  padding: var(--ff-container-padding);
}

/* ========================================
   3. TYPOGRAPHY
   ======================================== */

.ff-rechner .ff-content h2 {
  font-family: var(--ff-font-heading);
  font-size: var(--ff-font-size-lg);
  font-weight: var(--ff-font-weight-semibold);
  color: var(--ff-color-text-heading);
  line-height: var(--ff-line-height-tight);
  margin-bottom: var(--ff-space-md);
}

.ff-rechner h3 {
  font-family: var(--ff-font-heading);
  font-size: var(--ff-font-size-md);
  font-weight: var(--ff-font-weight-semibold);
  color: var(--ff-color-text-heading);
  line-height: var(--ff-line-height-tight);
  margin-bottom: var(--ff-space-md);
}

/* Rechner Header (volle Breite ueber Content + Sidebar) */
.ff-rechner-header {
  margin-bottom: var(--ff-space-xl);
}

.ff-rechner .ff-rechner-titel {
  font-family: var(--ff-font-heading);
  font-size: var(--ff-font-size-lg);
  font-weight: var(--ff-font-weight-bold);
  color: var(--ff-color-primary);
  line-height: var(--ff-line-height-tight);
  margin-bottom: var(--ff-space-md);
}

.ff-rechner-intro {
  color: var(--ff-color-text-body);
  line-height: var(--ff-line-height-base);
}

.ff-subline {
  color: var(--ff-color-text-body);
  margin-bottom: var(--ff-space-lg);
  padding-bottom: var(--ff-space-lg);
  border-bottom: 1px solid var(--ff-color-border-light);
}

.ff-erklaerungs-text {
  color: var(--ff-color-text-body);
  margin-bottom: var(--ff-space-lg);
  padding-bottom: var(--ff-space-lg);
  border-bottom: 1px solid var(--ff-color-border-light);
}

/* ========================================
   4. WIZARD STEPPER
   ======================================== */

.ff-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: var(--ff-space-2xl);
  padding: var(--ff-space-lg) var(--ff-space-sm) var(--ff-space-lg) 0;
}

.ff-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.ff-step__circle {
  width: 32px;
  height: 32px;
  border-radius: var(--ff-border-radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ff-font-size-sm);
  font-weight: var(--ff-font-weight-semibold);
  border: 2px solid var(--ff-color-border-light);
  background: var(--ff-color-bg-page);
  color: var(--ff-color-text-body);
  transition: all var(--ff-transition-base);
}

.ff-step--active .ff-step__circle {
  background: var(--ff-color-secondary);
  border-color: var(--ff-color-secondary);
  color: var(--ff-color-text-white);
}

.ff-step--completed .ff-step__circle {
  background: var(--ff-color-secondary-light);
  border-color: var(--ff-color-secondary-light);
  color: var(--ff-color-text-white);
}

.ff-step__check {
  display: none;
}

.ff-step--completed .ff-step__check {
  display: inline;
}

.ff-step--completed .ff-step__number {
  display: none;
}

.ff-step__label {
  font-size: var(--ff-font-size-sm);
  font-weight: var(--ff-font-weight-regular);
  color: var(--ff-color-text-body);
  margin-top: var(--ff-space-sm);
  text-align: center;
  display: none;
}

.ff-step--active .ff-step__label {
  color: var(--ff-color-text-heading);
}

.ff-step--completed .ff-step__label {
  color: var(--ff-color-secondary);
}

.ff-step__line {
  flex: 1;
  height: 2px;
  background: var(--ff-color-border-light);
  margin: 16px var(--ff-space-sm) 0;
  min-width: 24px;
  transition: background var(--ff-transition-base);
}

.ff-step__line--completed {
  background: var(--ff-color-secondary-light);
}

/* ========================================
   5. WIZARD BODY (Content + Sidebar)
   ======================================== */

.ff-wizard-body {
  display: flex;
  flex-direction: column;
  gap: var(--ff-space-lg);
}

.ff-content {
  flex: 1;
  min-width: 0;
}

.ff-step-content {
  display: none;
}

.ff-step-content--active {
  display: block;
  animation: ffFadeIn 300ms ease-in-out;
}

@keyframes ffFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   6. SIDEBAR
   ======================================== */

.ff-sidebar {
  background: var(--ff-color-bg-sidebar);
  border-radius: var(--ff-border-radius-lg);
  padding: var(--ff-space-lg);
  box-shadow: var(--ff-shadow-sm);
}

.ff-sidebar__content {
  display: none;
}

.ff-sidebar__content--active {
  display: block;
}

.ff-sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--ff-space-sm) 0;
  border-bottom: 1px solid var(--ff-color-border-light);
  font-size: var(--ff-font-size-sm);
}

.ff-sidebar-row:last-of-type {
  border-bottom: none;
}

.ff-sidebar-row__label {
  color: var(--ff-color-text-body);
  flex: 1;
  padding-right: var(--ff-space-md);
}

.ff-sidebar-row__value {
  color: var(--ff-color-text-heading);
  font-weight: var(--ff-font-weight-semibold);
  text-align: right;
  white-space: nowrap;
}

.ff-sidebar-row__value--highlight {
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-bold);
}

/* ========================================
   7. FORM FIELDS
   ======================================== */

.ff-fields {
  display: flex;
  flex-direction: column;
  gap: var(--ff-space-lg);
}

.ff-field {
  display: flex;
  flex-direction: column;
}

.ff-field__label {
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-bold);
  color: var(--ff-color-text-label);
  margin-bottom: var(--ff-space-sm);
  line-height: 1.4;
}

.ff-field__helper {
  font-size: var(--ff-font-size-sm);
  font-weight: var(--ff-font-weight-light);
  color: var(--ff-color-text-sublabel);
  margin-bottom: var(--ff-space-sm);
  line-height: 1.5;
}

/* --- Tooltip (Info-Icon) --- */
.ff-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: var(--ff-space-xs);
  vertical-align: middle;
}

.ff-rechner .ff-tooltip-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--ff-color-secondary);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.ff-rechner .ff-tooltip-trigger:hover,
.ff-rechner .ff-tooltip-trigger:focus-visible {
  color: var(--ff-color-primary);
}

.ff-tooltip-icon {
  width: 18px;
  height: 18px;
}

.ff-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ff-color-text-heading);
  color: var(--ff-color-text-white);
  font-size: var(--ff-font-size-sm);
  font-weight: var(--ff-font-weight-regular);
  line-height: 1.4;
  padding: var(--ff-space-sm) var(--ff-space-md);
  border-radius: var(--ff-border-radius-md);
  white-space: normal;
  width: max-content;
  max-width: 280px;
  z-index: 10;
  pointer-events: none;
}

.ff-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ff-color-text-heading);
}

.ff-tooltip-trigger:hover + .ff-tooltip,
.ff-tooltip-trigger:focus + .ff-tooltip {
  display: block;
}

@media (max-width: 480px) {
  .ff-tooltip {
    left: 0;
    transform: none;
    white-space: normal;
    min-width: 200px;
  }
  .ff-tooltip::after {
    left: 12px;
    transform: none;
  }
}

.ff-field__error {
  font-size: var(--ff-font-size-sm);
  font-weight: var(--ff-font-weight-regular);
  color: var(--ff-color-error);
  margin-top: var(--ff-space-xs);
  line-height: 1.5;
  display: none;
}

.ff-field--error .ff-field__error {
  display: block;
  animation: ffSlideDown 200ms ease;
}

@keyframes ffSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Select / Input base */
.ff-field select,
.ff-field input[type="text"],
.ff-field input[type="number"] {
  height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--ff-color-border);
  border-radius: 6px;
  background: var(--ff-color-bg-page);
  font-family: var(--ff-font-body);
  font-size: var(--ff-font-size-base);
  color: var(--ff-color-text-field);
  width: 100%;
  transition: border-color var(--ff-transition-fast), box-shadow var(--ff-transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.ff-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23828282' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.ff-field input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

/* Focus */
.ff-field select:focus,
.ff-field input:focus {
  outline: none;
  border-color: var(--ff-color-secondary);
  border-width: 2px;
  padding: 11px 15px;
  box-shadow: 0 0 0 3px rgba(0, 183, 177, 0.15);
}

.ff-field select:focus {
  padding-right: 43px;
}

/* Error state */
.ff-field--error select,
.ff-field--error input {
  border-color: var(--ff-color-error);
  border-width: 2px;
  padding: 11px 15px;
  box-shadow: 0 0 0 3px rgba(214, 54, 55, 0.15);
}

.ff-field--error select {
  padding-right: 43px;
}

/* Input with suffix (EUR) */
.ff-input-suffix {
  position: relative;
}

.ff-input-suffix input {
  padding-right: 60px;
}

.ff-input-suffix__text {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-medium);
  color: var(--ff-color-text-body);
  pointer-events: none;
}

/* ========================================
   8. TOGGLE BUTTON (Monat/Jahr)
   ======================================== */

.ff-toggle-group {
  display: inline-flex;
  overflow: hidden;
  border: none;
}

.ff-toggle-btn:first-child {
  border-radius: var(--ff-border-radius-md) 0 0 var(--ff-border-radius-md);
}

.ff-toggle-btn:last-child {
  border-radius: 0 var(--ff-border-radius-md) var(--ff-border-radius-md) 0;
}

.ff-rechner .ff-toggle-btn {
  padding: 8px 20px;
  font-family: var(--ff-font-body);
  font-size: var(--ff-font-size-sm);
  font-weight: var(--ff-font-weight-regular);
  color: rgb(2 2 2 / 55%);
  background: #cacaca;
  border: none;
  cursor: pointer;
  transition: all var(--ff-transition-fast);
}

.ff-rechner .ff-toggle-btn--active {
  background: var(--ff-color-secondary);
  color: var(--ff-color-text-white);
  font-weight: var(--ff-font-weight-semibold);
}

.ff-toggle-btn:not(.ff-toggle-btn--active):hover {
  background: var(--ff-color-bg-sidebar);
}

/* ========================================
   9. STEPPER INPUT (+/- Buttons)
   ======================================== */

.ff-stepper-input {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--ff-color-border-light);
  border-radius: var(--ff-border-radius-md);
  overflow: hidden;
}

.ff-rechner .ff-stepper-input__btn {
  width: 44px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ff-color-bg-sidebar);
  border: none;
  color: var(--ff-color-secondary);
  font-size: var(--ff-font-size-lg);
  font-weight: var(--ff-font-weight-semibold);
  cursor: pointer;
  transition: background var(--ff-transition-fast);
  user-select: none;
}

.ff-rechner .ff-stepper-input__btn:hover {
  background: var(--ff-color-success-light);
}

.ff-rechner .ff-stepper-input__btn:active {
  background: var(--ff-color-secondary-light);
  color: var(--ff-color-text-white);
}

.ff-stepper-input input {
  width: 80px;
  height: 48px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--ff-color-border-light);
  border-right: 1px solid var(--ff-color-border-light);
  font-family: var(--ff-font-body);
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-medium);
  color: var(--ff-color-text-field);
  -moz-appearance: textfield;
}

.ff-stepper-input input::-webkit-outer-spin-button,
.ff-stepper-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ff-stepper-input__suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-medium);
  color: var(--ff-color-text-body);
  background: var(--ff-color-bg-page);
  border-left: 1px solid var(--ff-color-border-light);
}

/* ========================================
   10. BUTTONS
   ======================================== */

.ff-nav {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--ff-space-md);
  margin-top: var(--ff-space-2xl);
  padding-top: var(--ff-space-lg);
  border-top: 0px solid var(--ff-color-border-light);
}

.ff-rechner .ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ff-space-sm);
  font-family: var(--ff-font-body);
  font-size: 16px;
  border-radius: var(--ff-border-radius-md);
  padding: 19px 38px;
  cursor: pointer;
  transition: all var(--ff-transition-base);
  text-decoration: none;
  line-height: var(--ff-line-height-tight);
  white-space: nowrap;
  min-height: 44px;
}

.ff-rechner .ff-btn--primary {
  background: var(--ff-color-primary) !important;
  color: var(--ff-color-text-white) !important;
  font-weight: var(--ff-font-weight-bold);
  text-transform: uppercase;
  border: none !important;
  letter-spacing: 0.5px;
}

.ff-rechner .ff-btn--primary:hover {
  background: var(--ff-color-primary-hover) !important;
  color: var(--ff-color-text-white) !important;
}

.ff-rechner .ff-btn--primary:active {
  transform: scale(0.98);
}

.ff-rechner .ff-btn--primary:disabled {
  background: var(--ff-color-bg-neutral) !important;
  color: var(--ff-color-text-body) !important;
  cursor: not-allowed;
  transform: none;
}

.ff-rechner .ff-btn--secondary {
  background: transparent !important;
  color: var(--ff-color-text-body) !important;
  font-weight: var(--ff-font-weight-semibold);
  border: 1px solid var(--ff-color-border-light) !important;
}

.ff-rechner .ff-btn--secondary:hover {
  background: var(--ff-color-bg-sidebar) !important;
  border-color: var(--ff-color-secondary) !important;
  color: var(--ff-color-text-body) !important;
}

.ff-rechner .ff-btn--hidden {
  display: none;
}

/* Mobile Navigation (zweite Button-Gruppe unter Sidebar) */
.ff-nav--mobile {
  display: none;
}

@media (max-width: 1023px) {
  .ff-nav--mobile {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--ff-space-md);
    margin-top: var(--ff-space-sm);
  }
}

@media (min-width: 480px) and (max-width: 1023px) {
  .ff-nav--mobile {
    flex-direction: row;
    justify-content: center;
  }
}

/* Obere Nav auf Mobile verstecken wenn Mobile-Nav aktiv */
@media (max-width: 1023px) {
  .ff-nav--hide-mobile {
    display: none;
  }

  /* Step 4: CTA + Neuberechnung im Content verstecken (sind in Mobile-Nav) */
  #step-4 .ff-cta-wrapper {
    display: none;
  }

  #step-4 > p:last-child {
    display: none;
  }
}

/* Mobile-Nav Buttons: Farben explizit setzen (WordPress-Override) */
.ff-rechner .ff-nav--mobile .ff-btn--primary {
  background: var(--ff-color-primary) !important;
  color: var(--ff-color-text-white) !important;
  border: none !important;
}

.ff-rechner .ff-nav--mobile .ff-btn--primary:hover {
  background: var(--ff-color-primary-hover) !important;
  color: var(--ff-color-text-white) !important;
}

.ff-rechner .ff-nav--mobile .ff-btn--secondary {
  background: transparent !important;
  color: var(--ff-color-text-body) !important;
  border: 1px solid var(--ff-color-border-light) !important;
}

.ff-rechner .ff-nav--mobile .ff-btn--secondary:hover {
  background: var(--ff-color-bg-sidebar) !important;
  border-color: var(--ff-color-secondary) !important;
}

/* Mobile-Nav: Buttons-Wrapper (Step 2/3) */
.ff-nav-mobile__buttons {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--ff-space-md);
  width: 100%;
}

@media (min-width: 480px) and (max-width: 1023px) {
  .ff-nav-mobile__buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* Mobile-Nav: Ergebnis-Block (Step 4) */
.ff-nav-mobile__ergebnis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ff-space-md);
  width: 100%;
}

/* Disclaimer (volle Breite, unter Content + Sidebar) */
.ff-disclaimer {
  font-size: var(--ff-font-size-sm);
  color: var(--ff-color-text-sublabel);
  line-height: 1.5;
  margin-top: var(--ff-space-lg);
  padding-top: var(--ff-space-lg);
  border-top: 1px solid var(--ff-color-border-light);
  width: 100%;
}

/* CTA Link-Button (Ergebnis) */
.ff-cta-link {
  display: inline-flex;
  text-decoration: none;
}

/* ========================================
   11. ERGEBNIS-SEITE (Step 4)
   ======================================== */

.ff-rechner .ff-ergebnis-headline {
  font-family: var(--ff-font-heading);
  font-size: var(--ff-font-size-md);
  font-weight: var(--ff-font-weight-semibold);
  color: var(--ff-color-text-heading);
  line-height: var(--ff-line-height-tight);
  margin-bottom: var(--ff-space-sm);
}

.ff-ergebnis-subline {
  color: var(--ff-color-text-body);
  margin-bottom: var(--ff-space-xl);
}

.ff-hinweis {
  background: var(--ff-color-warning-light);
  border-left: 3px solid var(--ff-color-warning);
  border-radius: 0 var(--ff-border-radius-md) var(--ff-border-radius-md) 0;
  padding: var(--ff-space-md) var(--ff-space-md);
  font-size: var(--ff-font-size-sm);
  color: var(--ff-color-text-field);
  margin-bottom: var(--ff-space-lg);
  line-height: 1.6;
}

.ff-hinweis p {
  margin-bottom: var(--ff-space-sm);
}

.ff-hinweis p:last-child {
  margin-bottom: 0;
}

.ff-vorsorge-text {
  margin-bottom: var(--ff-space-xl);
  font-size: var(--ff-font-size-sm);
  color: var(--ff-color-text-field);
  line-height: 1.6;
}

.ff-vorsorge-text p {
  margin-bottom: var(--ff-space-sm);
}

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

.ff-cta-wrapper {
  text-align: center;
  margin: var(--ff-space-xl) 0;
}

.ff-microcopy {
  font-size: var(--ff-font-size-xs);
  color: var(--ff-color-text-body);
  margin-top: var(--ff-space-sm);
  text-align: center;
}


.ff-ergebnis-kein-luecke {
  background: var(--ff-color-success-light);
  border-radius: var(--ff-border-radius-lg);
  padding: var(--ff-space-lg) var(--ff-space-xl);
  margin-bottom: var(--ff-space-lg);
}

/* ========================================
   12. CHARTS
   ======================================== */

/* --- Sidebar Chart (Step 3) --- */
.ff-chart--sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ff-chart__bars--sidebar {
  height: 200px;
}

/* Schritt 3 Sidebar: Links grau (Gehalt), rechts gruen (Benoetigte Rente) */
.ff-chart__bar--gehalt-grau {
  background: var(--ff-chart-benoetigte-rente);
}

.ff-chart__bar--gehalt-grau .ff-chart__bar-label {
  color: var(--ff-color-text-heading);
}

.ff-chart__bar--benoetigte-gruen {
  background: var(--ff-chart-gesetzliche-rente);
}

.ff-chart__bar--benoetigte-gruen .ff-chart__bar-label {
  color: var(--ff-color-text-white);
}

/* --- Ergebnis Chart (Step 4) --- */
.ff-chart--ergebnis {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ff-chart__luecke-label {
  font-size: var(--ff-font-size-base);
  font-weight: var(--ff-font-weight-bold);
  color: var(--ff-chart-label-luecke);
  padding: var(--ff-space-sm) var(--ff-space-md);
  border: 2px solid var(--ff-chart-label-luecke);
  border-radius: var(--ff-border-radius-md);
  margin-bottom: var(--ff-space-sm);
}

.ff-chart__bars {
  display: flex;
  gap: var(--ff-space-lg);
  align-items: flex-end;
  height: 200px;
  margin-bottom: var(--ff-space-lg);
}

.ff-chart__bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  height: 100%;
}

.ff-chart__bar-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
}

.ff-chart__bar {
  width: 100%;
  border-radius: var(--ff-border-radius-md) var(--ff-border-radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 600ms ease-out;
  overflow: hidden;
}

.ff-chart__bar--gesetzliche {
  background: var(--ff-chart-gesetzliche-rente);
}

.ff-chart__bar--benoetigte {
  background: var(--ff-chart-benoetigte-rente);
}

.ff-chart__bar--luecke {
  background: var(--ff-chart-rentenluecke);
  border-radius: var(--ff-border-radius-md) var(--ff-border-radius-md) 0 0;
}

.ff-chart__bar-label {
  font-size: var(--ff-font-size-xs);
  font-weight: var(--ff-font-weight-regular);
  text-align: center;
  line-height: 1.4;
  padding: var(--ff-space-sm);
  color: var(--ff-color-text-heading);
}

.ff-chart__bar--benoetigte .ff-chart__bar-label {
  color: var(--ff-color-text-heading);
}

.ff-chart__bar--gesetzliche .ff-chart__bar-label {
  color: var(--ff-color-text-white);
}

.ff-chart__bar--luecke .ff-chart__bar-label {
  color: var(--ff-color-text-white);
}

/* Legend */
.ff-chart__legend {
  width: 100%;
}

.ff-chart__legend-item {
  display: flex;
  align-items: baseline;
  gap: var(--ff-space-sm);
  padding: var(--ff-space-sm) 0;
  border-bottom: 1px solid var(--ff-color-border-light);
  font-size: var(--ff-font-size-sm);
}

.ff-chart__legend-item:last-child {
  border-bottom: none;
}

.ff-chart__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--ff-border-radius-round);
  flex-shrink: 0;
}

.ff-chart__legend-dot--benoetigte {
  background: var(--ff-chart-benoetigte-rente);
}

.ff-chart__legend-dot--gehalt-grau {
  background: var(--ff-chart-benoetigte-rente);
}

.ff-chart__legend-dot--benoetigte-gruen {
  background: var(--ff-chart-gesetzliche-rente);
}

.ff-chart__legend-dot--gesetzliche {
  background: var(--ff-chart-gesetzliche-rente);
}

.ff-chart__legend-dot--luecke {
  background: var(--ff-chart-rentenluecke);
}

.ff-chart__legend-text {
  flex: 1;
  color: var(--ff-color-text-body);
}

.ff-chart__legend-value {
  font-weight: var(--ff-font-weight-semibold);
  color: var(--ff-color-text-heading);
  white-space: nowrap;
}

/* ========================================
   13. ACCESSIBILITY
   ======================================== */

.ff-rechner :focus-visible {
  outline: 2px solid var(--ff-color-secondary);
  outline-offset: 3px;
}

.ff-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;
}

/* ========================================
   14. REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .ff-step-content--active {
    animation: none;
  }

  .ff-chart__bar {
    transition: none;
  }

  .ff-field--error .ff-field__error {
    animation: none;
  }

  .ff-rechner,
  .ff-rechner *,
  .ff-rechner *::before,
  .ff-rechner *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ========================================
   15. RESPONSIVE: >= 480px (Grosse Smartphones)
   ======================================== */

@media (min-width: 480px) {
  .ff-rechner .ff-rechner-titel {
    font-size: var(--ff-font-size-xl);
  }

  .ff-rechner .ff-content h2 {
    font-size: var(--ff-font-size-lg);
  }

  .ff-rechner .ff-ergebnis-headline {
    font-size: var(--ff-font-size-2xl);
  }

  .ff-step__label {
    display: block;
  }

  .ff-step__circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .ff-step__line {
    margin-top: 20px;
  }

  .ff-nav {
    flex-direction: row;
    justify-content: center;
  }

  .ff-fields--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ff-space-lg);
  }

}

/* ========================================
   16. RESPONSIVE: >= 768px (Tablets)
   ======================================== */

@media (min-width: 768px) {
  .ff-rechner .ff-rechner-titel {
    font-size: var(--ff-font-size-2xl);
  }

  .ff-rechner .ff-content h2 {
    font-size: var(--ff-font-size-xl);
  }

  .ff-rechner .ff-ergebnis-headline {
    font-size: var(--ff-font-size-2xl);
  }

  .ff-stepper {
    gap: 0;
  }

  .ff-step__line {
    min-width: 60px;
  }

  .ff-chart__bars {
    height: 250px;
  }

  .ff-chart__stacked-bar {
    height: 250px;
  }
}

/* ========================================
   17. RESPONSIVE: >= 1024px (Desktop)
   ======================================== */

@media (min-width: 1024px) {
  .ff-wizard-body {
    flex-direction: row;
    gap: var(--ff-space-xl);
  }

  .ff-sidebar {
    width: var(--ff-wizard-sidebar-width);
    flex-shrink: 0;
    align-self: stretch;
  }

  .ff-chart__bars {
    height: 300px;
  }

  .ff-chart__stacked-bar {
    height: 280px;
  }

  .ff-rechner .ff-ergebnis-headline {
    font-size: var(--ff-font-size-2xl);
  }
}
