/* ================================================
   einheiten.css - Einheiten umwandeln (/wiederholungen/einheiten-umwandeln/), seit 01.12.2026
   Baut auf bruch.css auf (br-thema, br-beispiel, br-ueb, br-wahl). Runter/mal orange, rauf/geteilt gruenblau.
   ================================================ */
.eh-paar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; align-items: center; }
.eh-treppe { margin: 0 auto; max-width: 460px; }
.eh-treppe svg { display: block; width: 100%; height: auto; }
.eh-treppe figcaption { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; justify-content: center; margin-top: .6rem; }
.eh-stufe { fill: #dce9f8; stroke: #5f9fdc; stroke-width: 1; }
.eh-stufe-1 { fill: #c9def5; }
.eh-einheit { font-size: 17px; font-weight: 700; fill: #1e3c72; text-anchor: middle; }
.eh-zusatz { font-size: 13px; fill: #1e3c72; text-anchor: middle; }
text.eh-mal, text.eh-durch { font-size: 14px; font-weight: 600; }
.eh-mal { fill: var(--bruch-2); color: var(--bruch-2); font-weight: 600; }
.eh-durch { fill: var(--bruch-3); color: var(--bruch-3); font-weight: 600; }

.eh-vorstellung { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; margin: 0; padding: 0; }
.eh-vorstellung li { padding: .8rem 1rem; border-radius: 10px; background: var(--blue-light-bg); margin: 0; line-height: 1.4; }
.eh-vorstellung strong { display: block; font-size: 1.25rem; color: var(--blue-dark-1); }

.eh-tafel { padding: 1.2rem; border-radius: 10px; background: var(--blue-light-bg); }
.eh-tafel-eingabe { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-bottom: .9rem; }
.eh-tafel input { width: 7rem; height: 44px; text-align: center; font-size: 1.2rem; border: 2px solid var(--bruch-1); border-radius: 6px; background: #fff; color: #22303f; margin-left: .4rem; }
.eh-tafel input:focus { outline: 3px solid var(--blue-dark-1); outline-offset: 1px; }
.eh-tafel input[aria-invalid="true"] { background: #fdecea; border-color: #8c1d18; }
.eh-tafel .br-wahl { gap: .35rem; justify-content: flex-start; }
.eh-tafel .br-wahl button { padding: .3rem .7rem; min-width: 44px; }
.eh-ziel button[aria-pressed="true"] { background: var(--bruch-2) !important; border-color: var(--bruch-2) !important; }
.eh-tafel-rahmen { overflow-x: auto; }
.eh-tafel table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
.eh-tafel th { padding: .3rem 0; text-align: center; border: 2px solid #5f6b76; color: #22303f; }
.eh-tafel th.von { background: var(--bruch-1); color: #fff; }
.eh-tafel th.nach { background: var(--bruch-2); color: #fff; }
.eh-tafel td { position: relative; height: 46px; text-align: center; font-size: 1.35rem; font-weight: 600; border: 1px solid #c9d3de; border-bottom: 2px solid #5f6b76; }
.eh-tafel td.rand { border-right: 2px solid #5f6b76; }
.eh-tafel td.rest { border: 0; height: auto; }
.eh-tafel td.null { color: #6b7784; font-weight: 400; }
.eh-tafel td.einer { background: #fdf0e2; }
.eh-tafel td.komma::after { content: ","; position: absolute; right: -.16em; bottom: .12em; line-height: 1; font-size: 2.4rem; font-weight: 800; color: var(--bruch-2); z-index: 1; }
.eh-tafel-ergebnis { margin: 1rem 0 0; font-size: 1.4rem; font-weight: 700; color: var(--blue-dark-1); text-align: center; overflow-wrap: anywhere; }
.eh-tafel-weg { margin: .2rem 0 0; text-align: center; color: #4a5568; min-height: 1.6em; }
.eh-zeit { display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: center; }

.eh-zaehlen { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1.2rem; border-radius: 10px; background: var(--blue-light-bg); }
.eh-zaehlen svg { width: 100%; max-width: 260px; height: auto; }
.eh-zaehlen [data-text] { margin: 0; text-align: center; font-size: 1.1rem; font-weight: 600; min-height: 3.2em; }
.eh-lineal { display: block; width: 100%; max-width: 620px; margin: 0 auto 1rem; }
.eh-loesung { border: 0; background: none; padding: .4rem 0 0; color: var(--blue-medium-2); text-decoration: underline; text-align: left; min-height: 36px; }
.eh-ueb .br-ueb-zeile { font-size: 1.1rem; }
.br-ueb input[name="zahl"] { width: 7rem; }
.eh-ueb .br-ueb-text { flex: 1 1 60%; }
.eh-steuerung { display: grid; gap: .8rem; margin-bottom: 1rem; }
.eh-steuerung .br-wahl { justify-content: flex-start; }
.eh-uebersicht { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.eh-uebersicht .content-section { margin: 0; }
.eh-gleich { columns: 2; margin: 1rem 0 0; padding: 0; list-style: none; }
.eh-gleich li { margin: 0 0 .2rem; }

@media (max-width: 767.98px) {
    .eh-paar, .eh-uebersicht { grid-template-columns: minmax(0, 1fr); }
    .eh-tafel { padding: .8rem .5rem; }
    .eh-tafel th { font-size: .85rem; }
    .eh-tafel td { font-size: 1.05rem; }
    .eh-tafel .br-wahl button { padding: .2rem .4rem; min-width: 42px; }
    .eh-ueb input[name="zahl"] { width: 4.6rem; }
    .eh-ueb .br-ueb-zeile { font-size: 1rem; }
    .eh-ueb .br-ueb-nr { width: 1.6rem; height: 1.6rem; }
    .eh-zeit input { width: 4rem; margin: 0; }
    .eh-vorstellung { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
    .eh-vorstellung li { display: flex; gap: .8rem; align-items: baseline; padding: .5rem .8rem; }
    .eh-vorstellung strong { min-width: 4.2rem; }
}
@media print {
    .hero, .navbar, footer, .btn { display: none !important; }
    .eh-uebersicht { gap: .5rem; }
    .eh-uebersicht .content-section { break-inside: avoid; box-shadow: none; padding: .5rem; }
}
