/* ==========================================================================
   Broadcast ("Scoreline") theme for the fixja.ninja public site.
   Match-day television on a page you read: ink frames, paper to read on,
   the tenant primary as the network colour. Hard edges, no radii.
   Every colour is derived from the seven tenant variables
   (--primary --secondary --success --warning --danger --dark --light).
   ========================================================================== */

:root {
    /* --- Derived colours --------------------------------------------------- */
    /* Ink: the tenant dark, forced dark enough to read on paper. */
    --ink: oklch(from var(--dark) min(l, 0.24) min(c, 0.05) h);
    --ink-2: color-mix(in oklab, var(--ink) 86%, white);
    /* Paper: the tenant light, forced light and nearly neutral. */
    --paper: oklch(from var(--light) max(l, 0.975) min(c, 0.012) h);
    --panel: color-mix(in oklab, var(--ink) 5%, var(--paper));
    --line: color-mix(in oklab, var(--ink) 16%, var(--paper));
    --muted: color-mix(in oklab, var(--ink) 70%, var(--paper));
    --on-ink: var(--paper);
    --on-ink-muted: color-mix(in oklab, var(--paper) 74%, var(--ink));

    /* Signal: the tenant primary as a fill. Text on it flips between near
       black and near white on the fill's own lightness, so any primary,
       pale or dark, carries readable text. */
    --signal: var(--primary);
    --on-signal: oklch(from var(--primary) clamp(0.13, (0.57 - l) * 100, 0.99) min(c, 0.03) h);
    /* The primary as text or a rule on paper: never lighter than L 0.47. */
    --signal-ink: oklch(from var(--primary) min(l, 0.47) c h);
    /* The primary as a rule or text on ink: never darker than L 0.8. */
    --signal-lit: oklch(from var(--primary) max(l, 0.8) c h);
    --wash: color-mix(in oklab, var(--primary) 13%, var(--paper));

    /* Outcomes, from success / danger / warning, with inks that read. */
    /* Outcome fills are clamped dark enough to carry white text whatever
       the tenant's success and danger colours are. */
    --win: oklch(from var(--success) min(l, 0.5) c h);
    --on-win: white;
    --win-ink: oklch(from var(--success) min(l, 0.46) c h);
    --loss: oklch(from var(--danger) min(l, 0.52) c h);
    --on-loss: white;
    --loss-ink: oklch(from var(--danger) min(l, 0.48) c h);
    --loss-wash: color-mix(in oklab, var(--danger) 14%, var(--paper));
    --pending-wash: color-mix(in oklab, var(--warning) 32%, var(--paper));

    /* --- Type ---------------------------------------------------------------- */
    --font: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --t-xs: 0.8125rem;   /* 13 */
    --t-s: 0.9375rem;    /* 15 */
    --t-m: 1.0625rem;    /* 17 */
    --t-l: 1.375rem;     /* 22 */
    --t-xl: 1.875rem;    /* 30 */
    --t-2xl: 2.5rem;     /* 40 */
    --t-3xl: clamp(2.5rem, 1.6rem + 4.6vw, 5.25rem);

    /* --- Space ----------------------------------------------------------- */
    --gutter: clamp(1rem, 3.4vw, 3rem);
    --sticky: 3rem;
    --cut: 0.6rem;

    color-scheme: light;
    scroll-padding-top: calc(var(--sticky) + 1rem);
}

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    font-stretch: 100%;
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; outline: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* On ink the ring takes the lit signal; on the tenant colour, its own ink. */
.bc-site :focus-visible, .bc-onpage :focus-visible, .bc-bug :focus-visible, .bc-footer :focus-visible,
.bc-round-head :focus-visible, .bc-club-head :focus-visible, a.bc-card:focus-visible, a.bc-tile:focus-visible,
.bc-action.is-primary:focus-visible { outline-color: var(--signal-lit); }
.bc-head :focus-visible, .bc-hero :focus-visible { outline-color: var(--on-signal); }
abbr[title] { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 1em; }

.bc-sr {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bc-skip {
    position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
    background: var(--signal); color: var(--on-signal); padding: 0.6rem 1rem; font-weight: 700;
}
.bc-skip:focus { top: 0.5rem; }

.bc-wrap { width: 100%; max-width: 86rem; margin-inline: auto; padding-inline: var(--gutter); }

/* The display voice: Archivo at its narrowest and heaviest. */
.bc-title, .bc-h2, .bc-brand-name, .bc-round-name, .bc-strip-time, .bc-strip-score,
.bc-strip-v, .bc-pos, .bc-pts, .bc-tag, .bc-bug-score, .bc-bug-time, .bc-big,
.bc-footer-name, .bc-stage-title, .bc-tile-name, .bc-num {
    font-stretch: 62%;
    font-weight: 800;
    line-height: 0.95;
    font-variant-numeric: tabular-nums lining-nums;
}

/* --- Site bar ------------------------------------------------------------ */
.bc-site {
    background: var(--ink);
    color: var(--on-ink);
    border-bottom: 3px solid var(--signal-lit);
    position: relative;
    z-index: 30;
}
.bc-site-inner {
    max-width: 86rem; margin-inline: auto; padding-inline: var(--gutter);
    display: flex; align-items: center; gap: 1rem; min-height: 3.75rem;
}
.bc-brand { color: var(--on-ink); text-decoration: none; display: flex; align-items: center; gap: 0.6rem; margin-right: auto; padding-block: 0.5rem; }
.bc-brand img { max-height: 2.5rem; width: auto; }
.bc-brand-name { font-size: 1.625rem; letter-spacing: 0.005em; }
.bc-menu-button {
    display: none;
    align-items: center; gap: 0.55rem;
    background: transparent; color: var(--on-ink);
    border: 2px solid var(--on-ink-muted);
    font: 700 var(--t-s)/1 var(--font);
    padding: 0.55rem 0.8rem; min-height: 2.75rem; cursor: pointer;
}
.bc-menu-button[aria-expanded="true"] { background: var(--signal-lit); color: var(--ink); border-color: var(--signal-lit); }
.bc-menu-icon, .bc-menu-icon::before, .bc-menu-icon::after {
    display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative;
}
.bc-menu-icon::before, .bc-menu-icon::after { content: ""; position: absolute; left: 0; }
.bc-menu-icon::before { top: -6px; }
.bc-menu-icon::after { top: 6px; }
.bc-menu { display: flex; align-items: center; gap: 1.5rem; }
.bc-menu-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.bc-menu-list a, .bc-account a, .bc-account button {
    display: flex; align-items: center; min-height: 3.75rem; padding-inline: 0.7rem;
    color: var(--on-ink); text-decoration: none; font-weight: 600; font-size: var(--t-s);
    border-bottom: 4px solid transparent; border-top: 4px solid transparent;
}
.bc-menu-list a:hover { border-bottom-color: var(--on-ink-muted); }
.bc-menu-list a[aria-current] { border-bottom-color: var(--signal-lit); }
.bc-account { display: flex; align-items: center; gap: 0.25rem; }
.bc-account form { margin: 0; }
.bc-account a, .bc-account button { color: var(--on-ink-muted); background: none; border-left: 0; border-right: 0; font-family: var(--font); cursor: pointer; }
.bc-account a:hover, .bc-account button:hover { color: var(--on-ink); }

@media (max-width: 63.99rem) {
    .js .bc-menu-button { display: inline-flex; }
    .bc-site-inner { flex-wrap: wrap; }
    .bc-menu { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.75rem; }
    .js .bc-menu { display: none; }
    .js .bc-menu.is-open { display: flex; }
    .bc-menu-list { flex-direction: column; gap: 0; }
    .bc-menu-list a { min-height: 3.25rem; font-size: var(--t-l); font-stretch: 75%; font-weight: 700; border: 0; border-top: 1px solid color-mix(in oklab, var(--paper) 18%, var(--ink)); padding-inline: 0; }
    .bc-menu-list a[aria-current] { color: var(--signal-lit); box-shadow: inset 4px 0 0 var(--signal-lit); padding-left: 0.9rem; }
    .bc-account { border-top: 1px solid color-mix(in oklab, var(--paper) 18%, var(--ink)); }
    .bc-account a, .bc-account button { min-height: 3rem; padding-inline: 0; border: 0; }
    .bc-brand-name { font-size: 1.375rem; }
}

/* --- Head band: the tenant colour, trail, title, meta ------------------- */
.bc-head { background: var(--signal); color: var(--on-signal); }
.bc-head-inner { padding-block: 1.1rem 1.6rem; }
.bc-head a { color: inherit; }
.bc-trail {
    list-style: none; margin: 0 0 0.6rem; padding: 0;
    display: flex; flex-wrap: wrap; gap: 0.15rem 0;
    font-size: var(--t-xs); font-weight: 600; line-height: 1.4;
}
.bc-trail:empty { display: none; }
.bc-trail li { display: inline-flex; align-items: center; }
.bc-trail li + li::before { content: "/"; margin-inline: 0.45rem; opacity: 0.7; font-weight: 400; }
.bc-trail a { text-decoration-thickness: 1px; }
.bc-title { font-size: var(--t-3xl); letter-spacing: -0.01em; text-wrap: balance; margin: 0; max-width: 20ch; }
.bc-meta { margin: 0.7rem 0 0; font-size: var(--t-m); font-weight: 500; max-width: 60ch; }
.bc-meta p:last-child { margin-bottom: 0; }
@media (min-width: 64rem) {
    .bc-head-inner { padding-block: 1.6rem 2.4rem; }
    .bc-trail { font-size: var(--t-s); margin-bottom: 1rem; }
}

/* Breadcrumbs outside the competition pages */
.bc-crumbs { background: var(--panel); border-bottom: 1px solid var(--line); }
.bc-crumbs .bc-trail { margin: 0; padding-block: 0.6rem; }

/* --- Headings, notices --------------------------------------------------- */
.bc-h2 { font-size: var(--t-xl); margin: 2rem 0 0.85rem; letter-spacing: -0.005em; }
.bc-h2:first-child { margin-top: 0; }
.bc-h2 small { font: 500 var(--t-s)/1.3 var(--font); color: var(--muted); margin-left: 0.4rem; letter-spacing: 0; }
@media (min-width: 64rem) { .bc-h2 { font-size: 2.25rem; } }
.bc-stage-title { font-size: var(--t-l); margin: 1.5rem 0 0.75rem; }
.bc-small { font-size: var(--t-s); color: var(--muted); margin-top: 0.6rem; }
.bc-empty { color: var(--muted); font-size: var(--t-m); padding: 1rem 0; margin: 0; }
.bc-notice { border-left: 6px solid var(--signal); background: var(--panel); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.bc-notice .bc-h2 { margin: 0 0 0.4rem; font-size: var(--t-l); }
.bc-notice p { margin: 0; }
.bc-section { margin-bottom: 1.5rem; }

/* The tag: a cut-corner tab, the theme's one ornament. */
.bc-tag {
    display: inline-flex; align-items: center;
    background: var(--signal); color: var(--on-signal);
    font-size: var(--t-s); letter-spacing: 0.01em;
    padding: 0.3rem calc(0.7rem + var(--cut)) 0.3rem 0.6rem;
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
}

/* --- On-page strip: sticky in-page links on long pages ------------------- */
.bc-onpage {
    position: sticky; top: 0; z-index: 20;
    background: var(--ink); color: var(--on-ink);
}
.bc-onpage-inner { display: flex; align-items: stretch; gap: 1rem; min-height: var(--sticky); }
.bc-onpage-title { display: none; align-self: center; font-stretch: 62%; font-weight: 800; font-size: var(--t-l); white-space: nowrap; }
.bc-onpage-links { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.bc-onpage-links::-webkit-scrollbar { display: none; }
.bc-onpage-links a {
    display: flex; align-items: center; white-space: nowrap;
    padding-inline: 0.8rem; color: var(--on-ink); text-decoration: none; font-weight: 600; font-size: var(--t-s);
    border-bottom: 4px solid transparent; border-top: 4px solid transparent;
}
.bc-onpage-links a:hover { border-bottom-color: var(--on-ink-muted); }
.bc-onpage-links a:first-child {
    background: var(--signal-lit); color: var(--ink); border: 0;
    padding-right: calc(0.9rem + var(--cut));
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
    font-weight: 800;
}
.bc-onpage-links .bc-onpage-cal { color: var(--on-ink-muted); }
@media (min-width: 64rem) {
    .bc-onpage-title { display: block; padding-right: 0.5rem; border-right: 1px solid color-mix(in oklab, var(--paper) 22%, var(--ink)); margin-right: 0.25rem; padding-right: 1.25rem; }
    .bc-onpage-links { margin-inline: 0; padding-inline: 0; flex: 1; }
    .bc-onpage-links .bc-onpage-cal { margin-left: auto; }
}

/* --- Division layout ------------------------------------------------------ */
.bc-comp { padding-bottom: 0; }
.bc-division { display: grid; gap: 0 3.5rem; padding-top: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.bc-division-ladder { margin-top: 1.5rem; }
/* From 1024 px the ladder is pinned beside the rounds: it sticks below the
   ink strip, stays inside its own grid column (so it never runs over the
   footer), and a ladder taller than the window scrolls within the column. */
@media (min-width: 64rem) {
    .bc-division { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); grid-template-areas: "now ladder" "all ladder"; column-gap: 2.5rem; padding-top: 2rem; }
    .bc-division-now { grid-area: now; }
    .bc-division-all { grid-area: all; }
    .bc-division-ladder {
        grid-area: ladder; align-self: start; margin-top: 0;
        position: sticky; top: calc(var(--sticky) + 1rem);
        max-height: calc(100vh - var(--sticky) - 2rem);
        max-height: calc(100dvh - var(--sticky) - 2rem);
        overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
        padding: 0 0.25rem 0.5rem 1.5rem; border-left: 4px solid var(--ink);
    }
    .bc-division.has-no-ladder { grid-template-columns: minmax(0, 52rem); grid-template-areas: "now" "all"; }
}
@media (min-width: 80rem) {
    .bc-division { grid-template-columns: minmax(0, 1fr) minmax(0, 38.5rem); column-gap: 3rem; }
}

/* --- Rounds: an ink slab over a run of score strips ---------------------- */
.bc-rounds { display: grid; gap: 1.25rem; }
.bc-round { scroll-margin-top: calc(var(--sticky) + 0.75rem); }
.bc-round-head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.75rem;
    background: var(--ink); color: var(--on-ink);
    padding: 0.5rem 0 0.5rem 0.85rem; min-height: 2.75rem;
    font-size: 1rem; font-weight: 500;
}
.bc-round-name { font-size: var(--t-l); }
.bc-round-date { font-size: var(--t-s); color: var(--on-ink-muted); }
.bc-round-head .bc-tag { margin-left: auto; align-self: stretch; margin-block: -0.5rem; background: var(--ink); color: var(--signal-lit); }
.bc-round.is-next .bc-round-head { background: var(--signal); color: var(--on-signal); }
.bc-round.is-next .bc-round-date { color: inherit; }
.bc-round.is-next .bc-round-head .bc-tag { background: var(--ink); color: var(--on-ink); }

/* --- Score strips ---------------------------------------------------------- */
.bc-strips { container-type: inline-size; border: 1px solid var(--line); border-top: 0; background: var(--paper); }
.bc-strip {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr) 2.6rem;
    grid-template-areas: "when home hs" "when away as" "when status status";
    column-gap: 0.75rem; row-gap: 0.3rem;
    padding: 0.7rem 0.75rem 0.7rem 0.85rem;
    color: var(--ink); text-decoration: none;
    border-top: 1px solid var(--line);
    position: relative;
}
.bc-strip:first-child { border-top: 0; }
a.bc-strip:hover { background: var(--wash); }
a.bc-strip:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.bc-strip-when { grid-area: when; display: flex; flex-direction: column; gap: 0.2rem; padding-right: 0.5rem; border-right: 1px solid var(--line); }
.bc-strip-time { font-size: 1.3rem; }
.bc-strip-date { font-weight: 700; font-size: var(--t-xs); white-space: nowrap; }
.bc-strip-venue { display: block; }
.bc-strip-place { font-size: var(--t-xs); color: var(--muted); line-height: 1.25; }
.bc-strip-team { font-size: var(--t-m); font-weight: 600; line-height: 1.2; display: flex; align-items: center; min-height: 2rem; overflow-wrap: anywhere; }
.bc-strip-team.is-home { grid-area: home; }
.bc-strip-team.is-away { grid-area: away; }
.bc-strip-team.is-winner { font-weight: 800; }
.bc-strip-team.is-loser { color: var(--muted); font-weight: 500; }
.bc-strip-team.is-us { text-decoration: underline; text-decoration-color: var(--signal-ink); text-decoration-thickness: 3px; text-underline-offset: 0.25em; }
.bc-strip-score {
    display: grid; place-items: center; height: 2rem; min-width: 2.6rem; padding-inline: 0.25rem;
    font-size: 1.45rem; background: var(--panel); color: var(--muted);
}
.bc-strip-score.is-home { grid-area: hs; }
.bc-strip-score.is-away { grid-area: as; }
.bc-strip-score.is-winner { background: var(--ink); color: var(--on-ink); }
.is-draw .bc-strip-score { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.bc-strip-v { display: none; }
.bc-strip-status { grid-area: status; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.bc-strip-status:empty { display: none; }
.bc-strip-division { font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.bc-flag { font-size: var(--t-xs); font-weight: 700; padding: 0.1rem 0.45rem; background: var(--panel); color: var(--ink); line-height: 1.4; }
.bc-flag.is-ft { display: none; }
.bc-flag.is-forfeit { background: var(--loss-wash); color: var(--loss-ink); }
.bc-flag.is-draw { background: var(--ink); color: var(--on-ink); }
.bc-flag.is-pending { background: var(--pending-wash); color: var(--ink); }
.bc-strip.is-bye { grid-template-areas: "when home home" "when status status"; }
.bc-strip.is-bye .bc-strip-team { color: var(--muted); }
.bc-strip.is-bye .bc-strip-time { color: var(--muted); }

@container (min-width: 36rem) {
    .bc-strip {
        grid-template-columns: 6rem minmax(0, 1fr) 2.75rem 2.75rem minmax(0, 1fr) 7.25rem;
        grid-template-areas: "when home hs as away status";
        align-items: center; column-gap: 0.5rem; padding-block: 0.6rem;
    }
    .bc-strip-when { border-right: 0; }
    .bc-strip-team.is-home { justify-content: flex-end; text-align: right; padding-right: 0.5rem; }
    .bc-strip-team.is-away { padding-left: 0.5rem; }
    .bc-strip-score { height: 2.6rem; font-size: 1.75rem; }
    .bc-strip-v { display: grid; place-items: center; grid-column: hs-start / as-end; grid-row: 1; color: var(--muted); font-size: var(--t-l); height: 2.6rem; border: 1px dashed var(--line); }
    .bc-strip-status { justify-content: flex-end; text-align: right; }
    .bc-flag.is-ft { display: inline-block; background: none; color: var(--muted); padding: 0; font-weight: 600; }
    .bc-strip.is-bye { grid-template-areas: "when home home home away status"; }
    .bc-strip.is-bye .bc-strip-team { grid-column: home-start / away-end; justify-content: center; }
}

/* --- Ladder ------------------------------------------------------------------ */
.bc-ladder-scroll { overflow-x: auto; border-top: 4px solid var(--ink); background: var(--paper); }
.bc-ladder-scroll:focus-visible { outline-offset: 2px; }
.bc-ladder { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums lining-nums; font-size: var(--t-s); }
.bc-ladder th, .bc-ladder td { padding: 0.55rem 0.25rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper); min-width: 1.95rem; }
.bc-ladder thead th { font-size: var(--t-xs); font-weight: 700; color: var(--muted); padding-block: 0.5rem; }
.bc-ladder .bc-pos { position: sticky; left: 0; z-index: 1; min-width: 2.25rem; width: 2.25rem; font-size: 1.2rem; text-align: center; }
.bc-ladder .bc-team { position: sticky; left: 2.25rem; z-index: 1; text-align: left; white-space: normal; min-width: 9.5rem; font-size: 1rem; font-weight: 600; line-height: 1.2; padding-left: 0.4rem; box-shadow: 6px 0 6px -6px color-mix(in oklab, var(--ink) 30%, transparent); }
.bc-ladder thead .bc-team, .bc-ladder thead .bc-pos { font-size: var(--t-xs); }
.bc-ladder .bc-team a { color: var(--ink); text-decoration: none; }
.bc-ladder .bc-team a:hover { text-decoration: underline; }
.bc-ladder tbody .bc-pts { font-size: 1.3rem; }
.bc-ladder .bc-pts { background: var(--panel); min-width: 2.6rem; }
.bc-ladder .bc-first-more { border-left: 2px solid var(--line); }
.bc-ladder .bc-more { color: var(--muted); }
.bc-ladder tr.is-us > * { background: var(--wash); }
.bc-ladder tr.is-us .bc-pos { box-shadow: inset 5px 0 0 var(--signal-ink); }
.bc-ladder tr.is-us .bc-team a { font-weight: 800; }
.bc-pool + .bc-pool { margin-top: 1.25rem; }
.bc-pool-title { font-size: var(--t-m); margin-bottom: 0.4rem; }

/* --- Division page spacing ------------------------------------------- */
.bc-division-all { margin-top: 2.5rem; }
.bc-division-now > .bc-round + .bc-h2, .bc-division-now > .bc-notice + .bc-h2 { margin-top: 2.25rem; }

/* --- Match page: a slim band, then the score bug ------------------------- */
.bc-head-slim .bc-head-inner { padding-block: 0.9rem 1rem; }
.bc-head-slim .bc-trail { margin-bottom: 0.3rem; }
.bc-head-slim .bc-meta { margin: 0; font-weight: 700; }
.bc-bug { background: var(--ink); color: var(--on-ink); }
.bc-bug a { color: inherit; text-decoration: none; }
.bc-bug a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.bc-bug-inner { padding-block: 1.1rem 1.6rem; }
.bc-bug-status { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin: 0 0 1rem; }
.bc-bug-status .bc-tag { background: var(--signal-lit); color: var(--ink); }
.is-pending .bc-bug-status .bc-tag { background: var(--warning); color: oklch(from var(--warning) clamp(0.13, (0.57 - l) * 100, 0.99) 0 0); }
.bc-bug-date { color: var(--on-ink-muted); font-weight: 600; }
.bc-bug-board { display: grid; gap: 0.5rem; margin: 0; font-weight: 400; }
.bc-bug-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; }
.bc-bug-team { font-stretch: 62%; font-weight: 800; font-size: clamp(2rem, 1.2rem + 3.6vw, 4rem); line-height: 0.95; text-wrap: balance; }
.bc-bug-score {
    font-stretch: 62%; font-weight: 800; font-variant-numeric: tabular-nums lining-nums;
    font-size: clamp(3.25rem, 2rem + 6vw, 7.5rem); line-height: 1;
    min-width: 1.5em; text-align: center; padding: 0.05em 0.15em;
    background: var(--ink-2); color: var(--on-ink-muted);
}
.bc-bug-side.is-winner .bc-bug-score { background: var(--signal); color: var(--on-signal); }
.bc-bug-side.is-loser .bc-bug-team { color: var(--on-ink-muted); }
.is-draw .bc-bug-score { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 4px var(--on-ink); }
.bc-bug-v { font-stretch: 62%; font-weight: 800; color: var(--on-ink-muted); font-size: var(--t-l); line-height: 1; }
.is-result .bc-bug-v { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bc-bug-note { margin: 1rem 0 0; font-weight: 600; color: var(--signal-lit); }
.bc-bug-when { margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; padding-top: 1rem; border-top: 1px solid color-mix(in oklab, var(--paper) 20%, var(--ink)); }
.bc-bug-time { font-stretch: 62%; font-weight: 800; font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.bc-bug-place { font-size: var(--t-m); font-weight: 600; }
.bc-bug-place a { text-decoration: underline; text-decoration-thickness: 1px; }
.is-upcoming .bc-bug-when, .is-pending .bc-bug-when { border-top: 0; padding-top: 0; flex-direction: column; align-items: flex-start; }
.is-upcoming .bc-bug-time { font-size: clamp(4rem, 2.5rem + 7vw, 8rem); color: var(--signal-lit); line-height: 0.9; }
.is-upcoming .bc-bug-place { font-size: var(--t-l); }
@media (min-width: 48rem) {
    .bc-bug-inner { padding-block: 1.5rem 2.25rem; }
    .bc-bug-board { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
    .bc-bug-side.is-home { grid-template-columns: minmax(0, 1fr) auto; text-align: right; }
    .bc-bug-side.is-away { grid-template-columns: auto minmax(0, 1fr); }
    .bc-bug-side.is-away .bc-bug-score { order: -1; }
    .is-result .bc-bug-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; }
    .bc-bug-status { justify-content: center; }
    .bc-bug-when, .bc-bug-note { justify-content: center; text-align: center; }
    .is-upcoming .bc-bug-when, .is-pending .bc-bug-when { align-items: center; }
}

.bc-match { display: grid; gap: 0 3.5rem; padding-top: 2rem; }
@media (min-width: 64rem) {
    .bc-match { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .bc-match-stats { grid-column: 1 / -1; }
}
.bc-links { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 4px solid var(--ink); }
.bc-links a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; padding: 0.85rem 2.5rem 0.85rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; position: relative; }
.bc-links a::after { content: ""; position: absolute; right: 0.6rem; top: 50%; width: 0.6rem; height: 0.6rem; border-top: 3px solid var(--signal-ink); border-right: 3px solid var(--signal-ink); transform: translateY(-50%) rotate(45deg); }
.bc-links a:hover { background: var(--wash); }
.bc-links b { font-size: var(--t-m); }
.bc-links span { color: var(--muted); font-size: var(--t-s); }
.bc-facts { margin: 0 0 2rem; border-top: 4px solid var(--ink); }
.bc-facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.bc-facts dt { color: var(--muted); font-weight: 600; font-size: var(--t-s); }
.bc-facts dd { margin: 0; font-weight: 600; }
.bc-stats { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .bc-stats { grid-template-columns: 1fr 1fr; } }

/* --- Team page ------------------------------------------------------------ */
.bc-team { display: grid; gap: 0 3.5rem; padding-top: 1.75rem; grid-template-columns: minmax(0, 1fr); }
.bc-team > * { min-width: 0; }
.bc-team-last, .bc-team-side, .bc-team-all, .bc-team-players { margin-top: 2.25rem; }
/* The team page pins its standing and ladder the same way. */
@media (min-width: 64rem) {
    .bc-team { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); grid-template-areas: "next side" "last side" "all side" "players side"; column-gap: 2.5rem; padding-top: 2.25rem; }
    .bc-team-next { grid-area: next; }
    .bc-team-last { grid-area: last; }
    .bc-team-all { grid-area: all; }
    .bc-team-players { grid-area: players; }
    .bc-team-side {
        grid-area: side; margin-top: 0; align-self: start;
        position: sticky; top: 1rem;
        max-height: calc(100vh - 2rem);
        max-height: calc(100dvh - 2rem);
        overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
        padding: 0 0.25rem 0.5rem 1.5rem; border-left: 4px solid var(--ink);
    }
}
@media (min-width: 80rem) {
    .bc-team { grid-template-columns: minmax(0, 1fr) minmax(0, 38.5rem); column-gap: 3rem; }
}
.bc-card { display: grid; gap: 0.35rem; background: var(--ink); color: var(--on-ink); padding: 1.1rem 1.2rem 0; text-decoration: none; border-left: 8px solid var(--signal); }
a.bc-card:hover .bc-card-go { text-decoration: underline; }
.bc-card-day { font-weight: 700; font-size: var(--t-m); }
.bc-big { font-size: clamp(3.5rem, 2.6rem + 4vw, 5.5rem); color: var(--signal-lit); }
.bc-card-where { font-size: var(--t-l); font-weight: 700; line-height: 1.2; }
.bc-card-vs { font-size: var(--t-m); color: var(--on-ink-muted); }
.bc-card-vs b { color: var(--on-ink); }
.bc-card-foot { display: flex; justify-content: space-between; gap: 1rem; margin: 0.6rem -1.2rem 0 -1.2rem; padding: 0.6rem 1.2rem; border-top: 1px solid color-mix(in oklab, var(--paper) 18%, var(--ink)); color: var(--on-ink-muted); font-size: var(--t-s); font-weight: 600; }
.bc-card-go { color: var(--on-ink); font-weight: 700; }
.bc-result-line { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; font-weight: 600; }
.bc-chip { display: inline-block; padding: 0.2rem 0.65rem; font-weight: 800; font-size: var(--t-s); }
.bc-chip.is-won { background: var(--win); color: var(--on-win); }
.bc-chip.is-lost { background: var(--loss); color: var(--on-loss); }
.bc-chip.is-drew { background: var(--ink); color: var(--on-ink); }
.bc-standing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; border-top: 4px solid var(--ink); padding-top: 1rem; }
.bc-stat { margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.bc-stat .bc-num { font-size: 3.25rem; }
.bc-stat span:last-child { color: var(--muted); font-weight: 600; font-size: var(--t-s); }
.bc-form, .bc-record { grid-column: 1 / -1; }
.bc-form-label { display: block; font-size: var(--t-s); font-weight: 600; color: var(--muted); margin-bottom: 0.4rem; }
.bc-pips { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.35rem; }
.bc-pip { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; font-stretch: 62%; font-weight: 800; font-size: 1.4rem; text-decoration: none; }
.bc-pip.is-won { background: var(--win); color: var(--on-win); }
.bc-pip.is-lost { background: var(--loss); color: var(--on-loss); }
.bc-pip.is-drew { background: var(--ink); color: var(--on-ink); }
.bc-pip:hover { outline: 3px solid var(--ink); outline-offset: 2px; }
.bc-record { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0.5rem 0 0; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.bc-record div { display: flex; flex-direction: column-reverse; gap: 0.1rem; }
.bc-record dt { font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
.bc-record dd { margin: 0; font-stretch: 62%; font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.bc-team-side .bc-section { margin-top: 2.25rem; }
.bc-strip.is-next { background: var(--wash); box-shadow: inset 6px 0 0 var(--signal-ink); }
.bc-flag.is-next { background: var(--signal); color: var(--on-signal); }

/* --- Season, index, competition ------------------------------------------ */
.bc-season, .bc-index, .bc-club, .bc-place { padding-top: 1.75rem; }
.bc-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .bc-tiles { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); } }
.bc-tile { display: grid; gap: 0.3rem; padding: 1rem 1.1rem; background: var(--ink); color: var(--on-ink); text-decoration: none; border-bottom: 6px solid var(--signal); min-height: 100%; }
.bc-tile:hover { background: var(--ink-2); }
.bc-tile-name { font-size: 2.25rem; }
.bc-tile-detail { color: var(--on-ink-muted); font-weight: 600; font-size: var(--t-s); }
.bc-tile-go { font-weight: 700; color: var(--signal-lit); margin-top: 0.4rem; }
.bc-season-cols { display: grid; gap: 0 3.5rem; margin-top: 2.5rem; }
@media (min-width: 72rem) { .bc-season-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); } }
.bc-slot { margin-bottom: 1.25rem; }
.bc-slot-head, .bc-slot-time { display: flex; align-items: baseline; gap: 0.75rem; background: var(--ink); color: var(--on-ink); padding: 0.5rem 0.85rem; font-size: 1rem; font-weight: 500; }
.bc-slot-time { background: transparent; color: var(--ink); padding: 0.9rem 0 0.4rem; border-bottom: 3px solid var(--ink); font-stretch: 62%; font-weight: 800; font-size: var(--t-l); }
.bc-slot-head .bc-round-date { color: var(--on-ink-muted); }
.bc-slot-grid { display: grid; gap: 0.5rem; padding-top: 0.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .bc-slot-grid { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); } }
.bc-slot-grid > .bc-strips { border-top: 1px solid var(--line); }
.bc-slot-grid .bc-strip-time { display: none; }
.bc-slot-grid .bc-strip-place { font-size: var(--t-m); font-weight: 800; color: var(--ink); }
.bc-slot-grid .bc-strip-venue { font-size: var(--t-xs); font-weight: 500; color: var(--muted); }
.bc-slot-grid .bc-strip.is-bye .bc-strip-time { display: block; }
.bc-places { list-style: none; margin: 0; padding: 0; border-top: 4px solid var(--ink); }
.bc-places li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.bc-place-name { font-size: var(--t-l); font-stretch: 75%; font-weight: 800; margin-bottom: 0.5rem; }
.bc-place-name a { color: var(--ink); }
.bc-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.bc-chip-link { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.3rem 0.8rem; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--t-s); white-space: nowrap; }
.bc-chip-link:hover { background: var(--wash); }
.bc-chip-link[aria-current] { background: var(--ink); color: var(--on-ink); }
.bc-chip-link.is-next { border-color: var(--signal-ink); box-shadow: inset 0 -5px 0 var(--signal); }
.bc-chip-link.is-next[aria-current] { box-shadow: inset 0 -5px 0 var(--signal-lit); }
.bc-comp-block + .bc-comp-block { margin-top: 2.5rem; }
.bc-comp-block .bc-h2 a { color: var(--ink); text-decoration: none; }
.bc-seasons { list-style: none; margin: 0; padding: 0; border-top: 4px solid var(--ink); display: flex; flex-direction: column; }
.bc-season-row.is-current { order: -1; }
.bc-season-row { display: grid; gap: 0.75rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.bc-season-name h3 { font-stretch: 62%; font-weight: 800; font-size: var(--t-2xl); line-height: 1; }
.bc-season-name h3 a { color: var(--ink); text-decoration-thickness: 2px; }
.bc-season-name p { margin: 0.4rem 0 0; color: var(--muted); font-weight: 600; display: flex; gap: 0.75rem; align-items: center; }
.bc-season-row:not(.is-current) .bc-season-name h3 { font-size: var(--t-xl); }
@media (min-width: 48rem) { .bc-season-row { grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr); align-items: center; } }

/* --- Club --------------------------------------------------------------- */
.bc-club-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .bc-club-grid { grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); } }
.bc-club-head { display: flex; flex-direction: column; gap: 0.2rem; background: var(--ink); color: var(--on-ink); padding: 0.7rem 0.85rem; border-left: 8px solid var(--signal); }
.bc-club-head .bc-round-date { font-size: var(--t-m); font-weight: 700; }
.bc-club-head a { color: var(--on-ink); }
.bc-club-label { font-size: var(--t-s); font-weight: 700; color: var(--muted); margin: 0.8rem 0 0.35rem; }
.bc-club-label + .bc-strips { border-top: 1px solid var(--line); }
.bc-club-more { margin: 0.6rem 0 0; font-weight: 600; }

/* --- Venue and ground ------------------------------------------------------ */
.bc-place-nav { display: grid; gap: 1rem; margin-bottom: 1.75rem; }
.bc-days { display: grid; gap: 0.4rem; }
.bc-days-label { font-size: var(--t-s); font-weight: 700; color: var(--muted); }
.bc-chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 0.3rem; scrollbar-width: thin; }
@media (min-width: 64rem) { .bc-chips-scroll { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
.bc-place-day { margin-bottom: 2rem; scroll-margin-top: 1rem; }
.bc-place .bc-strip-venue { display: none; }
.bc-place-day > .bc-round-head { font-size: 1rem; }
.bc-place-day.is-next > .bc-round-head { background: var(--signal); color: var(--on-signal); }
.bc-place-day.is-next > .bc-round-head .bc-round-date { color: inherit; }
.bc-place-day.is-next > .bc-round-head .bc-tag { background: var(--ink); color: var(--on-ink); }

/* --- Home: the match-day front ------------------------------------------ */
.bc-hero { background: var(--signal); color: var(--on-signal); position: relative; overflow: hidden; }
.bc-hero::after {
    /* A broadcast wedge: the ink corner a channel ident would sit in. */
    content: ""; position: absolute; right: 0; bottom: 0; width: min(24vw, 21rem); height: 100%;
    background: var(--ink); clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%); opacity: 1;
}
.bc-hero-inner { position: relative; z-index: 1; padding-block: 1.75rem 2rem; }
.bc-hero-title { font-stretch: 62%; font-weight: 800; line-height: 0.88; font-size: clamp(3.25rem, 1.5rem + 8vw, 8.5rem); letter-spacing: -0.015em; max-width: 12ch; margin: 0 0 1.5rem; text-wrap: balance; }
.bc-actions { display: grid; gap: 0.5rem; grid-template-columns: 1fr 1fr; max-width: 52rem; }
.bc-action {
    display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; min-height: 3.25rem;
    padding: 0.6rem 0.9rem; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 700;
    border: 2px solid var(--ink);
}
.bc-action:hover { background: var(--panel); }
.bc-action.is-primary { grid-column: 1 / -1; background: var(--ink); color: var(--on-ink); padding: 1rem 1.1rem; border-color: var(--ink); clip-path: polygon(0 0, 100% 0, calc(100% - 1rem) 100%, 0 100%); padding-right: 2rem; }
.bc-action.is-primary:hover { background: var(--ink-2); }
.bc-action.is-primary .bc-action-title { font-stretch: 62%; font-weight: 800; font-size: 2.1rem; line-height: 1; color: var(--signal-lit); }
.bc-action-detail { font-weight: 600; font-size: var(--t-s); color: var(--on-ink-muted); }
@media (min-width: 48rem) {
    .bc-hero-inner { padding-block: 3rem 3.25rem; }
    .bc-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bc-action.is-primary .bc-action-title { font-size: 2.75rem; }
}
@media (max-width: 47.99rem) { .bc-hero::after { display: none; } }
.bc-home { display: grid; gap: 2.5rem 3.5rem; padding-top: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .bc-home { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); padding-top: 2.75rem; } }
.bc-home-about { border-top: 4px solid var(--ink); padding-top: 1rem; }
.bc-home-about .bc-h2 { margin-top: 0; }
.bc-more-link { margin-top: 1rem; font-weight: 700; }

/* --- News ------------------------------------------------------------------- */
.bc-news { display: grid; gap: 0; border-top: 4px solid var(--ink); }
.bc-story { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.bc-story:not(:has(.bc-story-image)) { grid-template-columns: minmax(0, 1fr); }
.bc-story-image { grid-column: 2; grid-row: 1; display: block; }
.bc-story-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bc-story-text { grid-column: 1; grid-row: 1; }
.bc-story-date { font-size: var(--t-xs); font-weight: 700; color: var(--muted); margin: 0 0 0.3rem; }
.bc-story-headline { font-stretch: 75%; font-weight: 800; font-size: var(--t-l); line-height: 1.1; margin: 0 0 0.4rem; }
.bc-story-headline a { color: var(--ink); text-decoration: none; }
.bc-story-headline a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.bc-story-abstract { margin: 0; color: var(--muted); max-width: 60ch; }
.bc-story.is-lead { grid-template-columns: minmax(0, 1fr); padding-top: 0; border-top: 0; }
.bc-story.is-lead .bc-story-image { grid-column: 1; grid-row: 1; }
.bc-story.is-lead .bc-story-image img { aspect-ratio: 16 / 9; border-bottom: 6px solid var(--signal); }
.bc-story.is-lead .bc-story-text { grid-row: 2; }
.bc-story.is-lead .bc-story-headline { font-stretch: 62%; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1; }
.bc-story.is-lead .bc-story-abstract { color: var(--ink); font-size: var(--t-m); }
.bc-news > .bc-story.is-lead:first-child { padding-top: 0; }
.bc-news { border-top: 0; }
.bc-story.is-lead + .bc-story { border-top: 4px solid var(--ink); }
@media (min-width: 64rem) {
    .bc-newsroom .bc-story.is-lead { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: end; }
    .bc-newsroom .bc-story.is-lead .bc-story-text { grid-column: 2; grid-row: 1; padding-bottom: 0.5rem; }
    .bc-newsroom .bc-story.is-lead .bc-story-headline { font-size: 3.5rem; }
    .bc-newsroom .bc-news { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3.5rem; }
    .bc-newsroom .bc-story.is-lead { grid-column: 1 / -1; padding-bottom: 2rem; }
    .bc-newsroom .bc-story:not(.is-lead) { grid-template-columns: minmax(0, 1fr) 10rem; border-top: 4px solid var(--ink); border-bottom: 0; }
}
.bc-newsroom, .bc-article, .bc-page, .bc-login { padding-top: 2rem; }
.bc-pager { display: flex; gap: 1.5rem; align-items: center; margin-top: 1.5rem; font-weight: 700; }
.bc-pager span { color: var(--muted); font-weight: 500; }
.bc-title-long { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem); max-width: 24ch; }
.bc-byline { display: block; font-weight: 700; }
.bc-article { display: grid; gap: 2.5rem 3.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .bc-article { grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); } }
.bc-article-image { margin: 0 0 1.5rem; }
.bc-article-image img { width: 100%; border-bottom: 6px solid var(--signal); }
.bc-lede { font-size: var(--t-l); font-weight: 600; line-height: 1.4; }

/* --- Rich text from the CMS: bare elements only --------------------------- */
.bc-rich { max-width: 42rem; font-size: var(--t-m); line-height: 1.6; }
.bc-rich > div > :first-child, .bc-rich > :first-child { margin-top: 0; }
.bc-rich h1, .bc-rich h2, .bc-rich h3, .bc-rich h4 { font-stretch: 62%; font-weight: 800; line-height: 1; margin: 1.6em 0 0.5em; }
.bc-rich h1 { font-size: var(--t-2xl); }
.bc-rich h2 { font-size: var(--t-xl); }
.bc-rich h3 { font-size: var(--t-l); }
.bc-rich h4 { font-size: var(--t-m); font-stretch: 100%; }
.bc-rich ul, .bc-rich ol { padding-left: 1.25rem; margin: 0 0 1em; }
.bc-rich li { margin-bottom: 0.35em; }
.bc-rich ul li::marker { color: var(--signal-ink); }
.bc-rich blockquote { margin: 1.5em 0; padding: 0.5em 0 0.5em 1.1rem; border-left: 6px solid var(--signal); font-size: var(--t-l); font-weight: 600; line-height: 1.35; }
.bc-rich img { margin: 1.25em 0; }
.bc-rich table { border-collapse: collapse; width: 100%; margin: 1.25em 0; font-size: var(--t-s); font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.bc-rich th, .bc-rich td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bc-rich thead th { border-bottom: 3px solid var(--ink); }
.bc-rich hr { border: 0; border-top: 4px solid var(--ink); margin: 2em 0; }
.bc-rich strong, .bc-rich b { font-weight: 700; }
.bc-page-main .bc-rich { max-width: 44rem; }

/* --- Forms (log in, registration) ------------------------------------------- */
.bc-login { max-width: 34rem; }
.bc-login-note { color: var(--muted); }
.bc-form-fields { display: grid; gap: 1.1rem; margin-top: 1rem; border-top: 4px solid var(--ink); padding-top: 1.25rem; }
.bc-field { display: grid; gap: 0.35rem; }
.bc-field label { font-weight: 700; }
.bc-field input:not([type=checkbox]):not([type=radio]), .bc-field select, .bc-field textarea, .bc-page-main input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]) {
    font: 500 var(--t-m)/1.3 var(--font); padding: 0.7rem 0.8rem; min-height: 3rem; width: 100%;
    border: 2px solid var(--ink); background: white; color: var(--ink); border-radius: 0;
}
.bc-field input:focus-visible { outline: 3px solid var(--signal-ink); outline-offset: 1px; }
.bc-field.has-error input { border-color: var(--loss-ink); }
.bc-field-error, .bc-errors { color: var(--loss-ink); font-weight: 700; margin: 0; }
.bc-errors { list-style: none; padding: 0.75rem 1rem; background: var(--loss-wash); }
.bc-field-help { color: var(--muted); font-size: var(--t-s); margin: 0; }
.bc-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0.5rem; }
.bc-button, .bc-page-main button, .bc-page-main input[type=submit] {
    font: 800 var(--t-l)/1 var(--font); font-stretch: 75%; padding: 0.8rem 2rem 0.8rem 1.3rem; min-height: 3rem;
    background: var(--signal); color: var(--on-signal); border: 0; cursor: pointer;
    clip-path: polygon(0 0, 100% 0, calc(100% - 0.8rem) 100%, 0 100%);
}
.bc-button:hover { filter: brightness(0.94); }

.bc-place-ground .bc-slot-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) {
    .bc-place-ground .bc-place-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 0 2rem; align-items: start; }
}
.bc-page.has-aside { display: grid; gap: 2.5rem 3.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .bc-page.has-aside { grid-template-columns: minmax(0, 46rem) minmax(0, 24rem); justify-content: space-between; } }
.bc-actions-aside { display: block; margin-bottom: 2rem; max-width: none; }
.bc-actions-aside .bc-action.is-primary .bc-action-title { font-size: 2.1rem; }

/* --- Footer -------------------------------------------------------------- */
.bc-footer { background: var(--ink); color: var(--on-ink-muted); border-top: 6px solid var(--signal); }
.bc-footer-inner { display: grid; gap: 1.5rem; padding-block: 2.5rem 1.5rem; grid-template-columns: minmax(0, 1fr); }
.bc-footer-name { color: var(--on-ink); font-size: var(--t-2xl); margin: 0; max-width: 12ch; }
.bc-footer h2 { color: var(--on-ink); font-size: var(--t-s); font-weight: 700; margin-bottom: 0.4rem; }
.bc-footer a { color: var(--on-ink); }
.bc-footer .bc-rich ul { list-style: none; padding: 0; margin: 0; }
.bc-footer .bc-rich li { margin-bottom: 0.3rem; }
.bc-footer .bc-rich p { margin: 0; }
.bc-footer-legal { font-size: var(--t-xs); padding-block: 1rem 1.5rem; margin-block: 0; border-top: 1px solid color-mix(in oklab, var(--paper) 16%, var(--ink)); }
@media (min-width: 48rem) { .bc-footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
main { padding-bottom: 3rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* --- One moment of motion: the score bug's numbers drop in, like a score
       graphic going to air. Nothing else moves on its own. ------------------ */
@media (prefers-reduced-motion: no-preference) {
    .bc-bug-score, .is-upcoming .bc-bug-time { animation: bc-on-air 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    .bc-bug-side.is-away .bc-bug-score { animation-delay: 90ms; }
    @keyframes bc-on-air { from { clip-path: inset(0 0 100% 0); transform: translateY(-0.15em); } to { clip-path: inset(0 0 0 0); transform: none; } }
}

/* --- Print: the division page as a sheet for the noticeboard ------------- */
@media print {
    .bc-site, .bc-onpage, .bc-footer, .bc-skip, .bc-actions, .bc-page-aside { display: none !important; }
    body { background: white; font-size: 10pt; }
    .bc-head, .bc-hero { background: none; color: black; border-bottom: 3pt solid black; }
    .bc-head a { text-decoration: none; }
    .bc-round-head, .bc-slot-head, .bc-round.is-next .bc-round-head { background: none; color: black; border-bottom: 2pt solid black; }
    .bc-strip-score.is-winner { background: black; color: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .bc-division { display: block; }
    .bc-division-ladder { position: static; break-inside: avoid; }
    .bc-round { break-inside: avoid; }
    a { color: black; }
}

/* Cut-corner shapes clip their own outline, so they square up on focus. */
.bc-action.is-primary:focus-visible, .bc-onpage-links a:first-child:focus-visible,
.bc-button:focus-visible, .bc-page-main button:focus-visible { clip-path: none; outline-offset: 2px; }
.bc-onpage-links a:focus-visible { outline-offset: -3px; }
