/* COPYRIGHT (C) 2015-2026 Julie H. King. All Rights Reserved. */
:root {
  color-scheme: light dark;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #e9eefa;
  --text: #16213d;
  --muted: #5a6685;
  --line: #d6deef;
  --brand: #1a3fc4;
  --brand-dark: #10215f;
  --on-brand: #ffffff;
  --accent: #ff0000;
  --gold: #fbe7a6;
  --silver: #e4e8f0;
  --bronze: #f3d6bd;
  --on-medal: #2a2000;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 33, 95, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1426;
    --surface: #182138;
    --surface-2: #232e4c;
    --text: #e8edf9;
    --muted: #a3afcb;
    --line: #33405f;
    --brand: #8aa5ff;
    --on-brand: #0e1426;
    --accent: #ff4d4d;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.2; margin: 0 0 .25rem; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 24px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 20; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* header and footer */
.site-header { background: #10215f; color: #fff; border-bottom: 4px solid var(--accent); }
.page > h1::after { content: ""; display: block; width: 72px; height: 4px; background: var(--accent); border-radius: 2px; margin: 8px 0 10px; }
.site-header-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 104px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 700; font-size: 1.75rem; text-decoration: none; }
.brand img { height: 88px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current] { background: rgba(255, 255, 255, .16); }
.site-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); }
.site-nav .nav-cta { background: #fff; color: #10215f; font-weight: 600; }
.site-nav .nav-cta:hover { background: #dfe6fb; }
.nav-toggle { display: none; margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); border-radius: 6px; padding: 8px 14px; font: inherit; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 20px 0; }
.site-footer p { margin: 4px 0; }
@media (max-width: 860px) {
  .site-header-row { min-height: 80px; }
  .brand { font-size: 1.4rem; }
  .brand img { height: 64px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .site-nav.open { display: flex; }
}

/* controls */
input[type=search], select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
input[type=search] { width: 100%; }
.btn { display: inline-block; font: inherit; font-weight: 600; background: var(--brand); color: var(--on-brand); border: 0; border-radius: 8px; padding: 10px 16px; text-decoration: none; cursor: pointer; }
.toolbar { display: grid; gap: 12px; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 16px 0; box-shadow: var(--shadow); }
.toolbar-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-label { font-size: .85rem; color: var(--muted); min-width: 58px; }
.chip { font: inherit; font-size: .9rem; background: var(--surface-2); color: var(--text); border: 1px solid transparent; border-radius: 999px; padding: 5px 12px; min-height: 34px; cursor: pointer; text-decoration: none; }
.chip[aria-pressed=true], .chip[aria-current] { background: #e00000; color: #fff; }

/* hub */
.live-strip { margin: 20px 0; }
.page > h2, .live-strip > h2 { border-left: 5px solid var(--accent); padding-left: 10px; }
.live-strip .card { border-top: 3px solid var(--accent); }
.card[data-teams] { border-left: 3px solid var(--accent); }
.card-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: block; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; box-shadow: var(--shadow); }
a.card:hover { border-color: var(--accent); }
.card h3 { font-size: 1.02rem; margin: 0 0 4px; line-height: 1.3; }
.card p { margin: 2px 0; font-size: .88rem; color: var(--muted); }
.card .match { color: var(--brand); font-weight: 600; }
.badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.badge { font-size: .75rem; background: var(--surface-2); border-radius: 4px; padding: 2px 7px; }
.live-dot { display: inline-block; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; margin-right: 6px; }
details.season { margin: 12px 0; }
details.season > summary { cursor: pointer; font-size: 1.15rem; font-weight: 700; padding: 8px 0; }
details.season > summary::marker { color: var(--accent); }
details.season > summary span { font-weight: 400; font-size: .9rem; color: var(--muted); margin-left: 8px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* public pages */
.section { margin-top: 32px; }
.center { text-align: center; }
.prose { max-width: 820px; }
.lead { font-size: 1.15rem; font-weight: 600; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card h2 { font-size: 1.1rem; margin-bottom: 6px; }
.card-grid.two .card p, .card-grid.three .card p, .story p { font-size: .95rem; }
.hero { background: linear-gradient(135deg, #10215f, #1a3fc4); color: #fff; padding: 32px 0; }
.hero-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .935rem; font-weight: 600; margin: 0 0 8px; color: #cdd9ff; }
.hero-img { height: 344px; aspect-ratio: 6 / 5; max-width: 100%; justify-self: end; object-fit: cover; object-position: top; border-radius: var(--radius); display: block; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
.btn-light { background: #fff; color: #10215f; }
.btn-red { background: #e00000; color: #fff; }
.service, .price, blockquote.card { border-top: 3px solid var(--accent); }
.service h2 { color: var(--brand); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ticks { padding-left: 20px; margin: 0; }
.ticks li { margin: 6px 0; }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); grid-auto-flow: dense; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.photo-grid img.wide { grid-column: span 2; aspect-ratio: auto; height: 0; min-height: 100%; object-position: center 75%; }
.photo-grid img.fit { object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 560px) {
  .photo-grid img.wide { grid-column: auto; aspect-ratio: 4 / 3; height: auto; min-height: 0; }
}
blockquote.card { margin: 0; font-size: .98rem; }
blockquote cite { display: block; margin-top: 8px; font-style: normal; font-size: .85rem; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.contact-band { background: #10215f; color: #fff; border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.contact-band a { color: #ffe08a; }
.contact-band p { margin-bottom: 0; }
.price dl { margin: 10px 0; }
.price dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.price dd { margin: 0; font-weight: 700; color: var(--brand); white-space: nowrap; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin: 10px 0; }
details.faq > summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.form .btn { justify-self: start; }
.admin-list { display: grid; gap: 14px; }
.admin-list h2 { margin-top: 0; }
.legend { color: var(--muted); font-size: .88rem; margin-top: 12px; }
.legend h2 { font-size: .88rem; margin: 0 0 2px; }
.legend ul { list-style: none; margin: 0; padding: 0; }
.legend li { margin: 2px 0; }
.sched { display: grid; gap: 8px; }
.sched-row { display: flex; align-items: center; gap: 16px; }
.sched-date { min-width: 64px; text-align: center; }
.sched-date span { display: block; font-size: .8rem; color: var(--muted); }
.sched-info { flex: 1; min-width: 0; }
.sched-info h3 { margin: 0; }
.sched .badge { font-size: 1rem; font-weight: 600; padding: 6px 14px; border-radius: 6px; white-space: nowrap; min-width: 148px; text-align: center; }
.badge-cloud { background: var(--brand); color: var(--on-brand); }
.sched .badge:not(.badge-cloud) { box-shadow: inset 0 3px 0 var(--accent); } /* In Person; a shadow keeps it the same height as Cloud */
.gallery { display: grid; gap: 16px; }
.story { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 20px; align-items: start; }
.story img { width: 100%; border-radius: 8px; display: block; }
.story-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.story p { color: var(--text); }
@media (max-width: 720px) {
  .hero-row, .split, .story { grid-template-columns: 1fr; }
  .hero-img { width: 100%; height: auto; justify-self: stretch; }
  .sched-row { flex-wrap: wrap; }
}

/* results tables */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 16px; }
.tab { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 16px; cursor: pointer; }
.tab[aria-selected=true] { color: var(--brand); border-bottom-color: var(--accent); }
.table-wrap { overflow: auto; max-height: 82vh; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.scores { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .93rem; }
table.scores th, table.scores td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--surface); }
table.scores .name { text-align: left; white-space: normal; min-width: 150px; position: sticky; left: 0; z-index: 1; }
table.scores thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
table.scores thead th.name { z-index: 3; background: var(--surface-2); }
table.scores th button { all: unset; cursor: pointer; font-weight: 700; }
table.scores th button:focus-visible { outline: 2px solid var(--brand); }
table.scores th[aria-sort=descending] button::after { content: " \25BC"; font-size: .7em; }
table.scores th[aria-sort=ascending] button::after { content: " \25B2"; font-size: .7em; }
table.scores .group th { text-align: left; background: var(--brand-dark); color: #fff; font-weight: 600; position: sticky; left: 0; border-left: 4px solid var(--accent); }
table.scores .team { display: block; font-size: .82rem; color: var(--muted); }
table.scores .pl { display: inline-block; min-width: 22px; margin-left: 6px; padding: 0 4px; border-radius: 4px; font-size: .78rem; text-align: center; color: var(--muted); }
table.scores .pl1 { background: var(--gold); color: var(--on-medal); font-weight: 700; }
table.scores .pl2 { background: var(--silver); color: var(--on-medal); font-weight: 700; }
table.scores .pl3 { background: var(--bronze); color: var(--on-medal); font-weight: 700; }
table.scores .aa { font-weight: 700; }
table.scores .scored { background: var(--surface-2); }
tbody[hidden], tr[hidden], [hidden] { display: none !important; }
@media (max-width: 640px) {
  table.scores { font-size: .85rem; }
  table.scores th, table.scores td { padding: 6px; }
  table.scores .name { min-width: 118px; max-width: 136px; }
}
@media print {
  .site-header, .site-footer, .toolbar, .tabs, .no-print { display: none !important; }
  body, table.scores th, table.scores td { background: #fff !important; color: #000; }
  .table-wrap { overflow: visible; max-height: none; border: 0; }
  table.scores .group th { background: #eee !important; color: #000; }
  table.scores thead th, table.scores .name, table.scores .group th { position: static; }
}
