/*
 * easyscore — design tokens and components.
 *
 * Two colours, two roles: violet is identity (header, links, buttons, the
 * followed team's row), yellow marks imminence (the next fixture of a team you
 * follow) and nothing else. Yellow is never type -- #ffd447 on white is 1.3:1.
 */

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-latin-Dr-cltI.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-latin-ext-NXGsJlG.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light dark;

    --c-brand: #663399;
    --c-brand-strong: #512879;
    --c-brand-soft: #d3c0e8;
    --c-brand-tint: #f0e9f7;
    --c-on-brand: #ffffff;

    --c-flag: #ffd447;
    --c-on-flag: #171320;

    --c-bg: #f4f1f8;
    --c-surface: #ffffff;
    --c-surface-alt: #f6f4f9;
    --c-text: #171320;
    --c-muted: #78717f;
    --c-faint: #b9b2c2;
    --c-border: #e9e4ef;

    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 20px;
    --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 62.5rem;
    --shadow: 0 4px 16px rgb(102 51 153 / .12);
    /* Thumb-sized: this is consulted one-handed, courtside. */
    --tap: 44px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --c-brand: #8b5fc0;
        --c-brand-strong: #a37fd2;
        --c-brand-soft: #d3c0e8;
        --c-brand-tint: #241d33;
        --c-on-brand: #ffffff;

        --c-bg: #12101a;
        --c-surface: #1a1725;
        --c-surface-alt: #221e30;
        --c-text: #ece9f2;
        --c-muted: #9c94ac;
        --c-faint: #625a72;
        --c-border: #2c2739;
        --shadow: none;
    }
}

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.45;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-brand); }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--space-3); letter-spacing: -0.02em; }
h1 { font-size: 1.625rem; font-weight: 700; text-wrap: balance; }
/* Long by nature -- two team names and a score -- so it scales down rather
   than pushing the scoreboard off the first screen. */
h1.h1--long { font-size: clamp(1.15rem, 4.6vw, 1.5rem); }
h2 { font-size: .9375rem; font-weight: 600; }
h3 { font-size: .8125rem; font-weight: 600; }

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

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

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
    left: var(--space-4); top: var(--space-2); z-index: 30;
    background: var(--c-surface); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
}

/* ---------- header ---------- */

.site-header { background: var(--c-brand); color: var(--c-on-brand); }
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    min-height: 3.5rem;
}
.site-header__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--c-on-brand);
}
/* Height, never width: the wordmark keeps its own proportions, and the header
   is 3.5rem tall whatever the screen. */
.logo { display: block; height: 1.375rem; width: auto; }
.site-nav { display: none; gap: var(--space-4); }
@media (min-width: 48rem) { .site-nav { display: flex; } }
.site-nav a {
    text-decoration: none;
    color: var(--c-brand-soft);
    padding: var(--space-2) 0;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--c-on-brand); }
.site-nav a[aria-current="page"] { color: var(--c-on-brand); border-bottom-color: var(--c-brand-soft); }

/* The header search: a real field where there is room, its icon where there
   is not. Same markup either way, so the live dropdown works in both. */
.header-search { position: relative; margin-left: auto; }
.header-search__field { display: none; }
.header-search__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    margin-right: calc(var(--space-3) * -1);
    color: var(--c-brand-soft);
}
.header-search__icon:hover { color: var(--c-on-brand); }
.header-search .search__suggestions { width: min(22rem, 80vw); left: auto; right: 0; }

@media (min-width: 48rem) {
    .header-search__icon { display: none; }
    .header-search__field {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        width: 18rem;
        min-height: 38px;
        padding: 0 var(--space-3);
        border-radius: var(--radius-sm);
        background: rgb(255 255 255 / .16);
        color: var(--c-brand-soft);
    }
    .header-search__field:focus-within { background: rgb(255 255 255 / .26); }
    .header-search__field input {
        font: inherit;
        flex-grow: 1;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--c-on-brand);
        font-size: .8125rem;
        outline: none;
    }
    .header-search__field input::placeholder { color: var(--c-brand-soft); }
}

.site-footer {
    margin-top: var(--space-7);
    padding: var(--space-5) 0;
    border-top: 1px solid var(--c-border);
    color: var(--c-muted);
    font-size: .8125rem;
}
.site-footer p { margin: 0 0 var(--space-1); }

/* main.wrap, not main: `.wrap` sets `padding: 0 …` and a class beats a type
   selector, so a bare `main { padding }` was silently dropped and every page
   title sat against the header. */
main.wrap { padding-top: var(--space-6); padding-bottom: var(--space-7); }

/* ---------- generic ---------- */

.page-head { margin-bottom: var(--space-5); }
.page-head p a, .entity-head p a { text-decoration: none; }
.page-head p a:hover, .entity-head p a:hover { text-decoration: underline; }
.page-head p { margin: var(--space-2) 0 0; color: var(--c-muted); font-size: .875rem; }

/* A section title standing on the page background, not inside a card. */
.section-title {
    margin: var(--space-6) 0 var(--space-3);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-muted);
}
/* Only when it really opens the page -- inside a container it still needs its
   space, which is what pushed "Déroulé" onto the card above it. */
main.wrap > .section-title:first-child { margin-top: 0; }
.section-title__note { font-weight: 400; text-transform: none; letter-spacing: 0; }
/* An anchored heading must not hide under the sticky nothing above it. */
.index__title { scroll-margin-top: var(--space-4); }

.card {
    margin-top: 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card + .card, .index + .index { margin-top: var(--space-5); }

/* The one block a page is built around: the next match, a live score. */
.card--lead {
    border-color: transparent;
    box-shadow: 0 6px 24px rgb(102 51 153 / .16);
}

.card__head {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--c-surface-alt);
    border-bottom: 1px solid var(--c-border);
}
.card__head h2 {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-muted);
}
/* A head that repeats inside a card (a date, a competition) is a divider. */
.game + .card__head, .team-row + .card__head { border-top: 1px solid var(--c-border); }
.card__head h3 { margin: 0; }
.card__head h2 { margin: 0; }
.card__head a, .card__head > .muted { margin-left: auto; font-size: .8125rem; }
.card__body { padding: var(--space-4); }

.grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

.tag {
    display: inline-block;
    padding: 2px var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--c-brand-tint);
    color: var(--c-brand);
    font-size: .6875rem;
    font-weight: 600;
}
.muted { color: var(--c-muted); }
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--c-muted);
    padding: var(--space-5) var(--space-4);
    text-align: center;
    font-size: .875rem;
    text-wrap: pretty;
}
.empty a { font-weight: 500; }

/* Club monogram, standing in for a crest we do not have. */
.mono {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 17px;
    background: var(--c-brand-tint);
    color: var(--c-brand);
    font-size: .75rem;
    font-weight: 700;
}

.mono--lg { width: 52px; height: 52px; border-radius: 26px; font-size: 1.0625rem; }

/* ---------- entity header (club, team) ---------- */

.entity-head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}
.entity-head .mono--lg { margin-top: 2px; }
.entity-head .mono--lg { background: var(--c-brand); color: var(--c-on-brand); }
.entity-head__body { min-width: 0; }
.entity-head h1 { margin: 0; }
.entity-head p { margin: var(--space-1) 0 0; font-size: .875rem; }

/* ---------- index lists (clubs, competitions) ---------- */
/*
 * ~200 clubs and ~300 competitions: these are indexes, not routes. Grouped by
 * province so the eye can jump, and each page leads with the search box --
 * scrolling a list of three hundred is a last resort, not the plan.
 */

.index__title {
    margin: var(--space-6) 0 var(--space-3);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.index__row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--tap);
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--c-border);
    text-decoration: none;
    color: inherit;
}
.index__row:first-child { border-top: 0; }
.index__row:hover { background: var(--c-surface-alt); }
.index__name { flex-grow: 1; min-width: 0; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index__meta { flex-shrink: 0; font-size: .8125rem; color: var(--c-muted); }

/* ---------- the match row ---------- */
/*
 * One shape for every match, played or not: date and time on the left, both
 * teams stacked with the home side first, the score on the right -- or two
 * dashes when it does not exist yet. "Reçoit" and "se déplace chez" are never
 * used in a list: they assume a point of view a calendar does not have.
 */

.game {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--c-border);
    text-decoration: none;
    color: inherit;
}
.game:first-child, .card__head + .game { border-top: 0; }
.game:hover { background: var(--c-surface-alt); }

.game__when {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    min-width: 3.25rem;
    font-size: .75rem;
    color: var(--c-muted);
}
.game__time { font-size: .8125rem; }

.game__teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.5rem;
    gap: 2px var(--space-2);
    flex-grow: 1;
    min-width: 0;
    font-size: .875rem;
}
/* The letter is never what gets cut: a long club name shortens, the letter
   that tells its two teams apart stays. */
.game__team { display: flex; align-items: baseline; gap: .25rem; min-width: 0; }
.game__team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game__suffix { flex-shrink: 0; color: var(--c-muted); }
.game__team--winner { font-weight: 600; }
.game__points { text-align: right; font-variant-numeric: tabular-nums; }
.game__points--winner { font-weight: 700; }
.game__points--none { color: var(--c-faint); }


/* The one place yellow appears: the next fixture of a team you follow. */
.game--next { border-left: 3px solid var(--c-flag); }

/* ---------- team page: next match ---------- */

.next { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); border-left: 4px solid var(--c-flag); }
.next__head { display: flex; align-items: baseline; gap: var(--space-2); }
.next__label {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.next__side { margin-left: auto; font-size: .75rem; color: var(--c-muted); }
.next__body { display: flex; gap: var(--space-4); }
.next__when { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; min-width: 3.75rem; }
.next__date { font-size: .75rem; color: var(--c-muted); }
.next__hour { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.next__teams { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); flex-grow: 1; min-width: 0; font-size: 1.0625rem; align-content: center; }
.next__venue {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--c-border);
    font-size: .75rem;
    color: var(--c-muted);
}
.next__venue svg { flex-shrink: 0; margin-top: 2px; }

/* ---------- followed teams ---------- */

.followed { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.followed__card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.followed__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--c-surface-alt);
    border-bottom: 1px solid var(--c-border);
}
.followed__name { margin: 0; font-size: .9375rem; font-weight: 600; }
.followed__name a { text-decoration: none; color: inherit; }
.followed__name a:hover { text-decoration: underline; }
.followed__meta { font-size: .6875rem; color: var(--c-muted); }

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .875rem; }
.table th, .table td {
    padding: var(--space-3) var(--space-2);
    text-align: right;
    /* "65–31" must never wrap into two lines: it doubles every row's height. */
    white-space: nowrap;
}
.table th:nth-child(2), .table td:nth-child(2) { text-align: left; width: 100%; white-space: normal; }
.table th:first-child, .table td:first-child { text-align: left; padding-left: var(--space-4); color: var(--c-muted); width: 1.75rem; }
.table th:last-child, .table td:last-child { padding-right: var(--space-4); }
.table thead th {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.table tbody tr { border-top: 1px solid var(--c-border); }
.table td a { text-decoration: none; color: inherit; }
.table td a:hover { text-decoration: underline; }
.table__strong { font-weight: 700; }

/* The followed team's own row -- violet, because it is identity, not urgency. */
.table__row--self td { background: var(--c-brand-tint); font-weight: 600; }
.table__row--self td:first-child { color: var(--c-brand); font-weight: 700; }

.table-scroll { overflow-x: auto; }

@media (max-width: 30rem) {
    .table th.table--optional, .table td.table--optional { display: none; }
}

/* ---------- scoreboard (match page) ---------- */

.scoreboard { display: grid; align-items: stretch; font-variant-numeric: tabular-nums; }
.scoreboard__label { padding: var(--space-2) 0; text-align: center; font-size: .625rem; color: var(--c-muted); }
.scoreboard__team { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); min-width: 0; }
.scoreboard__team span { min-width: 0; font-size: .875rem; text-wrap: pretty; }
.scoreboard__team a { text-decoration: none; color: inherit; }
.scoreboard__team a:hover { text-decoration: underline; }
.scoreboard__set {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) 0;
    font-size: .875rem;
    color: var(--c-muted);
}
.scoreboard__set--won { color: var(--c-text); font-weight: 600; }
.scoreboard__total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--space-3) var(--space-4);
    font-size: 1.375rem;
    letter-spacing: -0.02em;
    color: var(--c-muted);
}
.scoreboard__total--won { color: var(--c-text); font-weight: 700; }
.scoreboard__row { border-top: 1px solid var(--c-border); }

/* ---------- point-by-point ---------- */

/* flow-root keeps the first heading's margin inside, instead of collapsing
   through the container and landing on the card above. */
[data-game-detail] { display: flow-root; }

.runs { display: flex; flex-direction: column; gap: var(--space-4); }
.run__head { display: flex; align-items: baseline; gap: var(--space-2); font-size: .8125rem; }
.run__label { font-size: .6875rem; font-weight: 600; color: var(--c-muted); }
.run__score { margin-left: auto; font-variant-numeric: tabular-nums; }
.run svg { display: block; height: 64px; background: var(--c-surface-alt); border-radius: var(--radius-sm); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: .6875rem; color: var(--c-muted); }
.legend span { display: inline-flex; align-items: center; gap: var(--space-1); }

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

.search { position: relative; margin-bottom: var(--space-5); }
.search__label { display: block; font-size: .75rem; color: var(--c-muted); margin-bottom: var(--space-1); }
.search__field { position: relative; display: block; }
.search input[type="search"] {
    font: inherit;
    width: 100%;
    min-height: 3rem;
    /* Room on the right for the submit button sitting inside the field. */
    padding: 0 3.25rem 0 var(--space-4);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
}
.search input[type="search"]:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 1px; }
/* An icon inside the field rather than a word beside it: the label ate a third
   of a phone's width and truncated the placeholder. It still submits. */
.search button {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--c-brand);
    color: var(--c-on-brand);
    cursor: pointer;
}
.search button:hover { background: var(--c-brand-strong); }
.search__suggestions {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 20;
    margin-top: var(--space-1);
    max-height: 70vh;
    overflow-y: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgb(23 19 32 / .16);
}
.search__suggestions .results__group + .results__group { border-top: 1px solid var(--c-border); }

.results__group h2 {
    padding: var(--space-3) var(--space-4) var(--space-1);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.results { list-style: none; margin: 0; padding: 0; }
.results a {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    align-items: baseline;
    min-height: var(--tap);
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    color: inherit;
}
.results a:hover, .results a:focus-visible { background: var(--c-surface-alt); }
.results__name { font-weight: 500; font-size: .9375rem; }
.results__meta { color: var(--c-muted); font-size: .8125rem; }

/* ---------- home hero ---------- */

.hero { padding: 0 0 var(--space-5); }
.hero h1 { font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: var(--space-5); }
.hero .search { margin-bottom: 0; }
/* Once the followed teams are above, the hero steps back to a single line. */
.hero--compact { padding: var(--space-4) 0 var(--space-3); }
.hero--compact h1 { font-size: 1rem; margin-bottom: var(--space-3); }

/* ---------- follow button ---------- */

/*
 * A star, not a labelled button: it costs a quarter of the width and everyone
 * already knows it. Violet rather than the usual gold -- following a team is
 * identity, and yellow is spoken for elsewhere (it means imminence).
 */
.follow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Aligned with the title, not floating against a two-line header. */
    align-self: flex-start;
    margin-left: auto;
    margin-top: -2px;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--c-faint);
    cursor: pointer;
}
.follow:hover { background: var(--c-surface-alt); color: var(--c-muted); }
.follow:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.follow svg { fill: none; stroke: currentColor; }

.follow[aria-pressed="true"] { color: var(--c-brand); }
.follow[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- club: one row per team ---------- */

.team-row {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    min-height: var(--tap);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--c-border);
    text-decoration: none;
    color: inherit;
}
.team-row:first-of-type { border-top: 0; }
.team-row:hover { background: var(--c-surface-alt); }
.team-row__name { font-weight: 500; font-size: .9375rem; }
/* The letter the club itself gives the team: an identifier, not a word. */
.team-row__suffix {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 0 .375rem;
    border-radius: var(--radius-sm);
    background: var(--c-surface-alt);
    color: var(--c-muted);
    font-size: .75rem;
    font-weight: 600;
}

@media (max-width: 34rem) {
    .wrap { padding: 0 var(--space-3); }
    main { padding-left: var(--space-3); padding-right: var(--space-3); }
    .game, .card__head, .card__body { padding-left: var(--space-3); padding-right: var(--space-3); }
}

/* ---------- subscribe to a calendar ---------- */

.subscribe { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0 var(--space-2); }
.subscribe a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--tap);
    padding: 0 var(--space-4);
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
}
/* Filled: the one that keeps updating, which is what people are after. */
.subscribe__go { background: var(--c-brand); color: var(--c-on-brand); }
.subscribe__go:hover { background: var(--c-brand-strong); }
/* Outlined: a copy frozen at today, offered but not pushed. */
.subscribe__file { border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-muted); }
.subscribe__file:hover { border-color: var(--c-brand); color: var(--c-brand); }
.subscribe a svg { flex-shrink: 0; }
.subscribe__note { margin: 0 0 var(--space-5); color: var(--c-muted); font-size: .75rem; }

/* ---------- bottom navigation (phones) ---------- */
/*
 * The four ways into the site, fixed within thumb reach. It is the only
 * navigation a phone gets: the header there holds the brand and the search
 * icon, and a menu at the top of a screen held at the bottom is a stretch.
 */

.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    display: flex;
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    /* Cleared by the home indicator on a modern phone, flush on the others. */
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-height: var(--tap);
    padding: var(--space-2) 0 calc(var(--space-2) + 2px);
    text-decoration: none;
    color: var(--c-muted);
    font-size: .625rem;
}
.bottom-nav__item--on { color: var(--c-brand); font-weight: 600; }
.bottom-nav__item:active { background: var(--c-surface-alt); }

/* The bar floats over the page, so the page has to end above it. */
body { padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0)); }

@media (min-width: 48rem) {
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
}
