@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

body {
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;
}

#page {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
}

/* Zeile: Navigation + Content + Portrait */
#row {
    display: flex;
    align-items: stretch;
    gap: 5px;
}
/* --- Layout-Breiten: Nav | Content | Portrait --- */
#nav {
    flex: 0 0 220px;
}

#content {
    flex: 1 1 auto;
    box-sizing: border-box;
    min-width: 0;

    padding: 18px 20px; /* Luft zum Lesen */
    font-size: 15px; /* kleiner als Standard, sehr gut lesbar */
    line-height: 1.6; /* ruhig, nicht gedrängt */
    color: #222;
}

#content h1 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 14px;
    font-weight: 600;
}

#content h2 {
    font-size: 18px;
    margin-top: 26px;
    margin-bottom: 10px;
    font-weight: 600;
}

#content p {
    margin: 0 0 12px 0;
}

#content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
}

/* Fallback, falls flex-gap nicht unterstützt wird */
@supports not (gap: 5px) {
    #row > * {
        margin-right: 5px;
    }
    #row > *:last-child {
        margin-right: 0;
    }
}

/* Nav kann #toc heißen (toc.css) oder #nav – wir unterstützen beides */
#toc,
#nav,
#content {
    background-color: #eee;
}

/* Nav-Box */
#toc,
#nav {
    box-sizing: border-box;
    padding: 5px;
}

/* Standard-Margins in der Nav entschärfen (typischer 15px-Versatz) */
#toc ul,
#toc ol,
#nav ul,
#nav ol {
    margin-top: 0;
}

#page-footer {
    margin: 7px auto 0 auto;
    padding: 8px 12px;

    max-width: 1200px;
    background: #fff;

    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

/* Portrait: Breite dynamisch (über aspect-ratio im Layout), Bild vollständig sichtbar */
#portrait {
    flex: 0 0 auto;
    background: #eee;
    display: flex;
}

#portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================================================
   RESPONSIVE ERGÄNZUNGEN
   ========================================================= */

/* Tablets */
@media (max-width: 1023px) {
    #nav {
        flex: 0 0 180px;
    }
    #content {
        padding: 16px;
        font-size: 15px;
    }
}

/* Smartphones */
@media (max-width: 767px) {
    /* Layout stapeln */
    #row {
        flex-direction: column;
    }

    /* Navigation oben, volle Breite */
    #nav {
        flex: 0 0 auto;
        width: 100%;
        padding: 10px;
    }

    /* Content darunter */
    #content {
        padding: 14px 14px;
        font-size: 16px;
        line-height: 1.7;
    }

    /* Page nicht künstlich einengen */
    #page {
        max-width: 100%;
        margin: 0;
    }

    /* Footer luftiger */
    #page-footer {
        font-size: 14px;
        padding: 10px 14px;
    }
}

#page-footer a {
    color: inherit;
    text-decoration: none;
    /* cursor: default; */
}