/* Assigned once per publication. Theme components keep their existing markup and interactions. */
body[data-site-edition] {
    --edition-accent: hsl(var(--edition-hue) 52% 28%);
    --edition-dark: hsl(var(--edition-hue) 47% 20%);
    --edition-tint: hsl(var(--edition-hue) 35% 94%);
    --edition-line: hsl(var(--edition-hue) 22% 78%);
    --red: var(--edition-accent);
    --red-dark: var(--edition-dark);
    --sd-blue: var(--edition-accent);
    --sd-blue-dark: var(--edition-dark);
    --accent: var(--edition-accent);
    --black-forest: var(--edition-dark);
    --footer: var(--edition-dark);
    --max: var(--edition-width);
    --sd-max: var(--edition-width);
    background-color: var(--edition-paper);
}

[data-site-edition="journal"] {
    --edition-heading: Georgia, "Times New Roman", serif;
    --edition-width: 1150px;
    --edition-paper: #fcfaf6;
    --edition-radius: 2px;
    --edition-rule: 4px double var(--edition-dark);
    --edition-shadow: none;
}

[data-site-edition="studio"] {
    --edition-heading: "Trebuchet MS", Verdana, sans-serif;
    --edition-width: 1420px;
    --edition-paper: hsl(var(--edition-hue) 37% 97%);
    --edition-radius: 22px;
    --edition-rule: 6px solid var(--edition-accent);
    --edition-shadow: 0 8px 24px hsl(var(--edition-hue) 25% 20% / 10%);
}

[data-site-edition="digest"] {
    --edition-heading: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --edition-width: 1260px;
    --edition-paper: white;
    --edition-radius: 0;
    --edition-rule: 3px solid var(--edition-dark);
    --edition-shadow: 3px 3px 0 var(--edition-line);
}

[data-site-edition] :is(.red-header, .black-header, .sd-header, .site-header) {
    border-top: var(--edition-rule);
}

[data-site-edition] :is(.red-shell, .red-header__inner, .black-shell, .black-header__inner,
    .black-page-shell, .cb2-home__shell) {
    max-width: var(--edition-width);
}

[data-site-edition] :is(.red-shell, .black-shell, .black-page-shell, .sd-container, .container, .cb2-home)
    :is(h1, .red-section__heading h2, .black-list-heading h2, .sd-section-head h2, .section-heading h2) {
    font-family: var(--edition-heading);
}

[data-site-edition] :is(.red-content-card, .red-article, .red-product, .black-inner-card,
    .black-recommendation, .sd-card, .post-card, .home-card) {
    border-radius: var(--edition-radius);
    border: 1px solid var(--edition-line);
    background-color: white;
    box-shadow: var(--edition-shadow);
}

[data-site-edition] :is(.red-hero, .black-page-hero, .cb2-hero, .red-single-product__header) {
    border-radius: var(--edition-radius);
}

[data-site-edition] :is(.red-single-product__header, .red-category-hero, .cb2-hero) {
    background: var(--edition-tint);
}

[data-site-edition] .black-page-hero {
    background: var(--edition-dark);
}

[data-site-edition] :is(.red-content-card h3, .red-article h3, .black-inner-card h3,
    .black-recommendation h3, .sd-card h3, .post-card h3, .home-card-title) {
    font-family: var(--edition-heading);
}

[data-site-edition="journal"] :is(.red-story-header, .black-article-header, .article-header,
    .sd-article-header, .red-category-hero, .black-page-hero) {
    border-top: var(--edition-rule);
    border-bottom: 1px solid var(--edition-line);
    padding-block: clamp(18px, 3vw, 44px);
}

[data-site-edition="digest"] :is(.red-story-header, .black-article-header, .article-header,
    .sd-article-header, .black-page-hero, .red-category-hero) {
    border-inline-start: 7px solid var(--edition-accent);
    padding-inline-start: clamp(14px, 3vw, 36px);
}

[data-site-edition="digest"] :is(.red-section__heading h2, .black-list-heading h2,
    .section-heading h2, .sd-section-head h2) {
    text-transform: uppercase;
    letter-spacing: .045em;
}

@media (min-width: 980px) {
    [data-site-edition="journal"] :is(.red-story-header h1, .black-page-hero h1,
        .article-header h1, .sd-article-header h1) {
        max-width: 21ch;
        font-size: clamp(40px, 4.8vw, 72px);
        line-height: 1.05;
    }

    [data-site-edition="journal"] .red-single-product__header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    [data-site-edition="journal"] .red-single-product__header :is(h1, .red-story-deck, .red-story-cover) {
        margin-inline: auto;
    }

    [data-site-edition="journal"] .red-single-product__header .red-story-cover {
        width: min(100%, 760px);
    }

    [data-site-edition="studio"] .red-single-product__header:has(> .red-story-cover) {
        grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    }

    [data-site-edition="studio"] .red-single-product__header > .red-story-cover {
        grid-column: 1;
        grid-row: 1;
    }

    [data-site-edition="studio"] .red-single-product__header:has(> .red-story-cover) > div {
        grid-column: 2;
        grid-row: 1;
    }

    [data-site-edition="digest"] :is(.red-content-grid, .black-inner-grid, .sd-grid-3) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    [data-site-edition="digest"] .red-content-card {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }

    [data-site-edition="digest"] .red-content-card__media {
        height: 100%;
        min-height: 160px;
    }
}
