@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: italic;
    font-weight: 400;
    src: url('../fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 800;
    src: url('../fonts/AtkinsonHyperlegibleNext-ExtraBold.woff2') format('woff2');
}

:root {
    --websiteBG: rgb(223, 241, 238);
    --surface: rgb(255, 255, 255);
    --link: rgb(29, 81, 88);
    --hover: 2px solid rgb(29, 81, 88);
    --focus: 2px solid rgb(29, 81, 88);
    --text: rgb(16, 22, 33);
    --h1: rgb(16, 22, 33);
    --h2: rgb(42, 42, 42);
    --h2Emphasized: rgb(44, 79, 129);
    --h3: rgb(16, 22, 33);
    --h4: rgb(54, 97, 159);
    --h5: rgb(54, 97, 159);
    --h6: rgb(16, 22, 33);
    --list: rgb(7, 141, 143);
    --accent: rgb(58, 170, 171);
    --accent2: rgb(241, 193, 83);
    /* Rotton passend zu --link; Kontrast 7,1:1 auf Weiß, 6,1:1 auf --websiteBG */
    --negative: rgb(166, 38, 57);
    /* Gedämpfte Textfarbe für Fußnoten; Kontrast 7,2:1 auf Weiß, 6,1:1 auf --websiteBG */
    --muted: rgb(74, 90, 100);

    --font-text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: var(--font-text);
    --content-width: 46rem;
    --radius: 0.75rem;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--websiteBG);
    color: var(--text);
    font-family: var(--font-text);
    font-size: 1.125rem;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    min-height: 100vh;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin: 2rem 0 0.75rem;
    overflow-wrap: break-word;
}

h1 {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--h1);
    font-size: clamp(1.75rem, 1.5rem + 1vw, 2rem);
    letter-spacing: 0.01em;
    margin-top: 0;
}

h2 {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--h2);
    font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem);
    letter-spacing: 0.01em;
}

h2::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 0.3rem;
    margin-top: 0.5rem;
    border-radius: 0.2rem;
    background: linear-gradient(90deg, var(--accent) 0 60%, var(--accent2) 60% 100%);
}

h3 { color: var(--h3); font-size: 1.35rem; font-weight: 600; }
h4 { color: var(--h4); font-size: 1.2rem; font-weight: 600; }
h5 { color: var(--h5); font-size: 1.1rem; font-weight: 600; }
h6 { color: var(--h6); font-size: 1rem; font-weight: 600; }

/* Überschrift in Größe des umgebenden Fließtexts (bleibt semantisch eine Überschrift) */
h1.heading-text-size,
h2.heading-text-size,
h3.heading-text-size,
h4.heading-text-size,
h5.heading-text-size,
h6.heading-text-size {
    font-size: inherit;
    line-height: inherit;
}

/* Kleingedrucktes im Artikel, optisch wie eine Fußnote */
.content small {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--muted);
}

.emphasized {
    color: var(--h2Emphasized);
}

p, ul, ol {
    margin: 0 0 1rem;
}

ul {
    padding-left: 1.4rem;
}

li + li {
    margin-top: 0.5rem;
}

li::marker {
    color: var(--link);
}

strong {
    font-weight: 600;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
    outline: var(--hover);
    outline-offset: 2px;
    border-radius: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
    box-shadow: 0 0 0 5px var(--surface);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: calc(var(--content-width) + 3rem);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.lang-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: 0.4rem;
    border: 2px solid transparent;
}

.lang-switch a:hover {
    outline: none;
    border: var(--hover);
    text-decoration-thickness: 2px;
}

/* Header: Sprachwechsel, rechts daneben die Primärnavigation */
.site-header {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

/* Logo links im Header, schiebt Sprachwechsel und Menü nach rechts */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-right: auto;
    color: var(--text);
}

/* Nur das Logo ist verlinkt (auf Unterseiten) */
.site-logo__link {
    display: inline-flex;
    border-radius: 0.4rem;
    border: 2px solid transparent;
}

.site-logo__link:hover {
    outline: none;
    border: var(--hover);
}

.site-logo__name {
    font-weight: 800;
    font-size: 1.45rem;
    line-height: 1.2;
}

.site-logo__img {
    width: auto;
    height: 3.25rem;
}

.primary-nav {
    position: relative;
}

.primary-nav__toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.4rem 0.9rem 0.4rem 0.7rem;
    font: inherit;
    font-weight: 600;
    color: var(--link);
    background: var(--surface);
    border: 2px solid var(--link);
    border-radius: 0.4rem;
    cursor: pointer;
}

.js .primary-nav__toggle {
    display: inline-flex;
}

.primary-nav__toggle:hover {
    background: var(--websiteBG);
}

.primary-nav__icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.primary-nav__icon-close,
.primary-nav__toggle[aria-expanded="true"] .primary-nav__icon-open {
    display: none;
}

.primary-nav__toggle[aria-expanded="true"] .primary-nav__icon-close {
    display: inline;
}

/* Ohne JavaScript: Links als einfache Zeile */
.primary-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    list-style: none;
    margin: 0 0 0 -0.75rem;
    padding: 0;
}

.primary-nav__list li + li {
    margin-top: 0;
}

/* Mit JavaScript: aufklappbares Panel unter dem Button */
.js .primary-nav__list {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 10;
    flex-direction: column;
    min-width: 14rem;
    margin: 0;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 0.5rem 1.5rem rgba(16, 22, 33, 0.18);
}

.js .primary-nav__toggle[aria-expanded="false"] + .primary-nav__list {
    display: none;
}

.primary-nav__list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: 0.4rem;
    border: 2px solid transparent;
    text-decoration: none;
}

.primary-nav__list a:hover {
    outline: none;
    border: var(--hover);
}

.primary-nav__list a[aria-current="page"] {
    background: var(--websiteBG);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    list-style: none;
    margin: 0 0 0 -0.75rem;
    padding: 0;
}

.footer-nav li + li {
    margin-top: 0;
}

.footer-nav a {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    min-height: 44px;
    line-height: 1.65;
    font-weight: 600;
    border-radius: 0.4rem;
    border: 2px solid transparent;
}

.footer-nav a:hover {
    outline: none;
    border: var(--hover);
}

.footer-nav a[aria-current="page"] {
    background: var(--websiteBG);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
}

main {
    flex: 1 0 auto;
    padding: 2rem 0 3rem;
}

section, .content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.75rem;
}

section > h2:first-child,
.content > h2:first-child {
    margin-top: 0;
}

@media (min-width: 40em) {
    section, .content {
        padding: 2.25rem 2.5rem;
    }
}

.intro {
    display: grid;
    gap: 1.75rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.intro__logo {
    width: min(15rem, 70%);
    height: auto;
}

/* Startseiten-Intro: Name und Tagline oben, darunter Foto links neben dem Text (Desktop) */
.intro--home {
    gap: 0 2.5rem;
}

.intro--home h1,
.intro--home .intro__tagline {
    grid-column: 1 / -1;
}

.intro--home .intro__title {
    margin-bottom: 1.5rem;
}

.intro--home .intro__portrait {
    margin-bottom: 1.25rem;
}

@media (min-width: 44em) {
    .intro--home {
        align-items: center;
    }

    .intro--home .intro__portrait {
        margin-bottom: 0;
    }
}

/* Rundes Porträtfoto mit Ring in der Primärfarbe */
.intro__portrait {
    display: block;
    width: min(15rem, 70%);
}

.intro__portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 0.3rem solid var(--link);
    padding: 0.3rem;
    background: var(--surface);
}

.intro__lead {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.intro__tagline {
    font-weight: 600;
    color: var(--h2Emphasized);
    margin: -0.25rem 0 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
    letter-spacing: normal;
}

.intro__tagline::after {
    content: none;
}

@media (min-width: 44em) {
    .intro {
        grid-template-columns: 15rem 1fr;
        gap: 1rem 2.5rem;
    }

    .intro__logo,
    .intro__portrait {
        width: 100%;
    }
}

.topics {
    list-style: none;
    margin: 0 0 0.5em 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr));
    gap: 0.75rem;
}

@media (min-width: 48em) {
    .topics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.topics li + li {
    margin-top: 0;
}

.topic {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    min-width: 0;
    padding: 1.1rem 0.75rem;
    text-align: center;
    background: var(--websiteBG);
    border-radius: var(--radius);
}

.topic__icon {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    box-sizing: content-box;
    border-radius: 50%;
    background: var(--surface);
    color: var(--link);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic__label {
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    overflow-wrap: break-word;
    hyphens: auto;
}

.topic abbr[title] {
    text-decoration: none;
}

.contact-grid {
    display: grid;
    gap: 0 2rem;
}

.contact-grid h3 {
    margin-top: 1.25rem;
}

@media (min-width: 44em) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.talks {
    list-style: none;
    padding: 0;
}

.talks li {
    position: relative;
    padding: 0.75rem 0 0.75rem 1.5rem;
    margin: 0;
}

.talks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.35rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--accent);
}

.note {
    border-left: 5px solid var(--accent2);
    background: rgb(253, 246, 228);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1.5rem;
}

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

/* Listen mit Daumen-hoch/-runter-Symbol (dekorativ, Bedeutung steht in der Überschrift) */
.icon-list {
    list-style: none;
    padding-left: 0;
}

.icon-list li {
    position: relative;
    padding-left: 2rem;
}

.icon-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 1.3rem;
    height: 1.3rem;
    background-color: var(--link);
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

.icon-list--good li::before {
    -webkit-mask-image: url("../images/icons/thumbs-up.svg");
    mask-image: url("../images/icons/thumbs-up.svg");
}

.icon-list--bad li::before {
    -webkit-mask-image: url("../images/icons/thumbs-down.svg");
    mask-image: url("../images/icons/thumbs-down.svg");
}

.icon-list--bad li::before {
    background-color: var(--negative);
}

.icon-list--article li::before {
    -webkit-mask-image: url("../images/icons/file-text.svg");
    mask-image: url("../images/icons/file-text.svg");
}

/* Bewertungs-Hinweise (Kontrast: --link 8,9:1, --negative 7,1:1 auf Weiß) */
.verdict-good {
    color: var(--link);
}

.verdict-bad {
    color: var(--negative);
}

/* Tabellen: horizontal scrollbar auf schmalen Bildschirmen */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgb(184, 206, 203);
    border-radius: var(--radius);
}

.table-wrapper:focus-visible {
    outline: var(--focus);
    outline-offset: 3px;
}

/* Scroll-Buttons über scrollbaren Tabellen (werden per JS nur bei Bedarf eingeblendet) */
.table-scroll__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 -0.75rem;
}

.table-scroll__controls[hidden] {
    display: none;
}

.table-scroll__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--link);
    background: var(--surface);
    border: 2px solid var(--link);
    border-radius: 0.4rem;
    cursor: pointer;
}

.table-scroll__btn:hover {
    background: var(--websiteBG);
}

.table-scroll__btn[aria-disabled="true"] {
    color: rgb(98, 112, 120);
    border-color: rgb(98, 112, 120);
    border-style: dashed;
    background: var(--surface);
    cursor: not-allowed;
}

.table-scroll__icon {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    line-height: 1.5;
}

.table-wrapper table {
    min-width: 32rem;
}

caption {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 800;
    font-size: 1.1rem;
    background: var(--websiteBG);
}

th,
td {
    padding: 0.7rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgb(184, 206, 203);
}

thead th {
    background: var(--link);
    color: var(--surface);
    font-weight: 800;
}

tbody th {
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background: rgb(244, 250, 249);
}

tbody tr:last-child th,
tbody tr:last-child td {
    border-bottom: 0;
}

td ul {
    margin: 0;
    padding-left: 1.1rem;
}

td li + li {
    margin-top: 0.35rem;
}

th code,
td code {
    white-space: nowrap;
}

.archive-list li {
    margin-top: 0.75rem;
}

.plain-list {
    list-style: none;
    padding: 0;
}

.plain-list li {
    margin-top: 0.75rem;
}

.small {
    font-size: 1rem;
}

.site-footer {
    background: var(--surface);
    border-top: 4px solid var(--accent);
    padding: 1.5rem 0;
    font-size: 1rem;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-footer__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--websiteBG);
}

.site-footer p {
    margin: 0;
}

@media (forced-colors: active) {
    .topic {
        border: 1px solid CanvasText;
    }

    .topic__icon {
        color: CanvasText;
        background: Canvas;
    }

    h2::after,
    .talks li::before {
        background: CanvasText;
    }

    .footer-nav a[aria-current="page"],
    .primary-nav__list a[aria-current="page"] {
        border: 2px solid LinkText;
    }

    .js .primary-nav__list {
        border: 1px solid CanvasText;
    }

    .table-wrapper,
    th,
    td {
        border-color: CanvasText;
    }

    thead th {
        border-bottom: 2px solid CanvasText;
    }

    .table-scroll__btn {
        border-color: ButtonText;
    }

    .table-scroll__btn[aria-disabled="true"] {
        color: GrayText;
        border-color: GrayText;
    }

    .icon-list li::before,
    .icon-list--bad li::before {
        forced-color-adjust: none;
        background-color: CanvasText;
    }

    section, .content {
        border-color: transparent;
    }
}

@media print {
    body {
        background: #fff;
    }

    .lang-bar,
    .footer-nav {
        display: none;
    }

    section, .content {
        padding: 0;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
    }
}
