/* ============================================================
   TOKENS
   ============================================================ */
:root {
    /* ---- maroon ---- */
    --maroon-900: #170607;   /* hero top */
    --maroon-800: #2b0c0e;   /* footer */
    --maroon-700: #451317;   /* hero mid */
    --maroon-600: #671e23;   /* brand */
    --maroon-500: #8c2b32;   /* hover */
    --maroon-050: #f7efef;   /* hover surface on white */

    /* maroon alphas */
    --maroon-a20: rgba(103,30,35,.20);   /* focus rings */
    --maroon-a40: rgba(103,30,35,.40);   /* drop shadows */
    --shade-mid:  rgba(23,6,7,.72);      /* veil: tracks, scrims */
    --shade-soft: rgba(23,6,7,.50);      /* veil: panels */

    /* ---- gold ---- */
    --gold-700: #6b5400;     /* type on light, 7.26:1 */
    --gold-600: #b8860b;     /* fills */
    --gold-500: #daa520;     /* accents on maroon */

    /* ---- action ---- */
    --green-600: #0b7233;
    --green-700: #085c29;
    --green-a40: rgba(11,114,51,.40);

    /* ---- validation ---- */
    --error:      #b3261e;   /* 6.54:1 on white (icon + border) */
    --error-ink:  #5c1410;   /* 11.75:1 on --error-wash */
    --error-wash: #fdecea;
    --error-a30:  rgba(179,38,30,.30);    /* focus ring while invalid */
    --warn:       #b37400;   /* 3.88:1 on white (icon + border) */
    --warn-ink:   #4a3200;   /* 11.34:1 on --warn-wash */
    --warn-wash:  #fff8e6;
    --warn-a30:   rgba(179,116,0,.30);    /* focus ring while flagged */

    /* ---- ink on light ---- */
    --ink:        #221c1a;
    --body:       #3a3330;
    --muted:      #5c5450;
    /* 3.73:1 — large text only (>=24px) */
    --muted-soft: #8d827e;
    --border:  #8a7d79;      /* form control boundaries — 3.97:1 */
    --rule:    #e0d8d6;      /* separators */
    --surface: #ffffff;
    --page:    #f4f1ef;

    /* ---- ink on dark ---- */
    --on-dark:      #ffffff;
    --on-dark-soft: rgba(255,255,255,.88);
    --on-dark-fine: rgba(255,255,255,.70);   /* 9.12:1 on maroon-800 */
    --on-dark-line: rgba(255,255,255,.28);

    --r-sm: 3px;
    --r-md: 6px;
    --r-pill: 999px;

    /* type scale */
    --t-xs:   0.8125rem;  /* 13px */
    --t-sm:   0.9375rem;  /* 15px */
    --t-base: 1.0625rem;  /* 17px */
    --t-md:   1.1875rem;  /* 19px */
    --t-lg:   1.375rem;   /* 22px */

    --swiper-theme-color: var(--maroon-600);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--page);
    color: var(--body);
    font-family: 'Barlow', system-ui, -apple-system, sans-serif;
    font-size: var(--t-base);
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.display {
    font-family: 'Anton', 'Barlow', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .005em;
}

:focus-visible { outline: 3px solid var(--maroon-600); outline-offset: 3px; }

.section { padding: 3.25rem 0; }
.inner { width: min(1220px, 92%); margin: 0 auto; }

/* ============================================================
   HERO
   ============================================================ */
#intro {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 3rem;
    background: var(--maroon-900);
    color: var(--on-dark);
    border-bottom: 5px solid var(--gold-600);
}
#intro .bg {
    position: absolute; inset: 0;
    background: url('../media/slider/slide-1.jpg') center 38% / cover no-repeat;
    opacity: .18;
    filter: grayscale(1) contrast(1.1);
}
#intro .scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(23,6,7,.94)    0%,
        rgba(69,19,23,.88) 52%,
        rgba(103,30,35,.84) 100%);
}
#intro .inner { position: relative; z-index: 2; text-align: center; }

.heroLogo {
    width: 124px; height: 124px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--on-dark-line);
}

#intro h1 {
    font-size: clamp(2.2rem, 6.2vw, 4.5rem);
    line-height: 1.04;
    max-width: 24ch;
    margin: 0 auto;
    text-shadow: 0 3px 22px var(--shade-soft);
}
#intro h1 em { font-style: normal; color: var(--gold-500); }

/* ---- scoreboard tracker ---- */
.scoreboard {
    margin-top: 2.4rem;
    text-align: left;
    background: var(--shade-soft);
    border: 2px solid var(--on-dark-line);
    border-radius: var(--r-md);
    padding: 1.4rem 1.6rem 1.5rem;
}
.sbHead {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.05rem;
}
.sbRaised .n {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.7rem, 8vw, 4.5rem);
    line-height: .88;
    color: var(--gold-500);
    font-variant-numeric: tabular-nums;
}
.sbRaised .l {
    margin-top: .55rem;
    font-size: var(--t-md); font-weight: 600;
    color: var(--on-dark-soft);
}
.sbStats { display: flex; align-items: stretch; gap: 1.6rem; }
.sbStat { text-align: center; }
.sbStat + .sbStat { border-left: 2px solid var(--on-dark-line); padding-left: 1.6rem; }
.sbStat .n {
    font-family: 'Anton', sans-serif;
    font-size: 2.2rem; line-height: 1; color: var(--on-dark);
    font-variant-numeric: tabular-nums;
}
.sbStat .l {
    margin-top: .4rem;
    font-size: var(--t-xs); font-weight: 800;
    text-transform: uppercase; letter-spacing: .13em;
    color: var(--on-dark-soft);
}
/* single column below this width, so the split header reads as centred
   content rather than two figures pinned to opposite edges */
@media (max-width: 939px) {
    .sbHead {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .sbStats { justify-content: center; }
}

.goalTrack {
    height: 24px;
    background: var(--shade-mid);
    border: 2px solid var(--on-dark-line);
    border-radius: var(--r-sm);
    overflow: hidden;
    position: relative;
}
/* yard lines every 10% */
.goalTrack::before {
    content: '';
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(90deg,
        transparent 0, transparent calc(10% - 2px),
        var(--on-dark-line) calc(10% - 2px), var(--on-dark-line) 10%);
}
.goalFill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--gold-600) 0%, var(--gold-500) 100%);
    transition: width .7s cubic-bezier(.25,.8,.35,1);
}

.sbFoot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: .8rem;
    font-size: var(--t-sm); font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--on-dark-soft);
}
.goalBadge {
    display: none; align-items: center; gap: .4rem;
    background: var(--gold-500); color: var(--maroon-800);
    padding: .28rem .75rem; border-radius: var(--r-sm);
}
.goalFill.complete ~ .sbFoot .goalBadge { display: inline-flex; }

/* ============================================================
   MAIN GRID
   ============================================================ */
/* Source order is gallery, donate rail, content cards — which is the mobile
   order, so focus order matches what is on screen without any use of `order`. */
#main { padding-top: 2.25rem; }
#main .inner { display: flex; flex-direction: column; gap: 1.4rem; }
.col-left, .col-right { display: flex; flex-direction: column; gap: 1.4rem; }

@media (min-width: 940px) {
    #main .inner {
        display: grid;
        grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
        column-gap: 1.9rem;
        row-gap: 1.4rem;
    }
    .mediaWrap { grid-column: 1; grid-row: 1; }
    .col-left  { grid-column: 1; grid-row: 2; }
    /* spans both rows and keeps the default stretch, which is what gives the
       sticky rail room to travel */
    .col-right { grid-column: 2; grid-row: 1 / span 2; }
    /* on the wrapper, not the card — a pinned card would overlap the share row */
    .stickyRail { position: sticky; top: 1.5rem; }
}

/* ---- generic panel ---- */
.card {
    background: var(--surface);
    border: 2px solid var(--rule);
    border-radius: var(--r-md);
    overflow: hidden;
}
.cardHead {
    padding: 1.2rem 1.4rem .9rem;
    border-bottom: 2px solid var(--rule);
}
.cardHead h3 {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    font-size: 1.55rem;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: .012em;
    color: var(--maroon-600);
}
.cardBody { padding: 1.15rem 1.4rem 1.4rem; }
.cardBody p { color: var(--body); font-size: var(--t-base); line-height: 1.7; }

/* ============================================================
   SLIDER
   ============================================================ */
.mediaWrap { position: relative; }
.mediaSlider {
    height: 480px;
    border: 2px solid var(--rule);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--rule);            /* fallback if an image fails */
}
/* fallback if the Swiper stylesheet is blocked */
.mediaSlider .swiper-wrapper { height: 100%; }
.mediaSlider .swiper-slide { width: 100%; height: 100%; position: relative; overflow: hidden; }
.mediaSlider .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.mediaSlider .swiper-slide::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
    background: linear-gradient(180deg, transparent, var(--shade-mid));
    pointer-events: none;
}

.mediaSlider .swiper-pagination { bottom: 14px !important; }
.mediaSlider .swiper-pagination-bullet {
    width: 30px; height: 6px; border-radius: 2px;
    background: var(--on-dark); opacity: .5;
    margin: 0 5px !important;
    transition: opacity .2s ease, background .2s ease;
}
.mediaSlider .swiper-pagination-bullet-active { background: var(--gold-500); opacity: 1; }

/* arrows */
.mediaSlider .swiper-button-next,
.mediaSlider .swiper-button-prev {
    width: 48px; height: 48px;
    background: var(--maroon-600);
    border: 1px solid var(--on-dark-line);
    border-radius: var(--r-sm);
    color: var(--on-dark);
    transition: background .2s ease;
}
.mediaSlider .swiper-button-next:hover,
.mediaSlider .swiper-button-prev:hover { background: var(--maroon-500); }
.mediaSlider .swiper-button-next::after,
.mediaSlider .swiper-button-prev::after { font-size: 18px; font-weight: 800; }

/* Same maroon-600 as the arrows and the donate card — the slider chrome had
   drifted onto three different shades. */
.slideCount {
    position: absolute; top: 14px; right: 14px; z-index: 5;
    background: var(--maroon-600);
    border: 1px solid var(--on-dark-line);
    color: var(--on-dark);
    font-size: var(--t-sm); font-weight: 800;
    letter-spacing: .06em;
    padding: .3rem .7rem;
    border-radius: var(--r-sm);
    font-variant-numeric: tabular-nums;
}
@media (max-width: 939px) {
    .mediaSlider { height: 300px; }
    .mediaSlider .swiper-button-next, .mediaSlider .swiper-button-prev { display: none; }
}

/* ============================================================
   DONATE CARD
   ============================================================ */
.donateCard {
    background: var(--surface);
    border: 2px solid var(--maroon-600);
    border-radius: var(--r-md);
    overflow: hidden;
}

.donateCard .dcHead {
    padding: 1.4rem 1.5rem 1.45rem;
    background: var(--maroon-600);
    /* 6px parent radius minus 2px border */
    border-radius: 4px 4px 0 0;
}
.donateCard .dcHead h2 {
    font-family: 'Anton', sans-serif;
    font-size: 2.15rem; text-transform: uppercase; line-height: .95;
    color: var(--on-dark);
}
.donateCard .dcHead p {
    font-size: var(--t-base); font-weight: 700;
    color: var(--on-dark-soft);
    margin-top: .6rem; line-height: 1.35;
}
#donateForm { padding: 1.4rem 1.5rem 1.5rem; }

.fieldLabel {
    display: block;
    font-size: var(--t-xs); font-weight: 800;
    text-transform: uppercase; letter-spacing: .13em;
    color: var(--muted);
    margin-bottom: .7rem;
}

/* ---- amount grid ---- */
.amountGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.amountBtn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 74px;
    padding: .9rem;
    background: var(--surface);
    border: 3px solid var(--maroon-600);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: var(--maroon-600);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    touch-action: manipulation;    /* drops the mobile tap delay */
    /* colour only; box-shadow transitions repaint the blur each frame */
    transition: background-color .12s ease;
}
.amountBtn:hover { background: var(--maroon-050); }
.amountBtn.selected {
    background: var(--maroon-600);
    color: var(--on-dark);
    box-shadow: 0 5px 18px -6px var(--maroon-a40);
    
    transition: none;
}
/* CSS rather than a data-URI SVG, which costs a frame to rasterise.
   Glyph geometry is shared with the fee checkbox — keep it in one rule. */
.amountBtn.selected::before,
.feeOpt input:checked + .feeBox::after,
.thanksMark::after {
    content: '';
    position: absolute;
    width: var(--check-w);
    height: var(--check-h);
    border-style: solid;
    border-width: 0 var(--check-s) var(--check-s) 0;
    transform: rotate(45deg);
}
.amountBtn.selected::after {
    content: '';
    position: absolute; top: 8px; right: 8px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--gold-500);
}
.amountBtn.selected::before {
    --check-w: 4px; --check-h: 8px; --check-s: 2.5px;
    top: 13px; right: 16px;
    border-color: var(--maroon-800);    /* 8.08:1 on gold-500 */
    z-index: 1;
}

.customAmount {
    grid-column: 1 / -1;
    display: flex; align-items: stretch;
    background: var(--surface);
    border: 3px solid var(--maroon-600);
    border-radius: var(--r-sm);
    overflow: hidden;
    min-height: 64px;
}
.customAmount.invalid { border-color: var(--ring); }
.customAmount:focus-within {
    border-color: var(--ring);
    box-shadow: 0 0 0 4px var(--glow);
}
/* wrapper carries the ring */
.customAmount input:focus-visible { outline: none; }
.customAmount .prefix {
    display: flex; align-items: center;
    padding: 0 1.05rem;
    background: var(--maroon-600);
    color: var(--on-dark);
    font-family: 'Anton', sans-serif;
    font-size: 1.6rem;
}
.customAmount input {
    flex: 1; width: 100%;
    border: 0; outline: none; background: transparent;
    /* no vertical padding; flex stretch handles centring */
    padding: 0 .95rem;
    font-family: 'Anton', sans-serif;
    font-size: 1.6rem;
    color: var(--maroon-600);
    font-variant-numeric: tabular-nums;
}
.customAmount.invalid { border-color: var(--error); }

/* Base state is the blocking error; .notice swaps it to advisory amber. */
.fieldError {
    grid-column: 1 / -1;
    display: none;
    align-items: flex-start;
    gap: .5rem;
    font-size: var(--t-sm); font-weight: 700;
    line-height: 1.45;
    color: var(--error-ink);            /* 11.75:1 on the wash */
    background: var(--error-wash);
    border: 2px solid var(--error);
    border-radius: var(--r-sm);
    padding: .7rem .85rem;
}
.fieldError.show { display: flex; }
.fieldError svg {
    width: 19px; height: 19px; flex-shrink: 0; margin-top: .08rem;
    fill: var(--error);                 /* 5.72:1 on the wash */
}
.personalize .fieldError { margin-top: .6rem; }

.fieldError.notice {
    color: var(--warn-ink);             /* 11.34:1 on the wash */
    background: var(--warn-wash);
    border-color: var(--warn);
}
.fieldError.notice svg { fill: var(--warn); }       /* 3.66:1 on the wash */

/* input:focus and input.flagged tie at (0,2,1), so focus would win on source
   order and repaint the border maroon. Routing both through --ring/--glow lets
   the validation state take the whole focus treatment. */
.personalize input,
.customAmount              { --ring: var(--maroon-600); --glow: var(--maroon-a20); }
.personalize input.flagged { --ring: var(--warn);       --glow: var(--warn-a30); }
.customAmount.invalid      { --ring: var(--error);      --glow: var(--error-a30); }

.personalize input.flagged { border-color: var(--ring); }
/* Must match the value font and size — both sit on the same baseline. */
.customAmount input::placeholder {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: .01em;
    color: var(--muted-soft);           /* 3.73:1 at 25.6px */
    opacity: 1;                         /* Firefox dims placeholders by default */
}
.customAmount input::-webkit-outer-spin-button,
.customAmount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.customAmount input[type=number] { -moz-appearance: textfield; }

/* ---- cover the processing fee ---- */
.feeOpt {
    position: relative;
    display: flex; align-items: flex-start; gap: .7rem;
    margin-top: .9rem;
    padding: .85rem .9rem;
    border: 2px solid var(--rule);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: var(--t-sm); font-weight: 600;
    color: var(--body);
    line-height: 1.45;
    touch-action: manipulation;
    transition: background-color .12s ease, border-color .12s ease;
}
.feeOpt:hover { border-color: var(--maroon-600); background: var(--maroon-050); }
.feeOpt.on    { border-color: var(--maroon-600); background: var(--maroon-050); }
/* display:flex beats the UA [hidden] rule */
.feeOpt[hidden] { display: none; }
/* The native input stays focusable but invisible; .feeBox is the drawn
   control, so the check glyph matches the amount buttons instead of the
   browser's own. */
.feeOpt input {
    position: absolute;
    width: 22px; height: 22px; margin: 0;
    opacity: 0;
    cursor: pointer;
}
.feeBox {
    position: relative;
    width: 22px; height: 22px;
    flex-shrink: 0;
    margin-top: .15rem;
    border: 2px solid var(--maroon-600);
    border-radius: var(--r-sm);
    background: var(--surface);
}
.feeOpt input:checked + .feeBox { background: var(--maroon-600); }
.feeOpt input:checked + .feeBox::after {
    --check-w: 6px; --check-h: 11px; --check-s: 3px;
    top: 3px; left: 6px;
    border-color: var(--on-dark);       /* 11.76:1 on maroon-600 */
}
.feeOpt input:focus-visible + .feeBox {
    outline: 3px solid var(--maroon-600);
    outline-offset: 3px;
}
.feeTitle {
    display: block;
    font-size: var(--t-xs); font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--maroon-600);           /* 10.38:1 on the wash */
    margin-bottom: .25rem;
}
.feeOpt strong { font-weight: 800; color: var(--maroon-600); }

/* ---- optional personalisation ---- */
.personalize { margin-top: 1.6rem; }
/* unscoped: both the amount and the personalisation labels use these */
.fieldLabel .opt { letter-spacing: .06em; color: var(--muted); }
.fieldLabel .req { letter-spacing: .06em; color: var(--maroon-600); }
.personalize input {
    width: 100%;
    min-height: 54px;
    padding: .85rem .95rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.personalize input::placeholder { color: var(--muted); font-weight: 500; }
.personalize input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 4px var(--glow);
}
.personalize input + input { margin-top: .6rem; }
.charCount {
    text-align: right;
    font-size: var(--t-sm); font-weight: 700;
    color: var(--muted);
    margin-top: .4rem;
    font-variant-numeric: tabular-nums;
}

/* ---- submit ---- */
#donationSubmit {
    width: 100%;
    min-height: 66px;
    margin-top: 1.6rem;
    padding: 1.1rem 1rem;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--green-600);
    color: var(--on-dark);
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase; letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 5px 20px -7px var(--green-a40);
    transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
    display: flex; align-items: center; justify-content: center; gap: .6rem;
}
/* No translate: moving the top edge past the cursor re-fires hover/leave. */
#donationSubmit:hover:not(.disabled) {
    background: var(--green-700);
    box-shadow: 0 9px 28px -8px var(--green-a40);
}
/* scales inward, never crosses the pointer */
#donationSubmit:active:not(.disabled) { transform: scale(.99); }
/* 5.27:1 */
#donationSubmit.disabled {
    background: var(--rule);
    color: var(--muted);
    box-shadow: none;
    cursor: not-allowed;
}
#donationSubmit .lock { width: 18px; height: 18px; }
#donationSubmit.disabled .lock { display: none; }

/* Redirect to PayPal takes a moment; the button holds a loading state so the
   delay reads as progress rather than a dead click. */
#donationSubmit .spinner { display: none; }
#donationSubmit.loading {
    pointer-events: none;
    background: var(--green-600);
    color: var(--on-dark);
}
#donationSubmit.loading .lock { display: none; }
#donationSubmit.loading .spinner {
    display: block;
    width: 19px; height: 19px;
    flex-shrink: 0;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: var(--on-dark);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* a frozen spinner reads as broken, so drop it and let the label carry it */
@media (prefers-reduced-motion: reduce) {
    #donationSubmit.loading .spinner { display: none; }
}

.trustRow {
    display: flex; align-items: center; justify-content: center;
    gap: 0.9rem; margin-top: 1.05rem;
}
.trustRow img { width: 18px; flex-shrink: 0; }
.trustRow span {
    font-size: var(--t-sm); color: var(--muted);
    line-height: 1.5; text-align: left; max-width: 32ch;
}

/* ============================================================
   SHARE
   ============================================================ */
/* labels are on aria-label/title, not on screen */
.shareRow {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.9rem;
}
.shareIcon {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px;
    background: var(--surface);
    border: 2px solid var(--maroon-600);
    border-radius: var(--r-md);
    color: var(--maroon-600);
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .12s ease, color .12s ease;
}
.shareIcon:hover { background: var(--maroon-600); color: var(--on-dark); }
.shareIcon svg { width: 21px; height: 21px; fill: currentColor; }
/* display:flex beats the UA [hidden] rule */
.shareIcon[hidden] { display: none; }

.shareStatus {
    margin-top: .55rem;
    min-height: 1.45em;
    text-align: center;
    font-size: var(--t-sm); font-weight: 700;
    color: var(--green-600);            /* 6.05:1 */
}

/* ============================================================
   LISTS
   ============================================================ */
.scrollArea { position: relative; }
.scrollArea .list {
    max-height: 300px;
    overflow-y: auto;
    padding: 1.15rem 1.4rem 1.4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
/* inset so the ring is not clipped by the card's overflow:hidden */
.scrollArea .list:focus-visible { outline: 3px solid var(--maroon-600); outline-offset: -3px; }
.scrollArea .list::-webkit-scrollbar { width: 8px; }
.scrollArea .list::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-pill); }
.scrollArea .list::-webkit-scrollbar-track { background: transparent; }
.scrollArea::after {
    content: '';
    position: absolute; left: 0; right: 8px; bottom: 0; height: 40px;
    background: linear-gradient(180deg, rgba(255,255,255,0), var(--surface));
    pointer-events: none;
}

.messageSingle {
    display: flex; gap: .85rem;
    padding: .95rem 0;
    border-bottom: 2px solid var(--rule);
}
.messageSingle:first-child { padding-top: 0; }
.messageSingle:last-child { border-bottom: 0; padding-bottom: .5rem; }
.messageSingle .avatar {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid var(--maroon-600);
    object-fit: cover;
}
.messageMeta { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .15rem; }
.messageMeta h4 {
    font-family: 'Barlow', sans-serif;
    font-size: var(--t-base); font-weight: 800;
    color: var(--ink);
}
.messageMeta time { font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.messageSingle p { font-size: var(--t-base); color: var(--body); line-height: 1.55; }

.donationSingle {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .85rem 0;
    border-bottom: 2px solid var(--rule);
}
.donationSingle:first-child { padding-top: 0; }
.donationSingle:last-child { border-bottom: 0; padding-bottom: .5rem; }
/* min-width:0 lets the flex child shrink, which is what allows the ellipsis */
.donationSingle .donationWho { min-width: 0; }
.donationSingle .who {
    display: block;
    font-size: var(--t-base); font-weight: 600; color: var(--body);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.donationSingle .forPlayer {
    display: block;
    margin-top: .1rem;
    font-size: var(--t-sm); font-weight: 500;
    color: var(--muted);                /* 7.40:1 */
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.donationSingle .amt {
    flex-shrink: 0;
    font-family: 'Anton', sans-serif;
    font-size: 1.25rem;
    color: var(--maroon-600);
    font-variant-numeric: tabular-nums;
}
.emptyState { padding: 1.5rem 0; text-align: center; color: var(--muted); font-size: var(--t-base); }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background: var(--maroon-800);
    color: var(--on-dark-soft);
    padding: 2.75rem 0;
    text-align: center;
}
#footer .credits p { font-size: var(--t-sm); line-height: 1.7; }
#footer .credits .pitch { margin-top: .9rem; }

/* Licence line drops a step in size and tone. 13px is the label floor, and
   9.12:1 keeps it well clear of the 4.5:1 minimum at that size. */
#footer .fine {
    margin-top: 1.8rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--on-dark-line);
}
#footer .fine p {
    font-size: var(--t-xs);
    line-height: 1.65;
    color: var(--on-dark-fine);
    max-width: 60ch;
    margin: 0 auto;
}
#footer a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; font-weight: 800; }
#footer a:hover { color: var(--gold-500); }

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

/* ---- test mode banner ---- */
.testNotice { margin-top: 1.6rem; }
.testNotice code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9em;
    background: rgba(0,0,0,.06);
    padding: 0 .25em;
    border-radius: 2px;
}

/* ============================================================
   THANK YOU
   ============================================================ */
.thanksOverlay {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
    background: var(--shade-mid);
}
.thanksCard {
    position: relative;
    width: min(440px, 100%);
    background: var(--surface);
    border: 2px solid var(--maroon-600);
    border-radius: var(--r-md);
    padding: 2.1rem 1.75rem 1.75rem;
    text-align: center;
    box-shadow: 0 24px 60px -12px rgba(23,6,7,.55);
    animation: thanksIn .32s cubic-bezier(.2,.9,.3,1) both;
}
/* programmatic focus target on open — the dialog is obvious without a ring */
.thanksCard:focus { outline: none; }
@keyframes thanksIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.thanksMark {
    position: relative;
    display: block;
    width: 62px; height: 62px;
    margin: 0 auto 1.15rem;
    border-radius: 50%;
    background: var(--gold-500);
}
.thanksMark::after {
    --check-w: 13px; --check-h: 25px; --check-s: 6px;
    top: 15px; left: 23px;
    border-color: var(--maroon-700);    /* 6.91:1 on gold */
}

.thanksCard h2 {
    font-family: 'Anton', sans-serif;
    font-size: 2.4rem;
    color: var(--maroon-600);           /* 11.76:1 */
    margin-bottom: .8rem;
}
.thanksLead {
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--body);
    line-height: 1.45;
}
.thanksLead strong { color: var(--maroon-600); font-weight: 800; }
.thanksNote {
    margin-top: .85rem;
    font-size: var(--t-sm);
    color: var(--muted);                /* 7.40:1 */
    line-height: 1.55;
}
.thanksClose {
    width: 100%;
    min-height: 56px;
    margin-top: 1.6rem;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--maroon-600);
    color: var(--on-dark);              /* 11.76:1 */
    font-family: 'Anton', sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase; letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .16s ease;
}
.thanksClose:hover { background: var(--maroon-500); }
.thanksClose:active { transform: scale(.99); }
