/* BIKenergy Sparrechner. Übernimmt die CSS-Variablen der bestehenden Website
   (--ink, --accent, --accent-ink, --bg-soft, --line, --text, --text-soft, --font-head, --font-body, --radius,
   --radius-sm, --shadow-sm). Fehlen sie, greifen die Fallbacks unten (Navy/Gold, Poppins/Inter). */
.sr, .sr__lang {
  --sr-ink: var(--ink, #0a1f2b);
  --sr-accent: var(--accent, #d9a31b);
  --sr-accent-ink: var(--accent-ink, #6d4f0c);
  --sr-soft-bg: var(--bg-soft, #f5f8f8);
  --sr-line: var(--line, #e2e9ea);
  --sr-text: var(--text, #16323b);
  --sr-text-soft: var(--text-soft, #4d6670);
  --sr-head: var(--font-head, "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif);
  --sr-body: var(--font-body, "Inter", "Segoe UI", system-ui, -apple-system, sans-serif);
  --sr-radius: var(--radius, 18px);
  --sr-radius-sm: var(--radius-sm, 12px);
  --sr-error: #a32a1c;
}
.sr { display: grid; gap: 28px; align-items: start; font-family: var(--sr-body); color: var(--sr-text); font-size: 1rem; line-height: 1.55; }
@media (min-width: 960px) { .sr { grid-template-columns: 1.15fr .85fr; gap: 36px; } }
.sr *, .sr *::before, .sr *::after { box-sizing: border-box; }

.sr__form, .sr__result {
  background: #fff; border: 1px solid var(--sr-line); border-radius: var(--sr-radius);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-sm, 0 4px 18px rgba(10,31,43,.06));
}
.sr__result { background: var(--sr-ink); color: #dbe7ec; border-color: transparent; }
@media (min-width: 960px) { .sr__result { position: sticky; top: 24px; } }

.sr__mode { border: 0; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.sr__mode legend { font-family: var(--sr-head); font-weight: 600; margin-bottom: 8px; padding: 0; color: var(--sr-ink); }
.sr__radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--sr-line); border-radius: var(--sr-radius-sm); cursor: pointer; transition: border-color .15s, background-color .15s; }
.sr__radio:has(input:checked) { border-color: var(--sr-ink); background: var(--sr-soft-bg); }
.sr__radio input { accent-color: var(--sr-ink); width: 18px; height: 18px; margin: 0; }
@media (min-width: 560px) { .sr__mode { grid-template-columns: 1fr 1fr; } .sr__mode legend { grid-column: 1 / -1; } }

.sr__grid { display: grid; gap: 18px; }
@media (min-width: 560px) { .sr__grid { grid-template-columns: 1fr 1fr; } }
.sr__field label { display: block; font-family: var(--sr-head); font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--sr-ink); }
.sr__field input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--sr-text);
  background: #fff; border: 1.5px solid #b9c7cc; border-radius: var(--sr-radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.sr__field input[type="text"]:hover { border-color: var(--sr-text-soft); }
.sr__field input[type="text"]:focus-visible, .sr__radio:has(input:focus-visible), .sr__adv summary:focus-visible, .sr__lang button:focus-visible {
  outline: 3px solid var(--sr-accent); outline-offset: 2px;
}
.sr__field input[aria-invalid="true"] { border-color: var(--sr-error); }
.sr__hint { margin: 6px 0 0; font-size: .84rem; color: var(--sr-text-soft); }
.sr__hint:empty, .sr__err:empty { display: none; }
.sr__err { margin: 6px 0 0; font-size: .86rem; color: var(--sr-error); font-weight: 600; }
.sr__note { margin: 16px 0 0; font-size: .88rem; color: var(--sr-text-soft); }

.sr__adv { margin-top: 22px; border-top: 1px solid var(--sr-line); padding-top: 6px; }
.sr__adv summary {
  list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 10px;
  font-family: var(--sr-head); font-weight: 600; color: var(--sr-ink); border-radius: 8px;
}
.sr__adv summary::-webkit-details-marker { display: none; }
.sr__adv summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: auto; transition: transform .2s ease; }
.sr__adv[open] summary::after { transform: rotate(-135deg); }
.sr__adv .sr__grid { margin-top: 16px; }

.sr__rtitle { font-family: var(--sr-head); font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; color: #fff; letter-spacing: 0; }
.sr__total { margin: 0 0 18px; display: grid; gap: 4px; }
.sr__totalv { font-family: var(--sr-head); font-weight: 700; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.05; color: var(--sr-accent); font-variant-numeric: tabular-nums; }
.sr__totall { font-size: .92rem; color: #b8ccd3; }
.sr__list { margin: 0; display: grid; gap: 0; }
.sr__list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.14); }
.sr__list dt { color: #b8ccd3; font-size: .94rem; }
.sr__list dd { margin: 0; font-weight: 600; color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.sr__list > div[hidden] { display: none; }
.sr__warn { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: .88rem; color: #e7eef1; }
.sr__empty { margin: 0; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; }
.sr__disc { margin: 20px 0 0; font-size: .9rem; color: #fff; }
.sr__src { margin: 14px 0 0; font-size: .76rem; line-height: 1.5; color: #9db4bd; }
.sr__src strong, .sr__disc strong { color: #fff; }
[hidden] { display: none !important; }

.sr__lang { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--sr-line); border-radius: 999px; background: #fff; }
.sr__lang button { min-width: 48px; min-height: 36px; border: 0; border-radius: 999px; background: transparent; font: 600 .85rem var(--sr-head); color: var(--sr-text-soft); cursor: pointer; }
.sr__lang button.is-active { background: var(--sr-ink); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .sr * { transition: none !important; }
}

/* Regler (26.10.2026): Regler plus Zahlenfeld, das Zahlenfeld bleibt die zugängliche Eingabe */
.sr__range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 10px 0 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.sr__range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--sr-line); }
.sr__range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--sr-line); }
.sr__range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--sr-accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .12s ease-out; }
.sr__range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--sr-accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.sr__range:active::-webkit-slider-thumb { transform: scale(1.12); }
.sr__scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--sr-text-soft); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .sr__range::-webkit-slider-thumb { transition: none; } }

/* Quellen eingeklappt */
.sr__srcbox { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 4px; }
.sr__srcbox summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .86rem; font-weight: 600; color: #dbe7ec; }
.sr__srcbox summary::-webkit-details-marker { display: none; }
.sr__srcbox summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: auto; }
.sr__srcbox[open] summary::after { transform: rotate(-135deg); }
.sr__srcbox summary:focus-visible { outline: 2px solid var(--sr-accent); outline-offset: 2px; }
.sr__srcbox .sr__src { margin-top: 4px; }
.sr__kwp{margin:14px 0 22px!important}


/* Rev6f: preserve the original Sparrechner geometry from the supplied design. */
.sr { --sr-radius: 18px; --sr-radius-sm: 12px; }
