/* KI-Zertifikat – Grundgestaltung.
   Die Farben stehen als Variablen oben; je Institution werden sie später überschrieben. */
:root {
    --akzent: #1f3a5f;
    --akzent-hell: #e8eef6;
    --akzent-text: #ffffff;
    --flaeche: #f6f5f1;
    --karte: #ffffff;
    --text: #1c2026;
    --text-leise: #5a6370;
    --linie: #d9d7cf;
    --gut: #1e6b45;
    --gut-hell: #e4f2ea;
    --offen: #8a5a00;
    --offen-hell: #fbf0d6;
    --fehler: #a3261c;
    --fehler-hell: #fbe6e3;
    --radius: 10px;
    --breite: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--flaeche);
    color: var(--text);
    font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--akzent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); line-height: 1.2; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--akzent-hell); padding: 0.1em 0.35em; border-radius: 4px; }

.sprung { position: absolute; left: -999rem; top: 0; background: var(--karte); padding: 0.6rem 1rem; z-index: 10; }
.sprung:focus { left: 0.5rem; top: 0.5rem; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Kopf */
.kopf { background: var(--karte); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: var(--breite); margin: 0 auto; padding: 0.7rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.5rem; }
.marke { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); font-weight: 650; }
.marke-zeichen { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 8px; background: var(--akzent); color: var(--akzent-text); font-size: 0.85rem; letter-spacing: 0.04em; }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; flex: 1; }
.nav a { text-decoration: none; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--akzent); }
.kopf-konto { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1rem; font-size: 0.93rem; }
.kopf-name { color: var(--text-leise); }

/* Inhalt */
.inhalt { flex: 1; width: 100%; max-width: var(--breite); margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.schmal { max-width: 34rem; }
.auftakt { margin-bottom: 1.75rem; }
.vorzeile { margin: 0 0 0.35rem; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-leise); }
.vorzeile a { color: inherit; }
.lede { font-size: 1.1rem; color: var(--text-leise); max-width: 42rem; }
.klein { font-size: 0.9rem; color: var(--text-leise); }
.leer { padding: 1.5rem; border: 1px dashed var(--linie); border-radius: var(--radius); color: var(--text-leise); }
.titelzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.25rem; }
.titelzeile h1 { margin: 0; }

/* Hinweise */
.hinweis { padding: 0.8rem 1rem; border-radius: var(--radius); border: 1px solid; margin-bottom: 1.25rem; max-width: 46rem; }
.hinweis-gut { background: var(--gut-hell); border-color: #b9dcc8; color: #124a30; }
.hinweis-fehler { background: var(--fehler-hell); border-color: #efbdb7; color: #7a1a12; }
.hinweis-offen { background: var(--offen-hell); border-color: #ecd49a; color: #5f3d00; }

/* Karten und Formulare */
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.25rem; }
.formular label { display: block; font-weight: 600; margin: 1rem 0 0.3rem; }
.formular label:first-of-type { margin-top: 0; }
input[type="text"], input[type="email"], input[type="password"], select {
    width: 100%; font: inherit; color: inherit; background: #fff;
    border: 1px solid #a9adb5; border-radius: 8px; padding: 0.6rem 0.75rem;
}
input[readonly] { background: var(--flaeche); color: var(--text-leise); }
.feldhilfe { font-size: 0.88rem; color: var(--text-leise); margin: 0.35rem 0 0; }
.formular .knopf { margin-top: 1.4rem; }

.knopf {
    display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    background: var(--akzent); color: var(--akzent-text); border: 1px solid var(--akzent);
    border-radius: 8px; padding: 0.6rem 1.1rem;
}
.knopf:hover { filter: brightness(1.12); }
.knopf-zweit { background: var(--karte); color: var(--akzent); }
.knopf-zweit:hover { background: var(--akzent-hell); filter: none; }
button.link { font: inherit; color: var(--akzent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
form.inline { display: inline; }

/* Kacheln */
.kacheln { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.kachel { display: flex; flex-direction: column; gap: 0.3rem; height: 100%; padding: 1.2rem 1.3rem; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); text-decoration: none; color: var(--text); position: relative; }
.kachel:hover { border-color: var(--akzent); box-shadow: 0 2px 0 var(--akzent); }
.kachel-titel { font-weight: 650; font-size: 1.08rem; }
.kachel-text { color: var(--text-leise); font-size: 0.93rem; }
.kachel-weiter { position: absolute; right: 1.1rem; top: 1.15rem; color: var(--akzent); }

/* Kennzahlen */
.zahlen { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0 0 1.75rem; }
.zahlen div { display: flex; flex-direction: column-reverse; }
.zahlen dt { color: var(--text-leise); font-size: 0.9rem; }
.zahlen dd { margin: 0; font-size: 2rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Tabellen */
.tabelle-rahmen { overflow-x: auto; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tabelle th, .tabelle td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle thead th { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-leise); font-weight: 600; white-space: nowrap; }
.tabelle tbody tr:last-child th, .tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody th { font-weight: 600; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .aktionen { white-space: nowrap; text-align: right; }
.tabelle .aktionen > * + * { margin-left: 0.9rem; }
.tabelle tr.gesperrt th, .tabelle tr.gesperrt td:not(.aktionen) { color: var(--text-leise); }

.marke-gut, .marke-aus, .marke-offen { display: inline-block; font-size: 0.82rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.marke-gut { background: var(--gut-hell); color: var(--gut); }
.marke-aus { background: #e9e8e3; color: #4a4f57; }
.marke-offen { background: var(--offen-hell); color: var(--offen); }

/* Erstkennwort, einmalige Anzeige */
.einmal { font: 600 1.5rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; background: var(--karte); border: 2px solid var(--akzent); border-radius: var(--radius); padding: 1rem 1.2rem; overflow-wrap: anywhere; user-select: all; }

/* Fuß */
.fuss { border-top: 1px solid var(--linie); color: var(--text-leise); font-size: 0.88rem; }
.fuss span { display: block; max-width: var(--breite); margin: 0 auto; padding: 1rem 1.25rem; }

@media (max-width: 40rem) {
    .kopf-konto { margin-left: 0; width: 100%; }
    .tabelle .aktionen { white-space: normal; text-align: left; }
}

@media print {
    .kopf, .fuss, .knopf { display: none; }
    body { background: #fff; }
}
