/* CHARACTER - the last layer over the two looks (themes.css), to make them read like
   football, not like a generic app.

   VARSITY (college) is a game-day program: body text in a book serif (Source Serif 4)
   under the collegiate block and slab headings; cards cut square like sewn-on patches;
   every section heading sits on a jersey-sleeve stripe; tips are a coach's note card.

   PRIMETIME (NAFL) is a broadcast: body text in the squared condensed of a score bug
   (Saira Semi Condensed); hard-edged slabs; tips are the telestrator's yellow.

   Both: numbers in tables line up (tabular figures), and the small gray captions on
   section headings are set as captions, not as chat lines. Loaded after themes.css. */

/* ---- type ------------------------------------------------------------------------------------ */
body.theme-varsity {
  --sans: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-text: var(--sans);
  --r-card: 5px;
  font-family: var(--sans) !important;
  font-size: 15px !important;
  font-optical-sizing: auto;
}
body.theme-primetime {
  --sans: 'Saira Semi Condensed', 'Arial Narrow', sans-serif;
  --font-text: var(--sans);
  --r-card: 0px;
  font-family: var(--sans) !important;
  font-size: 15px !important;
}
body.theme-varsity :is(input, select, textarea, .text-in),
body.theme-primetime :is(input, select, textarea, .text-in) { font-family: var(--sans) !important; }
body :is(td.num, th.num, .num, .tr-stats, .fact .v) { font-variant-numeric: tabular-nums lining-nums; }

/* ---- VARSITY: the game-day program ------------------------------------------------------------- */
/* cards: square patches, still stitched */
body.theme-varsity :is(.panel, .cycle-card, .fac, .award, .coach-card, .prog, .offer, .banner) { border-radius: 5px !important; }
body.theme-varsity .fact { border-radius: 4px !important; }

/* section headings on a jersey-sleeve stripe (team color, cream, team color) */
body.theme-varsity .panel-head { position: relative; padding-bottom: 14px !important; }
body.theme-varsity .panel-head::after {
  content: ''; position: absolute; left: 18px; width: 64px; bottom: 4px; height: 7px; pointer-events: none;
  background: linear-gradient(180deg, var(--team) 0 2px, transparent 2px 2.5px, var(--cream) 2.5px 4.5px, transparent 4.5px 5px, var(--team) 5px 7px);
}
body.theme-varsity .panel-head h2 { font-size: 15.5px !important; letter-spacing: 0.05em !important; }
body.theme-varsity .panel-head .sub { font-style: italic; font-size: 13px; color: var(--c-ink-3) !important; letter-spacing: 0; }

/* buttons: patches, not pills */
body.theme-varsity .btn {
  border-radius: 4px !important; border: 1.5px solid rgba(243, 227, 184, 0.55) !important;
  outline: 1px dashed rgba(243, 227, 184, 0.28); outline-offset: -5px;
}
body.theme-varsity .btn.primary { border-radius: 4px !important; outline-color: rgba(255, 255, 255, 0.35); }
body.theme-varsity .advance { border-radius: 6px !important; }
/* the phase badge is a pennant */
body.theme-varsity .pill.phase { border-radius: 0 !important; padding: 3px 18px 3px 10px !important; clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%); }
body.theme-varsity .tag { border-radius: 3px !important; }
body.theme-varsity :is(.conf-chip, .seg, .seg-btn) { border-radius: 4px !important; }

/* tips: a coach's note card, cream stock with a strip of tape */
body.theme-varsity .tip-card {
  background: var(--felt) !important; color: var(--felt-ink) !important; border: 0 !important;
  outline: 1.5px dashed rgba(29, 26, 20, 0.22) !important; outline-offset: -7px;
  box-shadow: 0 2px 0 #b9ab86, 0 18px 30px -20px #000 !important; transform: rotate(-0.25deg); position: relative;
}
body.theme-varsity .tip-card::before {
  content: ''; position: absolute; top: -9px; left: 50%; width: 92px; height: 20px; margin-left: -46px;
  background: rgba(243, 227, 184, 0.75); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transform: rotate(-2deg);
}
body.theme-varsity .tip-card .panel-head h2 { color: #13233b !important; }
body.theme-varsity .tip-card .panel-head::after { background: linear-gradient(180deg, var(--team) 0 2px, transparent 2px 5px, var(--team) 5px 7px); }
body.theme-varsity .tip-card .tip-text { color: var(--felt-ink) !important; font-size: 15.5px; line-height: 1.5; }
body.theme-varsity .tip-card .btn { background: transparent !important; color: #13233b !important; border-color: rgba(19, 35, 59, 0.55) !important; outline-color: rgba(19, 35, 59, 0.25); }
body.theme-varsity .tip-card .btn:hover { background: rgba(19, 35, 59, 0.08) !important; }

/* ---- PRIMETIME: the broadcast ------------------------------------------------------------------ */
body.theme-primetime :is(.panel, .cycle-card, .fac, .award, .coach-card, .prog, .offer, .banner, .fact, .btn, .tag) { border-radius: 0 !important; }
body.theme-primetime .panel-head h2 { font-size: 17px !important; color: #e8ebef !important; }
body.theme-primetime .panel-head h2::before { width: 10px !important; height: 20px !important; margin-right: 12px !important; vertical-align: -3px !important; }
body.theme-primetime .panel-head .sub { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #7d8590 !important; }
body.theme-primetime :is(.conf-chip, .seg, .seg-btn) { border-radius: 0 !important; }

/* tips: the telestrator's yellow */
body.theme-primetime .tip-card { border-top: 0 !important; border-left: 4px solid #ffd21f !important; background: linear-gradient(90deg, rgba(255, 210, 31, 0.07), transparent 40%), linear-gradient(180deg, #1c1f24, #0d0e11) !important; }
body.theme-primetime .tip-card .panel-head h2 { color: #ffd21f !important; }
body.theme-primetime .tip-card .panel-head h2::before { background: #ffd21f !important; }
body.theme-primetime .tip-card .tip-text { font-size: 15.5px; line-height: 1.45; color: #e8ebef; }

/* ---- icons: solid pictograms take the text color ------------------------------------------------ */
.gi .ico, .dyn-feature .ico { fill: currentColor; stroke: none; }

/* ---- the title screen and other rounded leftovers ---------------------------------------------- */
body.theme-varsity :is(.track-btn, .dyn-hero, .team-row, .text-in, .hero-btn, .menu-continue, .code-row, .prog-card, .dlg, dialog, .subtab) { border-radius: 5px !important; }
body.theme-primetime :is(.track-btn, .dyn-hero, .team-row, .text-in, .hero-btn, .menu-continue, .code-row, .prog-card, .dlg, dialog, .subtab) { border-radius: 0 !important; }

/* ---- header: the money is never cut off ------------------------------------------------------------ */
/* On one-row desktop headers the meters share a row with the team and the phase; when they ran out
   of room the money meter was clipped from the left ("of $4.77M" with no label or amount left).
   Now the label gives way (it can shorten), the amount never does, and the header switches to two
   rows sooner. */
@media (min-width: 761px) {
  .meters > .meter:first-child { min-width: 0 !important; flex: 0 1 260px !important; }
  .meters > .meter:first-child .meter-label { display: flex !important; gap: 6px; align-items: baseline; white-space: nowrap; }
  #moneyLabel { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  #moneyText { flex: none; }
}
@media (min-width: 1440px) and (max-width: 1679px) {
  .top { grid-template-columns: minmax(0, 1fr) auto max-content !important; grid-template-rows: auto auto !important; row-gap: 10px !important; }
  .top .brand { grid-column: 1 !important; grid-row: 1 !important; }
  .top .clock { grid-column: 2 !important; grid-row: 1 !important; }
  .top .advance { grid-column: 3 !important; grid-row: 1 !important; justify-self: end !important; min-width: max-content !important; }
  .top .meters { grid-column: 1 / -1 !important; grid-row: 2 !important; overflow: visible !important; }
}

/* ---- Signing Day and the portal --------------------------------------------------------------------- */
/* Full positions on one line under the ones you still need to fill. */
.needs-full { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 16px 14px; font-size: 13px; }
.needs-pos { display: inline-flex; align-items: baseline; gap: 3px; padding: 3px 8px; border: 1px solid var(--c-hairline-2, rgba(255,255,255,.14)); border-radius: 4px; font-weight: 700; font-size: 12px; letter-spacing: .04em; cursor: help; }
.needs-pos small { font-weight: 600; color: var(--c-ink-3, #7f8aa1); }
body.theme-primetime .needs-pos { border-radius: 0; }

/* Before the board opens: what is waiting, and the way in. */
.board-start { display: grid; gap: 14px; padding: 18px 18px 22px; }
.board-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.board-facts > div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--c-hairline, rgba(255,255,255,.08)); border-radius: 6px; background: color-mix(in srgb, var(--c-raised, #1b2330) 70%, transparent); }
body.theme-primetime .board-facts > div { border-radius: 0; }
.board-facts b { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.board-facts span { font-size: 12px; color: var(--c-ink-3, #7f8aa1); }
.board-start .meta { margin: 0; max-width: 62ch; }
.board-start .advance { justify-self: start; position: static !important; width: auto !important; }

/* Position filters stay on one line (they scroll sideways if they must). */
@media (min-width: 761px) {
  .panel-head .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .panel-head .chips::-webkit-scrollbar { display: none; }
  .panel-head .chips .chip { flex: none; }
}

/* Scrollbars that belong to the game, not the browser's bright default. */
.list, .wire, .ledger, .dlg-body, .capfix { scrollbar-width: thin; scrollbar-color: var(--c-hairline-2, rgba(255,255,255,.18)) transparent; }
.list::-webkit-scrollbar, .wire::-webkit-scrollbar, .ledger::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-thumb, .wire::-webkit-scrollbar-thumb, .ledger::-webkit-scrollbar-thumb { background: var(--c-hairline-2, rgba(255,255,255,.18)); border-radius: 8px; }
.list::-webkit-scrollbar-track, .wire::-webkit-scrollbar-track, .ledger::-webkit-scrollbar-track { background: transparent; }

/* Big screens: the recruiting and portal screen uses the room, most of it for the board. */
@media (min-width: 1400px) {
  main.grid.market { max-width: 1480px !important; grid-template-columns: minmax(290px, 1fr) minmax(0, 2fr) minmax(290px, 1fr) !important; }
}

/* The portal / Signing Day banner fades the same way the cards do. */
#banner { transition: opacity .6s ease, transform .6s ease; }
#banner.card-leaving { opacity: 0; transform: translateY(-6px); }

/* Playoff bracket and bowls on cream cards: the winner's score in dark ink, like the names
   (it was the light text color meant for dark panels, invisible on cream). */
body.theme-varsity .bk-game .bk-pts { color: var(--felt-ink) !important; }
body.theme-varsity .bk-game .bk-side.won .bk-pts { font-weight: 800; }
.bracket-scroll { scrollbar-width: thin; scrollbar-color: var(--c-hairline-2, rgba(255,255,255,.18)) transparent; }
.bracket-scroll::-webkit-scrollbar { height: 8px; }
.bracket-scroll::-webkit-scrollbar-thumb { background: var(--c-hairline-2, rgba(255,255,255,.18)); border-radius: 8px; }
.bracket-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---- a little more life in the colors ------------------------------------------------------------ */
/* Win and loss read brighter in both looks. */
body.theme-varsity, body.theme-primetime { --c-win: #2fe08f; --c-loss: #ff5b61; }

/* VARSITY: a richer navy, warmer cream and gold. */
body.theme-varsity {
  --c-night: #0a1830; --c-surface: #13284d; --c-raised: #1a3561; --c-raised-2: #234378;
  --c-ink-2: #e0d2ac; --c-gold: #f2c14e; --cream: #f8e6b0; --felt: #f6ead0;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 6px),
    radial-gradient(120% 70% at 50% -10%, #24508c 0%, #10264a 45%, #08142b 100%) !important;
}
body.theme-varsity :is(.panel, .cycle-card, .fac, .award, .coach-card, .prog, .offer, .banner) {
  background: linear-gradient(180deg, #183563, #11264a) !important;
}
body.theme-varsity :is(.panel.feature, .menu-continue, .offers-panel) { background: linear-gradient(180deg, #1b3b6e, #122a52) !important; }

/* PRIMETIME: still black and chrome, lit by your team's color. */
body.theme-primetime {
  background:
    radial-gradient(90% 45% at 50% -8%, color-mix(in srgb, var(--team-accent) 22%, transparent) 0%, transparent 70%),
    radial-gradient(120% 60% at 50% -12%, #2c3038 0%, #0b0c0e 50%, #000 100%) !important;
}
body.theme-primetime :is(.panel, .cycle-card, .fac, .award, .coach-card, .prog, .offer, .banner) {
  border-top-color: color-mix(in srgb, var(--team-accent) 55%, #4a4f58) !important;
}

/* The playoff bracket: each winner carries a stripe in his team's color. */
.bk-side.won { box-shadow: inset 4px 0 0 var(--tc, var(--team-accent)); }
.bk-side.won.me { box-shadow: inset 4px 0 0 var(--tc, var(--team-accent)), inset 0 0 0 1px var(--team-accent); }

/* The plain intro search engines read (index.html); the game replaces it as soon as it loads. */
.seo-intro { max-width: 720px; margin: 48px auto; padding: 0 20px; color: var(--c-ink, #eef2f7); font-family: var(--sans, system-ui); }
.seo-intro h1 { font-size: 32px; margin: 0 0 8px; }
.seo-intro p, .seo-intro li { color: var(--c-ink-2, #a9b3c3); line-height: 1.5; }

/* Privacy and analytics links: a quiet footer at the end of the page, not pinned over the game. */
.site-foot { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; padding: 28px 16px 22px; font-size: 12px; letter-spacing: 0.02em; }
.site-foot a, .site-foot button { color: var(--c-ink-3, #8a978f); background: none; border: 0; padding: 4px 2px; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.site-foot a:hover, .site-foot button:hover { color: var(--c-ink, #eef2ee); }
.site-foot [hidden] { display: none; }
.site-foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.site-foot-links a { text-decoration: none; }
