/* Seite "Daten" (daten.php) */

/* Fließtext in Abschnitten: gleiche Zeilenlänge wie auf den übrigen Seiten */
.datenseite .abschnitt > p,
.datenseite .anmerkungen ol,
.datenseite blockquote {
    max-width: 70ch;
    hyphens: auto;
}

/* Hervorgehobener Link zum Repository */
.repo-hinweis {
    max-width: 70ch;
    margin: 1.5rem 0;
}
.repo-hinweis a {
    display: block;
    padding: 0.8rem 1rem;
    border: 1px solid #333;
    border-left-width: 5px;
    border-radius: 0.25rem;
    text-decoration: none;
    color: inherit;
    background: #f6f7f9;
}
.repo-hinweis a:hover {
    background: #eceef1;
}
.repo-hinweis a:hover .repo-titel {
    text-decoration-thickness: 2px;
}
.repo-titel {
    display: block;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.repo-text {
    display: block;
    font-size: 0.9rem;
    color: #5c636a;
    margin-top: 0.15rem;
}

/* Inhaltsübersicht */
.inhalt {
    max-width: 70ch;
    margin: 2rem 0 1.5rem;
}
.inhalt h2 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}
.inhalt ol {
    margin: 0 0 0.75rem;
    padding-left: 1.4rem;
}
.inhalt li {
    margin-bottom: 0.15rem;
}

/* Aufklappbare Abschnitte */
.abschnitt {
    border-top: 1px solid #dee2e6;
}
.abschnitt:last-of-type {
    border-bottom: 1px solid #dee2e6;
}
.abschnitt > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.abschnitt > summary::-webkit-details-marker {
    display: none;
}
.abschnitt > summary::before {
    content: "";
    flex: none;
    width: 0.55em;
    height: 0.55em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15em) rotate(-45deg);
    transition: transform 0.15s ease;
}
.abschnitt[open] > summary::before {
    transform: translateY(-0.3em) rotate(45deg);
}
.abschnitt > summary h2 {
    display: inline;
    margin: 0;
    font-size: 1.4rem;
}
.abschnitt > summary:hover h2 {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.abschnitt > summary:focus-visible {
    outline: 2px solid #212529;
    outline-offset: 2px;
}
.abschnitt[open] {
    padding-bottom: 1rem;
}
@media (prefers-reduced-motion: reduce) {
    .abschnitt > summary::before {
        transition: none;
    }
}

/* Blockzitate */
.datenseite blockquote {
    margin: 0 0 1rem 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #dee2e6;
    font-size: 0.95em;
}
.datenseite blockquote p {
    margin: 0;
}

/* Tabelle zur Korpuskonstitution */
.tabelle-rahmen {
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
}
.tabelle-rahmen:focus-visible {
    outline: 2px solid #212529;
    outline-offset: 2px;
}
table.konstitution {
    border-collapse: collapse;
    min-width: 50rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
.konstitution th,
.konstitution td {
    border: 1px solid #adb5bd;
    padding: 0.5rem 0.65rem;
    vertical-align: top;
    text-align: left;
    hyphens: auto;
}
.konstitution thead th {
    background: #333;
    color: #fff;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}
.konstitution thead td {
    background: #333;
    border-color: #adb5bd;
}
.konstitution tbody th {
    font-weight: 400;
    width: 20%;
    background: #f6f7f9;
}

/* ER-Diagramm */
.er-modell {
    margin: 0.5rem 0 1rem;
}
.er-modell img {
    display: block;
    width: 100%;
    max-width: 1100px;
    height: auto;
    border: 1px solid #dee2e6;
}
.er-modell figcaption {
    max-width: 70ch;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #5c636a;
}

/* Fußnoten */
sup.fn a {
    text-decoration: none;
    padding: 0 0.1em;
}
sup.fn a:hover {
    text-decoration: underline;
}
.anmerkungen {
    margin-top: 2.5rem;
}
.anmerkungen h2 {
    font-size: 1.4rem;
}
.anmerkungen li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}


/* Druck: alles aufgeklappt zeigen */
@media print {
    .abschnitt > summary::before,
    #alle-umschalten {
        display: none;
    }
}

/* Dateinamen und Code im Fließtext ohne Signalfarbe */
.datenseite code {
    color: inherit;
    background: #f1f3f5;
    padding: 0.05em 0.3em;
    border-radius: 0.2rem;
    font-size: 0.875em;
}

/* Anmerkungen: Ziffer führt zurück zur Textstelle */
.anmerkungen .fn-liste {
    list-style: none;
    padding-left: 0;
}
.anmerkungen .fn-liste li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    align-items: baseline;
}
.anmerkungen .fn-nr {
    text-decoration: none;
    font-weight: 600;
}
.anmerkungen .fn-nr:hover {
    text-decoration: underline;
}
.anmerkungen .fn-nr:focus-visible,
sup.fn a:focus-visible {
    outline: 2px solid #212529;
    outline-offset: 2px;
}

/* Lupe über dem ER-Diagramm */
.lupe-rahmen {
    position: relative;
    max-width: 1100px;
}
.lupe-aktiv img {
    cursor: zoom-in;
}
.lupe {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    border: 2px solid #333;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.12s ease;
    z-index: 2;
}
.lupe.sichtbar {
    opacity: 1;
}
.lupe-hinweis {
    display: none;
}
@media (hover: hover) and (pointer: fine) {
    .lupe-hinweis {
        display: inline;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lupe {
        transition: none;
    }
}
