/* Shared stylesheet for every league. The palette lives entirely in custom
   properties, so a league themes itself with ~20 lines in its own theme.css,
   loaded after this file. There are no per-league CSS forks. */

:root {
  --bg: #0d0d0f;
  --surface: #151518;
  --surface-2: #1c1c21;
  --line: #2a2a31;
  --text: #ececf1;
  --muted: #9a9aa6;
  --accent: #ff5a1f;
  --accent-2: #ff3d00;
  --gold: #d4af37;
  --silver: #b8c0c8;
  --bronze: #c07a3e;
  --maxw: 1500px;
  --head-h: 64px;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
  font-family: Oswald, Impact, sans-serif;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 1.6rem 0 .6rem;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.2rem, 2.6vw, 1.6rem); color: var(--accent); }
h3 { font-size: 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: .6rem 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.muted, .small { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: #ff6b6b; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 15, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.hdr { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; min-height: var(--head-h); }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-family: Oswald, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }
.brand strong { color: var(--accent); }
.mark { flex: none; }

nav#nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
nav#nav a { color: var(--text); font-size: .92rem; }
nav#nav a:hover { color: var(--accent); }
.navsearch input {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: .4rem .7rem; border-radius: var(--radius); width: 150px;
}
.navtoggle { display: none; }

@media (max-width: 860px) {
  .navtoggle {
    display: block; margin-left: auto;
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .8rem;
    font: inherit; cursor: pointer;
  }
  nav#nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: .8rem 0; }
  nav#nav.open { display: flex; }
  .navsearch input { width: 100%; }
}

/* -------------------------------------------------------------------- hero */
.hero { padding: 1.5rem 0 .5rem; }

/* ------------------------------------------------------------- stat cards */
.stat-cards {
  display: grid; gap: 12px; margin: 1.2rem 0;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1rem;
}
.card h3 { margin: 0 0 .35rem; font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.card .big { font-family: Oswald, sans-serif; font-size: 1.9rem; line-height: 1.1; color: var(--accent); }
.card .big.sm { font-size: 1.15rem; color: var(--text); }
.card .sub { font-size: .8rem; color: var(--muted); margin-top: .2rem; }

/* -------------------------------------------------------------- storylines */
.stories { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 1.2rem 0; }
.story { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: .9rem 1rem; }
.story h3 { margin: 0 0 .35rem; text-transform: none; font-family: Inter, sans-serif; font-weight: 600; }
.story .emoji { margin-right: .3rem; }
.story p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ------------------------------------------------------------------ tables */
table { width: 100%; border-collapse: collapse; margin: .8rem 0 1.6rem; font-size: .93rem; }
thead th {
  position: sticky; top: var(--head-h); z-index: 5;
  background: var(--surface-2); color: var(--muted);
  text-align: left; font-weight: 600; font-size: .78rem;
  letter-spacing: .05em; text-transform: uppercase;
  padding: .55rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: .5rem .7rem; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: var(--surface); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr[data-href] { cursor: pointer; }
tr.gold td:first-child { border-left: 3px solid var(--gold); }
tr.silver td:first-child { border-left: 3px solid var(--silver); }
tr.bronze td:first-child { border-left: 3px solid var(--bronze); }
tr.prov { opacity: .72; }
tr.error td { color: #ff8a8a; }
table.sortable thead th { cursor: pointer; }
table.sortable thead th[aria-sort="ascending"]::after { content: " ▲"; color: var(--accent); }
table.sortable thead th[aria-sort="descending"]::after { content: " ▼"; color: var(--accent); }

/* Wide content scrolls inside its own box; the page body never scrolls sideways */
.board, section { overflow-x: auto; }

.tag {
  display: inline-block; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 99px; padding: .05rem .5rem; font-size: .72rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: .4rem;
}

/* ------------------------------------------------------------------- lists */
.cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
ul.plain, ul.results, ol.ranklist { padding-left: 1.1rem; }
ul.plain, ul.results { list-style: none; padding-left: 0; }
ul.plain li, ul.results li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
ol.ranklist li { padding: .25rem 0; }
ol.ranklist .muted { font-size: .85rem; margin-left: .4rem; }

/* ------------------------------------------------------------------- forms */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.filters input, .filters select, .stack input {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: .5rem .7rem; border-radius: var(--radius); font: inherit;
}
.stack { display: grid; gap: .8rem; max-width: 360px; }
.stack label { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: var(--radius);
  padding: .55rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-block; text-align: center;
}
button:hover, .btn:hover { background: var(--accent-2); text-decoration: none; }
.linkbtn { background: none; color: var(--muted); padding: 0; font-weight: 400; text-decoration: underline; }
.btnrow { display: flex; flex-wrap: wrap; gap: .6rem; }
pre.result { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-x: auto; white-space: pre-wrap; }

/* ------------------------------------------------------------------ charts */
.cbox { position: relative; height: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; margin: 1rem 0; }

/* -------------------------------------------------------------- misc/pages */
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.crumbs a { color: var(--muted); }
.board.ancillary { border-top: 1px dashed var(--line); padding-top: .5rem; }
.sources { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; }

footer.site { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 0 2.5rem; color: var(--muted); font-size: .88rem; }
footer.site .disclaimer { max-width: 80ch; font-size: .82rem; }
/* Footer links across to the sibling league trackers. A wrapping row so the
   list degrades gracefully on a phone instead of overflowing. */
.foot-leagues { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  margin: .7rem 0; font-size: .8rem; }
.foot-leagues span { opacity: .8; }
.foot-leagues a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.foot-leagues a:hover, .foot-leagues a:focus-visible { color: var(--accent); border-bottom-color: currentColor; }


@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
