/* Fachrechner zum Fachbuch (Gefälle, U-Wert, Dachlasten, Gründach). Seiten /rechner/{name} und eingebettet in Buchkapitel. */
.fachrechner {
    margin: 1.5rem 0 2rem; padding: 1rem; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund);
    min-width: 0; max-width: 100%;
}
.fachrechner h2 { margin-top: 0; }
.fachrechner h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.fr-hinweis { padding: 0.6rem 0.8rem; background: #fff8e1; border-left: 4px solid var(--signal); font-size: 0.95rem; }
.fr-seitenlink { margin: 0.5rem 0; }
.fr-form { display: grid; gap: 1rem; margin: 1rem 0; min-width: 0; }
.fr-gruppe { border: 1px solid var(--rand); border-radius: 6px; padding: 0.75rem; margin: 0; min-width: 0; display: grid; gap: 0.9rem; }
.fr-gruppe > legend { font-weight: 700; padding: 0 0.35rem; }
.fr-feld { min-width: 0; }
.fr-feld label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.fr-feld input, .fr-feld select { max-width: 100%; min-height: 2.75rem; }
.fr-feld.hat-fehler input { border-color: #a4262c; border-width: 2px; }
.fr-fehler { color: #a4262c; font-weight: 600; margin: 0.25rem 0 0; }
.fr-hilfe { margin: 0.25rem 0 0; font-size: 0.9rem; color: #4a555c; }
.fr-auswahl { border: 0; margin: 0; padding: 0; min-width: 0; }
.fr-auswahl legend { font-weight: 600; margin-bottom: 0.25rem; padding: 0; }
.fr-radio { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; cursor: pointer; }
.fr-radio input { width: 1.25rem; height: 1.25rem; margin: 0; flex: none; }
.fr-knopf, .fr-klein-knopf {
    font: inherit; min-height: 2.75rem; padding: 0.6rem 1.25rem; justify-self: start; max-width: 100%;
    color: var(--akzent-text); background: var(--akzent); border: 0; border-radius: 6px; cursor: pointer;
}
.fr-klein-knopf { padding: 0.4rem 0.8rem; min-width: 2.75rem; }
.fr-klein-knopf.fr-zweit { color: var(--akzent); background: var(--grund); border: 1px solid var(--akzent); }
.fr-klein-knopf:disabled { opacity: 0.45; cursor: default; }
.fr-ergebnis { margin: 1rem 0; padding: 1rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; min-width: 0; }
.fr-status { color: #a4262c; font-weight: 600; margin: 0 0 0.5rem; }
.fr-werte { margin: 0; display: grid; gap: 0.35rem; }
.fr-wert { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; }
.fr-wert[hidden] { display: none; }
.fr-wert dt { font-size: 0.9rem; color: #4a555c; }
.fr-wert dd { margin: 0; font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; }
@media (min-width: 30rem) {
    .fr-wert { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); align-items: baseline; }
    .fr-wert dd { text-align: right; }
}
.fr-klein { font-size: 0.9rem; margin: 0.75rem 0 0; }
.fr-grafik { margin: 1rem 0 0; min-width: 0; }
.fr-grafik figcaption { font-size: 0.9rem; color: #4a555c; margin-top: 0.25rem; }
.fr-svg { display: block; width: 100%; height: auto; max-width: 40rem; background: #fff; border: 1px solid var(--rand); border-radius: 6px; }
.fr-tabelle-rahmen { overflow-x: auto; max-width: 100%; margin-top: 0.75rem; }
.fr-tabelle { border-collapse: collapse; font-size: 0.9rem; min-width: 100%; }
.fr-tabelle th, .fr-tabelle td { padding: 0.3rem 0.45rem; border-bottom: 1px solid var(--rand); text-align: right; white-space: nowrap; }
.fr-tabelle th:first-child, .fr-tabelle td:first-child { text-align: left; }
.fr-formel {
    font-family: Consolas, "Courier New", monospace; background: var(--flaeche); padding: 0.5rem 0.75rem; border-radius: 4px;
    overflow-wrap: anywhere;
}
.fr-brotkrumen { font-size: 0.95rem; margin-bottom: 0.5rem; }
.fr-erklaerung h3 { margin-top: 1.5rem; }

/* U-Wert: Schichtliste */
.fr-schichten { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; counter-reset: schicht; }
.fr-schicht {
    border: 1px solid var(--rand); border-radius: 6px; padding: 0.6rem; display: grid; gap: 0.5rem; min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.fr-schicht.gewaehlt { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent); }
.fr-schicht .fr-feld-name { grid-column: 1 / -1; }
.fr-schicht-knoepfe { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fr-schicht-nr { font-weight: 700; }
.fr-ohne-r { font-size: 0.9rem; color: #4a555c; align-self: end; padding-bottom: 0.6rem; }
.fr-hinzu { display: grid; gap: 0.5rem; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 30rem) {
    .fr-hinzu { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Grafik-Farben */
.fr-g-text { font: 14px system-ui, sans-serif; fill: #1d2327; pointer-events: none; }
.fr-g-klein { font-size: 12px; }
.fr-g-stark { font-weight: 700; }
.fr-g-hell { fill: #ffffff; }
.fr-g-decke { fill: #8a969e; }
.fr-g-daemmung { fill: #f6d77a; stroke: #b48a1c; stroke-width: 1; }
.fr-g-abdichtung { fill: none; stroke: #1d2327; stroke-width: 3; }
.fr-g-ablauf { fill: #1f5f8b; }
.fr-g-wasser { stroke: #1f5f8b; stroke-width: 2.5; }
.fr-g-wasserspitze { fill: #1f5f8b; }
.fr-g-mass { stroke: #4a555c; stroke-width: 1; }
.fr-g-hilfslinie { stroke: #4a555c; stroke-width: 1; stroke-dasharray: 4 3; }
.fr-g-achse { stroke: #c9d1d6; stroke-width: 1; }
.fr-g-temperatur { fill: none; stroke: #c0392b; stroke-width: 2.5; }
.fr-g-punkt { fill: #c0392b; }
.fr-g-schicht { stroke: #ffffff; stroke-width: 1; cursor: pointer; }
.fr-g-schicht.gewaehlt { stroke: #1d2327; stroke-width: 3; }
.fr-g-schicht:focus { outline: none; stroke: #e3b341; stroke-width: 4; }
.fr-g-ohne-r { fill: url(#fr-schraffur); }
.fr-g-f0 { fill: #8a969e; } .fr-g-f1 { fill: #c8a165; } .fr-g-f2 { fill: #f6d77a; } .fr-g-f3 { fill: #9cc5e8; }
.fr-g-f4 { fill: #b5d99c; } .fr-g-f5 { fill: #e8a59c; } .fr-g-f6 { fill: #c9b3e0; } .fr-g-f7 { fill: #f2c48d; }
.fr-g-zufluss { fill: #1f5f8b; }
.fr-g-abfluss { fill: #4e9a3e; }
.fr-g-ueberlauf { fill: #c0392b; }
.fr-g-speicher { fill: none; stroke: #e3b341; stroke-width: 3; }
.fr-g-voll { stroke: #b48a1c; stroke-width: 1.5; stroke-dasharray: 6 4; }
.fr-legende { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; padding: 0; margin: 0.5rem 0 0; font-size: 0.9rem; }
.fr-legende li { display: flex; align-items: center; gap: 0.35rem; }
.fr-farbe { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 2px; flex: none; }
