/* gsogt, Oberfläche.
 *
 * Richtung: Papier und Werkstatt. Heller, leicht warmer Grund wie Papier,
 * eine einzige tiefe Farbe für alles Handelnde, Serifenschrift im Fließtext
 * und eine schmale Monospace für Etiketten. Der Kontrast entsteht aus der
 * Größe und aus dem Rhythmus der Abstände, nicht aus vielen Farben.
 *
 * Jeder Gestaltungswert steht hier als Variable. Wer eine Farbe zweimal fest
 * einträgt, hat sie beim nächsten Mal einmal vergessen.
 */

:root {
    --grund: #faf9f7;
    --grund-tief: #f0eeea;
    --karte: #ffffff;
    --tinte: #14171d;
    --tinte-weich: #4a5160;
    --tinte-blass: #858d9c;
    --linie: #dcd9d2;
    --linie-fein: rgba(20, 23, 29, .07);
    --akzent: #1e3f66;
    --akzent-hell: #3a6ea5;
    --akzent-lasur: rgba(30, 63, 102, .09);
    --warnung: #8a3324;
    --warnung-lasur: rgba(138, 51, 36, .08);
    --gut: #2c6244;

    --schrift-titel: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --schrift-text: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
    --schrift-mess: ui-monospace, 'SF Mono', 'Cascadia Mono', monospace;

    --radius: 3px;
    --radius-gross: 6px;
    --eng: .7rem;
    --mittel: 1.4rem;
    --weit: 3.5rem;

    --kurve: cubic-bezier(.16, 1, .3, 1);
    --schatten: 0 1px 2px rgba(20,23,29,.05), 0 8px 24px rgba(20,23,29,.07);
    --schatten-tief: 0 2px 4px rgba(20,23,29,.06), 0 20px 50px rgba(20,23,29,.13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--grund);
    color: var(--tinte);
    font-family: var(--schrift-text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.versteckt { display: none !important; }
/* Alle Zeichen sind Strichzeichnungen. Ohne diese Grundregel füllt der
 * Browser ein <use> aus dem Sprite schwarz aus - das Markenzeichen wurde so
 * zum schwarzen Klecks. */
svg { fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round; }
svg.icon { width: 1em; height: 1em; }

/* Die Sprite-Quelle nimmt keinen Platz ein und ist für niemanden sichtbar. */
.svg-quelle { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Abstände und Kleintexte als Klassen. Inline-Stile sind durch die
 * Inhaltsregel des Browsers verboten und würden stillschweigend wegfallen. */
.abstand-oben { margin-top: .8rem; }
.abstand-oben-eng { margin-top: .5rem; }
.klein-notiz { font-size: .85rem; color: var(--tinte-weich); margin: 1.1rem 0 0; }

/* ------------------------------------------------------------- Aufbau ---- */
/* Zwei Spalten: links die Marke mit einem Satz, rechts die Handlung. Auf
 * schmalen Geräten fällt die linke Spalte auf einen Kopf zusammen, statt zu
 * verschwinden - sonst weiß niemand, wo er gerade ist. */

.buehne {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.seite-links {
    background: var(--grund-tief);
    border-right: 1px solid var(--linie);
    padding: var(--weit);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Feines Raster wie Millimeterpapier. Liegt hinter dem Text und trägt die
 * Werkstatt-Anmutung, ohne zu lärmen. */
.seite-links::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--linie-fein) 1px, transparent 1px),
        linear-gradient(90deg, var(--linie-fein) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .8;
    pointer-events: none;
}

.seite-links > * { position: relative; }

.seite-rechts {
    padding: var(--weit);
    display: flex;
    align-items: center;
    justify-content: center;
}

.marke { display: flex; align-items: center; gap: .6rem;
    font-family: var(--schrift-titel); font-weight: 600; font-size: 1.15rem; }
.marke svg { width: 26px; height: 26px; color: var(--akzent); stroke-width: 1.6; }
a.marke { text-decoration: none; color: inherit; }
.marke small { display: block; font-family: var(--schrift-mess); font-size: .62rem;
    font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
    color: var(--tinte-blass); }

.leitsatz { max-width: 30ch; }
.leitsatz h1 { font-family: var(--schrift-titel); font-weight: 700;
    font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.08;
    letter-spacing: -.025em; margin: 0 0 var(--eng); }
.leitsatz p { color: var(--tinte-weich); margin: 0; }

.fussnote { font-family: var(--schrift-mess); font-size: .68rem;
    letter-spacing: .09em; text-transform: uppercase; color: var(--tinte-blass); }

/* -------------------------------------------------------------- Karte ---- */

.karte {
    width: 100%;
    max-width: 420px;
    background: var(--karte);
    border: 1px solid var(--linie);
    border-radius: var(--radius-gross);
    box-shadow: var(--schatten);
    padding: 2.2rem 2.2rem 1.9rem;
}

.karte h2 { font-family: var(--schrift-titel); font-size: 1.3rem; font-weight: 600;
    letter-spacing: -.015em; margin: 0 0 .3rem; }
.karte .unterzeile { color: var(--tinte-weich); font-size: .92rem;
    margin: 0 0 1.6rem; }

.etikett { display: block; font-family: var(--schrift-mess); font-size: .66rem;
    letter-spacing: .11em; text-transform: uppercase; color: var(--tinte-blass);
    margin-bottom: .4rem; }

/* -------------------------------------------------------------- Felder --- */

input[type=email], input[type=password], input[type=text] {
    width: 100%;
    font-family: var(--schrift-titel);
    font-size: 1rem;
    padding: .72rem .85rem;
    color: var(--tinte);
    background: var(--grund);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    transition: border-color .2s var(--kurve), box-shadow .2s var(--kurve);
}

input:focus-visible {
    outline: none;
    border-color: var(--akzent);
    box-shadow: 0 0 0 3px var(--akzent-lasur);
}

input::placeholder { color: var(--tinte-blass); }

.feld { margin-bottom: 1.1rem; }

.code-feld {
    font-family: var(--schrift-mess);
    font-size: 1.6rem;
    letter-spacing: .38em;
    text-align: center;
    padding: .6rem .4rem;
}

/* -------------------------------------------------------------- Knöpfe --- */

button { font: inherit; cursor: pointer; border: none; background: none;
    color: inherit; }

.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%;
    font-family: var(--schrift-titel); font-size: .97rem; font-weight: 500;
    padding: .78rem 1.3rem;
    background: var(--akzent); color: #fff;
    border-radius: var(--radius);
    transition: transform .25s var(--kurve), box-shadow .25s var(--kurve),
                background .2s;
}
.knopf:hover { background: var(--akzent-hell); transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(30,63,102,.22); }
.knopf:active { transform: translateY(0); }
.knopf:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

.knopf-linie {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%;
    font-family: var(--schrift-titel); font-size: .95rem; font-weight: 500;
    padding: .74rem 1.3rem;
    background: var(--karte); color: var(--tinte);
    border: 1px solid var(--linie); border-radius: var(--radius);
    transition: border-color .2s, background .2s, transform .25s var(--kurve);
}
.knopf-linie:hover { border-color: var(--akzent); background: var(--akzent-lasur);
    transform: translateY(-1px); }

.knopf-flach {
    font-family: var(--schrift-titel); font-size: .88rem; color: var(--akzent);
    padding: .35rem 0; text-align: left;
}
.knopf-flach:hover { text-decoration: underline; text-underline-offset: 3px; }

.knopf-warnung { color: var(--warnung); }

/* --------------------------------------------------------- Wegetrenner --- */
/* Die vier Anmeldewege sind gleichwertig, aber nicht gleich häufig. Der Link
 * aus der Mail steht oben und groß, die anderen darunter als Auswahl. */

.trenner { display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0;
    font-family: var(--schrift-mess); font-size: .64rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--tinte-blass); }
.trenner::before, .trenner::after { content: ''; flex: 1; height: 1px;
    background: var(--linie); }

.wege { display: grid; gap: .55rem; }

/* Feld und Knopf in einer Zeile. Der Knopf behält seine Breite, das Feld
 * nimmt den Rest. */
.zeile-form { display: flex; gap: .55rem; align-items: stretch; }
.zeile-form input { flex: 1; min-width: 0; }
.zeile-form .knopf, .zeile-form .knopf-linie { width: auto; flex: 0 0 auto; }
@media (max-width: 560px) { .zeile-form { flex-direction: column; }
    .zeile-form .knopf, .zeile-form .knopf-linie { width: 100%; } }

/* Der Dialog erbt das Kartenbild, steht aber schmaler und tiefer. */
dialog.dialog-karte { max-width: 400px; padding: 1.8rem;
    box-shadow: var(--schatten-tief); }
dialog.dialog-karte::backdrop { background: rgba(20, 23, 29, .35); }

/* -------------------------------------------------------------- Meldung -- */

.meldung {
    display: flex; gap: .6rem; align-items: flex-start;
    font-size: .9rem; line-height: 1.5;
    padding: .75rem .9rem;
    border-radius: var(--radius);
    margin-bottom: 1.1rem;
    border: 1px solid transparent;
}
.meldung svg { flex: 0 0 auto; margin-top: .18rem; }
.meldung.gut { background: rgba(44,98,68,.07); border-color: rgba(44,98,68,.22);
    color: var(--gut); }
.meldung.schlecht { background: var(--warnung-lasur);
    border-color: rgba(138,51,36,.22); color: var(--warnung); }
.meldung.hinweis { background: var(--akzent-lasur);
    border-color: rgba(30,63,102,.18); color: var(--akzent); }

/* ---------------------------------------------------------------- Liste -- */

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

.zeile {
    display: flex; align-items: center; gap: .9rem;
    width: 100%; text-align: left;
    padding: .8rem .95rem;
    background: var(--grund);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    transition: border-color .2s, background .2s, transform .2s var(--kurve);
}
button.zeile:hover { border-color: var(--akzent); background: var(--akzent-lasur);
    transform: translateX(2px); }

.zeile .haupt { flex: 1; min-width: 0; }
/* Beide als Block, sonst laufen Titel und Nebenzeile in einer Zeile ineinander
 * ("Chrome auf Linuxangelegt 18.08."). */
.zeile .titel { display: block; font-family: var(--schrift-titel);
    font-weight: 500; font-size: .96rem; line-height: 1.35; }
.zeile .neben { display: block; font-size: .8rem; color: var(--tinte-blass);
    line-height: 1.35; }
.zeile .neben:empty { display: none; }
.zeile .marker { font-family: var(--schrift-mess); font-size: .62rem;
    letter-spacing: .1em; text-transform: uppercase; color: var(--tinte-blass);
    padding: .2rem .45rem; border: 1px solid var(--linie);
    border-radius: 999px; }
.zeile .marker.an { color: var(--gut); border-color: rgba(44,98,68,.3); }

/* ------------------------------------------------------------ Kontoseite - */

.kopfleiste {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--mittel);
    padding: 1.1rem var(--weit);
    background: var(--karte);
    border-bottom: 1px solid var(--linie);
    position: sticky; top: 0; z-index: 5;
}

.inhalt { max-width: 780px; margin: 0 auto; padding: var(--weit) var(--mittel); }

.abschnitt { margin-bottom: 2.6rem; }
.abschnitt > h3 { font-family: var(--schrift-titel); font-size: 1.05rem;
    font-weight: 600; margin: 0 0 .25rem; }
.abschnitt > .beschreibung { color: var(--tinte-weich); font-size: .9rem;
    margin: 0 0 1rem; max-width: 60ch; }

.qr { display: flex; gap: var(--mittel); align-items: flex-start;
    padding: 1.1rem; background: var(--grund); border: 1px solid var(--linie);
    border-radius: var(--radius); margin-bottom: 1.1rem; }
.qr svg { width: 148px; height: 148px; flex: 0 0 auto; background: #fff; }
.qr .schluessel { font-family: var(--schrift-mess); font-size: .78rem;
    word-break: break-all; color: var(--tinte-weich); }

.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem;
    font-family: var(--schrift-mess); font-size: .85rem;
    padding: 1rem; background: var(--grund); border: 1px dashed var(--linie);
    border-radius: var(--radius); }

/* ------------------------------------------------------------- Auftritt -- */
/* Eine Bewegung je Aussage: die Karte kommt einmal herein, danach ist Ruhe. */

@keyframes auf { from { opacity: 0; transform: translateY(10px); }
                 to   { opacity: 1; transform: none; } }
.karte, .inhalt > * { animation: auf .5s var(--kurve) both; }
.inhalt > *:nth-child(2) { animation-delay: .05s; }
.inhalt > *:nth-child(3) { animation-delay: .1s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* -------------------------------------------------------------- Schmal --- */

@media (max-width: 860px) {
    .buehne { grid-template-columns: 1fr; }
    .seite-links { padding: var(--mittel); border-right: none;
        border-bottom: 1px solid var(--linie); }
    .seite-links .leitsatz, .seite-links .fussnote { display: none; }
    .seite-rechts { padding: var(--mittel); align-items: flex-start; }
    .karte { box-shadow: none; }
    .kopfleiste, .inhalt { padding-left: var(--mittel); padding-right: var(--mittel); }
}

@media (max-width: 420px) {
    .karte { padding: 1.5rem 1.2rem 1.3rem; border-radius: var(--radius); }
    .codes { grid-template-columns: 1fr; }
}
