/* Frontend für Leichte Sprache – bewusst groß, ruhig und kontrastreich. */

:root {
    --farbe: #1d6fb8;
    --farbe-dunkel: #15537a;
    --farbe-hell: #e8f1f9;
    --schrift-skala: 100%;

    --text: #1b1b1b;
    --text-leise: #4a4a4a;
    --rand: #c9ced6;
    --flaeche: #ffffff;
    --hintergrund: #f4f6f9;
    --fehler: #a4262c;
    --fehler-flaeche: #fdf3f3;
    --erfolg-flaeche: #eff7ed;
    --erfolg-rand: #4a7f3d;
    --radius: 0.6rem;
}

* { box-sizing: border-box; }

html {
    font-size: var(--schrift-skala);
}

body {
    margin: 0;
    background: var(--hintergrund);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.65;
}

.huelle {
    max-width: 82rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Sprunglink für Tastatur und Screenreader --- */
.sprunglink {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--farbe);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 100;
}
.sprunglink:focus {
    left: 0;
}

/* --- Kopf --- */
.kopf {
    background: var(--flaeche);
    border-bottom: 3px solid var(--farbe);
}
.kopf-inhalt {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}
.logo {
    max-height: 4rem;
    max-width: 16rem;
    width: auto;
    height: auto;
}
.kopf h1 {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.25;
    color: var(--farbe-dunkel);
}
.untertitel {
    margin: 0.2rem 0 0;
    color: var(--text-leise);
    font-size: 1.05rem;
}

/* --- Inhalt --- */
main {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
}

.einleitung {
    background: var(--farbe-hell);
    border-left: 5px solid var(--farbe);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 0 0 1.75rem;
}

.spalten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 62rem) {
    .spalten { grid-template-columns: 1fr; }
}

.spalte, .karte {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.karte {
    margin-top: 1.5rem;
}

.spalte h2, .karte h2 {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
    color: var(--farbe-dunkel);
}

.feld-beschriftung {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

textarea, select, input[type="text"] {
    width: 100%;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
    border: 2px solid var(--rand);
    border-radius: var(--radius);
    padding: 0.7rem 0.8rem;
}

textarea {
    resize: vertical;
    min-height: 12rem;
}

textarea:focus-visible, select:focus-visible, input:focus-visible,
button:focus-visible, .ausgabe:focus-visible, a:focus-visible {
    outline: 3px solid var(--farbe);
    outline-offset: 2px;
}

.zaehler {
    margin: 0.5rem 0 1rem;
    font-size: 0.95rem;
    color: var(--text-leise);
}
.zaehler.zu-lang {
    color: var(--fehler);
    font-weight: 600;
}

/* --- Knöpfe --- */
.steuerung {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}
.steuerung-ausgabe {
    margin-top: 1rem;
}
.stufe {
    flex: 1 1 14rem;
    min-width: 12rem;
}

.knopf {
    font: inherit;
    font-weight: 600;
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    min-height: 3rem;
}
.knopf:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.knopf-haupt {
    background: var(--farbe);
    color: #fff;
}
.knopf-haupt:hover:not(:disabled) {
    background: var(--farbe-dunkel);
}
.knopf-zweit {
    background: #fff;
    color: var(--farbe-dunkel);
    border-color: var(--farbe);
}
.knopf-zweit:hover:not(:disabled) {
    background: var(--farbe-hell);
}
.knopf-still {
    background: #eef0f3;
    color: #2b2b2b;
    border-color: var(--rand);
}
.knopf-still:hover:not(:disabled) {
    background: #e2e5ea;
}

/* --- Ausgabe --- */
.ausgabe {
    min-height: 20rem;
    max-height: 46rem;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    background: #fbfcfd;
    border: 2px solid var(--rand);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 1.15rem;
    line-height: 1.8;
}
.ausgabe:empty::before {
    content: "Hier erscheint der übersetzte Text.";
    color: var(--text-leise);
}
.ausgabe.laeuft {
    border-color: var(--farbe);
}

/* --- Fortschritt --- */
.fortschritt {
    margin-bottom: 0.9rem;
}
.balken {
    height: 0.7rem;
    background: #e3e7ec;
    border-radius: 999px;
    overflow: hidden;
}
.balken-fuellung {
    height: 100%;
    width: 0;
    background: var(--farbe);
    transition: width 0.3s ease;
}
.fortschritt-text {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    color: var(--text-leise);
}

/* --- Meldungen --- */
.meldung {
    margin: 0 0 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: var(--fehler-flaeche);
    border: 1px solid #e5b7b7;
    color: var(--fehler);
    font-weight: 600;
}
.meldung.gut {
    background: var(--erfolg-flaeche);
    border-color: #bcd9b2;
    color: #2f5c25;
}
.hinweis-klein {
    font-size: 0.95rem;
    color: var(--erfolg-rand);
    font-weight: 600;
    align-self: center;
}

/* --- Fuß --- */
.fuss {
    background: var(--flaeche);
    border-top: 1px solid var(--rand);
    padding: 1.25rem 0;
    color: var(--text-leise);
    font-size: 0.98rem;
}
.fuss p { margin: 0 0 0.4rem; }
.fuss a { color: var(--farbe-dunkel); }

@media print {
    .kopf, .fuss, .steuerung, .fortschritt, #eingabe, .einleitung { display: none; }
    .spalten { grid-template-columns: 1fr; }
    .ausgabe { border: 0; max-height: none; }
}
