/*
 * 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); }

.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); }
/* A province title opens the province's page; it reads as a title first. */
.index__title a { color: inherit; text-decoration: none; }
.index__title a:hover { text-decoration: underline; }

.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; }

/* The kind of thing a page is about, on the line under its name. */
.entity-head__kind { display: inline-flex; align-items: center; gap: var(--space-1); }
.entity-head .mono--icon .kind-icon { color: var(--c-on-brand); }

/* ---------- tabs ---------- */

.tabs {
    display: flex;
    margin: 0 0 var(--space-4);
    border-bottom: 1px solid var(--c-border);
}
.tabs__tab {
    flex: 1 1 0;
    min-height: var(--tap);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-2);
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: .875rem;
    font-weight: 600;
    color: var(--c-muted);
    text-decoration: none;
}
.tabs__tab[aria-selected="true"] { color: var(--c-brand); border-bottom-color: var(--c-brand); }
.tabs__tab:hover { color: var(--c-text); }
.tabs__tab:focus-visible { outline: 2px solid var(--c-brand); outline-offset: -2px; }
/* On a wide screen the tabs need not fill the line. */
@media (min-width: 48rem) { .tabs__tab { flex: 0 0 auto; padding: var(--space-3) var(--space-5); } }

/* The strip of days above each of a province's game lists: one pill per
   day, the day name over its number so a week fits across a phone, scrolling sideways
   rather than wrapping, the way a calendar strip does. */
.days {
    display: flex;
    gap: var(--space-2);
    margin: 0 0 var(--space-2);
    max-width: 100%;
    overflow-x: auto;
    /* Room under the pills for the bar, so it never sits on them. Thin and
       visible: the days past the edge are the whole point of scrolling, and
       a mouse has no other way to get to them. */
    padding-bottom: var(--space-3);
    scrollbar-width: thin;
    scrollbar-color: var(--c-faint) transparent;
    scroll-snap-type: x proximity;
}
.days__day { scroll-snap-align: start; }
.days__day {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: var(--tap);
    padding: var(--space-1) var(--space-2);
    line-height: 1.15;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-muted);
    font: inherit;
    font-size: .6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
}
.days__num { font-size: 1rem; letter-spacing: 0; color: var(--c-text); }
.days__day:hover { border-color: var(--c-brand-soft); }
.days__day[aria-pressed="true"] { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }
.days__day[aria-pressed="true"] .days__num { color: var(--c-on-brand); }
.days__day--today { border-color: var(--c-brand); }
.days__day:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 1px; }
.days[hidden], [data-day][hidden] { display: none; }
/* A day block after another gets its divider, as a head after a game does. */
[data-day] + [data-day] .card__head { border-top: 1px solid var(--c-border); }

/* ---------- 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 finder: the search box and the three filters in one frame, so the
   page reads as "narrow the list" then "the list". Not a .card: that clips
   overflow, and the search suggestions drop below the frame. Tighter than
   the search box standing alone. */
.finder {
    margin-bottom: var(--space-5);
    padding: var(--space-3) var(--space-4);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.finder .search { margin-bottom: var(--space-3); }
.finder .search input[type="search"] { min-height: 2.5rem; }
.finder .search button { width: 2.25rem; height: 2.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.filters__field { flex: 1 1 8rem; }
.filters__label { display: block; font-size: .75rem; color: var(--c-muted); margin-bottom: var(--space-1); }
.filters select {
    font: inherit;
    font-size: .9375rem;
    width: 100%;
    min-height: 2.5rem;
    padding: 0 var(--space-3);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-alt);
    color: var(--c-text);
}
.filters select:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 1px; }
/* The rows and the form set their own display, which would otherwise win
   over the hidden attribute. A folded group takes its title with it. */
.filters[hidden], .index__row[hidden], [data-index-group][hidden] { display: none; }

/* ---------- 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; }

/* ---------- the feed ---------- */

/* A block title names a followed thing, so it is a link, and it carries the
   mark of its kind -- the words stay in the section-title's small capitals. */
.section-title--kind { display: flex; align-items: center; gap: var(--space-2); }
.section-title--kind a { color: inherit; text-decoration: none; }
.section-title--kind a:hover { text-decoration: underline; }
.kind-icon { flex-shrink: 0; color: var(--c-brand); }

/* The way from a block to its page, as the last row of the card. */
.card__more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--tap);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--c-border);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--c-brand);
}
.card__more::after { content: "›"; color: var(--c-faint); font-size: 1.125rem; }
.card__more:hover { background: var(--c-surface-alt); }

.card__note { margin: 0; padding: var(--space-2) var(--space-4) var(--space-3); font-size: .75rem; color: var(--c-muted); }
.followed__note { margin: var(--space-3) 0 0; font-size: .75rem; 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; }
}

/* ---------- match head and score ---------- */

.match-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); text-align: center; }
.match-head__serie { margin: 0; font-size: .8125rem; font-weight: 500; }
.match-head__serie a { display: inline-flex; align-items: center; gap: var(--space-1); text-decoration: none; }
.match-head__serie a:hover { text-decoration: underline; }
.match-head__title { margin: 0; font-size: 1.125rem; line-height: 1.25; text-wrap: balance; }
.match-head__title a { color: inherit; text-decoration: none; }
.match-head__title a:hover { text-decoration: underline; }
.match-head__when { margin: 0; font-size: .8125rem; color: var(--c-muted); }

/* The final score, the one figure the page exists for: large, one line. */
.score { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-2) 0 0; font-variant-numeric: tabular-nums; }
.score__num { font-size: 3.5rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.score__num--lost { color: var(--c-muted); }
.score__dash { font-size: 2.25rem; line-height: 1; color: var(--c-faint); }
.score--none { font-size: 1rem; font-weight: 600; color: var(--c-muted); }

/* The sets, as a row of small tiles under the score. */
.sets { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin: calc(-1 * var(--space-3)) 0 var(--space-5); }
.set {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: var(--space-2) var(--space-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.set__label { font-size: .625rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.set__points { font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.card__more-value { font-weight: 700; color: var(--c-text); font-variant-numeric: tabular-nums; }

.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__chart { background: var(--c-surface-alt); border-radius: var(--radius-sm); }
.run svg { display: block; height: 64px; }
.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 { display: flex; align-items: center; gap: var(--space-1);
    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, first visit ---------- */

/* Quiet on purpose: a note for whoever arrives empty-handed, not a banner. */
.hero { margin: var(--space-4) 0 var(--space-5); padding: var(--space-4) var(--space-4) var(--space-5); border: 1px dashed var(--c-faint); border-radius: var(--radius); }
.hero h1 { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--space-3); color: var(--c-muted); text-wrap: balance; }
.hero__lead { margin: 0 0 var(--space-2); max-width: 36rem; font-size: .875rem; line-height: 1.5; color: var(--c-muted); }
.hero__lead .kind-icon { vertical-align: -3px; }
.hero__ways { display: grid; gap: var(--space-3); margin-top: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 36rem; }
.hero__way {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--tap);
    padding: var(--space-4);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}
.hero__way:hover { border-color: var(--c-brand-soft); }
.hero__way .kind-icon { flex-shrink: 0; }
.hero__way > span { display: flex; flex-direction: column; gap: 2px; }
.hero__way-note { font-size: .8125rem; color: var(--c-muted); }

/* ---------- 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); }
}

/* The source, at the foot of a match: quiet, and always reachable. */
.portal { margin: var(--space-4) 0 0; font-size: .8125rem; }

/* ---------- 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: the ways in that fewer people take. */
.subscribe__other { border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-muted); }
.subscribe__other: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; }
}
