/* Dachportal.at: mobil zuerst, Systemschrift, kein seitliches Scrollen ab 320 px. */
:root {
    --text: #1d2327;
    --grund: #ffffff;
    --flaeche: #f1f4f6;
    --rand: #c9d1d6;
    --akzent: #1f5f8b;
    --akzent-text: #ffffff;
    /* Kopf, Fuß und Startseite: Schiefer wie eine Bitumenbahn, Gelb wie die Abdichtung im Schnitt */
    --schiefer: #1f2c36;
    --schiefer-hell: #2c3d4a;
    --schiefer-linie: #3d5161;
    --schiefer-text: #d3dee6;
    --signal: #e3b341;
    --rahmen: 72rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--grund);
    overflow-wrap: break-word;
}

img, table, pre { max-width: 100%; }

a { color: var(--akzent); }

.kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 0.7rem max(1rem, calc((100% - var(--rahmen)) / 2 + 1rem));
    color: #fff;
    background: var(--schiefer);
    border-bottom: 3px solid var(--signal);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: #fff;
    text-decoration: none;
}
.logo-zeichen { flex: none; }

.menue { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-left: auto; }
.menue a { padding: 0.5rem 0; color: var(--schiefer-text); text-decoration: none; border-bottom: 2px solid transparent; }
.menue a:hover { color: #fff; border-bottom-color: var(--signal); }

a:focus-visible, button:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* Menüknopf: nur mit JavaScript und nur auf schmalen Bildschirmen */
.menueknopf { display: none; }
@media (max-width: 40em) {
    .js .kopf { justify-content: space-between; }
    .js .menueknopf {
        display: inline-block;
        font: inherit;
        min-height: 2.75rem;
        padding: 0.5rem 1rem;
        color: #fff;
        background: transparent;
        border: 1px solid var(--schiefer-text);
        border-radius: 6px;
        cursor: pointer;
    }
    .js .menueknopf[aria-expanded="true"] { background: var(--schiefer-hell); }
    .js .menue { display: none; flex-basis: 100%; flex-direction: column; gap: 0; margin-left: 0; }
    .js .menue.offen { display: flex; }
    .js .menue a { padding: 0.75rem 0; border-bottom: 0; border-top: 1px solid var(--schiefer-linie); }
}

/* Nur für Bildschirmleser sichtbar */
.nur-vorleser {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Suchfeld im Kopf: Desktop rechts neben dem Menü, schmal als eigene Zeile unter Logo und Menüknopf */
.kopfsuche { display: flex; flex: 1 1 14rem; max-width: 20rem; min-width: 0; }
.kopf .kopfsuche input[type="search"] {
    -webkit-appearance: none; appearance: none;
    min-width: 0; padding: 0.45rem 0.65rem;
    border: 1px solid var(--schiefer-linie); border-right: 0; border-radius: 6px 0 0 6px;
}
.kopfsuche-knopf {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.6rem;
    color: var(--schiefer); background: var(--signal); border: 0; border-radius: 0 6px 6px 0; cursor: pointer;
}
@media (max-width: 40em) {
    .kopfsuche { flex-basis: 100%; max-width: none; order: 3; }
    .menue { order: 4; }
}

.inhalt { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2rem 0 0.75rem; }

.einleitung { font-size: 1.15rem; }

.fuss {
    padding: 2rem max(1rem, calc((100% - var(--rahmen)) / 2 + 1rem)) 1.5rem;
    color: var(--schiefer-text);
    background: var(--schiefer);
    font-size: 0.95rem;
}
.fuss a { color: #fff; }
.fuss-innen { display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; }
.fuss-innen > * { min-width: 0; margin: 0; }
.fuss-marke strong { color: #fff; font-size: 1.05rem; }
.fuss-menue, .fuss-recht { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: baseline; }
.fuss-menue a, .fuss-recht a { padding: 0.35rem 0; }
.fuss-recht { padding-top: 1rem; border-top: 1px solid var(--schiefer-linie); grid-column: 1 / -1; }
.fuss-recht span { color: #a9bccb; }
@media (min-width: 48rem) {
    .fuss-innen { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Formularfelder */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    width: 100%;
    font: inherit;
    padding: 0.6rem 0.75rem;
    color: var(--text);
    background-color: #fff;
    border: 1px solid var(--rand);
    border-radius: 6px;
}

/* Safari auf dem iPhone: Datums- und Zeitfelder wie normale Felder zeichnen */
input[type="date"], input[type="time"], input[type="datetime-local"] {
    -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%;
}
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.5em; }
.form-row input[type="date"] { display: block; min-height: calc(1.5em + 22px); }

@media (min-width: 40rem) {
    h1 { font-size: 2.25rem; }
}

/* Startseite und Suchseite haben ihr eigenes großes Suchfeld: dort kein zweites im Kopf */
.seite-start .kopfsuche, .seite-suche .kopfsuche { display: none; }

/* Bedingung eines Kennworts (Migration 011): klein hinter dem Wert, z. B. „bei 35 mm Anstauhöhe“ */
.kennwert-bedingung { font-size: 0.85em; color: #4a555c; }
