/* 90 + 6: what every page shares. The colours, the type, the page background and the site bar. A page keeps only its own layout.
   The basketball board recolours these tokens on body[data-sport="basketball"] (in the Degrees page). */
:root {
  --bg: #10140f;
  --card: #1c2418;
  --ink: #f4f1e6;
  --muted: #b7c0ad;
  --line: #2c3826;
  --green: #3f8f4a;
  --yellow: #c4a035;
  --red: #a4473b;
  --gray: #3a4036;
  --wash: #24301f;
}
body[data-sport="basketball"] {
  --bg: #140e0c;
  --card: #2a1814;
  --ink: #f6efe8;
  --muted: #cbb5a6;
  --line: #4a2e26;
  --green: #e07a2f;
  --yellow: #e2b15a;
  --gray: #3a2c28;
  --wash: #3a2018;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* a page's own display rule never un-hides what a script hid */
a { color: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--wash) 0%, transparent 55%), var(--bg);
  color: var(--ink);
  font: 17px/1.45 "Avenir Next", "Segoe UI", sans-serif;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.9rem 1rem 0;
  font-size: 0.85rem;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--green); }
.site-nav .brand { color: var(--ink); font-weight: 700; letter-spacing: 0.04em; margin-right: auto; font-size: 0.95rem; }
.site-nav { flex-wrap: wrap; row-gap: 0.5rem; }
/* The sport switch: always in the bar, never under the fold. */
.sport-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--card); }
.sport-switch a { padding: 0.2rem 0.75rem; border-radius: 999px; color: var(--muted); font-size: 0.82rem; }
.sport-switch a[aria-current="true"] { background: var(--green); color: var(--ink); box-shadow: none; }
.site-nav .pages { display: flex; gap: 1.1rem; align-items: baseline; }
@media (max-width: 520px) {
  .site-nav { gap: 0.8rem; flex-wrap: wrap; align-items: center; }
  .sport-switch { order: -1; width: 100%; justify-content: center; }
  .sport-switch a { flex: 1; text-align: center; }
  .site-nav .brand { margin-right: 0; flex: none; }
  /* One row of pages that scrolls sideways, fading at the edge so it reads as more to the right. */
  .site-nav .pages {
    flex: 1; min-width: 0; gap: 1rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
    padding: 0 1.75rem 2px 0.6rem; -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 85%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 85%, transparent);
  }
  .site-nav .pages::-webkit-scrollbar { display: none; }
  .site-nav .pages a { flex: none; }
}

.button, button.button {
  display: inline-block;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .button:focus-visible { border-color: var(--green); }
.button.primary { background: var(--green); border-color: var(--green); }
.eyebrow { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Present but quiet: one small word at the bottom that opens the credits. Wikipedia's licence asks for the attribution. */
.credits { max-width: 64rem; margin: 0 auto; padding: 0 1.1rem 1.5rem; color: var(--muted); font-size: 0.7rem; opacity: 0.55; }
.credits:hover, .credits:focus-within, .credits[open] { opacity: 1; }
.credits summary { cursor: pointer; width: max-content; letter-spacing: 0.08em; text-transform: uppercase; list-style: none; }
.credits summary::-webkit-details-marker { display: none; }
.credits p { margin: 0.4rem 0 0; max-width: 40rem; }
.credits a { color: inherit; }
