:root {
    --brand-blue: #1239b8;
    --brand-blue-dark: #102a9b;
    --brand-red: #e3131a;
    --brand-yellow: #f2d000;
    --brand-muted: #52608a;
    --brand-paper: #f7f9ff;
    --brand-line: #d8e2f4;
    --brand-blue-tint: #edf3ff;
    --brand-red-tint: #fff0f0;
    --brand-yellow-tint: #fffbe2;
}

body,
.auth { background: var(--brand-paper); color: var(--brand-blue-dark); }
.site-header,
.admin-top,
.hub-hero,
.category-hero,
.results-section,
.site-footer,
.panel,
.login,
.search,
.fixture,
.result-card,
.standing,
.bracket-card,
.category-bracket { background: #fff; }
.site-header,
.admin-top { border-bottom-color: var(--brand-yellow); }
.site-brand,
.site-brand strong,
.admin-brand,
.page-heading h1,
.hub-hero h1,
.category-hero h1,
.section-head h2,
.panel h2,
.login h1,
.fixture-time strong,
.matchup strong,
.result-card>b,
.standing-row strong,
.category-summary strong,
.empty-state strong { color: var(--brand-blue-dark); }
.site-brand small,
.admin-brand span,
.sign-out,
.hero-copy,
.hero-date span,
.hero-date small,
.page-heading p:not(.eyebrow),
.section-head p:not(.eyebrow),
.fixture-time span,
.fixture-meta,
.result-card small,
.category-summary span,
.bracket-heading small,
.public-bracket-table th,
label,
th,
td small,
.panel small,
.count { color: var(--brand-muted); }
.eyebrow,
.hub-hero h1 em,
.fixture-meta span:first-child,
.schedule-public-table td:first-child,
.public-bracket-table td:first-child,
.site-footer a,
.actions a,
.panel-heading a { color: var(--brand-red); }
.admin-link,
.back-link,
.button,
.division-chip.active,
.division-chip:hover,
.schedule-tab.active,
.schedule-tab:hover,
.schedule-public-table thead,
.schedule-table thead,
.bracket-heading,
.bracket-table caption { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.button.alt { background: var(--brand-red); }
.division-chip,
.schedule-tab,
.filter-tab,
.filter-clear { border-color: var(--brand-line); background: #fff; color: var(--brand-muted); }
.schedule-section,
.category-summary,
.category-schedule-filters,
.schedule-filters,
.schedule-filter-controls { background: var(--brand-blue-tint); }
.stat-primary,
.metric { background: var(--brand-blue); }
.stat-card:nth-child(2),
.metric:nth-child(2) { border-top-color: var(--brand-blue); }
.stat-card:nth-child(3) { border-top-color: var(--brand-yellow); }
.stat-card:nth-child(4),
.metric:nth-child(4) { border-top-color: var(--brand-red); }
.metric:nth-child(2) { background: var(--brand-blue-dark); }
.metric:nth-child(3) { background: var(--brand-blue); }
.category-summary div:first-child { border-left-color: var(--brand-yellow); }
.category-summary div:nth-child(2) { border-left-color: var(--brand-blue); }
.category-summary div:nth-child(3) { border-left-color: var(--brand-red); }
.standing header,
.bracket-card div,
.bracket-table thead { background: var(--brand-yellow-tint); border-color: var(--brand-yellow); }
.bracket-card { border-top-color: var(--brand-red); }
.fixture-status,
.status { background: #fff; color: var(--brand-muted); border-color: var(--brand-line); }
.fixture-status.status-live,
.status-live { background: var(--brand-red); color: #fff; }
.fixture-status.status-completed,
.status-completed { background: var(--brand-yellow); color: var(--brand-blue-dark); }
.result-card { border-left-color: var(--brand-red); }
.schedule-public-table tbody tr:nth-child(even),
.schedule-table tbody tr:nth-child(even) { background: #fff; }
.schedule-public-table tbody tr:hover,
.schedule-table tbody tr:hover { background: var(--brand-yellow-tint); }
input,
select,
textarea { background: #fff; border-color: var(--brand-line); color: var(--brand-blue-dark); }
input:focus,
select:focus,
textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(18, 57, 184, .14); }
.notice { border-color: var(--brand-yellow); background: var(--brand-yellow-tint); color: var(--brand-blue-dark); }
.notice.error { border-color: var(--brand-red); background: var(--brand-red-tint); color: var(--brand-red); }
.panel { box-shadow: 0 5px 18px rgba(18, 57, 184, .025); }
.form-modal { border-top-color: var(--brand-red); }
.color-dot { background: var(--brand-blue) !important; }

.schedule-table tbody tr.bracket-a,
.schedule-table tbody tr.bracket-c,
.schedule-table tbody tr.bracket-e { --bracket-left: var(--brand-red) !important; --bracket-accent: var(--brand-red) !important; --bracket-right: var(--brand-red) !important; }
.schedule-table tbody tr.bracket-b,
.schedule-table tbody tr.bracket-d,
.schedule-table tbody tr.bracket-f { --bracket-left: var(--brand-blue) !important; --bracket-accent: var(--brand-blue) !important; --bracket-right: var(--brand-blue) !important; }
.schedule-table tbody tr[class*="bracket-"] td:first-child,
.schedule-table tbody tr[class*="bracket-"] td:last-child { border-color: var(--brand-blue) !important; }

.hub-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.division-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}
.division-menu::-webkit-scrollbar { display: none; }
.division-menu .division-chip { flex: 0 0 auto; padding: 8px 11px; }
.division-menu {
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--brand-line);
    border-radius: 12px;
    background: var(--brand-paper);
}
.division-menu .division-chip {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--brand-muted);
    font: 600 .74rem 'DM Sans', sans-serif;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.division-menu .division-chip:hover,
.division-menu .division-chip:focus-visible {
    background: var(--brand-yellow);
    color: var(--brand-blue-dark);
    outline: 0;
    transform: translateY(-1px);
}
.division-menu .division-chip.active {
    background: var(--brand-blue);
    color: #fff;
    box-shadow: 0 3px 8px rgba(18, 57, 184, .2);
}
.header-button {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--brand-blue);
    color: #fff;
    font: 700 .74rem 'DM Sans', sans-serif;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(18, 57, 184, .18);
    transition: background .18s ease, transform .18s ease;
}
.header-button:hover,
.header-button:focus-visible {
    background: var(--brand-red);
    color: #fff;
    outline: 0;
    transform: translateY(-1px);
}
.site-header .header-button { display: none; }
.site-footer a[href*="admin/login"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--brand-blue);
    color: #fff;
    font: 700 .74rem 'DM Sans', sans-serif;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(18, 57, 184, .18);
    transition: background .18s ease, transform .18s ease;
}
.site-footer a[href*="admin/login"]:hover,
.site-footer a[href*="admin/login"]:focus-visible {
    background: var(--brand-red);
    color: #fff;
    outline: 0;
    transform: translateY(-1px);
}
@media (max-width: 850px) {
    .division-menu { order: 3; flex-basis: 100%; justify-content: flex-start; margin-left: 0; }
}
.hub-hero::after {
    position: absolute;
    z-index: -1;
    top: 50%;
    right: clamp(16px, 6vw, 96px);
    width: min(42vw, 460px);
    aspect-ratio: 1;
    background: url('hero-art.svg') center / contain no-repeat;
    content: '';
    opacity: .22;
    transform: translateY(-50%) rotate(7deg);
}
.hub-hero > * { position: relative; z-index: 1; }
.category-hero.category-40-above {
    position: relative;
    isolation: isolate;
    min-height: 300px;
    background-image: url('40-above.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.category-hero.category-40-above::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: rgba(255, 255, 255, .72);
    content: '';
}
.category-hero.category-inter-barangay {
    position: relative;
    isolation: isolate;
    min-height: 300px;
    background-image: url('inter-brgy.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.category-hero.category-inter-barangay::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: rgba(255, 255, 255, .72);
    content: '';
}
.category-hero.category-inter-barangay > div { position: relative; z-index: 1; }
.category-hero.category-40-above > div,
.category-hero.category-40-above > a { position: relative; z-index: 1; }
.category-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.category-summary div { text-align: center; }
.schedule-results .schedule-public-table thead { display: none; }
.schedule-results .schedule-public-table,
.schedule-results .schedule-public-table tbody,
.schedule-results .schedule-public-table tr { display: block; width: 100%; }
.schedule-results .schedule-public-table { border: 0; overflow: visible; background: transparent; box-shadow: none; }
.schedule-results .schedule-public-table tbody { display: grid; gap: 10px; }
.schedule-results .schedule-public-table tr {
    display: grid;
    grid-template-columns: 90px minmax(0, 1.8fr) minmax(0, 1fr) 74px 68px;
    grid-template-areas: "date match venue status score";
    align-items: center;
    gap: 18px;
    min-height: 80px;
    padding: 14px 18px;
    border: 1px solid var(--brand-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(18, 57, 184, .04);
}
.schedule-results .schedule-public-table td { display: block; width: auto !important; padding: 0; border: 0; color: var(--brand-blue-dark); }
.schedule-results .schedule-public-table td:nth-child(1) { grid-area: date; }
.schedule-results .schedule-public-table td:nth-child(2),
.schedule-results .schedule-public-table td:nth-child(3) { display: none; }
.schedule-results .schedule-public-table td:nth-child(4) { grid-area: match; }
.schedule-results .schedule-public-table td:nth-child(5) { grid-area: venue; color: var(--brand-muted); font-size: .68rem; }
.schedule-results .schedule-public-table td:nth-child(6) { grid-area: status; }
.schedule-results .schedule-public-table td:nth-child(7) { grid-area: score; color: var(--brand-blue); font: 700 .95rem 'Space Grotesk'; white-space: nowrap; }
.schedule-results .schedule-public-table td:nth-child(1) small,
.schedule-results .schedule-public-table td:nth-child(4) small { display: block; margin-top: 4px; color: var(--brand-muted); font-size: .68rem; font-weight: 500; }
.schedule-results .schedule-public-table td:nth-child(4) strong { display: block; color: var(--brand-blue-dark); font: 700 .82rem 'Space Grotesk'; }
.schedule-results .schedule-public-table td:nth-child(4),
.schedule-results .schedule-public-table td:nth-child(5) { min-width: 0; overflow-wrap: anywhere; }
.schedule-results .schedule-public-table tr:hover { background: var(--brand-yellow-tint); }
.schedule-results .schedule-public-table tr[hidden] { display: none; }
.schedule-results .fixture-status { font-size: .64rem; }
.fixture-winner { margin-top: 9px; color: var(--brand-red); font: 700 .72rem 'Space Grotesk'; }
.category-schedule-table .schedule-public-table thead { display: none; }
.category-schedule-table .schedule-public-table,
.category-schedule-table .schedule-public-table tbody,
.category-schedule-table .schedule-public-table tr { display: block; width: 100%; }
.category-schedule-table .schedule-public-table { border: 0; overflow: visible; background: transparent; box-shadow: none; }
.category-schedule-table .schedule-public-table { min-width: 0; }
.category-schedule-table .schedule-public-table tbody { display: grid; gap: 10px; }
    .category-schedule-table .schedule-public-table tr {
        display: grid;
        grid-template-columns: 90px minmax(0, 1.7fr) minmax(0, 1fr) 74px 68px;
    grid-template-areas: "date match venue status score";
    align-items: center;
    gap: 18px;
    min-height: 80px;
    padding: 14px 18px;
    border: 1px solid var(--brand-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(18, 57, 184, .04);
}
.category-schedule-table .schedule-public-table td { display: block; width: auto !important; padding: 0; border: 0; color: var(--brand-blue-dark); }
.category-schedule-table .schedule-public-table td:nth-child(1) { grid-area: date; }
.category-schedule-table .schedule-public-table td:nth-child(2) { grid-area: match; }
.category-schedule-table .schedule-public-table td:nth-child(3) { grid-area: venue; color: var(--brand-muted); font-size: .68rem; }
.category-schedule-table .schedule-public-table td:nth-child(4) { grid-area: status; }
.category-schedule-table .schedule-public-table td:nth-child(5) { grid-area: score; color: var(--brand-blue); font: 700 .95rem 'Space Grotesk'; white-space: nowrap; }
.category-schedule-table .schedule-public-table td:nth-child(1) small,
.category-schedule-table .schedule-public-table td:nth-child(2) small { display: block; margin-top: 4px; color: var(--brand-muted); font-size: .68rem; font-weight: 500; }
.category-schedule-table .schedule-public-table td:nth-child(2) strong { display: block; color: var(--brand-blue-dark); font: 700 .82rem 'Space Grotesk'; }
.category-schedule-table .schedule-public-table td:nth-child(2),
.category-schedule-table .schedule-public-table td:nth-child(3) { min-width: 0; overflow-wrap: anywhere; }
.category-schedule-table .schedule-public-table tr:hover { background: var(--brand-yellow-tint); }
.category-schedule-table .schedule-public-table tr[hidden] { display: none; }
.category-schedule-table .fixture-status { font-size: .64rem; }
@media (max-width: 580px) {
    .hub-hero::after {
        top: auto;
        right: -30px;
        bottom: -70px;
        width: 240px;
        transform: rotate(8deg);
    }
    .category-hero.category-40-above {
        min-height: 360px;
        background-position: center;
        background-size: cover;
    }
    .category-hero.category-inter-barangay {
        min-height: 360px;
        background-position: center;
        background-size: cover;
    }
    .category-summary { grid-template-columns: 1fr; }
    .schedule-results .schedule-public-table tr {
        grid-template-columns: 65px minmax(0, 1fr) auto;
        grid-template-areas: "date category status" "date match score" "date venue score";
        gap: 7px 10px;
        padding: 13px 14px;
    }
    .schedule-results .schedule-public-table td:nth-child(3) { display: none; }
    .schedule-results .schedule-public-table td:nth-child(5) { grid-area: venue; }
    .schedule-results .schedule-public-table td:nth-child(6) { justify-self: end; }
    .schedule-results .schedule-public-table td:nth-child(7) { justify-self: end; }
    .category-schedule-table .schedule-public-table tr {
        grid-template-columns: 65px minmax(0, 1fr) auto;
        grid-template-areas: "date match status" "date venue score";
        gap: 7px 10px;
        padding: 13px 14px;
    }
    .category-schedule-table .schedule-public-table td:nth-child(4) { justify-self: end; }
    .category-schedule-table .schedule-public-table td:nth-child(5) { justify-self: end; }
}

/* Scoreboard presentation for public schedules and results. */
.schedule-results,
.results-section {
    background: var(--brand-blue-dark);
    color: #fff;
}
.schedule-results .section-head h2,
.results-section .section-head h2 { color: #fff; }
.schedule-results .section-head h2 span,
.results-section .section-head h2 span { color: var(--brand-yellow); }
.schedule-results .section-head p:not(.eyebrow),
.results-section .section-head p:not(.eyebrow) { color: #fff; opacity: .78; }
.schedule-results .eyebrow,
.results-section .eyebrow { color: var(--brand-yellow); }
.schedule-filters,
.category-schedule-filters { background: var(--brand-blue-dark); border-color: var(--brand-blue); }
.schedule-filters label,
.category-schedule-filters label { color: #fff; }
.schedule-filters select,
.schedule-filters input[type="date"],
.category-schedule-filters select,
.category-schedule-filters input[type="date"] { border-color: var(--brand-blue); }
.schedule-filters .filter-clear,
.category-schedule-filters .filter-clear { border-color: var(--brand-yellow); color: var(--brand-blue-dark); }
.schedule-filters .filter-clear:hover,
.category-schedule-filters .filter-clear:hover { background: var(--brand-yellow); color: var(--brand-blue-dark); }
.result-list { gap: 12px; }
.schedule-results .schedule-public-table tr,
.result-card {
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 42, 155, .22);
}
.schedule-results .schedule-public-table tr:hover,
.result-card:hover { background: #fff; transform: translateY(-2px); }
.schedule-results .schedule-public-table td:nth-child(1),
.result-card small { color: var(--brand-red); }
.schedule-results .schedule-public-table td:nth-child(4) strong,
.result-card strong { color: var(--brand-blue-dark); }
.schedule-results .schedule-public-table td:nth-child(5),
.schedule-results .schedule-public-table td:nth-child(6) { color: var(--brand-muted); }
.schedule-results .fixture-status.status-scheduled { border: 1px solid var(--brand-line); background: var(--brand-blue-tint); color: var(--brand-blue-dark); }
.schedule-results .fixture-status.status-live { background: var(--brand-red); color: #fff; }
.schedule-results .fixture-status.status-completed { background: var(--brand-yellow); color: var(--brand-blue-dark); }
.result-card { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 88px; border-left: 5px solid var(--brand-red); transition: transform .18s ease; }
.result-card small { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.result-card strong { margin-top: 7px; font: 700 .92rem 'Space Grotesk'; }
.result-card strong span { color: var(--brand-muted); font: 600 .68rem 'DM Sans'; }
.result-card>b { padding-left: 24px; color: var(--brand-blue); font: 700 1.45rem 'Space Grotesk'; }
.schedule-results .schedule-public-table td:nth-child(7) { color: var(--brand-blue); font-size: 1.1rem; }
.schedule-results .schedule-public-table td:nth-child(7)::first-letter { color: var(--brand-blue); }
@media (max-width: 700px) {
    .schedule-results,
    .results-section { padding-left: 20px; padding-right: 20px; }
    .result-card { grid-template-columns: 1fr; gap: 10px; }
    .result-card>b { padding-left: 0; }
}

/* The global schedules table shares the category table wrapper; keep its five-card layout isolated. */
.category-page .schedule-results .category-schedule-table .schedule-public-table thead { display: none !important; }
.category-page .schedule-results .category-schedule-table .schedule-public-table tr {
    display: flex !important;
    grid-template-columns: none;
    grid-template-areas: none;
    align-items: center;
    gap: 18px;
}
.category-page .schedule-results .category-schedule-table .schedule-public-table td {
    display: block !important;
    width: auto !important;
    padding: 0;
    border: 0;
}
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(1) { flex: 0 0 90px; }
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(2),
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(3) { display: none !important; }
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(4) { flex: 1 1 auto; min-width: 0; }
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(5) { flex: 0 1 170px; min-width: 0; }
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(6) { flex: 0 0 74px; }
.category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(7) { flex: 0 0 68px; }

/* Unified fixture card design. */
.schedule-section,
.category-today,
.schedule-results,
.results-section {
    background: var(--brand-blue-tint);
    color: var(--brand-blue-dark);
}
.schedule-results .section-head h2,
.results-section .section-head h2,
.schedule-results .section-head h2 span,
.results-section .section-head h2 span { color: var(--brand-blue-dark); }
.schedule-results .section-head p:not(.eyebrow),
.results-section .section-head p:not(.eyebrow) { color: var(--brand-muted); opacity: 1; }
.schedule-results .eyebrow,
.results-section .eyebrow { color: var(--brand-red); }
.fixture-list,
.result-list { display: grid; gap: 10px; }
.admin-fixture-list { margin-top: 14px; }
.fixture-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 82px;
    padding: 16px 26px 16px 18px;
    border: 1px solid var(--brand-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fixture-card:hover {
    border-color: #c8d5ee;
    background: #fff;
    box-shadow: 0 8px 18px rgba(18, 57, 184, .06);
    transform: translateY(-1px);
}
.fixture-card[hidden] { display: none; }
.fixture-card .fixture-time strong,
.fixture-card .fixture-time span { display: block; }
.fixture-card .fixture-time strong { color: var(--brand-blue); font: 700 .9rem/1.15 'Space Grotesk', sans-serif; }
.fixture-card .fixture-time span { margin-top: 2px; color: var(--brand-blue-dark); font-size: .76rem; }
.fixture-card .fixture-time .fixture-time-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    margin-top: 7px;
    padding: 5px 8px;
    border: 1px solid var(--brand-blue);
    border-radius: 999px;
    background: var(--brand-blue-tint);
    color: var(--brand-blue);
    font: 700 .68rem/1 'DM Sans', sans-serif;
    white-space: nowrap;
}
.fixture-card .fixture-main { min-width: 0; }
.fixture-card .fixture-meta { display: flex; align-items: center; gap: 18px; min-width: 0; color: var(--brand-muted); font-size: .66rem; line-height: 1.2; }
.fixture-card .fixture-meta span { min-width: 0; overflow-wrap: anywhere; }
.fixture-card .fixture-meta span:first-child { color: var(--brand-red); font-weight: 700; }
.fixture-card .matchup {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 34px 28px 34px minmax(120px, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.fixture-card .matchup strong {
    min-width: 0;
    color: var(--brand-blue);
    font: 700 .98rem/1.2 'Space Grotesk', sans-serif;
    overflow-wrap: anywhere;
}
.fixture-card .matchup strong:last-child { text-align: right; }
.fixture-card .matchup b { color: var(--brand-blue); text-align: center; font: 700 .9rem/1 'Space Grotesk', sans-serif; }
.fixture-card .matchup span { color: var(--brand-muted); text-align: center; font: 700 .65rem/1 'DM Sans', sans-serif; text-transform: lowercase; }
.fixture-card .fixture-card-tools {
    display: grid;
    justify-items: end;
    gap: 8px;
    justify-self: end;
}
.fixture-card .fixture-status {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--brand-blue-dark);
    font: 700 .66rem/1.1 'DM Sans', sans-serif;
    white-space: nowrap;
}
.schedule-results .fixture-card .fixture-status.status-scheduled,
.fixture-card .fixture-status.status-scheduled { border: 0; background: transparent; color: var(--brand-blue-dark); }
.fixture-card .fixture-status.status-live { color: var(--brand-red); background: transparent; }
.fixture-card .fixture-status.status-completed { color: var(--brand-blue); background: transparent; }
.fixture-card .fixture-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--brand-blue);
    border-radius: 999px;
    background: var(--brand-blue);
    color: #fff;
    font: 700 .68rem/1 'DM Sans', sans-serif;
    text-decoration: none;
    white-space: nowrap;
}
.fixture-card .fixture-action:hover { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.fixture-card .fixture-winner { margin-top: 8px; color: var(--brand-red); font: 700 .72rem 'Space Grotesk', sans-serif; }
.schedule-filters,
.category-schedule-filters { background: var(--brand-blue-tint); border-color: var(--brand-line); }
.schedule-filters label,
.category-schedule-filters label { color: var(--brand-blue-dark); }
.schedule-filters .filter-clear,
.category-schedule-filters .filter-clear { border-color: var(--brand-red); color: var(--brand-red); }
.schedule-filters .filter-clear:hover,
.category-schedule-filters .filter-clear:hover { background: var(--brand-red); color: #fff; }
@media (max-width: 760px) {
    .fixture-card {
        grid-template-columns: 66px minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 0;
        padding: 14px;
    }
    .fixture-card .fixture-meta { flex-wrap: wrap; gap: 6px 12px; }
    .fixture-card .matchup {
        grid-template-columns: minmax(0, 1fr) 28px 22px 28px minmax(0, 1fr);
        gap: 7px;
    }
    .fixture-card .matchup strong { font-size: .86rem; }
    .fixture-card .fixture-status { font-size: .62rem; }
}
@media (max-width: 520px) {
    .fixture-card {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "time status" "main main";
        gap: 12px 14px;
        padding: 14px 15px;
    }
    .fixture-card .fixture-time { grid-area: time; display: flex; align-items: center; gap: 8px; }
    .fixture-card .fixture-time span { margin-top: 0; }
    .fixture-card .fixture-time .fixture-time-badge { padding: 5px 8px; font-size: .66rem; }
    .fixture-card .fixture-main { grid-area: main; }
    .fixture-card .fixture-card-tools { grid-area: status; align-self: start; justify-self: end; gap: 6px; }
    .fixture-card .fixture-status { padding-top: 2px; }
    .fixture-card .fixture-meta { display: grid; gap: 4px; }
    .fixture-card .matchup {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "home home-score" "vs vs" "away away-score";
        gap: 8px 12px;
        margin-top: 12px;
    }
    .fixture-card .matchup strong:first-child { grid-area: home; }
    .fixture-card .matchup strong:last-child { grid-area: away; text-align: left; }
    .fixture-card .matchup b:nth-of-type(1) { grid-area: home-score; }
    .fixture-card .matchup span { grid-area: vs; justify-self: start; align-self: center; color: var(--brand-muted); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; }
    .fixture-card .matchup b:nth-of-type(2) { grid-area: away-score; }
    .fixture-card .matchup b { min-width: 34px; font-size: .95rem; }
}
@media (max-width: 580px) {
    .category-page .schedule-results .category-schedule-table .schedule-public-table tr {
        display: grid !important;
        grid-template-columns: 65px minmax(0, 1fr) auto;
        grid-template-areas: "date match status" "date venue score";
        gap: 7px 10px;
    }
    .category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(1) { grid-area: date; }
    .category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(4) { grid-area: match; }
    .category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(5) { grid-area: venue; }
    .category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(6) { grid-area: status; justify-self: end; }
    .category-page .schedule-results .category-schedule-table .schedule-public-table td:nth-child(7) { grid-area: score; justify-self: end; }
}

/* Stable card layout for the all-schedules page. */
.schedule-results .schedule-public-table tr {
    display: flex !important;
    align-items: center;
    gap: 18px;
}
.schedule-results .schedule-public-table td:nth-child(1) { flex: 0 0 90px; }
.schedule-results .schedule-public-table td:nth-child(2),
.schedule-results .schedule-public-table td:nth-child(3) { display: none !important; }
.schedule-results .schedule-public-table td:nth-child(4) { flex: 1 1 auto; min-width: 0; }
.schedule-results .schedule-public-table td:nth-child(5) { flex: 0 1 170px; min-width: 0; }
.schedule-results .schedule-public-table td:nth-child(6) { flex: 0 0 74px; }
.schedule-results .schedule-public-table td:nth-child(7) { flex: 0 0 68px; }
.schedule-results .schedule-public-table td:nth-child(4) strong,
.schedule-results .schedule-public-table td:nth-child(5) { overflow-wrap: anywhere; }
@media (max-width: 580px) {
    .schedule-results .schedule-public-table tr {
        display: grid !important;
        grid-template-columns: 65px minmax(0, 1fr) auto;
        grid-template-areas: "date match status" "date venue score";
        gap: 7px 10px;
    }
    .schedule-results .schedule-public-table td:nth-child(1) { grid-area: date; }
    .schedule-results .schedule-public-table td:nth-child(4) { grid-area: match; }
    .schedule-results .schedule-public-table td:nth-child(5) { grid-area: venue; }
    .schedule-results .schedule-public-table td:nth-child(6) { grid-area: status; justify-self: end; }
    .schedule-results .schedule-public-table td:nth-child(7) { grid-area: score; justify-self: end; }
}

/* Responsive fixture filters. */
.schedule-filters,
.category-schedule-filters,
.schedule-filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-items: end;
    gap: 14px;
    width: min(100%, 1180px);
    margin: 0 auto 22px;
    padding: 16px;
    border: 1px solid var(--brand-line);
    border-radius: 10px;
    background: var(--brand-blue-tint);
}
.schedule-filters label,
.category-schedule-filters label,
.schedule-filter-controls label {
    display: grid;
    gap: 7px;
    min-width: 0;
    width: 100%;
    color: var(--brand-blue-dark);
    font: 700 .72rem/1.2 'DM Sans', sans-serif;
}
.schedule-filters select,
.schedule-filters input[type="date"],
.category-schedule-filters select,
.category-schedule-filters input[type="date"],
.schedule-filter-controls select,
.schedule-filter-controls input[type="date"] {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--brand-blue);
    border-radius: 8px;
    background: #fff;
    color: var(--brand-blue-dark);
    font: 600 .8rem/1 'DM Sans', sans-serif;
}
.schedule-filters .filter-clear,
.category-schedule-filters .filter-clear,
.schedule-filter-controls .filter-clear {
    justify-self: start;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--brand-red);
    border-radius: 8px;
    background: #fff;
    color: var(--brand-red);
    font: 700 .78rem/1 'DM Sans', sans-serif;
}
@media (max-width: 640px) {
    .schedule-filters,
    .category-schedule-filters,
    .schedule-filter-controls {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 18px;
        padding: 14px;
    }
    .schedule-filters select,
    .schedule-filters input[type="date"],
    .category-schedule-filters select,
    .category-schedule-filters input[type="date"],
    .schedule-filter-controls select,
    .schedule-filter-controls input[type="date"] { height: 46px; }
    .schedule-filters .filter-clear,
    .category-schedule-filters .filter-clear,
    .schedule-filter-controls .filter-clear {
        justify-self: stretch;
        width: 100%;
    }
}
