/* ─────────────────────────────────────────────────────────────────────────
   AfA-Rechner · Redesign
   BEM: .afar__*
───────────────────────────────────────────────────────────────────────── */

:root {
  --afar-navy:    #002147;
  --afar-teal:    #006b6b;
  --afar-accent:  #c47e2e;
  --afar-green:   #1a7f4e;
  --afar-light:   #f5f7fa;
  --afar-border:  #dde3ea;
  --afar-text:    #1a2535;
  --afar-muted:   #647083;
  --afar-radius:  10px;
  --afar-shadow:  0 2px 10px rgba(0,33,71,.09);
}

/* ── Shell ─────────────────────────────────────────────────────────────── */

.afar {
  font-family: inherit;
  color: var(--afar-text);
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.afar__header {
  margin-bottom: 2rem;
}
.afar__header .afar__header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
}

.afar__header-icon {
  width: 3rem;
  height: 3rem;
  background: var(--afar-navy);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.afar__title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--afar-navy);
  margin: 0 0 .2rem;
}

.afar__subtitle {
  font-size: .875rem;
  color: var(--afar-muted);
  margin: 0;
}

/* ── Split Layout ──────────────────────────────────────────────────────── */

.afar__split {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── Input Groups ──────────────────────────────────────────────────────── */

.afar__inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.afar__group {
  background: #fff;
  border: 1px solid var(--afar-border);
  border-radius: var(--afar-radius);
  box-shadow: var(--afar-shadow);
  overflow: hidden;
}

.afar__group-hd {
  background: var(--afar-navy);
  color: #fff;
  padding: .6rem 1rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.afar__group-body {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* ── Fields ────────────────────────────────────────────────────────────── */

.afar__field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.afar__field--full {
  grid-column: 1 / -1;
}

.afar__field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--afar-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.afar__val-badge {
  background: var(--afar-navy);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 20px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.afar__val-badge--accent {
  background: var(--afar-accent);
}

.afar__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.afar__unit {
  position: absolute;
  right: .75rem;
  font-size: .8125rem;
  color: var(--afar-muted);
  pointer-events: none;
}

.afar__input {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid var(--afar-border);
  border-radius: 6px;
  font-size: .9375rem;
  color: var(--afar-text);
  background: var(--afar-light);
  transition: border-color .15s;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

.afar__input:focus {
  outline: none;
  border-color: var(--afar-teal);
  background: #fff;
}

.afar__input-wrap .afar__input {
  padding-right: 3rem;
}

input[type=number].afar__input::-webkit-outer-spin-button,
input[type=number].afar__input::-webkit-inner-spin-button { -webkit-appearance: none; }

select.afar__input { cursor: pointer; padding-right: 2rem; }

/* ── Sliders ───────────────────────────────────────────────────────────── */

.afar__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--afar-border);
  cursor: pointer;
  outline: none;
}

.afar__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--afar-navy);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
}

.afar__slider--accent::-webkit-slider-thumb {
  background: var(--afar-accent);
}

.afar__slider-legend {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--afar-muted);
  margin-top: .15rem;
}

/* ── Highlight Box (Gutachten) ─────────────────────────────────────────── */

.afar__highlight-box {
  grid-column: 1 / -1;
  background: #f0f7f7;
  border: 1.5px solid var(--afar-teal);
  border-radius: 8px;
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.afar__highlight-hd {
  font-size: .8rem;
  font-weight: 700;
  color: var(--afar-green);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── Results Panel ─────────────────────────────────────────────────────── */

.afar__results {
  position: sticky;
  top: 80px;
}

.afar__results-inner {
  background: #fff;
  border: 1px solid var(--afar-border);
  border-radius: var(--afar-radius);
  box-shadow: var(--afar-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.afar__results-hd {
  background: var(--afar-navy);
  color: #fff;
  padding: .65rem 1.25rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ── KPI Grid ──────────────────────────────────────────────────────────── */

.afar__kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--afar-border);
}

.afar__kpi {
  padding: .875rem 1rem;
  border-right: 1px solid var(--afar-border);
  border-bottom: 1px solid var(--afar-border);
}

.afar__kpi:nth-child(even) { border-right: none; }
.afar__kpi:last-child { border-bottom: none; }
.afar__kpi--full { grid-column: 1 / -1; border-right: none; }

.afar__kpi--green { background: #f0faf5; }

.afar__kpi-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--afar-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.3;
  margin-bottom: .35rem;
}

.afar__kpi-label small {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

.afar__kpi-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--afar-navy);
  line-height: 1.1;
}

.afar__kpi-value--sm { font-size: 1.1rem; }

.afar__kpi--green .afar__kpi-value  { color: var(--afar-green); }
.afar__kpi--green .afar__kpi-label { color: var(--afar-green); opacity: .8; }
.afar__kpi--green .afar__kpi-sub   { color: var(--afar-green); font-size: .8rem; margin-top: .3rem; }

.afar__kpi-sub {
  font-size: .7rem;
  color: var(--afar-muted);
  margin-top: .1rem;
}

/* ── Amortisation ──────────────────────────────────────────────────────── */

.afar__amort-row {
  padding: .65rem 1.25rem;
  font-size: .8125rem;
  color: var(--afar-muted);
  border-bottom: 1px solid var(--afar-border);
  min-height: 2.5rem;
}

.afar__amort-row strong { color: var(--afar-green); }

/* ── Comparison Table ──────────────────────────────────────────────────── */

.afar__cmp-table {
  font-size: .8125rem;
}

.afar__cmp-hd {
  display: grid;
  grid-template-columns: 1fr 150px 165px;
  background: var(--afar-light);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--afar-muted);
  border-bottom: 1px solid var(--afar-border);
}

.afar__cmp-hd span {
  padding: .45rem .75rem;
  display: flex;
  align-items: center;
}

.afar__cmp-hd span:first-child  { padding-left: 1rem; }
.afar__cmp-hd span:last-child   { padding-right: 1rem; justify-content: flex-end; }
.afar__cmp-col--gut              { color: var(--afar-green); background: #f0faf5; }

.afar__cmp-row {
  display: grid;
  grid-template-columns: 1fr 150px 165px;
  border-bottom: 1px solid var(--afar-border);
  align-items: stretch;
}

.afar__cmp-row:last-child { border-bottom: none; }

.afar__cmp-row span {
  padding: .5rem .75rem;
  display: flex;
  align-items: center;
}

.afar__cmp-row span:first-child  { padding-left: 1rem; color: var(--afar-muted); }
.afar__cmp-row span:nth-child(2) { font-weight: 600; justify-content: flex-end; }
.afar__cmp-row span:nth-child(3) { font-weight: 700; color: var(--afar-green); justify-content: flex-end; background: #f0faf5; padding-right: 1rem; }

.afar__cmp-table.is-worse .afar__cmp-row  span:nth-child(3),
.afar__cmp-table.is-worse .afar__cmp-hd   span:nth-child(3) { color: #dc3545; background: rgba(220,53,69,.07); }

.afar__cmp-row--hl                          { background: var(--afar-light); }
.afar__cmp-row--hl span:first-child         { color: var(--afar-text); font-weight: 600; }
.afar__cmp-row--hl span:nth-child(3)        { background: #ddf3e8; }

/* ── Diff 10 Row ───────────────────────────────────────────────────────── */

.afar__diff10-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1.25rem;
  background: var(--afar-navy);
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.afar__diff10-row strong {
  color: #6ee7b7;
  font-size: 1rem;
}

/* ── Charts in results panel ───────────────────────────────────────────── */

.afar__chart-box {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--afar-border);
}

.afar__chart-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--afar-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}

.afar__chart-wrap--pie {
  height: 290px;
  position: relative;
}

/* ── Full-width Chart ──────────────────────────────────────────────────── */

.afar__chart-full {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--afar-border);
  border-radius: var(--afar-radius);
  box-shadow: var(--afar-shadow);
  padding: 1.25rem;
}

.afar__chart-wrap--bar {
  height: 260px;
  position: relative;
}

/* ── Table Section ─────────────────────────────────────────────────────── */

.afar__table-section {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--afar-border);
  border-radius: var(--afar-radius);
  box-shadow: var(--afar-shadow);
  overflow: hidden;
}

.afar__table-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--afar-border);
  background: var(--afar-light);
}

.afar__table-title {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--afar-navy);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.afar__btn-expand {
  background: none;
  border: 1.5px solid var(--afar-border);
  border-radius: 6px;
  padding: .35rem .75rem;
  font-size: .8rem;
  color: var(--afar-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: color .15s, border-color .15s;
}

.afar__btn-expand:hover {
  color: var(--afar-navy);
  border-color: var(--afar-navy);
}

.afar__btn-expand.is-open i {
  transform: rotate(180deg);
}

.afar__btn-expand i { transition: transform .2s; }

.afar__table-wrap {
  overflow-x: auto;
}

.afar__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8125rem;
}

.afar__table thead tr {
  background: var(--afar-navy);
  color: #fff;
}

.afar__table th {
  padding: .55rem .875rem;
  text-align: right !important;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
}

.afar__table th:first-child { text-align: left !important; }

.afar__table td {
  padding: .5rem .875rem;
  text-align: right !important;
  border-bottom: 1px solid var(--afar-border);
  white-space: nowrap;
}

.afar__table td:first-child { text-align: left; font-weight: 600; color: var(--afar-muted); }

.afar__table tbody tr:nth-child(even) { background: var(--afar-light); }
.afar__table tbody tr:hover { background: #eef4ff; }

.afar__table .mehr-ersparnis { color: var(--afar-green); font-weight: 700; }
.afar__table .hidden-row { display: none; }

/* ── Disclaimer ────────────────────────────────────────────────────────── */

.afar__table-footer {
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--afar-border);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.afar__approx-note {
	font-size: .7rem;
	color: var(--afar-muted);
	line-height: 1.55;
	margin: 0;
	text-align: right;
}

.afar__disclaimer {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-size: .73rem;
  color: var(--afar-muted);
  line-height: 1.6;
  margin: .4rem 0 0;
  padding: .6rem .9rem;
  background: rgba(26,60,94,.05);
  border-left: 3px solid #1a3c5e;
  border-radius: 0 4px 4px 0;
}

.afar__disclaimer i {
  display: block;
  flex-shrink: 0;
  margin-top: .1rem;
  color: #1a3c5e;
  font-size: .85rem;
  opacity: .7;
}

.afar__disclaimer-link {
  color: var(--afar-teal);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.afar__disclaimer-link:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .afar__split {
    grid-template-columns: 1fr;
  }

  .afar__results {
    position: static;
  }
}

@media (max-width: 560px) {
  .afar__group-body {
    grid-template-columns: 1fr;
  }

  .afar__cmp-hd,
  .afar__cmp-row {
    grid-template-columns: 1fr 105px 115px;
    font-size: .75rem;
  }

  .afar__kpi-value { font-size: 1.1rem; }

  /* "Jetzt Steuern optimieren" / Gutachten-anfragen-Button zuverlässig
     unterhalb der Steuerersparnis-Werte anzeigen, statt im 3-Spalten-Flex
     unvorhersehbar neben/zwischen den Werten umzubrechen. */
  .afar__kpi-2col {
    flex-direction: column;
    align-items: stretch;
    gap: .85rem;
  }
  .afar__kpi-2col-cta {
    align-items: stretch;
  }
  .afar__kpi-cta {
    width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
  }

  /* Inhalte der KPI-2col-Boxen (EUR/Jahr, über 10 Jahre) linksbündig */
  .afar__kpi-2col-item {
    text-align: left;
  }

  /* "Als PDF speichern"-Button in der mobilen Ansicht ausblenden */
  .afar__btn-pdf {
    display: none;
  }
}

input[type=month].afar__input { font-family: inherit; font-size: .9375rem; padding-top: .55rem; padding-bottom: .55rem; line-height: 1.2; }

.afar__tax-hint { margin-top: .4rem; font-size: .78rem; color: var(--afar-teal); line-height: 1.4; }

.afar__cmp-row--cta { grid-template-columns: 1fr 150px 165px auto; }
.afar__cmp-row--cta span:last-child { padding: 0 .75rem; display: flex; align-items: center; }
.afar__cta-btn { background: var(--afar-teal); color: #fff; padding: .3rem .7rem; border-radius: 5px; font-size: .72rem; font-weight: 700; text-decoration: none; white-space: nowrap; letter-spacing: .02em; transition: background .15s; }
.afar__cta-btn:hover { background: var(--afar-navy); color: #fff; }
.afar__kpi-cta { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; background: rgba(255,255,255,.18); color: #fff; border: 1.5px solid rgba(255,255,255,.4); padding: .35rem .75rem; border-radius: 5px; font-size: .75rem; font-weight: 700; text-decoration: none; transition: background .15s; }
.afar__kpi-cta:hover { background: rgba(255,255,255,.3); color: #fff; }

.afar__kpi-sub-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .4rem; flex-wrap: wrap; }
.afar__kpi-sub-row .afar__kpi-sub { margin-top: 0; }
.afar__kpi-cta { margin-top: 0; flex-shrink: 0; }
.afar__disclaimer-inline { font-size: .75rem; color: var(--afar-muted); margin: .35rem 0 0; line-height: 1.5; }
.afar__disclaimer-inline { font-size: .75rem; color: var(--afar-muted); margin: .35rem 0 0; line-height: 1.5; }

.afar__header { flex-direction: column; align-items: flex-start; gap: .6rem; }
.afar__header-text { width: 100%; }

/* ── KPI 3-Spalten ─────────────────────────────────────────────────────── */
.afar__kpi-2col { display: flex; gap: 2rem; margin-top: .5rem; flex-wrap: wrap; align-items: center; }
.afar__kpi-2col-item { flex: 1; min-width: 110px; }
.afar__kpi-col-hd { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--afar-green); opacity: .75; margin-bottom: .25rem; }
.afar__kpi-2col-cta { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .15rem; }
.afar__kpi-cta { display: inline-block; background: var(--afar-green); color: #fff !important; border: 1.5px solid var(--afar-green); padding: .5rem 1.1rem; border-radius: 6px; font-size: .8125rem; font-weight: 500; text-decoration: none !important; transition: background .15s, color .15s; white-space: nowrap; }
.afar__kpi-cta:hover { background: #15693f; color: #fff !important; }

/* ── Grundstücksanteil Kategorien ──────────────────────────────────────── */
.afar__gcat-row { display: flex; gap: .3rem; margin-top: .5rem; flex-wrap: wrap; }
.afar__gcat {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  flex: 1; min-width: 52px;
  background: #f5f7fa; border: 1px solid var(--afar-border); border-radius: 6px;
  padding: .35rem .4rem; font-size: .7rem; color: var(--afar-muted);
  cursor: pointer; transition: border-color .15s, background .15s; text-align: center;
}
.afar__gcat:hover { border-color: var(--afar-teal); background: #f0f7f7; }
.afar__gcat.is-active { border-color: var(--afar-teal); background: #e8f5f5; color: var(--afar-text); }
.afar__gcat i { font-size: .9rem; color: var(--afar-teal); }
.afar__gcat.is-active i { color: var(--afar-teal); }
.afar__gcat-name { font-weight: 600; font-size: .7rem; }
.afar__gcat small { font-size: .63rem; opacity: .75; }

/* ── Steuersatz: Spitze-Markierung in Label-Zeile ─────────────────────── */
.afar__sl-spitze {
  color: #c0392b;
  font-size: .68rem;
  font-weight: 700;
  margin-left: .5rem;
  white-space: nowrap;
}

/* ── KPI-Box: nachteiliges Gutachten ───────────────────────────────── */
.afar__kpi--worse { background: #fff5f5 !important; }
.afar__kpi--worse .afar__kpi-value  { color: #dc3545 !important; }
.afar__kpi--worse .afar__kpi-label  { color: #dc3545 !important; opacity: .8; }
.afar__kpi--worse .afar__kpi-sub    { color: #dc3545 !important; }
.afar__kpi--worse .afar__kpi-col-hd { color: #dc3545 !important; opacity: .75; }

/* ── Tabelle: Expand-Indikator & Summenzeile ───────────────────────── */
.afar__dots-row td {
  text-align: center;
  padding: .3rem .75rem;
  color: var(--afar-muted);
  font-size: 1rem;
  letter-spacing: .1em;
  cursor: pointer;
  border-top: 1px dashed var(--afar-border);
  border-bottom: 1px dashed var(--afar-border);
  background: #f8fcfc;
  transition: background .12s;
}
.afar__dots-row:hover td { background: #edf7f5; }
.afar__sum-row td {
  font-weight: 700;
  border-top: 2px solid var(--afar-border);
  padding: .55rem .75rem;
  background: var(--afar-light);
}
.afar__sum-row td:first-child { padding-left: 1rem; }

.afar__diff10-row { color: rgba(255,255,255,.75) !important; }
.afar__diff10-row strong { color: #6ee7b7 !important; }



/* ── PDF-Export-Button ──────────────────────────────────────────── */
.afar__btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  flex-shrink: 0;
  padding: .4rem .95rem;
  background: transparent;
  color: var(--afar-navy);
  border: 1.5px solid var(--afar-navy);
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.afar__btn-pdf:hover {
  background: var(--afar-navy);
  color: #fff;
}
.afar__btn-pdf:disabled {
  opacity: .6;
  cursor: wait;
}
.afar__btn-pdf i { font-size: .9rem; }

/* ── CTA-Strip unter Abschreibungstabelle ───────────────────────────── */
.afar__cta-strip {
  margin-top: .75rem;
  padding: 1rem 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1a3c5e 0%, #1e4d7a 100%);
  border-radius: 8px;
  color: #fff;
}
.afar__cta-strip__body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.afar__cta-strip__text {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: 1rem;
  line-height: 1.6;
}
.afar__cta-strip__text strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.afar__cta-strip__text span { opacity: .85; }
.afar__cta-strip__contact {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.afar__cta-strip__contact > a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .95rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.afar__cta-strip__contact > a:hover { color: #fff; }
.afar__cta-strip__btn {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.3rem;
  line-height: 1;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.45);
  border-radius: 6px;
  color: #fff !important;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s, border-color .15s;
}
.afar__cta-strip__btn:hover {
  background: rgba(255,255,255,.26);
  border-color: rgba(255,255,255,.9);
}

.afar__header-text .bi-callout p:not(.bi-callout__title) { font-size: .82rem; }
.afar__header-text .bi-callout__title { font-size: .88rem; }


/* ── Hint-Texte ─────────────────────────────────────────────────────── */
.afar__hint {
  display: block;
  font-size: .72rem;
  color: var(--afar-muted);
  line-height: 1.4;
  margin: .15rem 0 .4rem;
}

/* ── FAQ / Q&A ──────────────────────────────────────────────────────── */
.afar__faq {
  margin-top: 3rem;
  border-top: 2px solid var(--afar-border);
  padding-top: 2rem;
}
.afar__faq-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--afar-navy);
  margin: 0 0 1.25rem;
}
.afar__faq-item {
  border: 1px solid var(--afar-border);
  border-radius: 8px;
  margin-bottom: .6rem;
  overflow: hidden;
  background: #fff;
}
.afar__faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--afar-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}
.afar__faq-item summary::-webkit-details-marker { display: none; }
.afar__faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--afar-teal);
  flex-shrink: 0;
  transition: transform .2s;
}
.afar__faq-item[open] summary::after {
  content: "−";
}
.afar__faq-item[open] summary {
  border-bottom: 1px solid var(--afar-border);
  background: #f8fcfc;
}
.afar__faq-body {
  padding: 1rem 1.25rem;
  font-size: .875rem;
  line-height: 1.7;
  color: #374151;
}
.afar__faq-body p { margin: 0 0 .75rem; }
.afar__faq-body p:last-child { margin-bottom: 0; }
.afar__faq-body ul {
  margin: .5rem 0 .75rem 1.25rem;
  padding: 0;
}
.afar__faq-body li { margin-bottom: .3rem; }

/* ── FAQ CTA-Button ─────────────────────────────────────────────────── */
.afar__faq-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .65rem 1.4rem;
  background: var(--afar-navy);
  color: #fff !important;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s;
}
.afar__faq-cta:hover { background: #112a4a; }
.afar__faq-cta .fa-arrow-right { font-size: .75rem; opacity: .75; }


/* ── Modal ─────────────────────────────────────────────────────────────── */
.afa-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.afa-modal.is-open {
  opacity: 1;
  pointer-events: all;
}
.afa-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  cursor: pointer;
}
.afa-modal__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 48px rgba(0,0,0,.28);
  width: min(1160px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.afa-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.2rem;
  background: var(--afar-navy);
  color: #fff;
  flex-shrink: 0;
}
.afa-modal__bar-title {
  font-size: .9rem;
  font-weight: 600;
}
.afa-modal__close {
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  padding: .25rem;
  line-height: 0;
  border-radius: 4px;
  transition: color .15s;
  flex-shrink: 0;
}
.afa-modal__close:hover { color: #fff; }
.afa-modal__body {
  overflow-y: auto;
  flex: 1;
  padding: 1rem 1.25rem;
}

/* Rechner inside modal: neutralize full-page background */
.afa-modal__body #afa-rechner {
  border-radius: 0;
  box-shadow: none;
}

/* ── Modal-Trigger-Button ────────────────────────────────────────────── */
.afar__modal-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, border-color .15s, color .15s;
  text-decoration: none;
  line-height: 1.3;
}
.afar__modal-btn--primary {
  background: var(--afar-navy);
  color: #fff;
}
.afar__modal-btn--primary:hover {
  background: #112a4a;
  box-shadow: 0 4px 14px rgba(26,60,94,.3);
}
.afar__modal-btn--teal {
  background: var(--afar-green);
  color: #fff;
}
.afar__modal-btn--teal:hover {
  background: #068d7c;
  box-shadow: 0 4px 14px rgba(0,168,150,.3);
}
.afar__modal-btn--outline {
  background: transparent;
  color: var(--afar-navy);
  border-color: var(--afar-navy);
}
.afar__modal-btn--outline:hover {
  background: var(--afar-navy);
  color: #fff;
}

/* ── KPI CTA overflow fix ────────────────────────────────────────────── */
.afar__kpi-2col-item { min-width: 0; }
.afar__kpi-cta { max-width: 100%; box-sizing: border-box; }

/* ── Modal-Button Ausrichtung ───────────────────────────────────────── */
.afar__modal-wrap { display: flex; }
.afar__modal-wrap--left   { justify-content: flex-start; }
.afar__modal-wrap--center { justify-content: center; }
.afar__modal-wrap--right  { justify-content: flex-end; }
.afar__modal-wrap--full .afar__modal-btn { width: 100%; justify-content: center; }

/* ── Slider ─────────────────────────────────────────────── */
.afa__slider-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.afa__range {
  flex: 1;
  min-width: 0;
  height: 5px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  background: linear-gradient(to right, #002147 50%, #dde3ec 50%);
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}

.afa__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #002147;
  cursor: pointer;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0,33,71,.3);
  transition: transform .12s;
}

.afa__range::-webkit-slider-thumb:hover { transform: scale(1.18); }

.afa__range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #002147;
  cursor: pointer;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0,33,71,.3);
}

.afa__range::-moz-range-track {
  height: 5px;
  border-radius: 999px;
}

.afa__iw--sm { flex-shrink: 0; }
.afa__iw--sm input { width: 4.5rem !important; padding-right: 2rem !important; text-align: right; }

/* ── Callout ─────────────────────────────────────────────── */
.afa__summary {
  background: rgba(0,161,163,.07) !important;
  border-left: 3px solid #00a1a3 !important;
  border-radius: 0 6px 6px 0 !important;
  padding: 1rem 1.375rem !important;
}

.afa__summary p {
  font-size: .9375rem !important;
  line-height: 1.8 !important;
  color: #1d2c3e !important;
  font-style: italic;
}

.afa__summary strong {
  color: #002147 !important;
  font-weight: 600 !important;
  font-style: normal;
}
