/* eigenheim-portal24.com
   Variante A laut notes/01-variationsregeln.md: BEM ohne Praefix,
   englische Blocknamen, reiner System-Sans-Stack, weisser Grund. */

:root {
    --grund: #ffffff;
    --flaeche: #f2f5f1;
    --tinte: #1f2422;
    --tinte-matt: #5a615d;
    --gruen: #2c5f2d;
    --gruen-hell: #4a8a4b;
    --holz: #8b4513;
    --kante: #dfe4dd;
    --satz: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell,
        "Noto Sans", sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--grund);
    color: var(--tinte);
    font: 17px/1.62 var(--satz);
    margin: 0;
    hyphens: auto;
}

.scroller td, .scroller th { overflow-wrap: anywhere; }

img {
    height: auto;
    max-width: 100%;
}

h1,
h2,
h3 {
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.22;
}

/* Links sind ohne Hover erkennbar: Fliesstext gruen und unterstrichen,
   Titel gruen, Navigation und Listen mit eigener Kennzeichnung. */
a {
    color: var(--gruen);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--holz);
}

:focus-visible {
    outline: 2px solid var(--holz);
    outline-offset: 2px;
}

[id] {
    scroll-margin-top: 16px;
}

.site__inner {
    margin: 0 auto;
    max-width: 1140px;
    padding: 0 24px;
}

/* Kopf: eine Zeile, Logo links, Menue rechts */
.site__header {
    border-bottom: 3px solid var(--gruen);
}

.site__header .site__inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    padding-block: 18px;
}

.site__brand {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
}

.site__brand img {
    display: block;
    width: 216px;
}

.nav {
    margin-left: auto;
}

.nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: var(--gruen);
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    padding-block: 6px;
    text-decoration: none;
}

.nav__link:hover {
    color: var(--holz);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Grundraster der Inhaltsseiten: eine zentrierte Spalte, keine Randspalte */
.main {
    padding-block: 34px 64px;
}

.main--narrow .site__inner {
    max-width: 800px;
}

.crumbs {
    color: var(--tinte-matt);
    font-size: 14px;
    margin: 0 0 16px;
}

.crumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.crumbs__item:not(:last-child)::after {
    color: var(--kante);
    content: "/";
    margin-left: 6px;
}

/* Beitrag */
.post__title {
    font-size: 36px;
    margin: 0 0 16px;
}

.post__meta {
    align-items: center;
    border-bottom: 1px solid var(--kante);
    color: var(--tinte-matt);
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 4px 14px;
    margin: 0 0 28px;
    padding-bottom: 16px;
}

.post__author {
    color: var(--tinte);
    font-weight: 600;
}

.post__lead {
    font-size: 19px;
    line-height: 1.58;
    margin: 0 0 28px;
}

.post__figure {
    margin: 0 0 32px;
}

.post__figure img {
    border-radius: 4px;
    display: block;
    width: 100%;
}

.post__body h2 {
    font-size: 25px;
    margin: 44px 0 14px;
}

.post__body h3 {
    font-size: 19px;
    margin: 30px 0 10px;
}

.post__body p {
    margin: 0 0 17px;
}

.post__body ul,
.post__body ol {
    margin: 0 0 20px;
    padding-left: 20px;
}

.post__body li {
    margin-bottom: 8px;
}

.post__body li::marker {
    color: var(--gruen-hell);
}

.post__body figure {
    margin: 30px 0;
}

.post__body blockquote {
    background: var(--flaeche);
    border-left: 4px solid var(--holz);
    margin: 26px 0;
    padding: 14px 18px;
}

.post__body blockquote p:last-child {
    margin-bottom: 0;
}

/* Rechenbeispiel, Erkennungsmerkmal dieser Domain */
.example {
    background: var(--flaeche);
    border-radius: 4px;
    margin: 28px 0;
    padding: 18px 20px;
}

.example__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 10px;
    text-transform: uppercase;
    color: var(--holz);
}

.example p:last-child {
    margin-bottom: 0;
}

/* Tabellen rollen, die Seite nie */
.scroller {
    -webkit-overflow-scrolling: touch;
    margin: 0 0 24px;
    overflow-x: auto;
}

.post__body table {
    border-collapse: collapse;
    font-size: 16px;
    width: 100%;
}

.post__body th,
.post__body td {
    border-bottom: 1px solid var(--kante);
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}

.post__body thead th {
    background: var(--flaeche);
    border-bottom-color: var(--gruen-hell);
}

/* Gliederung als Block unter dem Lead, keine Randspalte */
.toc {
    border: 1px solid var(--kante);
    border-radius: 4px;
    margin: 0 0 34px;
    padding: 18px 20px;
}

.toc__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 12px;
    text-transform: uppercase;
    color: var(--tinte-matt);
}

.toc__list {
    columns: 2;
    column-gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc__item {
    break-inside: avoid;
    margin-bottom: 8px;
}

.toc__link {
    font-size: 15px;
    text-decoration-color: var(--kante);
    text-underline-offset: 3px;
}

.toc__link:hover,
.toc__link[aria-current="location"] {
    text-decoration-color: currentColor;
}

.toc__link[aria-current="location"] {
    font-weight: 650;
}

/* Kartenraster fuer Start- und Rubrikseiten */
.lede {
    border-bottom: 1px solid var(--kante);
    margin: 0 0 40px;
    max-width: 62ch;
    padding-bottom: 28px;
}

.lede__title {
    font-size: 38px;
    margin: 0 0 16px;
}

.lede p {
    font-size: 19px;
    line-height: 1.58;
    margin: 0 0 12px;
}

.lede__note {
    color: var(--tinte-matt);
    font-size: 15px !important;
    margin-bottom: 0 !important;
}

.section {
    margin-bottom: 52px;
}

.section__head {
    align-items: baseline;
    border-bottom: 2px solid var(--gruen);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.section__title {
    font-size: 20px;
    margin: 0;
}

.section__count {
    color: var(--tinte-matt);
    font-size: 14px;
    margin-left: auto;
}

.section__intro {
    color: var(--tinte-matt);
    margin: 0 0 26px;
    max-width: 68ch;
}

.grid {
    display: grid;
    gap: 30px 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card__media {
    display: block;
    line-height: 0;
    margin-bottom: 12px;
}

.card__media img {
    aspect-ratio: 3 / 2;
    border-radius: 4px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.card__meta {
    color: var(--tinte-matt);
    font-size: 13px;
    margin: 0 0 6px;
}

.card__title {
    font-size: 18px;
    margin: 0 0 8px;
}

.card__title a {
    text-decoration: none;
}

.card__title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.card__excerpt {
    color: var(--tinte-matt);
    font-size: 15px;
    margin: 0 0 10px;
}

.card__points {
    border-top: 1px solid var(--kante);
    font-size: 14px;
    list-style: none;
    margin: auto 0 0;
    padding: 10px 0 0;
}

.card__points li {
    margin-bottom: 5px;
    padding-left: 14px;
    position: relative;
}

.card__points li::before {
    background: var(--gruen-hell);
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    top: 0.62em;
    width: 5px;
}

.section__more {
    margin: 22px 0 0;
}

.section__more a {
    font-size: 15px;
    font-weight: 600;
    text-decoration-color: var(--kante);
    text-underline-offset: 4px;
}

.section__more a:hover {
    text-decoration-color: currentColor;
}

/* Redaktionsteil */
.team {
    background: var(--flaeche);
    border-radius: 4px;
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 28px 30px;
}

.team__name {
    font-size: 17px;
    font-weight: 650;
    margin: 0 0 4px;
}

.team__role {
    color: var(--holz);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.team__text {
    font-size: 15px;
    margin: 0;
}

/* Fuss */
.site__footer {
    background: var(--flaeche);
    border-top: 1px solid var(--kante);
    color: var(--tinte-matt);
    font-size: 14px;
    margin-top: 20px;
    padding-block: 32px;
}

.site__footer .site__inner {
    display: grid;
    gap: 24px 40px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.site__footer p {
    margin: 0 0 6px;
}

.footer__title {
    color: var(--tinte);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__list li {
    margin-bottom: 6px;
}

.footer__list a {
    color: var(--tinte-matt);
    text-decoration-color: var(--kante);
    text-underline-offset: 3px;
}

.footer__list a:hover {
    color: var(--gruen);
    text-decoration-color: currentColor;
}

@media (max-width: 960px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .site__inner {
        padding: 0 18px;
    }

    .site__header .site__inner {
        gap: 10px 20px;
        padding-block: 14px;
    }

    .site__brand img {
        width: 178px;
    }

    .nav {
        flex-basis: 100%;
        margin-left: 0;
    }

    .nav__list {
        gap: 4px 18px;
    }

    .post__title {
        font-size: 28px;
    }

    .lede__title {
        font-size: 29px;
    }

    .lede p {
        font-size: 17px;
    }

    .post__lead {
        font-size: 17px;
    }

    .post__body h2 {
        font-size: 22px;
        margin-top: 36px;
    }

    .toc__list {
        columns: 1;
    }

    .team {
        grid-template-columns: minmax(0, 1fr);
        padding: 22px 20px;
    }
}

@media (max-width: 560px) {
    .grid {
        gap: 26px;
        grid-template-columns: minmax(0, 1fr);
    }

    .card__media img {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 420px) {
    .site__inner {
        padding: 0 16px;
    }

    .post__title {
        font-size: 25px;
    }

    .lede__title {
        font-size: 26px;
    }

    .post__body h2 {
        font-size: 20px;
    }

    .main {
        padding-block: 24px 42px;
    }
}

@media (hover: none) {
    .toc__link,
    .footer__list a {
        display: inline-block;
        padding-block: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
