/*
 * CSHL — Cleveland Suburban Hockey League
 * app.css — design system + component library
 *
 * Aesthetic: light "league info" design matching the incumbent cshlhockey.org
 * and pages/landing.php (the design source of truth): navy #0d2337 / blue
 * #356096 on white, tinted #f2f5f7 sections, white cards with 4px blue top
 * borders, Barlow body + Barlow Condensed uppercase headings.
 *
 * Organized as: (1) design tokens (:root vars), (2) base/reset,
 * (3) layout primitives, (4) components, (5) utilities, (6) responsive.
 *
 * IMPORTANT: every class name below is a public API used by dozens of views
 * (dashboards/*, schedule/*, messenger/*, tournaments/*, ice/*, arena/*,
 * substitutions/*, notifications/*, auth/*). Re-theme by changing values,
 * never by renaming/removing selectors.
 *
 * Fonts: Google Fonts "Barlow" + "Barlow Condensed" are linked from
 * layouts/main.php (with preconnect). System stack fallbacks below.
 */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* League palette (matches landing.php) */
  --navy: #0d2337;
  --blue: #356096;
  --blue-600: #2b4f7d;
  --blue-100: #e5edf5;
  --tint: #f2f5f7;
  --line: #dde5ee;
  --ink: #1a2733;
  --muted: #5c6f82;
  --white: #ffffff;
  --red: #c8202f;
  --gold: #e8b23a;
  --maxw: 1200px;
  --footer-bg: #08182a;

  /* Legacy aliases — older components/views reference these names.
     They now resolve to the light league palette. */
  --navy-900: #0d2337;
  --navy-800: #122c44;
  --navy-700: #1a3a58;
  --navy-600: #24486a;
  --steel-500: #43608c;
  --steel-300: #8aa4c8;
  --ice-500: #356096;   /* primary brand blue */
  --ice-400: #2b4f7d;   /* hover (darker on light bg) */
  --ice-300: #5d82ad;   /* light accent */
  --ice-050: #e5edf5;   /* tint */
  --frost: #f2f5f7;

  /* Semantic — tuned for light backgrounds (WCAG-AA text pairs) */
  --success: #1e7e46;
  --success-bg: #e9f6ee;
  --success-line: #b9e2c8;
  --warning: #8a5b00;
  --warning-bg: #fdf3dd;
  --warning-line: #ecd9a8;
  --danger: #c8202f;      /* also EMERGENCY */
  --danger-700: #a01824;
  --danger-bg: #fdecec;
  --danger-line: #f2b8bd;
  --info: #356096;
  --info-bg: #e5edf5;
  --info-line: #c6d7ea;

  /* Text */
  --text-strong: #0d2337;
  --text: #1a2733;
  --text-muted: #5c6f82;
  --text-on-light: #1a2733;

  /* Surfaces */
  --surface: #ffffff;
  --surface-2: #f2f5f7;
  --surface-line: #dde5ee;

  /* Effects */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(13, 35, 55, .08);
  --shadow: 0 8px 24px rgba(13, 35, 55, .10);
  --shadow-lg: 0 20px 50px rgba(13, 35, 55, .18);
  --ring: 0 0 0 3px rgba(53, 96, 150, .35);

  /* Typography */
  --font-sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-cond: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* Layout */
  --container: 1200px;
  --nav-h: 68px;

  /* Gradients (legacy names, re-tuned to the league palette) */
  --grad-ice: linear-gradient(135deg, var(--blue), var(--blue-600));
  --grad-hero: linear-gradient(rgba(13, 35, 55, .82), rgba(13, 35, 55, .9)),
               radial-gradient(1000px 500px at 75% -20%, #2b4f7d 0%, transparent 60%),
               #0d2337;
}

/* ============================================================
   2. BASE / RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--tint);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .cond {
  font-family: var(--font-cond);
  color: var(--navy);
  line-height: 1.08;
  margin: 0 0 var(--sp-3);
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 var(--sp-4); }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

/* Accessible focus — always visible for keyboard users */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* Skip link for screen-reader / keyboard users */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--blue); color: #fff;
  padding: var(--sp-2) var(--sp-4); border-radius: 0 0 var(--radius-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

.visually-hidden,
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   3. LAYOUT PRIMITIVES
   ============================================================ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-4); }
.site-main { flex: 1 0 auto; padding-bottom: var(--sp-7); }
.section   { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-6); }

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }

/* Scroll wrappers so wide content never breaks the page horizontally */
.table-scroll, .table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================================================
   4. COMPONENTS
   ============================================================ */

/* ---- Affiliations topbar (navy strip above the header) ---- */
.topbar { background: var(--navy); color: #9fb6cf; font-size: .8rem; }
.topbar .container,
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: 16px; flex-wrap: wrap; }
.topbar .aff { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: .72rem; }
.topbar .aff span { color: #7f99b6; }
/* Sanctioning marks, on white chips — same treatment as the footer.
   Measured against the navy (#0d2337): USA Hockey carries its own white oval and
   peaks at 16:1, but Mid-Am is red/blue with only a thin keyline and 33% of its
   "AM"/"HOCKEY" half lands under 1.5:1 — it sinks into the strip. Recolouring
   another org's registered mark is not ours to do, so the background moves, not
   the artwork. Do not drop these chips without re-measuring.
   box-sizing:content-box keeps the mark itself at 22px under the global
   border-box (chip = 28px tall, inside the 34px strip).
   SafeSport stays a text label here: its lockup is stacked/square and turns to
   mush below ~30px. */
.topbar .aff__mark {
  height: 22px; width: auto; display: block; flex: 0 0 auto;
  box-sizing: content-box; background: #fff;
  padding: 3px 6px; border-radius: var(--radius-sm);
}
@media (max-width: 560px) {
  .topbar .aff { gap: 10px; }
  .topbar .aff__mark { height: 18px; padding: 2px 5px; }
  .topbar .aff span { display: none; }   /* drop the dots so a wrap can't leave one dangling */
}
.topbar .soc { display: flex; align-items: center; }
.topbar .soc a { color: #cfe0f0; margin-left: 12px; font-weight: 600; }
.topbar .soc a:hover { color: #fff; }

/* ---- Brand mark ---- */
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); font-weight: 700; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand__crest, .brand .crest { width: 48px; height: auto; flex: 0 0 auto; }
.brand__text { font-family: var(--font-cond); line-height: .95; }
.brand__text b { display: block; font-size: 1.22rem; color: var(--navy); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.brand__text span { display: block; font-size: .66rem; color: var(--blue); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
/* legacy brand pieces (kept working for any view still using them) */
.brand__logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 1.1rem; box-shadow: var(--shadow-sm);
}
.brand__name { color: var(--navy); font-size: 1.15rem; font-family: var(--font-cond); text-transform: uppercase; }
.brand__name b { color: var(--blue); }

/* ---- Top nav (white sticky header, blue rule — matches landing) ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 2px 10px rgba(13, 35, 55, .06);
}
.nav__inner { min-height: var(--nav-h); display: flex; align-items: center; gap: var(--sp-4); }
.nav__links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__links a {
  color: var(--navy); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm);
  font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.nav__links a:hover { color: var(--blue); background: var(--tint); text-decoration: none; }
.nav__links a.is-active { color: var(--blue); }
.nav__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: var(--sp-2); }

.nav__toggle {
  display: none; margin-left: auto; background: transparent; border: 2px solid var(--line);
  color: var(--navy); width: 42px; height: 42px; border-radius: var(--radius-sm); cursor: pointer;
}
.nav__toggle:hover { border-color: var(--blue); color: var(--blue); }
.nav__toggle svg { margin-inline: auto; }

/* Notification bell */
.bell { position: relative; display: inline-flex; color: var(--navy); padding: 6px; }
.bell:hover { text-decoration: none; color: var(--blue); }
.bell__badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; display: grid; place-items: center; line-height: 1;
}
.bell__badge[hidden] { display: none; }

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--white); --btn-fg: var(--navy); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 9px 17px; border-radius: var(--radius-sm); border: 2px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
  text-transform: uppercase; letter-spacing: .03em;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--blue); color: var(--blue); }
.btn:active { transform: translateY(1px); }

.btn--primary, .btn-primary, .btn.solid {
  --btn-bg: var(--blue); --btn-fg: #fff; --btn-bd: var(--blue);
}
.btn--primary:hover, .btn-primary:hover, .btn.solid:hover {
  --btn-bg: var(--blue-600); --btn-bd: var(--blue-600); color: #fff;
}
.btn--ghost, .btn.ghost { --btn-bg: transparent; --btn-fg: var(--blue); --btn-bd: var(--blue); }
.btn--ghost:hover, .btn.ghost:hover { --btn-bg: var(--blue); color: #fff; border-color: var(--blue); }
.btn--danger, .btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--danger:hover, .btn-danger:hover { --btn-bg: var(--danger-700); --btn-bd: var(--danger-700); color: #fff; }
.btn-warning { --btn-bg: var(--gold); --btn-fg: var(--navy); --btn-bd: var(--gold); }
.btn-warning:hover { color: var(--navy); border-color: var(--navy); }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.btn--sm, .btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn--block { width: 100%; }

/* ---- Cards (white, 12px radius, 4px blue top border) ---- */
.card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); border-top: 4px solid var(--blue);
  overflow: hidden; padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.card__body { padding: 0; }
.card__title { color: var(--navy); font-size: 1.15rem; margin-bottom: var(--sp-2); }
/* card__head stretches to the card edges (views place it as the first child) */
.card__head {
  margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)) var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--tint); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap;
}
.card__head h2, .card__head h3 { margin: 0; font-size: 1.2rem; }
.card--dark { background: var(--navy); color: #cfe0f0; border-color: var(--navy); border-top-color: var(--gold); }
.card--dark .card__title, .card--dark h2, .card--dark h3 { color: #fff; }

/* Dashboard tile — icon + label + link */
.tile {
  display: flex; flex-direction: column; gap: var(--sp-2);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius);
  padding: var(--sp-5); box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .15s ease;
  text-decoration: none; height: 100%;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.tile__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue); font-size: 1.4rem; flex: none;
}
.tile__title { color: var(--navy); font-family: var(--font-cond); text-transform: uppercase; font-weight: 700; font-size: 1.2rem; letter-spacing: .01em; }
.tile__desc  { color: var(--muted); font-size: .92rem; margin: 0; }
.tile__meta  { margin-top: auto; color: var(--blue); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }

/* Stat block */
.stat { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-sm); }
.stat__num { font-family: var(--font-cond); font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat__label { color: var(--muted); font-size: .82rem; font-weight: 600; margin-top: var(--sp-1); text-transform: uppercase; letter-spacing: .08em; }

/* ---- Badges / pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--blue-100); color: var(--blue-600);
}
.badge--role  { background: var(--tint); color: var(--muted); border: 1px solid var(--line); }
.badge--emergency { background: var(--danger); color: #fff; }
.badge--success, .badge-approved, .badge-final, .badge-confirmed { background: var(--success-bg); color: var(--success); }
.badge--warning, .badge--pending, .badge-pending, .badge-home_approved, .badge-scheduled { background: var(--warning-bg); color: var(--warning); }
.badge-denied, .badge-cancelled, .badge-rejected, .badge-forfeit, .badge-withdrawn { background: var(--danger-bg); color: var(--danger-700); }
.badge-postponed, .badge-draft { background: var(--tint); color: var(--muted); border: 1px solid var(--line); }
.badge-in_progress, .badge-open { background: var(--blue-100); color: var(--blue-600); }
.badge--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Status pills (ice marketplace / arena bookings) */
.pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: var(--blue-100); color: var(--blue-600);
}
.pill--ok, .pill--approved, .pill--confirmed, .pill--available, .pill--paid { background: var(--success-bg); color: var(--success); }
.pill--pending { background: var(--warning-bg); color: var(--warning); }
.pill--muted, .pill--expired, .pill--cancelled, .pill--closed { background: var(--tint); color: var(--muted); }
.pill--booked, .pill--sold, .pill--held { background: var(--blue-100); color: var(--blue-600); }
.pill--refunded { background: var(--warning-bg); color: var(--warning); }

/* Plain inline text link (used by arena dashboard "View all" etc.). */
.link { color: var(--blue); font-weight: 600; text-decoration: none; }
.link:hover { color: var(--blue-600); text-decoration: underline; }

/* ---- Page header (dashboards + index pages) ---- */
.page-head { padding-block: var(--sp-6) var(--sp-4); }
.page-head__eyebrow { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: var(--sp-2); }
.page-head h1 { margin-bottom: var(--sp-2); }
.page-head p  { color: var(--muted); max-width: 60ch; }
.page-head__sub { color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }

/* legacy flat variant used by schedule/tournaments index pages */
.page-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  flex-wrap: wrap; padding-block: var(--sp-6) var(--sp-4);
}
.page-header h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-block: var(--sp-3); }

/* ---- Alerts / flash ---- */
.alert {
  border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line);
  display: flex; gap: var(--sp-3); align-items: flex-start; margin-bottom: var(--sp-4);
  background: var(--surface); color: var(--ink);
}
.alert--success, .alert-success { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.alert--danger, .alert-danger   { background: var(--danger-bg);  border-color: var(--danger-line);  color: var(--danger-700); }
.alert--warning, .alert-warning { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
.alert--info, .alert-info       { background: var(--info-bg);    border-color: var(--info-line);    color: var(--blue-600); }
.alert__icon { line-height: 1.3; flex: none; display: inline-flex; margin-top: 2px; }

/* Inline banner (booking confirmation etc.) */
.banner {
  border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); margin-block: var(--sp-4);
  border: 1px solid var(--line); background: var(--surface); font-weight: 600;
}
.banner--ok { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }

/* ---- Forms ---- */
label { font-weight: 600; color: var(--navy); font-size: .9rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select, textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); width: 16px; height: 16px; }
textarea { min-height: 110px; resize: vertical; }
::placeholder { color: #93a4b5; }

.field { margin-bottom: var(--sp-4); }
.field label { display: block; margin-bottom: 6px; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea { width: 100%; }
.field__hint { color: var(--muted); font-weight: 400; font-size: .84rem; }
.field--wide { grid-column: 1 / -1; }
.field--actions { display: flex; align-items: flex-end; margin-bottom: var(--sp-4); }

.form-grid { display: grid; gap: 0 var(--sp-4); }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-top: var(--sp-4); }

.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-block: var(--sp-4); }
.filters.card { padding: var(--sp-4) var(--sp-5); align-items: flex-end; }
.filters .field { margin-bottom: 0; }

.checkbox { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; cursor: pointer; }
.checkbox svg { color: var(--danger); }

.inline-form { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }
.inline { display: inline-flex; gap: var(--sp-2); align-items: center; }
.result-form { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

/* ---- Tables ---- */
.table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); margin-block: var(--sp-4);
  font-size: .95rem;
}
.table th {
  font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .06em;
  font-size: .82rem; font-weight: 700; color: var(--navy); text-align: left;
  background: var(--tint); border-bottom: 2px solid var(--line);
  padding: 10px 12px;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #f7fafc; }
.table .actions { margin: 0; }
.standings td:not(:first-child), .standings th:not(:first-child) { text-align: center; }

/* ---- Definition lists (detail pages) ---- */
.deflist, .detail {
  display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-4);
}
.deflist dt, .detail dt {
  color: var(--muted); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .06em; padding-top: 2px;
}
.deflist dd, .detail dd { margin: 0; }

/* ---- Empty states ---- */
.empty { color: var(--muted); font-style: italic; }
.empty-state {
  text-align: center; color: var(--muted); padding: var(--sp-7) var(--sp-4);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state__icon { display: inline-flex; color: var(--blue); margin-bottom: var(--sp-3); }

/* ---- Ice marketplace ---- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); }
.slot-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: var(--sp-2);
  transition: transform .12s ease, box-shadow .15s ease;
}
.slot-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.slot-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.slot-card__rink { color: var(--muted); font-size: .85rem; }
.slot-card__when { color: var(--ink); font-weight: 600; margin: 0; }
.slot-card__desc { color: var(--muted); font-size: .9rem; margin: 0; }
.slot-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.slot-card__price, .price { color: var(--navy); font-weight: 800; font-size: 1.05rem; }
.slot-desc { color: var(--muted); }

.pay-summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4); margin-block: var(--sp-4); font-size: 1.05rem;
}
.pay-summary strong { color: var(--navy); font-size: 1.2rem; }
.pay-note { color: var(--muted); font-size: .86rem; }

.pager-wrap { margin-block: var(--sp-5); }
.pager-wrap ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: 0; margin: 0; }
.pager-wrap a, .pager-wrap span {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--blue); font-weight: 600;
}
.pager-wrap .active a, .pager-wrap .active span { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---- Simple lists (arena rinks etc.) ---- */
.list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.list__row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) 0; border-bottom: 1px solid var(--line);
}
.list__actions { display: inline-flex; gap: var(--sp-2); align-items: center; }

/* ---- Tournament bracket ---- */
.bracket { padding-block: var(--sp-4); }
.bracket-round { min-width: 230px; }
.bracket-round h3 { font-size: 1.05rem; }
.bracket-game {
  background: var(--surface); border-radius: var(--radius-sm) !important;
  border-color: var(--line) !important; box-shadow: var(--shadow-sm);
}
.bracket-game .team { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 2px 0; }
.bracket-game .team.winner { color: var(--navy); font-weight: 700; }
.bracket-game .score { min-width: 1.6em; text-align: right; font-weight: 700; color: var(--blue-600); }

/* ---- Schedule calendar ---- */
.cal-day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); box-shadow: var(--shadow-sm);
}
.cal-day h3 { font-size: 1.1rem; border-bottom: 2px solid var(--line); padding-bottom: var(--sp-2); }
.cal-day ul { margin: 0; padding-left: 1.2em; }

/* ---- Workflow steps (substitution approvals) ---- */
.workflow-steps { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-block: var(--sp-4); color: var(--muted); }
.workflow-steps span {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: .84rem; font-weight: 600;
}
.workflow-steps span.done { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }

/* ---- Messenger / notifications (light theme) ---- */
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list__item + .thread-list__item { border-top: 1px solid var(--line); }
.thread-list__link {
  display: flex; align-items: center; gap: .9rem; padding: .9rem .75rem;
  color: inherit; text-decoration: none; transition: background .12s ease;
}
.thread-list__link:hover { background: var(--tint); text-decoration: none; color: inherit; }
.thread-list__icon { flex: 0 0 auto; display: inline-flex; color: var(--blue); }
.thread-list__item.is-emergency .thread-list__icon { color: var(--danger); }
.thread-list__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.thread-list__subject { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); }
.thread-list__item.is-unread .thread-list__subject { font-weight: 700; }
.thread-list__meta { font-size: .82rem; color: var(--muted); }
.thread-list__badge {
  flex: 0 0 auto; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: .75rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.messenger .thread { display: flex; flex-direction: column; gap: .6rem; max-height: 60vh; overflow-y: auto; padding: .5rem .25rem; }
.msg { max-width: 78%; padding: .6rem .85rem; border-radius: 12px; line-height: 1.45; position: relative; }
.msg__body { word-wrap: break-word; overflow-wrap: anywhere; }
.msg--mine { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 3px; }
.msg--theirs { align-self: flex-start; background: var(--blue-100); color: var(--ink); border-bottom-left-radius: 3px; }
/* EMERGENCY messages stay loud */
.msg--emergency { outline: 2px solid var(--danger); background: var(--danger-bg); color: var(--ink); }
.msg--emergency.msg--mine { color: var(--ink); }
.msg__flag {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: var(--danger); margin-bottom: .25rem;
}
.msg__meta { display: block; margin-top: .35rem; font-size: .72rem; opacity: .75; }
.messenger__composer .field { margin-bottom: .6rem; }
.messenger__composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list__item { display: flex; align-items: flex-start; gap: .8rem; padding: .85rem .75rem; }
.notif-list__item + .notif-list__item { border-top: 1px solid var(--line); }
.notif-list__item.is-unread { background: var(--blue-100); }
.notif-list__item.is-emergency { background: var(--danger-bg); }
.notif-list__icon { color: var(--blue); flex: 0 0 auto; }
.notif-list__item.is-emergency .notif-list__icon { color: var(--danger); }
.notif-list__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.notif-list__title { font-weight: 600; color: var(--navy); }
.notif-list__body { font-size: .88rem; color: var(--ink); }
.notif-list__meta { font-size: .78rem; color: var(--muted); }
.notif-list__open { color: var(--muted); align-self: center; }

/* ---- Hero (navy band — matches landing) ---- */
.hero {
  background: var(--grad-hero);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 60px; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.04) 38px 40px);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(var(--sp-7), 8vw, 96px); max-width: 760px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  color: var(--gold); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem;
  border: 1px solid rgba(232, 178, 58, .6);
  padding: 5px 12px; border-radius: 100px; margin-bottom: var(--sp-4);
}
.hero h1 { color: #fff; margin-bottom: var(--sp-4); font-size: clamp(2.2rem, 5.5vw, 3.6rem); text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero h1 .accent { color: var(--gold); }
.hero__sub { font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: #cfe0f0; max-width: 58ch; margin-bottom: var(--sp-6); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero .btn--ghost, .hero .btn.ghost { --btn-fg: #fff; --btn-bd: #fff; }
.hero .btn--ghost:hover, .hero .btn.ghost:hover { --btn-bg: #fff; color: var(--navy); border-color: #fff; }

/* ---- Feature grid ---- */
.feature {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: var(--sp-5); height: 100%; transition: transform .15s ease, box-shadow .15s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: var(--sp-3);
  background: var(--blue-100); border: 1px solid var(--line); color: var(--blue);
}
.feature h3 { margin-bottom: var(--sp-2); }
.feature p  { color: var(--muted); margin: 0; }
.feature__flag {
  display: inline-block; margin-top: var(--sp-3); font-size: .75rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--blue);
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--navy); color: #cfe0f0;
  border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-6); text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #a9c2dc; max-width: 52ch; margin-inline: auto; }

/* ---- Section heading ---- */
.section-head { text-align: center; max-width: 62ch; margin: 0 auto var(--sp-6); }
.section-head .eyebrow { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; display: block; margin-bottom: var(--sp-2); }
.section-head p { color: var(--muted); }

/* landing-parity helpers reusable by inner league pages */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); gap: var(--sp-4); flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.kicker { color: var(--blue); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; }
.rule { width: 70px; height: 4px; background: var(--gold); margin: var(--sp-5) auto 0; border-radius: 2px; }
.hcard {
  background: var(--surface); border-radius: var(--radius); padding: var(--sp-5);
  box-shadow: var(--shadow); border-top: 4px solid var(--blue);
  transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: var(--sp-2);
  color: var(--ink); text-decoration: none;
}
.hcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.hcard .ic { width: 44px; height: 44px; color: var(--blue); }
.hcard h3 { color: var(--navy); font-size: 1.5rem; margin: var(--sp-2) 0 0; }
.hcard p { color: var(--muted); font-size: .96rem; margin: 0; }
.hcard .go { color: var(--blue); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-top: auto; }

.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post .band { height: 8px; background: linear-gradient(90deg, var(--blue), var(--navy)); }
.post .body { padding: var(--sp-5); }
.post .date { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; }
.post h3 { color: var(--navy); font-size: 1.35rem; margin: var(--sp-2) 0 var(--sp-2); }
.post p { color: var(--muted); font-size: .98rem; margin: 0; }

.socbtn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--blue-100);
  border: 1px solid var(--line); color: var(--blue-600); padding: 12px 22px;
  border-radius: var(--radius-sm); font-weight: 600;
}
.socbtn:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }

/* ---- Misc ---- */
.back-link { margin-top: var(--sp-4); font-weight: 600; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.divider { height: 1px; background: var(--line); margin-block: var(--sp-4); }

/* ---- Footer (deep navy — matches landing) ---- */
.footer { background: var(--footer-bg); color: #8ba6c2; padding-block: var(--sp-7) var(--sp-5); margin-top: var(--sp-7); font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-6); padding-bottom: var(--sp-6); border-bottom: 1px solid rgba(255,255,255,.08); }
.footer h4 { color: #fff; font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .05em; font-size: 1.05rem; margin-bottom: var(--sp-3); }
.footer a { color: #a9c2dc; display: block; padding: 3px 0; font-size: .92rem; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer p { color: #8ba6c2; }
.footer .brand__text b, .footer .brand__name { color: #fff; }
.footer .brand__text span { color: #8ba6c2; }
.footer__brand { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.footer__brand b { color: #fff; font-family: var(--font-cond); font-size: 1.2rem; text-transform: uppercase; line-height: 1.1; }
.footer__addr { margin: 0 0 var(--sp-3); }
.footer__aff { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: var(--sp-3); }
/* text chip — for an affiliation we hold no mark for */
.footer__aff span {
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #c3d6ea;
}
/* logo chip — the SafeSport lockup is dark-grey artwork on an opaque white
   ground, so every mark sits on a white plate rather than bare on the near-black
   footer. Heights are optically balanced, not equal. */
.footer__aff .aff-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 0; border-radius: var(--radius-sm);
  padding: 6px 12px; min-height: 52px;
}
.footer__aff .aff-chip img { display: block; width: auto; height: 28px; }
.footer__aff .aff-chip img.aff-chip__wide { height: 24px; }
.footer__aff .aff-chip img.aff-chip__tall { height: 40px; }
.footer__bottom {
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; align-items: center;
  color: #6f89a5; font-size: .82rem;
}
.footer__bottom a { display: inline; color: #8ba6c2; padding: 0; }
.footer__bottom a:hover { color: #fff; }
.powered { font-weight: 600; }

/* ============================================================
   5. UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted, .muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.hide, .hidden { display: none !important; }
.full { width: 100%; }

/* ============================================================
   6. RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav__toggle { display: inline-grid; place-items: center; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 3px solid var(--blue);
    box-shadow: 0 10px 20px rgba(13, 35, 55, .1);
    padding: var(--sp-2) var(--sp-4) var(--sp-4); gap: 0; margin: 0;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__actions { margin-left: 0; margin-top: var(--sp-3); gap: var(--sp-2); }
  .nav__actions a { border-bottom: 0; }
}

@media (max-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .deflist, .detail { grid-template-columns: 1fr; gap: 0 var(--sp-4); }
  .deflist dt, .detail dt { margin-top: var(--sp-2); }
  .msg { max-width: 90%; }
  .messenger .thread { max-height: 55vh; }
}

/* Motion-sensitivity */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
