/* ============================================================================
   LVC Pitch Lab — shared shell for /pitch/ (hub), /pitch/v2 (grader), /pitch/v1 (archive).

   THEME: these tokens are copied VERBATIM from /css/site.css (the fairway re-skin of
   2026-07-04 + the light-mode block of 2026-07-03). They are duplicated here rather than
   linked because /css/* is served `immutable, max-age=31536000` by _headers and only
   index.html gets its ?v= restamped by deploy.sh — a <link> to /css/site.css from these
   pages would be frozen in browsers for a year. Keep the values in sync BY HAND if the
   site palette ever moves again; nothing here is load-bearing for the SPA.

   Dark is the default. With no data-theme attribute every light token is simply absent.
   The pre-paint <script> in each page picks light 07:00–19:00 local unless localStorage
   `lvc_theme` says otherwise — the same key and the same rule as the main site, so the
   toggle stays in sync across the whole domain.

   ── SKINS (2026-07-29) ────────────────────────────────────────────────────
   /pitch/v2 is ONE file served on more than one property: www.lvcsoftball.com serves it
   directly, and lvcreplay.com / uniquereplay.com proxy it same-origin. There is NO fork —
   the page is the single source of truth and both surfaces update together. What changes
   is the PALETTE ONLY, via `data-skin` on <html>:

       (default)                 the fairway green/gold above — unchanged, byte for byte
       data-skin="replay"        the lvcreplay.com navy/blue, copied from replays-site/index.html

   Every colour a page uses must come from a var declared HERE, so a skin is a pure token
   swap and nothing has to be re-styled per surface. The *-rgb triples exist because the
   tint layers (rgba(...,.08) washes over panels) have to follow the accent hue while keeping
   their own alphas; `rgba(var(--y-rgb),.08)` does that, a solid hex cannot.

   HOW THE SKIN IS CHOSEN — the pre-paint script in each page, in priority order:
     1. an existing data-skin="…" on <html>   (a proxy may inject it server-side)
     2. ?skin=replay in the query string
     3. hostname lvcreplay.com / uniquereplay.com
   ========================================================================== */
:root{
  --bg:#081209;--panel:#0e1e14;--panel2:#0a170f;--line:#20392a;--ink:#ecf3ec;--mut:#8fa596;
  --y:#fae023;--grn:#2ee06a;--red:#ff3b46;
  --y-rgb:250,224,35;--grn-rgb:46,224,106;--red-rgb:255,59,70;
  --ytx:var(--y);--yline:var(--y);--grntx:var(--grn);--redtx:var(--red);--onacc:#081209;
  --chip:#1b3423;--bgtop:#11291b;--headbg:#081209ee;--ovl:rgba(5,16,10,.86);
  --hovline:#2e4a38;--rowline:#11161f;--hover:#161f2e;
  --goldbg:#152a18;--goldline:rgba(var(--y-rgb),.35);
  --warnbg:#1a160a;--warnline:#3a2f0e;--warnink:#fae023cc;
  --shadow:rgba(0,0,0,.45);
  /* amber — "the clip is off" / "coming soon". Deliberately NOT a shade of the accent or of
     red: it says "our fault, not a verdict", and it keeps that meaning on every skin. */
  --amber:#f5b301;--ambertx:#d08a1a;--amber-rgb:245,158,11;
  --dimchip:rgba(124,138,160,.18);    /* the "dark" illumination chip — neutral, not an accent */
  --mediabg:#000;                     /* video/still letterbox — black on every skin */
}
html[data-theme="light"]{
  color-scheme:light;
  --bg:#dcebe0;--bgtop:#eaf4ec;--panel:#f7fbf8;--panel2:#ddebe1;
  --line:#bcd6c4;--rowline:#d3e5d8;--ink:#17241a;--mut:#53685a;
  --ytx:#8a6b00;--yline:#d3b512;--grntx:#0b7a38;--redtx:#d42a35;
  --headbg:#eef7f0ee;--hover:#d7e9db;--chip:#d5e7da;--hovline:#8bb598;
  --goldbg:#fbf3d0;--goldline:#e3d27a;
  --warnbg:#fff6d6;--warnline:#ecd98b;--warnink:#7a6200e6;
  --ovl:rgba(10,30,18,.5);--shadow:rgba(12,30,18,.16);
  --ambertx:#8a5a05;                  /* #d08a1a fails contrast on the pale card */
}

/* ---- replay skin --------------------------------------------------------
   Values COPIED from replays-site/index.html (the live lvcreplay.com page), not invented:
     :root{ --bg:#0a0e14; --panel:#121826; --line:#1f2937; --txt:#eef2f7; --mut:#8a97a8;
            --accent:#3ba6ff; --y:#fae023; --grn:#2ee06a; }
     body{ background:radial-gradient(1200px 600px at 50% -10%, #16202c 0%, var(--bg) 55%) }
   plus its hover surface #141b26, its chrome #0e141c, its CTA ink #06101f and its yellow
   notice wash rgba(250,224,35,.08/.22). The font stack is already identical on both sides
   (-apple-system, system-ui, Segoe UI, Roboto) so nothing to swap there.

   The ACCENT moves from gold to that blue: on lvcreplay.com blue is the link/CTA colour and
   yellow is reserved for a "NEW" badge, so mapping --y/--ytx/--yline to #3ba6ff is what makes
   the page read as part of that site rather than a green page wearing a blue hat.

   Specificity note: (0,2,0) here beats (0,1,1) on html[data-theme="light"], so the replay skin
   wins outright and cannot be half-overwritten by a stale light-mode preference. The theme
   toggle is hidden under this skin (lvcreplay.com is dark-only) — see .themebtn below. */
:root[data-skin="replay"]{
  color-scheme:dark;
  --bg:#0a0e14;--bgtop:#16202c;--panel:#121826;--panel2:#0e141c;
  --line:#1f2937;--rowline:#1a2432;--ink:#eef2f7;--mut:#8a97a8;
  --y:#3ba6ff;--y-rgb:59,166,255;--onacc:#06101f;
  --ytx:#3ba6ff;--yline:#3ba6ff;
  --grn:#2ee06a;--grntx:#2ee06a;--red:#ff3b46;--redtx:#ff6b73;
  --chip:#141b26;--hover:#141b26;--hovline:#2a3340;
  --headbg:#0a0e14ee;--ovl:rgba(6,12,20,.86);
  --goldbg:#101b2a;
  --warnbg:rgba(250,224,35,.08);--warnline:rgba(250,224,35,.22);--warnink:#e6dfb4;
  --dimchip:rgba(138,151,168,.18);
  --shadow:rgba(0,0,0,.55);
}
/* lvcreplay.com is dark-only; a toggle that visibly does nothing is worse than no toggle.
   (The colours are already immune — the block above outranks html[data-theme="light"].) */
:root[data-skin="replay"] .themebtn{display:none}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{background:radial-gradient(1200px 600px at 50% -10%,var(--bgtop),var(--bg) 60%);color:var(--ink);
  font:16px/1.5 -apple-system,system-ui,Segoe UI,Roboto,sans-serif;min-height:100vh;
  display:flex;flex-direction:column;background-attachment:fixed}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
img,svg,video{max-width:100%}
:focus-visible{outline:2px solid var(--yline);outline-offset:2px;border-radius:6px}
.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:8px;top:8px;z-index:99;background:var(--panel);border:1px solid var(--line);
  padding:9px 14px;border-radius:10px}

/* ---- beta strip + header ------------------------------------------------ */
.betastrip{width:100%;text-align:center;font-size:11px;font-weight:700;letter-spacing:.02em;
  padding:4px 12px;line-height:1.3;color:var(--warnink);background:var(--warnbg);
  border-bottom:1px solid var(--warnline)}
.top{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;
  padding:10px 16px;border-bottom:1px solid var(--line);background:var(--headbg);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.brand{display:flex;align-items:center;gap:10px;font-weight:900;font-size:17px;min-width:0;flex:1 1 auto}
.brand .crest{height:30px;width:auto;flex:none}
.brand small{display:block;font-size:9.5px;color:var(--ytx);letter-spacing:1.4px;font-weight:800;text-transform:uppercase}
.vchip{flex:none;font-size:11px;font-weight:800;letter-spacing:.04em;padding:3px 9px;border-radius:999px;
  background:var(--goldbg);border:1px solid var(--goldline);color:var(--ytx);white-space:nowrap}
.vchip.arc{background:var(--chip);border-color:var(--line);color:var(--mut)}
.toputil{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto}
.themebtn{width:34px;height:34px;flex:none;border-radius:10px;background:var(--panel);border:1px solid var(--line);
  color:var(--ink);font-size:15px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.themebtn:hover{border-color:var(--yline)}
.uplink{padding:7px 12px;border-radius:10px;font-weight:700;font-size:13px;color:var(--mut);white-space:nowrap}
.uplink:hover{background:var(--panel);color:var(--ink)}

main{flex:1;width:100%;max-width:900px;margin:0 auto;padding:18px 16px 44px}
main.wide{max-width:1120px}
footer{text-align:center;color:var(--mut);font-size:12px;padding:20px 16px 30px;border-top:1px solid var(--line);
  line-height:1.7}
footer a{color:var(--ytx);font-weight:700}
footer .fl{display:flex;gap:8px 14px;flex-wrap:wrap;justify-content:center;margin-top:8px}

/* ---- type --------------------------------------------------------------- */
h1{font-size:clamp(23px,5.2vw,30px);line-height:1.15;font-weight:900;margin-bottom:10px;text-wrap:balance}
h2{font-size:13px;color:var(--mut);text-transform:uppercase;letter-spacing:.12em;margin:30px 0 12px;font-weight:800}
h3{font-size:16px;font-weight:800;margin-bottom:6px;text-wrap:balance}
p{margin-bottom:12px}
.lede{color:var(--mut);font-size:15.5px;line-height:1.62;max-width:66ch}
.mut{color:var(--mut)}
.small{font-size:13px;line-height:1.6;color:var(--mut)}
strong,b{font-weight:800}
ul,ol{margin:0 0 12px 20px}
li{margin-bottom:6px}

/* ---- cards -------------------------------------------------------------- */
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;margin-bottom:14px}
.card.pad{padding:16px}
.card.gold{border-color:var(--goldline);background:linear-gradient(180deg,rgba(var(--y-rgb),.06),transparent)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.badge{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
  color:var(--mut);background:var(--chip);border-radius:999px;padding:3px 9px;white-space:nowrap;vertical-align:middle}
.badge.new{background:var(--goldbg);border:1px solid var(--goldline);color:var(--ytx)}
.badge.arch{background:var(--chip);color:var(--mut)}
.badge.live{background:rgba(var(--grn-rgb),.14);color:var(--grntx)}
.note{border-left:3px solid var(--yline);background:var(--goldbg);border-radius:0 12px 12px 0;
  padding:13px 15px;margin:0 0 14px;font-size:14px;line-height:1.6}
.note b{color:var(--ytx)}

/* stat tiles — plain numbers, no chartjunk */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:14px}
.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:13px 14px}
.stat .n{font-size:26px;font-weight:900;line-height:1.1;font-variant-numeric:tabular-nums}
.stat .n.y{color:var(--ytx)}.stat .n.g{color:var(--grntx)}.stat .n.r{color:var(--redtx)}
.stat .l{color:var(--mut);font-size:12px;margin-top:5px;line-height:1.4}

/* link cards — same idiom as the SPA's .labcard */
.linkcard{display:flex;flex-direction:column;gap:7px;background:var(--panel);border:1px solid var(--line);
  border-radius:14px;padding:15px 16px;transition:.15s}
.linkcard:hover{border-color:var(--hovline);transform:translateY(-2px)}
.linkcard.feat{border-color:var(--yline);background:linear-gradient(180deg,rgba(var(--y-rgb),.07),transparent)}
.linkcard .ic{font-size:24px;line-height:1}
.linkcard .ti{font-weight:800;font-size:15.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.linkcard p{color:var(--mut);font-size:13.5px;line-height:1.55;margin:0}
.linkcard .go{color:var(--ytx);font-weight:700;font-size:12.5px;margin-top:auto;padding-top:3px}

/* the two lines of an answer button are spans, so they need to be told to stack */
.abtn .lb .t,.abtn .lb .s{display:block}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--y);color:var(--onacc);
  font-weight:800;font-size:15px;border:0;border-radius:12px;padding:13px 20px;cursor:pointer;text-align:center}
.btn:hover{filter:brightness(1.06)}
.btn.ghost{background:var(--panel);border:1px solid var(--line);color:var(--ink);font-weight:700}
.btn.ghost:hover{border-color:var(--hovline)}
.btn.block{width:100%}

table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}
.tw{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--panel);margin-bottom:14px}
th,td{padding:10px 12px;text-align:right;border-bottom:1px solid var(--rowline);font-size:13.5px;white-space:nowrap}
th{color:var(--mut);font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;background:var(--panel2);font-weight:800}
th:first-child,td:first-child{text-align:left}
tbody tr:last-child td{border-bottom:0}

@media(max-width:560px){
  .top{padding:9px 12px;gap:8px}
  .brand{font-size:15.5px;gap:8px}
  .brand .crest{height:26px}
  main{padding:16px 13px 40px}
  .uplink{display:none}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---- progress (v2 home) -------------------------------------------------
   The per-task `.pg/.pgt/.pgttl/.pgnote/.pgsess` bars that lived here are GONE.
   Five catalogued tasks rendered ten full-width bars plus five copies of the
   same paragraph above the fold, which pushed everything a member could act on
   below their own screen. They are replaced by the single `.need` block, whose
   styles live in v2.html itself — that file is the only thing that renders them
   and it is served with its own markup, so a cached copy of THIS file can never
   leave the block unstyled. Both honest numbers survived the condensing:
   "one answer" and "two answers agree" are now segments of one bar per task. */

/* ============================================================================
   🧠 CTA BANNER — REPLAY SKINS ONLY.

   www.lvcsoftball.com/pitch/v2 already sits behind the site's own nav and is reached on
   purpose; a banner there would be shouting at someone already in the room. On the replay
   properties the page is a cold landing — a visitor arrives to watch a game and has never
   heard of the labeling lab — so it gets one honest invitation at the top.

   `display:none` is the DEFAULT and the skin turns it on, never the other way round: if the
   skin script fails, throws or is stripped by a proxy, the failure mode is "the banner does
   not appear on lvcsoftball.com", which is the requirement.

   The gradient and the #3ba6ff22 glow are lifted from replays-site/index.html's `.newsite`
   promo block, so it reads as native furniture on that site rather than an ad.
   ========================================================================== */
.brainbar{display:none}
:root[data-skin="replay"] .brainbar{display:block;position:relative;width:100%;max-width:1120px;
  margin:16px auto 0;padding:0 16px}
.brainbar[hidden],:root[data-skin="replay"] .brainbar[hidden]{display:none}
.brainbtn{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;gap:14px;
  width:100%;text-align:left;cursor:pointer;color:var(--ink);font:inherit;border:1px solid #2a3f63;
  border-radius:16px;padding:15px 52px 15px 17px;transition:.15s;
  background:linear-gradient(135deg,#13243a 0%,#0f1a2b 58%,#1c1433 100%)}
.brainbtn::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(600px 200px at 50% 0%,#3ba6ff22,transparent 70%)}
.brainbtn:hover{border-color:var(--yline);transform:translateY(-1px)}
.brainbtn:active{transform:translateY(0)}
.brainbtn .bi{flex:none;width:46px;height:46px;border-radius:14px;display:grid;place-items:center;
  font-size:25px;line-height:1;background:rgba(var(--y-rgb),.12);border:1px solid rgba(var(--y-rgb),.34);
  box-shadow:inset 0 0 22px rgba(var(--y-rgb),.16)}
.brainbtn .bt{flex:1 1 auto;min-width:0}
/* the three lines are spans (a <button> may not contain block-level flow content), so they have
   to be told to stack — exactly the same trap as .abtn .lb .t/.s above. */
.brainbtn .bk,.brainbtn .bq,.brainbtn .bs{display:block}
.brainbtn .bk{font-size:10.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  color:var(--ytx);opacity:.9;margin-bottom:3px}
.brainbtn .bq{font-size:16.5px;font-weight:900;line-height:1.25;text-wrap:balance}
.brainbtn .bs{font-size:13px;line-height:1.5;color:var(--mut);margin-top:3px}
.brainbtn .bgo{flex:none;font-size:13.5px;font-weight:800;color:var(--onacc);background:var(--y);
  border-radius:999px;padding:9px 17px;white-space:nowrap}
.brainbtn:hover .bgo{filter:brightness(1.08)}
.brainbtn .bgo.busy{opacity:.7}
/* the × is a sibling, not a child: a <button> inside a <button> is invalid HTML and Safari
   silently drops the inner one, which is exactly how a dismiss control stops dismissing. */
.brainx{position:absolute;top:9px;right:25px;z-index:2;width:28px;height:28px;border-radius:9px;
  background:transparent;border:0;color:var(--mut);font-size:18px;line-height:1;cursor:pointer;
  display:grid;place-items:center;padding:0}
.brainx:hover{background:rgba(255,255,255,.08);color:var(--ink)}
@media(max-width:620px){
  .brainbtn{flex-wrap:wrap;gap:12px;padding:14px 44px 14px 15px}
  .brainbtn .bq{font-size:15.5px}
  .brainbtn .bgo{width:100%;text-align:center;padding:11px 16px}
}

/* ============================================================================
   REQUEST-ACCESS PANEL — self-contained component, see LVC_LAB.requestAccess() in lab.js.
   Markup, styles and behaviour are deliberately independent of /pitch/v2 so the same call
   works from any page on any skin: everything is namespaced `.acc*` and every colour is a
   token, so it inherits whichever skin is active.
   ========================================================================== */
.accovl{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;
  padding:18px;overflow:auto;background:var(--ovl);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.accbox{position:relative;width:100%;max-width:430px;margin:auto;background:var(--panel);
  border:1px solid var(--line);border-radius:16px;padding:20px 20px 18px;box-shadow:0 24px 60px var(--shadow)}
.accbox h3{font-size:18px;font-weight:900;line-height:1.25;padding-right:26px;text-wrap:balance}
.accbox .accsub{font-size:13.5px;line-height:1.6;color:var(--mut);margin:7px 0 0}
.accclose{position:absolute;top:10px;right:10px;width:30px;height:30px;border-radius:9px;background:transparent;
  border:0;color:var(--mut);font-size:19px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}
.accclose:hover{background:var(--hover);color:var(--ink)}
.accf{display:grid;gap:11px;margin-top:15px}
.accf label{display:block;font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;
  color:var(--mut);margin-bottom:5px}
.accf label .opt{font-weight:700;letter-spacing:0;text-transform:none;opacity:.75}
.accf input{width:100%;font:inherit;font-size:15.5px;color:var(--ink);background:var(--panel2);
  border:1px solid var(--line);border-radius:11px;padding:11px 13px;-webkit-appearance:none;appearance:none}
.accf input:focus{outline:none;border-color:var(--yline)}
.accf input::placeholder{color:var(--mut);opacity:.65}
.accnote{font-size:12px;line-height:1.55;color:var(--mut);margin:2px 0 0}
.accerr{display:none;font-size:13px;line-height:1.5;border-radius:11px;padding:9px 12px;margin-top:2px;
  color:var(--redtx);background:rgba(var(--red-rgb),.10);border:1px solid rgba(var(--red-rgb),.35)}
.accerr.on{display:block}
/* thanks state — warm on purpose: this person just did us a favour by asking. */
.accok{text-align:center;padding:6px 0 2px}
.accok .ic{font-size:40px;line-height:1}
.accok h3{padding:0;margin-top:10px}
.accok .em{display:inline-block;margin-top:10px;font-size:13px;font-weight:800;word-break:break-all;
  background:var(--goldbg);border:1px solid var(--goldline);color:var(--ytx);border-radius:999px;padding:5px 13px}
.accok p{font-size:13.5px;line-height:1.6;color:var(--mut);margin:11px 0 0}
