/* TASworlds design system
 *
 * Tokens first, components after. Spacing is a 4 px grid (4, 8, 12, 16, 24, 32, 48).
 * Typeface: Figtree (self-hosted). Its cap height is centred in the line box
 * (ascender - descender = cap height), so centring a line box centres the capitals
 * and digits exactly; icons next to text are therefore centred, and text next to
 * text of another size is aligned on the baseline. Every number uses tabular figures. */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* surfaces, lowest to highest: page < card < control/hover < pressed/badge */
  --bg: #0e1013;
  --surface-1: #16191d;
  --surface-2: #1e2227;
  --surface-3: #282d33;
  --separator: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* labels; --label-3 keeps 4.5:1 on cards for small text */
  --label: #eef0f3;
  --label-2: #a8aeb7;
  --label-3: #80868f;

  /* one accent for interaction; semantic hues never reuse it */
  --accent: #30d158;
  --accent-hover: #4be070;
  --accent-tint: rgba(48, 209, 88, 0.14);
  --accent-tint-2: rgba(48, 209, 88, 0.22);
  --on-accent: #04140a;
  --ddnet: #64d2ff;
  --kog: #ff9f0a;
  --unique: #bf5af2;
  --gold: #ffd60a;
  --silver: #c7c7cc;
  --bronze: #e8a26a;
  --danger: #ff6961;

  /* geometry: radii are concentric (outer = inner + inset) */
  --r-sm: 6px;          /* 24-28 px elements: badges, thumbnails, small buttons */
  --r-md: 10px;         /* 36 px controls */
  --r-lg: 16px;         /* cards */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --row: 44px;          /* table row = minimum touch target */
  --control: 36px;      /* inputs, buttons; 44 px on touch screens */

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px -8px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border-strong);

  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}
@media (pointer: coarse) { :root { --control: 44px; } }

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 15px/20px var(--font); color: var(--label);
  background: radial-gradient(1100px 520px at 50% -240px, rgba(48, 209, 88, 0.07), transparent 70%), var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-tint-2); color: var(--label); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
img, canvas, svg { display: block; }
button { font: inherit; }

/* type scale: 12/16 caption, 13/18 footnote, 15/20 body, 17/24 headline, 24/32 title, 32/40 large title */
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 17px; line-height: 24px; font-weight: 650; letter-spacing: -0.005em; }
h3 { font-size: 15px; line-height: 20px; font-weight: 650; }
code {
  font: 500 0.875em/1 var(--mono); font-variant-numeric: normal;
  padding: 2px 6px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--label);
  white-space: nowrap;
}
.muted { color: var(--label-2); }
.faint { color: var(--label-3); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: var(--s-5); padding-right: var(--s-5); }
.main { flex: 1; display: flex; flex-direction: column; gap: var(--s-5); padding-top: var(--s-6); padding-bottom: var(--s-7); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 16, 19, 0.78);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
}
.header-row { display: flex; align-items: center; gap: var(--s-5); height: 56px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--control); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: var(--s-1); }
.nav a {
  height: var(--control); padding: 0 var(--s-3); display: inline-flex; align-items: center;
  border-radius: var(--r-md); color: var(--label-2); font-weight: 500; white-space: nowrap;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.nav a:hover { color: var(--label); background: var(--surface-2); }
.nav a.active { color: var(--label); background: var(--surface-3); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--label-3); pointer-events: none; }
.search input[type=search] { width: 200px; padding-left: 36px; }

/* text + text: baseline; the status dot is centred on the capitals */
.server-chip {
  display: inline-flex; align-items: baseline; gap: var(--s-2);
  padding: calc((var(--control) - 22px) / 2) var(--s-3) calc((var(--control) - 22px) / 2) var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-1);
  line-height: 20px; color: var(--label); cursor: pointer; white-space: nowrap;
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease);
}
.server-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.server-chip .dot { align-self: center; }
.server-chip .num { font-weight: 500; }
.server-chip .connect-label { color: var(--label-3); font-size: 13px; }
.server-chip.copied { border-color: var(--accent); }
.server-chip.copied .connect-label { color: var(--accent); }

/* ------------------------------------------------------------------ controls */
input[type=search], input[type=text], select {
  height: var(--control); padding: 0 var(--s-3); font: inherit; color: var(--label);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); outline: none;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
input::placeholder { color: var(--label-3); }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
input[type=search]::-webkit-search-cancel-button { filter: grayscale(1) opacity(0.5); }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%2380868f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.btn {
  height: var(--control); padding: 0 var(--s-4); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-weight: 600; color: var(--label); white-space: nowrap; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: #30363d; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn.copied .connect-label { color: var(--accent); }
.btn-primary.copied .connect-label { color: var(--on-accent); }
.btn-lg { height: 48px; padding: 0 var(--s-5); border-radius: 12px; font-size: 16px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* watch: compact secondary button. The play triangle's centre of mass lies left of its
   box, so it is shifted right by 1 px and the left padding is 2 px smaller than the right.
   The invisible ::after extends the hit area to the full 44 px row. */
.watch {
  position: relative; height: 28px; padding: 0 10px 0 8px; display: inline-flex; vertical-align: top; align-items: center; gap: 6px;
  border-radius: var(--r-sm); background: var(--accent-tint); color: var(--accent);
  font-size: 14px; font-weight: 600; line-height: 20px; white-space: nowrap;
  transition: background-color 120ms var(--ease);
}
.watch::after { content: ""; position: absolute; inset: -8px -4px; }
.watch:hover { background: var(--accent-tint-2); }
.watch svg { width: 10px; height: 10px; fill: currentColor; transform: translateX(1px); }

/* ------------------------------------------------------------------ cards */
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0) 160px), var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
/* title and hint share a baseline; 14 + 24 + 14 = 52 px */
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding: 14px var(--s-4); border-bottom: 1px solid var(--separator); }
.card-head .hint { color: var(--label-3); font-size: 13px; line-height: 18px; text-align: right; }
.card-action { display: inline-flex; align-items: center; gap: 2px; color: var(--label-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.card-action:hover { color: var(--label); }
.card-action svg { width: 16px; height: 16px; margin-right: -4px; }   /* chevron ink ends 4 px inside its box */
.card-body { padding: var(--s-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }   /* cards stretch to one shared bottom edge */
.empty { padding: var(--s-6) var(--s-4); text-align: center; color: var(--label-2); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-head p { margin-top: var(--s-1); color: var(--label-2); max-width: 68ch; }
.crumbs { display: flex; align-items: baseline; gap: 6px; margin-bottom: var(--s-1) !important; color: var(--label-3); font-size: 14px; }
.crumbs a { color: var(--label-2); }
.crumbs a:hover { color: var(--label); }

/* ------------------------------------------------------------------ tables
   Every cell uses the same 15/20 text, so centring the cells keeps all baselines on
   one line. Rows are 44 px: text at 12 px, 28 px media at 8 px, 24 px badges at 10 px.
   Inline-flex parts in cells use vertical-align: top; "middle" would sit them on
   baseline + x-height/2, grow the line box and push their text below the plain cells'. */
.table { width: 100%; border-collapse: collapse; }
.table th {
  height: 36px; padding: 0 var(--s-3); text-align: left; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--label-3);
  border-bottom: 1px solid var(--separator);
}
.table td { height: var(--row); padding: 0 var(--s-3); border-bottom: 1px solid var(--separator); vertical-align: middle; white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: var(--s-4); }
.table th:last-child, .table td:last-child { padding-right: var(--s-4); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color 80ms var(--ease); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table .num { text-align: right; }
.table .col-rank { width: 48px; }
.table th.col-rank { text-align: center; }
.table td.col-rank { text-align: center; }
.table .col-action { width: 1%; }
.table td.col-action { padding-top: 0; padding-bottom: 0; }
/* clip: takes the remaining width and truncates; several clip cells share it */
.table .clip { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* rank: one 24 px box for every rank so the column stays aligned; top 3 tinted */
.rank {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: top;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  font-size: 14px; line-height: 20px; font-weight: 650; color: var(--label-2);
}
.rank-1 { background: rgba(255, 214, 10, 0.16); color: var(--gold); }
.rank-2 { background: rgba(199, 199, 204, 0.14); color: var(--silver); }
.rank-3 { background: rgba(232, 162, 106, 0.16); color: var(--bronze); }

/* runner: tee + name; the tee drawing puts its ink centre on the text's centre line */
.runner { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: top; color: var(--label); font-weight: 500; }
.runner:hover .runner-name { color: var(--accent); }
.runner-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 120ms var(--ease); }
.tee-sm { width: 28px; height: 28px; flex: none; }
/* outside a clip cell a long name is capped instead of widening the table */
.table td:not(.clip) > .runner { max-width: 220px; }

/* map cell: thumbnail + name; stars are inline in the name so they share its baseline */
.map-cell { display: inline-flex; align-items: center; gap: var(--s-3); max-width: 100%; vertical-align: top; }
.map-cell .map-name { min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-cell:hover .map-name { color: var(--accent); }
.thumb { position: relative; width: 48px; height: 28px; flex: none; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1px var(--border) inset; }
.stars { margin-left: 6px; color: var(--gold); font-size: 12px; line-height: 1; letter-spacing: 1px; }   /* line-height 1: smaller glyphs must not grow the line box */

/* source tag: coloured dot (centred on the capitals) + text */
.tag { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--label-2); vertical-align: top; }
.tag::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--label-3); }
.tag-ddnet::before { background: var(--ddnet); }
.tag-kog::before { background: var(--kog); }
.tag-unique::before { background: var(--unique); }

/* ------------------------------------------------------------------ notices */
.notice { padding: var(--s-6) var(--s-5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.notice p { color: var(--label-2); max-width: 60ch; }

/* ------------------------------------------------------------------ stats */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
/* every cell draws its left and top hairline; the card clips the ones on its outer edge,
   so separators never overshoot whatever the column count */
.stats > div { padding: var(--s-4); min-width: 0; box-shadow: -1px 0 0 var(--separator), 0 -1px 0 var(--separator); }
.stats-6 { --cols: 6; }
.stats dt { font-size: 13px; line-height: 16px; color: var(--label-3); font-weight: 500; }
.stats dd { margin-top: var(--s-2); display: flex; align-items: baseline; gap: var(--s-2); min-width: 0; font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.stats dd.date { font-size: 20px; white-space: nowrap; }
.stats dd small { font-size: 15px; font-weight: 500; color: var(--label-2); letter-spacing: 0; }
.stats dd .runner { align-self: center; font-size: 17px; font-weight: 650; letter-spacing: 0; }

/* ------------------------------------------------------------------ filters, pager */
.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; padding: var(--s-3); border-bottom: 1px solid var(--separator); }
.filters input[type=search] { flex: 1; min-width: 200px; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s-2); }
.pager a, .pager span { height: var(--control); padding: 0 var(--s-3); display: inline-flex; align-items: center; border-radius: var(--r-md); }
.pager a { background: var(--surface-2); border: 1px solid var(--border); font-weight: 500; }
.pager a:hover { background: var(--surface-3); }
.pager span { color: var(--label-2); }

/* hover tooltip (mapper on the maps page), anchored to the name after the 48 + 12 px thumbnail */
.has-tip { position: relative; }
.has-tip::after {
  content: attr(data-tip); position: absolute; left: 60px; top: calc(100% + 6px); z-index: 5;
  padding: 6px 10px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: var(--shadow-pop);
  color: var(--label); font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap;
  pointer-events: none; opacity: 0; transform: translateY(-2px); transition: opacity 120ms var(--ease), transform 120ms var(--ease);
}
.has-tip:hover::after { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ map page */
.map-hero { display: grid; grid-template-columns: 320px minmax(0, 1fr); isolation: isolate; }
.map-hero .backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.map-hero .backdrop img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); filter: blur(48px) saturate(1.4); opacity: 0.32; }
.map-hero .backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22, 25, 29, 0.2), rgba(22, 25, 29, 0.85) 70%); }
.map-hero .preview { display: block; width: 100%; height: 100%; min-height: 180px; aspect-ratio: 16 / 9; background: var(--surface-3); }
.map-hero .preview img { width: 100%; height: 100%; object-fit: cover; }
.map-hero-body { padding: var(--s-5); display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); min-width: 0; }
.map-hero-body h1 { overflow-wrap: anywhere; }
.map-hero-body h1 .stars { font-size: 16px; margin-left: var(--s-2); vertical-align: 2px; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); color: var(--label-2); }
.facts b { color: var(--label); font-weight: 600; }
.vote { color: var(--label-3); font-size: 14px; }

/* time development chart */
.chart { position: relative; width: 100%; padding: var(--s-3) var(--s-4) var(--s-3) var(--s-2); }
.chart svg { display: block; }
.chart .grid { stroke: var(--separator); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { fill: var(--label-3); font: 500 12px var(--font); font-variant-numeric: tabular-nums; }
.chart .rec-area { fill: rgba(48, 209, 88, 0.08); }
.chart .rec-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .pt { fill: var(--label-3); cursor: pointer; }
.chart .pt-rec { fill: var(--accent); stroke: var(--surface-1); stroke-width: 2; }
.chart .pt:hover { fill: var(--label); }
.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 6; min-width: 200px; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--surface-3); box-shadow: var(--shadow-pop);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity 100ms var(--ease);
}
.chart-tip.on { opacity: 1; }
.chart-tip .tip-head { display: flex; align-items: center; justify-content: center; gap: 6px; }
.chart-tip .tip-head canvas { width: 32px; height: 32px; }
.chart-tip .tip-name { font-weight: 600; }
.chart-tip .tip-time { padding: var(--s-2) 0; font-size: 20px; line-height: 24px; font-weight: 700; border-bottom: 1px solid var(--separator); }
.chart-tip .tip-rec { margin-left: 6px; color: var(--accent); font-size: 12px; font-weight: 600; }
.chart-tip .tip-counts { padding: var(--s-2) 0; color: var(--label-2); font-size: 13px; border-bottom: 1px solid var(--separator); }
.chart-tip .tip-date { padding-top: var(--s-2); color: var(--label-3); font-size: 12px; }
.chart-tip .tip-act { margin-top: var(--s-1); color: var(--accent); font-size: 12px; font-weight: 500; }

/* ------------------------------------------------------------------ player page */
.profile { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5); }
.profile .tee { width: 72px; height: 72px; flex: none; }
.profile-name { flex: 1; min-width: 0; }
.profile-name h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name p { color: var(--label-2); }
.ladder { display: grid; justify-items: end; }
.ladder dt { font-size: 13px; line-height: 16px; color: var(--label-3); font-weight: 500; }
.ladder dd { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; }
.ladder small { color: var(--label-3); font-size: 13px; line-height: 16px; }

/* ------------------------------------------------------------------ about */
.join-steps { list-style: none; padding: var(--s-4); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.join-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s-3); row-gap: var(--s-1); align-content: start; }
.join-steps .step-n {
  grid-row: span 2; width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent); font-size: 14px; line-height: 20px; font-weight: 650;
}
.join-steps h3 { line-height: 24px; }
.join-steps p { color: var(--label-2); }
.join-steps .btn { margin-top: var(--s-3); justify-self: start; grid-column: 2; }
.join-steps a { color: var(--accent); }

/* ------------------------------------------------------------------ demo player */
.player-shell { overflow: hidden; }
.player-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-overlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-4); background: rgba(14, 16, 19, 0.85); transition: opacity 200ms var(--ease); }
.player-overlay.hidden { opacity: 0; visibility: hidden; }
.player-overlay.error .overlay-text { color: var(--danger); }
.big-play { width: 64px; height: 64px; border-radius: 32px; border: 0; background: var(--accent); cursor: pointer; display: grid; place-items: center; opacity: 0.35; transition: opacity 200ms var(--ease), transform 120ms var(--ease); }
.player-overlay.ready .big-play { opacity: 1; }
.player-overlay.ready .big-play:hover { transform: scale(1.04); }
.big-play svg { width: 26px; height: 26px; fill: var(--on-accent); transform: translateX(2px); }
.overlay-text { color: var(--label-2); text-align: center; padding: 0 var(--s-5); }
.overlay-progress { width: 240px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.player-overlay.ready .overlay-progress { visibility: hidden; }
#overlay-bar { height: 100%; width: 0; background: var(--accent); transition: width 200ms var(--ease); }
.player-controls { display: flex; align-items: center; gap: var(--s-2); min-height: 52px; padding: var(--s-2) var(--s-3); border-top: 1px solid var(--separator); }
.ctl { height: var(--control); min-width: var(--control); padding: 0 var(--s-2); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-md); background: transparent; color: var(--label); font-size: 14px; font-weight: 600; cursor: pointer; }
.ctl:hover:not(:disabled) { background: var(--surface-3); }
.ctl:disabled { opacity: 0.35; cursor: default; }
.ctl svg { width: 18px; height: 18px; fill: currentColor; }
.ctl .i-play { display: none; transform: translateX(1px); }
.is-paused .ctl .i-play { display: block; }
.is-paused .ctl .i-pause { display: none; }
.ctl-text { color: var(--label-2); }
.ctl-text.on { color: var(--accent); background: var(--accent-tint); }
.ctl-select { height: var(--control); font-size: 14px; }
.time { min-width: 150px; text-align: center; color: var(--label-2); font-size: 14px; }
.scrubber { flex: 1; height: 24px; position: relative; cursor: pointer; touch-action: none; }
.scrubber::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.scrubber-fill { position: absolute; left: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--accent); width: 0; }
.scrubber-knob { position: absolute; top: 6px; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 6px; background: var(--label); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.player-help { padding: 0 var(--s-4) var(--s-3); color: var(--label-3); font-size: 13px; line-height: 18px; }
.player-shell.is-fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.player-shell.is-fullscreen .player-stage { flex: 1; aspect-ratio: auto; }
.player-shell.is-fullscreen .player-help { display: none; }
.watch-head { padding: var(--s-5); align-items: center; }
.run-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); margin-top: var(--s-2); color: var(--label-2); }
.run-facts .big { color: var(--label); font-size: 20px; line-height: 24px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s-2); border-radius: 12px; background: var(--accent-tint); color: var(--accent); font-size: 13px; font-weight: 600; }   /* joins the row baseline through its text */
.head-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ------------------------------------------------------------------ status light
   It emits light, so it glows; the colour is the state. Unknown is a plain grey disc. */
.dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--label-3); }
.dot[data-state=online] { background: #8af5a6; box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.35), 0 0 10px 2px rgba(48, 209, 88, 0.55); animation: pulse 2.4s var(--ease) infinite; }
.dot[data-state=offline] { background: var(--danger); box-shadow: 0 0 0 2px rgba(255, 105, 97, 0.25); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.12), 0 0 14px 3px rgba(48, 209, 88, 0.35); } }

/* ------------------------------------------------------------------ section heads, links */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin: var(--s-2) 0 calc(-1 * var(--s-2)); }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.gain { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------------ home hero
   The trail canvas fills the card behind the text and fades out under it. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); isolation: isolate;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(48, 209, 88, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 200px), var(--surface-1); }
.hero-trail { position: absolute; top: 0; right: 0; z-index: -1; width: 46%; height: calc(100% - 64px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%); mask: linear-gradient(90deg, transparent, #000 30%); }
.hero-body { padding: var(--s-7) var(--s-6) var(--s-6); max-width: 620px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.hero h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.025em; text-wrap: balance; }
.lede { color: var(--label-2); font-size: 17px; line-height: 26px; max-width: 46ch; text-wrap: pretty; }
.hero-join { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.hero-join .btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 20px -6px rgba(48, 209, 88, 0.55); }
.hero-join .btn-primary .connect-label { padding-left: var(--s-3); margin-left: var(--s-1); border-left: 1px solid rgba(4, 20, 10, 0.25); font-size: 14px; opacity: 0.8; }
.live { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--label-2); font-size: 14px; }
.hero-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--separator); background: rgba(14, 16, 19, 0.35); }
.hero-counts > div { display: flex; align-items: baseline; gap: var(--s-2); height: 64px; padding: 0 var(--s-6); box-shadow: -1px 0 0 var(--separator); align-content: center; flex-wrap: wrap; }
.hero-counts dd { order: -1; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
.hero-counts dt { color: var(--label-3); font-size: 14px; }

/* ------------------------------------------------------------------ top lists (home, boards) */
.top-list, .board-list { list-style: none; padding: var(--s-2) 0; }
.top-list li, .board-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); height: var(--row); padding: 0 var(--s-4); }
.top-list li.is-first { height: 56px; }
.top-list li.is-first .tee-sm { width: 40px; height: 40px; }
.top-list li.is-first .runner { font-size: 17px; font-weight: 650; }
.top-list .runner, .board-list .runner { min-width: 0; }
.board-value { font-weight: 650; text-align: right; white-space: nowrap; }
.board-value small { color: var(--label-3); font-size: 13px; font-weight: 500; }

.hot-list li { grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-4); }
.hot-list .map-cell { min-width: 0; }
.hot-record { font-size: 14px; white-space: nowrap; }
.hot-record b { font-weight: 600; }
.hot-record .faint { display: inline-block; max-width: 96px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }

/* ------------------------------------------------------------------ rankings
   Podium: 2 - 1 - 3, the winner raised and lit by a gold beam (RefreshUI Orbit). */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: end; }
.podium-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s-1); padding: var(--s-5) var(--s-4); text-align: center;
  border-radius: var(--r-lg); background: var(--surface-1); border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: transform 160ms var(--ease); }
.podium-step:hover { transform: translateY(-2px); }
.podium-step.orbit { padding-top: var(--s-6); padding-bottom: var(--s-6); border: 0;
  --orbit-face: #191c1b; --orbit-from: #ffd60a; --orbit-to: #30d158; --orbit-radius: 16px; --orbit-length: 220px; --orbit-glow: 0.16; --orbit-cycle: 7000ms; --orbit-line: rgba(255, 214, 10, 0.22);
  box-shadow: var(--shadow-card), 0 24px 60px -24px rgba(255, 214, 10, 0.35); }
.podium-rank { position: absolute; top: var(--s-3); left: var(--s-3); width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.podium-1 .podium-rank { background: rgba(255, 214, 10, 0.16); color: var(--gold); }
.podium-2 .podium-rank { background: rgba(199, 199, 204, 0.14); color: var(--silver); }
.podium-3 .podium-rank { background: rgba(232, 162, 106, 0.16); color: var(--bronze); }
.podium-tee { width: 72px; height: 72px; }
.podium-1 .podium-tee { width: 96px; height: 96px; }
.podium-name { max-width: 100%; margin-top: var(--s-1); font-size: 17px; line-height: 24px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-1 .podium-name { font-size: 20px; line-height: 28px; }
.podium-points { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.podium-1 .podium-points { font-size: 32px; line-height: 40px; color: var(--gold); }
.podium-points small { font-size: 14px; font-weight: 500; color: var(--label-3); letter-spacing: 0; }
.podium-meta { color: var(--label-3); font-size: 13px; line-height: 18px; }

.grid-rank { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.points-card { position: sticky; top: 80px; }
.points-card .card-body { display: flex; flex-direction: column; gap: var(--s-3); color: var(--label-2); }
.points-scale { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); }
.points-scale li { display: flex; flex-direction: column; align-items: center; padding: var(--s-2) 0; border-radius: var(--r-md); background: var(--surface-2); }
.points-scale li span { color: var(--label-3); font-size: 12px; line-height: 16px; }
.points-scale li b { color: var(--label); font-size: 17px; line-height: 24px; }
.points-scale li:nth-child(1) b { color: var(--gold); }
.points-scale li:nth-child(2) b { color: var(--silver); }
.points-scale li:nth-child(3) b { color: var(--bronze); }

.boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.board { display: flex; flex-direction: column; }
.board .card-head { flex-direction: column; align-items: flex-start; gap: 0; }
.board .card-head .hint { text-align: left; }
.board .board-list { flex: 1; }
.board .empty { flex: 1; padding: var(--s-5) var(--s-4); }
.board-more { display: flex; align-items: center; justify-content: center; gap: 2px; height: 40px; border-top: 1px solid var(--separator); color: var(--label-2); font-size: 14px; font-weight: 500; }
.board-more:hover { color: var(--label); background: rgba(255, 255, 255, 0.025); }
.board-more svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips a { height: 32px; padding: 0 var(--s-3); display: inline-flex; align-items: center; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--border); color: var(--label-2); font-size: 14px; font-weight: 500; }
.chips a:hover { color: var(--label); border-color: var(--border-strong); }
.chips a.active { color: var(--on-accent); background: var(--accent); border-color: transparent; }

/* ------------------------------------------------------------------ records */
.beat { display: inline-flex; align-items: center; gap: var(--s-3); vertical-align: top; }
.beat .runner { color: var(--label-2); max-width: 160px; }

/* ------------------------------------------------------------------ filters with the Glide piece */
.page-head .glide, .filters .glide { --glide-accent: var(--accent); --glide-size: 14px; --glide-height: 36px; --glide-radius: 10px; --glide-track: var(--surface-2); --glide-text: var(--label-2); --glide-text-on: var(--label); }
.filters { align-items: center; }
.filters .search-wide { flex: 1; min-width: 200px; }
.search-wide input[type=search] { width: 100%; }

/* ------------------------------------------------------------------ search suggestions
   One fill glides to the highlighted option (after RefreshUI Menu). */
.search.is-open input[type=search] { border-color: var(--border-strong); }
.suggest {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 400px; max-width: calc(100vw - 32px); max-height: min(70vh, 520px); overflow-y: auto;
  padding: var(--s-1); border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow-pop);
  transform-origin: top right; animation: suggest-in 140ms var(--ease);
}
.search-wide .suggest { left: 0; right: auto; transform-origin: top left; }
@keyframes suggest-in { from { opacity: 0; transform: scale(0.97); } }
.suggest::before { content: ""; position: absolute; left: var(--s-1); right: var(--s-1); top: 0; height: var(--fill-h, 0); transform: translateY(var(--fill-y, 0)); border-radius: 10px; background: rgba(255, 255, 255, 0.07); opacity: 0; transition: transform 120ms cubic-bezier(0.2, 0, 0, 1), height 120ms cubic-bezier(0.2, 0, 0, 1), opacity 80ms; pointer-events: none; }
.suggest.has-fill::before { opacity: 1; }
.suggest-group { padding: var(--s-2) var(--s-3) var(--s-1); color: var(--label-3); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.suggest-option { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: var(--s-1) var(--s-3); border-radius: 10px; }
.suggest-option[aria-selected=true] .suggest-name { color: var(--accent); }
.suggest-thumb { width: 64px; height: 36px; flex: none; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-3); }
.suggest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.suggest-option .tee-sm { width: 36px; height: 36px; margin: 0 14px; }
.suggest-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggest-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 80ms; }
.suggest-text .tag { font-size: 13px; line-height: 18px; }
.suggest-meta { margin-left: auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; text-align: right; font-size: 13px; line-height: 18px; color: var(--label-3); white-space: nowrap; }
.suggest-meta b { display: block; color: var(--label); font-size: 14px; font-weight: 600; }
.suggest-all { position: relative; display: flex; align-items: center; min-height: 40px; margin-top: var(--s-1); padding: 0 var(--s-3); border-radius: 10px; color: var(--label-2); font-size: 14px; }
.suggest-all[aria-selected=true] { color: var(--label); }
.suggest-empty { padding: var(--s-4) var(--s-3); color: var(--label-2); }

/* ------------------------------------------------------------------ player page */
.profile .tee { width: 80px; height: 80px; }
.placements { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--separator); }
.placements li { box-shadow: -1px 0 0 var(--separator), 0 -1px 0 var(--separator); }
.placements a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title rank" "value rank"; align-items: baseline; column-gap: var(--s-2); padding: var(--s-3) var(--s-4); transition: background-color 120ms var(--ease); }
.placements a:hover { background: rgba(255, 255, 255, 0.025); }
.placement-title { grid-area: title; color: var(--label-3); font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.placement-value { grid-area: value; font-size: 20px; line-height: 28px; font-weight: 700; white-space: nowrap; }
.placement-value small { color: var(--label-3); font-size: 13px; font-weight: 500; }
.placement-rank { grid-area: rank; align-self: center; color: var(--label-2); font-weight: 650; }
.placements li.is-first .placement-rank { color: var(--gold); }
.completion { display: grid; gap: var(--s-2); padding: var(--s-4); border-top: 1px solid var(--separator); }
.completion-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 112px; align-items: center; gap: var(--s-3); }
.completion-row > .num { text-align: right; font-size: 14px; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--accent); }
.completion-row:has(.tag-ddnet) .bar span { background: var(--ddnet); }
.completion-row:has(.tag-kog) .bar span { background: var(--kog); }
.completion-row:has(.tag-unique) .bar span { background: var(--unique); }

/* ------------------------------------------------------------------ FAQ */
.timers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); padding: var(--s-4); }
.timer { margin: 0; padding: var(--s-4); border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: var(--s-2); }
.timer figcaption { display: flex; gap: var(--s-3); }
.timer-readout { font: 700 36px/44px var(--mono); letter-spacing: -0.02em; color: var(--label); }
.timer p:last-child { color: var(--label-2); }
.tick-ruler { grid-column: 1 / -1; padding: 0 var(--s-6); }
.ruler-track { position: relative; height: 2px; margin: 64px 0 40px; background: var(--border-strong); }
.ruler-track > span { position: absolute; left: var(--at); }
.ruler-track > span > span { position: absolute; white-space: nowrap; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.ruler-tick { top: -8px; width: 2px; height: 18px; margin-left: -1px; background: var(--label-3); }
.ruler-tick > span { top: 26px; left: 50%; transform: translateX(-50%); color: var(--label-3); }
.ruler-finish { top: -36px; height: 46px; margin-left: -1px; border-left: 2px dashed var(--unique); }
.ruler-finish > span { bottom: calc(100% + 4px); left: 0; transform: translateX(-50%); color: var(--unique); font-weight: 600; }
.ruler-hit { top: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--ddnet); box-shadow: 0 0 0 4px rgba(100, 210, 255, 0.18); }
.ruler-hit > span { bottom: 8px; left: 18px; color: var(--ddnet); font-weight: 600; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.faq { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.faq h2 { margin-bottom: var(--s-1); }
.faq p { color: var(--label-2); line-height: 22px; }
.faq b { color: var(--label); }
.faq-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); color: var(--label-2); }
.faq-list li { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.faq-list .tag { min-width: 72px; color: var(--label); font-weight: 600; }
.faq-list.dots li::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--unique); align-self: center; }
.prose { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); max-width: 760px; }
.prose h2:not(:first-child) { margin-top: var(--s-4); }
.prose p { color: var(--label-2); line-height: 22px; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: var(--s-6); border-top: 1px solid var(--separator); background: rgba(0, 0, 0, 0.18); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s-5); padding-top: var(--s-6); padding-bottom: var(--s-6); }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.footer-brand p { color: var(--label-2); }
.footer-ip { display: inline-flex; align-items: center; gap: var(--s-2); height: 32px; padding: 0 var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-1); color: var(--label); cursor: pointer; }
.footer-ip:hover { border-color: var(--border-strong); }
.footer-ip .connect-label { color: var(--label-3); font-size: 13px; }
.footer-ip.copied .connect-label { color: var(--accent); }
.site-footer nav { display: flex; flex-direction: column; gap: var(--s-2); }
.site-footer nav h2 { font-size: 13px; line-height: 18px; color: var(--label-3); font-weight: 600; }
.site-footer nav a { color: var(--label-2); font-size: 14px; width: fit-content; }
.site-footer nav a:hover { color: var(--label); }

@media (max-width: 1100px) {
  .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .grid-rank, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .points-card { position: static; }
  .placements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .hero-trail { display: none; }
}
@media (max-width: 640px) {
  .hero-body { padding: var(--s-6) var(--s-4) var(--s-5); }
  .hero h1 { font-size: 30px; line-height: 36px; }
  .lede { font-size: 16px; line-height: 24px; }
  .hero-join, .hero-join .btn { width: 100%; }
  .hero-counts > div { padding: 0 var(--s-3); height: auto; padding-top: var(--s-3); padding-bottom: var(--s-3); flex-direction: column; align-items: flex-start; gap: 0; }
  .hero-counts dt { font-size: 13px; line-height: 16px; }
  .hot-record { display: none; }
  .podium { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-2); }
  .podium-step { padding: var(--s-4) var(--s-2); }
  .podium-step.orbit { padding-top: var(--s-5); padding-bottom: var(--s-5); }
  .podium-rank { top: var(--s-2); left: var(--s-2); width: 24px; height: 24px; font-size: 13px; }
  .podium-tee { width: 48px; height: 48px; }
  .podium-1 .podium-tee { width: 64px; height: 64px; }
  .podium-name, .podium-1 .podium-name { font-size: 15px; line-height: 20px; }
  .podium-points { font-size: 18px; line-height: 24px; }
  .podium-1 .podium-points { font-size: 22px; line-height: 28px; }
  .podium-meta { display: none; }
  .boards { grid-template-columns: minmax(0, 1fr); }
  .board-list li:nth-child(n+4) { display: none; }
  .timers { grid-template-columns: minmax(0, 1fr); }
  .timer-readout { font-size: 30px; line-height: 36px; }
  .completion-row { grid-template-columns: 76px minmax(0, 1fr) 96px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head .glide, .filters .glide { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dot[data-state=online], .suggest { animation: none; } }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .stats-6 { --cols: 3; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .site-header .search { display: none; }
  .map-hero { grid-template-columns: minmax(0, 1fr); }
  .map-hero .preview { height: auto; min-height: 0; }
  .hide-md { display: none; }
  .join-steps { grid-template-columns: minmax(0, 1fr); }
}
/* header on two rows: brand + server address, then the navigation spread over the full
   width; the nav is widened by its item padding so the first label lines up with the logo */
@media (max-width: 860px) {
  .header-row { height: auto; padding-top: 10px; padding-bottom: var(--s-2); flex-wrap: wrap; gap: var(--s-2); }
  .nav { order: 3; flex: 0 0 calc(100% + 2 * var(--s-3)); margin: 0 calc(-1 * var(--s-3)); justify-content: space-between; gap: 0; }
}
@media (max-width: 640px) {
  .nav { flex-basis: calc(100% + 2 * var(--s-2)); margin: 0 calc(-1 * var(--s-2)); }
  .wrap { padding-left: var(--s-4); padding-right: var(--s-4); }
  .nav a { padding: 0 var(--s-2); font-size: 14px; }
  .main { padding-top: var(--s-5); gap: var(--s-4); }
  h1 { font-size: 28px; line-height: 36px; }
  .hide-sm { display: none; }
  .table th, .table td { padding: 0 var(--s-2); }
  .table th:first-child, .table td:first-child { padding-left: var(--s-3); }
  .table th:last-child, .table td:last-child { padding-right: var(--s-3); }
  .table td.clip .thumb { display: none; }
  .has-tip::after { left: 0; }
  .watch { width: 28px; padding: 0; justify-content: center; }
  .table td:not(.clip) > .runner { max-width: 128px; }
  .watch-label { display: none; }
  .filters > * { flex: 1 1 140px; }
  .stats { --cols: 2; }
  .stats dd { font-size: 22px; line-height: 28px; }
  .stats dd .runner { font-size: 15px; }
  .profile { padding: var(--s-4); gap: var(--s-3); }
  .profile .tee { width: 56px; height: 56px; }
  .profile-name h1 { font-size: 24px; line-height: 32px; }
  .ladder dd { font-size: 24px; line-height: 32px; }
  .player-controls { flex-wrap: wrap; padding: var(--s-2); }
  .scrubber { order: -1; flex-basis: 100%; }
  .time { min-width: 0; flex: 1; text-align: left; }
  .watch-head { padding: var(--s-4); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
