/* ═══════════════════════════════════════════════════════════════════════
   Rechtstext-Layout [ac_legal_layout] (AGB, Datenschutz, Impressum …)
   Desktop: Sticky-TOC-Sidebar + Lesespalte · Mobil: <details>-Akkordeon
   Farben/Typo aus dem Child-Theme: Monument Grotesk / SourceSerif4,
   Highlight #fff8c1, Grün #2e7d43, Sekundärgrau #8f8f8f, Radius 10px.
   ═══════════════════════════════════════════════════════════════════════ */

/* .ac-legal bleibt bewusst ohne Styles — Breite/Typo kommen vom
   Seiten-Container des Themes. */

/* ── Seitenkopf ── */
.ac-legal__title {
    font-family: 'SourceSerif4', serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -.01em;
    margin: 0 0 10px;
}
.ac-legal__meta {
    font-size: 13px;
    color: #8f8f8f;
    margin: 0 0 18px;
}
.ac-legal__intro {
    font-size: 15px;
    line-height: 1.6;
    max-width: 640px;
    margin: 0;
}
.ac-legal__head {
    padding-bottom: 28px;
    border-bottom: 1px solid #e5e2dc;
    margin-bottom: 36px;
}

/* ── Grid ── */
.ac-legal__grid {
    display: grid;
    /* Lesespalte nutzt die volle Restbreite des Seiten-Containers */
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}
.ac-legal__side {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
}

/* ── Inhaltsverzeichnis ── */
.ac-legal__toc-list {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
}
.ac-legal__toc-item a {
    display: block;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.35;
    color: #000;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color .15s ease;
}
.ac-legal__toc-item a:hover { background: #f5f3ef; }
.ac-legal__toc-item.is-active > a {
    background: #e7e7e7;
    font-weight: 400;
}
.ac-legal__toc-item--break {
    border-top: 1px solid #e5e2dc;
    margin-top: 8px;
    padding-top: 8px;
}

/* ── Kontaktkarte ── */
.ac-legal__contact {
    border: 1px solid #dcdad5;
    border-radius: 10px;
    padding: 18px 20px;
}
.ac-legal__contact > .las {
    font-size: 22px;
    display: block;
    margin-bottom: 10px;
}
.ac-legal__contact-title {
    font-size: 15px;
    font-weight: 400;
    margin: 0 0 6px;
}
.ac-legal__contact-text {
    font-size: 13px;
    line-height: 1.55;
    color: #8f8f8f;
    margin: 0 0 12px;
}
.ac-legal__contact-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #2e7d43 !important;
    text-decoration: none;
}
.ac-legal__contact-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ac-legal__contact-link .las { font-size: 17px; }

/* ── Lesespalte ── */
.ac-legal__content h2 {
    font-family: 'SourceSerif4', serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    margin: 44px 0 14px;
    scroll-margin-top: 120px;
}
.ac-legal__content h2:first-child { margin-top: 0; }
.ac-legal__content h3 {
    font-size: 16px;
    font-weight: 400;
    margin: 26px 0 10px;
    scroll-margin-top: 120px;
}
.ac-legal__content p {
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 12px;
}

/* ── Hinweiskasten ── */
.ac-legal-hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff8c1;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 18px 0;
}
.ac-legal-hint > .las {
    font-size: 20px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.ac-legal-hint__text {
    flex: 1;
    font-size: 15px;
}
.ac-legal-hint__text p { margin: 0 0 6px; line-height: 1.55; }
.ac-legal-hint__text p:last-child { margin-bottom: 0; }
.ac-legal-hint__text a { color: #000; text-decoration: underline; text-underline-offset: 3px; }

/* ── Mobiles TOC-Akkordeon ── */
.ac-legal__toc-mobile { display: none; }

/* ── Responsive ── */
@media (max-width: 1023px) {
    .ac-legal__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .ac-legal__side { display: none; }

    .ac-legal__toc-mobile {
        display: block;
        border: 1px solid #dcdad5;
        border-radius: 10px;
        margin-bottom: 32px;
    }
    .ac-legal__toc-mobile summary {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 10px 14px;
        font-size: 14px;
        cursor: pointer;
        list-style: none;
    }
    .ac-legal__toc-mobile summary::-webkit-details-marker { display: none; }
    .ac-legal__toc-mobile summary .las { font-size: 18px; }
    .ac-legal__chevron { margin-left: auto; transition: transform .2s ease; }
    .ac-legal__toc-mobile[open] .ac-legal__chevron { transform: rotate(180deg); }
    .ac-legal__toc-mobile nav {
        border-top: 1px solid #efeeea;
        padding: 8px;
    }
    .ac-legal__toc-mobile .ac-legal__toc-list { margin: 0; }
    .ac-legal__toc-mobile .ac-legal__toc-item a { min-height: 44px; display: flex; align-items: center; }

    .ac-legal__title { font-size: 30px; }
}
