:root {
  --fscj-primary: #003B5C;
  --fscj-secondary: #3EB1C8;
  --fscj-accent: #005F83;

  --ju-primary: #004D40;
  --ju-secondary: #A6CF54;
  --ju-accent: #ffffff;

  --ewu-primary: #7B2683;
  --ewu-secondary: #EC6728;
  --ewu-accent: #FEA30B;

  --unf-primary: #0A233F;
  --unf-secondary: #A7A8A9;
  --unf-accent: #00B2E2;
}


body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 2rem;

  background: #e3e3e3;
}

.page {
/*max-width: 900px;
  margin: 0 auto;*/
  gap: 1em;
}

.cal-n-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/*! #calendar {
  width: 60em;
  /*! margin-left: 20em; 
}*/

/* TEAM BUTTONS */
.team-selector {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: .5em;

  /* prevents vertical pushing */
  min-height: 120px;
}

.team-card {
  flex: 1 1 140px; /* default equal size */
  min-width: 120px;
  max-width: 247px;
  padding: 12px;
  height: fit-content;

  border: 1px solid #222;
  overflow: hidden;
  cursor: pointer;

  display: flex;
  flex-direction: column;

  transition:
    flex 0.25s ease,
    max-width 0.25s ease,
    background-color 0.15s ease;
}

/* COMMENTED OUT (CLEAN UP)
.team-card:hover {
  border-color: #000;
}
*/

.team-card h2 {
  margin: 0;
}

/* COMMENTED OUT (CLEAN UP)
.team-selector.has-active .team-card {
  flex: 0.6 1 120px;
  max-width: 300px;
  padding: 12px;
}
*/

/* COMMENTED OUT (CLEAN UP)
The expanded card 
.team-card.expanded {
  flex: 3 1 420px;
  max-width: 520px;
}*/

.team-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*! gap: 8px; */

  font-size: 1.1rem;
  font-weight: 600;

  white-space: nowrap;
  user-select: none;
  padding-bottom: 4px;
}

.team-card-header .color-swatch {
  width: 90px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* COMMENTED OUT (CLEAN UP)
.team-card-body {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  transition: opacity 0.15s ease;
} 
*/

.team-card.expanded .team-card-body {
  opacity: 1;
  pointer-events: auto;
  max-height: none;

  display: flex;
  flex-direction: row;
  gap: 16px;
}

.team-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
}

[data-team="fscj"].team-card.expanded .team-title-row {
  border: solid 2px var(--fscj-secondary)
}
[data-team="ju"].team-card.expanded .team-title-row {
  border: solid 2px var(--ju-secondary)
}
[data-team="ewu"].team-card.expanded .team-title-row {
  border: solid 2px var(--ewu-secondary)
}
[data-team="unf"].team-card.expanded .team-title-row {
  border: solid 2px var(--unf-secondary)
}

.team-school-name {
  font-size: 0.8rem;
}

.team-record {
  font-size: 0.9rem;
  white-space: nowrap;
}

.team-page-link {
  font-size: .98rem;
}

/* TEAM DETAILS */
.team-details {
  border-top: 2px solid #eee;
  padding-top: 2rem;
}

/* --- Static team card mode --- */
.team-card {
  cursor: default;
}

.team-card-body {
  opacity: 1;
  pointer-events: auto;
  max-height: none;
  display: block;
}

/* Disable expanded styling without deleting it */
.team-card.expanded {
  flex: 1 1 140px;
  max-width: 300px;
}

.team-details-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-record {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
}

.team-record.winning { color: #4caf50; }
.team-record.losing  { color: #e53935; }

/* COMMENTED OUT (CLEAN UP)
.team-colors {
  display: flex;
  justify-content: space-around;
  gap: 6px;
}
*/

/* COMMENTED OUT (CLEAN UP)
.color-swatch {
  width: 40px;
  height: 40px;
}
*/

.hidden {
  display: none;
}

.team-header h1 {
  margin-bottom: 0.25rem;
}

.team-meta {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0;
}

.color-squares {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.color-square {
  width: 100px;
  height: 100px;
  border-radius: 8px;       /* optional */
  border: 1px solid #ccc;   /* optional */
}

.coaching-staff ul {
  padding-left: .5rem;
}

#calendar-grid {
  display: flex;
  flex-direction: row;
  gap: 24px;

  /* keeps months aligned */
  align-items: flex-start;

  /* prevents vertical bloat */
  /* max-height: 460px; */
}

.calendar-scroll {
  overflow-x: auto;
  overflow-y: hidden;

  padding-bottom: 0.5rem;

  /* prevents page-wide scrollbars */
  max-width: 100%;

  /* subtle separation */
  border-bottom: 2px solid #111;
}

/*added*/
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}


/*.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}*/
.calendar-month {
  flex: 0 0 auto;
  width: max-content; /* 👈 key line */
}

.calendar-month.is-october {
  opacity: 0.85;
  border-right: 2px dashed #111;
  padding-right: 12px;
  width: 15em;
}

.calendar-month.is-october .calendar-day {
  border-style: dashed;
}

.calendar-month .calendar-month-grid {
  min-width: 520px;
}

/*.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
}*/
.calendar-month-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/*added !!*/
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 4px;

  display: none;
}

.calendar-day {
  width: 64px;
  min-height: 64px;

  padding: 6px;

  border: 2px solid #111;
  background: #f5f5f5;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}
.calendar-day-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;

  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  border-bottom: 2px solid #111;
  padding-bottom: 2px;
  margin-bottom: 4px;
}

.calendar-day-label .day-name {
  opacity: 0.85;
}

.calendar-day-label .day-num {
  font-size: 0.9rem;
}

.calendar-day.has-games {
  background: #fff;
  cursor: pointer;
}

.calendar-day.has-games:hover {
  background: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px #111;
}

/* COMMENTED OUT (CLEAN UP)
.game-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin: 2px 2px 0 0;
  display: inline-block;
}
*/

.calendar-game {
  width: 100%;
  flex: 1;
  margin-top: 3px;
}

/* COMMENTED OUT (CLEAN UP)
.calendar-date-block {
  min-height: 80px;
  padding: 4px;

  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;

  border: 1px solid #222;
}
*/

/*
.calendar-game:hover {
  outline: 2px solid #ffffff;
}
*/

.calendar-game.has-stats {
  /*! box-shadow: 2px 3px #fff; */
  transition: translate(X, Y);
}

/* COMMENTED OUT (CLEAN UP)
.calendar-game.has-stats:hover {
    box-shadow: 0px 0px #fff;
    transform: translate(2px, 3px);
}
*/

/* COMMENTED OUT (CLEAN UP)
#game-meta, #game-location, #game-result {
  margin-top: 0.5rem;
  padding-left: 0.5rem;
}
  */

#game-detail {
  position: sticky;
  top: 1rem;

  gap: 1.25rem;

  padding: 1.25rem;

  border: 3px solid #111;

  font-family: system-ui, sans-serif;
}

#game-detail.hidden {
  display: none;
}

#game-detail:not(.hidden) {
  position: sticky;
  top: 1rem;
}

.game-detail-block {
  border: 2px solid #111;
  padding: 1rem;
  background: #fafafa;
  min-width: 260px;
  width: 25em;

  display: flex;
  flex-direction: column;
}

.game-detail-block h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.game-detail-block + .game-detail-block {
  border-left: 4px solid #111;
}

.game-meta,
.game-result {
  font-size: 0.9rem;
  font-weight: 600;
}

.stats-leaders {
  margin-top: 0.75rem;
  padding-top: 0.5rem;

  border-top: 2px solid currentColor;

  font-size: 1rem;
  letter-spacing: 0.05em;
  text-shadow: 1px 1px #000;
}
.stats-leaders strong {
  display: block;
  margin-bottom: 0.25rem;

  font-weight: 900;
  text-transform: uppercase;
}
.stats-leaders h4 {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

#game-stats-container {
  padding: 1rem;
  margin-top: 1rem;
  transition: background-color 0.15s ease;
}

.game-stats-shell button {
  margin-top: 0.5rem;

  background: transparent;
  color: currentColor;

  border: 2px solid currentColor;
  padding: 0.25rem 0.6rem;

  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  cursor: pointer;
}

.game-stats-shell button:hover {
  background: currentColor;
  color: #000;
}

#game-stats-container h4 {
  margin-top: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.game-matchup {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;

  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-team {
  letter-spacing: 0.05em;
}

.vs {
  font-size: 0.85rem;
  opacity: 0.6;
}

.game-opponent {
  font-weight: 700;
  opacity: 0.85;
  text-align: right;
  max-width: 50%;
}

.game-date {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.game-score {
  margin-top: 0.5rem;
  font-size: 1.4rem;
  font-weight: 900;
}

.player-view-toggle {
  display: flex;
  flex-direction: column;
}

/*
.player-stat-row {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 0.9rem;
}
*/

.calendar-game[data-team="fscj"] { background: var(--fscj-secondary); }
.calendar-game[data-team="ju"]   { background: var(--ju-secondary); }
.calendar-game[data-team="ewu"]  { background: var(--ewu-secondary); }
.calendar-game[data-team="unf"] { background: var(--unf-primary); }

[data-team="fscj"] .color-swatch.primary { background: var(--fscj-primary); }
[data-team="fscj"] .color-swatch.secondary { background: var(--fscj-secondary); }
[data-team="fscj"] .color-swatch.accent { background: var(--fscj-accent); }

[data-team="ju"] .color-swatch.primary { background: var(--ju-primary); }
[data-team="ju"] .color-swatch.secondary { background: var(--ju-secondary); }
[data-team="ju"] .color-swatch.accent { background: var(--ju-accent); }

[data-team="ewu"] .color-swatch.primary { background: var(--ewu-primary); }
[data-team="ewu"] .color-swatch.secondary { background: var(--ewu-secondary); }
[data-team="ewu"] .color-swatch.accent { background: var(--ewu-accent); }

[data-team="unf"] .color-swatch.primary { background: var(--unf-primary); }
[data-team="unf"] .color-swatch.secondary { background: var(--unf-secondary); }
[data-team="unf"] .color-swatch.accent { background: var(--unf-accent); }

.game-detail-block .game-stats-shell {
  color: currentColor;
}


.game-stats-shell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color: #f5f5f5;

  padding: 0.75rem 1rem;
  margin-top: 0.75rem;

  border: 2px solid currentColor;
  box-shadow: 3px 3px #000;

  position: relative;
}


.game-links {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 2px solid #111;

  font-size: 0.85rem;
}

.game-links a {
  font-weight: 600;
  text-decoration: underline;
}

.game-location {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.75;
}

#game-detail[data-team="fscj"] {
  border-left: 8px solid var(--fscj-secondary);
}

#game-detail[data-team="ju"] {
  border-left: 8px solid var(--ju-secondary);
}

#game-detail[data-team="ewu"] {
  border-left: 8px solid var(--ewu-secondary);
}

#game-detail[data-team="unf"] {
  border-left: 8px solid var(--unf-secondary);
}

.game-detail-block[data-team="fscj"] .game-team { color: var(--fscj-secondary); }
.game-detail-block[data-team="ju"]   .game-team { color: var(--ju-secondary); }
.game-detail-block[data-team="ewu"]  .game-team { color: var(--ewu-secondary); }
.game-detail-block[data-team="unf"]  .game-team { color: var(--unf-secondary); }

.game-detail-block[data-team="fscj"] { border-left: 6px solid var(--fscj-secondary); }
.game-detail-block[data-team="ju"]   { border-left: 6px solid var(--ju-secondary); }
.game-detail-block[data-team="ewu"]  { border-left: 6px solid var(--ewu-secondary); }
.game-detail-block[data-team="unf"]  { border-left: 6px solid var(--unf-secondary); }

/* hiding the score by period section */
.score-by-period,
.period-scores {
  display: none;
}

.game-day-header {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.game-day-games {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: stretch;
  flex-wrap: wrap; /* allows wrap if many games */
}

.score-bar {
  display: flex;
  height: 14px;
  margin-top: 0.5rem;

  border: 2px solid #111;
  box-shadow: 2px 2px #000;
  background: #fff;

  overflow: hidden;
}

.score-bar-team {
  width: var(--team-pct);
  filter: saturate(1.1);
}
.score-bar[data-team="fscj"] .score-bar-team {
  background: var(--fscj-secondary);
}

.score-bar[data-team="ju"] .score-bar-team {
  background: var(--ju-secondary);
}

.score-bar[data-team="ewu"] .score-bar-team {
  background: var(--ewu-secondary);
}

.score-bar[data-team="unf"] .score-bar-team {
  background: var(--unf-secondary);
}

.score-bar-opponent {
  width: var(--opp-pct);
  background:
    repeating-linear-gradient(
      45deg,
      #000 0,
      #000 2px,
      #fff 2px,
      #fff 4px
    );
}

/* === STATS TABLE — LIGHT TERMINAL / PRINT STYLE === */

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.06em;

  background: #f7f7f4; /* paper */
  color: #111;

  border: 2px solid #111;
  box-shadow: 3px 3px #000;

  position: relative;
}

/* HEADER */
.stats-table thead th {
  padding: 0.45rem 0.6rem;

  text-align: right;
  font-weight: 900;
  text-transform: uppercase;

  background: #f0f0ed;
  color: #000;

  border-bottom: 3px double #111;
}

.stats-table thead th:first-child {
  text-align: left;
}

/* BODY CELLS */
.stats-table td {
  padding: 0.4rem 0.6rem;

  background: rgba(0,0,0,0.04);
  border-bottom: 1px dashed rgba(0,0,0,0.35);

  text-align: right;
  vertical-align: middle;
}

/* PLAYER COLUMN — LOUDER */
.stats-table td:first-child {
  text-align: left;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #000;
}

/* SLIGHT “INK BLEED” */
.stats-table td,
.stats-table th {
  text-shadow: 0.3px 0.3px rgba(0,0,0,0.25);
}

/* SUBTLE ROW VARIATION */
.stats-table tbody tr:nth-child(even) td {
  background: rgba(0,0,0,0.025);
}

/* ROW HOVER — HIGHLIGHTER */
.stats-table tbody tr:hover td {
  background: rgba(255, 230, 120, 0.35);
}

/* CELL HOVER — FOCUS */
.stats-table td:hover {
  background: rgba(255, 200, 80, 0.65);
  font-weight: 900;
}

/* === COLUMN HOVER — COMPARISON MODE === */
@supports(selector(:has(*))) {

  .stats-table:has(td:nth-child(1):hover) td:nth-child(1),
  .stats-table:has(th:nth-child(1):hover) td:nth-child(1),

  .stats-table:has(td:nth-child(2):hover) td:nth-child(2),
  .stats-table:has(th:nth-child(2):hover) td:nth-child(2),

  .stats-table:has(td:nth-child(3):hover) td:nth-child(3),
  .stats-table:has(th:nth-child(3):hover) td:nth-child(3),

  .stats-table:has(td:nth-child(4):hover) td:nth-child(4),
  .stats-table:has(th:nth-child(4):hover) td:nth-child(4),

  .stats-table:has(td:nth-child(5):hover) td:nth-child(5),
  .stats-table:has(th:nth-child(5):hover) td:nth-child(5) {
    background: rgba(255, 210, 120, 0.4);
  }
}

/* FALLBACK */
@supports not (selector(:has(*))) {
  .stats-table tr:hover td {
    background: rgba(255, 230, 120, 0.3);
  }

  .stats-table td:hover {
    background: rgba(255, 200, 80, 0.6);
  }
}

/* ============================= */
/* TEAM CARD — LEADERS BLOCK     */
/* ============================= */

.team-leaders {
  margin-top: 0.6rem;
  padding: 0.4rem 0.5rem;

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;

  border: 2px dashed #111;
  background: rgba(0, 0, 0, 0.03);

  box-shadow: 2px 2px #000;
}

.team-leaders .leader-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 0.5rem;
  align-items: baseline;

  padding: 2px 0;
}

.team-leaders .leader-row + .leader-row {
  border-top: 1px dotted rgba(0, 0, 0, 0.3);
}

.leader-label {
  font-weight: 900;
  letter-spacing: 0.15em;
  opacity: 0.85;
}

.leader-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.leader-value {
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* Slight print imperfection */
.team-leaders {
  transform: rotate(-0.15deg);
}
.team-card[data-team="fscj"] .team-leaders { border-color: var(--fscj-secondary); }
.team-card[data-team="ju"]   .team-leaders { border-color: var(--ju-secondary); }
.team-card[data-team="ewu"]  .team-leaders { border-color: var(--ewu-secondary); }
.team-card[data-team="unf"]  .team-leaders { border-color: var(--unf-secondary); }




