/* Content pages: the static pages in public/ and the server-rendered archive and sport pages (server/src/seo.ts).
   Palette from privacy.html, tile and sport colors from src/ui/styles.css. */

@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/BarlowCondensed-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800 900; font-style: normal; font-display: swap; src: url("/fonts/BarlowCondensed-ExtraBold.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --bg: #F2F2F7; --card: #FFFFFF; --text: #1C1C1E; --muted: #6B6B70; --tint: #C2410C; --line: #E5E5EA;
  --exact: #15803D; --close: #A16207; --miss: #DDE2EB; --miss-ink: #0A1330;
  --accent: var(--tint);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000000; --card: #1C1C1E; --text: #F2F2F7; --muted: #A1A1A6; --tint: #FB923C; --line: #2C2C2E; --miss: #2A3A63; --miss-ink: #FFFFFF; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--tint); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; }

h1, h2, .brand, .play, .button, .eyebrow { font-family: "Barlow Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 34px; line-height: 1.1; font-weight: 800; margin: 0 0 10px; }
h2 { font-size: 24px; line-height: 1.2; font-weight: 800; margin: 36px 0 8px; }
h3 { font-size: 18px; margin: 20px 0 6px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.lede { font-size: 17px; }
.soft, .meta, .crumbs { color: var(--muted); }
.meta, .crumbs { font-size: 14px; }
.crumbs { margin: 0 0 8px; }

/* Header and footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 22px; font-weight: 800; letter-spacing: 0.2px; }
.brand img { border-radius: 7px; }
.site-header nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 15px; flex: 1; }
.site-header nav a { color: var(--text); text-decoration: none; }
.site-header nav a:hover { color: var(--tint); }
.play, .button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: 0.4px; text-transform: uppercase; border-radius: 10px; padding: 6px 16px; }
.button { padding: 10px 20px; }
.play:hover, .button:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .play, .button { color: #000; } }
@media (max-width: 560px) {
  .site-header nav { order: 3; flex-basis: 100%; gap: 12px; font-size: 14px; padding-bottom: 4px; }
  .play { margin-left: auto; }
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.site-footer nav a { color: var(--muted); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; margin: 16px 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { font-size: 24px; margin: 2px 0 8px; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 800; font-size: 15px; letter-spacing: 0.6px; text-transform: uppercase; }
.label { margin: 18px 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.answer { border-top: 4px solid var(--accent); }
.sport-nba { --accent: #C2410C; }
.sport-nfl { --accent: #1F6B42; }
.sport-nhl { --accent: #1D5FBF; }
.sport-mlb { --accent: #B91C2C; }
@media (prefers-color-scheme: dark) {
  .sport-nba { --accent: #FB923C; }
  .sport-nfl { --accent: #4ADE80; }
  .sport-nhl { --accent: #60A5FA; }
  .sport-mlb { --accent: #F87171; }
}

/* Clue tiles: the correct guess (archive) and the How to Play examples */
.tiles { border-collapse: separate; border-spacing: 4px; table-layout: fixed; margin: 0 -4px; width: calc(100% + 8px); }
.tiles th { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; padding: 0 0 2px; }
.tiles td { height: 46px; background: var(--exact); color: #fff; font-weight: 800; font-size: 13px; text-align: center; border-radius: 6px; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiles td.close { background: var(--close); }
.tiles td.miss { background: var(--miss); color: var(--miss-ink); }
.tiles td small { display: block; font-size: 12px; line-height: 1; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 5px; vertical-align: -5px; margin-right: 8px; text-align: center; font-size: 13px; line-height: 22px; font-weight: 800; }
.swatch.exact { background: var(--exact); }
.swatch.close { background: var(--close); }
.swatch.miss { background: var(--miss); color: var(--miss-ink); }
ul.key { list-style: none; padding: 0; }
ul.key li { margin: 8px 0; }

.notes { margin: 14px 0 0; }
.notes li { margin: 6px 0; }
.stints { list-style: none; padding: 0; margin: 0; }
.stints li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.stints li:last-child { border-bottom: 0; }
.stats { border-collapse: collapse; font-size: 15px; }
.stats th { text-align: left; font-weight: 600; padding: 3px 18px 3px 0; color: var(--muted); }
.stats td { font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 0; }
.facts li { margin: 6px 0; }

/* Archive navigation */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.jump a, .days.inline a { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; font-size: 14px; text-decoration: none; }
.days { list-style: none; padding: 0; }
.days li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.days.inline { display: flex; flex-wrap: wrap; gap: 8px; }
.days.inline li { padding: 0; border: 0; margin: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 32px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 20px; }
.team-grid h3 { font-size: 14px; margin: 14px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.team-grid ul { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.team-grid b { display: inline-block; min-width: 44px; }

.credits-note { margin-top: 40px; color: var(--muted); font-size: 13px; }
.credits-note a { color: var(--muted); }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 6px; }
details > :last-child { margin-bottom: 0; }

/* Credits */
.notice { font-size: 15px; }
.notice p { margin: 6px 0; }
