/* College Football TV Schedule. Phone first; light and dark themes. */
:root {
  --sponsor-h: 36px;
  --bg: #f4f6f3;
  --card: #ffffff;
  --ink: #17201a;
  --muted: #5d6b62;
  --line: #dde3dd;
  --accent: #14532d;
  --accent-ink: #ffffff;
  --chip: #eef2ee;
  --broadcast: #1d4ed8;
  --cable: #334155;
  --streaming: #7c3aed;
  --new: #c2410c;
  --live: #dc2626;
  --rank: #a16207;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411;
    --card: #18201b;
    --ink: #e7ece8;
    --muted: #9aa8a0;
    --line: #2b362f;
    --accent: #22c55e;
    --accent-ink: #06260f;
    --chip: #222c26;
    --broadcast: #60a5fa;
    --cable: #cbd5e1;
    --streaming: #c4b5fd;
    --new: #fb923c;
    --live: #f87171;
    --rank: #facc15;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
button, select, input { font: inherit; color: inherit; }
main { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }

.devbar { background: #b91c1c; color: #fff; text-align: center; font-weight: 700; font-size: 13px; padding: 4px; }

header.site {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 980px; margin: 0 auto; padding: 12px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 17px; }
.brand b { color: var(--accent); }
.brand .logo { font-size: 22px; }
header.site nav { display: flex; gap: 14px; font-size: 14px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--ink); }

/* Week header */
.weekhead { text-align: center; margin: 4px 0 10px; }
.weeknav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.weeknav .arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.weeknav .arrow.off { opacity: .3; }
.weektitle { position: relative; }
.weektitle h1 { margin: 0; font-size: 26px; }
#weekpick {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.weektitle h1::after { content: " ▾"; font-size: 14px; color: var(--muted); vertical-align: middle; }
.weekstats { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* Controls */
.controls {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg); padding: 8px 0 4px; border-bottom: 1px solid var(--line);
}
.controls .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.seg { display: inline-flex; align-items: center; background: var(--chip); border-radius: 10px; padding: 3px; }
.seg button {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted);
}
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.seglabel { font-size: 12px; color: var(--muted); padding: 0 6px 0 8px; }
.filters select, .filters input[type=search] {
  height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); padding: 0 8px; max-width: 100%;
}
.filters input[type=search] { width: 150px; }
.check { display: inline-flex; gap: 5px; align-items: center; font-size: 14px; color: var(--muted); }
.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.count { margin: 0; font-size: 12px; color: var(--muted); }

/* Groups and cards */
.group h2 {
  font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  margin: 20px 0 8px; display: flex; justify-content: space-between; align-items: baseline;
}
.gcount { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; }
.game {
  display: grid; grid-template-columns: 78px 1fr auto; gap: 4px 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.game.live { border-color: var(--live); }
.g-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.g-time .t { font-weight: 700; font-size: 15px; white-space: nowrap; }
.g-time .tz, .g-time .dayabbr, .g-time .clock { font-size: 11px; color: var(--muted); }
.g-time .dayabbr { text-transform: uppercase; font-weight: 600; }
.g-time .final { font-size: 13px; color: var(--muted); font-weight: 600; }
.livetag { color: var(--live); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.team { display: flex; align-items: center; gap: 6px; min-height: 26px; min-width: 0; }
.team img, .team .nologo { width: 24px; height: 24px; flex: none; object-fit: contain; }
.team .at { color: var(--muted); font-size: 12px; }
.team .tname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team .rank { font-size: 11px; font-weight: 700; color: var(--rank); }
.team .conf { font-size: 11px; color: var(--muted); background: var(--chip); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.team .score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 8px; }
.team.won .tname, .team.won .score { color: var(--accent); }
.g-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; }
.g-meta .note { color: var(--ink); font-weight: 600; }
.g-tv { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.net {
  border: 1px solid currentColor; background: transparent; border-radius: 7px; padding: 3px 8px;
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.net-broadcast { color: var(--broadcast); }
.net-cable { color: var(--cable); }
.net-streaming { color: var(--streaming); }
.net.tba { color: var(--muted); border-style: dashed; font-weight: 500; cursor: default; }
.net.hit { background: var(--chip); }
.new {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: #fff; background: var(--new); border-radius: 4px; padding: 0 4px; vertical-align: 1px;
}
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

footer.site { max-width: 980px; margin: 0 auto; padding: 20px 16px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* Prose pages */
.prose { max-width: 680px; }
.prose h1 { font-size: 26px; }
.prose li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .game { grid-template-columns: 70px 1fr; gap: 4px 10px; }
  .g-tv { grid-column: 2; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  .team .conf { display: none; }
  .filters select { flex: 1 1 45%; min-width: 0; }
  .filters input[type=search] { flex: 1 1 45%; width: auto; }
  .weektitle h1 { font-size: 22px; }
  .brand { font-size: 15px; }
  header.site nav a[href="/"] { display: none; }
  /* The full filter bar is too tall to pin on a phone. */
  .controls { position: static; }
}

/* Feedback panel (templates/partials/feedback.php, assets/js/feedback.js) and the /feedback board.
   Floating pill bottom-right; icon only on phones. Colors come from the tokens above, so dark mode follows. */
.g-fix {
  border: 0; background: none; padding: 2px 0; margin: 0; cursor: pointer;
  font-size: 11px; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 2px; white-space: nowrap;
}
.g-fix:hover, .g-fix:focus-visible { color: var(--ink); }
.fb-launch {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px 9px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); -webkit-tap-highlight-color: transparent;
}
.fb-launch:hover { border-color: var(--accent); }
.fb-launch svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
footer.site { padding-bottom: 80px; }
@media (max-width: 640px) {
  .fb-launch { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 44px; height: 44px; padding: 0; justify-content: center; opacity: .94; }
  .fb-launch .fb-lbl { display: none; }
}
html.fb-open { overflow: hidden; }
html.fb-open .fb-launch { visibility: hidden; }
.fb-overlay[hidden], .fb-overlay [hidden] { display: none !important; }
.fb-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.fb-sheet {
  width: 100%; max-width: 460px; max-height: min(92vh, 720px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.fb-top { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; position: sticky; top: -12px; background: var(--card); padding: 6px 0; z-index: 1; }
.fb-top h2 { font-size: 19px; margin: 0; flex: 1; min-width: 0; }
.fb-back, .fb-x {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--chip); color: var(--muted);
  font-size: 19px; line-height: 1; cursor: pointer; display: grid; place-items: center; flex: none;
}
.fb-back:hover, .fb-x:hover { color: var(--ink); }
.fb-lead { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.fb-muted { color: var(--muted); font-weight: 400; font-size: 13px; }
.fb-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; margin: 0 0 8px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
}
.fb-choice:hover, .fb-choice:focus-visible { border-color: var(--accent); }
.fb-choice strong { display: block; font-size: 15px; }
.fb-choice small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.fb-cic { width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--accent); }
.fb-cic svg { width: 20px; height: 20px; }
.fb-foot { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.fb-foot a { font-weight: 600; }
.fb-step .fb-l { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 5px; }
.fb-step .fb-l:first-child { margin-top: 0; }
.fb-step input:not([type=hidden]), .fb-step textarea {
  display: block; width: 100%; font-family: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
}
.fb-step textarea { resize: vertical; }
.fb-step input:focus, .fb-step textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip { border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 999px; padding: 6px 11px; font-size: 13px; cursor: pointer; }
.fb-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.fb-game { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--chip); font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fb-game strong { color: var(--ink); font-size: 15px; }
.fb-ctx { margin: 12px 0; font-size: 12px; color: var(--muted); }
.fb-ctx summary { cursor: pointer; }
.fb-ctx pre {
  white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); max-height: 160px; overflow: auto; margin: 6px 0 0;
}
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-send, .fb-btn {
  display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center;
}
.fb-send { width: 100%; margin-top: 16px; }
.fb-send:disabled { opacity: .6; cursor: default; }
.fb-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.fb-done { text-align: center; padding: 8px 0 2px; }
.fb-done h3 { font-size: 21px; margin: 0 0 8px; }
.fb-done-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fb-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 110;
  max-width: min(92vw, 420px); padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.fb-toast.on { opacity: 1; transform: translate(-50%, 0); }
.fb-toast.err { background: var(--live); color: #fff; }
@media (max-width: 640px) {
  .fb-overlay { align-items: flex-end; padding: 0; }
  .fb-sheet { max-width: none; max-height: 94vh; border-radius: 16px 16px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-bottom: 0; }
}
@media print { .fb-launch, .fb-overlay, .fb-toast, .g-fix { display: none !important; } }
/* The /feedback board */
.fb-board .fb-cta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 14px 0 8px; }
.fb-board .fb-cta .fb-choice { margin: 0; background: var(--card); }
.fb-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.fb-bar h2 { margin: 0; font-size: 19px; }
.fb-sort { padding: 6px 11px; border-radius: 8px; font-size: 14px; color: var(--muted); text-decoration: none; }
.fb-sort.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.fb-list { display: flex; flex-direction: column; gap: 8px; }
.fb-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fb-item-main { flex: 1; min-width: 0; }
.fb-item h3 { font-size: 16px; margin: 0 0 4px; overflow-wrap: anywhere; }
.fb-item p { margin: 0 0 6px; color: var(--muted); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.fb-meta { font-size: 12px; color: var(--muted); }
.fb-votebtn {
  display: flex; flex-direction: column; align-items: center; min-width: 50px; padding: 6px 4px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; flex: none;
}
.fb-votebtn [data-votes] { font-size: 17px; color: var(--ink); }
.fb-votebtn:hover:not(:disabled) { border-color: var(--accent); }
.fb-votebtn:disabled { cursor: default; }
.fb-votebtn.voted { border-color: var(--accent); color: var(--accent); }

/* Sponsor banner (top and bottom of every page) */
.sponsor {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px;
  padding: 8px 16px; background: #0b2e1a; color: #e7f5ec; text-decoration: none; font-size: 13px; text-align: center;
}
.sponsor b { color: #fff; font-size: 14px; }
/* The top banner stays in view while scrolling; the sticky filter bar sits just under it. */
.sponsor-top { position: sticky; top: 0; z-index: 30; height: var(--sponsor-h); flex-wrap: nowrap; overflow: hidden; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
@media (max-width: 900px) { .sponsor-top .sponsor-pitch { display: none; } }
.controls { top: var(--sponsor-h) !important; }
.sponsor-label { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; opacity: .75; }
.sponsor-pitch { opacity: .9; }
.sponsor-go { font-weight: 700; color: #86efac; }
.sponsor:hover .sponsor-go { text-decoration: underline; }
@media (max-width: 640px) { .sponsor-pitch { display: none; } }

/* App: buttons, get-the-app bar, update sheet, /app page */
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px;
  padding: 9px 14px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.appnudge {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 16px; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .12); font-size: 14px;
}
.appnudge span { flex: 1; min-width: 0; }
.appnudge button { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 0 4px; }
body:has(.appnudge) .fb-launch { bottom: calc(76px + env(safe-area-inset-bottom)); }
body:has(.appnudge) footer.site { padding-bottom: 110px; }
.appsheet { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; }
.appsheet-in {
  background: var(--card); width: 100%; max-width: 520px; border-radius: 16px 16px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}
.appsheet-in h2 { margin: 0 0 6px; }
.appsheet-btns { display: flex; align-items: center; gap: 16px; margin: 12px 0 6px; }
.appcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 12px; margin: 14px 0; }
.appcard .btn { margin-right: 8px; }

/* Game alerts */
.bell { display: none; }
.alerts-on .bell {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; width: max-content;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 2px 8px 2px 6px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.alerts-on .bell svg { fill: currentColor; }
.alerts-on .bell:hover { color: var(--ink); border-color: var(--muted); }
.alerts-on .bell.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.alerts-on .bell.on .bell-txt::after { content: " on"; }
.chip {
  height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 0 12px;
  cursor: pointer; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.game.focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.leads { border: 0; padding: 0; margin: 8px 0; }
.leads legend { font-weight: 600; margin-bottom: 6px; }
.leads label { display: flex; align-items: center; gap: 8px; padding: 9px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
.leads input { width: 20px; height: 20px; accent-color: var(--accent); }
.appsheet .err { color: var(--live); }
.linkish.danger { color: var(--live); }
.cfb-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 130;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2); transition: opacity .4s;
}
.cfb-toast.out { opacity: 0; }
