/* Metro Racquetball: mobile-first, responsive stylesheet */

:root {
  --navy: #0b1f3a;
  --navy-2: #13305a;
  --blue: #1e6cff;
  --blue-soft: #e8f0ff;
  --accent: #ff5a1f;
  --accent-dark: #e2440c;
  --green: #1e8a3e;
  --red: #c8102e;
  --amber: #b26a00;
  --ink: #142033;
  --muted: #5b6b82;
  --line: #dde3ec;
  --bg: #f5f7fb;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 6px 20px rgba(11, 31, 58, .06);
  --shadow-lg: 0 10px 40px rgba(11, 31, 58, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 750; }
h3, .h3 { font-size: 1.2rem; font-weight: 700; }
.h4, h4 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 32px; padding-bottom: 48px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mt-xl { margin-top: 2.5rem; }
.empty { color: var(--muted); font-style: italic; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .5em; }
.eyebrow a { color: inherit; text-decoration: none; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.tight { padding-left: 1.1em; margin: 0 0 1em; }
.tight li { margin: .25em 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .7em 1.2em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 650; line-height: 1.1; text-decoration: none; cursor: pointer;
  background: var(--navy); color: #fff; transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: .45em .9em; font-size: .88rem; }
.btn-lg { padding: .9em 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); }
.btn-primary:hover { background: #1557d6; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-ghost { background: transparent; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-ghost-dark { background: transparent; color: var(--navy); }
.btn-ghost-dark:hover { background: var(--blue-soft); color: var(--navy); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #a00d25; }
.link-button { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; font-size: .88rem; text-decoration: underline; margin-right: .8em; }
.inline-form { display: inline; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.link-more { font-weight: 650; text-decoration: none; font-size: .95rem; }

/* Badges & alerts */
.badge { display: inline-block; padding: .18em .65em; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--blue-soft); color: var(--navy); vertical-align: middle; white-space: nowrap; }
.badge-success { background: #dcf4e3; color: #11602a; }
.badge-muted { background: #edf0f5; color: var(--muted); }
.badge-info { background: var(--blue-soft); color: #1446a8; }
.badge-warn { background: #fff1d6; color: #8a5200; }
.badge-accent { background: var(--accent); color: #fff; }
.badge-type { background: transparent; border: 1px solid currentColor; color: var(--muted); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 12px; border-left: 4px solid; background: #fff; box-shadow: var(--shadow); }
.alert ul { margin: .4em 0 0; padding-left: 1.2em; }
.alert-success { border-color: var(--green); background: #f0fbf3; }
.alert-error { border-color: var(--red); background: #fff3f4; }
.alert-info { border-color: var(--blue); background: #f2f7ff; }
.flash-stack { padding-top: 16px; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.2rem; }
.brand:hover { color: #fff; }
.brand-text { letter-spacing: -.01em; }
.brand-text strong { color: var(--accent); margin-left: 2px; }
.logo { flex: none; }
.nav-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; border-radius: 10px; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle .bars::after { transform: translateY(-7px) rotate(-45deg); }
.site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); padding: 8px 20px 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-open .site-nav { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a { display: block; padding: 12px 4px; color: #dbe5f5; text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.site-nav li a:hover, .site-nav li a.active { color: #fff; }
.site-nav li a.active { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
.nav-account { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; }

.site-nav a, .nav-account .btn { white-space: nowrap; }
@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex !important; position: static; padding: 0; border: 0; align-items: center; gap: 20px; background: transparent; }
  .site-nav ul { display: flex; gap: 4px; }
  .site-nav li a { border: 0; padding: 8px 12px; border-radius: 999px; }
  .site-nav li a.active { box-shadow: none; padding-left: 12px; background: rgba(255, 255, 255, .1); }
  .nav-account { padding: 0; align-items: center; }
}

/* Hero */
.hero { position: relative; isolation: isolate; background-color: var(--navy); color: #fff; overflow: hidden; }
/* Looping video sits at the back; the blue gradient covers it at 65% opacity. */
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .65; background: radial-gradient(1200px 500px at 85% -10%, #2a5bd7 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0f2b55 100%); }
.hero-copy { text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
.hero-inner { display: grid; gap: 24px; padding-top: 48px; padding-bottom: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
.hero .accent { color: var(--accent); }
.hero .lead { color: #c8d6ee; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
.court-hero { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
.hero-photo { display: block; width: 100%; height: auto; border-radius: 16px; border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 20px 40px rgba(0, 0, 0, .35); }
@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.2fr .8fr; padding-top: 72px; padding-bottom: 72px; }
}

.page-head { background: linear-gradient(160deg, var(--navy) 0%, #12345f 100%); color: #fff; padding: 40px 0 36px; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head .lead { color: #c8d6ee; margin: 0; }
.page-head .eyebrow { color: #ffb08f; }

/* Panels, grids */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; border: 1px solid #eef1f6; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.home-grid { display: grid; gap: 20px; padding-top: 32px; }
.home-grid .panel { margin: 0; }
@media (min-width: 900px) {
  .home-grid { grid-template-columns: 1.4fr 1fr; }
  .panel-wide { grid-column: 1 / -1; }
}
.two-col { display: grid; gap: 24px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } .two-col-wide { grid-template-columns: 1.3fr 1fr; } }
.with-sidebar { display: grid; gap: 32px; }
@media (min-width: 980px) { .with-sidebar { grid-template-columns: minmax(0, 1fr) 300px; } }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar .panel { margin: 0; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Event cards */
.event-list { display: grid; gap: 12px; }
.event-card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; align-items: flex-start; transition: box-shadow .15s, border-color .15s; }
.event-card:hover { box-shadow: var(--shadow); border-color: #c9d3e2; }
.event-date { flex: none; width: 60px; text-align: center; border-radius: 12px; background: var(--navy); color: #fff; padding: 8px 0; line-height: 1.1; }
.ed-month { display: block; text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: #ffb08f; font-weight: 700; }
.ed-day { display: block; font-size: 1.6rem; font-weight: 800; }
.event-title { margin: .3em 0 .2em; font-size: 1.08rem; }
.event-title a { color: var(--navy); text-decoration: none; }
.event-title a:hover { color: var(--blue); }
.event-meta { color: var(--muted); font-size: .9rem; margin-bottom: .6em; }
.type-tournament .event-date { background: var(--accent); }
.type-tournament .ed-month { color: #fff3ec; }
.upcoming-list { list-style: none; padding: 0; margin: 0; }
.upcoming-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.upcoming-list a { font-weight: 650; text-decoration: none; }

/* Calendar */
.calendar-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cal-nav { display: flex; gap: 8px; align-items: center; }
.cal-title { margin: 0 8px; min-width: 9ch; text-align: center; font-size: 1.4rem; }
.calendar { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head div { background: var(--navy); color: #fff; text-align: center; font-size: .78rem; font-weight: 700; padding: 8px 2px; text-transform: uppercase; letter-spacing: .06em; }
.cal-cell { min-height: 64px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; font-size: .78rem; overflow: hidden; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: #f8f9fc; color: #9aa6b8; }
.cal-cell.today .cal-day { background: var(--accent); color: #fff; }
.cal-day { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; }
.cal-event { display: block; margin-top: 3px; padding: 2px 5px; border-radius: 5px; background: var(--blue-soft); color: var(--navy); text-decoration: none; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--blue); }
.cal-event:hover { background: #d6e4ff; }
.cal-event.type-tournament { background: #ffe9df; border-color: var(--accent); }
.cal-event.type-clinic { background: #e2f6e8; border-color: var(--green); }
.cal-event.type-social { background: #f4e6ff; border-color: #8a3ed6; }
.cal-event.type-other { background: #eef0f4; border-color: var(--muted); }
.cal-time { font-weight: 800; margin-right: 3px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 28px; font-size: .85rem; color: var(--muted); }
.legend-item::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--blue); }
.legend-item.type-tournament::before { background: var(--accent); }
.legend-item.type-clinic::before { background: var(--green); }
.legend-item.type-social::before { background: #8a3ed6; }
.legend-item.type-other::before { background: var(--muted); }
@media (max-width: 640px) {
  .cal-cell { min-height: 46px; padding: 2px; }
  .cal-event { font-size: 0; padding: 0; height: 6px; margin-top: 2px; border-left: 0; background: var(--blue); }
  .cal-event.type-tournament { background: var(--accent); }
  .cal-event.type-clinic { background: var(--green); }
  .cal-event.type-social { background: #8a3ed6; }
  .cal-event.type-other { background: var(--muted); }
  .cal-day { width: 22px; height: 22px; font-size: .75rem; }
}
@media (min-width: 900px) { .cal-cell { min-height: 108px; padding: 6px; } }

/* Tables & standings */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .94rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: #f0f3f8; color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 750; white-space: nowrap; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions > * { margin-left: 4px; }
.table .empty { text-align: center; padding: 24px; }
.table-note { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.rank { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: #edf0f5; font-weight: 800; font-size: .85rem; }
.rank-1 .rank, .rank.rank-1 { background: #ffd34d; color: #5a4300; }
.rank-2 .rank, .rank.rank-2 { background: #d7dde7; }
.rank-3 .rank, .rank.rank-3 { background: #f0c49b; color: #5a3410; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.winner-cell { font-weight: 750; color: var(--green); }
.is-inactive td { opacity: .55; }
@media (max-width: 560px) { .hide-sm { display: none; } .table th, .table td { padding: 8px; } }
.sort-link { color: inherit; text-decoration: none; }
.sort-link.active { color: var(--accent-dark); }
.leader-mini { list-style: none; margin: 0; padding: 0; }
.leader-mini li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lm-name { flex: 1; font-weight: 650; }
.lm-stat { color: var(--muted); font-size: .9rem; }

/* Match cards */
.match-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 16px; }
.match-card { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; transition: box-shadow .15s, border-color .15s; }
.match-card:hover { box-shadow: var(--shadow); border-color: #c4cfe0; color: inherit; }
.mp { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.mp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp.winner .mp-name { color: var(--green); font-weight: 800; }
.mp.winner .mp-name::after { content: " ✓"; }
.mp-games { display: flex; gap: 6px; font-variant-numeric: tabular-nums; }
.mp-games span { min-width: 26px; text-align: center; background: #f0f3f8; border-radius: 5px; font-weight: 700; font-size: .88rem; }
.mp.winner .mp-games span { background: #e2f6e8; }
.match-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--muted); }
.match-meta .badge { margin-left: auto; }
.round-label { margin: 18px 0 8px; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

/* Tournament page */
.presented-by { margin: -.2em 0 14px; color: #c8d6ee; font-size: .95rem; letter-spacing: .02em; }
.presented-by a, .presented-by strong { color: #ffb08f; font-weight: 700; }
.event-facts { list-style: none; padding: 0; margin: 0 0 20px; color: #dbe5f5; }
.event-facts li { margin: 4px 0; }
.event-facts strong { color: #fff; }
.event-head-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .has-image .event-head-inner { grid-template-columns: 1.3fr 1fr; } }
.event-image { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.division-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; position: sticky; top: 76px; z-index: 5; background: var(--bg); padding: 8px 0; }
.division-tabs a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 650; color: var(--navy); }
.division-tabs a:hover { border-color: var(--navy); }
.division-tabs .count { display: inline-block; margin-left: 4px; font-size: .75rem; background: var(--blue-soft); padding: 0 7px; border-radius: 999px; }
.division { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 24px; scroll-margin-top: 140px; }
.division-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.division-head h2 { margin: 0; }
.player-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.player-chips li { background: var(--blue-soft); padding: 4px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.steps { padding-left: 1.2em; margin: 0; }
.steps li { margin: .4em 0; }
.prose { max-width: 70ch; font-size: 1.05rem; }
.prose img { border-radius: var(--radius-sm); }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: .2em 1em; color: var(--muted); }

/* Forms */
.form .field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 650; font-size: .92rem; color: var(--navy); }
.optional { font-weight: 400; color: var(--muted); }
.help { color: var(--muted); font-size: .84rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #cdd5e1; border-radius: 10px; padding: .62em .8em; width: 100%; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; }
/* Contact form */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sponsor-pitch.is-highlighted { border: 2px solid var(--accent); }
.sponsor-pitch p { margin: 0 0 .6em; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 108, 255, .18); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); padding: 0; }
input[type="file"] { padding: .5em; }
input:disabled { background: #f2f4f8; color: var(--muted); }
.checkbox-field { justify-content: flex-end; }
.checkbox-field label { display: flex; gap: 8px; align-items: center; font-weight: 600; min-height: 44px; }
.form-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 4px; margin: 0 0 16px; }
.fieldset legend { padding: 0 6px; font-weight: 700; color: var(--navy); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; background: var(--card); padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); }
.filter-bar .field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 0 1 220px; margin: 0; }
.filter-bar .field.grow { flex: 1 1 220px; }
.filter-bar label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.w-sm { max-width: 130px; }
.w-xs { max-width: 80px; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-form input, .row-form select { width: auto; flex: 1 1 140px; min-height: 38px; padding: .4em .6em; }
.row-form input.w-sm { flex: 0 1 120px; }
.row-form input.w-xs { flex: 0 1 70px; }
.add-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* Auth */
.auth-wrap { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.auth-card-wide { max-width: 640px; }
.auth-alt { text-align: center; margin: 18px 0 0; color: var(--muted); }
.account-grid { display: grid; gap: 24px; }
@media (min-width: 980px) { .account-grid { grid-template-columns: minmax(0, 1fr) 340px; } }

/* Registration */
.division-picker { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.division-picker legend { font-weight: 700; margin-bottom: 10px; font-size: 1.05rem; color: var(--navy); }
.division-option { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.division-option:hover { border-color: #b9c6da; }
.division-option:has(input:checked) { border-color: var(--blue); background: #f4f8ff; }
.division-option.is-disabled { opacity: .6; cursor: not-allowed; }
.do-body { flex: 1; display: flex; flex-direction: column; }
.do-name { font-weight: 750; color: var(--navy); }
.do-desc, .do-count { font-size: .86rem; color: var(--muted); }

/* Match page */
.match-title { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.vs { color: var(--accent); font-size: .6em; text-transform: uppercase; vertical-align: middle; margin: 0 .3em; }
.scoreboard { background: var(--navy); color: #fff; border-radius: var(--radius); overflow: hidden; margin: 20px 0 12px; box-shadow: var(--shadow-lg); }
.sb-row { display: grid; grid-template-columns: 1fr repeat(3, 56px); align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-variant-numeric: tabular-nums; }
.sb-row > span:not(.sb-name) { text-align: center; font-size: 1.5rem; font-weight: 800; }
.sb-head { background: rgba(255, 255, 255, .06); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: #9fb3d4; padding: 8px 18px; }
.sb-row.sb-head > span { font-size: .75rem; font-weight: 700; }
.sb-row.sb-head > span:first-child { text-align: left; }
.sb-name { font-weight: 700; font-size: 1.05rem; }
.sb-row.winner { background: rgba(30, 138, 62, .25); }
.result-line { font-size: 1.05rem; }
.score-entry { margin-top: 24px; }
.score-grid { display: grid; grid-template-columns: minmax(90px, 1.3fr) repeat(3, minmax(60px, 1fr)); gap: 10px; align-items: center; margin-bottom: 16px; }
.score-grid input { text-align: center; font-size: 1.25rem; font-weight: 750; padding: .4em .2em; }
.sg-head { text-align: center; font-weight: 750; font-size: .9rem; color: var(--navy); line-height: 1.2; }
.sg-head small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.sg-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.score-grid input.is-dimmed { opacity: .45; }

/* Blog */
.post-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid #eef1f6; }
.post-card-media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy), var(--blue)); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; }
.post-card-placeholder .logo { width: 64px; height: 64px; opacity: .9; }
.post-card-body { padding: 16px 18px 20px; }
.post-card-body h3 { margin: .2em 0 .4em; }
.post-card-body h3 a { color: var(--navy); text-decoration: none; }
.post-card-body h3 a:hover { color: var(--blue); }
.post-card-body .muted { font-size: .92rem; margin: 0; }
.post-date { font-size: .8rem; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.post-header { margin-bottom: 20px; }
.post-hero { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 28px; }
.comments { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--line); }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comment { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); }
.comment-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; text-transform: uppercase; }
.comment-body { white-space: pre-line; margin-bottom: 6px; }
.comment-form { background: var(--card); padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); }

/* Sponsor slots ("promo", not "ad", so ad blockers leave them alone) */
.promo { text-align: center; margin: 16px auto; }
.promo img { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 6px; }
.promo a { display: inline-block; }
.promo-label { display: block; font-size: .68rem; color: #8b97aa; text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }
.promo-banner { padding-top: 4px; }
.promo-feature { margin-top: 28px; margin-bottom: 0; }
.promo-sidebar { margin: 0; }
.promo-inline { margin: 32px auto; }
.ad-preview { background: repeating-conic-gradient(#f0f2f6 0% 25%, #fff 0% 50%) 50% / 20px 20px; padding: 12px; border-radius: var(--radius-sm); overflow: auto; }
.ad-preview img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--accent), #ff8a3d); color: #fff; margin-top: 24px; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding-top: 36px; padding-bottom: 36px; }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; color: #fff3ec; }
.cta-band .btn-accent { background: var(--navy); }
.cta-band .btn-accent:hover { background: var(--navy-2); }

/* Rules page */
.rules-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.rules-toc a { padding: 6px 14px; background: #fff; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: .9rem; color: var(--navy); }
.rules-toc a:hover { border-color: var(--navy); }
.rule-block { display: grid; gap: 24px; align-items: start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 28px; scroll-margin-top: 90px; }
@media (min-width: 900px) {
  .rule-block { grid-template-columns: 1.1fr 1fr; padding: 32px; }
  .rule-block:nth-of-type(even) .rule-figure { order: -1; }
}
.rule-block-highlight { border: 2px solid var(--accent); }
.rule-text ul, .rule-text ol { padding-left: 1.2em; }
.rule-text li { margin: .4em 0; }
.step-num { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-size: 1rem; margin-right: 8px; vertical-align: 3px; }
.rule-figure { margin: 0; background: #f8fafd; border-radius: var(--radius-sm); padding: 16px; border: 1px solid var(--line); }
.rule-figure svg { width: 100%; height: auto; display: block; max-height: 460px; }
.rule-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; text-align: center; }
.svg-label { font: 800 11px var(--font); fill: var(--navy); letter-spacing: .1em; }
.svg-small { font: 600 11px var(--font); fill: var(--navy); }
.svg-on-dark { font: 800 13px var(--font); fill: #fff; }
.svg-on-dark-sm { font: 600 11px var(--font); fill: #dbe5f5; }

/* Footer */
.site-footer { background: var(--navy); color: #b6c4dc; margin-top: 40px; }
.cta-band + .site-footer, .promo + .site-footer { margin-top: 0; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.brand-footer { margin-bottom: 12px; }
.footer-title { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 6px 0; }
.footer-links a { color: #dbe5f5; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: #93a5c4; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 16px; padding-bottom: 24px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* Admin */
.page-admin { background: #eef2f8; }
.admin-shell { display: grid; max-width: 1400px; margin: 0 auto; width: 100%; }
.admin-nav { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.admin-nav-title { display: none; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; font-size: .92rem; }
.admin-nav a:hover { background: var(--blue-soft); }
.admin-nav a.active { background: var(--navy); color: #fff; }
.admin-nav-site { display: none !important; }
.admin-main { padding: 24px 16px 48px; min-width: 0; }
@media (min-width: 1000px) {
  .admin-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .admin-nav { border-bottom: 0; border-right: 1px solid var(--line); padding: 24px 14px; min-height: calc(100vh - 68px); position: sticky; top: 68px; align-self: start; }
  .admin-nav-title { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: var(--muted); margin: 0 12px 12px; }
  .admin-nav ul { flex-direction: column; overflow: visible; }
  .admin-nav-site { display: block !important; margin-top: 20px; color: var(--muted) !important; }
  .admin-main { padding: 32px 36px 60px; }
}
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.admin-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.admin-head p { margin: 4px 0 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid #e8edf4; transition: transform .12s, box-shadow .12s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.stat-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.activity .muted { font-size: .86rem; }
.workflow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .workflow-steps { grid-template-columns: repeat(3, 1fr); } }
.workflow-steps li { border: 2px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.workflow-steps li span { font-size: .9rem; color: var(--muted); }
.workflow-steps li.current { border-color: var(--accent); background: #fff7f3; }
.workflow-steps li.done { border-color: #bfe3ca; background: #f4fbf6; }
.workflow-steps li.done strong::after { content: " ✓"; color: var(--green); }
.danger-zone { border: 1px solid #f3c2ca; }
.danger-zone h2 { color: var(--red); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.active { color: var(--navy); border-color: var(--accent); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.admin-comments { list-style: none; padding: 0; margin: 0; }
.admin-comments .is-editing { border: 2px solid var(--blue); }
.admin-messages .is-new { border-left: 4px solid var(--accent); }
.admin-messages .comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.message-body { overflow-wrap: anywhere; }
.nav-count { display: inline-block; min-width: 1.5em; margin-left: 6px; padding: 0 .45em; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; text-align: center; line-height: 1.5; }
.ad-admin-list { display: grid; gap: 12px; }
.ad-admin { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ad-admin.is-off { opacity: .6; }
.ad-admin .actions { grid-column: 1 / -1; display: flex; gap: 6px; }
@media (min-width: 700px) { .ad-admin { grid-template-columns: 160px 1fr auto; } .ad-admin .actions { grid-column: auto; } }
.ad-thumb { background: #f0f2f6; border-radius: 8px; display: flex; align-items: center; justify-content: center; height: 90px; overflow: hidden; }
.ad-thumb img { max-height: 90px; width: auto; }
.ad-info h3 { margin: 0 0 4px; }
.ad-info p { margin: 0 0 6px; }

/* Ad performance, pricing guide and sponsor report */
.ad-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 12px; }
.ad-stats .stat-num { font-size: 1.5rem; }
.ad-report-totals .stat:hover { transform: none; box-shadow: var(--shadow); }
.price-list { margin: 0 0 16px; display: grid; gap: 6px; }
.price-list > div { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.price-list > div.is-current { border-color: var(--blue); background: var(--blue-soft); }
.price-list dt { font-weight: 700; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.price-list .price { color: var(--accent); white-space: nowrap; }
.price-list dd { margin: 4px 0 0; font-size: .86rem; color: var(--muted); }
.daily-table .bar-col { width: 45%; }
.daily-table .bar { display: block; height: 10px; min-width: 2px; border-radius: 5px; background: var(--blue); }

@media print {
  .site-header, .site-footer, .promo, .admin-nav, .nav-toggle, .no-print, .flash-stack { display: none !important; }
  body { background: #fff; }
  .admin-shell { display: block; }
  .admin-main { padding: 0; }
  .panel, .stat { box-shadow: none; break-inside: avoid; }
  .daily-table .bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
