/*
  Site styles: the "Bold jersey" look (navy, logo red and white, with
  jersey-stripe accents). Light colours only, matching the approved design.
*/

/*
  Fonts are self-hosted (assets/fonts/, SIL Open Font License, see the
  *-OFL.txt files there), so the site never asks Google or anyone else
  for them. Files are Google Fonts' own subsets, unchanged. If a font
  hasn't loaded yet, text shows in the fallback font first (swap).
*/
@font-face {
    font-family: "Graduate";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/graduate-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter is a variable font: one file covers every weight from 100 to 900. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Accented letters (e.g. in parents' names); only downloaded when a page uses them. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;

    /* Brand colours (from the logo). */
    --navy: #071f43;
    --navy-3: #13386f;
    --red: #ec102c;
    /* Buttons and red panels: a touch darker than the logo red, so white text on it passes contrast. */
    --red-btn: #d30b25;
    --red-shadow: #8f0718;
    --white: #ffffff;
    --paper: #f3f5f9;
    --on-navy-muted: #d6deeb;

    /* The red-white-red jersey stripe under the header and above the footer. */
    --stripe: linear-gradient(var(--red) 0 3px, var(--white) 3px 7px, var(--red) 7px 10px);

    --display: "Graduate", "Arial Black", Impact, sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Shared by every page and by forms.css. */
    --text: #0b1a33;
    --muted: #44526b;
    --bg: var(--white);
    --line: #c9d2e0;
    --link: var(--navy-3);
    --button-bg: var(--navy);
    --button-text: var(--white);

    /* Cards, form controls and error messages (also used by forms.css). */
    --card-shadow: 0 2px 0 rgba(7, 31, 67, 0.08), 0 8px 20px rgba(7, 31, 67, 0.06);
    --input-border: #6b7a93;
    --selected-bg: #eaf0f9;
    --error: #b42318;
    --error-text: #8a1a12;
    --error-bg: #fdf0ee;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
}

a { color: var(--link); }

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

/* Graduate has a single weight, so headings never ask for a (fake) bold one. */
h1,
h2 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--navy);
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 720px) {
    .container { padding: 0 32px; }
}

/* The logo sits on a white circle: its white parts are transparent. */
.badge {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
}

/* Header */

.site-header {
    background: var(--navy);
    color: var(--white);
}

.site-header::after {
    content: "";
    display: block;
    height: 10px;
    background: var(--stripe);
}

.site-header :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--white);
}

/*
  On a phone the header is tight: logo, name, "Log in"/"Log out" and
  "Sign up" share one row, so the spacing is kept small there (wider
  screens get more room below) to keep the name to two lines.
*/
.header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.brand {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    color: var(--white);
    text-decoration: none;
}

.site-header .badge {
    width: 44px;
    height: 44px;
}

.brand-name {
    font-family: var(--display);
    font-size: 14px;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-list {
    display: flex;
    flex: none;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* "Log in" link and "Log out" button: white text, tap-sized. */
.site-header .nav-link {
    display: inline-block;
    padding: 12px 6px;
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.site-header .nav-link:hover {
    text-decoration: underline;
}

@media (min-width: 720px) {
    .header-row { gap: 12px; }
    .brand { gap: 10px; }
    .brand-name { font-size: 20px; }
    .site-header .badge { width: 56px; height: 56px; }
    .nav-list { gap: 14px; }
    .site-header .nav-link { padding: 12px 8px; }
}

main.container {
    padding-top: 24px;
    padding-bottom: 48px;
}

/* Buttons */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 8px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    border: 3px solid var(--button-bg);
    border-radius: 4px;
    font-family: var(--body);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    background: var(--red-btn);
    border-color: var(--red-btn);
    color: var(--white);
    box-shadow: 0 4px 0 var(--red-shadow);
}

.button-primary:hover {
    background: var(--red);
    border-color: var(--red);
}

.button-secondary {
    background: transparent;
    color: var(--navy);
}

.button-secondary:hover {
    background: var(--navy);
    color: var(--white);
}

/* The header's Sign up button. */
.button-small {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 14px;
    box-shadow: 0 3px 0 var(--red-shadow);
}

@media (min-width: 720px) {
    .button-small {
        padding: 8px 22px;
        font-size: 15px;
    }
}

/* Page column, title and cards on the sign-up, login and family pages */

/* A centred column of comfortable reading width. */
.page-column {
    max-width: 680px;
    margin: 0 auto;
}

.page-column-small {
    max-width: 500px;
}

.page-column-wide {
    max-width: 860px;
}

/* The page's main heading, with a short red and navy stripe under it. */
.page-title {
    margin: 8px 0 16px;
    font-size: clamp(30px, 8.5vw, 44px);
    line-height: 1.05;
    overflow-wrap: break-word;
}

.page-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 10px;
    margin-top: 14px;
    background: linear-gradient(var(--red) 0 4px, transparent 4px 6px, var(--navy) 6px 10px);
}

.page-intro {
    margin: 0 0 8px;
}

/* A white panel with a red top edge, like the info page's cards. */
.card {
    margin: 20px 0;
    padding: 20px 18px;
    border-top: 6px solid var(--red);
    background: var(--white);
    box-shadow: var(--card-shadow);
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

@media (min-width: 600px) {
    .card { padding: 28px 32px; }
}

.card .page-title {
    font-size: clamp(30px, 8vw, 40px);
}

/* A button that fills its card on a phone. */
.card .actions .button {
    flex: 1 1 auto;
}

/* Sections, fact lists and notes on the family, sign-up and admin pages */

.page-section {
    margin-top: 36px;
}

/* Section headings: the display font, with a red and navy stripe running to the right. */
.page-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.15;
}

.page-section h2::after {
    content: "";
    flex: 1;
    min-width: 24px;
    height: 10px;
    background: linear-gradient(var(--red) 0 4px, transparent 4px 6px, var(--navy) 6px 10px);
}

/* Smaller headings stay in the plain text font, so they're easy to read. */
.page-section h3 {
    margin: 24px 0 8px;
    color: var(--navy);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

.facts {
    display: grid;
    margin: 0;
}

/* A heading after a fact list (e.g. each child in the sign-up summary) starts a new block. */
.page-section .facts + h3 {
    margin-top: 16px;
    padding-top: 18px;
    border-top: 2px solid var(--line);
}

.facts > div {
    display: grid;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.facts > div:last-child {
    border-bottom: 0;
}

.facts dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.facts dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (min-width: 600px) {
    .facts > div {
        grid-template-columns: 11rem 1fr;
        gap: 12px;
        align-items: baseline;
    }
}

.note {
    border-radius: 4px;
    padding: 12px 16px;
}

.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }

.note-full {
    margin-top: 8px !important;
    border-left: 4px solid #b26b00;
    background: rgba(178, 107, 0, 0.1);
}

.note-warning {
    border: 2px solid var(--error);
    background: var(--error-bg);
}

/* A plain notice on a page (e.g. "groups will be shared here"). */
.note-info {
    border-left: 6px solid var(--navy);
    background: var(--white);
    box-shadow: var(--card-shadow);
    font-weight: 600;
}

.plain-list {
    margin: 8px 0 16px;
    padding-left: 20px;
}

.plain-list li {
    margin: 4px 0;
}

/* ---------- Home page ---------- */

/* Icons: one hidden sprite (public/icons), each icon a <use> of it. */
.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    flex: none;
    width: 20px;
    height: 20px;
}

/* Banner: navy "ice" with faint diagonal lines, a red-white sash and a slanted bottom edge. */
.hero {
    position: relative;
    overflow: hidden;
    padding: 40px 0 88px;
    color: var(--white);
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 22px, transparent 22px 44px),
        radial-gradient(ellipse at 75% 40%, var(--navy-3) 0%, var(--navy) 60%);
}

.hero::before {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: 46px;
    height: 30px;
    transform: skewY(-4deg);
    background: linear-gradient(var(--white) 0 6px, var(--red) 6px 24px, var(--white) 24px 30px);
    opacity: 0.95;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px; /* overlap by a pixel so no hairline shows below the slant */
    height: 61px;
    background: var(--paper);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero :focus-visible {
    outline-color: var(--white);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 28px;
    align-items: center;
}

.hero-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 0 6px var(--red), 0 0 0 12px var(--white), 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* The slanted red season label. */
.season-tag {
    display: inline-block;
    margin: 0;
    padding: 6px 14px;
    transform: skewX(-10deg);
    background: var(--red-btn);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.season-tag span {
    display: inline-block;
    transform: skewX(10deg);
}

.hero h1 {
    margin: 16px 0 24px;
    color: var(--white);
    font-size: clamp(38px, 11vw, 84px);
    line-height: 0.98;
    letter-spacing: 0.01em;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.hero h1 .outline {
    display: block;
}

/* Outlined letters only where the browser can draw the outline. */
@supports (-webkit-text-stroke: 2px white) {
    .hero h1 .outline {
        color: transparent;
        -webkit-text-stroke: 2px var(--white);
    }
}

.hero .actions {
    gap: 14px;
    margin: 0;
}

.hero .actions .button {
    flex: 1 1 160px;
}

.hero .button-secondary {
    border-color: var(--white);
    color: var(--white);
}

.hero .button-secondary:hover {
    background: var(--white);
    color: var(--navy);
}

@media (min-width: 860px) {
    .hero {
        padding: 64px 0 120px;
    }

    .hero-grid {
        grid-template-columns: 1.4fr 1fr;
    }

    .hero-logo {
        order: 2;
        width: 340px;
        height: 340px;
    }

    .hero .actions .button {
        flex: 0 0 auto;
        min-width: 200px;
    }
}

.hero + main.container {
    padding-top: 0;
}

/* Section headings with a red and navy stripe running to the right. */
.info-section {
    padding: 44px 0 8px;
    scroll-margin-top: 16px;
}

.info-section > h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
    font-size: clamp(28px, 7vw, 40px);
    line-height: 1.05;
}

.info-section > h2::after {
    content: "";
    flex: 1;
    min-width: 24px;
    height: 12px;
    background: linear-gradient(var(--red) 0 4px, transparent 4px 8px, var(--navy) 8px 12px);
}

.info-section p {
    margin: 0 0 14px;
}

/* The season: one card per fact. */
.season-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
}

@media (min-width: 600px) {
    .season-facts { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
    .season-facts { grid-template-columns: 1.35fr 1fr 1fr 1fr 1.15fr; }
}

.fact {
    padding: 18px 18px 16px;
    border-top: 6px solid var(--red);
    background: var(--white);
    box-shadow: var(--card-shadow);
}

.fact dt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fact dt .icon {
    width: 18px;
    height: 18px;
    color: var(--red);
}

.fact dd {
    margin: 0;
    font-weight: 600;
}

.fact-navy {
    background: var(--navy);
    color: var(--white);
}

.fact-navy dt {
    color: #b9c6dc;
}

.fact-big {
    display: block;
    font-family: var(--display);
    font-size: 34px;
    line-height: 1.1;
}

.fact-small {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

/* Groups: navy jersey cards with a big outlined letter and a sash. */
.group-list {
    display: grid;
    gap: 18px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

@media (min-width: 860px) {
    .group-list { grid-template-columns: repeat(3, 1fr); }
}

.group-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    padding: 22px;
    border-radius: 6px;
    background: var(--navy);
    color: var(--white);
}

.group-letter {
    position: absolute;
    top: 0;
    right: 14px;
    color: transparent;
    font-family: var(--display);
    font-size: 140px;
    line-height: 1;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.group-card h3 {
    position: relative;
    margin: 0;
    padding-right: 48px;
    font-family: var(--display);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.15;
    text-transform: uppercase;
}

/* The sash under the group name, reaching both edges of the card. */
.group-card h3::after {
    content: "";
    display: block;
    height: 18px;
    margin: 16px -70px 22px -22px;
    transform: skewY(-6deg);
    background: linear-gradient(var(--white) 0 4px, var(--red) 4px 14px, var(--white) 14px 18px);
    opacity: 0.9;
}

.group-card .group-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-weight: 600;
}

.group-row .icon {
    color: #ffb3bd;
}

.group-full-flag {
    position: absolute;
    top: 16px;
    right: -38px;
    padding: 4px 44px;
    transform: rotate(35deg);
    background: var(--red-btn);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.group-card .group-full-note {
    position: relative;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 4px solid var(--red);
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    line-height: 1.5;
}

/* Schedule: the game dates as a table, with the game times beside it. */
.schedule-grid {
    display: grid;
    gap: 22px;
}

@media (min-width: 860px) {
    .schedule-grid {
        grid-template-columns: 1.5fr 1fr;
        align-items: start;
    }
}

.schedule-card {
    border-top: 6px solid var(--red);
    background: var(--white);
    box-shadow: var(--card-shadow);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.35;
}

.schedule-table caption {
    padding: 14px 12px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
}

.schedule-table th,
.schedule-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.schedule-table tbody tr:last-child th,
.schedule-table tbody tr:last-child td {
    border-bottom: 0;
}

.schedule-table thead th {
    background: var(--navy);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.schedule-table tbody th {
    font-weight: 600;
    white-space: nowrap;
}

.schedule-table .game-number {
    color: var(--navy);
    font-weight: 800;
}

/* Dates without a game: greyed out, with the reason. */
.schedule-table .no-game {
    background: var(--paper);
    color: var(--muted);
}

.schedule-table .no-game th {
    font-weight: 400;
}

/* On a phone the reason gets its own line, so it doesn't break mid-phrase. */
.no-game-reason {
    display: block;
    font-size: 14px;
}

@media (min-width: 600px) {
    .no-game-reason { display: inline; }

    .schedule-table caption { padding: 16px 20px 10px; }

    .schedule-table th,
    .schedule-table td { padding: 10px 20px; }
}

.game-times {
    padding: 22px;
    border-radius: 6px;
    background: var(--navy);
    color: var(--white);
}

.game-times h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-family: var(--display);
    font-size: 22px;
    font-weight: 400;
    text-transform: uppercase;
}

.game-times h3 .icon {
    color: #ffb3bd;
}

.info-section .game-times p {
    margin: 0 0 12px;
    color: #c9d4e6;
    font-size: 15px;
}

.game-times ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.game-times li {
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.game-times-group {
    display: block;
    color: #c9d4e6;
    font-size: 14px;
    font-weight: 400;
}

/* Payment */
.info-section .payment-warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 20px;
    padding: 18px 20px;
    border-radius: 4px;
    background-color: var(--red-btn);
    background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 14px, transparent 14px 28px);
    color: var(--white);
    font-size: 18px;
    line-height: 1.4;
}

.payment-warning .icon {
    width: 28px;
    height: 28px;
}

.pay-grid {
    display: grid;
    gap: 22px;
}

@media (min-width: 860px) {
    .pay-grid {
        grid-template-columns: 1.5fr 1fr;
        align-items: start;
    }
}

.deposit-card {
    position: relative;
    padding: 22px;
    border: 4px solid var(--navy);
    background: var(--white);
}

.deposit-card::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    height: 10px;
    background: linear-gradient(var(--red) 0 4px, var(--white) 4px 6px, var(--red) 6px 10px);
}

.info-section .deposit-label {
    margin: 6px 0 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.info-section .deposit-amount {
    margin: 0 0 6px;
    color: var(--navy);
    font-family: var(--display);
    font-size: 48px;
    line-height: 1;
}

.deposit-card .button {
    gap: 0.5em;
    width: 100%;
    margin-top: 8px;
}

/* Equipment */
.equip-grid {
    display: grid;
    gap: 22px;
}

@media (min-width: 860px) {
    .equip-grid {
        grid-template-columns: 1.5fr 1fr;
        align-items: start;
    }
}

.checklist {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .checklist { grid-template-columns: 1fr 1fr; }
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-left: 5px solid var(--navy);
    background: var(--white);
    font-weight: 600;
    line-height: 1.4;
}

.checklist .icon {
    margin-top: 1px;
    color: var(--red);
}

.kits {
    padding: 22px;
    border-radius: 6px;
    background: var(--navy);
    color: var(--white);
}

.kits h3 {
    margin: 0 0 12px;
    font-family: var(--display);
    font-size: 22px;
    font-weight: 400;
    text-transform: uppercase;
}

.kits ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.kits li {
    margin-bottom: 8px;
}

.kits li::marker {
    color: var(--red);
}

.kits a {
    color: var(--white);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.kits :focus-visible {
    outline-color: var(--white);
}

.info-section .kits p {
    margin: 0 0 10px;
    color: #c9d4e6;
    font-size: 15px;
}

.info-section .kits p:last-child {
    margin-bottom: 0;
}

/* Contact */
.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border-left: 8px solid var(--red);
    background: var(--white);
}

.contact-card .icon {
    width: 36px;
    height: 36px;
    color: var(--navy);
}

.contact-list {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-list a {
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Admin area */

.admin-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0 0 20px;
    padding: 0 0 10px;
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.admin-nav a[aria-current="page"] {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.muted { color: var(--muted); }

/* Admin payments page */

.back-links {
    margin: 0 0 8px;
}

.payment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    margin: 0 0 20px;
}

.payment-summary dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.payment-summary dd {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.payment-form {
    max-width: 420px;
}

.form-success {
    padding: 10px 12px;
    border: 1px solid #1f7a3d;
    border-radius: 6px;
    color: #1f7a3d;
}

.group-summary h2 {
    font-size: 1.1rem;
    margin: 0 0 6px;
}

.group-summary ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.admin-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0 16px;
    align-items: end;
    margin-bottom: 8px;
}

.admin-filters .field {
    margin: 6px 0;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 6px 0;
}

/* Wide tables scroll sideways inside their own box, not the whole page. */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.table-scroll:focus-visible {
    outline: 3px solid var(--link);
}

.admin-table {
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 100%;
}

.admin-table th,
.admin-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table thead th {
    white-space: nowrap;
}

.admin-table tbody th {
    font-weight: 600;
    white-space: nowrap;
}

.admin-table .money,
.admin-table .nowrap {
    white-space: nowrap;
}

.admin-table .money {
    text-align: right;
}

.admin-table .owes {
    font-weight: 600;
}

/* Family page: one card per child, and the group rosters. */
.family-child {
    margin: 0 0 22px;
    padding: 0 18px 20px;
    border-top: 6px solid var(--red);
    background: var(--white);
    box-shadow: var(--card-shadow);
}

@media (min-width: 600px) {
    .family-child { padding: 0 28px 24px; }
}

/* The child's name as a navy nameplate across the top of the card. */
.family-child .child-name {
    margin: 0 -18px 12px;
    padding: 12px 18px;
    background: var(--navy);
    color: var(--white);
    font-family: var(--display);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.15;
    text-transform: uppercase;
    overflow-wrap: break-word;
}

@media (min-width: 600px) {
    .family-child .child-name {
        margin: 0 -28px 14px;
        padding: 14px 28px;
    }
}

.child-group {
    margin: 0 0 8px;
    padding: 10px 14px;
    border-left: 6px solid var(--red);
    background: var(--selected-bg);
}

.family-child h4 {
    margin: 20px 0 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.payment-totals {
    margin: 0 0 12px;
}

.roster-group + .roster-group {
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.roster-list li {
    padding: 2px 0;
}

@media (min-width: 480px) {
    .roster-list { columns: 2; column-gap: 32px; }
}

/* The admin pages hold wide tables, so they use more of the screen. */
main.container:has(.admin-content) {
    max-width: 1280px;
}

/* Footer */

.site-footer {
    padding-bottom: 32px;
    background: var(--navy);
    color: var(--on-navy-muted);
    font-size: 15px;
}

.site-footer::before {
    content: "";
    display: block;
    height: 10px;
    margin-bottom: 24px;
    background: var(--stripe);
}

.footer-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-row p {
    min-width: 0;
    margin: 0;
}

.site-footer a {
    color: var(--white);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.site-footer .badge {
    width: 40px;
    height: 40px;
}
