/* ============================================================
   bowl-theme.css — shared look for the History, Geography and Quiz Bowl
   review sites (identical copy in every repo; loaded after each site's own
   CSS). Each site picks its colour with <html data-site="history|geo|qb">.
   Quiet surfaces, thin lines, one accent per site, serif headings.
   ============================================================ */
/* --hue turns every colour that used to be green into the same shade of the
   site's colour (140 = the original green). The named colours below are tuned
   by hand per site. Science (blue) and Math (crimson) are ready for later. */
:root {
  --serif: "Libre Caslon Text", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --surface: #ffffff;
  --surface-2: #f5f6f4;
  --ink: #1b1f22;
  --muted: #5b6268;
  --line: #dde1e4;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 28px -18px rgba(0, 0, 0, .55);
  --on-bg: #f1f2f4;
  --on-bg-line: rgba(255, 255, 255, .12);
  --bg-art: .14;
  /* Geography (default): green */
  --hue: 140;
  --bg: #0f2218;
  --bg-2: #08140d;
  --on-bg-muted: #a6bcad;
  --accent: #23784a;
  --accent-hover: #1b603a;
  --accent-tint: #e7f2eb;
  --accent-bright: #7fd6a0;
}
:root[data-site="history"] {   /* gold */
  --hue: 38;
  --bg: #211a0e;
  --bg-2: #130f07;
  --on-bg-muted: #c8b99c;
  --accent: #9c600c;
  --accent-hover: #824f09;
  --accent-tint: #fbf1de;
  --accent-bright: #f0c35a;
}
:root[data-site="qb"] {        /* purple */
  --hue: 268;
  --bg: #1c1328;
  --bg-2: #100a18;
  --on-bg-muted: #b9add0;
  --accent: #6738ad;
  --accent-hover: #552d92;
  --accent-tint: #efe8fa;
  --accent-bright: #c3a6f2;
}
:root[data-site="science"] {   /* blue */
  --hue: 212;
  --bg: #0f1e30;
  --bg-2: #09121e;
  --on-bg-muted: #a6b6c8;
  --accent: #2763a6;
  --accent-hover: #1e4f86;
  --accent-tint: #e6eef8;
  --accent-bright: #8fbdf0;
}
:root[data-site="math"] {      /* crimson */
  --hue: 350;
  --bg: #26111a;
  --bg-2: #170a0f;
  --on-bg-muted: #c9aab3;
  --accent: #a3293d;
  --accent-hover: #85202f;
  --accent-tint: #f8e6e9;
  --accent-bright: #f09aa8;
}

/* ---------- page ---------- */
body {
  font-family: var(--sans);
  background: var(--bg) linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) fixed;
  background-size: auto;
  padding: 0 0 48px;
  color: var(--ink);
}
/* the radar picture, faint and recoloured to the site's colour */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("bowl-bg.jpg") center top / cover no-repeat;
  opacity: var(--bg-art); mix-blend-mode: luminosity;
}
.container { padding: 0 20px; }

/* ---------- site bar ---------- */
.bowl-nav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px;
  padding: 10px max(20px, calc((100vw - 1100px) / 2));
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--on-bg-line);
  color: var(--on-bg);
  font-size: 14.5px;
}
.bowl-brand { font: 400 16px/1 var(--serif); color: var(--on-bg); white-space: nowrap; }
.bowl-sites, .bowl-links { display: flex; gap: 2px 16px; flex-wrap: wrap; }
.bowl-nav a {
  color: var(--on-bg-muted); text-decoration: none; padding: 6px 0; font-weight: 500;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.bowl-nav a:hover { color: var(--on-bg); }
.bowl-nav a[aria-current="page"] { color: var(--on-bg); font-weight: 600; border-bottom-color: var(--accent-bright); }
.bowl-links { padding-left: 16px; border-left: 1px solid var(--on-bg-line); }
.bowl-nav .account-bar {
  position: static; margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  background: none; box-shadow: none; padding: 0; border-radius: 0; font-size: 14px; color: var(--on-bg);
}
.bowl-nav .account-bar .muted:empty { display: none; }
.bowl-nav .account-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); box-shadow: none; }
.bowl-nav .account-bar .btn { padding: 5px 12px; font-size: 13px; min-height: 0; }
.bowl-nav .account-bar .btn.secondary { background: transparent; color: var(--on-bg); border: 1px solid var(--on-bg-line); }
.bowl-nav .account-bar .btn.secondary:hover { border-color: var(--on-bg-muted); }
@media (max-width: 720px) {
  .bowl-nav { position: static; gap: 4px 14px; padding: 8px 16px; }
  .bowl-brand { flex-basis: 100%; }
  .bowl-links { padding-left: 0; border-left: 0; }
}

/* ---------- header ---------- */
.header { margin: 44px 0 22px; text-align: center; color: var(--on-bg); }
.header h1 {
  font: 400 clamp(30px, 5vw, 46px)/1.1 var(--serif); letter-spacing: -0.01em;
  text-shadow: none; margin: 0 0 10px; color: var(--on-bg);
}
.header p { color: var(--on-bg-muted); font-size: 16px; max-width: 62ch; margin: 0 auto; text-shadow: none; }
.status-pill, #questionsStatus {
  display: block; width: max-content; max-width: 100%; margin: 0 auto 22px; padding: 5px 12px;
  border-radius: 999px; background: transparent; border: 1px solid var(--on-bg-line); box-shadow: none;
  color: var(--on-bg-muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: center;
}
#questionsStatus:empty { display: none; }
#questionsDisplay { display: none; }
.player-name-container { text-align: center; color: var(--on-bg); font-weight: 500; margin-bottom: 26px; }
.player-name-container label { margin-right: 8px; }
.player-name-container label { text-shadow: none; color: var(--on-bg-muted); font-size: 14px; }

/* ---------- home sections ---------- */
.home-menu-groups { gap: 30px; }
.home-menu-section { background: none; border: 0; padding: 0; backdrop-filter: none; border-radius: 0; box-shadow: none; }
.home-menu-section-title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
  font: 600 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-bright); text-shadow: none;
}
.home-menu-section-title::after { content: ""; flex: 1; height: 1px; background: var(--on-bg-line); }
.home-menu-section-grid { gap: 12px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 18px 16px; min-height: 0; transform: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card::after, .card:after { display: none; content: none; }
.card:hover { transform: none; border-color: var(--accent); box-shadow: var(--shadow); }
.card h3 {
  font: 400 21px/1.2 var(--serif); color: var(--ink); margin: 0 0 8px;
}
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 14px; }
/* icon sits beside the title (as on History) */
.card:has(> .card-icon) { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; column-gap: 10px; align-content: stretch; }
.card:has(> .card-icon) > * { grid-column: 1 / -1; }
.card > .card-icon { grid-column: 1; font-size: 20px; line-height: 1.25; margin: 0; width: auto; }
.card:has(> .card-icon) > h3 { grid-column: 2; align-self: center; }
.card:has(> .card-icon) > :last-child { align-self: end; }

/* ---------- buttons & fields ---------- */
.btn {
  background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 6px;
  padding: 9px 16px; font: 600 14px/1.2 var(--sans); box-shadow: none; transform: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); transform: none; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted); }
.btn.outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.outline:hover:not(:disabled) { background: var(--accent-tint); color: var(--accent-hover); }
.btn.success { background: var(--accent); border-color: var(--accent); }
.btn.danger { background: #b23a3a; border-color: #b23a3a; box-shadow: none; }
.btn.danger:hover:not(:disabled) { background: #952f2f; border-color: #952f2f; }
.btn.compact { padding: 6px 11px; font-size: 13px; }
input, select { font-family: var(--sans); }
.player-name-container input, .card input, .card select {
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 8px 12px;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); outline: none; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* ---------- footer ---------- */
footer { text-align: center; text-shadow: none; color: var(--on-bg-muted); font-size: 13px; margin: 36px auto 0; max-width: 80ch; line-height: 1.6; }
footer p { margin: 0; color: inherit; }
footer a { color: var(--accent-bright); }
