
/* Layout: one-screen broadcast. LED scoreboard + drive tracker on top, the field fills the rest,
   question graphic pinned to the top of the field, play-call bar built into the bottom of it.
   A deliberate single night-game look. */
:root {
  --night: #0b1014;
  --panel: #121a20;
  --led-bg: #05080a;
  --line: #22303a;
  --chalk: #eef2e6;
  --muted: #8fa197;
  --led: #ffb627;
  --flag: #ff5a4e;
  --turf: #2f7d3a;
  --board: #1b2b24;
  --t-checkdown: #a9b8ae;
  --t-trick: #ff9f43;
  --t-slant: #4fe0a0;
  --t-seam: #4dc3ff;
  --t-bomb: #b892ff;
  --t-hail: #ffd166;
  --t-miss: #ff5a4e;
  --f-display: "Press Start 2P", ui-monospace, "Courier New", monospace;
  --f-body: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; background: var(--night); color: var(--chalk); }
body { margin: 0; font-family: var(--f-body); font-size: 17px; line-height: 1.4; overflow: hidden; }
.app { height: 100%; max-width: 1280px; margin: 0 auto; padding-inline: 16px; padding-block: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- scoreboard ---------- */
.hud { display: flex; flex-wrap: wrap; gap: 2px; background: var(--line); border: 2px solid var(--line); flex: 0 0 auto; }
.hud > * { background: var(--led-bg); }
.brand { font-family: var(--f-display); font-size: 12px; color: var(--led); padding: 10px 12px; display: flex; align-items: center; gap: 8px; letter-spacing: .06em; }
.brand i { width: 14px; height: 9px; background: #8a4a22; border-radius: 50%; box-shadow: inset 0 0 0 2px #2b1406; position: relative; flex: 0 0 auto; }
.brand i::after { content: ""; position: absolute; left: 4px; top: 3px; width: 6px; height: 1px; background: var(--chalk); }
.stat { flex: 0 1 auto; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.lbl { font-family: var(--f-display); font-size: 7px; color: var(--muted); letter-spacing: .1em; white-space: nowrap; }
.val { font-family: var(--f-display); font-size: 12px; color: var(--led); font-variant-numeric: tabular-nums; text-shadow: 0 0 6px rgba(255, 182, 39, .45); white-space: nowrap; }
.val.big { font-size: 15px; }
.drivecell { flex: 1 1 240px; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.tracker { position: relative; height: 18px; background: var(--turf); border: 1px solid #0f2a17; overflow: hidden; }
.tracker::before { content: ""; position: absolute; left: 8.333%; right: 8.333%; top: 0; bottom: 0;
  background: repeating-linear-gradient(90deg, rgba(238,242,230,.55) 0 1px, transparent 1px 10%); }
.tk-ez { position: absolute; top: 0; bottom: 0; width: 8.333%; }
.tk-ez.l { left: 0; background: #14555f; }
.tk-ez.r { right: 0; background: #7a2a28; }
.tk-seg { position: absolute; top: 6px; height: 5px; }
.tk-ball { position: absolute; top: 3px; width: 11px; height: 11px; margin-left: -5px; background: #8a4a22; border: 2px solid var(--led-bg); border-radius: 50%; transition: left .6s ease; box-shadow: 0 0 0 1px var(--led); }
.pb-btn { font-family: var(--f-display); font-size: 9px; letter-spacing: .08em; color: var(--led); background: var(--led-bg); border: 0; padding: 0 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 40px; }
.pb-btn:hover { background: #0e151a; }
.pb-btn svg { width: 16px; height: 16px; }

/* ---------- stage ---------- */
.stage { position: relative; flex: 1 1 auto; min-height: 0; border: 2px solid var(--line); background: var(--led-bg); overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }

.qbanner { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.qtag { font-family: var(--f-display); font-size: 8px; letter-spacing: .08em; background: var(--turf); color: var(--chalk); padding: 7px 10px; }
.qtag.special { background: var(--led); color: var(--led-bg); }
.qbox { background: rgba(5, 8, 10, .86); border: 2px solid var(--line); border-top-color: var(--turf); padding: 10px 14px; max-width: 760px; }
.qbox h2 { margin: 0; font-size: clamp(19px, 2.6vw, 30px); font-weight: 700; line-height: 1.15; text-wrap: balance; }
.qbox p { margin: 4px 0 0; color: var(--led); font-weight: 600; font-size: 16px; }

.callbar { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(5, 8, 10, .9); border: 2px solid var(--line); display: flex; flex-direction: column; transition: border-color .15s; }
.callbar.live { border-color: var(--led); }
.callbar.bad { border-color: var(--flag); }
.suggest { position: absolute; left: -2px; width: min(560px, calc(100% + 4px)); box-sizing: border-box; bottom: 100%; margin: 0 0 6px; padding: 0; list-style: none; background: rgba(5, 8, 10, .96); border: 2px solid var(--line); z-index: 3; }
.suggest li { padding: 10px 14px; min-height: 42px; box-sizing: border-box; font: 700 17px/1.3 var(--f-body); color: var(--chalk); cursor: pointer; border-top: 1px solid #16212a; }
.suggest li:first-child { border-top: 0; }
.suggest li:hover, .suggest li.on { background: var(--led); color: var(--led-bg); }
@media (max-width: 460px) { .suggest li:nth-child(n+5) { display: none; } }
.hintline { margin: 0; padding: 8px 14px 0; font: 700 15px/1.3 var(--f-body); color: var(--t-slant); letter-spacing: .03em; }
.hintline .mask { font: 12px/1.6 var(--f-display); letter-spacing: .18em; color: var(--chalk); margin: 0 4px; white-space: nowrap; }
button.hintbtn { padding: 13px 12px; }
.clocktrack { height: 6px; background: #1a232a; }
.clockfill { height: 100%; width: 100%; background: var(--led); transform-origin: left center; }
.clockfill.hot { background: var(--flag); }
.say { margin: 0; padding: 8px 14px 0; font-weight: 600; font-size: 15px; color: var(--muted); }
.say:empty { display: none; }
.say.bad { color: var(--flag); }
.say.fix { color: var(--led); }
.callrow { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; }
.clocknum { font-family: var(--f-display); font-size: 16px; color: var(--led); min-width: 2.4ch; font-variant-numeric: tabular-nums; }
.clocknum.hot { color: var(--flag); }
.calllbl { font-family: var(--f-display); font-size: 8px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
#answer { flex: 1 1 auto; min-width: 0; font: 700 clamp(19px, 2.4vw, 26px)/1.2 var(--f-body); color: var(--chalk); background: transparent; border: 0; padding: 6px 4px; border-radius: 0; }
#answer::placeholder { color: #5f6f67; }
#answer:focus { outline: none; }
#answer:disabled { opacity: .7; }
button { font-family: var(--f-display); font-size: 10px; letter-spacing: .06em; background: var(--led); color: var(--led-bg); border: 0; padding: 13px 16px; cursor: pointer; border-radius: 0; }
button:hover { filter: brightness(1.08); }
button:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
button:disabled { opacity: .4; cursor: default; filter: none; }
button.ghost { background: transparent; color: var(--led); box-shadow: inset 0 0 0 2px var(--led); }
.shake { animation: shake .3s linear; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

.resultbar { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(5, 8, 10, .92); border: 2px solid var(--line); display: flex; align-items: stretch; }
.rsw { flex: 0 0 auto; width: 76px; display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-size: 12px; color: var(--led-bg); }
.rtext { flex: 1 1 auto; min-width: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.rtext h3 { margin: 0; font-family: var(--f-display); font-size: clamp(13px, 1.8vw, 18px); line-height: 1.35; }
.rtext p { margin: 0; }
.rtext .sub { color: var(--muted); font-size: 15px; }
.rtext .pts { font-family: var(--f-display); font-size: 9px; color: var(--led); letter-spacing: .06em; }
.rgo { flex: 0 0 auto; display: flex; align-items: center; padding: 10px; }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 10, .55); }
.card { width: 100%; max-width: 580px; max-height: 100%; overflow: auto; background: var(--panel); border: 2px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.logo { margin: 0; font-family: var(--f-display); font-size: clamp(24px, 5vw, 40px); color: var(--led); line-height: 1.1; text-shadow: 0 0 12px rgba(255, 182, 39, .35), 3px 3px 0 #5a3a00; }
.card p { margin: 0; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps b { font-family: var(--f-display); font-size: 9px; color: var(--led-bg); background: var(--led); height: 22px; display: grid; place-items: center; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.chase { font-family: var(--f-display); font-size: 9px; color: var(--muted); letter-spacing: .06em; line-height: 1.6; }
.chase b { color: var(--t-hail); font-weight: 400; }

.final h2 { margin: 0; font-family: var(--f-display); font-size: clamp(18px, 3.4vw, 26px); color: var(--led); line-height: 1.3; }
.scorebig { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.scorebig strong { font-family: var(--f-display); font-size: clamp(34px, 7vw, 56px); color: var(--t-hail); text-shadow: 0 0 14px rgba(255, 209, 102, .35), 3px 3px 0 #5a3a00; font-weight: 400; line-height: 1; }
.scorebig span { font-family: var(--f-display); font-size: 11px; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 2px; background: var(--line); border: 2px solid var(--line); }
.stats .stat { flex: 1 1 100px; background: var(--led-bg); }
.stats .val { font-size: 13px; }
.verdict { font-size: 19px; font-weight: 600; }
.msg { margin: 0; min-height: 1.2em; font-weight: 600; color: var(--muted); }
.final .card, .card.final { max-width: 680px; }
.chart { border: 2px solid var(--line); background: var(--led-bg); line-height: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.answers { display: flex; flex-direction: column; gap: 8px; }
.answers h3 { margin: 0; }
.qa { background: var(--led-bg); border: 2px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 14px; gap: 10px; align-items: center; padding: 10px 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:focus-visible { outline: 3px solid var(--chalk); outline-offset: -3px; }
.qa .pl { font-family: var(--f-display); font-size: 8px; color: var(--muted); }
.qa .qt { font-size: 15px; line-height: 1.25; min-width: 0; }
.qa .mine { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.qa .car { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -4px; transition: transform .15s; }
.qa[open] .car { transform: rotate(-135deg); margin-top: 4px; }
.qa .tiers { border-top: 2px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.trow { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: start; }
.trow .tn { font-family: var(--f-display); font-size: 7px; letter-spacing: .06em; padding-top: 5px; }
.names { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.nm { font-size: 14px; padding: 2px 7px; background: #111a20; color: var(--chalk); border: 1px solid var(--line); }
.nm.you { border: 2px solid currentColor; font-weight: 700; }
.nm.gem { color: var(--t-hail); font-weight: 700; }
.tag { font-family: var(--f-display); font-size: 7px; padding: 4px 6px; color: var(--led-bg); }
@media (max-width: 520px) {
  .qa summary { grid-template-columns: 36px minmax(0, 1fr) 14px; }
  .qa .mine { grid-column: 2; grid-row: 2; }
  .qa .car { grid-column: 3; grid-row: 1; }
  .trow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
[data-t="checkdown"] { background: var(--t-checkdown); }
[data-t="trick"] { background: var(--t-trick); }
[data-t="slant"] { background: var(--t-slant); }
[data-t="seam"] { background: var(--t-seam); }
[data-t="bomb"] { background: var(--t-bomb); }
[data-t="hail"] { background: var(--t-hail); }
[data-t="miss"] { background: var(--t-miss); }

/* ---------- playbook ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .66); }
.book { width: 100%; max-width: 920px; max-height: 100%; overflow: auto; background: var(--panel); border: 2px solid var(--line); }
.bookhead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--panel); border-bottom: 2px solid var(--line); }
.bookhead h2 { margin: 0; font-family: var(--f-display); font-size: 14px; color: var(--led); }
.bookbody { padding: 16px; display: flex; flex-direction: column; gap: 22px; }
.bookbody > p { margin: 0; color: var(--muted); }
.sect { display: flex; flex-direction: column; gap: 12px; }
.sect h3 { margin: 0; font-family: var(--f-display); font-size: 9px; letter-spacing: .1em; color: var(--muted); }
.plays { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.play { background: var(--led-bg); border: 2px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.play svg { display: block; width: 100%; height: auto; background: var(--board); }
.play .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.play .name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.play .name b { font-family: var(--f-display); font-size: 10px; }
.play .name span { font-family: var(--f-display); font-size: 8px; color: var(--chalk); white-space: nowrap; }
.play p { margin: 0; font-size: 15px; color: var(--muted); }
.kicks { background: var(--led-bg); border: 2px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.krow { display: grid; grid-template-columns: 96px 1fr 52px; gap: 10px; align-items: center; }
.krow .kn { font-weight: 600; font-size: 15px; }
.kbar { position: relative; height: 12px; background: #16201a; }
.kbar i { position: absolute; left: 0; top: 0; bottom: 0; }
.kbar::after { content: ""; position: absolute; right: 0; top: -3px; bottom: -3px; width: 2px; background: #f5d142; }
.krow .kv { font-family: var(--f-display); font-size: 9px; text-align: right; }
.kaxis { display: grid; grid-template-columns: 96px 1fr 52px; gap: 10px; }
.kaxis div { display: flex; justify-content: space-between; font-family: var(--f-display); font-size: 7px; color: var(--muted); }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.note { background: var(--led-bg); border: 2px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.note b { font-family: var(--f-display); font-size: 8px; color: var(--led); letter-spacing: .06em; }
.note p { margin: 0; font-size: 15px; }
.scoretable { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--led-bg); border: 2px solid var(--line); }
.scoretable td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.scoretable td:last-child { text-align: right; font-family: var(--f-display); font-size: 9px; color: var(--led); white-space: nowrap; }
.scoretable tr:last-child td { border-bottom: 0; }

@media (max-width: 760px) {
  .app { padding-inline: 10px; padding-block: 8px; gap: 8px; }
  .brand { font-size: 10px; padding: 8px 10px; }
  .stat { padding: 6px 10px; }
  .drivecell { order: 9; flex-basis: 100%; }
  .pb-btn { flex: 1 1 auto; justify-content: center; }
  .plays { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calllbl { display: none; }
  .rsw { width: 54px; font-size: 10px; }
  .qbox h2 { font-size: 19px; }
}
@media (max-width: 460px) {
  .plays, .notes { grid-template-columns: minmax(0, 1fr); }
  .callrow { padding-left: 10px; gap: 6px; }
  .stage .qbanner { top: 8px; left: 8px; right: 8px; }
  .callbar, .resultbar { left: 8px; right: 8px; bottom: 8px; }
  .rgo button { padding: 12px 10px; }
}
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } .tk-ball { transition: none; } }

/* Production layout and accessible controls. Rails occupy their own grid columns. */
html,body { min-height: 100%; } body { height:100dvh; }
.page-grid { height:100%; display:grid; grid-template-columns:minmax(0,1280px); justify-content:center; }
.app { width:100%; min-width:0; } .brand { flex-wrap:wrap; } #edition { font-size:8px; color:var(--muted); }
.logo { font-size:clamp(18px,4.1vw,34px); overflow-wrap:anywhere; } .tagline { color:var(--led); font-size:21px; }
.site-footer { color:var(--muted); font-size:14px; border-top:1px solid var(--line); padding-top:14px; display:grid; gap:6px; }
.privacy-choices { display:block; flex-shrink:0; margin:0 auto; padding:3px 8px; background:transparent; color:var(--led); text-decoration:underline; font-family:var(--f-body); font-size:14px; }
a { color:var(--led); text-underline-offset:3px; } .site-footer small { font-size:12px; }
.personal-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.personal-stats div { padding:8px; background:var(--led-bg); font-size:12px; color:var(--muted); }
.personal-stats strong { display:block; color:var(--chalk); font-size:19px; }
.countdown { color:var(--led); font-variant-numeric:tabular-nums; }
.ad-slot { text-align:center; color:var(--muted); font-size:11px; }
.ad-slot>span { display:block; margin-bottom:6px; } .ad-rail { display:none; position:sticky; top:24px; height:626px; margin-top:24px; width:160px; }
.ads-off .ad-slot,.ad-slot[data-unconfigured] { display:none!important; }
.end-ad { min-height:126px; width:100%; margin:32px 0; flex-shrink:0; }
@media(min-width:1500px) { body:not(.ads-off) .page-grid { grid-template-columns:160px minmax(0,1280px) 160px; column-gap:32px; padding:0 24px; } .ad-rail { display:block; } }
@media(min-width:1800px) { body:not(.ads-off) .page-grid { grid-template-columns:300px minmax(0,1280px) 300px; } .ad-rail { width:300px; } }
@media(max-width:520px) { .card { padding:14px; gap:12px; } .overlay { padding:8px; } .hud .brand { flex-basis:100%; justify-content:center; } .stat { padding:6px 8px; } .lbl { font-size:6px; } .val.big { font-size:12px; } .resultbar { flex-wrap:wrap; } .rgo { width:100%; padding-top:0; justify-content:flex-end; } .rtext { padding:8px; } .qtag { font-size:7px; } .qbox { padding:8px; } .qbox h2 { font-size:18px; } .qbox p { font-size:14px; } }
@media(max-height:550px) { body { overflow:auto; height:auto; } .page-grid { min-height:650px; } }
body.legal { height:auto; overflow:auto; } .legal main { max-width:820px; margin:40px auto; padding:24px; } .legal h1 { color:var(--led); } .legal h2 { margin-top:32px; } .legal table { border-collapse:collapse; width:100%; } .legal td,.legal th { padding:10px; border-bottom:1px solid var(--line); text-align:left; }

@media(min-width:1500px) { body:not(.ads-off) .app { grid-column:2;grid-row:1; } .ad-rail[data-slot="RAIL_LEFT"] {grid-column:1;grid-row:1;} .ad-rail[data-slot="RAIL_RIGHT"] {grid-column:3;grid-row:1;} }

.analytics-choice { border:1px solid var(--line); padding:10px; text-align:left; }
.analytics-choice p { margin:0 0 8px; font-size:14px; }
.analytics-choice div { display:flex; flex-wrap:wrap; gap:8px; }
.analytics-choice button { font-family:var(--f-body); font-size:14px; padding:7px 12px; background:var(--panel); color:var(--chalk); border:1px solid var(--muted); }
