@font-face {
    font-family: "Thesis";
    font-style: normal;
    font-weight: 350;
    font-display: swap;

    src:
        url("TheSansC5s-4_SemiLight.woff2")
        format("woff2");
}


@font-face {
    font-family: "Thesis";
    font-style: normal;
    font-weight: 600;
    font-display: swap;

    src:
        url("TheSansC5s-6_SemiBold.woff2")
        format("woff2");
}


@font-face {
    font-family: "OpenSans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;

    src:
        url("../../themes/fonts/OpenSans.woff2")
        format("woff2"),
        url("../../themes/fonts/OpenSans.woff")
        format("woff");
}


:root {
    --bg: #eef3f7;
    --surface: #ffffff;
    --surface-soft: #f5f8fa;

    --line: #d8e1e8;

    --text: #111820;
    --text-soft: #30404d;
    --muted: #61707e;

    --blue: #1484c6;
    --blue-dark: #09699f;
    --blue-soft: #e7f3fa;

    --green: #157548;
    --amber: #a66a00;
    --red: #973d3d;

    --header-bg: #ffffff;

    --shadow:
        0 4px 15px
        rgba(15, 35, 55, 0.09);

    --radius: 3px;

    --news-font-family:
        "Thesis",
        "TheSans",
        "The Sans",
        "OpenSans",
        Helvetica,
        Arial,
        sans-serif;
}


html[data-theme="dark"] {
    --bg: #111820;
    --surface: #19232c;
    --surface-soft: #202c36;

    --line: #34424d;

    --text: #edf4f8;
    --text-soft: #c4d0d8;
    --muted: #9cabb6;

    --blue: #54b4ee;
    --blue-dark: #76c7f5;
    --blue-soft: #163c54;

    --header-bg: #151f27;

    --shadow:
        0 4px 18px
        rgba(0, 0, 0, 0.3);
}


@media (
    prefers-color-scheme: dark
) {

    html[data-theme="system"] {
        --bg: #111820;
        --surface: #19232c;
        --surface-soft: #202c36;

        --line: #34424d;

        --text: #edf4f8;
        --text-soft: #c4d0d8;
        --muted: #9cabb6;

        --blue: #54b4ee;
        --blue-dark: #76c7f5;
        --blue-soft: #163c54;

        --header-bg: #151f27;

        --shadow:
            0 4px 18px
            rgba(0, 0, 0, 0.3);
    }

}


* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;
}


body {
    background: var(--bg);
    color: var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    line-height: 1.45;
}


a {
    color: inherit;
    text-decoration: none;
}


/*
 * ============================================================
 * Header
 * ============================================================
 */

.site-header {
    background: var(--header-bg);

    border-bottom:
        1px solid
        var(--line);
}


.site-header-inner {
    width:
        min(
            calc(100% - 36px),
            1360px
        );

    margin: 0 auto;

    padding:
        20px 0 14px;
}


.brand-row {
    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap: 20px;

    flex-wrap: wrap;
}


.brand-title {
    margin: 0;
    line-height: 0;
}


.brand-home {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    color: #262626;

    text-decoration: none;
}


.brand-icon {
    display: block;

    width: 56px;
    height: 56px;

    flex: 0 0 auto;
}


.brand-wordmark {
    display: inline-flex;

    align-items: baseline;

    font-family: var(--news-font-family);
    font-size: 43px;
    font-weight: 350;
    line-height: 1;
    letter-spacing: -0.8px;

    white-space: nowrap;
}


.brand-wordmark-strong {
    font-weight: 600;
}


html[data-theme="dark"]
.brand-home {
    color: var(--text);
}


@media (
    prefers-color-scheme: dark
) {

    html[data-theme="system"]
    .brand-home {
        color: var(--text);
    }

}


.brand-subtitle {
    margin:
        5px 0 0;

    color: var(--muted);

    font-size: 14px;
}


.header-actions {
    display: flex;

    align-items: center;

    gap: 10px;

    flex-wrap: wrap;
}


.settings-link,
.header-link {
    padding:
        9px 13px;

    border:
        1px solid
        var(--line);

    border-radius:
        3px;

    background:
        var(--surface);

    color:
        var(--muted);

    font-size: 13px;

    font-weight: 700;
}


.settings-link:hover,
.header-link:hover {
    color: var(--blue);

    border-color:
        var(--blue);
}


/*
 * ============================================================
 * Score-Umschaltung
 * ============================================================
 */

.score-switch {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;
}


.score-switch a {
    padding:
        9px 13px;

    border:
        1px solid
        var(--line);

    border-radius:
        3px;

    color:
        var(--muted);

    background:
        var(--surface);

    font-size: 13px;

    font-weight: 700;
}


.score-switch a.active {
    border-color:
        var(--blue);

    background:
        var(--blue-soft);

    color:
        var(--blue-dark);
}


/*
 * ============================================================
 * Sparten
 * ============================================================
 */

.section-tabs {
    display: flex;

    gap: 4px;

    margin-top: 18px;

    overflow-x: auto;

    border-bottom:
        2px solid
        var(--line);
}


.section-tab {
    display: flex;

    align-items: center;

    gap: 7px;

    min-height: 44px;

    padding:
        0 14px;

    color:
        var(--muted);

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;

    border-bottom:
        4px solid
        transparent;
}


.section-tab:hover {
    color: var(--blue);
}


.section-tab.active {
    color: var(--blue-dark);

    border-bottom-color:
        var(--blue);
}


.section-count {
    min-width: 23px;

    padding:
        2px 6px;

    border-radius:
        20px;

    background:
        var(--blue-soft);

    color:
        var(--blue-dark);

    text-align:
        center;

    font-size: 11px;
}


/*
 * ============================================================
 * Hauptbereich
 * ============================================================
 */

.page {
    width:
        min(
            calc(100% - 36px),
            1360px
        );

    margin: 0 auto;

    padding:
        25px 0 50px;
}


.page-heading {
    margin-bottom: 18px;
}


.page-heading h2 {
    margin: 0;

    color: var(--blue);

    font-size: 24px;
}


.page-heading p {
    margin:
        4px 0 0;

    color: var(--muted);

    font-size: 13px;
}


/*
 * ============================================================
 * Grid
 * ============================================================
 */

.cards {
    display: grid;

    gap: 22px;
}


.cards.layout-1 {
    grid-template-columns: 1fr;
}


.cards.layout-2 {
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
}


.cards.layout-3 {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


.cards.layout-auto {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    /*
     * Füllt angebrochene Reihen mit späteren
     * normalen Meldungen auf.
     *
     * Dadurch stehen zwischen zwei großen
     * Meldungen nicht nur 1 oder 2 Kacheln.
     */
    grid-auto-flow: dense;
}


.cards.layout-auto
.card-featured {
    grid-column:
        1 / -1;
}


.card.load-more-hidden {
    display: none;
}


.load-more {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 30px;
}


.load-more-button {
    padding: 11px 18px;

    border: 1px solid var(--blue);
    border-radius: 8px;

    background: var(--blue);

    color: #fff;
    font: inherit;
    font-weight: 700;

    cursor: pointer;
}


.load-more-button:hover,
.load-more-button:focus-visible {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
}


.load-more-status {
    margin: 9px 0 0;

    color: var(--muted);
    font-size: 13px;
}


/*
 * ============================================================
 * Karten
 * ============================================================
 */

.card {
    display: flex;

    flex-direction: column;

    min-width: 0;

    font-family:
        var(--news-font-family);

    font-weight: 350;

    background:
        var(--surface);

    border:
        1px solid
        var(--line);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow);

    overflow: hidden;
}


.card-media {
    display: block;

    height: 210px;

    background:
        var(--surface-soft);

    overflow: hidden;
}


.card-media img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.card-media-placeholder {
    display: flex;

    align-items: center;

    justify-content: center;

    height: 100%;

    background:
        linear-gradient(
            140deg,
            #113958,
            #2589c1
        );

    color:
        rgba(
            255,
            255,
            255,
            0.88
        );

    font-size: 20px;

    font-weight: 700;
}


.card-body {
    display: flex;

    flex-direction: column;

    flex: 1;

    padding: 18px;
}


.card-meta {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 16px;
    font-weight: 350;
    line-height: 20px;
}


.card-source {
    color: var(--blue-dark);

    font-weight: 350;
}


.card-title {
    margin:
        0 0 10px;

    font-size: 24px;
    font-weight: 350;

    line-height: 28px;
}


.card-title a {
    color: var(--blue);
}


.card-title a:hover {
    color: var(--blue-dark);

    text-decoration: underline;

    text-underline-offset: 3px;
}


.card-summary {
    margin: 0;

    color: var(--text-soft);

    font-size: 18px;
    font-weight: 350;

    line-height: 24px;
}


/*
 * ============================================================
 * Featured Cards
 * ============================================================
 */

.card-featured {
    display: grid;

    /*
     * Bild maximal knapp die Hälfte.
     * Der Text erhält bewusst mehr Platz.
     */
    grid-template-columns:
        minmax(0, 46%)
        minmax(0, 54%);

    min-height: 350px;
}


.card-featured
.card-media {
    height: 100%;

    min-height: 350px;

    max-height: 430px;
}


.card-featured
.card-body {
    padding:
        28px 32px;

    /*
     * Verhindert bei längeren Überschriften
     * unnötige Engstellen.
     */
    min-width: 0;
}


.card-featured
.card-title {
    font-size: 28px;

    line-height: 32px;
}


.card-featured
.card-summary {
    font-size: 18px;

    line-height: 24px;
}


/*
 * ============================================================
 * Tags
 * ============================================================
 */

.card-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 10px;
}


.tag {
    padding:
        4px 8px;

    border-radius:
        12px;

    background:
        var(--blue-soft);

    color:
        var(--blue-dark);

    font-size: 11px;

    font-weight: 700;
}


/*
 * ============================================================
 * Score
 * ============================================================
 */

.score-block {
    display: grid;

    grid-template-columns:
        39px 1fr;

    gap: 10px;

    align-items: start;

    margin-top: 12px;

    padding-top: 11px;

    border-top:
        1px solid
        var(--line);
}


.score-badge {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 39px;

    min-height: 28px;

    border-radius:
        3px;

    color: #ffffff;

    font-size: 13px;

    font-weight: 700;
}


.score-relevant
.score-badge {
    background:
        var(--green);
}


.score-maybe
.score-badge {
    background:
        var(--amber);
}


.score-low
.score-badge {
    background:
        var(--red);
}


.score-text {
    margin: 0;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.45;
}


/*
 * ============================================================
 * Footer / Feedback
 * ============================================================
 */

.card-footer {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 12px;

    margin-top: auto;

    padding-top: 18px;
}


.section-pill {
    padding:
        5px 8px;

    border-radius:
        15px;

    background:
        var(--blue-soft);

    color:
        var(--blue-dark);

    font-size: 11px;

    font-weight: 700;
}


.feedback {
    display: flex;

    gap: 7px;
}


.feedback form {
    margin: 0;
}


.feedback button {
    width: 37px;

    height: 34px;

    padding: 0;

    border:
        1px solid
        var(--line);

    border-radius:
        3px;

    background:
        var(--surface);

    color:
        var(--text);

    cursor: pointer;

    font-size: 17px;
}


.feedback button:hover {
    background:
        var(--surface-soft);
}


.feedback button.active-up {
    background:
        #dff3e7;

    border-color:
        #8fc4a4;
}


.feedback button.active-down {
    background:
        #f8e5e5;

    border-color:
        #d6a0a0;
}


.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 30;

    max-width: calc(100% - 32px);
    padding: 10px 14px;

    border-radius: 7px;

    background: var(--text);

    color: var(--surface);
    font-size: 14px;

    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);

    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}


.toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}


/*
 * ============================================================
 * Einstellungen
 * ============================================================
 */

.settings-page {
    width:
        min(
            calc(100% - 36px),
            1360px
        );

    margin:
        30px auto 60px;

    display: grid;

    gap: 24px;
}


.settings-card {
    padding: 28px;

    background:
        var(--surface);

    border:
        1px solid
        var(--line);

    box-shadow:
        var(--shadow);
}


.settings-card h2 {
    margin:
        0 0 6px;

    color: var(--blue);

    font-size: 26px;
}


.settings-description {
    margin:
        0 0 26px;

    color:
        var(--muted);
}


fieldset {
    margin:
        0 0 28px;

    padding:
        0;

    border: 0;
}


legend {
    margin-bottom: 12px;

    font-size: 17px;

    font-weight: 700;
}


.settings-option {
    display: flex;

    align-items:
        flex-start;

    gap: 12px;

    margin-bottom: 10px;

    padding: 14px;

    border:
        1px solid
        var(--line);

    background:
        var(--surface-soft);

    cursor: pointer;
}


.settings-option input {
    margin-top: 4px;
}


.settings-option span {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.settings-option small,
.settings-field small {
    color:
        var(--muted);

    line-height: 1.45;
}


.settings-field {
    display: flex;

    flex-direction: column;

    gap: 7px;

    max-width: 300px;
}


.settings-field input {
    width: 120px;

    padding:
        9px 10px;

    border:
        1px solid
        var(--line);

    background:
        var(--surface);

    color:
        var(--text);

    font: inherit;
}


.primary-button {
    padding:
        11px 17px;

    border: 0;

    border-radius:
        3px;

    background:
        var(--blue);

    color:
        #ffffff;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;
}


.primary-button:hover {
    background:
        var(--blue-dark);
}


.profile-heading {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;
}


.profile-version {
    flex: 0 0 auto;

    padding: 6px 10px;

    border: 1px solid var(--line);

    border-radius: 999px;

    color: var(--muted);

    font-size: 13px;
}


.profile-notice {
    display: grid;

    gap: 8px;

    margin-bottom: 28px;

    padding: 12px 14px;

    border-inline-start: 4px solid var(--blue);

    background: var(--surface-soft);

    color: var(--muted);

    line-height: 1.5;
}


.profile-section {
    margin-bottom: 34px;
}


.profile-help {
    margin: -5px 0 14px;

    color: var(--muted);
}


.profile-list,
.technology-grid {
    display: grid;

    gap: 12px;

    margin-bottom: 12px;
}


.profile-row,
.technology-row {
    display: grid;

    grid-template-columns: minmax(150px, 0.8fr) 110px minmax(260px, 2fr) auto;

    align-items: end;

    gap: 12px;

    padding: 14px;

    border: 1px solid var(--line);

    background: var(--surface-soft);
}


.profile-row-text {
    grid-template-columns: minmax(150px, 0.8fr) minmax(280px, 2fr) auto;
}


.technology-row {
    grid-template-columns: minmax(150px, 0.8fr) 110px minmax(260px, 2fr);

    align-items: end;
}


.technology-row > strong {
    align-self: start;

    padding-top: 24px;
}


.profile-rule-row {
    grid-template-columns: 1fr auto;
}


.profile-field {
    display: grid;

    gap: 6px;

    min-width: 0;
}


.profile-field > span {
    color: var(--muted);

    font-size: 13px;

    font-weight: 600;
}


.profile-field input,
.profile-field textarea {
    width: 100%;

    min-width: 0;

    padding: 9px 10px;

    border: 1px solid var(--line);

    border-radius: 3px;

    background: var(--surface);

    color: var(--text);

    font: inherit;

    box-sizing: border-box;
}


.profile-field textarea {
    resize: vertical;

    line-height: 1.45;
}


.secondary-button,
.remove-row-button {
    padding: 9px 12px;

    border: 1px solid var(--line);

    border-radius: 3px;

    background: var(--surface);

    color: var(--text);

    font: inherit;

    font-size: 13px;

    cursor: pointer;
}


.secondary-button:hover {
    border-color: var(--blue);

    color: var(--blue);
}


.remove-row-button:hover {
    border-color: #c96565;

    color: #a33b3b;
}


.profile-advanced {
    margin-bottom: 30px;

    padding: 16px;

    border: 1px solid var(--line);

    background: var(--surface-soft);
}


.profile-advanced > summary {
    color: var(--blue);

    font-weight: 700;

    cursor: pointer;
}


.profile-advanced[open] > summary {
    margin-bottom: 26px;
}


.profile-advanced .profile-row,
.profile-advanced .technology-row {
    background: var(--surface);
}


.profile-actions {
    display: grid;

    align-items: end;

    gap: 16px;
}


.profile-actions small {
    color: var(--muted);
}


.profile-actions > .primary-button {
    justify-self: start;
}


.reevaluation-action {
    display: flex;

    align-items: end;

    gap: 10px;

    padding: 14px;

    border: 1px solid var(--line);

    background: var(--surface-soft);
}


.reevaluation-action label {
    display: grid;

    gap: 6px;
}


.reevaluation-action label > span {
    color: var(--muted);

    font-size: 13px;

    font-weight: 600;
}


.reevaluation-action select {
    min-width: 180px;

    padding: 9px 10px;

    border: 1px solid var(--line);

    border-radius: 3px;

    background: var(--surface);

    color: var(--text);

    font: inherit;
}


.reevaluation-button {
    border-color: var(--blue);

    color: var(--blue);
}


.message {
    margin-bottom: 22px;

    padding: 12px 14px;

    border-radius: 3px;
}


.message.success {
    background:
        #e2f3e9;

    color:
        #235e3b;
}


.message.error {
    background:
        #f8e5e5;

    color:
        #7b2d2d;
}


/*
 * ============================================================
 * Responsive
 * ============================================================
 */

@media (
    max-width: 980px
) {

    .cards.layout-3,
    .cards.layout-auto {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .card-featured {
        grid-template-columns:
            1fr;
    }


    .card-featured
    .card-media {
        min-height: 330px;
    }

}


@media (
    max-width: 650px
) {

    .site-header-inner,
    .page,
    .settings-page {
        width:
            calc(
                100%
                - 22px
            );
    }


    .brand-home {
        gap: 8px;
    }


    .brand-icon {
        width: 46px;
        height: 46px;
    }


    .brand-wordmark {
        font-size: 35px;
        letter-spacing: -0.6px;
    }


    .cards,
    .cards.layout-1,
    .cards.layout-2,
    .cards.layout-3,
    .cards.layout-auto {
        grid-template-columns:
            1fr;
    }


    .card,
    .card-featured {
        display: block;
    }


    .card-media,
    .card-featured
    .card-media {
        height: 230px;

        min-height: 0;
    }


    .card-body,
    .card-featured
    .card-body {
        padding: 15px;
    }


    .card-title,
    .card-featured
    .card-title {
        font-size: 24px;

        line-height: 28px;
    }


    .card-summary,
    .card-featured
    .card-summary {
        font-size: 18px;

        line-height: 24px;
    }


    .settings-card {
        padding: 20px;
    }


    .profile-heading,
    .profile-actions {
        align-items: stretch;

        flex-direction: column;
    }


    .reevaluation-action {
        align-items: stretch;

        flex-direction: column;
    }


    .profile-version {
        align-self: flex-start;
    }


    .profile-row,
    .profile-row-text,
    .profile-rule-row,
    .technology-row {
        grid-template-columns: 1fr;
    }


    .technology-row > strong {
        padding-top: 0;
    }

}

/*
 * ============================================================
 * News-Cluster / weitere Quellen
 * ============================================================
 */

.cluster-source-count {
    font-weight: 600;
}

.cluster-more {
    margin-top: 15px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cluster-more summary {
    padding: 11px 0;

    cursor: pointer;

    font-size: 0.9rem;
    font-weight: 650;

    color: var(--blue);

    list-style-position: inside;
}

.cluster-more summary:hover {
    text-decoration: underline;
}

.cluster-more-list {
    padding-bottom: 12px;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cluster-source-item {
    display: block;

    padding: 9px 11px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--surface);

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        transform 0.15s ease;
}

.cluster-source-item:hover {
    border-color: var(--blue);

    transform: translateY(-1px);
}

.cluster-source-meta {
    display: block;

    margin-bottom: 3px;

    font-size: 0.76rem;
    line-height: 1.35;

    color: var(--muted);
}

.cluster-source-title {
    display: block;

    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;

    color: var(--text);
}


/*
 * ============================================================
 * Zum Seitenanfang
 * ============================================================
 */

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 20;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--surface);
    box-shadow: 0 5px 18px rgb(0 0 0 / 18%);

    color: var(--blue);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;

    transition:
        border-color 0.15s ease,
        transform 0.15s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    border-color: var(--blue);
    transform: translateY(-2px);
}

@media (
    max-width: 650px
) {

    .back-to-top {
        right: 12px;
        bottom: 12px;
    }

}
