/* ==========================================================================
   CCGN site.css - shared design system (redesign 2026, round 2)
   Spec and rules: docs/redesign/DIRECTION.md

   Opt in with <html class="ccgn">. Every rule is scoped to that class, so a
   page without it is untouched even if it links this file. Everything also
   sits in cascade layers, and unlayered CSS always beats layered CSS, so any
   leftover inline <style> on a page in transition still wins over the system.
   Tokens on :root are the only unscoped part. Their names are a contract:
   js/contact.js and every rebuilt page read them, so rename nothing without
   updating DIRECTION.md section 4 and every user.

   Fonts (load non-blocking in <head>, see DIRECTION.md section 3):
     Archivo (wdth 100..125, wght 500..800) for headings, numbers and labels
     Atkinson Hyperlegible Next (wght 400..700) for reading text and UI
   ========================================================================== */

@layer ccgn.tokens, ccgn.base, ccgn.layout, ccgn.components, ccgn.utilities;

/* Metric-matched fallbacks so text does not jump when the web fonts land.
   Measured against the real files (Archivo at 112% width, 760 weight, on
   Arial Bold; Atkinson Hyperlegible Next 400 on Arial). */
@font-face {
    font-family: "Atkinson Fallback";
    src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
    size-adjust: 99%;
    ascent-override: 99%;
    descent-override: 32%;
    line-gap-override: 0%;
}
@font-face {
    font-family: "Archivo Fallback";
    src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
    size-adjust: 114%;
    ascent-override: 77%;
    descent-override: 18.5%;
    line-gap-override: 0%;
}

/* --------------------------------------------------------------------------
   1. Tokens
   Colours are sampled from images/ccgn-logo.png: logo green #648C19 (tree,
   "GOLF NETWORK"), logo blue #005CBB (water swoosh, "CENTRAL COAST").
   Contrast ratios are against --surface (#FFF) unless noted.
   -------------------------------------------------------------------------- */
@layer ccgn.tokens {
    :root {
        /* Grounds */
        --surface: #FFFFFF;        /* cards, header, inputs, tables, footer */
        --paper: #F4F7F9;          /* page background, cool off-white */
        --sky: #E8F0F4;            /* hero ground, the old homepage blue-grey */
        --surface-2: #EAF0F4;      /* table header, quiet fills, skeletons */

        /* Text */
        --ink: #13283F;            /* headings and body, navy. 15.0:1, 13.9 on paper */
        --ink-2: #3B4C5C;          /* secondary text. 8.8:1, 7.7 on sky */
        --ink-3: #55667A;          /* labels and meta, the lightest text allowed. 5.9:1, 5.1 on sky */
        --rule: #D3DEE6;           /* hairlines between rows and cells */
        --rule-strong: #7A8D9E;    /* input borders, 3.4:1 (WCAG 1.4.11) */

        /* Brand: blue is for actions, green is for golf */
        --blue: #005CBB;           /* logo blue. Buttons, links, focus. 6.5:1, white on it 6.5 */
        --blue-hover: #004C99;     /* 8.4:1 */
        --blue-tint: #E3EEF9;      /* selected rows, chips. Blue on it 5.5 */
        --green-brand: #648C19;    /* logo green. Decoration, rules, large text only (4.0:1, 3.4 on sky) */
        --green: #456B0C;          /* green text at any size. 6.3:1, 5.4 on sky */
        --green-hover: #37560A;    /* hover for anything filled with --green. White on it 8.4 */
        --green-tint: #EBF2DC;     /* "Open" badges. Green on it 5.4 */

        /* Semantic aliases. contact.js and new components use these. */
        --action: var(--blue);
        --action-hover: var(--blue-hover);
        --action-ink: #FFFFFF;
        --link: var(--blue);
        --focus: var(--blue);

        /* The board: deep water blue, used rarely (honours board, closing band) */
        --board: #0B2C4D;          /* white on it 14.2 */
        --board-2: #163D63;        /* rows and rules on the board */
        --board-ink: #E8F0F4;      /* text on board, 12.3:1 */
        --board-ink-2: #9FB6CA;    /* secondary text on board, 6.8:1 (5.3 on board-2) */
        --board-accent: #A9CC5B;   /* fairway green on the board: honours months, kickers. 7.7:1 */
        --focus-on-dark: #8FC3F0;  /* focus ring on the board, 7.6:1 */
        --gold: var(--board-accent); /* round 1 name, kept so nothing breaks. Do not use in new work */

        /* Status */
        --live: #B42318;           /* live scoring only, white on it 6.6:1 */
        --live-tint: #FBEAE7;      /* live on it 5.6 */
        --danger: #B42318;

        /* Type */
        --font-text: "Atkinson Hyperlegible Next", "Atkinson Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        --font-display: "Archivo", "Archivo Fallback", Arial, sans-serif;
        --wide: 112%;              /* font-stretch for headings and display numbers */
        --wide-2: 106%;            /* font-stretch for labels and small headings */

        --step--2: 0.8125rem;                                   /* 13px labels */
        --step--1: 0.9375rem;                                   /* 15px meta, nav */
        --step-0: 1.0625rem;                                    /* 17px body */
        --step-1: 1.25rem;                                      /* 20px lead, h4 */
        --step-2: clamp(1.3125rem, 1.15rem + 0.6vw, 1.5625rem); /* h3 */
        --step-3: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);     /* h2 */
        --step-4: clamp(2.25rem, 1.5rem + 3.1vw, 3.75rem);      /* h1 */
        --step-5: clamp(2.75rem, 1.9rem + 3.6vw, 4.5rem);       /* display numbers */

        /* Space: 4px base. Use these, never ad-hoc values. */
        --s-1: 0.25rem;  /* 4 */
        --s-2: 0.5rem;   /* 8 */
        --s-3: 0.75rem;  /* 12 */
        --s-4: 1rem;     /* 16 */
        --s-5: 1.5rem;   /* 24 */
        --s-6: 2rem;     /* 32 */
        --s-7: 3rem;     /* 48 */
        --s-8: 4rem;     /* 64 */
        --s-9: 6rem;     /* 96 */
        --section: clamp(3.5rem, 2rem + 6vw, 7rem);
        --gutter: 1rem;          /* 16px on phones */
        --measure: 62ch;
        --wrap: 75rem;           /* 1200px */

        /* Shape */
        --r-1: 4px;    /* badges, chips, logo thumbnails */
        --r-2: 8px;    /* buttons, inputs */
        --r-3: 12px;   /* cards, panels, dropdowns */
        --r-4: 20px;   /* hero search card, modal, photo frames */
        --shadow-overlay: 0 2px 4px rgba(11, 44, 77, 0.06), 0 16px 40px rgba(11, 44, 77, 0.16);
        --shadow-raised: 0 1px 2px rgba(11, 44, 77, 0.05), 0 10px 30px rgba(11, 44, 77, 0.09);

        /* Layers */
        --z-header: 100;
        --z-overlay: 300;   /* modals and the contact chooser */

        /* Motion */
        --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
        --dur-1: 120ms;  /* hover, press */
        --dur-2: 200ms;  /* menus, swaps */
        --dur-3: 320ms;  /* photo crossfade */

        --header-h: 64px;
    }
    @media (min-width: 48rem) {
        :root { --gutter: 1.5rem; --header-h: 76px; }
    }
    @media (min-width: 80rem) {
        :root { --gutter: 2rem; }
    }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
@layer ccgn.base {
    .ccgn *,
    .ccgn *::before,
    .ccgn *::after { box-sizing: border-box; }
    html.ccgn {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        scroll-padding-top: calc(var(--header-h) + var(--s-4));
    }
    .ccgn body {
        margin: 0;
        background: var(--paper);
        color: var(--ink);
        font-family: var(--font-text);
        font-size: var(--step-0);
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        overflow-x: clip;
    }
    .ccgn h1,
    .ccgn h2,
    .ccgn h3,
    .ccgn h4 {
        margin: 0;
        font-family: var(--font-display);
        font-stretch: var(--wide);
        font-weight: 720;
        line-height: 1.1;
        letter-spacing: -0.012em;
        color: var(--ink);
        text-wrap: balance;
    }
    .ccgn h1 { font-size: var(--step-4); font-weight: 780; letter-spacing: -0.018em; line-height: 1.04; }
    .ccgn h2 { font-size: var(--step-3); }
    .ccgn h3 { font-size: var(--step-2); font-stretch: var(--wide-2); font-weight: 700; }
    .ccgn h4 { font-size: var(--step-1); font-family: var(--font-text); font-stretch: 100%; font-weight: 700; letter-spacing: 0; }
    .ccgn p { margin: 0; text-wrap: pretty; }
    .ccgn p + p { margin-top: var(--s-4); }
    .ccgn ul,
    .ccgn ol { margin: 0; padding: 0; }
    .ccgn img,
    .ccgn svg,
    .ccgn video { display: block; max-width: 100%; }
    .ccgn img { height: auto; }
    .ccgn a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
    .ccgn a:hover { color: var(--blue-hover); }
    .ccgn button,
    .ccgn input,
    .ccgn select,
    .ccgn textarea { font: inherit; color: inherit; }
    .ccgn button { cursor: pointer; }
    .ccgn table { border-collapse: collapse; }
    .ccgn [hidden] { display: none !important; }

    .ccgn :focus-visible {
        outline: 3px solid var(--focus);
        outline-offset: 2px;
        border-radius: 2px;
    }
    .ccgn ::selection { background: var(--blue-tint); color: var(--ink); }

    @media (prefers-reduced-motion: reduce) {
        .ccgn *,
        .ccgn *::before,
        .ccgn *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
@layer ccgn.layout {
    .ccgn .wrap {
        width: 100%;
        max-width: calc(var(--wrap) + 2 * var(--gutter));
        margin-inline: auto;
        padding-inline: var(--gutter);
    }
    .ccgn .section { padding-block: var(--section); }
    .ccgn .section--tight { padding-block: calc(var(--section) * 0.6); }
    .ccgn .section--surface { background: var(--surface); }
    .ccgn .section + .section--rule { border-top: 1px solid var(--rule); }

    .ccgn .stack > * + * { margin-top: var(--stack, var(--s-4)); }

    /* Two-column split used for "heading left, content right" sections. */
    .ccgn .split {
        display: grid;
        gap: var(--s-6);
    }
    @media (min-width: 56rem) {
        .ccgn .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); }
    }
}

/* --------------------------------------------------------------------------
   4. Components
   -------------------------------------------------------------------------- */
@layer ccgn.components {

    /* Skip link ---------------------------------------------------------- */
    .ccgn .skip-link {
        position: absolute;
        left: var(--s-4);
        top: -100px;
        z-index: 200;
        padding: var(--s-3) var(--s-4);
        background: var(--ink);
        color: #fff;
        border-radius: var(--r-2);
        font-weight: 700;
    }
    .ccgn .skip-link:focus { top: var(--s-3); color: #fff; }

    /* Header and nav ----------------------------------------------------- */
    .ccgn .site-header {
        position: sticky;
        top: 0;
        z-index: var(--z-header);
        background: var(--surface);
        border-bottom: 1px solid var(--rule);
    }
    .ccgn .site-header::after {
        /* Shadow appears once scrolled. Opacity only, so it never repaints. */
        content: "";
        position: absolute;
        inset: auto 0 -12px 0;
        height: 12px;
        background: linear-gradient(rgba(11, 44, 77, 0.08), rgba(11, 44, 77, 0));
        opacity: 0;
        transition: opacity var(--dur-2) var(--ease);
        pointer-events: none;
    }
    .ccgn .site-header.is-scrolled::after { opacity: 1; }
    .ccgn .site-header__bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-4);
        min-height: var(--header-h);
    }
    .ccgn .brand {
        display: inline-flex;
        align-items: center;
        gap: var(--s-3);
        min-height: 48px;
        color: var(--ink);
        text-decoration: none;
        flex-shrink: 0;
    }
    .ccgn .brand:hover { color: var(--ink); }
    .ccgn .brand__mark { width: 46px; height: auto; }
    /* The name is set like the logo lettering: CENTRAL COAST in blue,
       GOLF NETWORK in green, wide caps. */
    .ccgn .brand__name {
        font-family: var(--font-display);
        font-stretch: var(--wide);
        font-weight: 800;
        font-size: 0.9375rem;
        line-height: 1.05;
        letter-spacing: 0.01em;
        text-transform: uppercase;
        color: var(--blue);
    }
    .ccgn .brand__name span { display: block; }
    .ccgn .brand__name span + span { color: var(--green); font-weight: 600; letter-spacing: 0.06em; font-size: 0.86em; }
    @media (min-width: 48rem) {
        .ccgn .brand__mark { width: 54px; }
        .ccgn .brand__name { font-size: 1.0625rem; }
    }

    .ccgn .site-nav { display: flex; align-items: center; gap: var(--s-5); }
    .ccgn .site-nav__list { display: flex; align-items: center; gap: var(--s-1); list-style: none; }
    .ccgn .site-nav__link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding-inline: var(--s-3);
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 600;
        text-decoration: none;
        border-radius: var(--r-2);
        position: relative;
        transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
    }
    .ccgn .site-nav__link:hover { color: var(--ink); background: var(--surface-2); }
    .ccgn .site-nav__link[aria-current="page"] { color: var(--ink); font-weight: 700; }
    .ccgn .site-nav__link[aria-current="page"]::after {
        content: "";
        position: absolute;
        left: var(--s-3);
        right: var(--s-3);
        bottom: 6px;
        height: 3px;
        background: var(--green-brand);
        border-radius: 2px;
    }
    .ccgn .site-nav__link--live::before {
        content: "";
        width: 8px;
        height: 8px;
        margin-right: var(--s-2);
        border-radius: 50%;
        background: var(--live);
    }
    .ccgn .site-nav__home { display: none; }

    .ccgn .menu-toggle {
        display: none;
        align-items: center;
        gap: var(--s-2);
        min-height: 44px;
        padding: 0 var(--s-3);
        border: 1px solid var(--rule-strong);
        border-radius: var(--r-2);
        background: var(--surface);
        font-size: var(--step--1);
        font-weight: 700;
        color: var(--ink);
    }
    .ccgn .menu-toggle__icon { width: 18px; height: 12px; position: relative; }
    .ccgn .menu-toggle__icon::before,
    .ccgn .menu-toggle__icon::after,
    .ccgn .menu-toggle__icon span {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
        transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
    }
    .ccgn .menu-toggle__icon::before { top: 0; }
    .ccgn .menu-toggle__icon span { top: 5px; }
    .ccgn .menu-toggle__icon::after { top: 10px; }
    .ccgn .menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
    .ccgn .menu-toggle[aria-expanded="true"] .menu-toggle__icon span { opacity: 0; }
    .ccgn .menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }

    @media (max-width: 63.99rem) {
        .ccgn .menu-toggle { display: inline-flex; }
        .ccgn .site-nav {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            flex-direction: column;
            align-items: stretch;
            gap: 0;
            padding: var(--s-2) var(--gutter) var(--s-5);
            background: var(--surface);
            border-bottom: 1px solid var(--rule);
            box-shadow: var(--shadow-overlay);
            opacity: 0;
            transform: translateY(-8px);
            visibility: hidden;
            transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
            max-height: calc(100dvh - var(--header-h));
            overflow-y: auto;
        }
        .ccgn .site-nav.is-open {
            opacity: 1;
            transform: none;
            visibility: visible;
            transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s;
        }
        .ccgn .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
        .ccgn .site-nav__list li + li { border-top: 1px solid var(--rule); }
        .ccgn .site-nav__link {
            display: flex;
            min-height: 56px;
            padding-inline: 0;
            font-size: 1.125rem;
            color: var(--ink);
            border-radius: 0;
        }
        .ccgn .site-nav__link:hover { background: none; color: var(--blue); }
        .ccgn .site-nav__link[aria-current="page"]::after { left: auto; right: 0; top: 50%; bottom: auto; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; }
        .ccgn .site-nav__home { display: block; }
        .ccgn .site-nav .button { margin-top: var(--s-4); width: 100%; }
    }

    /* Buttons ------------------------------------------------------------
       Works on <a> and <button>. Contact actions are always
       <button type="button" data-play|data-join|data-contact>. */
    .ccgn .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--s-2);
        min-height: 48px;
        padding: 0 var(--s-5);
        border: 1px solid transparent;
        border-radius: var(--r-2);
        background: var(--surface);
        color: var(--ink);
        font-family: var(--font-text);
        font-size: 1.0625rem;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
    }
    .ccgn .button:active { transform: translateY(1px); }
    .ccgn .button svg { width: 18px; height: 18px; flex-shrink: 0; }
    .ccgn .button--primary { background: var(--action); color: var(--action-ink); }
    .ccgn .button--primary:hover { background: var(--action-hover); color: var(--action-ink); }
    .ccgn .button--secondary { border-color: var(--rule-strong); background: var(--surface); }
    .ccgn .button--secondary:hover { border-color: var(--ink); color: var(--ink); }
    .ccgn .button--live { background: var(--live); color: #fff; }
    .ccgn .button--live:hover { background: #962015; color: #fff; }
    .ccgn .button--on-dark { background: var(--board-ink); color: var(--board); }
    .ccgn .button--on-dark:hover { background: #fff; color: var(--board); }
    .ccgn .button--ghost-dark { border-color: rgba(232, 240, 244, 0.5); background: transparent; color: var(--board-ink); }
    .ccgn .button--ghost-dark:hover { border-color: var(--board-ink); color: #fff; }
    .ccgn .button--sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--step--1); }
    .ccgn .button--block { width: 100%; }
    @media (max-width: 47.99rem) {
        .ccgn .button { white-space: normal; }
    }
    /* A <button> that reads as a text link (footer, inline copy). */
    .ccgn .link-button {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--link);
        font-weight: 700;
        text-align: left;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 0.18em;
    }
    .ccgn .link-button:hover { color: var(--blue-hover); }
    .ccgn .honours .link-button,
    .ccgn .closing .link-button { color: var(--board-ink); }
    .ccgn .honours :focus-visible,
    .ccgn .closing :focus-visible,
    .ccgn .event-day-strip :focus-visible { outline-color: var(--focus-on-dark); }
    .ccgn .event-day-strip.is-live :focus-visible { outline-color: #fff; }

    /* Plain text link with an arrow, for "see all" style links. */
    .ccgn .link-arrow {
        display: inline-flex;
        align-items: center;
        gap: var(--s-2);
        min-height: 44px;
        font-weight: 700;
        text-decoration: none;
        color: var(--link);
    }
    .ccgn .link-arrow::after {
        content: "";
        width: 0.5em;
        height: 0.5em;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform var(--dur-1) var(--ease);
    }
    .ccgn .link-arrow:hover::after { transform: translateX(3px) rotate(45deg); }

    /* Section heading ---------------------------------------------------- */
    .ccgn .section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); max-width: 44rem; }
    .ccgn .section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.45; }
    .ccgn .section-head--row {
        max-width: none;
        grid-template-columns: 1fr auto;
        align-items: end;
    }
    /* Small caps label, set in wide Archivo like "GOLF NETWORK" in the logo. */
    .ccgn .kicker {
        font-family: var(--font-display);
        font-stretch: var(--wide-2);
        font-size: var(--step--2);
        font-weight: 700;
        letter-spacing: 0.08em;
        line-height: 1.3;
        text-transform: uppercase;
        color: var(--green);
    }
    .ccgn .lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }

    /* Page head ----------------------------------------------------------
       The homepage sky with its contour lines, held still, for working
       pages (calendar, handicaps). Optional .page-head__water adds the water
       ribbons and fairway edge along the bottom. --overlap leaves room at
       the bottom for a list or card that overlaps the band's lower edge.
       --contours-left puts the contours on the left. */
    .ccgn .page-head { position: relative; background: var(--sky); overflow: hidden; }
    .ccgn .page-head__contours { position: absolute; width: 72rem; max-width: none; right: -26rem; top: -24rem; pointer-events: none; }
    .ccgn .page-head--contours-left .page-head__contours { right: auto; left: -30rem; top: -26rem; }
    .ccgn .page-head__water { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 6rem; pointer-events: none; }
    .ccgn .page-head__water .water__far { fill: var(--blue); opacity: 0.07; }
    .ccgn .page-head__water .water__near { fill: var(--blue); opacity: 0.12; }
    .ccgn .page-head__water .water__edge { fill: none; stroke: var(--green-brand); stroke-width: 2.5; opacity: 0.55; }
    .ccgn .page-head__inner { position: relative; display: grid; gap: var(--s-4); padding-block: var(--s-7); }
    .ccgn .page-head--overlap .page-head__inner { padding-bottom: calc(var(--s-8) + var(--s-6)); }
    .ccgn .page-head .lead { max-width: 38rem; }
    @media (max-width: 47.99rem) {
        .ccgn .page-head__contours { width: 44rem; right: -24rem; top: -12rem; }
        .ccgn .page-head--contours-left .page-head__contours { right: auto; left: -20rem; top: -14rem; }
        .ccgn .page-head__water { height: 4rem; }
        .ccgn .page-head__inner { padding-block: var(--s-6); gap: var(--s-3); }
        .ccgn .page-head--overlap .page-head__inner { padding-bottom: calc(var(--s-8) + var(--s-3)); }
        .ccgn .page-head .lead { font-size: 1.125rem; }
    }

    /* Cards -------------------------------------------------------------- */
    .ccgn .card {
        background: var(--surface);
        border: 1px solid var(--rule);
        border-radius: var(--r-3);
        padding: var(--s-5);
    }
    .ccgn a.card,
    .ccgn .card--link {
        display: block;
        color: inherit;
        text-decoration: none;
        transition: border-color var(--dur-1) var(--ease);
    }
    .ccgn a.card:hover,
    .ccgn .card--link:hover { border-color: var(--rule-strong); color: inherit; }

    /* Scorecard ruled grid: label over value in hairline cells.
       Use .scorecard--2, --3 or --4 for the column count. */
    .ccgn .scorecard {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid var(--rule);
        margin: 0;
    }
    .ccgn .scorecard--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ccgn .scorecard--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ccgn .scorecard > div {
        padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
        border-bottom: 1px solid var(--rule);
        border-left: 1px solid var(--rule);
        min-width: 0;
    }
    .ccgn .scorecard--2 > div:nth-child(2n + 1),
    .ccgn .scorecard--3 > div:nth-child(3n + 1),
    .ccgn .scorecard--4 > div:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
    @media (max-width: 40rem) {
        .ccgn .scorecard--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .ccgn .scorecard--4 > div:nth-child(n) { padding-left: var(--s-4); border-left: 1px solid var(--rule); }
        .ccgn .scorecard--4 > div:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
    }
    .ccgn .scorecard dt,
    .ccgn .scorecard .scorecard__label,
    .ccgn .facts dt {
        font-family: var(--font-display);
        font-stretch: var(--wide-2);
        font-size: var(--step--2);
        font-weight: 650;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--ink-3);
    }
    /* Values are set in Archivo: dates, times and scores read as data, and
       Atkinson's slashed zero stays in running text only. */
    .ccgn .scorecard dd,
    .ccgn .scorecard .scorecard__value {
        margin: var(--s-1) 0 0;
        font-family: var(--font-display);
        font-weight: 600;
        font-variant-numeric: lining-nums;
        color: var(--ink);
        overflow-wrap: anywhere;
    }

    /* Facts list: label left, value right, ruled rows. */
    .ccgn .facts { margin: 0; border-top: 1px solid var(--rule); }
    .ccgn .facts > div {
        display: grid;
        grid-template-columns: 9.5rem minmax(0, 1fr);
        gap: var(--s-1) var(--s-5);
        padding-block: var(--s-4);
        border-bottom: 1px solid var(--rule);
    }
    .ccgn .facts dt { padding-top: 4px; }
    .ccgn .facts dd { margin: 0; color: var(--ink); max-width: var(--measure); }
    .ccgn .facts dd a { font-weight: 700; }
    @media (max-width: 36rem) {
        .ccgn .facts > div { grid-template-columns: minmax(0, 1fr); }
    }

    /* Big numbers (stats, scores, handicaps). */
    .ccgn .figure {
        font-family: var(--font-display);
        font-stretch: var(--wide);
        font-weight: 760;
        line-height: 1;
        letter-spacing: -0.01em;
        font-variant-numeric: lining-nums tabular-nums;
        color: var(--green-brand);
    }

    /* Fixture card: a golf day, styled as a scorecard ---------------------
       A size container: narrower than 46rem it stacks; wider, it lays out
       in a row (date | course and facts | actions), whatever the page. */
    .ccgn .fixture {
        container-type: inline-size;
        background: var(--surface);
        border: 1px solid var(--rule);
        border-radius: var(--r-3);
        box-shadow: var(--shadow-raised);
        overflow: hidden;
    }
    .ccgn .fixture__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-3);
        min-height: 52px;
        padding: var(--s-2) var(--s-5);
        border-bottom: 1px solid var(--rule);
    }
    .ccgn .fixture__body { padding: var(--s-5); display: grid; gap: var(--s-5) var(--s-6); }
    .ccgn .fixture__date {
        display: flex;
        align-items: center;
        gap: var(--s-3);
    }
    .ccgn .fixture__day {
        font-family: var(--font-display);
        font-stretch: var(--wide);
        font-size: var(--step-5);
        font-weight: 780;
        line-height: 0.9;
        letter-spacing: -0.02em;
        font-variant-numeric: lining-nums tabular-nums;
        color: var(--blue);
        min-width: 1.3em;
    }
    .ccgn .fixture__when { display: grid; gap: 2px; }
    .ccgn .fixture__weekday { font-family: var(--font-display); font-stretch: var(--wide); font-size: var(--step-2); font-weight: 720; line-height: 1.1; }
    .ccgn .fixture__month { color: var(--ink-2); font-family: var(--font-display); font-weight: 500; }
    .ccgn .fixture__course { font-weight: 700; font-size: 1.1875rem; line-height: 1.3; }
    .ccgn .fixture__place { color: var(--ink-2); font-size: var(--step--1); margin-top: 2px; }
    .ccgn .fixture__info .scorecard { margin-top: var(--s-4); }
    .ccgn .fixture__actions { display: grid; gap: var(--s-3); align-content: center; }
    .ccgn .fixture__note { font-size: var(--step--1); color: var(--ink-3); }
    @container (min-width: 46rem) {
        .ccgn .fixture__body { grid-template-columns: auto minmax(0, 1fr) minmax(14rem, 16rem); align-items: center; padding: var(--s-6); }
        .ccgn .fixture__date { padding-right: var(--s-6); border-right: 1px solid var(--rule); align-self: stretch; }
    }
    .ccgn .fixture__foot {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-2) var(--s-4);
        padding: var(--s-1) var(--s-5);
        background: var(--surface-2);
        border-top: 1px solid var(--rule);
        font-size: var(--step--1);
        color: var(--ink-2);
    }
    .ccgn .fixture__foot a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
    .ccgn .fixture--live { border-color: rgba(180, 35, 24, 0.45); }
    .ccgn .fixture--live .fixture__head { background: var(--live-tint); border-bottom-color: rgba(180, 35, 24, 0.25); }

    /* Badges ------------------------------------------------------------- */
    .ccgn .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 26px;
        padding: 0 var(--s-2);
        border-radius: var(--r-1);
        background: var(--surface-2);
        color: var(--ink-2);
        font-size: var(--step--2);
        font-weight: 700;
        letter-spacing: 0.01em;
        white-space: nowrap;
    }
    .ccgn .badge--open { background: var(--green-tint); color: var(--green); }
    .ccgn .badge--done { background: var(--ink); color: #fff; }
    .ccgn .badge--live { background: var(--live); color: #fff; }
    .ccgn .badge--live::before,
    .ccgn .live-dot {
        content: "";
        display: inline-block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
        animation: ccgn-live 1.6s ease-in-out infinite;
    }
    .ccgn .live-dot { background: var(--live); }
    @keyframes ccgn-live { 50% { opacity: 0.35; } }

    /* Forms -------------------------------------------------------------- */
    .ccgn .field { display: grid; gap: var(--s-2); }
    .ccgn .field__label { font-size: var(--step--1); font-weight: 700; color: var(--ink); }
    .ccgn .field__hint { font-size: var(--step--1); color: var(--ink-3); }
    .ccgn .input,
    .ccgn .select,
    .ccgn .textarea {
        width: 100%;
        min-height: 52px;
        padding: 0 var(--s-4);
        border: 1px solid var(--rule-strong);
        border-radius: var(--r-2);
        background: var(--surface);
        color: var(--ink);
        font-size: 1.0625rem; /* 17px, keeps iOS from zooming */
        transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
    }
    .ccgn .textarea { min-height: 8rem; padding-block: var(--s-3); resize: vertical; }
    .ccgn .input::placeholder,
    .ccgn .textarea::placeholder { color: var(--ink-3); opacity: 1; }
    .ccgn .input:hover,
    .ccgn .select:hover,
    .ccgn .textarea:hover { border-color: var(--ink-3); }
    .ccgn .input:focus,
    .ccgn .select:focus,
    .ccgn .textarea:focus {
        outline: none;
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba(0, 92, 187, 0.22);
    }
    .ccgn .field--error .input { border-color: var(--danger); }
    .ccgn .field__error { font-size: var(--step--1); color: var(--danger); font-weight: 700; }

    /* Search with icon and results dropdown. */
    .ccgn .search { position: relative; }
    .ccgn .search__icon {
        position: absolute;
        left: var(--s-4);
        top: 50%;
        width: 20px;
        height: 20px;
        margin-top: -10px;
        color: var(--ink-3);
        pointer-events: none;
    }
    .ccgn .search .input { padding-left: calc(var(--s-4) + 20px + var(--s-3)); min-height: 56px; font-size: 1.0625rem; }
    .ccgn .search-results {
        display: none;
        position: absolute;
        z-index: 50;
        left: 0;
        right: 0;
        top: calc(100% + 6px);
        max-height: min(26rem, 60vh);
        overflow-y: auto;
        padding: var(--s-2);
        background: var(--surface);
        border: 1px solid var(--rule);
        border-radius: var(--r-3);
        box-shadow: var(--shadow-overlay);
        /* app.js colours its "View all" link with --ocean-blue */
        --ocean-blue: var(--blue);
    }
    .ccgn .search-results.active { display: grid; gap: 2px; }
    /* Tiles are written by js/app.js: a.business-tile > img + h3 + p */
    .ccgn .search-results .business-tile {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: var(--s-3);
        align-items: center;
        min-height: 56px;
        padding: var(--s-2) var(--s-3);
        border-radius: var(--r-2);
        color: var(--ink);
        text-decoration: none;
    }
    .ccgn .search-results a.business-tile:hover,
    .ccgn .search-results a.business-tile:focus-visible { background: var(--surface-2); color: var(--ink); }
    .ccgn .search-results .business-tile img {
        grid-row: 1 / span 2;
        width: 44px;
        height: 44px;
        object-fit: contain;
        background: #fff;
        border: 1px solid var(--rule);
        border-radius: var(--r-1);
        padding: 2px;
    }
    .ccgn .search-results .business-tile h3 {
        font-family: var(--font-text);
        font-stretch: 100%;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ccgn .search-results .business-tile p { font-size: var(--step--1); color: var(--ink-3); line-height: 1.3; }
    .ccgn .search-results .business-tile p:empty { display: none; }
    .ccgn .search-results .business-tile:not(:has(img)) {
        display: flex;
        align-items: center;
        color: var(--ink-2);
        padding-inline: var(--s-3);
    }
    .ccgn .search-results a.business-tile:not(:has(img)) { border-top: 1px solid var(--rule); border-radius: 0; margin-top: var(--s-1); }

    /* Tables ------------------------------------------------------------- */
    .ccgn .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ccgn .table { width: 100%; background: var(--surface); }
    .ccgn .table th,
    .ccgn .table td { padding: var(--s-3) var(--s-4); text-align: left; border-bottom: 1px solid var(--rule); vertical-align: middle; }
    .ccgn .table thead th {
        font-family: var(--font-display);
        font-stretch: var(--wide-2);
        font-size: var(--step--2);
        font-weight: 650;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--ink-3);
        background: var(--surface-2);
        position: sticky;
        top: var(--header-h);
    }
    .ccgn .table td.num,
    .ccgn .table th.num { text-align: right; }
    .ccgn .table td.num { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
    .ccgn .table tbody tr:hover { background: #F7FAFC; }
    .ccgn .table tr.is-me,
    .ccgn .table tr.is-selected { background: var(--blue-tint); }
    .ccgn .table--compact th,
    .ccgn .table--compact td { padding: var(--s-2) var(--s-3); }

    /* Event-day strip (live scoring / golf day today) ---------------------
       Docked to the bottom of the screen, so it never pushes the page down
       when it arrives (it is filled from Supabase after first paint), and
       the scoring buttons sit under the thumb on the course. Pages that show
       it add html.has-event-strip, which pads the end of the page so the
       strip never covers the footer. */
    .ccgn .event-day-strip {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        color: #fff;
        background: var(--board);
        box-shadow: 0 -8px 24px rgba(11, 44, 77, 0.18);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        animation: ccgn-strip-in var(--dur-3) var(--ease) both;
    }
    .ccgn .event-day-strip.is-live { background: var(--live); }
    @keyframes ccgn-strip-in { from { transform: translateY(100%); } }
    html.ccgn.has-event-strip body { padding-bottom: 9rem; }
    .ccgn .event-day-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-2) var(--s-5);
        padding-block: var(--s-3);
    }
    @media (max-width: 40rem) {
        .ccgn .event-day-sub { display: none; }
        .ccgn .event-day-actions { width: 100%; }
        .ccgn .event-day-btn { flex: 1 1 0; justify-content: center; }
    }
    .ccgn .event-day-kicker {
        display: inline-flex;
        align-items: center;
        gap: var(--s-2);
        font-family: var(--font-display);
        font-stretch: var(--wide-2);
        font-size: var(--step--2);
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .ccgn .event-day-kicker .live-dot { background: #fff; }
    .ccgn .event-day-title { color: #fff; font-size: var(--step-2); margin-top: 2px; }
    .ccgn .event-day-sub { font-size: var(--step--1); margin-top: 2px; }
    .ccgn .event-day-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
    .ccgn .event-day-btn {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 var(--s-4);
        border-radius: var(--r-2);
        font-weight: 700;
        text-decoration: none;
        border: 1px solid rgba(255, 255, 255, 0.65);
        color: #fff;
    }
    .ccgn .event-day-btn:hover { color: #fff; border-color: #fff; }
    .ccgn .event-day-btn-main { background: #fff; color: var(--ink); border-color: #fff; }
    .ccgn .event-day-btn-main:hover { color: var(--ink); background: var(--paper); }
    .ccgn .event-day-strip.is-live .event-day-btn-main { color: var(--live); }

    /* Honours board ------------------------------------------------------
       Deep water blue with fairway green lettering. Home and results only. */
    .ccgn .honours { background: var(--board); color: var(--board-ink); }
    .ccgn .honours h2,
    .ccgn .honours h3 { color: var(--board-ink); }
    .ccgn .honours .kicker { color: var(--board-accent); }
    /* Children: .honours__head, .honours__aside (photo), .honours__main (list).
       Phones stack them in that order; wide screens put the photo on the right. */
    .ccgn .honours__grid { display: grid; gap: var(--s-5); align-items: start; }
    @media (min-width: 60rem) {
        .ccgn .honours__grid {
            grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
            grid-template-areas: "head aside" "main aside";
            grid-template-rows: auto 1fr;
            column-gap: var(--s-8);
            row-gap: 0;
        }
        .ccgn .honours__head { grid-area: head; }
        .ccgn .honours__main { grid-area: main; }
        .ccgn .honours__aside { grid-area: aside; }
    }
    .ccgn .honours__head { display: grid; gap: var(--s-3); margin-bottom: var(--s-2); }
    @media (min-width: 60rem) { .ccgn .honours__head { margin-bottom: var(--s-6); } }
    .ccgn .honours__head p { color: var(--board-ink-2); max-width: 36rem; }
    .ccgn .honours__list { list-style: none; border-top: 2px solid var(--board-accent); }
    .ccgn .honours__row { border-bottom: 1px solid var(--board-2); }
    .ccgn .honours__link {
        display: grid;
        grid-template-columns: 7.5rem minmax(0, 1fr) auto;
        gap: var(--s-1) var(--s-4);
        align-items: baseline;
        padding: var(--s-4) var(--s-2) var(--s-4) 0;
        color: var(--board-ink);
        text-decoration: none;
        position: relative;
    }
    .ccgn .honours__link::before {
        /* Green marker for the row whose photo is in the frame. */
        content: "";
        position: absolute;
        left: -14px;
        top: 50%;
        width: 4px;
        height: 28px;
        margin-top: -14px;
        border-radius: 2px;
        background: var(--board-accent);
        opacity: 0;
        transform: scaleY(0.4);
        transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
    }
    .ccgn .honours__row.is-active .honours__link::before { opacity: 1; transform: none; }
    .ccgn .honours__link:hover { color: #fff; }
    .ccgn .honours__month {
        font-family: var(--font-display);
        font-stretch: 118%;
        font-size: var(--step--1);
        font-weight: 760;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--board-accent);
    }
    .ccgn .honours__month small {
        display: block;
        font-stretch: 100%;
        font-size: var(--step--2);
        font-weight: 500;
        color: var(--board-ink-2);
        letter-spacing: 0.04em;
    }
    .ccgn .honours__names { font-size: var(--step-0); font-weight: 700; line-height: 1.4; }
    .ccgn .honours__course { display: block; font-size: var(--step--1); color: var(--board-ink-2); margin-top: 2px; font-weight: 400; }
    .ccgn .honours__score {
        font-family: var(--font-display);
        font-stretch: var(--wide);
        font-size: var(--step-1);
        font-weight: 700;
        font-variant-numeric: tabular-nums lining-nums;
        color: var(--board-ink);
        text-align: right;
    }
    .ccgn .honours__score small { display: block; font-family: var(--font-text); font-size: var(--step--2); color: var(--board-ink-2); font-weight: 400; }
    .ccgn .honours__frame {
        position: relative;
        aspect-ratio: 4 / 5;
        border-radius: var(--r-4);
        overflow: hidden;
        background: var(--board-2);
        margin: 0;
    }
    .ccgn .honours__frame img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 50% 35%;
        opacity: 0;
        transition: opacity var(--dur-3) var(--ease);
    }
    .ccgn .honours__frame img.is-shown { opacity: 1; }
    .ccgn .honours__caption {
        margin-top: var(--s-3);
        font-size: var(--step--1);
        color: var(--board-ink-2);
        min-height: 1.55em;
    }
    .ccgn .honours__empty { padding: var(--s-5) 0; color: var(--board-ink-2); }
    .ccgn .honours__more { margin-top: var(--s-4); }
    .ccgn .honours .link-arrow { color: var(--board-ink); }
    @media (max-width: 59.99rem) {
        .ccgn .honours__frame { aspect-ratio: 4 / 3; }
    }
    @media (max-width: 34rem) {
        .ccgn .honours__link { grid-template-columns: minmax(0, 1fr) auto; }
        .ccgn .honours__month { grid-column: 1 / -1; }
        .ccgn .honours__month small { display: inline; margin-left: var(--s-2); }
        .ccgn .honours__link::before { left: -10px; }
    }

    /* Sponsor row -------------------------------------------------------- */
    .ccgn .sponsors {
        display: grid;
        background: var(--surface); /* several sponsor logos carry a white box */
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border: 1px solid var(--rule);
        border-radius: var(--r-3);
        overflow: hidden;
    }
    .ccgn .sponsors a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 9rem;
        padding: var(--s-5);
        transition: background-color var(--dur-1) var(--ease);
    }
    .ccgn .sponsors a + a { border-left: 1px solid var(--rule); }
    .ccgn .sponsors a:hover { background: var(--paper); }
    .ccgn .sponsors img { max-height: 64px; max-width: min(100%, 13rem); width: auto; object-fit: contain; }
    @media (max-width: 40rem) {
        .ccgn .sponsors a { min-height: 5.5rem; padding: var(--s-3); }
        .ccgn .sponsors img { max-height: 40px; }
    }

    /* Empty, error and loading states ----------------------------------- */
    .ccgn .empty {
        padding: var(--s-5);
        border: 1px dashed var(--rule-strong);
        border-radius: var(--r-3);
        color: var(--ink-2);
        text-align: left;
    }
    .ccgn .empty strong { display: block; color: var(--ink); margin-bottom: var(--s-1); }
    .ccgn .skeleton {
        display: inline-block;
        min-width: 4ch;
        border-radius: var(--r-1);
        background: var(--surface-2);
        color: transparent !important;
        animation: ccgn-skeleton 1.4s ease-in-out infinite;
        user-select: none;
    }
    .ccgn .honours .skeleton { background: var(--board-2); }
    @keyframes ccgn-skeleton { 50% { opacity: 0.55; } }

    /* Modal --------------------------------------------------------------
       For pages that still need a dialog. Joining is now [data-join]
       (js/contact.js), not a modal on the page. */
    .ccgn .modal-overlay {
        position: fixed;
        inset: 0;
        z-index: var(--z-overlay);
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: var(--s-4);
        background: rgba(11, 44, 77, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
    }
    .ccgn .modal-overlay.active {
        opacity: 1;
        visibility: visible;
        transition: opacity var(--dur-2) var(--ease), visibility 0s;
    }
    .ccgn .modal-content {
        position: relative;
        width: 100%;
        max-width: 34rem;
        max-height: calc(100dvh - 2rem);
        overflow-y: auto;
        padding: var(--s-6) var(--s-5) var(--s-5);
        background: var(--surface);
        border-radius: var(--r-4);
        box-shadow: var(--shadow-overlay);
        transform: translateY(16px);
        transition: transform var(--dur-2) var(--ease);
    }
    .ccgn .modal-overlay.active .modal-content { transform: none; }
    @media (min-width: 40rem) {
        .ccgn .modal-overlay { align-items: center; }
        .ccgn .modal-content { padding: var(--s-7) var(--s-6) var(--s-6); }
    }
    .ccgn .modal-close {
        position: absolute;
        top: var(--s-3);
        right: var(--s-3);
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: var(--r-2);
        background: transparent;
        color: var(--ink-2);
    }
    .ccgn .modal-close:hover { background: var(--surface-2); color: var(--ink); }
    .ccgn .modal-content h2 { font-size: var(--step-3); margin-bottom: var(--s-4); padding-right: var(--s-7); }
    .ccgn .modal-content p { color: var(--ink-2); }
    .ccgn .modal-actions { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
    .ccgn .modal-note { font-size: var(--step--1); color: var(--ink-3); }

    /* Closing band ------------------------------------------------------- */
    .ccgn .closing { background: var(--board); color: var(--board-ink); }
    .ccgn .closing__grid { display: grid; gap: var(--s-6); }
    @media (min-width: 56rem) { .ccgn .closing__grid { grid-template-columns: 1fr 1fr; gap: 0; } }
    .ccgn .closing__part { display: grid; gap: var(--s-3); align-content: start; }
    @media (min-width: 56rem) {
        .ccgn .closing__part + .closing__part { border-left: 1px solid var(--board-2); padding-left: var(--s-7); }
        .ccgn .closing__part:first-child { padding-right: var(--s-7); }
    }
    @media (max-width: 55.99rem) {
        .ccgn .closing__part + .closing__part { border-top: 1px solid var(--board-2); padding-top: var(--s-6); }
    }
    .ccgn .closing h2 { color: var(--board-ink); }
    .ccgn .closing .kicker { color: var(--board-accent); }
    .ccgn .closing p { color: var(--board-ink-2); }
    .ccgn .closing__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }

    /* Footer ------------------------------------------------------------- */
    .ccgn .site-footer {
        background: var(--surface);
        border-top: 1px solid var(--rule);
        padding-block: var(--s-7) var(--s-6);
        font-size: var(--step--1);
        color: var(--ink-2);
    }
    .ccgn .site-footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-5); }
    .ccgn .site-footer__brand { grid-column: 1 / -1; }
    @media (min-width: 48rem) {
        .ccgn .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
        .ccgn .site-footer__brand { grid-column: auto; }
    }
    .ccgn .site-footer__brand { display: grid; gap: var(--s-3); max-width: 24rem; align-content: start; }
    .ccgn .site-footer__brand img { width: 96px; }
    .ccgn .site-footer h2 {
        font-family: var(--font-display);
        font-stretch: var(--wide-2);
        font-size: var(--step--2);
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--ink-3);
        margin-bottom: var(--s-3);
    }
    .ccgn .site-footer ul { list-style: none; display: grid; gap: 0; }
    .ccgn .site-footer li a,
    .ccgn .site-footer li .link-button {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        color: var(--ink);
        font-weight: 400;
        text-decoration: none;
    }
    .ccgn .site-footer li a:hover,
    .ccgn .site-footer li .link-button:hover { color: var(--blue); text-decoration: underline; }
    .ccgn .site-footer__base {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: var(--s-3);
        margin-top: var(--s-7);
        padding-top: var(--s-5);
        border-top: 1px solid var(--rule);
        color: var(--ink-3);
    }
    .ccgn .site-footer__base a { color: var(--ink-3); display: inline-flex; align-items: center; min-height: 44px; }
    .ccgn .site-footer__base p { display: flex; align-items: center; min-height: 44px; }
}

/* --------------------------------------------------------------------------
   5. Utilities
   -------------------------------------------------------------------------- */
@layer ccgn.utilities {
    .ccgn .visually-hidden {
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }
    .ccgn .tnum { font-family: var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
    .ccgn .muted { color: var(--ink-3); }
    .ccgn .display { font-family: var(--font-display); font-stretch: var(--wide); }
    .ccgn .text-blue { color: var(--blue); }
    .ccgn .text-green { color: var(--green-brand); }
}

/* 320px phones: the shared header must fit exactly, or pages that block
   pinch zoom (score.html) scroll sideways. */
@media (max-width: 22rem) {
  .ccgn .site-header__bar { gap: var(--s-2); }
  .ccgn .brand { gap: var(--s-2); }
  .ccgn .brand__mark { width: 38px; }
  .ccgn .brand__name { font-size: 0.8125rem; }
}
