/*
 * Pre-chewed Politics, from their site (prechewedpolitics.co.uk): Montserrat body text, League Spartan
 * headings, their blue as the accent, navy headings and a cream frame around the white page in light mode.
 * Loaded after the app's CSS when BRAND=prechewed-politics. Its rules are outside any cascade layer, so they
 * win over the app's Tailwind layers. Contrast (WCAG): white on #00638d 6.63:1, #00638d on white 6.63:1 and
 * on cream 6.18:1, #0f2939 on #80b1c6 6.46:1, #80b1c6 on the dark page 7.56:1.
 * Fonts: self-hosted variable woff2 (SIL OFL 1.1, licences in fonts/), from Fontsource 5.3.0.
 */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/montserrat-latin-ext-wght-normal.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: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/montserrat-latin-wght-normal.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: 'League Spartan';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/league-spartan-latin-ext-wght-normal.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: 'League Spartan';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/league-spartan-latin-wght-normal.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;
}

:root {
    --font-sans: 'Montserrat', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --brand-font-heading: 'League Spartan', var(--font-sans);

    --color-accent: #00638d;
    --color-accent-content: #00638d;
    --color-accent-foreground: #ffffff;
}

/* Dark mode: their light blue as the accent, with navy text on it. The page stays the app's dark zinc. */
.dark {
    --color-accent: #80b1c6;
    --color-accent-content: #80b1c6;
    --color-accent-foreground: #0f2939;
}

/*
 * League Spartan for page titles (Flux's xl and 2xl headings, text-2xl and up). Its small x-height reads
 * cramped at card-title sizes, so smaller headings stay Montserrat.
 */
[data-flux-heading]:is(.text-2xl, .text-3xl, .text-4xl) {
    font-family: var(--brand-font-heading);
    font-weight: 600;
}

/*
 * Navy headings in light mode. Flux gives a heading its default colour with a zero-specificity utility
 * (:where(...) text-zinc-800). This rule is also zero-specificity and in the same utilities layer, but comes
 * later, so it replaces only that default: a heading with any colour class of its own (an accent heading, a
 * text-red-600) keeps it.
 */
@layer utilities {
    :where(html:not(.dark) [data-flux-heading]) {
        color: #0f2939;
    }
}

/* The frame (page background, sidebar, phone header) is their cream in light mode; the page itself stays white. */
html:not(.dark) body,
html:not(.dark) [data-flux-sidebar],
html:not(.dark) [data-flux-header] {
    background-color: #fbf6f3;
}

html:not(.dark) :is([data-flux-sidebar], [data-flux-header], [data-flux-main-inset]) {
    border-color: #f2e9e4;
}
