/*
 * Optik des Altbestands, Technik neu.
 *
 * Kein Bootstrap, kein jQuery: Auf einer Seite, die entschlüsselten Klartext
 * im DOM hält, ist jedes Fremdskript ein Mitleser. Farben und Maße stammen
 * aus original-code-stand-25.07.2026/secrets/css/dark.css und custom.css.
 */

@font-face {
    font-family: 'Lexend Deca';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/lexend-deca-v21-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Lexend Deca';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/lexend-deca-v21-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-v13-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-v13-latin-600.woff2') format('woff2');
}

:root {
    --farbe-text: #232323;
    --farbe-flaeche: #efefef;
    --farbe-akzent: #98fb98;
    --farbe-knopf: #212121;
    --farbe-knopf-text: #ebebeb;
    --farbe-warnung: #8a5a00;
    --farbe-fehler: #a12626;
    --abstand: 24px;
}

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

body {
    margin: 0;
    padding: 0 45px;
    min-height: 100vh;
    background: var(--farbe-flaeche) url('../img/hintergrund.jpg') no-repeat center / cover;
    color: var(--farbe-text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

.page {
    max-width: 1500px;
    margin: 0 auto;
}

.masthead {
    padding: 30px 0 100px;
}

.logo {
    /* Die gestapelte Wortmarke trägt "digital" als Unterzeile — bei den
       40px des früheren Platzhalters würde sie unleserlich klein. */
    height: 52px;
    width: auto;
}

.layout {
    display: grid;
    grid-template-columns: 4fr 1fr 6fr;
    gap: var(--abstand);
}

.layout .intro {
    grid-column: 1;
}

.layout .form-side {
    grid-column: 3;
}

.layout-single {
    grid-template-columns: 1fr;
    max-width: 720px;
}

.layout-single .intro,
.layout-single .form-side {
    grid-column: 1;
}

.pretitle {
    margin: 0 0 20px;
    font-size: 20px;
    line-height: 28px;
    text-transform: uppercase;
}

.pretitle::before {
    content: '';
    display: inline-block;
    position: relative;
    top: -0.1em;
    vertical-align: middle;
    height: 15px;
    margin-right: calc(5px + 0.2em);
    border-left: 15px solid var(--farbe-akzent);
    border-radius: 50%;
}

h1 {
    margin: 0 0 20px;
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 44px;
    font-weight: 400;
    line-height: 62px;
}

h1 u {
    text-decoration: none;
    font-weight: 500;
}

h2 {
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-weight: 400;
}

.field {
    margin-bottom: var(--abstand);
}

label {
    display: block;
    margin-bottom: 6px;
}

.optional {
    color: rgba(0, 0, 0, 0.5);
    font-size: 14px;
}

input[type='text'],
input[type='password'],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--farbe-text);
    border-radius: 0;
    background: transparent;
    color: var(--farbe-text);
    font: inherit;
}

textarea {
    min-height: 240px;
    resize: vertical;
}

::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.chars-left {
    margin: 5px 0 0;
    color: rgba(0, 0, 0, 0.5);
}

.chars-left.over {
    color: var(--farbe-fehler);
    font-weight: 600;
}

.toggler {
    /* Als Block, sonst setzt sich der Absendeknopf daneben auf dieselbe
       Zeile — ein <button> ist von Haus aus inline-block. */
    display: block;
    margin-bottom: var(--abstand);
    padding: 0;
    border: 0;
    background: none;
    color: var(--farbe-text);
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
}

.toggler:hover,
.toggler:focus-visible {
    text-decoration: underline;
}

/*
 * Zweispaltig wie im Bestand: Lebenszeit neben Abrufanzahl, die beiden
 * Passwortfelder nebeneinander. Der Hinweis zum Passwort und das Feld
 * "Bezeichnung" laufen über beide Spalten — der eine, weil er für beide
 * Passwortfelder gilt, das andere, weil sein Warnhinweis Platz zum Lesen
 * braucht und nicht in eine halbe Spalte gequetscht gehört.
 */
.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--abstand);
    align-items: start;
}

/*
 * display: grid oben überstimmt das display: none, das dem hidden-Attribut
 * aus dem Browser-Stylesheet zusteht — ohne diese Regel bliebe der Bereich
 * dauerhaft sichtbar und der Umschalter wechselte nur seinen Text.
 */
.options[hidden] {
    display: none;
}

.options .field-breit {
    grid-column: 1 / -1;
}

.options > .hint {
    margin-top: -12px;
    margin-bottom: var(--abstand);
}

.btn {
    display: inline-block;
    margin: 24px 0 20px;
    padding: 10px 28px;
    border: 2px solid var(--farbe-knopf);
    border-radius: 50px;
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 14px;
    line-height: 28px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--farbe-knopf);
    color: var(--farbe-knopf-text);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: transparent;
    color: var(--farbe-knopf);
}

.btn-secondary {
    background: transparent;
    color: var(--farbe-knopf);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--farbe-knopf);
    color: #fff;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: progress;
}

.copy-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.copy-row .btn {
    margin-top: 0;
    white-space: nowrap;
}

.hint {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.65);
}

.hint.warn {
    color: var(--farbe-warnung);
    font-weight: 600;
}

.warn-box,
.error-box {
    margin: 0 0 var(--abstand);
    padding: 16px 20px;
    border-left: 6px solid var(--farbe-akzent);
    background: rgba(255, 255, 255, 0.6);
}

.error-box {
    border-left-color: var(--farbe-fehler);
}

.error {
    margin: 12px 0 0;
    color: var(--farbe-fehler);
    font-weight: 600;
}

.copy-feedback {
    margin: 8px 0 0;
    min-height: 1.5em;
    font-size: 14px;
}

.status {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 8px 16px;
    margin: 0 0 var(--abstand);
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.6);
}

.status dt {
    font-weight: 600;
}

.status dd {
    margin: 0;
}

.noscript {
    margin: var(--abstand) 0;
    padding: 16px 20px;
    border-left: 6px solid var(--farbe-fehler);
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1200px) {
    body {
        background-position: left;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .layout .form-side {
        grid-column: 1;
    }

    .masthead {
        padding-bottom: 20px;
    }

    h1 {
        font-size: 32px;
        line-height: 44px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 0 20px;
    }

    .status {
        grid-template-columns: 1fr;
    }

    .options {
        grid-template-columns: 1fr;
    }

    .copy-row {
        flex-direction: column;
    }
}
