[data-school] { --school-primary: #28332f; --school-secondary: #66746d; --school-third: var(--school-secondary); }
[data-school="antrim-grammar-school"] { --school-primary: #15253f; --school-secondary: #79bbdf; --school-third: #e9b936; }
[data-school="ballyclare-high-school"] { --school-primary: #17253e; --school-secondary: #bb2941; }
[data-school="ballymena-academy"] { --school-primary: #182740; --school-secondary: #c1273d; }
[data-school="banbridge-academy"] { --school-primary: #191b20; --school-secondary: #bd263c; --school-third: #ffffff; }
[data-school="bangor-academy"] { --school-primary: #17253e; --school-secondary: #85c5e5; }
[data-school="bangor-grammar-school"] { --school-primary: #173d7c; --school-secondary: #efc545; }
[data-school="belfast-high-school"] { --school-primary: #214a97; --school-secondary: #eec344; }
[data-school="belfast-royal-academy"] { --school-primary: #17253e; --school-secondary: #8b2946; }
[data-school="cambridge-house"] { --school-primary: #17563c; --school-secondary: #ffffff; --school-third: #bd293d; }
[data-school="campbell-college-belfast"] { --school-primary: #151515; --school-secondary: #ffffff; }
[data-school="carrickfergus-gs"] { --school-primary: #70253d; --school-secondary: #ffffff; }
[data-school="coleraine-grammar-school"] { --school-primary: #17253e; --school-secondary: #17253e; }
[data-school="craigavon-senior-high-school"] { --school-primary: #17253e; --school-secondary: #bc293e; }
[data-school="dalriada-school"] { --school-primary: #214b96; --school-secondary: #84263f; --school-third: #ffffff; }
[data-school="down-high-school"] { --school-primary: #15573b; --school-secondary: #17253e; }
[data-school="dromore-high-school"] { --school-primary: #214b96; --school-secondary: #214b96; }
[data-school="enniskillen-royal-grammar-school"] { --school-primary: #214b96; --school-secondary: #bc293e; }
[data-school="foyle-college"] { --school-primary: #70253d; --school-secondary: #17253e; }
[data-school="friends-school-lisburn"] { --school-primary: #15573b; --school-secondary: #ffffff; }
[data-school="grosvenor-grammar-school"] { --school-primary: #214b96; --school-secondary: #176444; --school-third: #ffffff; }
[data-school="killicomaine-junior-hs"] { --school-primary: #191b20; --school-secondary: #191b20; }
[data-school="larne-grammar-school"] { --school-primary: #17253e; --school-secondary: #ffffff; --school-third: #84263f; }
[data-school="limavady-grammar-school"] { --school-primary: #214b96; --school-secondary: #ffffff; }
[data-school="lurgan-college"] { --school-primary: #17253e; --school-secondary: #bc293e; }
[data-school="methodist-college-belfast"] { --school-primary: #17253e; --school-secondary: #17253e; }
[data-school="omagh-academy"] { --school-primary: #17253e; --school-secondary: #ffffff; --school-third: #e9b936; }
[data-school="portadown-college"] { --school-primary: #214b96; --school-secondary: #214b96; }
[data-school="rainey-endowed-school"] { --school-primary: #191b20; --school-secondary: #bc293e; }
[data-school="rathfriland-high-school"] { --school-primary: #15573b; --school-secondary: #191b20; }
[data-school="regent-house-school"] { --school-primary: #a51f33; --school-secondary: #191b20; }
[data-school="royal-belfast-academical-inst"] { --school-primary: #191b20; --school-secondary: #f3c62d; }
[data-school="royal-school-armagh"] { --school-primary: #70253d; --school-secondary: #17253e; }
[data-school="royal-school-dungannon"] { --school-primary: #442c26; --school-secondary: #b1327d; }
[data-school="sullivan-upper-school"] { --school-primary: #15573b; --school-secondary: #ffffff; }
[data-school="wallace-high-school"] { --school-primary: #17253e; --school-secondary: #ffffff; }

/* A solid reading area with the school's jersey colours at its edge. */
.school-colour-panel {
    color: #fff;
    background: var(--school-primary, #28332f);
    background-image: linear-gradient(var(--school-primary, #28332f), var(--school-primary, #28332f)),
        repeating-linear-gradient(0deg, var(--school-primary, #28332f) 0 14px, var(--school-secondary, #66746d) 14px 25px, var(--school-third, #66746d) 25px 29px);
    background-size: calc(100% - 18px) 100%, 18px 100%;
    background-position: left top, right top;
    background-repeat: no-repeat;
    border-radius: 8px;
    padding: 14px 30px 14px 14px;
}
.school-colour-panel :is(h1,h2,h3,strong,small,p,a,.eyebrow,.internal-hero-text) { color: inherit; }
.internal-hero.school-colour-panel { border-radius: 0; padding: 32px 24px; }
.school-colour-panel select { background: white; color: #17202a; }
.featured-match-team.school-colour-panel, .big-matchup-team.school-colour-panel { align-self: stretch; min-width: 0; justify-content: center; }
.featured-match-team.school-colour-panel strong, .big-matchup-team.school-colour-panel strong { overflow-wrap: anywhere; }
.fx-row-teams .school-colour-panel { display: flex; align-items: center; padding: 10px 24px 10px 10px; min-width: 0; }
.res-side .res-name.school-colour-panel { flex: 1; padding: 10px 24px 10px 10px; }
.res-score { background: #fff; color: #17202a; border-radius: 6px; padding: 6px 10px; }
.school-colour-marker { border-left: 7px solid var(--school-primary, #28332f); box-shadow: inset 3px 0 var(--school-secondary, #66746d); padding-left: 14px; }
.school-filter-tile { display: block; margin: 6px 0; text-decoration: none; }
#school-matches .school-filter-tile { color: #fff; background-color: var(--school-primary); }
#school-matches .school-filter-tile small { color: #fff; }
.school-filter-tile:focus-visible, .school-save-tile a:focus-visible { outline: 3px solid #79bbdf; outline-offset: 3px; }
.school-save-tile { margin: 10px 0; list-style: none; }
.school-save-tile a, .school-save-tile small { color: #fff; }
.school-save-tile a { display: inline-block; }
.career-school-card.school-colour-panel strong, .career-school-card.school-colour-panel small { color: #fff; }
.career-school-option input:checked + .school-colour-panel { outline: 3px solid #1264a3; outline-offset: 3px; background-color: var(--school-primary); }
.career-app.clubhouse .clubhouse-masthead { border-bottom: 7px solid var(--school-secondary); background: var(--school-primary); color: #fff; }
.career-app.clubhouse .clubhouse-masthead :is(strong,summary,.clubhouse-mode span) { color: #fff; }
.career-app.clubhouse .clubhouse-nav > a.is-on { background: var(--school-primary); color: #fff; border-left: 5px solid var(--school-secondary); }
.career-app.clubhouse .career-dock button:not(:disabled):not(.career-dock-skip), .career-app.clubhouse .club-button { background: var(--school-primary); color: #fff; border-color: var(--school-primary); }
.career-app.clubhouse .career-hero { border-top: 8px solid var(--school-secondary); border-bottom: 3px solid var(--school-primary); }
.career-app.clubhouse .club-card-head-dark { background: var(--school-primary); color: #fff; }
.career-app.clubhouse .club-shirt { background: var(--school-primary); color: #fff; border-bottom: 3px solid var(--school-secondary); }
.career-app.clubhouse .club-matchup .school-colour-panel { padding: 16px 28px 16px 12px; align-self: stretch; }
.career-app.clubhouse .club-matchup .school-colour-panel strong { color: #fff; }
.mc-side.school-colour-panel { padding: 18px 28px 18px 12px; }
.mc-side.school-colour-panel .mc-mark { color: #fff; background: rgba(255,255,255,.12); }
.school-offer-card { border: 1px solid #d8d8d0; border-radius: 10px; overflow: hidden; padding: 16px; background: #fff; color: #17202a; }
.school-offer-card h3.school-colour-panel { margin: -16px -16px 16px; border-radius: 0; }
.school-scarf { border-top: 10px solid var(--school-primary); border-bottom: 5px solid var(--school-secondary); padding-block: 12px; }
@media (max-width: 600px) {
    .school-colour-panel { padding: 10px 24px 10px 10px; }
    .featured-match-teams, .big-matchup-teams { gap: 8px; }
    .featured-match-team.school-colour-panel strong { font-size: clamp(.85rem, 3.5vw, 1.15rem); }
    .mc-side.school-colour-panel { padding: 10px 22px 10px 8px; }
    .school-save-tile small { display: block; margin-top: 6px; }
}

@media (min-width: 701px) {
    .fx-row-teams { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; }
    .fx-row-teams .fx-vs { display: block; align-self: center; }
}
.career-app.clubhouse .clubhouse-more summary.is-on { background: var(--school-primary); color: #fff; border-left: 5px solid var(--school-secondary); }
@media (max-width: 780px) {
    .career-app.clubhouse, .career-app.clubhouse .career-main, .career-app.clubhouse .clubhouse-masthead { min-width: 0; max-width: 100%; }
    .career-app.clubhouse .clubhouse-masthead { grid-column: 1; }
    .career-app.clubhouse .club-matchup > div { min-width: 0; overflow-wrap: anywhere; }
    .career-app.clubhouse .club-matchup .school-colour-panel { padding: 12px 22px 12px 8px; }
    .career-app.clubhouse .club-matchup .school-colour-panel strong { font-size: 1rem; }
}

/* Consistent match geometry: venue length must never move team columns. */
.fx-row {
    grid-template-columns: 64px minmax(0, 1fr) 180px;
    gap: 16px;
    padding-block: 14px;
    align-items: center;
}
.fx-row:first-child { padding-top: 14px; }
.fx-row-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}
.fx-row-teams .fx-vs { display: grid; place-items: center; align-self: stretch; text-align: center; }
.fx-row-prediction {
    grid-column: 1 / -1;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
}
.fx-row-teams .school-colour-panel {
    min-height: 44px;
    box-sizing: border-box;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.fx-row-meta { min-width: 0; justify-content: flex-start; align-content: center; }
.fx-venue { overflow-wrap: anywhere; }
.res-side { grid-template-columns: minmax(0, 1fr) 5rem; gap: 12px; align-items: stretch; }
.res-name.school-colour-panel { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.res-score {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 8px;
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.featured-match-teams, .big-matchup-teams { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
.featured-match-mid, .big-matchup-vs { align-self: center; text-align: center; }
.featured-match-team.school-colour-panel, .big-matchup-team.school-colour-panel { text-align: center; justify-items: center; align-content: center; }
/* The homepage card can be narrow even on a wide screen. */
.big-matchup { container-type: inline-size; min-width: 0; }
.big-matchup-team.school-colour-panel { box-sizing: border-box; }
.big-matchup-team strong { min-width: 0; max-width: 100%; }
.big-matchup-date, .big-matchup-detail { overflow-wrap: anywhere; }
@container (max-width: 420px) {
    .big-matchup-teams { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .big-matchup-team.school-colour-panel {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 14px 30px 14px 14px;
    }
    .big-matchup-team strong { font-size: 18px; }
    .big-matchup-vs { font-size: 18px; line-height: 1; }
}
.club-matchup > .school-colour-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.school-directory-item { min-width: 0; box-sizing: border-box; }
@media (max-width: 1000px) {
    .fx-row { grid-template-columns: 56px minmax(0,1fr); gap: 8px 12px; }
    .fx-row-meta { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 600px) {
    .fx-row { grid-template-columns: 44px minmax(0,1fr); gap: 8px; }
    .fx-row-teams { grid-template-columns: minmax(0,1fr) 14px minmax(0,1fr); gap: 4px; }
    .fx-row-teams .school-colour-panel { min-height: 64px; font-size: .82rem; padding: 10px 20px 10px 8px; }
    .fx-row-date { overflow-wrap: anywhere; }
    .fx-row-meta { font-size: .75rem; }
}
/* Compact fixture lists also need room when shown beside another panel. */
.discovery-panel .fx-row { grid-template-columns: 56px minmax(0,1fr); gap: 8px 12px; }
.discovery-panel .fx-row-meta { grid-column: 2; }
/* Competition labels and venues occupy the same lines in every desktop row. */
@media (min-width: 1001px) {
    .fx-row-meta { display: grid; justify-items: start; gap: 5px; }
}

/* Keep school selection readable in every interaction state. */
.career-app.clubhouse .career-school-card.school-colour-panel,
.career-app.clubhouse .career-school-option:hover .career-school-card.school-colour-panel,
.career-app.clubhouse .career-school-option > input:checked + .career-school-card.school-colour-panel {
    background-color: var(--school-primary, #28332f);
    background-image: linear-gradient(var(--school-primary, #28332f), var(--school-primary, #28332f)),
        repeating-linear-gradient(0deg, var(--school-primary, #28332f) 0 14px, var(--school-secondary, #66746d) 14px 25px, var(--school-third, #66746d) 25px 29px);
    background-size: calc(100% - 18px) 100%, 18px 100%;
    background-position: left top, right top;
    background-repeat: no-repeat;
    padding: 16px 32px 16px 16px;
    color: #fff;
    border-color: var(--school-primary, #28332f);
}
.career-app.clubhouse .career-school-card.school-colour-panel :is(strong, small, .career-school-card-action, .career-school-check) { color: #fff; }
.career-app.clubhouse .career-school-option:hover .career-school-card.school-colour-panel { box-shadow: 0 0 0 2px #657c92; }
.career-app.clubhouse .career-school-option > input:checked + .career-school-card.school-colour-panel { outline: 3px solid #1264a3; outline-offset: 3px; box-shadow: none; }
.career-app.clubhouse .career-school-option > input:focus-visible + .career-school-card.school-colour-panel { outline: 3px solid #1264a3; outline-offset: 5px; }
