/* Vereinstakt – Lese-Seiten: Dokumentation, Rechtstexte, Kontakt. */


.read {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap);
    padding: clamp(32px, 6vw, 96px) var(--margin) 0;
}

.read-head {
    grid-column: 1 / span 8;
}

.read-head h1 {
    font-size: clamp(2.25rem, 1rem + 5.2vw, 5.5rem);
    line-height: 0.94;
    letter-spacing: -0.035em;
    hyphens: auto;
    overflow-wrap: break-word;
}

.read-head .lead {
    max-width: 44ch;
    margin-top: 24px;
    font-size: var(--step-lead);
    line-height: 1.35;
}

.read-head .audience {
    margin-top: 16px;
    font-size: var(--step-body);
    color: var(--ink-soft);
}

.read-body {
    grid-column: 1 / span 8;
    margin-top: clamp(40px, 6vw, 80px);
    max-width: 68ch;
}

.read-aside {
    grid-column: 10 / -1;
    grid-row: 1 / span 2;
    align-self: start;
    position: sticky;
    top: 24px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: var(--step-body);
}

.read-aside h2 {
    font-size: var(--step-body);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.read-aside > div + div {
    margin-top: 24px;
}

.read-aside ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.read-aside a {
    text-decoration: none;
}

.read-aside a[aria-current="page"] {
    font-weight: 600;
    color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    .read-aside a:hover {
        text-decoration: underline;
    }
}

.read-body h2 {
    margin-top: 2.4em;
    margin-bottom: 0.6em;
    font-size: var(--step-title);
    line-height: 1.05;
}

.read-body h3 {
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    font-size: var(--step-lead);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.read-body p,
.read-body ul,
.read-body ol,
.read-body dl,
.read-body table {
    margin: 0 0 1em;
}

.read-body ul,
.read-body ol {
    padding-left: 1.25em;
}

.read-body li + li {
    margin-top: 0.35em;
}

.read-body img,
.read-body figure img {
    width: 100%;
    height: auto;
    margin: 1.4em 0 2em;
    border-radius: var(--radius);
    background: var(--surface);
}

.read-body figure {
    margin: 0;
}

.read-body .note {
    margin: 1.6em 0;
    padding: 20px 24px;
    background: var(--surface);
    border-radius: var(--radius);
}

.read-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--step-small);
}

.read-body th,
.read-body td {
    padding: 10px 12px 10px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--surface-2);
}

.read-body code {
    padding: 0.1em 0.35em;
    background: var(--surface);
    border-radius: 4px;
    font-size: 0.92em;
}

.read-back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-top: 40px;
    font-size: var(--step-small);
    color: var(--ink-soft);
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .read-back:hover {
        color: var(--ink);
    }
}

@media (max-width: 900px) {
    .read-head,
    .read-body,
    .read-aside {
        grid-column: 1 / -1;
    }

    .read-aside {
        position: static;
        grid-row: auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 24px;
        margin-top: 48px;
    }

    .read-aside > div + div {
        margin-top: 0;
    }

    .read-aside ul {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        column-gap: 24px;
    }
}

/* Schritte einer Anleitung: Überschrift, Text, Bildschirmfoto, Hinweis. */
.read-body .step + .step {
    margin-top: 56px;
}

.read-body .step:first-child h2 {
    margin-top: 0;
}

.read-body .phones {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 1.4em 0 2em;
}

.read-body .phones img {
    width: min(260px, calc(50% - 8px));
    margin: 0;
}

.read-body address {
    margin: 0 0 1em;
    font-style: normal;
}

/* Lizenzen: breite Tabellen und ausklappbare Lizenztexte. */
.read-body.read-wide {
    grid-column: 1 / span 9;
    max-width: none;
}

.read-wide > p {
    max-width: 62ch;
}

@media (max-width: 900px) {
    .read-body.read-wide {
        grid-column: 1 / -1;
    }
}

.license-table {
    margin: 0 0 2em;
    overflow-x: auto;
}

@media (max-width: 640px) {
    .license-table thead {
        display: none;
    }

    .license-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 2px 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--surface-2);
    }

    .license-table {
        overflow-x: visible;
    }

    .license-table td {
        padding: 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .license-table td:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
    }

    .license-table td:nth-child(4) {
        grid-column: 1 / -1;
        color: var(--ink-soft);
    }
}

.read-body details {
    margin: 0 0 8px;
    padding: 14px 20px;
    background: var(--surface);
    border-radius: var(--radius);
}

.read-body summary {
    min-height: 28px;
    font-weight: 600;
    cursor: pointer;
}

.read-body pre {
    margin: 16px 0 0;
    font: inherit;
    font-size: var(--step-small);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Formulare: Kontakt und TestFlight. contact-form.js setzt die Status-Klassen. */
.contact-form {
    display: grid;
    gap: 20px;
    max-width: 560px;
}

.contact-field {
    display: grid;
    gap: 8px;
}

.contact-field label {
    font-weight: 600;
}

.contact-optional {
    font-weight: 400;
    color: var(--ink-soft);
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 2px solid var(--surface-2);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    transition: border-color 160ms ease;
}

.contact-field input:focus-visible,
.contact-field textarea:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.contact-form .btn {
    justify-self: start;
}

.contact-status:empty {
    display: none;
}

.contact-status-success {
    color: var(--accent-press);
    font-weight: 600;
}

.contact-status-error {
    color: var(--danger);
    font-weight: 600;
}

/* Kontakt: die Seitenleiste wird zur zweiten Kachel neben dem Formular. */
.read-aside.contact-aside {
    position: static;
    align-self: stretch;
    background: var(--slate);
    color: var(--slate-ink);
}

.contact-aside a {
    color: var(--slate-ink);
    text-decoration: underline;
}

.contact-aside p {
    margin-top: 24px;
}
