/* Rechner unter /rechner/ (website/bau/rechner.ts, website/rechner.js). Ergänzt stil.css, gleiche Variablen und Linienlogik. */

/* Formular und Ergebnis nebeneinander, mobil untereinander */
.rechner-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.rechner-app + .rechner-app { margin-top: clamp(48px, 6vw, 88px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--linie-zart); }
.rechner-form { gap: 18px; }
.rechner-form .zwischen { margin-bottom: 4px; }
.rechner-form .feld { display: grid; gap: 8px; }
.rechner-form .feld[hidden], .rechner-form .wahl[hidden] { display: none; }
.rechner-form .feld > label { display: block; color: var(--text); font-size: 14px; letter-spacing: .02em; }
.feld-optional { color: var(--text-2); font-size: 13px; }
.mit-einheit { display: flex; align-items: stretch; }
.mit-einheit input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.mit-einheit .einheit { display: flex; align-items: center; padding: 0 16px; border: 1px solid var(--linie-feld); border-left: 0; color: var(--text-hell); font-size: 15px; min-width: 64px; justify-content: center; background: var(--bg); }
.feld-hilfe { margin: 0; font-size: 15px; color: var(--text-2); }
.feld-fehler { margin: 0; font-size: 14px; color: var(--akzent); }
.rechner-wahl { gap: 10px; }
.rechner-wahl .haken { align-items: center; }

/* Ergebnis */
.rechner-ergebnis { position: sticky; top: 96px; border: 1px solid var(--linie-zart); background: var(--bg); padding: clamp(22px, 3vw, 36px); min-height: 160px; }
.rechner-werte { margin: 0; display: grid; gap: 0; }
.rechner-werte div { padding: 14px 0; border-top: 1px solid var(--linie-zart); display: flex; flex-direction: column-reverse; gap: 4px; }
.rechner-werte div:first-child { border-top: 0; padding-top: 0; }
/* Keine Großschreibung: Formelzeichen wie n, f, vf behalten ihre Schreibweise (n ist nicht N, f ist nicht F). */
.rechner-werte dt { font-size: 14px; letter-spacing: .02em; color: var(--text-hell); }
.rechner-werte dd { margin: 0; color: var(--text); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rechner-werte div:first-child dd { font-size: clamp(36px, 4vw, 56px); font-weight: 700; }
.rechner-werte .einheit { color: var(--akzent); font-size: .6em; font-weight: 400; }
.rechner-meldung { margin: 0; color: var(--akzent); }
.rechner-hinweise { list-style: none; margin: 18px 0 0; padding: 0; }
.rechner-hinweise li { padding: 10px 0 10px 28px; border-top: 1px solid var(--linie-zart); position: relative; color: var(--text-hell); font-size: 15px; }
.rechner-hinweise li::before { content: "!"; position: absolute; left: 4px; top: 10px; color: var(--akzent); font-weight: 700; }
.rechner-tabelle-huelle { margin-top: 20px; max-height: 420px; overflow: auto; }
.rechner-koordinaten { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.rechner-koordinaten thead th { position: sticky; top: 0; background: var(--bg); }
.rechner-koordinaten th, .rechner-koordinaten td { text-align: right; }
.rechner-koordinaten th:first-child { text-align: left; }
.rechner-hinweis { margin: 40px 0 0; max-width: 80ch; }

/* Größen (Formelkasten und Rechenweg: stil.css, Abschnitt Formeln) */
.rechner-groessen, .rechner-tabelle { width: 100%; border-collapse: collapse; }
.rechner-groessen th { width: 4.5em; color: var(--text); font-weight: 400; white-space: nowrap; }
.rechner-groessen td:last-child { white-space: nowrap; text-align: right; color: var(--text-2); }

/* Projektbezug, Übersicht, weitere Rechner */
.rechner-bezuege li p { color: var(--text-hell); }
.rechner-bezuege .rechner-link { margin-top: 16px; }
.rechner-karten li { padding: 0; }
.rechner-karten a { display: block; height: 100%; padding: 32px; color: inherit; text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.rechner-karten a:hover, .rechner-karten a:focus-visible { border-color: var(--akzent); }
.rechner-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rechner-liste a { display: inline-block; border: 1px solid var(--linie); padding: 10px 16px; color: var(--text); text-decoration: none; font-size: 15px; }
.rechner-liste a:hover, .rechner-liste a:focus-visible { border-color: var(--akzent); }
.rechner-quellen-titel { margin-top: 48px; }
.rechner-quellen { padding-left: 18px; margin: 0; }
.rechner-quellen li { margin: 4px 0; }

@media (max-width: 900px) {
  .rechner-app { grid-template-columns: 1fr; }
  .rechner-ergebnis { position: static; }
}
@media (max-width: 520px) {
  .rechner-groessen th { width: 3.6em; }
}
