/* Rechner-Bausteine (Präfix .rr-). Schrift über --font, Akzent über --brand, beides wird von der Seite geerbt. */
.rr {
  --rr-akzent: var(--brand, #0b5cad);
  --rr-linie: color-mix(in srgb, currentColor 22%, transparent);
  --rr-flaeche: color-mix(in srgb, var(--rr-akzent) 6%, transparent);
  --rr-warn: #8a4b00;
  --rr-warn-flaeche: color-mix(in srgb, #f0a000 14%, transparent);
  --rr-fehler: #b3261e;
  font-family: var(--font, "Hanken Grotesk", sans-serif);
  font-size: max(1rem, 16px);
  line-height: 1.55;
  color: inherit;
  max-width: 46rem;
  box-sizing: border-box;
}
.rr *, .rr *::before, .rr *::after { box-sizing: inherit; }
.rr-titel { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; }
.rr-intro, .rr-ohne-js { margin: 0 0 1.25rem; }
.rr-ohne-js { padding: 1rem; border: 1px solid var(--rr-linie); border-radius: .5rem; background: var(--rr-flaeche); }

.rr-form { display: grid; gap: 1.1rem; }
.rr-feld { display: grid; gap: .35rem; }
.rr-label { font-weight: 600; font-size: 1rem; }
.rr-eingabe {
  font: inherit; font-size: 1rem; color: inherit;
  width: 100%; min-height: 2.9rem; padding: .55rem .75rem;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: .5rem;
  background: transparent;
}
.rr-eingabe option { color: #111; background: #fff; }
.rr-eingabe-kurz { max-width: 9rem; }
.rr-eingabe:focus-visible, .rr-knopf:focus-visible, .rr-untertitel:focus-visible {
  outline: 3px solid var(--rr-akzent); outline-offset: 2px;
}
.rr-eingabe[aria-invalid="true"] { border-color: var(--rr-fehler); border-width: 2px; }
.rr-hilfe { margin: 0; font-size: 1rem; }
.rr-feldfehler { margin: 0; font-size: 1rem; color: var(--rr-fehler); font-weight: 600; }

.rr-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: .25rem; }
.rr-knopf {
  font: inherit; font-size: 1rem; font-weight: 700;
  min-height: 2.9rem; padding: .6rem 1.25rem; border-radius: .5rem; cursor: pointer;
  border: 2px solid var(--rr-akzent); background: var(--rr-akzent); color: #fff;
}
.rr-knopf:hover { filter: brightness(1.08); }
.rr-knopf-zweit { background: transparent; color: inherit; }
.rr-kopierstatus { margin: 0; font-size: 1rem; min-height: 1.5em; }
.rr-ok { color: inherit; font-weight: 600; }
.rr-fehlertext { color: var(--rr-fehler); font-weight: 600; }

.rr-ergebnis {
  margin-top: 1.75rem; padding: 1.25rem; border-radius: .75rem;
  border: 1px solid var(--rr-linie); border-left: 4px solid var(--rr-akzent); background: var(--rr-flaeche);
}
.rr-untertitel { font-size: 1.25rem; margin: 0 0 .5rem; }
.rr-untertitel-klein { font-size: 1.0625rem; margin: 1.25rem 0 .5rem; }
.rr-wert { margin: 0; font-size: 1.125rem; }
.rr-wert-zahl { font-size: 1.5rem; color: var(--rr-akzent); font-variant-numeric: tabular-nums; }
.rr-wert-zusatz { margin: .35rem 0 0; }
.rr-warnung {
  margin: 1rem 0 0; padding: .85rem 1rem; border-radius: .5rem;
  background: var(--rr-warn-flaeche); border: 1px solid color-mix(in srgb, #f0a000 55%, transparent);
}
.rr-rechenweg, .rr-hinweise { margin: 0; padding-left: 1.4rem; display: grid; gap: .5rem; }
.rr-schritt-text { display: block; }
.rr-norm {
  display: inline-block; margin-top: .15rem; font-size: 1rem; font-weight: 600;
  color: var(--rr-akzent);
}
.rr-fuss { margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--rr-linie); }
.rr-haftung, .rr-stand { margin: .25rem 0 0; font-size: 1rem; }
.rr-haftung { font-weight: 600; }

@media (max-width: 480px) {
  .rr-titel { font-size: 1.3rem; }
  .rr-ergebnis { padding: 1rem; }
  .rr-knopf { width: 100%; }
  .rr-eingabe-kurz { max-width: none; }
}
@media (prefers-color-scheme: dark) {
  .rr { --rr-warn: #ffcf7a; --rr-fehler: #ff8a80; }
}
@media (prefers-reduced-motion: no-preference) {
  .rr-knopf { transition: filter .15s ease; }
}

/* Ergänzungen Verzugszinsrechner */
.rr-eingabe-mittel { max-width: 14rem; }
.rr-gruppe { border: 1px solid var(--rr-linie); border-radius: .5rem; padding: .75rem 1rem 1rem; margin: 0; display: grid; gap: .5rem; }
.rr-gruppe legend { padding: 0 .35rem; }
.rr-wahl { display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; }
.rr-wahl input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--rr-akzent); }
.rr-wahl input:focus-visible { outline: 3px solid var(--rr-akzent); outline-offset: 2px; }
.rr-wahl input:disabled + * , .rr-wahl:has(input:disabled) { opacity: .6; }
.rr-zahlungen { display: grid; gap: .75rem; }
.rr-zahlung { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; padding: .6rem 0; border-top: 1px dashed var(--rr-linie); }
.rr-zahlung .rr-feld { flex: 1 1 11rem; }
.rr-knopf-klein { min-height: 2.9rem; padding: .45rem .9rem; }
.rr-knopf:disabled { opacity: .55; cursor: not-allowed; }
.rr-tabelle-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rr-tabelle { border-collapse: collapse; width: 100%; font-size: 1rem; font-variant-numeric: tabular-nums; }
.rr-tabelle th, .rr-tabelle td { padding: .4rem .55rem; border-bottom: 1px solid var(--rr-linie); text-align: left; vertical-align: top; }
.rr-tabelle thead th { font-weight: 700; }
.rr-tabelle tfoot th, .rr-tabelle tfoot td { font-weight: 700; border-bottom: 0; }
.rr-tabelle .rr-zahl { text-align: right; white-space: nowrap; }
.rr-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rr-basiszins { margin-top: 1.5rem; }
.rr-basiszins summary { cursor: pointer; font-weight: 700; font-size: 1.0625rem; padding: .35rem 0; }
.rr-basiszins summary:focus-visible { outline: 3px solid var(--rr-akzent); outline-offset: 2px; }
.rr-basiszins .rr-hilfe { margin: .5rem 0 .75rem; }
