/*
 * Streamcatcher: based on the original design (light grey canvas, white panels,
 * purple accent, small uppercase labels, purple ring button, grey footer),
 * refreshed with hairlines, calmer type and more whitespace.
 */

/*
 * Fonts (self-hosted, SIL Open Font License, see assets/fonts/OFL-*.txt):
 * Exo 2 as free stand-in for the original headline font (Neo Sans style),
 * Open Sans for body text like the original.
 */
@font-face {
    font-family: "Exo 2";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/exo2-latin-OOo8B1Z.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Exo 2";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/exo2-latin-ext-0jHLFxt.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/opensans-latin-30nvAOJ.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/opensans-latin-ext-5HI45_X.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --purple: #7a2f88;
    --purple-dark: #5e2370;
    --purple-ink: #642873;
    --purple-tint: #f3ecf6;
    --canvas: #f5f4f6;
    --surface: #ffffff;
    --footer: #ebe9ed;
    --text: #1f1a24;
    --muted: #6d6574;
    --faint: #9a93a0;
    --line: #e7e3ea;
    --warn: #8a5300;

    --radius: 12px;
    --radius-sm: 8px;
    --wrap: 1120px;

    --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: "Exo 2", "Open Sans", system-ui, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    /* Anchors (#angebote, …) must not end up behind the sticky header */
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    color: var(--purple);
}

h1, h2, h3, p, dl, dd, ol {
    margin: 0;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.muted {
    color: var(--muted);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    height: 64px;
}

.brand {
    font-family: var(--font-head);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
}

.brand--muted {
    color: var(--muted);
    font-size: 1rem;
}

.site-main {
    flex: 1;
    padding: 40px 0 72px;
}

/* ---------- Building blocks ---------- */

.eyebrow {
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.panel + .panel {
    margin-top: 24px;
}

/* The original used tabs ("STREAMS", "CONTENT"); here they are labels with an accent line. */
.tab-label {
    font-family: var(--font-head);
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--purple-ink);
    padding-bottom: 10px;
    margin-bottom: 4px;
    box-shadow: inset 0 -2px 0 var(--purple);
}

.empty {
    color: var(--muted);
    padding: 16px 0;
}

.fineprint {
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--faint);
}

/* ---------- Title page ---------- */

.title-head {
    margin-bottom: 28px;
}

.title-head h1 {
    margin-top: 6px;
    font-family: var(--font-head);
    font-size: clamp(2.1rem, 4.4vw, 3.1rem);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: -0.005em;
    color: var(--purple-ink);
    text-wrap: balance;
}

.title-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: 12px;
    color: var(--muted);
}

.title-meta span + span::before {
    content: "·";
    margin: 0 0.55em;
    color: var(--faint);
}

.title-main {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 36px;
    align-items: start;
}

.title-poster img,
.poster-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--purple-tint);
}

.poster-placeholder {
    display: grid;
    place-items: center;
    font-size: 4rem;
    font-weight: 700;
    color: var(--purple);
    opacity: 0.5;
}

.summary {
    color: var(--muted);
    max-width: 60ch;
    margin-bottom: 28px;
}

.summary strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Offer table ---------- */

.offer-table {
    width: 100%;
    border-collapse: collapse;
}

.offer-table thead th {
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: left;
    padding: 14px 12px 10px;
    border-bottom: 1px solid var(--line);
}

.offer-table td,
.offer-table tbody th {
    padding: 16px 12px;
    vertical-align: middle;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.offer-table tbody tr:last-child > * {
    border-bottom: 0;
}

.offer-table thead th:first-child,
.offer-table tbody th {
    padding-left: 0;
}

.offer-table .action {
    padding-right: 0;
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
}

.provider {
    font-weight: 600;
}

.provider__inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Provider logo: brand-coloured blob with a light ring, wordmark in our font */
.provider-logo {
    --size: var(--logo-size, 36px);
    flex: none;
    position: relative;
    display: inline-grid;
    place-content: center;
    width: var(--size);
    height: calc(var(--size) * 0.92);
    font-family: var(--font-head);
    font-size: calc(var(--size) * var(--logo-scale, 0.4));
    font-weight: 700;
    line-height: var(--logo-lh, 0.95);
    letter-spacing: -0.01em;
    text-align: center;
    color: var(--logo-fg, #fff);
    isolation: isolate;
    /* The blob is wider on the left: move the wordmark towards its visual centre */
    box-sizing: border-box;
    padding: calc(var(--size) * var(--logo-down, 0)) calc(var(--size) * var(--logo-pad, 0.12)) calc(var(--size) * 0.04) 0;
}

.provider-logo::before,
.provider-logo::after {
    content: "";
    position: absolute;
    z-index: -1;
    -webkit-mask: url("../images/blob-3Vm2CcN.svg") center / 100% 100% no-repeat;
    mask: url("../images/blob-3Vm2CcN.svg") center / 100% 100% no-repeat;
}

.provider-logo::before {
    inset: 0;
    background: var(--line);
}

.provider-logo::after {
    inset: 7%;
    background: var(--logo-bg, var(--purple));
}

.provider-logo span {
    display: block;
    white-space: nowrap;
}

.price,
.included,
.addon {
    display: block;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.price b {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.included {
    font-weight: 600;
}

.addon {
    font-size: 0.88rem;
    color: var(--muted);
}

.none {
    color: var(--faint);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--purple);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s;
}

.btn:hover {
    background: var(--purple-dark);
}

.btn:focus-visible {
    outline: 3px solid var(--purple-tint);
    outline-offset: 2px;
}

.btn__ring {
    width: 18px;
    height: 18px;
}

.until {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--warn);
}

/* ---------- Content ---------- */

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    margin-top: 24px;
}

.content-text h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.content-text > p {
    max-width: 65ch;
    color: #3d3643;
}

.facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    align-content: start;
    font-size: 0.95rem;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    font-weight: 500;
}

/* ---------- Seasons and episodes ---------- */

.seasons {
    margin-top: 40px;
}

.seasons h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 12px;
}

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

.season:first-of-type {
    border-top: 1px solid var(--line);
}

.season summary,
.season--plain {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
}

.season summary {
    cursor: pointer;
    list-style: none;
}

.season summary::-webkit-details-marker {
    display: none;
}

.season summary::after {
    content: "";
    flex: none;
    align-self: center;
    width: 8px;
    height: 8px;
    margin: -4px 4px 0 0;
    border-right: 2px solid var(--faint);
    border-bottom: 2px solid var(--faint);
    transform: rotate(45deg);
    transition: transform 0.15s;
}

.season[open] summary::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.season summary:hover .season__name {
    color: var(--purple-ink);
}

.season--plain {
    padding-right: 20px;
}

.season__name {
    font-weight: 600;
}

.season__meta {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.95rem;
}

.season__body {
    padding: 0 0 24px;
}

.season__whole {
    margin-bottom: 24px;
}

.season__episodes {
    display: block;
}

.season__loading {
    color: var(--muted);
    font-size: 0.95rem;
}

.season__whole h4,
.episode-list::before {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.season__whole h4 {
    margin-bottom: 8px;
}

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

.episode-list::before {
    content: "Einzelne Folgen";
    display: block;
    margin-bottom: 8px;
}

.episode {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.episode__title {
    font-weight: 600;
}

.episode__no {
    display: inline-block;
    min-width: 2.2em;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

.episode__overview {
    margin: 4px 0 0 2.2em;
    max-width: 70ch;
    font-size: 0.92rem;
    color: var(--muted);
}

/* One line per provider: name, kind of access/price, link */
.where {
    list-style: none;
    padding: 0;
}

.episode .where {
    margin: 8px 0 0 2.2em;
}

.where {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.where__row {
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr auto;
    align-items: center;
    gap: 4px 16px;
    padding: 8px 12px;
    font-size: 0.92rem;
    transition: background-color 0.12s;
}

/* Alternating rows and hover, like a table */
.where__row:nth-child(even) {
    background: #faf8fb;
}

.where__row + .where__row {
    border-top: 1px solid var(--line);
}

.where__row:hover,
.where__row:focus-within {
    background: var(--purple-tint);
}

.where__info {
    color: var(--muted);
}

.where__provider {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn--small {
    padding: 6px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--footer);
    border-top: 1px solid #dedae1;
    padding: 36px 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.site-footer__brand p {
    margin-top: 8px;
}

.site-footer__meta {
    text-align: right;
    display: grid;
    gap: 4px;
    align-content: end;
}

.site-footer a {
    color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
    .title-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .title-poster {
        max-width: 180px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 680px) {
    .site-main {
        padding-top: 28px;
    }

    .panel {
        padding: 20px;
    }

    /* Table rows become stacked blocks */
    .offer-table thead {
        display: none;
    }

    .offer-table tr {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 8px;
        padding: 18px 0;
        border-bottom: 1px solid var(--line);
    }

    .offer-table tbody tr:last-child {
        border-bottom: 0;
    }

    .offer-table td,
    .offer-table tbody th {
        padding: 0;
        border: 0;
    }

    .offer-table .provider,
    .offer-table .action {
        grid-column: 1 / -1;
    }

    .offer-table td[data-label]::before {
        font-family: var(--font-head);
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--faint);
    }

    .offer-table .action {
        text-align: left;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .site-footer__meta {
        text-align: left;
    }

    .where__row {
        grid-template-columns: 1fr auto;
    }

    .where__info {
        grid-column: 1;
        grid-row: 2;
    }

    .where__link {
        grid-row: 1 / span 2;
        grid-column: 2;
    }

    .episode__overview,
    .episode .where {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* ---------- Header search ---------- */

.site-header__inner {
    gap: 24px;
}

.site-header .search {
    margin-left: auto;
    width: min(340px, 50vw);
}

/* ---------- Search field (live component) ---------- */

.search {
    position: relative;
}

.search__form {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--purple);
    border-radius: var(--radius-sm);
}

.search__form:focus-within {
    box-shadow: 0 0 0 4px var(--purple-tint);
}

.search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: var(--text);
    padding: 9px 12px;
    outline: none;
}

.search__input::placeholder {
    color: var(--faint);
}

.search__input::-webkit-search-cancel-button {
    display: none;
}

.search__submit {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--purple);
    padding: 8px 12px;
    cursor: pointer;
}

.search--hero .search__input {
    font-size: 1.15rem;
    padding: 15px 18px;
}

.search--hero .search__form {
    border-width: 2px;
    border-radius: var(--radius);
}

.search__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px -12px rgba(31, 26, 36, 0.25);
    overflow: hidden;
    text-align: left;
}

.search__panel.is-loading {
    opacity: 0.6;
}

/* On the search page the suggestions would duplicate the results */
.search--page .search__panel {
    display: none;
}

.search__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    color: var(--text);
    text-decoration: none;
}

.suggestion:hover,
.suggestion:focus-visible {
    background: var(--purple-tint);
    outline: none;
}

.suggestion img,
.suggestion__noposter {
    flex: none;
    width: 34px;
    height: 51px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--purple-tint);
}

.suggestion__text {
    display: grid;
    min-width: 0;
}

.suggestion__title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion__meta {
    font-size: 0.85rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search__all {
    display: block;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.search__all:hover {
    background: var(--canvas);
}

.search__empty {
    padding: 16px 14px;
    color: var(--muted);
}

/* ---------- Home ---------- */

.site-main:has(.hero) {
    padding-top: 0;
}

.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 72px 0 80px;
}

.hero__inner {
    max-width: 760px;
    text-align: center;
}

.hero h1 {
    margin-top: 8px;
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 1.05;
    font-weight: 500;
    color: var(--purple-ink);
}

.hero__lead {
    margin: 16px auto 32px;
    max-width: 46ch;
    font-size: 1.1rem;
    color: var(--muted);
}

.home {
    padding-top: 48px;
    padding-bottom: 72px;
}

.home__section + .panel {
    margin-top: 48px;
}

.home__intro p {
    margin-top: 16px;
    max-width: 75ch;
    color: #3d3643;
}

/* ---------- Poster cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 28px 20px;
    margin-top: 20px;
}

.card {
    display: grid;
    gap: 2px;
    color: var(--text);
    text-decoration: none;
}

.card__poster {
    display: block;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--purple-tint);
    aspect-ratio: 2 / 3;
}

.card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__noposter {
    display: grid;
    place-items: center;
    height: 100%;
    font-family: var(--font-head);
    font-size: 3rem;
    color: var(--purple);
    opacity: 0.5;
}

.card__title {
    font-weight: 600;
    line-height: 1.3;
}

.card:hover .card__title {
    color: var(--purple);
}

.card__meta,
.card__providers {
    font-size: 0.85rem;
    color: var(--muted);
}

.card__providers {
    color: var(--purple-ink);
}

.card__providers--store {
    color: var(--muted);
}

/* ---------- Info band (from the original footer) ---------- */

.info {
    background: var(--footer);
    border-top: 1px solid #dedae1;
    padding: 64px 0;
}

/* The info band sits directly on the footer and fills any leftover height */
.site-main:has(.info) {
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

.site-main:has(.info) .info {
    flex: 1;
}

.site-main:has(.info) + .site-footer {
    border-top-color: #d6d2d9;
}

.info__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    text-align: center;
}

.info svg {
    width: 56px;
    height: 56px;
    color: #a8a2ad;
    margin: 0 auto 20px;
    display: block;
}

.info h2 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #59525f;
    margin-bottom: 12px;
}

.info p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Search page ---------- */

.search-page__head {
    margin-bottom: 24px;
}

.search-page__head h1 {
    margin-top: 6px;
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 500;
    color: var(--purple-ink);
}

.search-page .search {
    max-width: 560px;
    margin-bottom: 32px;
}

.search-page__empty p + p {
    margin-top: 6px;
}

@media (max-width: 860px) {
    .info__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 680px) {
    /* Header wraps to two lines (logo + search) */
    html {
        scroll-padding-top: 136px;
    }

    .site-header__inner {
        height: auto;
        flex-wrap: wrap;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 12px;
    }

    .site-header .search {
        width: 100%;
    }

    .hero {
        padding: 48px 0 56px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }
}

/* Close suggestions when focus leaves the search (links inside keep focus) */
.search:not(:focus-within) .search__panel {
    display: none;
}

/* ---------- Legal pages ---------- */

/* Same width as all other pages (.wrap) */

.legal__head {
    margin-bottom: 24px;
}

.legal__head h1 {
    margin-top: 6px;
    font-family: var(--font-head);
    font-size: clamp(1.9rem, 3.6vw, 2.5rem);
    font-weight: 500;
    color: var(--purple-ink);
}

.legal__body {
    padding: 36px 40px;
    color: #3d3643;
}

.legal__body h2 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 8px;
}

.legal__body h2:first-child {
    margin-top: 0;
}

.legal__body p + p {
    margin-top: 10px;
}

.legal__body ul {
    margin: 8px 0 10px;
    padding-left: 1.3em;
}

.legal__body code {
    font-size: 0.9em;
    background: var(--canvas);
    padding: 1px 5px;
    border-radius: 4px;
}

@media (max-width: 680px) {
    .legal__body {
        padding: 24px 20px;
    }
}

/* ---------- Main navigation ---------- */

.site-nav {
    display: flex;
    gap: 4px;
    margin-left: 12px;
}

.site-nav a {
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.site-nav a:hover {
    color: var(--purple);
}

.site-nav a[aria-current="page"] {
    color: var(--purple-ink);
    box-shadow: inset 0 -2px 0 var(--purple);
    border-radius: 0;
}

/* ---------- Browse pages ---------- */

.browse-page__head {
    margin-bottom: 24px;
}

.browse-page__head h1 {
    margin-top: 6px;
    font-family: var(--font-head);
    font-size: clamp(1.9rem, 3.8vw, 2.6rem);
    font-weight: 500;
    color: var(--purple-ink);
}

/* Result bar: filter button, chips, count, sort */
.results__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 0 20px;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px 0 14px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: inset 0 0 0 1.5px var(--purple);
    color: var(--purple);
    font-family: var(--font-head);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.filter-button:hover {
    background: var(--purple-tint);
}

.filter-button:focus-visible,
.overlay__close:focus-visible,
.overlay__apply:focus-visible {
    outline: 3px solid var(--purple-tint);
    outline-offset: 2px;
}

.filter-button__count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--purple);
    color: #fff;
    font-size: 0.78rem;
}

.chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex: 1 1 300px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-size: 0.88rem;
    color: var(--purple-ink);
    background: var(--purple-tint);
    border: 0;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}

.chip span[aria-hidden] {
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.7;
}

.chip:hover {
    background: #eadcf0;
}

.chip--reset {
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.chip--reset:hover {
    background: transparent;
    color: var(--purple);
}

.results__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.results__count {
    color: var(--muted);
    white-space: nowrap;
}

.results__count strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.sort select {
    appearance: none;
    height: 40px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface) no-repeat right 14px center / 10px 10px;
    background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%, var(--faint) 62%, transparent 62%),
        linear-gradient(-45deg, transparent 50%, var(--faint) 50%, var(--faint) 62%, transparent 62%);
    background-size: 6px 6px, 6px 6px;
    background-position: right 18px center, right 13px center;
    border: 1px solid #d9d4dd;
    border-radius: var(--radius-sm);
    padding: 0 38px 0 12px;
    cursor: pointer;
}

.sort select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-tint);
}

/* Overlay: hidden checkbox drives it (see TitleBrowser.html.twig) */
.overlay-state {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    visibility: hidden;
    pointer-events: none;
}

.overlay-state:checked ~ .overlay {
    visibility: visible;
    pointer-events: auto;
}

html:has(.overlay-state:checked) {
    overflow: hidden;
}

.overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 26, 36, 0.45);
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.overlay-state:checked ~ .overlay .overlay__backdrop {
    opacity: 1;
}

.overlay__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100%);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: -12px 0 40px -16px rgba(31, 26, 36, 0.35);
    transform: translateX(100%);
    transition: transform 0.22s ease-out;
}

.overlay-state:checked ~ .overlay .overlay__panel {
    transform: none;
}

.overlay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}

.overlay__head h2 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--purple-ink);
}

.overlay__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-right: -8px;
    border-radius: var(--radius-sm);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.overlay__close:hover {
    background: var(--canvas);
    color: var(--text);
}

.overlay__body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 24px 24px;
    overscroll-behavior: contain;
}

.group {
    border: 0;
    margin: 0;
    padding: 20px 0 18px;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}

.group:last-child {
    border-bottom: 0;
}

.group legend {
    float: left;
    width: 100%;
    margin-bottom: 12px;
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--purple-ink);
}

.group__note {
    clear: both;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--faint);
}

.pills,
.fsk,
.range {
    clear: both;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    cursor: pointer;
}

.pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pill span {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #d9d4dd;
    font-size: 0.92rem;
    color: var(--text);
    transition: background-color 0.12s, border-color 0.12s;
}

.pill:hover span {
    border-color: var(--purple);
}

.pill input:checked + span {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
}

.pill input:focus-visible + span {
    outline: 3px solid var(--purple-tint);
    outline-offset: 2px;
}

.fsk {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.range {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--faint);
}

.range input {
    width: 110px;
    height: 40px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid #d9d4dd;
    border-radius: var(--radius-sm);
    padding: 0 12px;
}

.range input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-tint);
}

.overlay__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.overlay__reset {
    font: inherit;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: 0;
    padding: 8px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.overlay__reset:disabled {
    opacity: 0.4;
    cursor: default;
}

.overlay__apply {
    padding: 11px 22px;
    cursor: pointer;
}

/* Results */
.results .card-grid {
    margin-top: 0;
}

.results .card-grid.is-loading {
    opacity: 0.55;
    transition: opacity 0.15s;
}

.results__empty p + p {
    margin-top: 6px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.pager__link {
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1.5px var(--purple);
}

.pager__link:hover {
    background: var(--purple-tint);
}

.pager__info {
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 680px) {
    .site-nav {
        margin-left: auto;
    }

    .results__meta {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .overlay__panel {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .overlay__panel,
    .overlay__backdrop {
        transition: none;
    }
}

/* ---------- FSK ---------- */

/* Colours follow the official FSK marks (white, yellow, green, blue, red) */
.fsk-badge {
    display: inline-block;
    min-width: 58px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-head);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid transparent;
}

.fsk-badge--0 { background: #ffffff; color: #333; border-color: #c9c4cc; }
.fsk-badge--6 { background: #ffe500; color: #222; }
.fsk-badge--12 { background: #2fa84f; color: #fff; }
.fsk-badge--16 { background: #2b7bd0; color: #fff; }
.fsk-badge--18 { background: #e2231a; color: #fff; }

.fsk__option {
    cursor: pointer;
}

.fsk__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Unselected: muted; selected: full colour with a purple ring */
.fsk__option .fsk-badge {
    opacity: 0.45;
    transition: opacity 0.15s;
}

.fsk__option:hover .fsk-badge {
    opacity: 0.8;
}

.fsk__option input:checked + .fsk-badge {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--purple);
}

.fsk__option input:focus-visible + .fsk-badge {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
}


/* ---------- Provider pages ---------- */

.page-head {
    margin-bottom: 28px;
}

.page-head h1 {
    margin-top: 6px;
    font-family: var(--font-head);
    font-size: clamp(1.9rem, 3.8vw, 2.6rem);
    font-weight: 500;
    color: var(--purple-ink);
}

.page-head__lead {
    margin-top: 10px;
    max-width: 62ch;
    color: var(--muted);
}

.provider-group + .provider-group {
    margin-top: 40px;
}

.provider-tiles {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.provider-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s;
}

.provider-tile:hover {
    border-color: var(--purple);
}

.provider-tile__text {
    display: grid;
    min-width: 0;
}

.provider-tile__name {
    font-weight: 600;
}

.provider-tile__meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.provider-tile--empty .provider-logo {
    opacity: 0.6;
}

.provider-tile--empty .provider-tile__meta {
    color: var(--faint);
}

.provider-head {
    display: flex;
    align-items: center;
    gap: 20px;
}

.provider-head h1 {
    margin-top: 2px;
}

.provider-head__link {
    margin-left: auto;
}


.provider-summary p {
    max-width: 75ch;
    color: #3d3643;
}

.provider-summary p + p {
    margin-top: 8px;
}

.provider-section {
    margin-top: 48px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.section-head__links {
    display: flex;
    gap: 18px;
    padding-bottom: 10px;
    font-size: 0.92rem;
    font-weight: 600;
}

.section-head__links a {
    text-decoration: none;
}

.section-head__links a::after {
    content: " →";
}

.card__note {
    font-size: 0.82rem;
    color: var(--muted);
}

.card__note--warn {
    color: var(--warn);
    font-weight: 600;
}

.provider__link {
    color: inherit;
    text-decoration: none;
}

.provider__link:hover {
    color: var(--purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 680px) {
    .provider-head {
        flex-wrap: wrap;
    }

    .provider-head__link {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* Breadcrumbs (title and provider pages) */
.breadcrumbs {
    margin-bottom: 14px;
    font-size: 0.88rem;
    color: var(--muted);
}

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

.breadcrumbs li + li::before {
    content: "›";
    margin: 0 8px;
    color: var(--faint);
}

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

.breadcrumbs a:hover {
    color: var(--purple);
    text-decoration: underline;
}

.breadcrumbs [aria-current] {
    color: var(--text);
}

/* Links to genre pages (and providers on a genre page) */
.link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.link-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--purple-tint);
    color: var(--purple-ink);
    font-size: 0.92rem;
    text-decoration: none;
}

.link-chip span {
    font-size: 0.8rem;
    color: var(--muted);
}

.link-chip:hover {
    background: #eadcf0;
}

/* Footer link columns (hub pages, see App\Seo\FooterLinks) */
.site-footer__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 28px 32px;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid #dedae1;
}

.footer-col__title {
    margin: 0 0 10px;
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text);
}

.footer-col ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-col a {
    text-decoration: none;
}

.site-footer .footer-col a:hover {
    color: var(--purple);
    text-decoration: underline;
}

.link-chip--current {
    background: var(--purple);
    color: #fff;
}

/* Link from a season in the accordion to its own page */
.season__more {
    margin: 0 0 20px;
    font-size: 0.92rem;
}

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

a.season__name:hover {
    color: var(--purple);
    text-decoration: underline;
}

/* Season page: the section heading already says "Alle Folgen", no extra label */
.season-page__episodes .episode-list::before {
    content: none;
}
