/* =====================================================================
   BROADCAST (v2.0): the layer on top of theme.css.
   One hero number per panel, team color on every surface, score-bug
   header that fits a phone, tables that become cards, icons instead of
   emoji, motion that reports a change (never decoration for its own sake).
   ===================================================================== */

:root {
  --gold: #e8c874;
  --display: var(--cond);
}

/* ---- icons that replaced emoji (polish.js) ---------------------------------- */
.gi { display: inline-flex; vertical-align: -3px; margin-right: 3px; color: var(--ink-2); }
.gi .ico { width: 16px; height: 16px; }
.gi-gold { color: var(--gold); }
.gi-good { color: var(--good); }
.gi-bad { color: var(--bad); }
.gi-warn, .gi-hot { color: var(--warn); }
.gi-dim { color: var(--ink-3); }
h2 .gi .ico { width: 19px; height: 19px; }
h2 .gi { vertical-align: -2px; }

/* ---- panels: team color on every surface ------------------------------------------ */
.panel {
  background:
    radial-gradient(110% 70% at 0% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 62%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
}
.panel-head {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--hairline));
}
.panel-head h2 { color: #fff; }
.panel-head .sub { color: var(--ink-2); }
.section-title { color: color-mix(in srgb, var(--accent) 55%, var(--ink-3)); }

/* ---- one hero number per row of facts ------------------------------------------ */
.facts { gap: 8px; }
.fact.hero {
  grid-column: span 2;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 24%, transparent), transparent 75%),
    rgba(255, 255, 255, 0.03);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  position: relative; overflow: hidden;
}
.fact.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.fact.hero .k { color: color-mix(in srgb, var(--accent) 50%, #fff); }
.fact.hero .v { font-family: var(--display); font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: 0.01em; }
.fact:not(.hero) .v { font-size: 20px; }
.fact .k { letter-spacing: 0.14em; }

/* ---- motion that reports a change ------------------------------------------------ */
@keyframes fill { from { transform: scaleX(0); } }
.bar-fill, .conf-bar > div, .cbar .conf-bar > div, .lv-wpbar > div { transform-origin: left center; animation: fill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes bumpUp { 0% { color: var(--good); transform: translateY(-2px) scale(1.12); } 100% { transform: none; } }
@keyframes bumpDown { 0% { color: var(--bad); transform: translateY(2px) scale(1.12); } 100% { transform: none; } }
.big.bump-up { animation: bumpUp 0.9s ease-out; display: inline-block; }
.big.bump-down { animation: bumpDown 0.9s ease-out; display: inline-block; }

/* ---- walls of text fold to three lines (polish.js) ----------------------------------- */
.note.fold:not(.open) { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more-btn {
  display: inline-block; margin: 2px 0 6px; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}

/* ---- toasts: a lower third, colored by the result ------------------------------------ */
.toast { font-size: 14px; }
.toast.t-win, .toast.t-loss { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 20px; letter-spacing: 0.03em; text-transform: uppercase; padding: 12px 22px; }
.toast.t-win { border-left-color: var(--good); background: linear-gradient(90deg, color-mix(in srgb, var(--good) 22%, #0d121b), #0d121bf2 70%); }
.toast.t-loss { border-left-color: var(--bad); background: linear-gradient(90deg, color-mix(in srgb, var(--bad) 22%, #0d121b), #0d121bf2 70%); }

/* ---- TV moments: the result of a season, full width --------------------------------- */
.tv-moment {
  grid-column: 1 / -1; position: relative; overflow: hidden; border-radius: 16px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 22px 24px;
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--accent) 70%, #000) 0 58%, color-mix(in srgb, var(--team-2, var(--accent)) 35%, #05070c) 58.2%);
  box-shadow: 0 30px 60px -30px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  animation: wipe 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.tv-moment::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.18) 45%, transparent 60%);
  transform: translateX(-100%); animation: sweep 1.6s 0.5s ease-out both;
}
.tv-moment.gold { background: linear-gradient(105deg, #6d5317 0 58%, #241b07 58.2%); box-shadow: 0 30px 60px -30px #000, inset 0 0 0 1px #e8c87466; }
.tv-moment.loss { background: linear-gradient(105deg, #2a2f39 0 58%, #11151c 58.2%); }
.tv-kicker { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: #ffffffcc; }
.tv-title { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 46px; line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; color: #fff; text-shadow: 0 3px 18px #0009; overflow-wrap: anywhere; }
.tv-moment.gold .tv-title { background: linear-gradient(180deg, #fff6d6, #e8c874 60%, #b98a2a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tv-sub { margin-top: 6px; color: #ffffffd9; font-size: 14px; }
.tv-side { text-align: right; }
.tv-side .tv-num { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 54px; line-height: 0.9; color: #fff; text-shadow: 0 3px 18px #0009; }
.tv-side .tv-cap { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #ffffffb3; }
.tv-delta { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 4px; font-weight: 800; font-size: 13px; background: #0006; }
.tv-delta.up { color: #7dffb8; }
.tv-delta.down { color: #ff9a9a; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sweep { to { transform: translateX(100%); } }

/* ---- phones ------------------------------------------------------------------- */
@media (max-width: 760px) {
  /* The scorebug fits the screen: no sideways scrolling, money first. */
  .top { grid-template-columns: auto 1fr; gap: 8px 10px; padding: 10px 14px 10px; }
  .brand { min-width: 0; gap: 10px; }
  .brand-crest svg, .brand-crest img { width: 30px; height: 30px; }
  .brand-text { min-width: 0; }
  .logo { font-size: 15px; letter-spacing: 0.22em; }
  .school { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 62vw; margin-top: 1px; color: #fff; }
  .clock { grid-column: 2; grid-row: 1; justify-self: end; flex-direction: column; align-items: flex-end; gap: 4px; flex-wrap: nowrap; }
  .clock .pill { padding: 3px 12px; font-size: 11px; }
  .meters {
    grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px;
    overflow: visible; padding: 0;
  }
  .meter, .meter.small { min-width: 0; flex: none; }
  .meters > .meter:first-child { grid-column: 1 / -1; }
  .meters > .meter:first-child .meter-label { display: flex; justify-content: space-between; align-items: baseline; }
  .meters > .meter:first-child .meter-label b { font-family: var(--display); font-style: italic; font-size: 20px; font-weight: 900; letter-spacing: 0.02em; color: #fff; }
  .meter.small {
    padding: 6px 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px var(--hairline);
  }
  .meter.small .meter-label { font-size: 8.5px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: clip; }
  .meter.small .big { font-size: 22px; line-height: 1.05; }
  .meter-sub { font-size: 9.5px; }
  #scoutMeter[style*="none"] + * { grid-column: auto; }

  /* hero numbers stay big but fit */
  .fact.hero .v { font-size: 34px; }

  /* wide tables become stacked cards */
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; min-width: 0 !important; max-width: 100%; box-sizing: border-box; }
  table.stack tr.stack-head { display: none; }
  table.stack tr {
    margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; position: relative;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 0 0 1px var(--hairline);
  }
  table.stack tr.you { box-shadow: inset 4px 0 0 var(--accent), inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
  table.stack td { border: 0 !important; padding: 3px 0 !important; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right !important; background: none !important; min-height: 0; }
  table.stack td::before { content: attr(data-label); flex: none; text-align: left; color: var(--ink-3); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
  table.stack td:not([data-label])::before, table.stack td[data-label=""]::before { content: none; }
  table.stack td:not([data-label]), table.stack td[data-label=""] { justify-content: flex-end; }
  table.stack td:first-child { display: block; text-align: left !important; font-size: 15px; padding: 0 0 7px !important; margin-bottom: 4px; border-bottom: 1px solid var(--hairline) !important; }
  table.stack td:first-child::before { content: none; }
  table.stack td:empty { display: none; }
  .results { overflow-x: visible; }

  /* TV moments on a phone */
  .tv-moment { grid-template-columns: auto 1fr; padding: 16px; gap: 12px; }
  .tv-moment .tv-side { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; text-align: left; border-top: 1px solid #ffffff26; padding-top: 10px; }
  .tv-title { font-size: 32px; }
  .tv-side .tv-num { font-size: 38px; }
  .tv-moment svg, .tv-moment img { width: 46px; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill, .conf-bar > div, .lv-wpbar > div, .tv-moment, .tv-moment::after, .big.bump-up, .big.bump-down { animation: none !important; }
}

/* ---- Signing Day / portal on a phone: the board (where you act) comes first ---------- */
@media (max-width: 760px) {
  main.grid { display: flex; flex-direction: column; }
  main.grid > .panel.wide { order: -1; }
  .row.need-ok { padding-top: 4px; padding-bottom: 4px; opacity: 0.6; }
  .row.need-ok .meta { display: none; }
  .row.need-open { box-shadow: inset 3px 0 0 var(--warn); }
}
@media (max-width: 760px) {
  table.stack.ranked tr { padding-right: 52px; }
  table.stack.ranked td:first-child {
    position: absolute; right: 12px; top: 8px; width: auto; margin: 0; padding: 0 !important; border: 0 !important;
    font-family: var(--display); font-style: italic; font-weight: 900; font-size: 26px; color: var(--ink-3);
  }
  table.stack.ranked td:nth-child(2) { display: block; text-align: left !important; font-size: 15px; padding: 0 0 7px !important; margin-bottom: 4px; border-bottom: 1px solid var(--hairline) !important; }
  table.stack.ranked td:nth-child(2)::before { content: none; }
}

/* ---- the call: every option's honest odds, big ------------------------------------ */
.lv-opts .opt { position: relative; padding-right: 86px; }
.lv-opts .opt .odds { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); text-align: right; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.1; }
.lv-opts .opt .odds b { display: block; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 30px; letter-spacing: 0; }
.lv-opts .opt:hover:not(:disabled) { border-color: var(--accent); }

/* ---- the trophy case: a shelf, not a wall ------------------------------------------- */
.career-facts { margin-bottom: 12px; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.trophy { padding: 8px 6px; font-size: 0; gap: 3px; border-radius: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.trophy .gi { margin: 0; }
.trophy .gi .ico { width: 22px; height: 22px; }
.trophy span { font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; }
.trophy.national { border-color: #e8c87488; background: linear-gradient(180deg, #e8c87422, #e8c87408); }
.trophy.national span { color: var(--gold); }
@media (max-width: 760px) {
  .trophies { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .trophy span { font-size: 10.5px; }
  .trophy .gi .ico { width: 18px; height: 18px; }
}
.fact.hero { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
@media (max-width: 360px) {
  .meter.small .meter-label { font-size: 7.5px; letter-spacing: 0; }
  .meter.small .big { font-size: 19px; }
  .meter-sub { font-size: 8.5px; }
}

/* ---- v2.1: College GM or NFL GM ------------------------------------------------------------- */
.track-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.track-btn {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #151a22) 85%, #000); color: var(--ink-2); cursor: pointer;
  border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.track-btn b { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.track-btn span { font-size: 12.5px; line-height: 1.35; }
.track-btn:hover { transform: translateY(-2px); }
.track-btn.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 30px -16px color-mix(in srgb, var(--accent) 70%, transparent); }
.track-btn.on b { color: var(--accent); }
@media (max-width: 520px) {
  .track-pick { gap: 8px; }
  .track-btn { padding: 10px; }
  .track-btn b { font-size: 18px; }
  .track-btn span { font-size: 11.5px; }
}

/* ---- v2.2: how you stack up (NFL roster vs a rival) ------------------------------------------ */
.stackup .panel-head { flex-wrap: wrap; gap: 8px; }
.mu-pick { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.mu-pick select { max-width: 260px; text-transform: none; letter-spacing: 0; }
.mu-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 12px; }
.mu-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mu-team.them { flex-direction: row-reverse; text-align: right; }
.mu-team b { display: block; font-family: var(--cond); font-size: 20px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.mu-team span { font-size: 12px; color: var(--ink-2); }
.mu-vs { font-family: var(--cond); font-size: 18px; color: var(--ink-3, var(--ink-2)); text-transform: uppercase; }
.mu-grid { display: flex; flex-direction: column; gap: 4px; }
.mu-row {
  display: grid; grid-template-columns: 56px 1fr 70px 1fr 56px; align-items: center; gap: 8px; width: 100%;
  padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font: inherit; text-align: inherit; cursor: pointer;
}
button.mu-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.mu-row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mu-row.mu-head { cursor: default; background: color-mix(in srgb, var(--ink) 4%, transparent); margin-bottom: 2px; }
.mu-row.mu-head .mu-pos { font-size: 13px; }
.mu-v { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.mu-v b { font-family: var(--cond); font-size: 20px; font-variant-numeric: tabular-nums; }
.mu-v span { font-size: 10.5px; color: var(--ink-2); margin-top: 2px; }
.mu-pos { text-align: center; font-family: var(--cond); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; display: flex; flex-direction: column; line-height: 1.05; }
.mu-pos small { font-family: inherit; font-size: 11px; letter-spacing: 0; color: var(--ink-2); }
.mu-bar { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 8%, transparent); display: flex; overflow: hidden; }
.mu-bar.me { justify-content: flex-end; }
.mu-bar i { display: block; height: 100%; border-radius: 5px; background: var(--ink-2); opacity: .45; animation: fillx .7s ease-out both; transform-origin: right; }
.mu-bar.them i { transform-origin: left; }
.mu-row.win .mu-bar.me i { background: var(--good); opacity: 1; }
.mu-row.win .mu-pos small { color: var(--good); }
.mu-row.lose .mu-bar.them i { background: var(--bad); opacity: 1; }
.mu-row.lose .mu-pos small { color: var(--bad); }
.mu-row.even .mu-bar i { opacity: .7; }
@keyframes fillx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.mu-sum { margin-top: 10px; }
.mu-sum .dim-t { display: block; margin-top: 4px; font-size: 12px; }
.mu-focus { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mu-player { padding: 4px 0; font-size: 13.5px; }
.mu-player .ovr { display: inline-block; min-width: 26px; }
.mu-league { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .mu-row { grid-template-columns: 40px 1fr 52px 1fr 40px; gap: 5px; padding: 6px 4px; }
  .mu-v b { font-size: 17px; }
  .mu-pos { font-size: 14px; }
  .mu-team b { font-size: 15px; }
  .mu-team .crest { width: 26px; height: 26px; }
  .mu-pick { width: 100%; }
  .mu-pick select { max-width: none; flex: 1; }
  .mu-focus { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mu-bar i { animation: none; } }

/* ---- v2.2: the field view (role by role) -------------------------------------------------- */
.mu-avg { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--cond); font-size: 12px; letter-spacing: .06em; color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); border: 1px solid var(--line); }
.mu-view { margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.field-head b { font-family: var(--cond); font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.field-head span { font-size: 12px; color: var(--ink-2); }
.field {
  position: relative; aspect-ratio: 4 / 3.2; border-radius: 12px; overflow: hidden; border: 1px solid #ffffff1f;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(20% - 1px), #ffffff2e calc(20% - 1px) 20%),
    repeating-linear-gradient(to bottom, #1d5a32 0 10%, #1a5230 10% 20%);
  box-shadow: inset 0 0 40px #0008;
}
.field::after { /* hash marks */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background:
    repeating-linear-gradient(to bottom, #fff 0 1px, transparent 1px 4%) 33% 0 / 6px 100% no-repeat,
    repeating-linear-gradient(to bottom, #fff 0 1px, transparent 1px 4%) 67% 0 / 6px 100% no-repeat;
}
.los { position: absolute; left: 0; right: 0; top: 14%; height: 2px; background: #5fa8ff; box-shadow: 0 0 8px #5fa8ffaa; z-index: 1; }
.ft {
  position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 46px; padding: 3px 0 2px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; line-height: 1; cursor: pointer; font: inherit; color: #fff;
  background: #0d1117e6; border: 2px solid #8b95a5; box-shadow: 0 4px 10px #0007; transition: transform .12s;
}
.ft:hover { transform: translate(-50%, -50%) scale(1.08); }
.ft b { font-family: var(--cond); font-size: 19px; font-variant-numeric: tabular-nums; }
.ft-role { font-size: 9px; letter-spacing: .06em; color: #c9d1dc; margin-top: 1px; }
.ft-vs { font-size: 10px; font-weight: 700; margin-top: 1px; color: #c9d1dc; font-variant-numeric: tabular-nums; }
.ft.win { border-color: var(--good); }
.ft.win .ft-vs { color: var(--good); }
.ft.lose { border-color: var(--bad); }
.ft.lose .ft-vs { color: var(--bad); }
.ft.on { box-shadow: 0 0 0 3px var(--accent), 0 4px 10px #0007; }
.field-key { margin-top: 8px; }
.ft-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 2px solid #8b95a5; vertical-align: -1px; }
.ft-key.win { border-color: var(--good); }
.ft-key.lose { border-color: var(--bad); }
@media (max-width: 760px) {
  .fields { grid-template-columns: 1fr; }
  .field { aspect-ratio: 1 / 1.02; }
}
@media (max-width: 420px) {
  .ft { width: 38px; padding: 2px 0 1px; border-radius: 8px; }
  .ft b { font-size: 16px; }
  .ft-role { font-size: 8px; }
  .ft-vs { font-size: 9px; }
}
.mu-against .seg-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; font-size: 13px; text-transform: none; letter-spacing: 0; min-width: 150px; }
.mu-against .seg-btn small { font-size: 11px; font-weight: 500; opacity: .75; }
.mu-against .seg-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) {
  .mu-against { flex: 1; display: grid; grid-template-columns: 1fr 1fr; }
  .mu-against .seg-btn { min-width: 0; padding: 8px 10px; }
}
@media (max-width: 560px) {
  .mu-pick-label { display: none; }
  .mu-against .seg-btn { align-items: center; text-align: center; }
}
