/* Greater Springfield Pioneers Wolfpack — navy + gold, sampled from the club banner. */
:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #ece8de;
  --text: #121a2c;
  --muted: #5a6274;
  --border: #d9d4c7;
  --brand: #0b1121;
  --brand-2: #1a2742;
  --on-brand: #f3eee3;
  --accent: #cc963a;
  --accent-strong: #ddb05a;
  --on-accent: #0b1121;
  --link: #1d3a72;
  --danger: #b4372f;
  --ok: #2f7a4f;
  --warn: #9a6512;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 17, 33, 0.06), 0 4px 14px rgba(11, 17, 33, 0.07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1d;
    --surface: #111a2e;
    --surface-2: #19233b;
    --text: #ece7dc;
    --muted: #a3abbd;
    --border: #26324d;
    --brand: #070b16;
    --brand-2: #1a2742;
    --accent: #d6a24a;
    --accent-strong: #e8bd68;
    --link: #e2b45e;
    --danger: #e0675e;
    --ok: #5cbf86;
    --warn: #e0a54a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: 0.01em; }
h1, h2, .h2 { text-transform: uppercase; letter-spacing: 0.02em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2, .h2 { font-size: 1.6rem; }
h3, .h3 { font-size: 1.25rem; }
.h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.page-pad { padding-top: 2rem; padding-bottom: 3rem; }
.section { padding: 2.5rem 16px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.pre { white-space: pre-line; }
.stack > * + * { margin-top: 1rem; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
.inline { display: inline; margin: 0; }

/* Header */
.site-header { background: var(--brand); color: var(--on-brand); position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--accent); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; flex: none; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; white-space: nowrap; }
.brand img { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-display); text-transform: uppercase; }
.brand-text small { font-size: 0.68rem; letter-spacing: 0.16em; color: var(--accent); font-weight: 500; }
.brand-text strong { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.04em; }
.site-nav { display: flex; align-items: center; flex: 1; gap: 1rem; }
.site-nav ul { display: flex; gap: 0.1rem; list-style: none; margin: 0 auto 0 0.75rem; padding: 0; flex-wrap: nowrap; }
.site-nav ul a { color: var(--on-brand); text-decoration: none; padding: 0.4rem 0.55rem; border-radius: 8px; opacity: 0.85; }
.site-nav ul a:hover, .site-nav ul a.active { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; white-space: nowrap; }
.site-nav ul a, .dd-toggle { white-space: nowrap; }
/* Top-level links and dropdown buttons share one box model so their text lines up. */
.site-nav > ul > li > a, .site-nav > ul > li > .dd-toggle { display: inline-flex; align-items: center; line-height: 1.5; }
@media (min-width: 1181px) {
  .site-nav > ul > li { display: flex; align-items: center; }
}
.site-header .btn-admin { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.site-header .btn-admin:hover, .site-header .btn-admin.active { background: var(--accent-strong); border-color: var(--accent-strong); }

/* Club dropdown: opens on hover/focus (desktop), on tap via app.js, and is always expanded in the mobile menu. */
.site-nav .dd { position: relative; }
.dd-toggle { font: inherit; background: none; border: 0; color: var(--on-brand); padding: 0.4rem 0.55rem; border-radius: 8px; opacity: 0.85; cursor: pointer; }
.dd-toggle:hover, .dd-toggle.active, .dd.open .dd-toggle { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.dd-toggle .caret { display: inline-block; font-size: 0.75em; margin-left: 0.15rem; transition: transform 0.15s; }
.dd.open .caret { transform: rotate(180deg); }
.site-nav .dd-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 30; min-width: 240px; margin: 0; padding: 0.4rem; list-style: none; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(11, 17, 33, 0.25); }
.site-nav .dd:hover .dd-menu, .site-nav .dd:focus-within .dd-menu, .site-nav .dd.open .dd-menu { display: flex; }
.site-nav .dd-menu a { display: block; color: var(--text); opacity: 1; padding: 0.55rem 0.8rem; border-radius: 6px; }
.site-nav .dd-menu a:hover, .site-nav .dd-menu a.active { background: var(--surface-2); }
@media (max-width: 1180px) {
  .dd-toggle { padding-left: 0.7rem; cursor: default; background: none !important; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
  .dd-toggle .caret { display: none; }
  .site-nav .dd-menu, .site-nav .dd:hover .dd-menu { display: flex; position: static; min-width: 0; padding: 0 0 0.4rem 0.6rem; background: none; border: 0; box-shadow: none; }
  .site-nav .dd-menu a { color: var(--on-brand); opacity: 0.85; padding: 0.4rem 0.7rem; }
  .site-nav .dd-menu a:hover, .site-nav .dd-menu a.active { background: rgba(255, 255, 255, 0.1); opacity: 1; }
}
.site-header .btn-ghost { color: var(--on-brand); border-color: rgba(255, 255, 255, 0.25); }
.site-header .btn-link { color: var(--on-brand); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, 0.3); color: var(--on-brand); font-size: 1.2rem; border-radius: 8px; padding: 0.25rem 0.6rem; cursor: pointer; }
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--brand); flex-direction: column; align-items: stretch; padding: 0.5rem 16px 1rem; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; margin: 0; }
  .nav-actions { flex-wrap: wrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font: inherit; font-weight: 600; padding: 0.6rem 1.1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; background: var(--surface-2); color: var(--text); transition: background 0.15s, border-color 0.15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: none; border: none; color: var(--link); padding-left: 0.3rem; padding-right: 0.3rem; text-decoration: underline; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.875rem; border-radius: 8px; }
.btn-lg { padding: 0.85rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hero: the club banner on wide screens; crest + headline on phones. */
.hero { background: #0b1121; color: var(--on-brand); }
.hero-banner { display: block; width: 100%; max-width: 1942px; margin: 0 auto; aspect-ratio: 1942 / 809; height: auto; }
.hero-mobile { display: none; text-align: center; padding: 2rem 16px 1.5rem; background: radial-gradient(ellipse at top, #1a2742 0%, #0b1121 70%); }
.hero-mobile img { width: 220px; height: 220px; }
.hero-mobile h1 { font-size: 2.6rem; line-height: 1; margin: 0.8rem 0 0.4rem; color: var(--accent); }
.hero-mobile h1 span { display: block; color: #fff; font-style: italic; font-size: 0.8em; }
.hero-mobile p { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem; margin: 0; }
.hero-mobile p b { color: var(--accent); font-weight: 600; }
.hero-cta { background: linear-gradient(180deg, #0b1121, #121b31); border-bottom: 1px solid rgba(204, 150, 58, 0.35); }
.hero-cta .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.hero-cta p { margin: 0; color: rgba(243, 238, 227, 0.85); max-width: 60ch; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero .btn-outline { color: var(--on-brand); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: var(--accent); font-weight: 700; }
@media (max-width: 720px) {
  .hero-banner { display: none; }
  .hero-mobile { display: block; }
  .hero-cta .container { justify-content: center; text-align: center; }
  .hero-cta p { display: none; }
}

.band { background: var(--brand); color: var(--on-brand); padding: 2.5rem 0; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.values { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; }
.value { display: flex; align-items: center; gap: 0.75rem; }
.value-icon { flex: none; width: 52px; height: 52px; border: 2px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.value-icon svg { width: 26px; height: 26px; }
.value strong { display: block; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.1rem; }
.value span { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; color: var(--accent); }
/* The banner already shows the values on wide screens; the band stands in for it on phones. */
@media (min-width: 721px) { .band.values-band { display: none; } }
@media (max-width: 720px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Layout */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 2rem; align-items: start; margin-top: 1.5rem; }
.two-col.even { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h1, .section-head h2 { margin: 0; }
.sticky { position: sticky; top: 84px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
a.card { color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(20, 30, 25, 0.12); }
.event-card { display: flex; gap: 1rem; }
.event-card h3 { margin-bottom: 0.2rem; }
.event-card p { margin-bottom: 0.5rem; }
.date-badge { flex: none; width: 56px; height: 64px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.date-badge .m { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; }
.date-badge .d { font-size: 1.6rem; font-weight: 700; margin-top: 2px; }
.tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.post-card h3 { margin-bottom: 0.4rem; }

/* Badges */
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); text-transform: capitalize; white-space: nowrap; }
.badge-amber, .badge-pending, .badge-maybe, .badge-dues-due-soon { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge-active, .badge-paid, .badge-going, .badge-dues-current { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.badge-suspended, .badge-failed, .badge-declined, .badge-dues-lapsed, .badge-refunded { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* Flash & callouts */
.flash-stack { margin-top: 1rem; }
.flash { padding: 0.8rem 1rem; border-radius: 10px; margin-bottom: 0.75rem; border: 1px solid var(--border); background: var(--surface); }
.flash ul { margin: 0; padding-left: 1.2rem; }
.flash-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.flash-info { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.callout { padding: 0.9rem 1rem; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-radius: 8px; margin: 1rem 0; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 0.9rem; }
.form + .form, .card + .card.form, form.card + form.card { margin-top: 1rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.92rem; }
label .muted { font-weight: 400; }
input, select, textarea { font: inherit; font-weight: 400; padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%; }
textarea { resize: vertical; min-height: 5rem; }
label.check { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; }
label.check input { width: auto; }
.checks { display: flex; flex-direction: column; gap: 0.4rem; }
.row-2, .row-3 { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.align-end { align-items: end; }
@media (max-width: 640px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.auth { max-width: 520px; }
.admin-login { border-top: 4px solid var(--accent); }
.admin-login-crest { display: block; margin: 0 auto -0.4rem; }
.admin-login .eyebrow { margin: 0; }
/* Admin is dark and the Officials area is light, sign-in pages included, whatever the device's light or dark setting.
   Dark is for the screen only, so Admin pages still print as dark text on white. */
@media screen {
  body.admin, body.login-admin { --bg: #0b1121; --surface: #141e35; --surface-2: #1a2742; --text: #f3eee3; --muted: #a3abbd; --border: #4a5a82; --accent: #d6a24a; --accent-strong: #e8bd68; --link: #e2b45e; --danger: #e0675e; --ok: #5cbf86; --warn: #e0a54a; --shadow: 0 1px 2px rgba(0, 0, 0, 0.35); color-scheme: dark; }
  body.admin .admin-nav a.active { background: var(--accent); color: var(--on-accent); }
}
body.officials, body.login-officials { --bg: #f4f2ec; --surface: #ffffff; --surface-2: #ece8de; --text: #121a2c; --muted: #5a6274; --border: #d9d4c7; --brand: #0b1121; --accent: #cc963a; --accent-strong: #ddb05a; --link: #1d3a72; --danger: #b4372f; --ok: #2f7a4f; --warn: #9a6512; --shadow: 0 1px 2px rgba(11, 17, 33, 0.06), 0 4px 14px rgba(11, 17, 33, 0.07); color-scheme: light; }
body.officials .eyebrow { color: var(--warn); }
.login-intro { margin: 0; }
.portal-actions { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.site-header .portal-actions .btn-link { color: var(--on-brand); }
.portal-footer { padding: 1rem 0 1.5rem; }
.login-officials .admin-login { border-top: 0; overflow: hidden; }
.login-officials .login-band { background: var(--accent); margin: -1.25rem -1.25rem 0; padding: 1.25rem; }
.login-officials .login-band h1, .login-officials .login-band .eyebrow { color: var(--on-accent); }
.narrow-form { max-width: 720px; }
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 180px; }
.search-bar select { width: auto; }
.search-bar input[type="checkbox"] { flex: none; min-width: 0; width: auto; }
.search-bar label.check { display: inline-flex; align-items: center; gap: 0.4rem; }
.segmented { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; padding: 0; margin: 0; }
.segmented label { flex: 1; font-weight: 600; }
.segmented input { position: absolute; opacity: 0; width: 1px; }
.segmented span { display: block; text-align: center; padding: 0.5rem; cursor: pointer; }
.segmented input:checked + span { background: var(--brand-2); color: var(--on-brand); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip { font: inherit; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.price { font-size: 2rem; font-weight: 700; margin-bottom: 0.4rem; }
.price .muted { font-size: 1rem; font-weight: 400; }
.danger-zone { margin-top: 1rem; border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }

/* Meta lists */
dl.meta { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0 0 1rem; }
dl.meta dt { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 0.15rem; }
dl.meta dd { margin: 0; }
.attendee-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.attendee-list li { background: var(--surface-2); padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.9rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }

/* Prose */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose img { border-radius: var(--radius); }
.prose a > img { max-width: 260px; }
.map-embed { margin: 0.75rem 0 1rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.map-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 240px; border: 0; }
.map-embed figcaption { padding: 0.45rem 0.8rem; font-size: 0.85rem; background: var(--surface); border-top: 1px solid var(--border); }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1em 0; padding: 0.2em 1em; color: var(--muted); }

.prose table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.25rem; font-size: 0.95rem; background: var(--surface); border: 1px solid var(--border); }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.prose ul li, .prose ol li { margin-bottom: 0.3rem; }

/* Complaints & feedback */
.narrow-wide { max-width: 980px; }
.urgent { border: 2px solid var(--danger); border-radius: var(--radius); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); padding: 0.9rem 1.1rem; margin: 1.25rem 0; }
.urgent strong { display: block; color: var(--danger); }
.avenues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.avenue { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.avenue:hover { border-color: var(--accent); }
.avenue .num { width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.avenue b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.1rem; }
.avenue span:last-child { color: var(--muted); font-size: 0.9rem; }
.avenue.confidential .num { background: var(--danger); color: #fff; }
.feedback-section { padding: 2.5rem 0; scroll-margin-top: 70px; }
.feedback-section.alt { background: var(--surface-2); }
.form-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2rem; align-items: start; }
.form-confidential { border-top: 4px solid var(--danger); }
.sent-receipt { border-left: 4px solid var(--ok); margin: 1rem 0; scroll-margin-top: 80px; }
.sent-receipt .ref { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; }
.receipt-copy { white-space: pre-wrap; font: inherit; background: var(--surface-2); padding: 0.75rem; border-radius: 8px; margin: 0.5rem 0 0; }
@media (max-width: 860px) { .avenues, .form-split { grid-template-columns: 1fr; } }
@media print {
  .site-header, .site-footer, .urgent, .avenues, .feedback-section, .no-print, .lead, .eyebrow { display: none !important; }
  .sent-receipt { border: 0; box-shadow: none; }
}

/* Teams & results */
.mt { margin-top: 2rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; }
.teams-summary { margin: 0.5rem 0 1.5rem; }
.team-div { margin-bottom: 2rem; }
.team-div h2 .muted { font-family: var(--font); text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 0.4rem; }
.team-card h3 { margin-bottom: 0.2rem; }
.team-card p { margin: 0.25rem 0; }
.record { font-weight: 700; }
.record .w { color: var(--ok); }
.record .l { color: var(--danger); margin-left: 0.4rem; }
.win { color: var(--ok); }
.loss { color: var(--danger); }
.ours { font-weight: 700; }
.score-line b { font-variant-numeric: tabular-nums; }
.team-comp { margin-bottom: 2.5rem; }
.team-comp > h2 { border-bottom: 2px solid var(--accent); padding-bottom: 0.3rem; font-size: 1.35rem; }
.div-title { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem; margin-bottom: 0.6rem; }
.team-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.club-badge { background: var(--brand); color: var(--accent); border-color: var(--brand); text-transform: none; font-size: 0.7rem; }
.team-filters select { width: auto; max-width: 100%; }
.results-table td { vertical-align: top; }
.team-line { display: block; }
.team-line.win, .score-col .win { color: var(--ok); font-weight: 700; }
.team-line.loss, .score-col .loss { color: var(--danger); }
.score-col { font-weight: 700; line-height: 1.6; }
.nowrap { white-space: nowrap; }

/* Rep results (layout follows lwbball's Rep Scores page) */
.rs-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 1.5rem; }
.rs-pill { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.rs-league { margin-bottom: 2.5rem; }
.rs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.rs-head h2 { margin-bottom: 0.2rem; }
.rs-filter select { width: auto; }
.rs-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.rs-col { background: var(--surface-2); border-radius: var(--radius); padding: 0.75rem; }
.rs-col h3 { display: flex; align-items: center; gap: 0.4rem; font-size: 1rem; }
.rs-n { background: var(--surface); border-radius: 999px; padding: 0 0.5rem; font-size: 0.8rem; font-family: var(--font); color: var(--muted); }
.rs-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--danger); animation: rs-pulse 1.4s infinite; }
@keyframes rs-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .rs-dot { animation: none; } }
.rs-game { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; margin-bottom: 0.5rem; color: var(--text); text-decoration: none; }
a.rs-game:hover { border-color: var(--accent); }
.rs-team { min-width: 0; overflow-wrap: anywhere; }
.rs-score { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.rs-info { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.rs-tag { background: var(--surface-2); border-radius: 4px; padding: 0 0.35rem; font-weight: 600; color: var(--text); }
.rs-tag.live { background: var(--danger); color: #fff; }
.rs-stats { margin-left: auto; color: var(--link); font-weight: 600; }
.rs-more { display: inline-block; margin-top: 0.25rem; }
@media (max-width: 900px) { .rs-cols { grid-template-columns: 1fr; } }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.94rem; }
.table th, .table td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table tr.past td { opacity: 0.6; }
.table.compact td { padding: 0.4rem 0.5rem; }

/* Stats */
.stats { margin: 1rem 0 1.5rem; }
.stat { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1.1; text-transform: capitalize; }

/* Sub-navigation */
.subnav { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin: 1rem 0 1.5rem; overflow-x: auto; }
.subnav a { padding: 0.6rem 0.9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.subnav a.active, .subnav a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* Member directory */
.member-card { display: flex; gap: 0.9rem; }
.member-card h3 { margin-bottom: 0.1rem; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--brand-2); color: var(--on-brand); display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* Calendar */
.calendar { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 0.5rem; text-align: center; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.cal-day { min-height: 110px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); padding: 0.35rem; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.cal-day:first-child { border-left: none; }
.cal-day.out { background: var(--bg); color: var(--muted); }
.cal-num { font-size: 0.85rem; font-weight: 600; }
.cal-day.today .cal-num { background: var(--accent); color: var(--on-accent); border-radius: 999px; width: 1.7em; height: 1.7em; display: inline-flex; align-items: center; justify-content: center; }
.cal-event { display: block; font-size: 0.78rem; padding: 0.2rem 0.35rem; border-radius: 6px; background: color-mix(in srgb, var(--brand-2) 14%, transparent); color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--brand-2); }
.cal-event.members { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cal-time { font-weight: 700; }
.cal-event:hover, .cal-event.open { background: var(--brand-2); color: var(--on-brand); }
.cal-event.members:hover, .cal-event.members.open { background: var(--accent); color: var(--on-accent); }
.cal-event.is-past { opacity: 0.55; }
.cal-day.past:not(.out) { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.cal-day.past .cal-num { color: var(--muted); }
.cal-toolbar { margin-bottom: 0.25rem; }
.cal-hint { margin: 0 0 0.75rem; }

/* Event pop-out */
.cal-pop { position: fixed; z-index: 60; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(11, 17, 33, 0.25); padding: 1rem 1.1rem 1.1rem; }
.cal-pop[hidden] { display: none; }
.cal-pop h2 { margin: 0 2rem 0.4rem 0; }
.cal-pop h2:focus { outline: none; }
.cal-pop .meta { margin: 0.5rem 0; }
.cal-pop p { margin: 0.5rem 0 0.9rem; }
.cal-pop-date { margin: 0 2rem 0.15rem 0 !important; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cal-pop-close { position: absolute; top: 0.4rem; right: 0.5rem; width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cal-pop-close:hover { background: var(--surface-2); color: var(--text); }

/* Coming up list under the calendar */
.cal-upcoming { padding-bottom: 0; }
.upcoming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.upcoming-list li { display: flex; gap: 0.85rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.85rem; }
.upcoming-date { flex: none; width: 3.2rem; text-align: center; border-radius: 8px; background: var(--brand-2); color: var(--on-brand); padding: 0.25rem 0; line-height: 1.1; }
.upcoming-date .m { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-strong); font-weight: 700; }
.upcoming-date .d { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }

@media (max-width: 640px) {
  .cal-day { min-height: 64px; padding: 0.2rem; }
  .cal-event { font-size: 0; padding: 0; height: 10px; border-left: none; background: var(--brand-2); }
  .cal-event.members { background: var(--accent); }
  .cal-head div { font-size: 0.65rem; padding: 0.4rem 0.1rem; }
  /* On phones the pop-out is a sheet along the bottom of the screen. */
  .cal-pop { left: 16px !important; right: 16px; top: auto !important; bottom: 16px; width: auto; max-height: 70vh; }
}

/* Admin */
.admin-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; padding-bottom: 3rem; }
.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; position: sticky; top: 84px; align-self: start; }
.admin-nav a { padding: 0.55rem 0.8rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.admin-nav a:hover { background: var(--surface-2); }
.admin-nav a.active { background: var(--brand-2); color: var(--on-brand); }
.admin-main section { margin-bottom: 2rem; }
.admin-main .card.form + .card.form { margin-top: 1rem; }
/* Officials area: menu down the left, grouped (like Admin). On phones it folds into a "Menu" toggle. */
.officials-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; padding-bottom: 3rem; }
.officials-main { min-width: 0; }
.side-menu { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
.side-menu > summary { display: none; }
.side-menu nav { display: flex; flex-direction: column; gap: 0.9rem; }
.side-group { display: flex; flex-direction: column; gap: 0.1rem; }
.side-label { margin: 0 0 0.2rem 0.8rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.side-menu a { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.side-menu a:hover { background: var(--surface-2); }
.side-menu a.sub { padding-left: 1.6rem; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.side-menu a.active, .side-menu a.sub.active { background: var(--brand-2); color: var(--on-brand); }
@media (max-width: 860px) {
  .officials-shell { grid-template-columns: 1fr; gap: 1rem; padding-top: 1rem; }
  .side-menu { position: static; max-height: none; overflow: visible; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .side-menu > summary { display: block; padding: 0.7rem 0.9rem; font-weight: 700; cursor: pointer; }
  .side-menu nav { padding: 0 0.5rem 0.7rem; }
}
@media print {
  .side-menu { display: none !important; }
  .officials-shell { display: block; padding: 0; }
}
.pay-referees select { min-width: 8.5rem; font-size: 0.9rem; padding: 0.3rem 0.4rem; }
.own-team-row { display: grid; gap: 0.6rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.8fr); margin-bottom: 0.5rem; }
@media (max-width: 640px) { .own-team-row { grid-template-columns: 1fr; } }
.bench-level { font-size: 0.85rem; padding: 0.2rem 0.3rem; }
.bench-level.bench-independent { border-color: var(--brand-2); font-weight: 600; }
.bench-level.bench-learning { background: var(--surface-2); }
.invite-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 1rem; padding: 0.8rem 1rem; }
.message.handled { opacity: 0.6; }
.message-confidential { border-left: 4px solid var(--danger); }
.message-complaint { border-left: 4px solid var(--warn); }
.message code { margin: 0 0.3rem; }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; gap: 1rem; }
  .admin-nav { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 0.3rem; }
  .admin-nav a { white-space: nowrap; }
}

/* Footer */
.site-footer { background: var(--brand); color: var(--on-brand); margin-top: 2rem; border-top: 2px solid var(--accent); }
.footer-crest { width: 96px; height: 96px; margin-bottom: 0.5rem; }
.footer-motto { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-size: 1.15rem; margin-bottom: 0.2rem; }
.site-footer a { color: var(--on-brand); }
.site-footer .muted { color: rgba(244, 241, 234, 0.7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-top: 2.5rem; padding-bottom: 1.5rem; }
.footer-grid h4 { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--accent); }
.footer-grid li { margin-bottom: 0.35rem; }
.brand-footer { margin-bottom: 0.5rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1rem; padding-bottom: 1.5rem; font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* Photo gallery */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.album-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.album-card:hover, .album-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(11, 17, 33, 0.14); }
.album-cover { display: block; aspect-ratio: 4 / 3; background: var(--brand-2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-meta { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 1rem 1rem; align-items: flex-start; }
.album-meta b { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.01em; }
.album-meta small { color: var(--muted); }
.album-desc { white-space: pre-line; max-width: 70ch; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.photo-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.photo-grid a:hover img, .photo-grid a:focus-visible img { transform: scale(1.04); }
.gallery-note { margin-top: 2rem; }
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; } .photo-grid a { border-radius: 2px; } }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 16, 0.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 3.5rem 4rem; }
.lightbox img { max-width: 100%; max-height: calc(100% - 2rem); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #e9e4d8; font-size: 0.9rem; margin-top: 0.6rem; text-align: center; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox button:hover, .lightbox button:focus-visible { background: var(--accent); color: var(--on-accent); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lightbox figure { padding: 3.5rem 0.5rem; } .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; } }
body.lb-open { overflow: hidden; }

.album-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; display: block; }
.album-thumb-cell { width: 64px; }
.admin-photos { margin-top: 2rem; }
.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.admin-photo { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.admin-photo.is-cover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.admin-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.caption-form { display: flex; gap: 0.4rem; }
.caption-form input { flex: 1; min-width: 0; }
.danger-text { color: var(--danger); }
.upload-status:empty { display: none; }

/* Player leads (admin) */
details.add-lead { padding: 0; margin-bottom: 1.5rem; }
details.add-lead > summary { list-style: none; cursor: pointer; padding: 0.9rem 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; border-radius: var(--radius); }
details.add-lead > summary::-webkit-details-marker { display: none; }
details.add-lead > summary:hover { background: var(--surface-2); }
details.add-lead[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
details.add-lead[open] .add-hint { display: none; }
details.add-lead .add-hint { margin-left: auto; font-weight: 400; }
details.add-lead > form { padding: 1.25rem; }
.add-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 1.1rem; line-height: 1; transition: transform 0.15s; }
details.add-lead[open] .add-icon { transform: rotate(45deg); }
.status-filter { align-items: center; }
.status-filter .count { font-weight: 400; }
.status-filter a.empty { opacity: 0.55; }
.leads-table td { vertical-align: top; }
.leads-table a[href^="mailto"] { overflow-wrap: anywhere; }
.leads-table td:nth-child(2) { min-width: 8rem; }
.leads-table td:nth-child(4) { min-width: 9rem; }
.badge.lead-new { background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); border-color: color-mix(in srgb, var(--link) 35%, transparent); }
.badge.lead-contacted { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge.lead-responded { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge.lead-signed { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }

/* Audit log (admin) */
.audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin: 1rem 0; }
.audit-filters label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.audit-filters label.grow { flex: 1 1 14rem; }
.audit-filters label.check { flex-direction: row; align-items: center; gap: 0.4rem; padding-bottom: 0.55rem; }
.audit-filters select { width: auto; max-width: 18rem; }
.audit-table td { vertical-align: top; }
.audit-table td:nth-child(4), .audit-table td:nth-child(5) { overflow-wrap: anywhere; }
.audit-problem td { background: color-mix(in srgb, var(--danger) 6%, transparent); }
.pager { margin-top: 1rem; }
.blue-cards-table td { vertical-align: top; }
.blue-card-report td { vertical-align: top; }
.upload-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.documents-table td { vertical-align: top; }
.documents-table .doc-link { width: 100%; min-width: 16rem; margin-bottom: 0.35rem; }
.documents-table .btn-row { gap: 0.4rem; }
.blue-card-report td:nth-child(3) { overflow-wrap: anywhere; }
@media print {
  .admin-nav { display: none !important; }
  .admin-shell { display: block; }
  .blue-card-report { font-size: 9pt; }
  .blue-card-report a { color: inherit; text-decoration: none; }
}
.blue-cards-table td:nth-child(5) a { overflow-wrap: anywhere; }

/* Court controller hosting */
.badge.host-sqjbc, .cal-event.host-sqjbc { border-left-color: var(--accent); }
.badge.host-sqjbc { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge.host-weekly { background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); border-color: color-mix(in srgb, var(--link) 35%, transparent); }
.cal-event.host-sqjbc { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.cal-event.needs:not(.is-past) .host-fill { color: var(--warn); font-weight: 700; }
.cal-event.mine { box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.cal-event.cancelled { text-decoration: line-through; opacity: 0.6; }
.host-fill { font-size: 0.72rem; }
.hosting-top { margin-top: 0; margin-bottom: 1.5rem; }
.hosting-list li { margin-bottom: 0.35rem; }
.hosting-filters { align-items: center; }
.hosting-calendar .cal-event { white-space: normal; }
.hosting-table td { vertical-align: top; }
tr.is-cancelled td { opacity: 0.6; }
.roster-chip { display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.1rem 0.15rem 0.1rem 0.55rem; margin: 0 0.25rem 0.25rem 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.3rem; border-radius: 999px; }
.chip-x:hover { background: var(--danger); color: #fff; }
.roster-add { display: flex; gap: 0.35rem; margin-top: 0.35rem; flex-wrap: wrap; }
.roster-add select { width: auto; max-width: 14rem; }
.hours-inline { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.hours-inline input[type="time"] { width: auto; padding: 0.25rem 0.35rem; }
.narrow-num { width: 4.5rem; }
.weekly-table select[name="weekday"] { min-width: 8.5rem; }
.weekly-table select[name="venue"] { min-width: 5.5rem; }
.weekly-table input[type="time"] { min-width: 7.5rem; }

/* Referee scheduling */
.ref-days a { display: inline-flex; align-items: center; gap: 0.3rem; }
.ref-days .count { font-weight: 400; }
.ref-venue { margin-top: 1.5rem; }
.ref-table td { vertical-align: top; }
.ref-table tr.ref-open td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.ref-table .roster-add select { max-width: 17rem; }
.needed-form { display: inline-flex; gap: 0.3rem; align-items: center; justify-content: flex-end; }
.ref-defaults { margin-top: 2rem; }
.ref-defaults summary { cursor: pointer; }
.comp-needed { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.6rem; }
.comp-needed label { display: flex; gap: 0.5rem; align-items: center; flex: 1; justify-content: space-between; max-width: 28rem; }
.avail-day { margin-bottom: 1rem; }
.avail-day legend { padding: 0 0.3rem; }
.avail-game { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.avail-game:last-of-type { border-bottom: 0; }
.ref-slot { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.slot-label { min-width: 4.6rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ref-slot .roster-add { margin-top: 0; }

/* Referee roster sheet (same layout and colours as the coordinators' spreadsheet) */
.roster-sheet { overflow-x: auto; margin: 1.25rem 0 1.75rem; }
.roster { width: 100%; min-width: 760px; border-collapse: collapse; background: #000; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.roster caption { caption-side: top; text-align: left; background: #5b2640; color: #fff; font-weight: 700; padding: 0.3rem 0.6rem; font-size: 1.1rem; }
.roster col.c-date { width: 13%; }
.roster col.c-time { width: 14%; }
.roster col.c-ref { width: 16%; }
.roster th, .roster td { border: 1px solid #6a6a6a; padding: 0.3rem 0.5rem; text-align: center; font-weight: 400; }
.roster .date-cell { background: #000; border-color: #000; color: #fff; }
.roster tbody:first-of-type .court-head .date-cell { background: #5b2640; font-weight: 700; border-color: #6a6a6a; }
.roster tbody:first-of-type .col-head .date-cell { background: #6e3554; border-color: #6a6a6a; }
.roster .court-head th:last-child { text-align: left; font-weight: 700; color: #000; }
.roster .court-a .court-head th:last-child, .roster .court-a .col-head th, .roster .court-a .time { background: #8f6d05; color: #fff; }
.roster .court-a .court-head th:last-child { color: #000; }
.roster .court-b .court-head th:last-child, .roster .court-b .col-head th, .roster .court-b .time { background: #79a3e6; color: #000; }
.roster .col-head th { letter-spacing: 0.04em; }
.roster .time { white-space: nowrap; }
.roster td.team { font-size: 1rem; }
.roster tr.no-game td { background: #ff0000; color: #fff; }
.roster td.missing { background: #3a2a00; color: #ffcf4a; font-weight: 700; }
.roster td.none { color: #777; }
.roster-legend { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); }
.roster-legend .swatch { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -2px; }
.roster-legend .swatch.missing { background: #3a2a00; border: 1px solid #ffcf4a; }
.roster-coords { margin-top: 1rem; }
@media print {
  .no-print, .roster-legend { display: none !important; }
  .roster-sheet { overflow: visible; page-break-inside: avoid; margin: 0 0 1rem; }
  .roster { min-width: 0; font-size: 11pt; }
}
.roster tr.no-game td.date-cell { background: #000; }
.comp-c0 { color: #6fa8ff; } .comp-c1 { color: #7fd68a; } .comp-c2 { color: #ffb86b; } .comp-c3 { color: #e58cff; }
.comp-c4 { color: #ffe066; } .comp-c5 { color: #7fe0e0; } .comp-c6 { color: #ff8f8f; }
.roster-legend .swatch.comp-c0 { background: #6fa8ff; } .roster-legend .swatch.comp-c1 { background: #7fd68a; } .roster-legend .swatch.comp-c2 { background: #ffb86b; }
.roster-legend .swatch.comp-c3 { background: #e58cff; } .roster-legend .swatch.comp-c4 { background: #ffe066; } .roster-legend .swatch.comp-c5 { background: #7fe0e0; } .roster-legend .swatch.comp-c6 { background: #ff8f8f; }
.bench-slots { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px dashed var(--border); }
.comp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 0.6rem; }
.comp-row .comp-needed { margin-top: 0; }
.roster td.solo { background: #1f57c3; color: #fff; }
.roster-legend .swatch.solo { background: #1f57c3; }
.roster col.c-ref { width: auto; }
.roster.with-bench { min-width: 1080px; }

/* Club Blue Card links & verification */
.badge.verify-unverified { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge.verify-verified { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.badge.verify-invalid, .badge.verify-not_found { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.bc-fields { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.75rem; margin: 0; }
.bc-fields dt { color: var(--muted); }
.bc-fields dd { margin: 0; }
.bc-fields dd.changed { font-weight: 700; }
.bc-fields del { color: var(--muted); font-weight: 400; }
.bc-pending td { vertical-align: top; }
.reject-form { display: flex; gap: 0.3rem; margin-top: 0.4rem; flex-wrap: wrap; }
.reject-form input { min-width: 10rem; }
.bc-club-head { margin-top: 1.5rem; }
.bc-club.is-off { opacity: 0.7; }
.bc-link { width: 100%; font-size: 0.8rem; }
.bc-add-club { margin-top: 1.5rem; }
.verify-choices { display: grid; gap: 0.3rem; margin-bottom: 0.6rem; }
.api-sample { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 0.75rem; border-radius: 8px; }
.bc-list li { margin-bottom: 0.4rem; }

/* Game nights an official can do */
.nights-form { margin: 1rem 0 1.5rem; }
.me-form h2 { margin: 1.1rem 0 0.4rem; }
.me-form h2:first-of-type { margin-top: 0; }
.contact-set { border: 0; padding: 0; margin: 0 0 0.4rem; }
.week-grid { display: grid; gap: 0.6rem; margin-bottom: 0.6rem; }
.week-grid .night { border: 0; padding: 0; margin: 0; }
.level-help { margin: 0.2rem 0 0.6rem; }
.level-help dt { font-weight: 700; margin-top: 0.4rem; }
.level-help dd { margin: 0 0 0 0; color: var(--muted); }
.rep-roster td { vertical-align: top; }
.nights { display: grid; gap: 0.6rem; margin-bottom: 0.9rem; }
.night { border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.8rem 0.6rem; margin: 0; }
.night legend { padding: 0 0.3rem; display: flex; flex-wrap: wrap; gap: 0 0.6rem; align-items: baseline; }
.night-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.night-choices .choice { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 0.92rem; }
.night-choices .choice:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.night-choices .choice { flex-direction: row; margin: 0; font-weight: 400; color: var(--text); }
.night-choices .choice input { width: auto; margin: 0; accent-color: var(--brand-2); }
.email-password[hidden] { display: none; }
.ans { display: inline-block; min-width: 1.2em; text-align: center; font-weight: 700; border-radius: 999px; font-size: 0.8rem; }
.ans-accepted { color: var(--ok); }
.ans-declined { color: var(--danger); }
.ans-waiting { color: var(--muted); }
.day-status { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 0.6rem 0.9rem; margin: 0.8rem 0 1rem; background: var(--surface); }
.day-status p { margin: 0.2rem 0; }
.day-status.is-locked { border-left-color: var(--ok); }
.day-status.is-ready { border-left-color: var(--ok); }
.day-row td { background: var(--surface-2); }
.day-row .day-status { margin: 0.4rem 0 0; }
.my-job { margin-bottom: 0.5rem; }
.respond-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: flex-start; margin-top: 0.3rem; }
.decline summary { list-style: none; display: inline-block; }
.decline summary::-webkit-details-marker { display: none; }
.decline-form { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.decline-form input { width: auto; min-width: 12rem; }
.roster-chip.changed, .roster td.changed { background: #fff1a8; border-color: #e0b400; color: #3a2e00; }
.changes { margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px dashed var(--border); }
.changes ul { margin: 0.2rem 0 0 1.1rem; padding: 0; }
.shadow-slots { margin-top: 0.3rem; }
.people-table input[type=checkbox] { width: auto; }
.checklist { list-style: none; padding: 0; margin: 0.4rem 0; }
.checklist li { padding: 0.25rem 0; }
.checklist .tick { display: inline-block; width: 1.2em; color: var(--muted); font-weight: 700; }
.checklist li.done .tick { color: var(--ok); }
.feedback { border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.5rem; }
.feedback:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ratings { list-style: none; padding: 0; margin: 0.3rem 0; display: grid; gap: 0.2rem; }
.ratings li { display: flex; justify-content: space-between; gap: 1rem; }
.rating { font-weight: 700; padding: 0 0.5rem; border-radius: 999px; }
.rating-1 { color: var(--danger); } .rating-2 { color: #b36b00; } .rating-3 { color: var(--ok); } .rating-4 { color: #fff; background: var(--ok); }
.obs-table td.num, .obs-table th.num { text-align: center; }
.obs-table input[type=radio] { width: auto; }
.private-notes { background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 6px; padding: 0.4rem 0.6rem; }
.workshop-list, .resource-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin-bottom: 1rem; }
.resource-list li { margin-bottom: 0.4rem; }
.mt-s { margin-top: 0.8rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: flex-end; }
.inline-form label { margin: 0; }
.inline-form select { width: auto; }
.dash-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); }
.dash-grid .card h2 { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.dash-grid .card ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.dash-count { font-family: var(--font); font-size: 0.85rem; }
.attend-table td { vertical-align: top; }
.attend-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.attend-row input[type=checkbox] { width: 1.15rem; height: 1.15rem; }
.rates-table input { width: 7rem; }
.support-item { border-left: 4px solid var(--border); }
.support-item.kind-incident { border-left-color: var(--danger); }
.check-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; margin: 0.4rem 0; }
.shadow-slots .slot-label { color: var(--muted); font-style: italic; }
.roster-legend .swatch.changed { background: #fff1a8; border: 1px solid #e0b400; }
.prewrap { white-space: pre-wrap; }
.thread { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.msg { max-width: 42rem; padding: 0.6rem 0.9rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.msg p { margin: 0.15rem 0; }
.msg-out { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.msg-in { align-self: flex-start; }
.msg-meta { color: var(--muted); }
.msg-read { text-align: right; color: var(--ok); }
.unread-row td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.check-row { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }
