/* Get There One Day — rankings.
   Same palette, type and dossier feel as the landing page and Field Ops:
   black / orange / teal / cream, Oswald for display, Inter for prose,
   JetBrains Mono for anything numeric or labelled. Dark only, like the
   rest of the site. */

:root {
  --black: #121010;
  --panel: #1a1716;
  --panel-2: #211d1b;
  --panel-3: #2a2523;
  --orange: #f2662b;
  --orange-hot: #ff7a3d;
  --teal: #175e6c;
  --teal-bright: #2a8fa3;
  --cream: #f4eee3;
  --muted: #a89f93;
  --dim: #6f675e;
  --line: #2b2624;
  --line-2: #3a3330;

  /* One colour per league table, picked to sit inside the site palette
     rather than fight it. */
  --cug: #4cc3a6;
  --gu: #6f9ce8;
  --qs: #e0a52c;
  --the: #c08ad6;
  --cut: #6f675e;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Oswald', sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font: 15px/1.55 var(--body);
  font-variant-numeric: tabular-nums;
  background-image: radial-gradient(circle at 1px 1px, rgba(244, 238, 227, 0.045) 1px, transparent 0);
  background-size: 22px 22px;
  overflow-x: hidden;
}
::selection { background: var(--orange); color: var(--black); }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- site header ---------- */
.sitehead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 16, 16, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.sitehead .nav {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; max-width: 1320px; margin: 0 auto;
}
.sitehead .nav-logo { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.sitehead .nav-logo img { width: 110%; height: 110%; margin: -5%; max-width: none; }
.sitehead .nav-name {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.sitehead .nav-name span { color: var(--orange); }
.sitehead nav { margin-left: auto; display: flex; gap: 22px; }
.sitehead nav a {
  text-decoration: none; color: var(--muted);
  font-size: 0.9rem; font-weight: 600; transition: color 0.15s;
}
.sitehead nav a:hover, .sitehead nav a[aria-current] { color: var(--cream); }
.sitehead nav a.hl { color: var(--orange); }
@media (max-width: 640px) {
  .sitehead nav a:not(.hl) { display: none; }
  .sitehead .nav-name { font-size: 0.85rem; white-space: nowrap; }
}

.wrap { max-width: 1320px; margin: 0 auto; padding: 32px 20px 72px; }

/* ---------- page head ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
.eyebrow b { color: var(--orange); font-weight: 500; }
header h1 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.04; margin: 0 0 14px;
  letter-spacing: 0.01em;
}
header h1 .hl { color: var(--orange); }
header p { margin: 0; color: var(--muted); max-width: 72ch; font-size: 1rem; }

.legend { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 22px 0 0; font-size: 13px; font-family: var(--mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- layout ---------- */
.grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; margin-top: 28px; align-items: start; }
@media (max-width: 980px) { .grid { grid-template-columns: 1fr; } }

aside {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; position: sticky; top: 74px;
}
@media (max-width: 980px) { aside { position: static; } }
aside h2 {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}
aside section + section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button {
  font: inherit; font-size: 0.8rem; font-weight: 600;
  background: var(--black); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: all 0.15s;
}
.presets button:hover { color: var(--cream); border-color: var(--muted); }
.presets button[aria-pressed="true"] { background: var(--orange); color: var(--black); border-color: var(--orange); }

/* Two columns: label and its value, with the range and hint spanning both.
   The <output> is a sibling of <label>, so this has to be a grid. */
.slider { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 3px 10px; margin: 12px 0 16px; }
.slider label { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 600; }
.slider output { text-align: right; font-family: var(--mono); font-size: 0.78rem; color: var(--orange); }
.slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--orange); cursor: pointer; }
.slider small { grid-column: 1 / -1; color: var(--dim); font-size: 0.72rem; line-height: 1.4; }

.opt { display: flex; gap: 9px; align-items: flex-start; font-size: 0.82rem; color: var(--muted); cursor: pointer; line-height: 1.45; }
.opt + .opt { margin-top: 10px; }
.opt input { accent-color: var(--orange); margin-top: 2px; flex-shrink: 0; cursor: pointer; }

select, input[type=search] {
  font: inherit; font-size: 0.85rem; width: 100%;
  background: var(--black); color: var(--cream);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px;
  outline: none; -webkit-appearance: none; appearance: none;
}
select:focus, input[type=search]:focus { border-color: var(--orange); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- table ---------- */
main { min-width: 0; }
.bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.bar strong {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 1.15rem;
}
.bar .note { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

.tablebox { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-2); cursor: pointer; user-select: none;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-2);
}
th:hover { color: var(--cream); }
th.l, td.l { text-align: left; }
th[aria-sort] { color: var(--orange); }
th[aria-sort="descending"]::after { content: ' ↓'; }
th[aria-sort="ascending"]::after { content: ' ↑'; }
th .grp { display: block; color: var(--dim); font-size: 0.58rem; letter-spacing: 0.08em; }
th:focus-visible, button:focus-visible, tr:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }

tr.data { cursor: pointer; }
tr.data:hover td { background: var(--panel-2); }
td.rank { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--orange); width: 46px; text-align: center; }
td.name { font-weight: 600; white-space: normal; min-width: 150px; }
td.name small { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-top: 2px; }
td.score { font-family: var(--mono); font-size: 0.82rem; }
tr.below td { opacity: 0.62; }
tr.below td.rank { color: var(--muted); }
tr.cutline td { border-top: 2px dashed var(--cut); }
.na { color: var(--dim); }

.mbar { display: inline-block; height: 5px; border-radius: 3px; background: var(--orange); vertical-align: middle; margin-right: 7px; opacity: 0.85; }
svg.strip { vertical-align: middle; }

tr.detail td { background: var(--black); white-space: normal; padding: 14px 16px 18px; }
tr.detail dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin: 0; }
tr.detail dt { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
tr.detail dd { margin: 0; font-size: 0.9rem; font-weight: 600; }

/* ---------- footer notes ---------- */
footer { margin-top: 34px; color: var(--muted); font-size: 0.9rem; max-width: 78ch; }
footer h3 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--cream); font-size: 1.05rem;
  margin: 26px 0 8px;
}
footer p { margin: 0 0 10px; line-height: 1.65; }
footer b { color: var(--cream); font-weight: 600; }

.sitefoot {
  border-top: 1px solid var(--line); margin-top: 48px;
  padding: 26px 20px; text-align: center;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}
.sitefoot a { color: var(--muted); }

/* ---------- rankings index ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 30px; }
.rcard {
  position: relative; display: block; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px; transition: border-color 0.15s, transform 0.15s;
}
.rcard:hover { border-color: var(--orange); transform: translateY(-2px); }
.rcard h2 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 1.5rem; margin: 8px 0 8px; line-height: 1.1;
}
.rcard p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.rcard .go { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.rcard.soon { opacity: 0.55; pointer-events: none; }
.rcard.soon .go { color: var(--dim); }
.rcard::before, .rcard::after { content: ''; position: absolute; width: 13px; height: 13px; border-color: var(--orange); border-style: solid; opacity: 0; transition: opacity 0.15s; }
.rcard::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 10px 0 0 0; }
.rcard::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 10px 0; }
.rcard:hover::before, .rcard:hover::after { opacity: 1; }

.backlink {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.backlink:hover { color: var(--cream); }
