/* DePauw vs. Wabash. Colors are tokens named by job; dark mode redefines them. */
:root {
  color-scheme: light dark;
  --color-page: #f6f4ee;
  --color-surface: #ffffff;
  --color-text: #1b1b1b;
  --color-text-muted: #55524a;
  --color-border: #d8d3c4;
  --color-link: #0b5cad;
  --color-focus: #0b5cad;
  --color-header: #111111;
  --color-header-text: #ffffff;
  --color-header-muted: #d6d2c6;
  --color-depauw-accent: #a87c00;   /* old gold: borders and stripes */
  --color-depauw-text: #6b4e00;     /* darkened gold: readable as text */
  --color-wabash-accent: #a6192e;   /* scarlet */
  --color-wabash-text: #a6192e;
  --color-tie-accent: #8a867a;
  --color-row-stripe: #faf8f2;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-numbers: ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 1rem;
  --radius: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-page: #121212;
    --color-surface: #1c1c1c;
    --color-text: #f1efe8;
    --color-text-muted: #b5b1a5;
    --color-border: #3a3832;
    --color-link: #8ab8f0;
    --color-focus: #8ab8f0;
    --color-header: #000000;
    --color-depauw-accent: #e0b020;
    --color-depauw-text: #f0c23a;
    --color-wabash-accent: #d3334b;
    --color-wabash-text: #ff8d9b;
    --color-tie-accent: #8a867a;
    --color-row-stripe: #212121;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font: 1rem/1.5 var(--font-body);
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

a { color: var(--color-link); overflow-wrap: anywhere; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

h1, h2 { line-height: 1.2; margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Header: black band, gold and scarlet stripe underneath */
.site-header { background: var(--color-header); color: var(--color-header-text); padding-block: 1.75rem 1.5rem; position: relative; }
.site-header::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px;
  background: linear-gradient(90deg, var(--color-depauw-accent) 50%, var(--color-wabash-accent) 50%);
}
.site-header h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); letter-spacing: -0.01em; }
.subtitle { margin: 0.5rem 0 0; color: var(--color-header-muted); font-size: 1.0625rem; }

main { padding-block: 1.5rem 2.5rem; display: grid; gap: 1.5rem; }

/* Cards */
.overall, .sport {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem var(--gutter);
  min-width: 0;
}
.overall h2, .sport h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.overall-meta { margin: 0.75rem 0 0; color: var(--color-text-muted); }
.not-included { margin: 0.5rem 0 0; color: var(--color-text-muted); font-size: 0.9375rem; }

/* Win tiles: side named in text, color is only an accent */
/* Always one row: the tiles share the width equally, even at 375px */
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.5rem; }
.tile {
  display: flex; flex-direction: column; gap: 0.125rem;
  border: 1px solid var(--color-border); border-top-width: 6px; border-radius: var(--radius);
  padding: 0.5rem 0.625rem; min-width: 0;
}
.tile-depauw { border-top-color: var(--color-depauw-accent); }
.tile-wabash { border-top-color: var(--color-wabash-accent); }
.tile-tie { border-top-color: var(--color-tie-accent); }
.tile-name { font-weight: 600; }
.tile-depauw .tile-name { color: var(--color-depauw-text); }
.tile-wabash .tile-name { color: var(--color-wabash-text); }
.tile-tie .tile-name { color: var(--color-text-muted); }
.tile-num { font: 700 clamp(1.625rem, 8vw, 2.25rem)/1.1 var(--font-numbers); font-variant-numeric: tabular-nums; }
.tile-label { color: var(--color-text-muted); font-size: 0.875rem; }
.tiles-big .tile-num { font-size: clamp(2rem, 9vw, 3.75rem); }

/* Fact list */
.facts { display: grid; gap: 0.5rem 1.5rem; margin: 1.25rem 0 0; }
.facts div { min-width: 0; }
.facts dt { color: var(--color-text-muted); font-size: 0.875rem; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.source { margin: 1rem 0 0; font-size: 0.9375rem; }

/* Game list */
.games { margin-top: 1.25rem; border-top: 1px solid var(--color-border); padding-top: 0.75rem; }
.games summary { cursor: pointer; font-weight: 600; padding: 0.5rem 0; }
.hint { color: var(--color-text-muted); font-size: 0.875rem; margin: 0.25rem 0 0.75rem; }
.games table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.games th, .games td { text-align: left; padding: 0.5rem 0.625rem; vertical-align: top; overflow-wrap: anywhere; }
.games thead th { color: var(--color-text-muted); font-size: 0.8125rem; border-bottom: 2px solid var(--color-border); }
.games tbody tr:nth-child(even) { background: var(--color-row-stripe); }
.games tbody th { font-weight: 600; white-space: nowrap; }
.win-depauw { border-left: 4px solid var(--color-depauw-accent); }
.win-wabash { border-left: 4px solid var(--color-wabash-accent); }
.tied { border-left: 4px solid var(--color-tie-accent); }

/* Phones: each game becomes a stacked block */
@media (max-width: 42rem) {
  .games thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .games table, .games tbody, .games tr, .games th, .games td { display: block; }
  .games tbody tr { border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 0.625rem; padding: 0.25rem 0; }
  .games tbody th, .games td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.5rem; padding: 0.25rem 0.75rem; }
  .games td::before, .games tbody th::before {
    content: attr(data-label); color: var(--color-text-muted); font-size: 0.8125rem; font-weight: 400;
  }
  .games td:empty { display: none; }
  .games td.win-depauw, .games td.win-wabash, .games td.tied { border-left: 0; font-weight: 600; }
}

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
  .tiles { gap: 0.75rem; }
  .tile { padding: 0.625rem 0.75rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overall, .sport { padding: 1.5rem; }
}

@media (min-width: 64rem) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding-block: 1.5rem 2.5rem; color: var(--color-text-muted); font-size: 0.9375rem; }
.site-footer p { margin: 0 0 0.5rem; }
.sources { margin: 0 0 0.5rem; padding-left: 1.25rem; }
