/*
 * brand.css - the Flashpoint "Bright Mist" brand system for the registration site (TODO-048).
 * Source of truth for the look: FlashPointDocumentation/branding/brand-guidelines.md and the approved reference screens in branding/assets.
 *
 * RULE: apart from the :root token block below, nothing in this file may contain a literal color or font. Every color and font is a
 * --fp-* variable defined in that block (or derived from one with color-mix), so a tournament owner's choices (TODO-044's Branding page)
 * are just a :root block that overrides those variables (Utilities/BrandingCss.cs builds it, only from registry-validated values;
 * Utilities/BrandTokens.cs is the registry, and a unit test keeps its defaults identical to the ones here).
 *
 * Link this AFTER bootstrap(.min).css and BEFORE RegistrationSite.css.
 */

/* The light palette is the default; .fp-light re-asserts it inside a dark page (the Branding page's preview shows the owner's light colors whatever the OS says). */
:root, .fp-light {
    color-scheme: light;
    /* ---- owner-configurable tokens (defaults = the brand) ---- */
    --fp-primary: #FA9D0E;            /* call-to-action fill (an owner's primary also becomes the link color) */
    --fp-on-primary: #2A1700;         /* text on the call-to-action fill */
    --fp-link: #0469A4;               /* links */
    --fp-accent-bar: transparent;     /* the bar under the nav (an owner's secondary color) */
    --fp-heading: #0A0F1A;            /* page titles */
    --fp-bg: #EAF1F7;                 /* page background (mist) */
    --fp-banner: #FA9D0E;             /* the deadline banner */
    --fp-on-banner: #2A1700;
    --fp-finances: #0469A4;           /* the finances tile */
    --fp-on-finances: #FFFFFF;
    --fp-card-competitors: #08AFD3;   /* registration-type cards: accent bar and button */
    --fp-on-card-competitors: #0A0F1A;
    --fp-card-teams: #5B6B82;
    --fp-on-card-teams: #FFFFFF;
    --fp-card-coaches: #F5C518;
    --fp-on-card-coaches: #4A3A00;
    --fp-card-referees: #3CB371;
    --fp-on-card-referees: #0B3D22;
    --fp-card-vips: #E42603;           /* the belt red #ED2804 nudged so white text on it reaches 4.5:1 (it was 4.28) */
    --fp-on-card-vips: #FFFFFF;
    --fp-font-heading: "Titillium Web", "Helvetica Neue", Arial, sans-serif;
    --fp-font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
    --fp-heading-style: italic;

    /* ---- fixed brand tokens (not owner-configurable) ---- */
    --fp-surface: #FFFFFF;
    --fp-ink: #0A0F1A;
    --fp-muted: #5B6B82;
    --fp-wordmark: #0469A4;           /* the FLASHPOINT wordmark on a light surface (guidelines section 2) */
    --fp-cyan: #08AFD3;
    --fp-focus: #08AFD3;
    --fp-font-wordmark: "Titillium Web", "Helvetica Neue", Arial, sans-serif;   /* the logotype is always the brand's own fonts */
    --fp-font-wordmark-sub: "Manrope", "Helvetica Neue", Arial, sans-serif;
    --fp-radius: 0.5rem;              /* buttons and fields */
    --fp-radius-card: 1rem;
    --fp-scrim: #000000;              /* the dark film over a picture, and the text on it */
    --fp-on-scrim: #FFFFFF;
    --fp-tint-success: 22%;           /* how much of its color an alert's background takes: a pale wash on light, a faint one on dark (the links in it must still read) */
    --fp-tint-danger: 14%;
    --fp-tint-warning: 28%;
    --fp-tint-info: 20%;
    --fp-danger: #E42603;             /* error text and borders: the belt red on light, a lighter red on dark (the plain red is under 4.5:1 on a dark card) */

    /* ---- belt colors: functional accents (guidelines section 3) for chips; the text color is the one to use on the fill ---- */
    --fp-belt-white: #FFFFFF;
    --fp-on-belt-white: #5B4A2E;
    --fp-belt-yellow: #F5C518;
    --fp-on-belt-yellow: #4A3A00;
    --fp-belt-green: #3CB371;
    --fp-on-belt-green: #0B3D22;
    --fp-belt-blue: #08AFD3;
    --fp-on-belt-blue: #0A0F1A;
    --fp-belt-red: #E42603;           /* the belt red #ED2804 nudged so white text reaches 4.5:1 (see --fp-card-vips) */
    --fp-on-belt-red: #FFFFFF;
    --fp-belt-black: #1A1A1A;
    --fp-on-belt-black: #FFFFFF;

    /* ---- section labels on forms: the brand blue, a dark gold and a green, each readable (4.5:1) on a white card ---- */
    --fp-eyebrow-blue: #0469A4;
    --fp-eyebrow-gold: #8A6D00;
    --fp-eyebrow-green: #1F7A4D;

    /* ---- derived ---- */
    --fp-line: color-mix(in srgb, var(--fp-muted) 24%, var(--fp-surface));
    --fp-hover: color-mix(in srgb, var(--fp-bg) 70%, var(--fp-surface));

    /* ---- Bootstrap 5.3 mapped onto the tokens ---- */
    --bs-body-font-family: var(--fp-font-body);
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.5;
    --bs-body-color: var(--fp-ink);
    --bs-body-bg: var(--fp-bg);
    --bs-secondary-color: var(--fp-muted);
    --bs-border-color: var(--fp-line);
    --bs-border-radius: var(--fp-radius);
    --bs-border-radius-lg: var(--fp-radius-card);
    --bs-link-color: var(--fp-link);
    --bs-link-hover-color: var(--fp-link);
    --bs-focus-ring-color: color-mix(in srgb, var(--fp-focus) 35%, transparent);
    --bs-emphasis-color: var(--fp-ink);
    --bs-secondary-bg: var(--fp-hover);
    --bs-tertiary-bg: var(--fp-hover);
}

/* ---- DARK PALETTE (TODO-048 phase 5): the same tokens, redefined when the browser or OS asks for dark (no toggle). On screen only - print stays light.
        Owner colors are NOT applied in dark (BrandingCss emits them only outside this query), so a color picked against a light page can never make the dark one
        unreadable; owner fonts apply in both. The fills (banner, finances tile, card accents, primary) keep their brand values and their text colors: they
        read on dark as the reference screens show. Only what is TEXT or a surface changes. Every text/surface pair here is checked at 4.5:1 by a unit test. ---- */
@media screen and (prefers-color-scheme: dark) {
    :root:not(.fp-light) {
        color-scheme: dark;
        --fp-bg: #121A24;
        --fp-surface: #1A2531;
        --fp-ink: #E8EEF5;
        --fp-muted: #8FA4C0;
        --fp-heading: #F4F7FB;
        --fp-link: #08AFD3;
        --fp-wordmark: #F95D04;
        --fp-danger: #FF6B57;
        --fp-tint-success: 14%;
        --fp-tint-danger: 14%;
        --fp-tint-warning: 12%;
        --fp-tint-info: 12%;
        --fp-card-teams: #8FA4C0;
        --fp-on-card-teams: #0A0F1A;
        --fp-belt-black: #0A0F1A;
        --fp-eyebrow-blue: #08AFD3;
        --fp-eyebrow-gold: #F5C518;
        --fp-eyebrow-green: #3CB371;
        --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238FA4C0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }
}

/* ---------------- base ---------------- */

body {
    font-family: var(--fp-font-body);
    background: var(--fp-bg);
    color: var(--fp-ink);
    margin-bottom: 1.5rem;
}

a { color: var(--fp-link); text-decoration: none; }
a:hover { color: var(--fp-link); text-decoration: underline; }

h1, h2, .h1, .h2 {
    font-family: var(--fp-font-heading);
    font-style: var(--fp-heading-style);
    font-weight: 700;
    color: var(--fp-heading);
    letter-spacing: -0.01em;
}
h2, .h2 { font-size: 2rem; }
h3, h4, h5, .h3, .h4, .h5 { font-family: var(--fp-font-body); font-weight: 700; color: var(--fp-ink); }
h3, .h3 { font-size: 1.35rem; }
h4, .h4 { font-size: 1.1rem; }
.text-muted, .help-block, .form-text { color: var(--fp-muted) !important; }

hr { border-color: var(--fp-line); opacity: 1; }

/* ---------------- navigation ---------------- */

.fp-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--fp-surface);
    border-bottom: 1px solid var(--fp-line);
}
.fp-nav .navbar { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.fp-accent-bar { height: 4px; background: var(--fp-accent-bar); }

.fp-brand { display: flex; align-items: center; gap: 0.75rem; padding: 0; margin-right: 2rem; }
.fp-brand:hover { text-decoration: none; }
.fp-emblem { width: 44px; height: 44px; }
.fp-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.fp-wordmark-name {
    font-family: var(--fp-font-wordmark);
    font-style: italic;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: 0.01em;
    color: var(--fp-wordmark);
}
.fp-wordmark-sub { font-family: var(--fp-font-wordmark-sub); font-size: 0.8rem; font-weight: 500; color: var(--fp-muted); }

.fp-nav .navbar-nav .nav-link { color: var(--fp-link); font-weight: 600; padding: 0.5rem 0.9rem; white-space: nowrap; }
.fp-nav .navbar-nav .nav-link:hover { text-decoration: underline; }
.fp-nav .navbar-text {
    display: block;
    color: var(--fp-muted);
    padding-right: 0.5rem;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fp-nav .navbar-toggler { border-color: var(--fp-line); }

/* ---------------- page frame ---------------- */

.fp-main { padding-top: 1.75rem; padding-bottom: 1rem; }

.fp-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fp-line);
    color: var(--fp-muted);
    font-size: 0.9rem;
}
.fp-footer strong { color: var(--fp-ink); }

/* ---------------- buttons: solid fills, 8px corners ---------------- */

.btn {
    --bs-btn-border-radius: var(--fp-radius);
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-padding-y: 0.55rem;
    font-weight: 600;
}
.btn-primary {
    --bs-btn-bg: var(--fp-primary);
    --bs-btn-border-color: var(--fp-primary);
    --bs-btn-color: var(--fp-on-primary);
    --bs-btn-hover-bg: color-mix(in srgb, var(--fp-primary) 88%, black);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--fp-primary) 88%, black);
    --bs-btn-hover-color: var(--fp-on-primary);
    --bs-btn-active-bg: color-mix(in srgb, var(--fp-primary) 80%, black);
    --bs-btn-active-border-color: color-mix(in srgb, var(--fp-primary) 80%, black);
    --bs-btn-active-color: var(--fp-on-primary);
    --bs-btn-disabled-bg: var(--fp-primary);
    --bs-btn-disabled-border-color: var(--fp-primary);
    --bs-btn-disabled-color: var(--fp-on-primary);
}
.btn-outline-secondary {
    --bs-btn-bg: var(--fp-surface);
    --bs-btn-color: var(--fp-ink);
    --bs-btn-border-color: var(--fp-line);
    --bs-btn-hover-bg: var(--fp-hover);
    --bs-btn-hover-color: var(--fp-ink);
    --bs-btn-hover-border-color: var(--fp-line);
    --bs-btn-active-bg: var(--fp-hover);
    --bs-btn-active-color: var(--fp-ink);
    --bs-btn-active-border-color: var(--fp-line);
}
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--fp-focus) 40%, transparent);
    border-color: var(--fp-focus);
}

/* ---------------- forms ---------------- */

.form-control, .form-select {
    border-radius: var(--fp-radius);
    border: 1px solid var(--fp-line);
    padding: 0.55rem 0.8rem;
    background-color: var(--fp-surface);
    color: var(--fp-ink);
}
.form-label, .col-form-label { color: var(--fp-muted); font-weight: 600; font-size: 0.92rem; }
.form-check-input:checked { background-color: var(--fp-link); border-color: var(--fp-link); }
.field-validation-error, .text-danger { color: var(--fp-danger) !important; }
.input-validation-error { border-color: var(--fp-danger); }

/* ---------------- alerts ---------------- */

.alert { border: 0; border-radius: var(--fp-radius-card); color: var(--fp-ink); }
.alert-success { background: color-mix(in srgb, var(--fp-card-referees) var(--fp-tint-success), var(--fp-surface)); }
.alert-danger { background: color-mix(in srgb, var(--fp-card-vips) var(--fp-tint-danger), var(--fp-surface)); }
.alert-warning { background: color-mix(in srgb, var(--fp-banner) var(--fp-tint-warning), var(--fp-surface)); }
.alert-info { background: color-mix(in srgb, var(--fp-cyan) var(--fp-tint-info), var(--fp-surface)); }
/* a link inside running text is underlined, so it is told apart from the words around it by more than its color (the dark palette's cyan is under 3:1 against the text) */
p a:not([class]), .alert a, .form-text a, li > a:not([class]) { text-decoration: underline; }
code { color: var(--fp-ink); background: var(--fp-hover); padding: 0.1em 0.35em; border-radius: 4px; }

/* ---------------- cards, tables, pills ---------------- */

.card { background: var(--fp-surface); border: 0; border-radius: var(--fp-radius-card); }
.card-header { background: transparent; border-bottom: 1px solid var(--fp-line); font-weight: 700; }

.table { --bs-table-bg: transparent; --bs-table-border-color: var(--fp-line); color: var(--fp-ink); }
.table thead th,
.table tr:first-child > th {
    color: var(--fp-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom-color: var(--fp-line);
}

.nav-pills .nav-link { border-radius: 999px; color: var(--fp-ink); font-weight: 600; }
.nav-pills .nav-link:hover { background: var(--fp-hover); text-decoration: none; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--fp-primary); color: var(--fp-on-primary); }
.nav-pills .nav-link.disabled { color: var(--fp-muted); }

.modal-content { border: 0; border-radius: var(--fp-radius-card); }
.img-rounded, .rounded { border-radius: var(--fp-radius) !important; }

/* ---------------- chips: solid pills, colored by real meaning ---------------- */

.fp-chip {
    display: inline-block;
    padding: 0.1rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--fp-line);
    background: var(--fp-surface);
    color: var(--fp-ink);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.fp-belt-white { background: var(--fp-belt-white); color: var(--fp-on-belt-white); }
.fp-belt-yellow { background: var(--fp-belt-yellow); border-color: var(--fp-belt-yellow); color: var(--fp-on-belt-yellow); }
.fp-belt-green { background: var(--fp-belt-green); border-color: var(--fp-belt-green); color: var(--fp-on-belt-green); }
.fp-belt-blue { background: var(--fp-belt-blue); border-color: var(--fp-belt-blue); color: var(--fp-on-belt-blue); }
.fp-belt-red { background: var(--fp-belt-red); border-color: var(--fp-belt-red); color: var(--fp-on-belt-red); }
.fp-belt-black { background: var(--fp-belt-black); border-color: var(--fp-belt-black); color: var(--fp-on-belt-black); }

/* ---------------- dashboard ---------------- */

.fp-page-header { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.25rem; }
.fp-page-header > div { min-width: 0; }
.fp-page-header h2 { margin-bottom: 0.25rem; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .fp-page-header { flex-direction: column; gap: 0.5rem; } }
.fp-page-header p { margin-bottom: 0.25rem; color: var(--fp-muted); }

.fp-banner {
    background: var(--fp-banner);
    color: var(--fp-on-banner);
    border-radius: var(--fp-radius-card);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.fp-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: 1.25rem;
    align-items: start;
}

/* a card: white, a colored bar across the top, a title, a line of help, a solid button in the card's color, then its rows */
.fp-card {
    --fp-accent: var(--fp-ink);
    --fp-on-accent: var(--fp-surface);
    background: var(--fp-surface);
    border-radius: var(--fp-radius-card);
    border-top: 6px solid var(--fp-accent);
    padding: 1.25rem 1.4rem 1rem;
}
.fp-card-competitors { --fp-accent: var(--fp-card-competitors); --fp-on-accent: var(--fp-on-card-competitors); }
.fp-card-teams { --fp-accent: var(--fp-card-teams); --fp-on-accent: var(--fp-on-card-teams); }
.fp-card-coaches { --fp-accent: var(--fp-card-coaches); --fp-on-accent: var(--fp-on-card-coaches); }
.fp-card-referees { --fp-accent: var(--fp-card-referees); --fp-on-accent: var(--fp-on-card-referees); }
.fp-card-vips { --fp-accent: var(--fp-card-vips); --fp-on-accent: var(--fp-on-card-vips); }

.fp-card h2, .fp-card .fp-card-title {
    font-family: var(--fp-font-body);
    font-style: normal;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--fp-ink);
    margin-bottom: 0.4rem;
}
.fp-card-help { color: var(--fp-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.fp-card-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
    border-radius: var(--fp-radius);
    background: var(--fp-accent);
    color: var(--fp-on-accent);
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.fp-card-btn:hover { color: var(--fp-on-accent); text-decoration: none; background: color-mix(in srgb, var(--fp-accent) 88%, black); }

.fp-empty { color: var(--fp-muted); margin: 0.9rem 0 0.4rem; padding-top: 0.75rem; border-top: 1px solid var(--fp-line); }

/* one registered person: name and chip on the left, date on the right, details beneath */
.fp-row {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--fp-line);
}
.fp-row-name { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-weight: 600; min-width: 0; }
.fp-row-side { color: var(--fp-muted); font-size: 0.9rem; text-align: right; white-space: nowrap; }
.fp-row-meta { grid-column: 1 / -1; color: var(--fp-muted); font-size: 0.9rem; }
.fp-row-meta.medical-forms { margin-top: 0; }

/* the finances tile */
.fp-card-finances {
    --fp-accent: var(--fp-finances);
    background: var(--fp-finances);
    color: var(--fp-on-finances);
    border-top-color: var(--fp-finances);
}
.fp-card-finances h2 { color: var(--fp-on-finances); }
.fp-card-finances a:not(.btn) { color: var(--fp-on-finances); text-decoration: underline; }
.fp-finances-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.75rem 0 1rem; }
.fp-finances-figures strong { display: block; font-size: 1.05rem; }
.fp-finances-note { font-size: 0.85rem; opacity: 0.92; margin-bottom: 1rem; }

/* ---------------- forms: a grid of titled cards, each field a label stacked over its control ---------------- */

.fp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
}
.fp-form-card {
    background: var(--fp-surface);
    border-radius: var(--fp-radius-card);
    padding: 1.25rem 1.4rem 0.9rem;
}
.fp-eyebrow {
    font-family: var(--fp-font-body);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.fp-eyebrow-blue { color: var(--fp-eyebrow-blue); }
.fp-eyebrow-gold { color: var(--fp-eyebrow-gold); }
.fp-eyebrow-green { color: var(--fp-eyebrow-green); }
.fp-form-actions { display: flex; gap: 0.75rem; align-items: center; margin: 0.5rem 0 1rem; }

/* Yes / No and other segmented choices: the checked option fills in */
.btn-group[role="radiogroup"] > .btn { background: var(--fp-surface); color: var(--fp-ink); }
.btn-group[role="radiogroup"] > .btn:has(input:checked) {
    background: var(--fp-link);
    border-color: var(--fp-link);
    color: var(--fp-surface);
}
.btn-group[role="radiogroup"] > .btn input { margin-right: 0.35rem; }

/* a choice tile (the event page's Enter / Not entering) */
.fp-choice {
    border: 1px solid var(--fp-line);
    border-radius: var(--fp-radius);
    padding: 0.75rem 1rem 0.75rem 2.4rem;
    margin-bottom: 0.6rem;
    background: var(--fp-surface);
}
.fp-choice:has(input:checked) { border-color: var(--fp-link); background: color-mix(in srgb, var(--fp-link) 8%, var(--fp-surface)); }
.fp-choice .form-check-label { font-weight: 600; width: 100%; cursor: pointer; }
.fp-choice-price { display: block; font-weight: 400; font-size: .85em; }   /* the extra cost of a setting choice, under its name */
.btn-group[role="radiogroup"] { flex-wrap: wrap; }
.btn-group[role="radiogroup"] > .btn { flex: 0 1 auto; }   /* keep each option its natural width when a long list wraps */

/* the wizard's event card header and the status chips */
.fp-event-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.fp-event-head .fp-eyebrow { margin-bottom: 0; font-size: 1rem; }
.fp-status { font-size: 0.72rem; letter-spacing: 0.05em; }
.fp-status-enrolled { background: var(--fp-belt-green); border-color: var(--fp-belt-green); color: var(--fp-on-belt-green); }
.fp-status-not { background: color-mix(in srgb, var(--fp-muted) 14%, var(--fp-surface)); color: var(--fp-muted); }
/* the landing list: "Coming soon" is the cyan fill, "Registration open" the green, "Registration closed" the muted pill */
.fp-status-soon { background: var(--fp-belt-blue); border-color: var(--fp-belt-blue); color: var(--fp-on-belt-blue); }
.fp-price-chip { font-weight: 600; }

/* the wizard's step bar: pills on a white capsule */
#competitor-steps {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.3rem;
    background: var(--fp-surface);
    border-radius: 999px;
}

/* ---------------- TODO-048 phase 4: owner and secondary pages ---------------- */

/* a table is a white card: rounded, its rows inside; on a phone it scrolls sideways inside itself instead of widening the page */
table.table {
    background: var(--fp-surface);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--fp-radius-card);
    overflow: hidden;
}
table.table > :not(caption) > * > * { padding: 0.7rem 0.9rem; }
table.table tr:last-child > td { border-bottom: 0; }
.table-light { --bs-table-bg: var(--fp-hover); --bs-table-color: var(--fp-ink); --bs-table-border-color: var(--fp-line); }
@media (max-width: 767.98px) {
    table.table { display: block; overflow-x: auto; }
}

/* the Manage Tournament page: a summary and the photos beside a grid of cards, one per place an owner manages */
.fp-manage { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 1.25rem; align-items: start; }
.fp-manage-side, .fp-manage-cards { display: grid; gap: 1.25rem; }
.fp-manage-cards { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); align-items: stretch; }
@media (max-width: 991.98px) { .fp-manage { grid-template-columns: 1fr; } }
.fp-card-manage { --fp-accent: var(--fp-link); --fp-on-accent: var(--fp-bg); display: flex; flex-direction: column; }
.fp-card-manage .fp-card-help { flex: 1 1 auto; }
.fp-card-manage .fp-card-btn { margin-top: auto; }
.fp-card-manage .fp-card-btn:hover { text-decoration: none; }

.fp-stat-list { margin: 0; }
.fp-stat-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--fp-line); }
.fp-stat-list > div:last-child { border-bottom: 0; }
.fp-stat-list dt { font-weight: 500; color: var(--fp-muted); }
.fp-stat-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.fp-carousel { border-radius: var(--fp-radius); overflow: hidden; background: var(--fp-bg); }
.fp-carousel .carousel-caption {
    left: 0; right: 0; bottom: 0; padding: 0.6rem 1rem;
    background: color-mix(in srgb, var(--fp-scrim) 72%, transparent);
    color: var(--fp-on-scrim);
}
.fp-carousel .carousel-caption h3 { font-family: var(--fp-font-body); font-style: normal; font-size: 1rem; font-weight: 700; margin: 0; }
.fp-carousel .carousel-caption p { font-size: 0.85rem; margin: 0; }

/* dark: components that draw their own light-on-dark glyphs or need an edge to show against a dark card (no colors here - tokens only) */
@media screen and (prefers-color-scheme: dark) {
    :root:not(.fp-light) .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
    :root:not(.fp-light) .fp-belt-black { border-color: var(--fp-muted); }
    /* the event and host logos are raster pictures on a white ground: frame them as a white tile so they read as intended on a dark page */
    :root:not(.fp-light) img[data-logo-size] { background: var(--fp-belt-white); border-radius: var(--fp-radius); padding: 3px; }
}
