:root {
  --navy: #0b2b4b;
  --navy-2: #154d78;
  --teal: #1c7180;
  --gold: #f0b429;
  --ink: #13202c;
  --muted: #5d6b78;
  --line: #d6dee5;
  --surface: #ffffff;
  --page: #eef3f7;
  --danger: #b42318;
  --success: #1d7a46;
  --shadow: 0 14px 40px rgba(9, 34, 58, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: linear-gradient(145deg, #e8f0f6 0%, #f8fafc 48%, #e8f0f6 100%); min-height: 100vh; }
button, select { font: inherit; }
button { cursor: pointer; min-height: 44px; }
select { min-height: 44px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; background: #fff; color: var(--navy); padding: .7rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; }
.masthead { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.25rem; }
.brand-mark { width: 74px; height: 74px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 18px; color: #fff; background: var(--navy); font-weight: 900; letter-spacing: .08em; box-shadow: var(--shadow); border-bottom: 6px solid var(--gold); }
.eyebrow { margin: 0 0 .15rem; color: var(--teal); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; }
h1 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; }
.lede { margin: .45rem 0 0; color: var(--muted); max-width: 68ch; }
.selector-panel { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.field { display: grid; gap: .35rem; min-width: min(420px, 100%); }
label { font-weight: 800; color: var(--navy); }
select { width: 100%; padding: .72rem 2.5rem .72rem .8rem; border-radius: .55rem; border: 1px solid #9db0c1; background: #fff; color: var(--ink); }
select:focus, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(240,180,41,.65); outline-offset: 2px; }
.availability { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.status-dot { width: .72rem; height: .72rem; border-radius: 999px; background: #8795a1; box-shadow: 0 0 0 4px rgba(135,149,161,.16); }
.status-dot.checking { background: var(--gold); box-shadow: 0 0 0 4px rgba(240,180,41,.2); animation: pulse 1.1s infinite; }
.status-dot.live { background: var(--success); box-shadow: 0 0 0 4px rgba(29,122,70,.18); }
.status-dot.error { background: var(--danger); box-shadow: 0 0 0 4px rgba(180,35,24,.16); }
@keyframes pulse { 50% { opacity: .45; } }
.player-card { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; overflow: hidden; box-shadow: var(--shadow); }
.video-wrap { position: relative; background: #06101a; aspect-ratio: 16/9; display: grid; place-items: center; }
video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.player-message { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 1.5rem; color: #fff; background: radial-gradient(circle at 50% 35%, rgba(28,113,128,.35), rgba(6,16,26,.96) 66%); }
.player-message.hidden { display: none; }
.player-message h2 { margin: 1rem 0 .35rem; font-size: clamp(1.45rem, 3vw, 2.25rem); }
.player-message p { margin: 0 0 1.15rem; color: #dbe8f2; max-width: 55ch; }
.broadcast-icon { display: flex; align-items: end; gap: .35rem; height: 42px; }
.broadcast-icon span { width: 8px; border-radius: 999px; background: var(--gold); animation: bars 1.2s ease-in-out infinite; }
.broadcast-icon span:nth-child(1) { height: 18px; }
.broadcast-icon span:nth-child(2) { height: 38px; animation-delay: .15s; }
.broadcast-icon span:nth-child(3) { height: 27px; animation-delay: .3s; }
@keyframes bars { 50% { transform: scaleY(.55); opacity: .72; } }
.primary-button { border: 0; border-radius: .55rem; padding: .78rem 1.25rem; color: #102031; background: var(--gold); font-weight: 900; }
.toolbar { display: flex; flex-wrap: wrap; gap: .55rem; padding: .75rem; background: #f8fafc; border-top: 1px solid var(--line); }
.toolbar button { border: 1px solid #aab9c6; border-radius: .5rem; padding: .55rem .85rem; color: var(--navy); background: #fff; font-weight: 750; }
.toolbar button:hover { background: #eaf2f8; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.info-card { padding: 1.1rem 1.2rem; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 14px; }
.info-card h2 { margin: 0 0 .5rem; color: var(--navy); }
.info-card p, .info-card li { color: #435362; line-height: 1.5; }
dl { margin: 1rem 0 0; display: grid; gap: .45rem; }
dl div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .45rem; border-top: 1px solid var(--line); }
dt { font-weight: 800; } dd { margin: 0; text-align: right; color: var(--muted); }
.help-card ol { padding-left: 1.25rem; margin-bottom: .8rem; }
details { border-top: 1px solid var(--line); padding-top: .75rem; }
summary { color: var(--navy); font-weight: 800; cursor: pointer; }
#diagnostic-text { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86rem; }
footer { color: var(--muted); text-align: center; font-size: .88rem; padding-top: 1rem; }
body.compact .info-grid,
body.compact footer { display: none; }
body.compact .shell { padding-bottom: .75rem; }
body.single-school .field { display: none; }
body.single-school .selector-panel { justify-content: flex-end; align-items: center; }
@media (max-width: 720px) {
  .shell { width: min(100% - 1rem, 1180px); padding-top: 1rem; }
  .brand-mark { width: 58px; height: 58px; border-radius: 14px; font-size: .8rem; }
  .selector-panel { align-items: stretch; flex-direction: column; }
  .field { min-width: 0; }
  .availability { white-space: normal; }
  .info-grid { grid-template-columns: 1fr; }
  dl div { display: grid; gap: .2rem; }
  dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
