:root {
  --ink: #211f1a;
  --muted: #68645c;
  --line: #cbc6ba;
  --surface: #fffefb;
  --page: #f2efe8;
  --navy: #17324d;
  --lime: #dff45b;
}

* { box-sizing: border-box; }
html { min-height: 100%; font-size: 15px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.5vw, 2.5rem);
}

.navbar {
  min-height: 4.5rem;
  border-color: var(--line) !important;
  background: rgb(255 255 255 / 94%);
}
.navbar-brand { color: var(--ink); font-family: "Manrope", sans-serif; letter-spacing: -.03em; }
.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: .7rem;
  color: var(--lime);
  background: var(--navy);
  font: 800 .72rem/1 "Manrope", sans-serif;
}
.navbar-note { color: var(--muted); font-size: .8rem; }

.access-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding-block: 2rem;
}
.access-card {
  width: min(100%, 24rem);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 3rem rgb(23 32 51 / 10%);
}
.access-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  place-items: center;
  border-radius: .7rem;
  color: var(--lime);
  background: var(--navy);
  font-size: .7rem;
  font-weight: 800;
}
.access-card h1 { font-size: 1.75rem; }
.access-card > p:not(.eyebrow) { margin: .55rem 0 1.25rem; color: var(--muted); font-size: .8rem; }
.access-card label { display: block; margin-bottom: .35rem; font-size: .72rem; font-weight: 800; }
.access-card input[type="password"] {
  width: 100%;
  padding: .7rem .75rem;
  border: 1px solid #cbd3dc;
  border-radius: .6rem;
  outline: none;
}
.access-card input[type="password"]:focus { border-color: var(--navy); box-shadow: 0 0 0 .2rem rgb(23 50 77 / 12%); }
.access-card button {
  width: 100%;
  margin-top: .75rem;
  padding: .72rem;
  border: 0;
  border-radius: .6rem;
  color: #fff;
  background: var(--navy);
  font-size: .78rem;
  font-weight: 800;
}
.access-card button:hover { background: #244b6d; }
.access-error { margin-bottom: .75rem; padding: .55rem .65rem; border-radius: .5rem; color: #842029; background: #f8d7da; font-size: .7rem; }

.dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem 0 .8rem;
}
.eyebrow {
  margin: 0 0 .35rem;
  color: #597313;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font: 800 clamp(1.85rem, 3.2vw, 2.8rem)/1.05 "Manrope", sans-serif;
  letter-spacing: -.055em;
}
.date-range { margin: 0; color: var(--muted); font-weight: 700; }
.window-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #e9edf1;
}
.window-switcher a {
  padding: .58rem .8rem;
  border-radius: .55rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.window-switcher a.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgb(23 32 51 / 12%);
}
.freshness-line {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: .72rem;
}
.data-warning {
  margin-bottom: 1rem;
  padding: .7rem .9rem;
  border: 1px solid #e9cf8f;
  border-radius: .7rem;
  color: #735716;
  background: #fff8e7;
  font-size: .78rem;
}
.data-warning p { margin: 0; }

.sports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: start;
  padding-bottom: 3rem;
}
.sport-column.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--sport-accent);
  border-radius: .15rem;
  background: var(--surface);
  box-shadow: none;
}
.sport-header.card-header {
  display: flex;
  min-height: 4.1rem;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.sport-collapse-toggle {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: .7rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.sport-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .12rem;
  color: #fff;
  background: var(--sport-accent);
  font: 800 .82rem/1 "Manrope", sans-serif;
}
.sport-title { display: flex; min-width: 0; flex-direction: column; }
.sport-title strong {
  font: 800 1.18rem/1.1 "Manrope", sans-serif;
  letter-spacing: -.03em;
}
.sport-title small { margin-top: .12rem; color: var(--muted); font-size: .63rem; font-weight: 600; }
.collapse-chevron {
  display: none;
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}
.sport-collapse-toggle[aria-expanded="true"] .collapse-chevron { transform: rotate(180deg); }
.reload-form { flex: 0 0 auto; }
.reload-button.btn {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .12rem;
  color: var(--muted);
  background: var(--surface);
}
.reload-button.btn:hover { color: #fff; border-color: var(--sport-accent); background: var(--sport-accent); }
.reload-button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.reload-confirmation {
  margin: 0 1rem .6rem;
  padding: .4rem .55rem;
  border-radius: .45rem;
  color: #2f6541;
  background: #e5f4e9;
  font-size: .65rem;
  font-weight: 700;
}

.sport-tabs.nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 .65rem;
  border-bottom: 1px solid var(--line);
  background: #f6f3ec;
}
.sport-tabs .nav-link {
  width: 100%;
  padding: .55rem .35rem .45rem;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.sport-tabs .nav-link span { margin-left: .15rem; opacity: .55; }
.sport-tabs .nav-link.active {
  color: var(--sport-accent);
  border-bottom-color: var(--sport-accent);
  background: transparent;
  box-shadow: none;
}

.games-list.card-body { padding: .45rem .65rem .65rem; }
.game-day + .game-day { margin-top: .7rem; }
.game-day h3 {
  margin: 0 .25rem .45rem;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.day-games { display: grid; gap: 0; border-bottom: 1px solid var(--line); }
.game-card {
  display: block;
  padding: .5rem .35rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
  transition: background 100ms ease;
}
.game-card:hover,
.game-card:focus-visible { color: inherit; background: #f3efe6; box-shadow: none; }
.games-list[data-active-filter="interesting"] .game-card:not(.filter-interesting),
.games-list[data-active-filter="focus"] .game-card:not(.filter-focus) { display: none; }
.game-day.is-empty { display: none; }
.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .4rem;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 600;
}
.game-meta > :last-child { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { color: #c52937; text-transform: uppercase; }
.live-dot::before {
  content: "";
  display: inline-block;
  width: .4rem;
  height: .4rem;
  margin-right: .3rem;
  border-radius: 50%;
  background: #dd3040;
}
.matchup { display: grid; gap: .22rem; }
.team-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .4rem; }
.team-identity { display: flex; min-width: 0; flex: 1; align-items: center; gap: .45rem; }
.team-abbr {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .08rem;
  color: var(--sport-accent);
  background: #ece8df;
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.team-name-line { display: flex; min-width: 0; flex: 1; align-items: baseline; gap: .4rem; }
.team-identity strong { min-width: 0; overflow: hidden; font-size: .76rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.team-row:not(.winner) .team-identity strong { font-weight: 600; }
.team-identity small { flex: 0 0 auto; color: var(--muted); font-size: .57rem; }
.cfb-rank { color: var(--sport-accent); font-size: .58rem; letter-spacing: -.04em; }
.cfb-rank:empty,
.team-spacer { background: transparent; }
.team-score { font: 800 .9rem/1 "Manrope", sans-serif; }
.empty-state,
.filter-empty { padding: 3rem 1rem; color: var(--muted); text-align: center; }
.empty-state strong,
.filter-empty strong { display: block; color: var(--ink); font-size: .85rem; }
.empty-state p,
.filter-empty p { margin: .25rem 0 0; font-size: .72rem; }

.daily-view {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .15rem;
  background: var(--surface);
  box-shadow: none;
}
.daily-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.daily-view > summary { cursor: pointer; list-style: none; }
.daily-view > summary::-webkit-details-marker { display: none; }
.daily-view[open] .injury-chevron { transform: rotate(180deg); }
.daily-view-header > div:first-child { display: flex; flex-direction: column; }
.daily-view-header strong { font-size: 1rem; }
.daily-view-header span { color: var(--muted); font-size: .68rem; }
.daily-filters { display: flex; gap: .35rem; }
.daily-filters button {
  min-width: 3rem;
  padding: .4rem .55rem;
  border: 1px solid var(--sport-accent);
  border-radius: .5rem;
  color: var(--sport-accent);
  background: #fff;
  font-size: .6rem;
  font-weight: 800;
}
.daily-filters button:hover { background: #f4f6f8; }
.daily-filters button.active {
  color: #fff;
  background: var(--sport-accent);
  box-shadow: 0 2px 6px rgb(23 32 51 / 12%);
}
.daily-group { padding: 1rem 1.15rem; }
.daily-group + .daily-group { border-top: 1px solid var(--line); }
.daily-date { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.daily-date h2 { margin: 0; font-size: .85rem; font-weight: 800; }
.daily-date time { color: var(--muted); font-size: .65rem; font-weight: 700; }
.daily-game-list { display: grid; gap: 0; border-bottom: 1px solid var(--line); }
.daily-game {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) minmax(7rem, 11rem);
  gap: .8rem;
  align-items: center;
  min-width: 0;
  padding: .55rem .35rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
  transition: background 100ms ease;
}
.daily-game:hover,
.daily-game:focus-visible { color: inherit; background: #f3efe6; box-shadow: none; }
.daily-game-lead { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.daily-sport {
  padding: .18rem .38rem;
  border-radius: .08rem;
  color: #fff;
  background: var(--sport-accent);
  font-size: .55rem;
  font-weight: 800;
}
.daily-game-lead time { color: var(--muted); font-size: .64rem; font-weight: 700; }
.daily-matchup { display: grid; gap: .28rem; min-width: 0; }
.daily-team { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; align-items: center; gap: .45rem; min-width: 0; }
.daily-team .team-abbr { width: 1.5rem; height: 1.5rem; border-radius: .38rem; }
.daily-team > strong { overflow: hidden; font-size: .75rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.daily-team.winner > strong { font-weight: 800; }
.daily-team > b { font-size: .78rem; }
.daily-team > small { color: var(--muted); font-size: .58rem; }
.daily-game-meta { min-width: 0; color: var(--muted); font-size: .59rem; text-align: right; }
.daily-game-meta > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-empty { margin: 0; padding: .8rem; border-radius: .6rem; color: var(--muted); background: #f6f8f9; font-size: .7rem; text-align: center; }
.daily-filter-empty { margin: 0; padding: 2rem; color: var(--muted); font-size: .75rem; text-align: center; }

.my-teams-view { max-width: 1100px; margin: 0 auto 3rem; }
.favorite-injuries,
.favorite-games {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .15rem;
  background: var(--surface);
  box-shadow: none;
}
.favorite-games { margin-top: 1rem; }
.global-injuries { max-width: 1100px; margin: 1.25rem auto 1.5rem; }
.global-injuries > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.global-injuries > summary::-webkit-details-marker { display: none; }
.injury-chevron {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}
.global-injuries[open] .injury-chevron { transform: rotate(180deg); }
.my-teams-view .favorite-games { margin-top: 0; }
.today-view { margin-bottom: 3rem; }
.today-view > summary { cursor: pointer; list-style: none; }
.today-view > summary::-webkit-details-marker { display: none; }
.today-view[open] > summary .injury-chevron { transform: rotate(180deg); }
.today-view-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
  padding: .65rem .15rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.today-view-header h2 { margin: 0; font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.today-view-header p { margin: .15rem 0 0; color: var(--muted); font-size: .68rem; }
.today-view-meta { display: flex; align-items: center; gap: .75rem; }
.today-view-meta > span { color: var(--muted); font-size: .65rem; }
.today-view .sports-grid { padding-bottom: 0; }
.my-teams-section-heading { padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.my-teams-section-heading h2 { margin: 0; font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.my-teams-section-heading p { margin: .15rem 0 0; color: var(--muted); font-size: .65rem; }
.favorite-injury-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: .75rem; }
.favorite-injury-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--sport-accent);
  border-radius: .1rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}
.favorite-injury-card:hover,
.favorite-injury-card:focus-visible { color: inherit; border-color: var(--sport-accent); box-shadow: 0 .35rem 1rem rgb(23 32 51 / 8%); }
.favorite-injury-card > header,
.favorite-schedule > header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .75rem; }
.favorite-injury-card h3,
.favorite-schedule h3 { margin: 0; font-size: .8rem; font-weight: 800; }
.favorite-injury-card > header > span { display: grid; min-width: 1.45rem; height: 1.45rem; place-items: center; border-radius: .08rem; color: #fff; background: var(--sport-accent); font-size: .55rem; font-weight: 800; }
.favorite-injury-card ul { display: grid; gap: .3rem; max-height: 18rem; margin: 0; padding: 0 .65rem .65rem; overflow: auto; list-style: none; }
.favorite-injury-card li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .38rem .2rem; border-top: 1px solid var(--line); border-radius: 0; background: transparent; font-size: .61rem; }
.favorite-injury-card li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-injuries { margin: 0 .65rem .65rem; padding: .7rem; color: var(--muted); background: #f6f8f9; font-size: .65rem; text-align: center; }
.favorite-schedule-grid { display: grid; gap: .75rem; padding: .75rem; }
.favorite-schedule { overflow: hidden; border: 1px solid var(--line); border-top: 3px solid var(--sport-accent); border-radius: .75rem; }
.favorite-schedule > header { border-bottom: 1px solid var(--line); }
.favorite-schedule > header > div { display: flex; flex-direction: column; }
.favorite-schedule > header span { color: var(--muted); font-size: .6rem; }
.favorite-game-list { display: grid; grid-template-columns: 1fr; gap: .4rem; padding: .55rem; }
.favorite-game-list .daily-game { grid-template-columns: 7.5rem minmax(0, 1fr) minmax(4rem, 7rem); padding: .5rem .6rem; }

.injuries-panel { margin: 0 .75rem .8rem; border: 1px solid var(--line); border-radius: .72rem; background: #fafbfc; }
.injuries-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem;
  cursor: pointer;
  list-style: none;
}
.injuries-panel > summary::-webkit-details-marker { display: none; }
.injuries-panel > summary span:first-child { display: flex; flex-direction: column; }
.injuries-panel > summary strong { font-size: .76rem; }
.injuries-panel > summary small { color: var(--muted); font-size: .6rem; }
.injury-total {
  display: grid;
  min-width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-size: .6rem;
  font-weight: 800;
}
.injury-list { max-height: 28rem; padding: 0 .55rem .55rem; overflow: auto; }
.injury-team { border-top: 1px solid var(--line); }
.injury-team > summary { padding: .55rem .2rem; cursor: pointer; font-size: .68rem; font-weight: 700; }
.injury-team > summary span { float: right; color: var(--muted); }
.injury-team ul { display: grid; gap: .35rem; margin: 0 0 .55rem; padding: 0; list-style: none; }
.injury-team li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .4rem .45rem;
  border-radius: .4rem;
  background: #fff;
  font-size: .61rem;
}
.injury-team li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.injury-status { flex: 0 0 auto; padding: .14rem .28rem; border-radius: .25rem; color: #765c17; background: #fff2c6; font-size: .53rem; font-weight: 800; }
.status-out,
.status-injured-reserve { color: #8b2632; background: #fae1e3; }

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .67rem;
}

@media (min-width: 900px) {
  .sport-content.collapse:not(.show) { display: block !important; }
  .sport-collapse-toggle { pointer-events: none; }
}

@media (max-width: 899.98px) {
  html { font-size: 16px; }
  .dashboard-header { align-items: stretch; flex-direction: column; gap: 1.1rem; padding-top: 1.7rem; }
  .window-switcher { width: 100%; }
  .window-switcher a { flex: 1; }
  .freshness-line { flex-direction: column; gap: .2rem; }
  .sports-grid { grid-template-columns: 1fr; gap: .75rem; }
  .sport-column.card { width: 100%; }
  .sport-header.card-header { min-height: 4.4rem; }
  .collapse-chevron { display: block; }
  .sport-content { border-top: 1px solid var(--line); }
  .daily-view-header { align-items: center; flex-direction: row; }
  .daily-group { padding: .85rem; }
  .daily-game { grid-template-columns: 1fr; gap: .55rem; }
  .daily-game-lead { justify-content: space-between; }
  .daily-game-meta { display: flex; justify-content: space-between; text-align: left; }
  .favorite-injury-grid,
  .favorite-game-list { grid-template-columns: 1fr; }
  .favorite-game-list .daily-game { grid-template-columns: 1fr; }
  .app-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
