/* pedalmania.cc: the game's look, made for a browser.
   Apollo palette (AdamCYounis), the game's 5×7 pixel font, panels over a dawn sky.
   --s is the art scale (whole CSS px per game pixel for the sky and sprites); UI chrome is drawn at 2×. */

@font-face {
  font-family: "Pedal Pixel";
  src: url("/fonts/pedal-pixel.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: dark;
  --pixel: "Pedal Pixel", ui-monospace, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --s: 1;

  /* Apollo */
  --ink: #090a14; --night: #10141f; --shade: #151d28; --slate: #202e37; --slate2: #394a50;
  --grey: #577277; --grey2: #819796; --muted: #a8b5b2; --light: #c7cfcc; --pale: #ebede9;
  --b0: #172038; --b1: #253a5e; --b2: #3c5e8b; --b3: #4f8fba; --b4: #73bed3; --b5: #a4dddb;
  --g0: #19332d; --g1: #25562e; --g2: #468232; --g3: #75a743; --g4: #a8ca58; --g5: #d0da91;
  --br0: #4d2b32; --br1: #7a4841; --br2: #ad7757; --br3: #c09473; --br4: #d7b594; --br5: #e7d5b3;
  --au0: #341c27; --au1: #602c2c; --au2: #884b2b; --au3: #be772b; --au4: #de9e41; --au5: #e8c170;
  --r0: #241527; --r1: #411d31; --r2: #752438; --r3: #a53030; --r4: #cf573c; --r5: #da863e;
  --p0: #1e1d39; --p1: #402751; --p2: #7a367b; --p3: #a23e8c; --p4: #c65197; --p5: #df84a5;

  /* the game's UI */
  --panel: rgba(23, 32, 56, 0.94);       /* #172038 over the sky (RouteSelect.PANEL_BG) */
  --well: rgba(16, 20, 31, 0.75);        /* #10141f inset fields and idle tabs */
  --zebra: #1c2a48;
  --line: var(--b2);
  --gold: var(--au5);
  --amber: var(--au4);
  --focus: #f0d030;                      /* UiTheme.FOCUS: the title's focused button */
  --btn: #292839; --btn-edge: #080818; --btn-hover: #39384a; --btn-text: #e7e7e7;
  --btn-lit: var(--slate2);              /* a button's lit top line */
  /* A disabled button: dim, still legible (5.9:1), and never see-through, so it reads on the light sky too. */
  --btn-off: var(--night); --btn-off-edge: var(--slate2); --btn-off-text: var(--grey2);
  /* A field's, a choice's and a switch's edge: 3:1 or better on a panel over any band of the sky. */
  --edge: var(--b3);
  --up: var(--g3);
  --down: #ef7d63;
  /* Power zones in the Apollo palette (the game repo's docs/30 "Zones"): fill, highlight, shade */
  --z1: var(--grey2); --z1-lit: var(--muted); --z1-shade: var(--grey);
  --z2: var(--b3); --z2-lit: var(--b4); --z2-shade: var(--b2);
  --z3: var(--g3); --z3-lit: var(--g4); --z3-shade: var(--g2);
  --z4: var(--au5); --z4-lit: var(--br5); --z4-shade: var(--au4);
  --z5: var(--r5); --z5-lit: var(--au4); --z5-shade: var(--au3);
  --z6: var(--r4); --z6-lit: var(--r5); --z6-shade: var(--r3);
  --free: var(--light); --free-2: var(--muted);
  accent-color: var(--amber);
}
@media (min-width: 760px) and (min-height: 600px) { :root { --s: 2; } }
@media (min-width: 1880px) and (min-height: 1040px) { :root { --s: 3; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--b0);
  color: var(--pale);
  font: 16px/1.55 var(--sans);
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: var(--b4); }
a:hover { color: var(--b5); }
::selection { background: var(--gold); color: var(--r0); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pixelated, .flag, .sprite, .island, .island__part, .islet, .cloud, .shot, .cyclist__strip { image-rendering: pixelated; image-rendering: crisp-edges; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 50; }
.skip:focus { top: 16px; }

/* --- type ---------------------------------------------------------------------------------------- */

.px { font-family: var(--pixel); font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: 0; text-transform: none; -webkit-font-smoothing: none; font-smooth: never; }
.px-8 { font-size: 8px; line-height: 12px; }
.px-24 { font-size: 24px; line-height: 32px; }
.px-32 { font-size: 32px; line-height: 40px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.small { font-size: 13px; }

/* SkyBackdrop.draw_heading: gold, a 1 px plum outline and an ink drop shadow, in game pixels (--o). */
.heading {
  --o: 2px;
  margin: 0;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  color: var(--gold);
  -webkit-font-smoothing: none;
  text-shadow:
    calc(-1 * var(--o)) 0 var(--r0), var(--o) 0 var(--r0), 0 calc(-1 * var(--o)) var(--r0), 0 var(--o) var(--r0),
    var(--o) var(--o) var(--r0), calc(-1 * var(--o)) var(--o) var(--r0),
    var(--o) calc(2 * var(--o)) var(--ink);
}
.heading--24 { font-size: 24px; line-height: 32px; }
.heading--16 { font-size: 16px; line-height: 24px; }
/* SkyBackdrop.draw_outlined: light text with a 1 px dark outline, readable over the sky. */
.outlined {
  font-family: var(--pixel);
  -webkit-font-smoothing: none;
  text-shadow: -2px 0 var(--b0), 2px 0 var(--b0), 0 -2px var(--b0), 0 2px var(--b0);
}

/* --- the dawn sky (SkyBackdrop) ------------------------------------------------------------------ */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(
    var(--b0) 0 16.667%, var(--b1) 0 33.333%, var(--b2) 0 50%, var(--b3) 0 66.667%, var(--b4) 0 83.333%, var(--b5) 0
  );
}
/* Bands meet in a 4-row checkerboard dither, as in the game. */
.sky__seam {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--k) * 100% / 6 - 2px * var(--s));
  top: round(down, calc(var(--k) * 100% / 6 - 2px * var(--s)), calc(1px * var(--s)));
  height: calc(4px * var(--s));
  background-size: calc(2px * var(--s)) calc(2px * var(--s));
  image-rendering: pixelated;
}
.star {
  position: absolute;
  width: calc(1px * var(--s));
  height: calc(1px * var(--s));
  background: var(--light);
  animation: twinkle 3.696s step-end infinite;
}
/* a = 0.5 + 0.5 sin(1.7 t + phase): bright above 0.35, a sparkle above 0.92, dim below. */
@keyframes twinkle {
  0% { background: var(--light); box-shadow: none; }
  15.9% {
    background: var(--pale);
    box-shadow: calc(-1px * var(--s)) 0 var(--pale), calc(1px * var(--s)) 0 var(--pale), 0 calc(-1px * var(--s)) var(--pale), 0 calc(1px * var(--s)) var(--pale);
  }
  34.1% { background: var(--light); box-shadow: none; }
  54.9% { background: var(--grey); }
  95.2% { background: var(--light); }
}
.cloud {
  position: absolute;
  left: 0;
  top: calc(var(--y) / 360 * 100%);
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  animation: drift var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
@keyframes drift {
  from { transform: translateX(calc(var(--w) * var(--s) * -1px)); }
  to { transform: translateX(100vw); }
}
/* round(sin(t) * 2): the island, the islets and the title's letters move whole pixels. */
@keyframes bob {
  0% { transform: translateY(0); }
  4.02% { transform: translateY(calc(1px * var(--s))); }
  13.5% { transform: translateY(calc(2px * var(--s))); }
  36.5% { transform: translateY(calc(1px * var(--s))); }
  45.98% { transform: translateY(0); }
  54.02% { transform: translateY(calc(-1px * var(--s))); }
  63.5% { transform: translateY(calc(-2px * var(--s))); }
  86.5% { transform: translateY(calc(-1px * var(--s))); }
  95.98% { transform: translateY(0); }
}

/* --- the landing page's hero: the title screen, bigger ------------------------------------------ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  padding: calc(var(--nav-space) + 12px * var(--s)) 16px calc(14px * var(--s));
  overflow: hidden;
}
.title {
  --o: calc(1px * var(--s));
  margin: 0;
  display: flex;
  font-size: calc(32px * var(--s));
  line-height: calc(40px * var(--s));
  white-space: nowrap;
}
.title span { display: inline-block; animation: bob 2.856s step-end infinite; animation-delay: calc(var(--i) * 0.25s - 2.856s); }
.title span.sp { width: calc(6px * 4 * var(--s)); }
.slogan {
  margin: calc(6px * var(--s)) 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--pale);
  text-align: center;
}
/* The 640×360 title frame's middle band, centred even when it's wider than the screen. */
.stage {
  position: relative;
  align-self: center;
  justify-self: start;
  left: 50%;
  width: calc(640px * var(--s));
  height: calc(222px * var(--s));
  margin: calc(6px * var(--s)) 0 calc(6px * var(--s)) calc(-320px * var(--s));
}
.island {
  position: absolute;
  left: calc(var(--x) * var(--s) * 1px);
  top: calc(var(--y) * var(--s) * 1px);
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  background: url("/assets/hero/island.png") 0 0 / 100% 100% no-repeat;
  animation: bob 7.854s step-end infinite;
}
.island__part {
  position: absolute;
  left: calc(var(--x) * var(--s) * 1px);
  top: calc(var(--y) * var(--s) * 1px);
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  background-image: url("/assets/hero/island-anim.png");
  background-size: calc(var(--sw) * var(--s) * 1px) calc(var(--sh) * var(--s) * 1px);
  background-position-x: 0;
  background-position-y: calc(var(--sy) * var(--s) * -1px);
  animation: play var(--dur) steps(var(--n)) infinite;
}
@keyframes play { to { background-position-x: calc(var(--w) * var(--n) * var(--s) * -1px); } }
.islet {
  position: absolute;
  left: calc(var(--x) * var(--s) * 1px);
  top: calc(var(--y) * var(--s) * 1px);
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  opacity: 0.55;   /* the game veils them with the sky at 45% */
  animation: bob var(--dur) step-end var(--delay) infinite;
}
.menu {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: calc(8px * var(--s));
  justify-content: center;
}
/* DOWNLOAD: the title menu's first item, across the row above the others. */
.menu .btn.btn--wide { grid-column: 1 / -1; justify-self: center; width: calc(232px * var(--s)); }
.menu .btn { width: calc(112px * var(--s)); min-height: calc(24px * var(--s)); padding: 0 8px; font-size: calc(8px * var(--s)); line-height: calc(12px * var(--s)); border-width: calc(1px * var(--s)); }
@media (max-width: 979px) {
  .menu { display: grid; grid-template-columns: repeat(2, auto); }
}
@media (max-width: 759px), (max-height: 599px) {
  .hero { padding-top: calc(var(--nav-space) + 24px); }
  .title { font-size: 40px; line-height: 48px; --o: 2px; }
  .title span.sp { width: 30px; }
  .slogan { max-width: 22em; }
  .stage { left: auto; justify-self: center; margin: 6px 0; width: 100%; max-width: 640px; height: calc(222px + 24px); }
  .stage .island { left: 50%; margin-left: -144px; top: 30px; }
  .stage .islet[data-k="0"] { left: -24px; top: 4px; }
  .stage .islet[data-k="1"] { left: auto; right: -12px; top: 150px; }
  .menu { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 420px; gap: 8px; }
  .menu .btn { width: auto; min-height: 48px; font-size: 16px; line-height: 24px; border-width: 2px; }
  .menu .btn.btn--wide { width: auto; justify-self: stretch; }
}

/* --- buttons (UiTheme) -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: none;
  color: var(--btn-text);
  background: var(--btn);
  border: 2px solid var(--btn-edge);
  border-radius: 0;
  box-shadow: inset 0 2px 0 var(--btn-lit);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); color: #fff; }
/* RouteSelect._style_primary: amber with plum ink, gold under the pointer. */
.btn--primary { background: var(--amber); border-color: var(--r0); color: var(--r0); box-shadow: inset 0 2px 0 var(--gold); }
.btn--primary:hover { background: var(--gold); color: var(--r0); }
.btn--quiet { background: var(--b1); border-color: var(--ink); box-shadow: inset 0 2px 0 var(--line); }
.btn--quiet:hover { background: var(--line); }
.btn--danger { background: var(--r2); border-color: var(--ink); color: var(--pale); box-shadow: inset 0 2px 0 var(--r3); }
.btn--danger:hover { background: var(--r3); }
.btn--small { min-height: 32px; padding: 2px 10px; }
/* Focus and pressed as the game's UiTheme draws them: gold words and a gold edge. The gold ring has an ink one
   outside it, so it shows on the sky's light bands as well as on a panel. */
.btn:focus-visible, .btn.is-focus { outline: none; border-color: var(--focus); color: var(--focus); background: var(--btn-hover); box-shadow: 0 0 0 2px var(--focus), 0 0 0 4px var(--ink); }
.menu .btn.is-focus, .menu .btn:focus-visible { box-shadow: 0 0 0 calc(1px * var(--s)) var(--ink); border-width: calc(2px * var(--s)); }
.btn:active { background: var(--btn-edge); border-color: var(--focus); color: var(--focus); box-shadow: inset 0 2px 0 var(--ink); }
.btn--primary:focus-visible { background: var(--gold); color: var(--r0); border-color: var(--r0); box-shadow: 0 0 0 2px var(--focus), 0 0 0 4px var(--r0); }
/* The primary pressed: a step down the amber ramp, its plum words kept. */
.btn--primary:active { background: var(--au3); color: var(--r0); border-color: var(--r0); box-shadow: inset 0 2px 0 var(--au2); }
.btn[disabled], .btn[disabled]:hover, .btn[disabled]:active, .btn[aria-disabled="true"] { background: var(--btn-off); border-color: var(--btn-off-edge); color: var(--btn-off-text); box-shadow: none; cursor: not-allowed; }
.arrow::after { content: ">"; margin-left: 4px; }

/* --- page frame -------------------------------------------------------------------------------- */

.wrap { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 24px; } }
/* The floating bar: a panel riding a little below the top of every page, over it, with the game's
   pixel corners (the ink outline leaves each corner's pixel out). Menus open under it; on a phone it
   folds to MENU, which opens one panel under the bar. --nav-space is what it covers at the top. */
:root { --nav-top: 12px; --nav-h: 56px; --nav-side: 16px; --nav-space: calc(var(--nav-top) + var(--nav-h) + env(safe-area-inset-top, 0px)); }
@media (max-width: 899px) { :root { --nav-top: 8px; --nav-h: 52px; --nav-side: 8px; } }
.navbar {
  position: fixed;
  z-index: 30;
  top: calc(var(--nav-top) + env(safe-area-inset-top, 0px));
  left: max(var(--nav-side), env(safe-area-inset-left, 0px));
  right: max(var(--nav-side), env(safe-area-inset-right, 0px));
  max-width: 1104px;
  margin: 0 auto;
}
/* The outline in four strips that leave the corners out, the lit top line, and a drop shadow under it. */
.navbar__bar, .navmenu__list, .navbar__nav {
  --edge: 0 -2px 0 var(--ink), 0 2px 0 var(--ink), -2px 0 0 var(--ink), 2px 0 0 var(--ink);
}
.navbar__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--nav-h);
  padding: 0 8px 0 10px;
  background: rgba(23, 32, 56, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 2px 0 var(--line), var(--edge), 0 6px 0 rgba(9, 10, 20, 0.35);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.brand img { width: 32px; height: 32px; border: 2px solid var(--ink); }
.brand .heading { --o: 2px; font-size: 16px; line-height: 24px; white-space: nowrap; }
.navbar__nav { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.navbar__menus, .navbar__end { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.navbar__menus { margin-left: 8px; }
.navbar__end { margin-left: auto; gap: 8px; }
.navmenu { position: relative; }
.navmenu__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  font: 16px/24px var(--pixel);
  -webkit-font-smoothing: none;
  color: var(--pale);
  background: transparent;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.navmenu__btn:hover, .navmenu__btn[aria-expanded="true"] { color: var(--gold); background: var(--btn-hover); border-color: var(--btn-edge); }
.navmenu__btn:focus-visible { outline: none; color: var(--focus); border-color: var(--focus); background: var(--btn-hover); }
/* The page's own menu: a gold bar under its name. */
.navmenu.is-here > .navmenu__btn { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
.caret { flex: none; }
.navmenu__btn[aria-expanded="true"] .caret { transform: scaleY(-1); }
/* ME: a button like the others on the right. */
.navmenu--end > .navmenu__btn { background: var(--btn); border-color: var(--btn-edge); box-shadow: inset 0 2px 0 var(--btn-lit); }
.navmenu--end > .navmenu__btn:hover, .navmenu--end > .navmenu__btn[aria-expanded="true"] { background: var(--btn-hover); }
.navmenu__list {
  display: none;
  position: absolute;
  z-index: 1;
  top: calc(100% + 14px);
  left: -6px;
  width: 380px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--b0);
  box-shadow: inset 0 2px 0 var(--line), var(--edge), 0 6px 0 rgba(9, 10, 20, 0.45);
}
/* A bridge over the gap, so the pointer can cross from the name to its menu. */
.navmenu__list::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.navmenu--end .navmenu__list { left: auto; right: -6px; width: 300px; }
.navmenu__btn[aria-expanded="true"] + .navmenu__list { display: grid; gap: 2px; }
/* Without JavaScript, a menu opens while the pointer or the keyboard is in it. */
html:not(.js) .navmenu:hover > .navmenu__list, html:not(.js) .navmenu:focus-within > .navmenu__list { display: grid; gap: 2px; }
.navlink {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 6px 10px 8px;
  color: var(--pale);
  text-decoration: none;
  border: 2px solid transparent;
}
.navlink svg { margin-top: 3px; }
.navlink__text { display: grid; min-width: 0; }
.navlink__label { font: 16px/24px var(--pixel); -webkit-font-smoothing: none; }
.navlink__blurb { font-size: 13px; line-height: 18px; color: var(--muted); }
.navlink:hover { color: var(--gold); background: var(--btn-hover); }
.navlink:hover .navlink__blurb { color: var(--light); }
.navlink:focus-visible { outline: none; color: var(--focus); background: var(--btn-hover); border-color: var(--focus); }
.navlink[aria-current="page"] { color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.navbar__end .btn { min-height: 40px; padding: 6px 14px; }
.navbar__end .btn[aria-current="page"] { box-shadow: 0 0 0 2px var(--gold); }
/* MENU: the bar's links folded into a <details>, so it opens with or without JavaScript. Where they fit (1,100 px and
   wider) the fold shows its links in the bar whether it's open or not (::details-content), and MENU is out of sight;
   a browser without ::details-content keeps MENU, and site.js opens the fold for good there. */
.navbar__fold { flex: 1; min-width: 0; }
.navbar__toggle { display: inline-flex; margin-left: auto; min-height: 40px; padding: 6px 12px; list-style: none; cursor: pointer; }
.navbar__toggle::-webkit-details-marker { display: none; }
.navbar__fold[open] > .navbar__toggle { color: var(--gold); background: var(--btn-hover); }
@media (min-width: 1100px) {
  .navbar__fold::details-content { content-visibility: visible; }
  @supports selector(::details-content) { .navbar__fold > .navbar__toggle { display: none; } }
  .navbar__fold[data-pinned] > .navbar__toggle { display: none; }
}
/* A small laptop: the brand's name gives the menus its room. */
@media (min-width: 1100px) and (max-width: 1279px) { .brand .heading { display: none; } .navbar__menus { margin-left: 0; } .navmenu__btn { padding: 6px 8px; } }
/* A phone, a tablet or a small laptop: MENU, and the menus in one panel under the bar, each opening in place. */
@media (max-width: 1099px) {
  .navbar__fold { flex: none; margin-left: auto; }
  .navbar__nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-height: calc(100vh - var(--nav-space) - 24px);
    max-height: calc(100dvh - var(--nav-space) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    background: var(--b0);
    box-shadow: inset 0 2px 0 var(--line), var(--edge), 0 6px 0 rgba(9, 10, 20, 0.45);
  }
  .navbar__menus { flex-direction: column; align-items: stretch; gap: 6px; margin: 0; }
  .navmenu__btn { width: 100%; min-height: 48px; justify-content: space-between; padding: 8px 12px; background: var(--btn); border-color: var(--btn-edge); box-shadow: inset 0 2px 0 var(--btn-lit); }
  .navmenu.is-here > .navmenu__btn { box-shadow: inset 4px 0 0 var(--gold), inset 0 2px 0 var(--btn-lit); }
  .navmenu__list, .navmenu--end .navmenu__list { position: static; width: auto; padding: 6px 0 4px; background: none; box-shadow: none; }
  .navmenu__list::before { display: none; }
  /* Without JavaScript every menu's links show in the panel. */
  html:not(.js) .navmenu__list { display: grid; gap: 2px; }
  .navbar__end { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
  .navbar__end > li { min-width: 0; }
  .navbar__end .btn { width: 100%; min-height: 48px; }
  .navbar__end > .navmenu { grid-column: 1 / -1; order: -1; }
  /* A tablet's panel has room for two columns of links. */
  .navmenu__list { grid-template-columns: minmax(0, 1fr); }
  .navbar__end--me > li { grid-column: 1 / -1; }
}
@media (min-width: 600px) and (max-width: 1099px) { .navmenu__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 359px) { .brand .heading { display: none; } }
main { flex: 1 0 auto; }
/* Anchored headings land below the floating bar. */
main [id] { scroll-margin-top: calc(var(--nav-space) + 16px); }
main.page { padding: calc(var(--nav-space) + 24px) 0 56px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 4px 0 20px; }
.page-head .outlined { color: var(--muted); }
.page-head--route { align-items: center; margin-bottom: 12px; }
.page-head--route .heading { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.page-head__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.route-blurb { margin: 0 0 20px; font-size: 16px; line-height: 24px; color: var(--pale); }
/* WORLD CHAMPIONSHIPS · INNSBRUCK · 2018, after the bands, as the game's ride says it. */
.route-champs { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; color: var(--gold); font-size: 16px; line-height: 24px; }
.route-champs .bands { width: 12px; height: 24px; border: 2px solid var(--ink); }
/* A course off Earth's page (docs/22): ON MARS, its place on the body and its data's credit. */
.body-panel p { margin: 0 0 8px; }
.body-panel p:last-child { margin-bottom: 0; }
.body-panel__place { color: var(--au5); }
.body-panel__place .muted { white-space: nowrap; }
.body-panel__credit { font-size: 11px; line-height: 16px; }
.body-panel__credit a { white-space: nowrap; }
/* Crank Island (docs/28): the island's map, crisp at a whole-number scale (--k game pixels to the CSS
   pixel: 2 on a phone, up to 5 on a wide screen), each route's start a pin on it, as a link. */
.island-map { margin: 0; }
.island-map__frame { --k: 2; position: relative; width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px); border: 2px solid var(--ink); box-sizing: content-box; }
@media (min-width: 440px) { .island-map__frame { --k: 3; } }
@media (min-width: 560px) { .island-map__frame { --k: 4; } }
@media (min-width: 1100px) { .island-map__frame { --k: 5; } }
/* On a route's page the map shares a column: a scale smaller where two columns are narrow. */
@media (min-width: 900px) and (max-width: 1099px) { .island-map--one .island-map__frame { --k: 3; } }
@media (min-width: 1100px) { .island-map--one .island-map__frame { --k: 4; } }
.island-map__img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
/* A map wider than Crank Island's 120 game pixels (docs/28 "The island key") takes about half the scale, so it fits the same room. */
.island-map--wide .island-map__frame { --k: 1; }
@media (min-width: 560px) { .island-map--wide .island-map__frame { --k: 2; } }
@media (min-width: 900px) and (max-width: 1099px) { .island-map--wide.island-map--one .island-map__frame { --k: 1; } }
@media (min-width: 1100px) { .island-map--wide.island-map--one .island-map__frame { --k: 2; } }
/* A pin: 5 × 5 game pixels round the start's pixel, ink framed: gold for a circuit, sky for a cantonal road. */
.pin { position: absolute; left: calc((var(--x) - 2) * var(--k) * 1px); top: calc((var(--y) - 2) * var(--k) * 1px); width: calc(5px * var(--k)); height: calc(5px * var(--k)); box-sizing: border-box; border: calc(1px * var(--k)) solid var(--ink); background: var(--gold); box-shadow: inset 0 calc(1px * var(--k)) 0 var(--pale); }
.pin--road { background: var(--b4); box-shadow: inset 0 calc(1px * var(--k)) 0 var(--b5); }
.pin:hover, .pin.is-here { background: var(--pale); z-index: 1; }
.pin.is-here { outline: calc(1px * var(--k)) solid var(--r4); }
.pin:focus-visible { z-index: 2; }
.pin--key { --k: 2; position: static; display: inline-block; vertical-align: -3px; }
.island-map__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.island-top { display: grid; gap: 20px; margin-top: 20px; align-items: start; }
@media (min-width: 1100px) { .island-top { grid-template-columns: auto minmax(0, 1fr); } }
.island-panel { min-width: 0; }
.island-panel__title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
/* VELOVERSE's page (/veloverse): each island's roads under its name and its flag (docs/28 "The island key"). */
.world-island__name { display: flex; align-items: center; gap: 10px; }
.island-panel--route .island-map { margin-bottom: 12px; }
.island-panel__place { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--b4); }
.island-panel__cups { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.island-cups .group__head { margin-top: 0; }
/* Over the sky, so on a panel of its own: muted grey alone is too faint there. */
.island-cups__rules { margin: 0 0 12px; padding: 8px 12px; background: var(--panel); border: 2px solid var(--ink); color: var(--light); }
.island-cups__list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.island-cups__list .panel + .panel { margin-top: 0; }
.cup-panel { padding: 16px; }
.cup-panel__name { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--gold); }
.cup-panel__races { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cup-panel__races li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cup-panel__n { flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; font: 16px/24px var(--pixel); -webkit-font-smoothing: none; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); box-sizing: border-box; }
.cup-panel__race { display: flex; flex-direction: column; min-width: 0; }
.cup-panel__race a { overflow-wrap: anywhere; }
.canton-head { display: inline-flex; align-items: center; gap: 10px; }
.crumbs { margin: 0 0 8px; font-size: 13px; }
.crumbs a:where(:not(.btn)) { color: var(--muted); }
/* A deep page's trail (src/views/crumbs.tsx): one line of links, the slashes drawn here and kept from screen readers. */
.crumbs ol { display: inline; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline; }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin: 0 0.4em; color: var(--muted); }
.footer { margin-top: 32px; }
/* The footer is the edge of an island: riders crossing the grass now and then, a dirt cliff, then the panel. */
.ground { height: 24px; background:
  linear-gradient(var(--g4) 0 2px, var(--g3) 2px 8px, var(--g2) 8px 10px, transparent 10px),
  repeating-linear-gradient(90deg, var(--br1) 0 30px, var(--br0) 30px 32px) 0 10px / 100% 14px no-repeat;
  border-bottom: 2px solid var(--ink); }
.footer__panel { background: #151d28; }
.footer__in { display: grid; gap: 20px; padding-top: 20px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.footer a:where(:not(.btn)) { color: var(--light); }
/* The lean footer's rows: a row's name, then its links in lines, dotted apart. On a phone the name sits over them. */
.footrows { display: grid; gap: 14px; }
.footrow { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 16px; align-items: baseline; }
.footrow__head { margin: 0; color: var(--gold); justify-self: start; }
.footrow__lines { display: grid; gap: 6px; }
.footrow__links { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.footrow__links li:not(:last-child)::after { content: "·"; padding: 0 8px; color: var(--muted); }
@media (max-width: 599px) { .footrow { grid-template-columns: minmax(0, 1fr); } }
/* A button that reads as a link. */
.linkish { font: inherit; color: var(--light); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--pale); }

/* Google Analytics' consent banner (public/js/analytics.js): a panel along the bottom, never over the page's middle,
   opaque so the footer under it doesn't show through its words. */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  max-width: 600px; margin: 0 auto; padding: 16px 20px;
  background: var(--b0); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--line), 0 6px 0 rgba(9, 10, 20, 0.5);
  font-size: 15px; line-height: 1.45; color: var(--light);
}
.consent p { margin: 0 0 12px; }
.consent b { margin-right: 6px; }
.consent a:where(:not(.btn)) { color: var(--pale); }
.consent__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.consent__short { display: none; }
/* A phone: the short line and the two buttons, well under 15% of the screen; the page makes room for it (--consent-h). */
@media (max-width: 759px) {
  .consent { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); padding: 8px 10px; font-size: 14px; line-height: 20px; }
  .consent p { margin: 0 0 8px; }
  .consent__long { display: none; }
  .consent__short { display: inline; }
  .consent__actions { flex-wrap: nowrap; }
  .consent__actions .btn { flex: 1; min-height: 40px; padding: 4px 12px; }
}
body { padding-bottom: var(--consent-h, 0px); }
.hero { padding-bottom: calc(8px * var(--s) + var(--consent-h, 0px)); }
@media (min-width: 760px) {
  .consent { display: flex; align-items: center; gap: 20px; max-width: 880px; padding: 12px 16px; font-size: 14px; }
  .consent p { margin: 0; flex: 1; }
  .consent__actions { flex: none; }
}
/* The riders' road (public/js/riders.js): the page's whole width, down over the grass at the top of the
   ground, under everything and never in the way of a click. A rider is a window one frame wide over its
   strip, which steps along a frame at a time as it pedals; riding left, the window is mirrored. */
.riders { position: relative; z-index: 1; height: 90px; margin-bottom: -10px; overflow: hidden; pointer-events: none; }
.cyclist { position: absolute; left: 0; bottom: 0; z-index: 1; width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px); }
.cyclist--left { z-index: 0; }
.cyclist__frame { display: block; width: 100%; height: 100%; overflow: hidden; }
.cyclist--left .cyclist__frame { transform: scaleX(-1); }
.cyclist__strip { display: block; width: calc(var(--n) * 100%); height: 100%; animation: pedal var(--dur) steps(var(--n)) infinite; }
.riders.is-paused .cyclist__strip { animation-play-state: paused; }
.cyclist--still .cyclist__strip { animation: none; }
@keyframes pedal { to { transform: translateX(-100%); } }

/* --- panels (RoutePreview, SettingsScreen) ----------------------------------------------------- */

.panel {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--line);
  padding: 20px;
}
@media (max-width: 559px) { .panel { padding: 16px; } }
.panel + .panel, .panel + .tabs, .stack > * + * { margin-top: 20px; }
/* A row of two panels keeps the same gap above and below it as a single panel does. */
.grid2 + .panel, .panel + .grid2, .grid2 + .grid2 { margin-top: 20px; }
/* Side by side in a grid, the gap spaces panels: no extra top margin on the second. */
.grid2 > .panel + .panel { margin-top: 0; }
.panel h2, .panel h3 { margin-top: 0; }
.panel p { margin: 0 0 12px; }
.panel--well { background: var(--well); box-shadow: none; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.lede { font-size: 17px; color: var(--light); }   /* the panel's whole width (the owner, 2026-11-16) */

/* Folder tabs: closed tabs sit lower; the open one joins the panel with a gold bar on top. */
.tabs { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding: 0 2px; margin-bottom: -2px; position: relative; z-index: 1; }
/* A row that scrolls sideways (route select's on a phone) fades at an edge with more tabs beyond it, in three hard
   steps rather than a smooth ramp: a scroll-driven animation grows each band as you scroll away from its end, and
   site.js marks the edges in a browser without one (.more-start, .more-end). */
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
.tabs {
  --fade-size: 36px;
  scroll-padding-inline: var(--fade-size);
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to right, black 0 33.4%, rgb(0 0 0 / 0.66) 33.4% 66.7%, rgb(0 0 0 / 0.33) 66.7%) 0 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to right, rgb(0 0 0 / 0.33) 0 33.3%, rgb(0 0 0 / 0.66) 33.3% 66.6%, black 66.6%) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
}
@supports (animation-timeline: scroll()) {
  .tabs { animation: tabs-fade-start linear both, tabs-fade-end linear both; animation-timeline: scroll(self inline); animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%; }
}
@keyframes tabs-fade-start { to { --fade-start: var(--fade-size); } }
@keyframes tabs-fade-end { from { --fade-end: var(--fade-size); } }
.tabs.more-start { --fade-start: var(--fade-size); }
.tabs.more-end { --fade-end: var(--fade-size); }
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px;
  margin-top: 6px;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: none;
  color: var(--light);
  background: var(--well);
  border: 2px solid var(--ink);
  border-bottom: 0;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--pale); background: rgba(37, 58, 94, 0.9); }
.tab[aria-current] { position: relative; margin-top: 0; padding: 10px 14px 6px; color: var(--gold); background: #172038; }
.tab[aria-current]::before { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 4px; background: var(--gold); view-transition-name: tabbar; }
.tab svg { flex: none; }
.tab__n { font-size: 16px; color: var(--muted); }
.tab:hover .tab__n { color: var(--light); }
.tab[aria-current] .tab__n { color: var(--muted); }
@media (max-width: 559px) { .tabs--collections .tab svg, .tabs--collections .tab__n { display: none; } .tabs--collections .tab { padding-left: 10px; padding-right: 10px; } }
.tabs + .panel { border-top-color: var(--ink); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Badges: RoutePreview._badge. */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.badge {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--b1);
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--line);
}
.badge__label { font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--muted); -webkit-font-smoothing: none; }
.badge__value { grid-column: 2; font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--pale); -webkit-font-smoothing: none; }
.badge__value--big { font-size: 24px; line-height: 32px; }
.badge svg { grid-row: span 2; }
@media (max-width: 559px) { .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } .badge { padding: 6px 8px; column-gap: 6px; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; min-height: 28px; font-family: var(--pixel); font-size: 16px; line-height: 24px; -webkit-font-smoothing: none; background: var(--b1); border: 2px solid var(--ink); color: var(--pale); white-space: nowrap; }
.chip--live { background: var(--g1); color: var(--pale); box-shadow: inset 0 2px 0 var(--g2); }
.chip--upcoming { background: var(--b2); }
.chip--finished { background: var(--slate2); color: var(--light); }
.chip--gold { background: var(--amber); color: var(--r0); }
.chip--cat { color: var(--ink); }
.chip--small { min-height: 24px; padding: 0 6px; gap: 4px; line-height: 20px; }
/* A chip whose words may be long (a ride's reason): it wraps rather than run past a phone's edge. */
.chip--wrap { white-space: normal; max-width: 100%; }
/* Races: one-day classics in plum, stage races in blue; rough roads in their stones. */
.chip--one-day { background: var(--p2); box-shadow: inset 0 2px 0 var(--p3); }
.chip--stage { background: var(--b2); box-shadow: inset 0 2px 0 var(--b3); }
.chip--date { background: var(--well); color: var(--light); }
.chip--cobbles { background: var(--slate2); color: var(--pale); box-shadow: inset 0 2px 0 var(--grey); }
.chip--gravel { background: var(--br1); color: var(--br5); box-shadow: inset 0 2px 0 var(--br2); }
.chip--snow { background: var(--b2); color: var(--pale); box-shadow: inset 0 2px 0 var(--b3); }
/* The world championships (docs/26): the champion's bands, our own five top to bottom (never the
   governing body's jersey), then the year in gold on navy, as route select draws its year chip.
   At 4 px a band, two game pixels. */
.bands { display: block; flex: none; background: linear-gradient(to bottom, var(--p3) 0 20%, var(--r4) 20% 40%, var(--au4) 40% 60%, var(--g4) 60% 80%, var(--b4) 80% 100%); }
.chip--year { padding-left: 0; background: var(--b0); color: var(--gold); }
.chip--year .bands { align-self: stretch; width: 14px; border-right: 2px solid var(--ink); }
/* Crank Island (docs/28): a place with its canton's shield, and a numbered road's route shield (docs/34 "Road signs as built"). */
.chip--island { color: var(--b4); }
.road-sign { display: inline-flex; align-items: center; vertical-align: middle; }
.dot { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--ink); background: var(--muted); }

/* Key caps: SettingsScreen.draw_key. */
.key {
  display: inline-block;
  min-width: 1.6em;
  padding: 2px 6px 4px;
  text-align: center;
  font-family: var(--pixel);
  -webkit-font-smoothing: none;
  color: var(--pale);
  background: var(--b1);
  border: 2px solid var(--ink);
  box-shadow: inset 0 -2px 0 var(--line);
}
.key--inline { font-size: 16px; line-height: 18px; padding: 0 5px 2px; margin: 0 2px; vertical-align: 1px; }
.results.results--fit { min-width: 0; }
.code-caps { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.code-caps .key { font-size: 32px; line-height: 40px; padding: 6px 10px 10px; }
.code-caps .dash { font-family: var(--pixel); font-size: 32px; line-height: 52px; color: var(--muted); }
.code-caps--small { justify-content: flex-start; gap: 4px; }
.code-caps--small .key { font-size: 16px; line-height: 24px; padding: 2px 6px 4px; }
.code-caps--small .dash { font-size: 16px; line-height: 32px; }
/* A phone's width holds all eight keys and the dash on one line. */
@media (max-width: 420px) { .code-caps:not(.code-caps--small) .key { font-size: 24px; line-height: 32px; padding: 4px 5px 8px; min-width: 0; } .code-caps:not(.code-caps--small) .dash { font-size: 24px; line-height: 44px; } .code-caps { gap: 3px; } }
/* /computer: Computer's screens in a row that scrolls inside itself. Each is the iPhone's 440 points at
   220 px, one pixel a dot on a 2× screen, in the shot's 2 px ink edge, with the store's caption under it. */
.phone-shots { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 8px; }
.phone-shots ul { display: flex; gap: 16px; width: max-content; margin: 0; padding: 0; list-style: none; }
.phone-shots li { flex: none; width: 224px; scroll-snap-align: start; }
.phone-shots figure { margin: 0; }
.phone-shots .shot { display: block; }
/* A caption takes half the gap either side, so the longest (19 letters) stays on one line. */
.phone-shots figcaption { margin: 8px -8px 0; font: 16px/24px var(--pixel); color: var(--gold); text-align: center; white-space: nowrap; -webkit-font-smoothing: none; }
/* /go: the Apple Watch's 422 × 514 shots at 211 px, one pixel a dot on a 2× screen, in the same 2 px edge. */
.phone-shots--watch li { width: 215px; }
/* /go: the app's icon, its 128 squares at one CSS pixel each, beside what Go is; above it on a phone. */
.go-intro { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.go-intro .lede { margin-top: 0; }
.go-intro .kicker { text-align: left; }
.go-icon { display: block; box-sizing: content-box; width: 128px; height: 128px; border: 2px solid var(--ink); }
@media (max-width: 599px) { .go-intro { grid-template-columns: minmax(0, 1fr); } }
/* /go: the circuits' four groups, two by two on a laptop. */
.go-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.go-groups > li { padding: 12px 14px; background: var(--well); border: 2px solid var(--ink); }
.go-groups p { margin: 6px 0 0; }
.go-groups__head { display: flex; align-items: center; gap: 10px; }
.go-groups__head h3 { margin: 0; color: var(--pale); }

/* --- forms (SettingsScreen rows) --------------------------------------------------------------- */

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label, legend.label { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--gold); -webkit-font-smoothing: none; padding: 0; }
.hint { font-size: 13px; color: var(--muted); }
.input, .select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font: 16px/24px var(--sans);
  color: var(--pale);
  background: var(--well);
  border: 2px solid var(--edge);
  border-radius: 0;
}
.input--px { font-family: var(--pixel); -webkit-font-smoothing: none; }
.input--code { font-family: var(--pixel); font-size: 32px; line-height: 40px; letter-spacing: 6px; text-align: center; text-transform: uppercase; max-width: 340px; }
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--focus); }
.input::placeholder { color: var(--grey2); }
.input:disabled, .select:disabled { color: var(--grey2); background: var(--night); border-color: var(--slate2); cursor: not-allowed; }
/* The browser's autofill keeps the field's own colours (Safari paints it pale yellow otherwise). */
.input:-webkit-autofill, .input:-webkit-autofill:hover { -webkit-text-fill-color: var(--pale); caret-color: var(--pale); box-shadow: inset 0 0 0 64px var(--b1); }
.input:-webkit-autofill:focus { -webkit-text-fill-color: var(--pale); box-shadow: inset 0 0 0 64px var(--b1), 0 0 0 2px var(--focus); }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(-45deg, transparent 50%, var(--gold) 50%); background-position: right 16px top 50%, right 10px top 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.select option { background: var(--b0); color: var(--pale); }
.row2 { display: grid; gap: 16px; }
/* USERNAME: an @ in front of the field, as it shows on the rider page. */
.input-at { display: flex; }
.input-at__at { display: grid; place-items: center; min-width: 40px; font: 16px/24px var(--pixel); color: var(--gold); background: var(--b1); border: 2px solid var(--edge); border-right: 0; -webkit-font-smoothing: none; }
.input-at .input { flex: 1; min-width: 0; }
.username-url { color: var(--light); overflow-wrap: anywhere; }
.username-status:empty, .short-status:empty { display: none; }
.username-status[data-state="ok"], .short-status[data-state="ok"] { color: var(--g4); }
.username-status[data-state="bad"], .short-status[data-state="bad"] { color: var(--down); }
/* SHORT NAME: four pixel letters, upper case as the API keeps them, and the club's chip beside them as the game draws it. */
.short-field { display: flex; align-items: center; gap: 16px; }
.input--short { width: 120px; flex: none; letter-spacing: 2px; text-transform: uppercase; }
textarea.input { resize: vertical; min-height: 96px; }
.bio-count { justify-self: end; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.errors { margin: 0 0 16px; padding: 12px 16px; background: rgba(117, 36, 56, 0.55); border: 2px solid var(--r3); }
.errors p { margin: 0; }
.errors ul { margin: 4px 0 0; padding-left: 20px; }
.notice { margin: 0 0 16px; padding: 12px 16px; background: rgba(70, 130, 50, 0.35); border: 2px solid var(--g2); }
.dev-hint { margin: 12px 0 0; padding: 8px 12px; border: 2px dashed var(--grey); color: var(--light); font-size: 13px; }

/* Segmented choice: a sliding amber slab (Row.CHOICE). */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: inline-block; min-height: 36px; padding: 6px 12px; font-family: var(--pixel); font-size: 16px; line-height: 20px; -webkit-font-smoothing: none; color: var(--light); background: var(--well); border: 2px solid var(--edge); cursor: pointer; }
.seg label:hover { color: var(--pale); background: var(--b1); }
.seg input:checked + label { background: var(--amber); color: var(--r0); border-color: var(--r0); box-shadow: inset 0 2px 0 var(--gold); }
.seg input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Switch: Row.TOGGLE. */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-family: var(--pixel); font-size: 16px; -webkit-font-smoothing: none; }
.switch input { appearance: none; position: relative; flex: none; width: 52px; height: 28px; margin: 0; background: var(--night); border: 2px solid var(--edge); cursor: pointer; transition: background 0.15s steps(3); }
.switch input::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--pale); border: 2px solid var(--ink); box-shadow: inset 0 -2px 0 var(--muted); transition: left 0.15s steps(4); }
.switch input:checked { background: var(--g2); border-color: var(--g3); }
.switch input:checked::before { left: 26px; }
.switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch input:disabled { background: var(--night); border-color: var(--slate2); cursor: not-allowed; }
.switch input:disabled::before { background: var(--grey); box-shadow: none; }
/* Small words beside a switch ("I'm sure") are running text: the pixel font is for 16 px and up. */
.switch .small { font-family: var(--sans); -webkit-font-smoothing: auto; }

/* --- flags, jerseys, sprites -------------------------------------------------------------------- */

/* Flags.draw: an 18×12 cell of the atlas inside a 1 px #090a14 frame. */
.flag {
  --k: 1;
  display: inline-block;
  flex: none;
  box-sizing: content-box;
  width: calc(18px * var(--k));
  height: calc(12px * var(--k));
  border: calc(1px * var(--k)) solid var(--ink);
  background-image: url("/assets/flags/flags.png");
  background-size: calc(288px * var(--k)) calc(156px * var(--k));
  background-position: calc(var(--fx) * var(--k) * -1px) calc(var(--fy) * var(--k) * -1px);
  vertical-align: -2px;
}
.flag--2 { --k: 2; }
.flag--3 { --k: 3; }
.flag--4 { --k: 4; }
.flag--none { background: var(--slate2); color: var(--light); font: 8px/12px var(--pixel); text-align: center; }
.flag--2.flag--none { font-size: 16px; line-height: 24px; }
/* A course off Earth's body where the flag goes (docs/22): its own 18×12 pixels in the same frame. */
.flag--body { background: none; }
.flag--body > svg { display: block; }
/* A canton's arms (docs/28) the same way: the game's own 18×12, framed like a flag. */
.flag--arms { background: none; }
/* Flags.draw_waving: each column rides a travelling wave. */
.flagpole { position: relative; display: inline-block; width: calc(26px * var(--k)); height: calc(40px * var(--k)); --k: 3; }
.flagpole__pole { position: absolute; left: calc(1px * var(--k)); top: calc(2px * var(--k)); width: calc(1px * var(--k)); bottom: 0; background: var(--light); box-shadow: calc(1px * var(--k)) 0 var(--grey2); }
.flagpole__finial { position: absolute; left: 0; top: 0; width: calc(3px * var(--k)); height: calc(3px * var(--k)); background: var(--gold); }
.flagpole__cloth { position: absolute; left: calc(3px * var(--k)); top: calc(3px * var(--k)); display: flex; }
.flagpole__cloth i {
  display: block;
  width: calc(1px * var(--k));
  height: calc(12px * var(--k));
  background-image: url("/assets/flags/flags.png");
  background-size: calc(288px * var(--k)) calc(156px * var(--k));
  background-position: calc((var(--fx) + var(--c)) * var(--k) * -1px) calc(var(--fy) * var(--k) * -1px);
  box-shadow: 0 calc(-1px * var(--k)) 0 var(--ink), 0 calc(1px * var(--k)) 0 var(--ink);
  animation: wave 1.571s step-end infinite;
  animation-delay: calc(var(--c) * 0.1375s - 1.571s);
}
.flagpole__cloth i:last-child { box-shadow: 0 calc(-1px * var(--k)) 0 var(--ink), 0 calc(1px * var(--k)) 0 var(--ink), calc(1px * var(--k)) 0 0 var(--ink); }
/* sin(4t − 0.55x) · (x/18) · 1.6: the far columns swing a pixel up and down, darker in the troughs. */
@keyframes wave {
  0% { transform: translateY(0); filter: none; }
  8.3% { transform: translateY(calc(var(--amp) * var(--k) * 1px)); }
  25% { filter: brightness(0.86); }
  41.7% { transform: translateY(0); }
  58.3% { transform: translateY(calc(var(--amp) * var(--k) * -1px)); }
  75% { filter: none; }
  91.7% { transform: translateY(0); }
}
.jersey { display: inline-block; vertical-align: -3px; }
.sprite {
  display: block;
  width: calc(var(--fw) * var(--k) * 1px);
  height: calc(var(--fh) * var(--k) * 1px);
  background-image: var(--img);
  background-size: calc(var(--fw) * var(--n) * var(--k) * 1px) calc(var(--fh) * var(--k) * 1px);
  animation: sprite var(--dur) steps(var(--n)) infinite;
  --k: 2;
}
@keyframes sprite { to { background-position-x: calc(var(--fw) * var(--n) * var(--k) * -1px); } }
.sprite--ghost { opacity: 0.5; filter: saturate(0.2) brightness(1.5); }
.shot { width: 100%; height: auto; border: 2px solid var(--ink); }
.shot--smooth { image-rendering: auto; }
.feel-card { max-width: 448px; justify-self: center; width: 100%; }
.icon { display: inline-block; vertical-align: middle; }

/* --- route cards and profiles ------------------------------------------------------------------- */

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.cards > * { min-width: 0; }
@media (max-width: 559px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 12px 12px 16px;
  color: var(--pale);
  text-decoration: none;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--b1);
}
.card:hover { background: var(--b1); color: var(--pale); }
.card:hover::before, .card:focus-visible::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gold); }
.card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--gold); }
.card__head { display: flex; align-items: center; gap: 10px; }
.card__name { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--pale); -webkit-font-smoothing: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.card:hover .card__name { color: var(--gold); }
.card__meta { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--muted); -webkit-font-smoothing: none; }
.card__meta .mountains { margin-left: auto; }
/* Cards with chips and a blurb share their rows across a line of cards (subgrid), so the profiles line up. */
.cards--facts { row-gap: 10px; }
.cards--facts > .card { grid-row: span 6; grid-template-rows: subgrid; row-gap: 8px; }
.cards--facts .card__name { white-space: normal; }
.card__chips { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; }
.card__blurb { font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--light); -webkit-font-smoothing: none; }
.card__leader { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-height: 20px; }
.card__leader b { color: var(--pale); font-weight: 600; }
.profile { width: 100%; height: auto; border: 2px solid var(--ink); }
.profile-wrap { max-width: calc(var(--pw) * 2px + 4px); }
.mountains { display: inline-flex; gap: 2px; }
.minimap { width: 100%; height: auto; border: 2px solid var(--ink); }
/* A rough surface's stones as a 2 px checker, as on the profile's road strip (pixel.ts SURFACE_COLS). */
.swatch { display: inline-block; flex: none; width: 16px; height: 12px; border: 2px solid var(--ink); vertical-align: -2px; image-rendering: pixelated; }
.swatch--cobbles { background: repeating-conic-gradient(#a8b5b2 0 25%, #577277 0 50%) 0 0 / 4px 4px; }
.swatch--gravel { background: repeating-conic-gradient(#e7d5b3 0 25%, #c09473 0 50%) 0 0 / 4px 4px; }
.profile-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 0 0 !important; }
.profile-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.results.climbs td, .results.sectors td { white-space: nowrap; }
.results .climbs__name, .results .sectors__name { white-space: normal; width: 100%; }
/* A climb's gradient on a tag of its grade's colour (pixel.ts GRADE_COLS) in ink, like its number tag. */
.grade-tag { display: inline-block; padding: 0 4px; font-weight: 700; color: var(--ink); background: var(--g3); border: 1px solid var(--ink); }
.results .climbs__name .who > span, .results .sectors__name .who > span { color: var(--pale); }
/* --- the rider card and the ranking (the game repo's docs/19) ------------------------------------- */
.rating { --type: var(--grey); --type-dark: var(--slate2); margin-top: 20px; }
.rating__grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
@media (min-width: 860px) { .rating__grid { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); } }
.rating__card { border: 2px solid var(--ink); box-shadow: inset 0 0 0 2px var(--type), inset 0 0 0 4px var(--ink); background: #151d33; padding: 12px; }
.rating__card--none { --type: var(--grey); }
.rating__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ovr { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 12px 6px; background: var(--night); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--type); }
.ovr__label { font: 16px/20px var(--pixel); color: var(--type-text); -webkit-font-smoothing: none; }
.ovr__num { font: 48px/48px var(--pixel); color: var(--gold); text-shadow: 2px 0 var(--r0), -2px 0 var(--r0), 0 2px var(--r0), 0 -2px var(--r0), 3px 4px var(--ink); -webkit-font-smoothing: none; }
.ovr--none .ovr__num { color: var(--grey); text-shadow: none; }
.type-badge { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
/* A type's colour (src/lib/ratings.ts TYPES) draws its bars and emblem; its words take the lit step of the same
   ramp, which reads on every row and card. */
.rating, .type-badge { --type-text: var(--grey2); }
.rating--sprinter, .type-badge--sprinter { --type-text: var(--g4); }
.rating--climber, .type-badge--climber { --type-text: var(--r5); }
.rating--puncheur, .type-badge--puncheur { --type-text: var(--au4); }
.rating--rouleur, .type-badge--rouleur { --type-text: var(--b4); }
.rating--all_rounder, .type-badge--all_rounder { --type-text: var(--au5); }
.type-badge__word { font: 16px/20px var(--pixel); color: var(--type-text); -webkit-font-smoothing: none; }
.results .type-badge__word, .small .type-badge__word { font-size: 16px; }
.rating__hex { position: relative; display: flex; justify-content: center; margin-top: 8px; background: var(--well); padding: 8px 0; }
.rating__hex .hexagon { max-width: 100%; height: auto; }
.rating__none { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 4px 10px; background: var(--night); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--amber); color: var(--pale); white-space: nowrap; }
.specialties { width: 100%; border-collapse: collapse; }
.specialties th { text-align: left; font: 16px/24px var(--pixel); color: var(--muted); font-weight: 400; padding: 2px 12px 2px 0; white-space: nowrap; width: 1%; -webkit-font-smoothing: none; }
.specialties td.num { font: 16px/24px var(--pixel); text-align: right; width: 3em; color: var(--light); -webkit-font-smoothing: none; }
.specialties tr.is-top th { color: var(--type-text); }
.specialties tr.is-top td.num { color: var(--pale); }
.specialties__bar { padding: 2px 0; }
.specialties__bar > span { display: block; height: 14px; background: var(--b3); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b4); min-width: 4px; }
.specialties tr.is-top .specialties__bar > span { background: var(--type); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.rank-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.rank-box > div { background: var(--well); border: 2px solid var(--ink); padding: 6px 10px; display: flex; flex-direction: column; }
.rank-box__num { font: 32px/36px var(--pixel); color: var(--pale); -webkit-font-smoothing: none; }
.rank-box__num--gold { color: var(--gold); }
.rank-box__label { font-size: 14px; color: var(--muted); }
@media (max-width: 559px) { .rank-box__num { font-size: 24px; line-height: 28px; } }
.rating__how p { margin: 0 0 8px; }
.pips { display: flex; gap: 8px; list-style: none; padding: 0; margin: 8px 0 0; }
.pips li { width: 40px; height: 28px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--night); font: 16px/1 var(--pixel); color: var(--grey2); }
.pips li.is-done { background: var(--g3); color: var(--ink); }
.rating .rating__h3 { margin: 28px 0 8px; }
.results.bests th[scope="row"] { text-align: left; color: var(--muted); font-weight: 400; }
.best-bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.best-bars li { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.best-bars__bar { height: 64px; background: var(--night); border: 2px solid var(--ink); display: flex; align-items: flex-end; }
.best-bars__bar > span { display: block; width: 100%; background: var(--type); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.best-bars__label { font: 16px/20px var(--pixel); color: var(--gold); text-align: center; -webkit-font-smoothing: none; }
@media (max-width: 559px) { .best-bars__label { font-size: 0; } .best-bars__label::first-letter { font-size: 16px; } .best-bars__bar { height: 48px; } }
.results.points td.gold, .results.ranking td.gold { font-weight: 700; }
.results .place--1 { color: var(--gold); }
.results .place--2 { color: var(--light); }
.results .place--3 { color: var(--br3); }
.results tfoot th, .results tfoot td { border-top: 2px solid var(--ink); }
.results.ranking .handle { color: var(--muted); }
.subtabs__gap { flex: 0 0 12px; }
.ranking-empty { display: flex; gap: 24px; align-items: center; padding: 16px; background: var(--well); border: 2px solid var(--ink); }
.ranking-empty .actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 559px) { .ranking-empty { flex-direction: column; align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) { .rider-dot { display: none; } }

/* --- route select's tabs: months and regions -------------------------------------------------- */

.tab-panel { padding-top: 16px; padding-bottom: 16px; }
.tab-panel .lede { margin: 0; font-size: 16px; }
.tab-panel .lede + .px { margin: 12px 0 0; }
.tab-panel .tab-panel__more { margin: 12px 0 0; color: var(--light); }
/* The jump row: a chip per month or region. It rides under the floating bar on wider screens. */
.jump {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0 0;
  padding: 6px;
  background: var(--b0);
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--b1);
}
@media (min-width: 560px) { .jump { position: sticky; top: calc(var(--nav-space) + 8px); z-index: 10; } }
/* Regions, the island's places and decades: names of any length, so each chip is as wide as its name and the row wraps. */
.jump--regions, .jump--decades { display: flex; flex-wrap: wrap; }
.jump--regions .jump__item, .jump--decades .jump__item { flex: 1 1 auto; padding: 2px 12px; }
@media (max-width: 559px) { .jump { grid-template-columns: repeat(6, minmax(0, 1fr)); } .jump--regions, .jump--decades { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jump__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 2px 4px;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 20px;
  -webkit-font-smoothing: none;
  color: var(--pale);
  background: var(--btn);
  border: 2px solid var(--btn-edge);
  box-shadow: inset 0 2px 0 var(--btn-lit);
  text-decoration: none;
  white-space: nowrap;
}
.jump__item:hover { background: var(--btn-hover); color: var(--gold); }
.jump__item.is-empty { color: var(--grey2); background: var(--well); border-color: transparent; box-shadow: none; }
/* THE VELOVERSE's sub-tabs, its islands (docs/28 "The island key") then MARS, MOON and VENUS, as route select's
   sub-tabs: each as wide as its name, the open one lit as a picked option. The strip stays put; the row under it rides. */
.jump--islands { position: static; display: flex; flex-wrap: wrap; }
.jump--islands .jump__item { flex: 1 1 auto; padding: 2px 12px; }
.jump__item[aria-current] { color: var(--r0); background: var(--amber); border-color: var(--r0); box-shadow: inset 0 2px 0 var(--gold); }
.group { margin-top: 28px; }
.group__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 12px; font-weight: 400; }
.group__head .outlined { color: var(--muted); font-size: 16px; }
main .group__head[id] { scroll-margin-top: calc(var(--nav-space) + 76px); }
@media (max-width: 559px) { main .group__head[id] { scroll-margin-top: calc(var(--nav-space) + 12px); } }

/* --- the track (docs/16): events, the oval, the velodromes --------------------------------------- */

/* The oval is pixel art at 2×; a narrow column may only shrink it. */
.oval { max-width: 100%; height: auto; }
.chip--track { background: var(--br1); color: var(--br5); box-shadow: inset 0 2px 0 var(--br2); }
.chip--flying { background: var(--au2); color: var(--pale); box-shadow: inset 0 2px 0 var(--au3); }
.chip--standing { background: var(--r2); color: var(--pale); box-shadow: inset 0 2px 0 var(--r3); }
.chip--pursuit { background: var(--b2); box-shadow: inset 0 2px 0 var(--b3); }
.chip--race { background: var(--p1); color: var(--p5); box-shadow: inset 0 2px 0 var(--p2); }
.chip--place { background: var(--b1); color: var(--gold); box-shadow: inset 0 2px 0 var(--b2); }
.card__blurb--text { font: 14px/1.45 var(--sans); color: var(--light); -webkit-font-smoothing: auto; }
.card__oval { display: flex; align-items: center; }
.card__oval svg { border: 2px solid var(--ink); background: var(--night); }
.card__time { font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.event-mark { display: inline-flex; align-self: center; }
.event-blurb { margin: 0 0 20px; }
/* Running text straight on the sky: a 2 px outline in the panel's blue, as .outlined does for pixel text. Its
   letters are light, never muted: muted letters on the sky's light bands leave only their outline to read. */
.event-blurb, .outlined-text { text-shadow: -1px 0 var(--b0), 1px 0 var(--b0), 0 -1px var(--b0), 0 1px var(--b0), 0 0 4px var(--b0); }
.outlined-text.muted, .outlined-text.hint, .outlined-text .muted, .report-link.outlined-text a:where(:not(.btn)) { color: var(--light); }
.heading__venue, .heading__sep { font-size: 24px; line-height: 32px; color: var(--pale); }
.page-head--ride { align-items: center; flex-wrap: nowrap; }
.page-head--ride .heading { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 559px) { .heading__venue { display: block; font-size: 16px; line-height: 24px; } .heading__sep { display: none; } }
.tab__short { display: none; }
@media (max-width: 559px) { .tab__full { display: none; } .tab__short { display: inline; } }
.oval-panel { padding: 12px; }
.oval-panel svg { margin: 0 auto; }
.oval-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 4px 0 !important; }
.oval-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.swatch--timed { background: linear-gradient(var(--br4) 0 20%, var(--gold) 20% 80%, var(--br4) 80%); }
.swatch--you { width: 12px; background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.swatch--ghost { width: 12px; background: var(--b5); }
.swatch--line { background: linear-gradient(var(--br4) 0 33%, var(--ink) 33% 66%, var(--br4) 66%); }
.swatch--sprinters { background: linear-gradient(var(--br4) 0 33%, var(--r3) 33% 66%, var(--br4) 66%); }
.swatch--stayers { background: linear-gradient(var(--br4) 0 33%, var(--b2) 33% 66%, var(--br4) 66%); }
.how { margin: 0; padding: 0 0 0 18px; }
.how li + li { margin-top: 6px; }
.how li::marker { color: var(--gold); }
.races .races__note { margin: 0 0 4px; color: var(--light); }
.list.races__list li { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 2px 16px; align-items: baseline; }
.races__name { display: inline-flex; gap: 10px; align-items: center; font-family: var(--pixel); font-size: 16px; line-height: 24px; -webkit-font-smoothing: none; }
.races__name svg { align-self: center; }
.races__facts { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--muted); -webkit-font-smoothing: none; }
.races__blurb { grid-column: 2; font-size: 14px; color: var(--light); }
@media (max-width: 599px) { .list.races__list li { grid-template-columns: minmax(0, 1fr); } .races__blurb { grid-column: 1; } }
.venues__intro { margin-bottom: 12px; }
.venues { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; }
.venue { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 4px; padding: 12px; background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); }
.venue__head { display: flex; align-items: center; gap: 10px; }
.venue__name { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--pale); -webkit-font-smoothing: none; }
.venue__where { font-size: 13px; color: var(--muted); }
.venue__facts { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--b5); -webkit-font-smoothing: none; margin: 0; }
.venue__art { display: flex; align-items: center; justify-content: center; min-height: 204px; padding: 6px 0; }
.venue__blurb { font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--light); -webkit-font-smoothing: none; margin: 0; }
.venues__credit { margin: 10px 0 0; }
.venue-panel__body { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.venue-panel__body p { margin: 0 0 6px; }
.venue-panel__name { display: flex; gap: 10px; align-items: center; font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--pale); -webkit-font-smoothing: none; }
.venue-panel__art { flex: none; max-width: 100%; }

/* --- the Lab (docs/23): FTP tests, which have no route ------------------------------------------- */

.chip--lab { background: var(--b0); color: var(--b4); box-shadow: inset 0 2px 0 var(--b1); }
.lab-inline { color: var(--gold); }
/* On a phone the flask says LAB already, so a list keeps its time on the line. */
@media (max-width: 559px) { .list .chip--lab { display: none; } }
.lab-panel__result { margin: 0 0 6px; font-size: 18px; }
.lab-panel__result b { color: var(--gold); }
.lab-panel__flags { margin: 8px 0 0; padding-left: 20px; color: var(--light); }
.lab-history__chart { margin-top: 12px; overflow-x: auto; }

/* --- crits (docs/16 "Phase 2: crits"): circuits, their corners and the formats ----------------------- */

.chip--crit { background: var(--slate); color: var(--gold); box-shadow: inset 0 2px 0 var(--slate2); }
.chip--tight { background: var(--au2); color: var(--pale); box-shadow: inset 0 2px 0 var(--au3); }
/* The circuit is pixel art at 2×; a narrow column may only shrink it. */
.crit-map { max-width: 100%; height: auto; }
.card__map { display: flex; align-items: center; }
.card__map svg { border: 2px solid var(--ink); }
.crit-panel { padding: 12px; }
.crit-panel svg { margin: 0 auto; border: 2px solid var(--ink); }
.crit-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 4px 0 !important; }
.crit-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.swatch--banners { background: repeating-linear-gradient(90deg, var(--au5) 0 4px, var(--r3) 4px 8px, var(--pale) 8px 12px); }
.formats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); margin-top: 12px; }
.formats .panel + .panel { margin-top: 0; }
.format { display: grid; align-content: start; gap: 8px; }
.format__name { margin: 0; }
.format__blurb { margin: 0 !important; font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--light); -webkit-font-smoothing: none; }
.format-all { margin-top: 12px; }

/* --- raceways: motor-racing circuits, drawn on their grass with kerbs and gravel ---------------------- */

.chip--raceway { background: var(--slate); color: var(--pale); box-shadow: inset 0 2px 0 var(--slate2); }
.swatch--kerbs { background: repeating-linear-gradient(90deg, var(--r3) 0 4px, var(--pale) 4px 8px); }
.swatch--gravel-trap { background: repeating-conic-gradient(#e7d5b3 0 25%, #c09473 0 50%) 0 0 / 4px 4px; }

/* --- cyclocross (docs/31): courses, their surfaces, obstacles and race day ------------------------- */

.chip--cx { background: var(--g1); color: var(--g5); box-shadow: inset 0 2px 0 var(--g2); }
.chip--round { background: var(--night); color: var(--gold); }
.chip--season { background: var(--night); color: var(--light); }
.chip--cond-dry { background: var(--br1); color: var(--br5); box-shadow: inset 0 2px 0 var(--br2); }
.chip--cond-mud { background: var(--br0); color: var(--br4); box-shadow: inset 0 2px 0 var(--br1); }
.chip--cond-heavy { background: var(--au0); color: var(--br4); box-shadow: inset 0 2px 0 var(--br0); }
.chip--cond-sand { background: var(--au2); color: var(--pale); box-shadow: inset 0 2px 0 var(--au3); }
.chip--cond-frozen { background: var(--b1); color: var(--b5); box-shadow: inset 0 2px 0 var(--b2); }
.chip--cond-snow { background: var(--b2); color: var(--pale); box-shadow: inset 0 2px 0 var(--b3); }
.swatch--grass { background: repeating-conic-gradient(#75a743 0 25%, #468232 0 50%) 0 0 / 4px 4px; }
.swatch--sand { background: repeating-conic-gradient(#e8c170 0 25%, #d7b594 0 50%) 0 0 / 4px 4px; }
.swatch--woods { background: repeating-conic-gradient(#7a4841 0 25%, #25562e 0 50%) 0 0 / 4px 4px; }
.swatch--snow { background: repeating-conic-gradient(#ebede9 0 25%, #a4dddb 0 50%) 0 0 / 4px 4px; }
.swatch--asphalt { background: var(--slate); }
.route-cx { margin: 0 0 12px; color: var(--gold); font-size: 16px; line-height: 24px; }
/* The surface bar is pixel art at 2×; a narrow column may only shrink it. */
.surface-bar { display: block; max-width: 100%; height: auto; }
.card__bar { display: grid; gap: 6px; align-content: center; }
.cx-lap { display: grid; gap: 10px; }
.cx-lap .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0; }
.cx-lap .legend > span { display: inline-flex; gap: 6px; align-items: center; }
.cx-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.cx-facts dt { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--muted); -webkit-font-smoothing: none; }
.cx-facts dd { margin: 0; line-height: 24px; }
.features__name { font-family: var(--pixel); font-size: 16px; color: var(--pale); -webkit-font-smoothing: none; }
.results.corners td { height: 34px; }
.results .corners__name .who > span { white-space: normal; }
.results tr.is-tight td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
/* A robot in a result: its name in capitals and a chip, never a link. */
.who--bot b { font-weight: 700; color: var(--b5); letter-spacing: 0.02em; }
.who--bot > span { display: inline-flex; align-items: center; }
.chip--bot { margin-left: 8px; background: var(--slate); color: var(--b4); vertical-align: 1px; }
.results .chip--bot, .race-story .chip--bot { min-height: 0; height: 20px; padding: 0 4px; font-size: 16px; line-height: 16px; vertical-align: 0; }

/* --- results tables, after ProCyclingStats ------------------------------------------------------- */

.table-scroll { position: relative; overflow-x: auto; margin: 0 -2px; border: 2px solid var(--ink); background: var(--b0); scrollbar-width: thin; }
.results { width: 100%; min-width: 560px; border-collapse: collapse; font: 14px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
@media (max-width: 599px) { .results { min-width: 0; } .results .opt { display: none; } .results td, .results th { padding-left: 6px; padding-right: 6px; } .results .ag { display: none; } }
.results th {
  padding: 8px 8px 6px;
  font: 11px/1.2 var(--sans);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  background: var(--b1);
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.results td { padding: 5px 8px; height: 30px; border-top: 1px solid rgba(9, 10, 20, 0.6); white-space: nowrap; }
/* The owner's list of riders (/admin/riders): cells start at the top, and a rider's facts and what they own wrap. */
.results--people td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.results--people .people__who { white-space: normal; min-width: 280px; }
.results--people .people__owns { white-space: normal; min-width: 180px; }
/* The owner's news (/admin/news) and Pro (/admin/pro): a title or a grant's note wraps rather than widening the table. */
.results .news-title, .results .grant-note { white-space: normal; min-width: 160px; overflow-wrap: anywhere; }
.results tbody tr:nth-child(odd) { background: var(--zebra); }
.results tbody tr:nth-child(even) { background: var(--b0); }
/* The row under the pointer darkens to the night well: every colour on a row (places, types, gaps) still reads there. */
.results tbody tr:hover { background: var(--night); }
.results tr.is-me { background: rgba(190, 119, 43, 0.18) !important; box-shadow: inset 4px 0 0 var(--gold); }
.results tr.is-split td { border-top: 2px dashed var(--grey); }
.results .num { text-align: right; }
.results .rank { width: 40px; text-align: right; font-weight: 700; color: var(--pale); }
.results .chg { width: 46px; font-size: 12px; }
.results .rider { width: 100%; }
.results .rider a { color: var(--pale); text-decoration: none; }
.results .rider a:hover { color: var(--gold); text-decoration: underline; }
.results .rider b { font-weight: 700; letter-spacing: 0.01em; }
.ag { margin-left: 6px; font-size: 11px; color: var(--muted); }
.results .time { text-align: right; font-weight: 600; }
.results .time--gap { font-weight: 400; color: var(--light); }
.results .same { color: var(--muted); }
.results .pts { text-align: right; font-weight: 700; color: var(--gold); }
.results .date { color: var(--muted); font-size: 13px; }
.results .ride-link { color: var(--b4); }
.results .partial td { color: var(--muted); }
.who { display: inline-flex; align-items: center; gap: 8px; }
.chg .up { color: var(--up); }
.chg .down { color: var(--down); }
.chg .same { color: var(--muted); }
.chg svg { display: inline-block; margin-right: 3px; vertical-align: 0; }
.pause-mark { display: inline-block; margin-left: 4px; color: var(--muted); font-size: 11px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 12px 0; }
.filters .field { gap: 2px; min-width: 130px; flex: 1 1 130px; }
.filters .field > label { font-size: 16px; line-height: 20px; color: var(--muted); }
.filters .select { min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.js .filters .apply { display: none; }
.provisional { display: inline-flex; gap: 6px; align-items: center; color: var(--gold); font-size: 13px; }

/* --- landing sections --------------------------------------------------------------------------- */

.section { padding: 28px 0; }
.section--first { padding-top: 40px; }
.split { display: grid; gap: 24px; align-items: center; }
.split > * { min-width: 0; }
/* The game's screenshots stay at 1× (or 2× on a Retina screen) wherever they fit. */
.split .shot, .devices .shot { max-width: 644px; margin: 0 auto; }
/* A reversed split puts its picture first on a wide screen; on a phone its words still come first. */
@media (min-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr) 644px; } .split--rev { grid-template-columns: 644px minmax(0, 1fr); } .split--rev > .shot { order: -1; } }
@media (max-width: 699px) { .shot { image-rendering: auto; } }
.feature-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--light); }
.feature-list svg { margin-top: 4px; }
.road {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--b1);
  aspect-ratio: 16 / 9;
}
.road img.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.road .rider { position: absolute; transform: translate(-50%, -100%); }
.nameplate {
  position: absolute;
  transform: translate(-50%, 0);
  padding: 0 4px;
  font: 8px/12px var(--pixel);
  -webkit-font-smoothing: none;
  background: rgba(9, 10, 20, 0.82);
  border: 1px solid var(--ink);
  color: var(--pale);
  white-space: nowrap;
}
@media (min-width: 560px) { .nameplate { font-size: 16px; line-height: 20px; padding: 0 6px; border-width: 2px; } }
.ridelist { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; }
.ridelist div { display: grid; grid-template-columns: auto auto; gap: 8px; justify-content: space-between; padding: 2px 8px; min-width: 150px; font: 16px/20px var(--pixel); -webkit-font-smoothing: none; background: rgba(9, 10, 20, 0.82); border: 2px solid var(--ink); }
@media (max-width: 559px) { .ridelist div { font-size: 8px; line-height: 12px; min-width: 96px; padding: 1px 4px; border-width: 1px; } }
.ridelist .ahead { color: var(--down); }
.ridelist .behind { color: var(--up); }
.feel { width: 100%; height: auto; border: 2px solid var(--ink); }
.slider { position: relative; height: 18px; margin: 10px 0 4px; background: var(--well); border: 2px solid var(--ink); }
.slider span { position: absolute; inset: 0 50% 0 0; background: var(--amber); box-shadow: inset 0 2px 0 var(--gold); }
.slider i { position: absolute; left: calc(50% - 7px); top: -8px; width: 14px; height: 30px; background: var(--pale); border: 2px solid var(--ink); box-shadow: inset 0 -2px 0 var(--muted); }
/* A feature page's menu over its name (RIDE, THE GAME), as a level's card does in the game. */
.stage-kicker { margin: 0 0 8px; color: var(--b4); }
.inline-code { font: 14px/1.4 ui-monospace, Menlo, monospace; color: var(--pale); background: var(--well); padding: 1px 6px; border: 1px solid var(--ink); overflow-wrap: anywhere; }
.offers { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.offer { display: grid; align-content: start; gap: 8px; height: 100%; padding: 14px 16px 16px; background: var(--well); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); color: var(--light); text-decoration: none; position: relative; }
.offer:hover { background: var(--b1); color: var(--pale); }
.offer:hover::before, .offer:focus-visible::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gold); }
.offer__head { display: flex; align-items: center; gap: 10px; color: var(--pale); }
.offer:hover .offer__head { color: var(--gold); }
.offer__head svg { flex: none; }
.offer__text { font-size: 15px; }
/* --- the home page and the feature pages (option A, 2026-11-16) ---------------------------------------- */

/* The hero: what it is under the slogan, and where it runs under the buttons. */
.hero { grid-template-rows: auto auto auto 1fr auto auto; }
.kicker { margin: calc(6px * var(--s)) 0 0; font-size: 16px; line-height: 24px; color: var(--gold); text-align: center; text-wrap: balance; }
.where { margin: calc(4px * var(--s)) 0 0; font-size: 16px; line-height: 24px; color: var(--pale); text-align: center; text-wrap: balance; }
/* A platform and its dot stay together; on a phone the line breaks between them. */
.where__item { white-space: nowrap; }
.menu.menu--two { grid-template-columns: repeat(2, auto); }
.menu.menu--two .btn, .menu.menu--two .btn.btn--wide { grid-column: auto; width: calc(160px * var(--s)); }
@media (max-width: 759px), (max-height: 599px) { .menu.menu--two { grid-template-columns: 1fr 1fr; } .menu.menu--two .btn, .menu.menu--two .btn.btn--wide { width: auto; } }

/* TODAY: the open events and the newest post, a card each. */
.today-wrap { padding-top: 0; }
.today { display: grid; grid-template-columns: auto repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; align-items: stretch; padding: 12px 16px; background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); }
.today__label { margin: 0; align-self: center; color: var(--pale); padding-right: 4px; }
.today__item { display: grid; align-content: start; gap: 2px; padding: 8px 12px; background: var(--well); border: 2px solid var(--ink); color: var(--light); text-decoration: none; }
.today__item:hover { background: var(--b1); color: var(--pale); }
.today__what { color: var(--gold); }
.today__when { color: var(--muted); font-size: 13px; }
.today__item:hover .today__when { color: var(--light); }
@media (max-width: 799px) { .today { grid-template-columns: minmax(0, 1fr); } }

/* A group's tiles: four, three or two a row, two on a tablet and one on a phone. */
.offers.offers--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.offers.offers--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 999px) { .offers.offers--4, .offers.offers--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .offers.offers--4, .offers.offers--3 { grid-template-columns: minmax(0, 1fr); } }
.offer__head .chip { margin-left: auto; }
/* A small tag after a name (BETA): the chip's own pixel size, a shorter slab. */
.chip--tag { min-height: 0; padding: 0 6px; line-height: 20px; margin-left: 8px; vertical-align: 2px; }
.offer__head .chip--tag { margin-left: auto; }
/* A group's way on, and a pair of the game's pictures. */
.more, .panel .more { margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 699px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.still { margin-top: 16px; }
/* The home page's sections (the restructure of 2026-12-02): a line, then the picture and the tiles; LATEST NEWS beside
   COMMUNITY from 1,024 px. */
.home-sec__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.home-sec__pic .shot { display: block; }
.home-sec__more > .offers { margin-top: 0; }
.home-sec__more > .more:first-child { margin-top: 0; }
.home-pair { display: grid; gap: 28px; }
@media (min-width: 1024px) { .home-pair:not(.home-pair--one) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.news-list, .community-links { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.news-list__item { display: grid; gap: 2px; padding: 10px 12px; background: var(--well); border: 2px solid var(--ink); }
.news-list__meta { margin: 0; color: var(--muted); }
.news-list__title { font-weight: 700; }
.community-link { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; color: var(--pale); text-decoration: none; background: var(--well); border: 2px solid var(--ink); }
.community-link svg { margin-top: 3px; }
.community-link__text { display: grid; }
.community-link__line { font-size: 14px; color: var(--muted); }
.community-link:hover { color: var(--gold); }
.still .shot { display: block; }
/* FREE AND PRO's platforms. */
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chips a.chip { text-decoration: none; }
.chips a.chip:hover { color: var(--gold); }
/* QUESTIONS: <details>, open without JavaScript. */
.faq { display: grid; gap: 8px; margin-top: 12px; }
.faq details { background: var(--well); border: 2px solid var(--ink); padding: 10px 14px; }
.faq summary { cursor: pointer; color: var(--pale); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
/* The game's own arrow, in the pixel font, turned a quarter when the answer is open (no system triangle). */
.faq summary::before { content: ">"; font: 16px/24px var(--pixel); -webkit-font-smoothing: none; color: var(--gold); }
.faq details[open] > summary::before { transform: rotate(90deg); }
.faq summary:hover { color: var(--gold); }
.faq details p { margin: 8px 0 0; color: var(--light); }

/* A feature page (src/views/feature.tsx): its group, its name and status, a picture, then its parts. */
.feature-page .shot { margin-top: 16px; }
.panel .sub { margin: 28px 0 10px; color: var(--gold); }
.feature-page .feature-list + p, .feature-page p + .feature-list { margin-top: 12px; }
/* A part's own picture or table, and the words under it. */
.feature-page .sub + .shot { margin-top: 0; }
.feature-page .shot + p, .feature-page .shot + .feature-list, .feature-page .table-scroll + .feature-list { margin-top: 12px; }
.feature-page p { color: var(--light); }
.feature-page .lede { color: var(--light); }
.part { margin-top: 8px; }
.part + .part { margin-top: 24px; }
.part > h3 { margin: 0 0 8px; }
.feel-row { display: grid; gap: 20px; align-items: start; margin-top: 12px; }
@media (min-width: 900px) { .feel-row { grid-template-columns: minmax(0, 1fr) 340px; } }
.platform-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.platform-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 8px 12px; background: var(--well); border: 2px solid var(--ink); }
.platform-list .chip { justify-self: start; text-decoration: none; }
.platform-list a.chip:hover { color: var(--gold); }
.platform-list + p { margin-top: 12px; }
/* EVEREST's climbs: one table a group, their columns in line. */
@media (min-width: 700px) { .results.climbs-table { table-layout: fixed; } .climbs-table th:first-child { width: 40%; } }
/* A name in the pixel font wraps at its spaces on a phone, so the table fits the screen. */
.results td.way-name { white-space: normal; }
/* THE LAB's tests: how each goes, in sentences that wrap, by the test's name. */
/* THE PAIN CAVE's places (src/views/pain-cave.tsx): a picture each, or its slot (its mark on the night) until the
   game's shot is in; three a row on a laptop, one under another on a phone. */
.places { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .places { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.places figure { margin: 0; }
.feature-page .places .shot { margin-top: 0; display: block; }
.place__slot { display: grid; place-items: center; box-sizing: content-box; aspect-ratio: 16 / 9; background: var(--night); border: 2px solid var(--ink); }
.places figcaption { display: grid; gap: 4px; margin-top: 8px; }
.place__name { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 16px; line-height: 24px; }
.place__about { color: var(--light); font-size: 14px; line-height: 1.45; }
.results.lab-tests td { white-space: normal; line-height: 1.45; padding-top: 7px; padding-bottom: 7px; vertical-align: top; }
.results.lab-tests th[scope="row"] { text-align: left; vertical-align: top; white-space: nowrap; text-transform: none; letter-spacing: 0; font: 600 14px/1.45 var(--sans); color: var(--pale); padding-top: 7px; }
@media (max-width: 599px) { .results.lab-tests th[scope="row"] { white-space: normal; width: 26%; } }
.results td.way-name .who { align-items: flex-start; }
.results td.way-name .flag { margin-top: 6px; flex: none; }
/* /me's FTP TESTS: a test's name, then its place on a line of its own on a phone ("Ramp Test", "on the Summit"),
   beside the place's mark, so the column is no wider than before and the result stays on the screen. */
.results td.lab-name .who { align-items: flex-start; }
.results td.lab-name .who > svg { flex: none; margin-top: 1px; }
@media (max-width: 599px) { .lab-name__place { display: block; color: var(--light); } }
.platform-list p { margin: 0; grid-column: 1 / -1; font-size: 15px; }
.news-post { padding: 14px 16px 16px; background: var(--well); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); }
.news-post + .news-post { margin-top: 12px; }
.news-post__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; }
.news-post__head h3 { margin: 0; color: var(--pale); }
.news-post__when { color: var(--muted); font-size: 13px; }
.news-post p { margin: 8px 0 0; color: var(--light); }
/* CHANGELOG (/changelog): one long timeline in a single column (the owner, 2026-12-04), in both looks. A 4 px line
 * down the left, a gold square on it for each day, and the day's releases after it, each a well with where it went
 * and its notes. The square is 16 px with its border (border-box, as the HD look sizes every box), centred on the
 * line: its centre 2 px into the line, so it starts 34 px left of the date (the line's 4 px and the day's 24 px
 * padding, less 6), and 8 px down to sit on the middle of the date's 32 px line. */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__day { margin: 0; padding: 0 0 24px 24px; border-left: 4px solid var(--line); }
.timeline__day:last-child { padding-bottom: 4px; }
.timeline__date { position: relative; margin: 0 0 12px; }
.timeline__date::before { content: ""; position: absolute; left: -34px; top: 8px; box-sizing: border-box; width: 16px; height: 16px; background: var(--gold); border: 2px solid var(--ink); }
.update__where { margin: 0; color: var(--muted); font-size: 14px; }
.update__notes { margin: 8px 0 0; padding-left: 20px; color: var(--light); max-inline-size: 66ch; }
.update__notes li + li { margin-top: 4px; }


/* Free and Pro. */
.plans { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
@media (min-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--well); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); }
.plan--pro { background: rgba(37, 58, 94, 0.55); border-color: var(--au3); box-shadow: inset 0 2px 0 var(--au4); }
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.plan__big { margin: 4px 0 0; font-size: 32px; line-height: 40px; color: var(--pale); }
.plan__big .muted { font-size: 16px; white-space: nowrap; }
.plan__sub { margin: 0; color: var(--light); }
.plan .feature-list { margin: 6px 0 4px; }
.plan__foot { margin-top: auto; padding-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.plans__note { margin: 12px 0 0; }
.pro-badge { display: inline-block; padding: 2px 8px 4px; font: 16px/20px var(--pixel); -webkit-font-smoothing: none; color: var(--r0); background: var(--gold); border: 2px solid var(--r0); box-shadow: inset 0 -2px 0 var(--amber), 2px 2px 0 var(--ink); }
.pro-badge--big { font-size: 24px; line-height: 32px; padding: 2px 12px 6px; box-shadow: inset 0 -4px 0 var(--amber), 2px 4px 0 var(--ink); }
.btn--primary[disabled], .btn--primary[disabled]:hover, .btn--primary[disabled]:active { background: var(--slate2); border-color: var(--ink); color: var(--light); }

/* --- signed-in pages ---------------------------------------------------------------------------- */

.grid2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid2--wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.grid2--top { align-items: start; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bars { width: 100%; height: auto; }
/* /admin's Go race chart (pixel.ts traceSvg): 120 × 30 game pixels at 2×, flush in its table cell. */
.trace { display: block; }
.list { margin: 0; padding: 0; list-style: none; }
.list a:where(:not(.btn)), .results td a:where(:not(.btn)) { color: var(--pale); text-decoration: none; }
.list a:where(:not(.btn)):hover, .results td a:where(:not(.btn)):hover { color: var(--gold); text-decoration: underline; }
.list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid rgba(60, 94, 139, 0.45); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.rider-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.rider-head h1, .rider-head__name { font-family: var(--sans); font-size: 30px; line-height: 1.15; margin: 0; letter-spacing: 0.01em; color: var(--pale); }
.rider-head h1 b, .rider-head__name b { font-weight: 800; }
.rider-head h1 span, .rider-head__name span { font-weight: 400; }
.rider-head .handle { color: var(--gold); font-weight: 600; }
/* The rider in their kit (src/views/riders.tsx KitRider): front and back, game pixels at 2×. */
.rider-kit { display: inline-flex; gap: 2px; align-items: flex-end; margin: -10px 0 -6px; }
.rider-kit svg { display: block; }
.who .kit-swatch { flex: none; vertical-align: middle; }
/* A rider's bio: their own text, escaped, with its line breaks kept. */
.bio { margin: 16px 0 0 !important; color: var(--light); white-space: pre-line; overflow-wrap: anywhere; }
.panel-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }
.push-end { margin-left: auto; }
/* A private ride, to its owner: the lock line and MAKE PUBLIC AND SHARE. */
.private-ride { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 10px 12px; background: var(--well); border: 2px solid var(--ink); }
.private-ride__line { display: inline-flex; gap: 8px; align-items: center; margin: 0 !important; font: 16px/24px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
/* An invite: the kicker over the league's name, and its rounds. */
.kicker { margin: 0 0 4px; font: 16px/24px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.invite-rounds { margin: 0; }
/* A round: STAGE n and its status over its name, route and dates on phones; one row on wider screens. */
.invite-rounds li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n status" "name name" "route route" "dates dates"; gap: 2px 12px; align-items: center; }
@media (min-width: 640px) {
  .invite-rounds li { grid-template-columns: 6em minmax(0, 1fr) auto auto; grid-template-areas: "n name dates status" "n route dates status"; }
}
.invite-rounds__n { grid-area: n; font: 16px/20px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.invite-rounds__name { grid-area: name; }
.invite-rounds__route { grid-area: route; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); }
.invite-rounds__dates { grid-area: dates; }
.invite-rounds__status { grid-area: status; justify-self: end; }
.privacy-row { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.privacy-row .field { grid-auto-flow: column; align-items: center; gap: 12px; }
.rider-head .meta { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--light); margin-top: 6px; }
.round-strip { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.round { display: grid; gap: 4px; align-content: start; padding: 10px 12px; background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); color: var(--pale); text-decoration: none; }
.round .chip { min-height: 0; padding: 0 4px; line-height: 16px; vertical-align: 0; }
.round:hover { background: var(--b1); color: var(--pale); }
.round[aria-current] { border-color: var(--gold); }
.round__n { font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--gold); -webkit-font-smoothing: none; }
.round small { color: var(--muted); }
.rounds-form { display: grid; gap: 12px; }
.round-row { display: grid; gap: 10px; padding: 14px; background: var(--well); border: 2px solid var(--ink); }
@media (min-width: 900px) { .round-row { grid-template-columns: 34px 2fr 1.3fr 1.3fr 1.4fr auto; align-items: end; } }
.round-row .n { font-family: var(--pixel); font-size: 24px; line-height: 44px; color: var(--gold); -webkit-font-smoothing: none; }
.charts { display: grid; gap: 16px; }
.chart { width: 100%; height: auto; border: 2px solid var(--ink); }
/* Charts and the big profile come in two drawings, so each stays at a whole-number scale. */
.narrow-only { display: none; }
@media (max-width: 699px) { .wide-only { display: none; } .narrow-only { display: block; } }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.legend { font-size: 13px; color: var(--muted); }
/* Support, the terms, the privacy policy and the agents' notes: as wide as every other panel (the owner, 2026-11-10). */
.prose { max-width: none; }
/* A part's heading in the text; the panel's own heading (a .heading) keeps its size and sits at the top. */
.prose h2:not(.heading) { font-family: var(--pixel); font-weight: 400; font-size: 16px; line-height: 24px; color: var(--gold); margin: 28px 0 8px; -webkit-font-smoothing: none; }
.prose > .heading:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--light); }
.prose h3 { font-size: 16px; font-weight: 700; color: var(--pale); margin: 18px 0 4px; }
/* The privacy policy and the terms: a summary in a well, then the list of parts. */
.legal__summary { margin: 16px 0 0; padding: 4px 18px 6px; background: var(--well); border: 2px solid var(--ink); }
.legal__summary h2 { margin-top: 12px; }
.legal__summary ul { padding-left: 1.2em; }
.legal__contents { margin: 20px 0 8px; }
.legal__contents ol { margin: 0; padding-left: 1.6em; columns: 2 18em; column-gap: 32px; }
.legal__contents li { break-inside: avoid; color: var(--muted); font-size: 15px; }
.legal h2[id], .legal h3[id] { scroll-margin-top: calc(var(--nav-space) + 16px); }
.center { text-align: center; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
/* A news post's form: room for the letter and its preview. */
.narrow--news { max-width: 760px; }
.narrow--news > .panel + .panel { margin-top: 20px; }
.news-body { min-height: 280px; }
/* A news post as the game shows it: capitals in the pixel font, on the game's navy, title, FROM · DATE, then paragraphs. */
.news-letter { margin: 12px 0 0; padding: 16px 20px; background: var(--b0); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b2); font-family: var(--pixel); font-size: 16px; line-height: 24px; -webkit-font-smoothing: none; color: var(--pale); overflow-wrap: anywhere; }
.news-letter .news-letter__title { margin: 0 0 4px; font: inherit; color: var(--gold); }
.news-letter .news-letter__meta { margin: 0 0 16px; color: var(--muted); }
.news-letter .news-letter__p { margin: 0 0 16px; }
.news-letter .news-letter__p:last-child { margin-bottom: 0; }
@media (max-width: 559px) { .news-letter { padding: 12px; } }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* The owner's roadside chatter (/admin/chatter): each line a card, its bubbles drawn in game pixels at 2× (bubble.ts)
   on a slate well beside its facts, the checks' and the judge's verdicts and its buttons; on a phone, one above the
   other. The card J and K move to has the gold focus outline. */
.chip--bad { background: var(--r2); color: var(--pale); box-shadow: inset 0 2px 0 var(--r3); }
.chatter-state { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.chatter-state__words { flex: 1 1 320px; min-width: 0; }
.chatter-state__words p:last-child { margin-bottom: 0; }
.chatter-tabs { margin-top: 20px; }
.chatter-bulk { margin: 0 0 16px; }
.chatter-why { flex-basis: 100%; margin: 0; }
.chatter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.chatter-card { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 14px 20px; padding: 14px; background: var(--well); border: 2px solid var(--ink); }
.chatter-card:focus { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
.chatter-card:focus-within:not(:focus) { border-color: var(--line); }
@media (max-width: 719px) { .chatter-card { grid-template-columns: minmax(0, 1fr); padding: 12px; } }
.chatter-card__art { display: grid; gap: 10px; align-content: start; }
.chatter-preview { display: flex; align-items: flex-end; min-height: 76px; padding: 12px; background: var(--slate); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--slate2); overflow-x: auto; }
.bubbles { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; }
.bubble { display: block; flex: none; }
.chatter-turns { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.chatter-turn { display: flex; align-items: flex-end; gap: 8px; }
.chatter-turn--b { flex-direction: row-reverse; }
.chatter-turn--c { padding-left: 24px; }
.chatter-turn__by { flex: none; font: 16px/24px var(--pixel); -webkit-font-smoothing: none; color: var(--muted); }
.chatter-card__h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 14px/1.4 var(--sans); }
.chatter-card__h code { color: var(--light); overflow-wrap: anywhere; }
.chatter-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 2px 16px; margin: 0 0 10px; }
.chatter-facts > div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.chatter-facts > .chatter-facts__wide { grid-column: 1 / -1; }
.chatter-facts dd .chip { margin-left: 4px; vertical-align: 1px; }
.chatter-facts dt { flex: none; font: 16px/24px var(--pixel); -webkit-font-smoothing: none; color: var(--gold); }
.chatter-facts dd { margin: 0; min-width: 0; font-size: 14px; color: var(--light); overflow-wrap: anywhere; }
.chatter-place { display: inline-flex; align-items: center; gap: 6px; }
.chatter-verdicts p { margin: 0 0 6px; font-size: 14px; }
.chatter-checks { margin: 0 0 8px; padding-left: 20px; font-size: 14px; color: var(--down); }
.chatter-reason { color: var(--light); }
.chatter-actions { margin-top: 10px; }
.chatter-do { display: contents; }
.chatter-edit { display: grid; gap: 10px; margin-top: 10px; }
.chatter-edit .errors { margin: 0; }
.chatter-input { text-transform: uppercase; }
.pick { display: inline-flex; align-items: center; gap: 8px; justify-self: start; cursor: pointer; font: 16px/24px var(--pixel); -webkit-font-smoothing: none; color: var(--light); }
.pick input { appearance: none; flex: none; width: 20px; height: 20px; margin: 0; background: var(--night); border: 2px solid var(--edge); cursor: pointer; }
.pick input:checked { background: var(--gold); box-shadow: inset 0 0 0 3px var(--night); }
.pick input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chatter-quiet-add { margin-top: 20px; gap: 12px; }
.chatter-quiet-add .heading { margin: 0; }
.chatter-quiet-add__row { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.chatter-quiet-add__row .field { flex: 1 1 220px; }
.chatter-share__in { display: inline-flex; align-items: center; gap: 8px; font: 16px/24px var(--pixel); -webkit-font-smoothing: none; }
.chatter-share .input { width: 96px; }
.chatter-themes summary { cursor: pointer; font: 16px/24px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.chatter-themes ul { margin: 4px 0 0; padding-left: 18px; min-width: 260px; white-space: normal; font-size: 13px; }
.chatter-runs td { vertical-align: top; }
.results .chatter-runs__state { min-width: 150px; white-space: normal; }
.big-404 { font-size: calc(64px * var(--s)); line-height: 1; }

/* --- clubs -------------------------------------------------------------------------------------- */

/* Roles as the game's club screen shows them: the owner in gold, an admin in green, both in dark ink. */
.chip--owner { background: var(--gold); color: var(--r0); box-shadow: inset 0 -2px 0 var(--amber); }
.chip--admin { background: var(--g3); color: var(--g0); box-shadow: inset 0 -2px 0 var(--g2); }
.chip--open { background: var(--b2); box-shadow: inset 0 2px 0 var(--b3); }
.chip--invite { background: var(--well); color: var(--light); }
/* A club with no country: the globe in a flag's frame. */
.club-flag--world { display: inline-grid; place-items: center; background: var(--b1); }
.page-head--club { align-items: center; }
.page-head--club .heading { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
/* On phones the name stays beside its flag, at 24 px, and the chips go under it. */
@media (max-width: 559px) { .page-head--club .heading { flex: 1 1 calc(100% - 80px); font-size: 24px; line-height: 32px; } }
.club-card__members { display: inline-flex; gap: 6px; align-items: center; }
.club-filters { margin: 8px 0 12px; padding: 12px 16px 14px; }
.club-filters .field { flex: 0 1 260px; }
.club-filters .club-filters__name { flex: 1 1 220px; }
.club-filters .input { min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.panel .club-about { margin: 0 0 12px !important; font-size: 17px; }
.panel .club-facts { margin: 0; }
.notice--removed { background: rgba(117, 36, 56, 0.45); border-color: var(--r3); }
.panel--danger { border-color: var(--r2); }
/* THIS WEEK: four tiles in a row on wide screens, two by two on phones. */
.club-week { margin-top: 20px; }
.club-week__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 10px; }
@media (min-width: 760px) { .stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.members-only { display: flex; align-items: center; gap: 12px; }
.members-only .px { color: var(--light); }
/* INVITE: the code in big key caps beside its link, SHARE INVITE and NEW CODE. */
.invite { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .invite { grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: start; } }
.invite__code .code-caps { justify-content: flex-start; }
.invite__tools { display: grid; gap: 10px; align-content: start; justify-items: start; }
.invite__link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 !important; max-width: 100%; }
.invite__link code { min-width: 0; padding: 6px 8px; font-size: 14px; color: var(--light); background: var(--well); border: 2px solid var(--ink); overflow-wrap: anywhere; }
.invite__renew { justify-self: stretch; margin-top: 4px; padding-top: 12px; border-top: 1px solid rgba(60, 94, 139, 0.45); }
@media (max-width: 559px) {
  .invite__code .code-caps .key { min-width: 0; font-size: 24px; line-height: 32px; padding: 2px 5px 6px; }
  .invite__code .code-caps .dash { font-size: 24px; line-height: 40px; }
  .invite__code .code-caps { gap: 3px; }
}
/* The club board: the column it's ranked by in bold, its header in gold. */
.results th.is-by { color: var(--gold); }
.results td.is-by { font-weight: 700; color: var(--pale); }
/* Recent rides: the rider and the time, then the route, its length and the day under the name. */
.list.club-rides li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who time" "route route"; gap: 0 10px; align-items: baseline; }
.club-rides__who { grid-area: who; min-width: 0; }
.club-rides__who a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .club-rides__time { grid-area: time; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pale); }
.club-rides__route { grid-area: route; padding-left: 28px; color: var(--light); }
/* A group ride's chip, under its time on the right. */
.list.club-rides li:has(.club-rides__group) { grid-template-areas: "who time" "route group"; }
.club-rides__group { grid-area: group; justify-self: end; }
.list .club-rides__route a { color: var(--b4); }
/* Members: the name and role, then the date they joined and, for an admin, the buttons on the right. */
.list.members li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who who" "since actions"; gap: 4px 12px; align-items: center; }
.members__who { grid-area: who; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.members__since { grid-area: since; }
.members__actions { grid-area: actions; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 559px) { .list.members li { grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "since" "actions"; } .members__actions { justify-content: flex-start; margin-top: 6px; } }
.list.admins li { gap: 10px; }
/* REMOVE asks again: a small menu under the button with the consequence, I'm sure, and the real button. */
.ask { position: relative; display: inline-block; }
.ask > summary { list-style: none; cursor: pointer; user-select: none; }
.ask > summary::-webkit-details-marker { display: none; }
.ask[open] > summary { border-color: var(--down); color: var(--down); }
.ask__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #172038;
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--r3), 4px 4px 0 rgba(9, 10, 20, 0.6);
}
.ask__text { margin: 0 !important; font-size: 14px; line-height: 1.4; color: var(--light); white-space: normal; }
@media (max-width: 559px) {
  .ask__menu { position: fixed; top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; z-index: 60; }
  .ask[open]::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(9, 10, 20, 0.55); pointer-events: none; }
}
.club-edit { max-width: 720px; }

/* --- group rides (doc 15) ---------------------------------------------------------------------- */

/* The game's GROUP RIDES list: LOBBY in blue, STARTING in amber, RIDING in green. */
.chip--lobby { background: var(--b2); box-shadow: inset 0 2px 0 var(--b3); }
.chip--countdown { background: var(--amber); color: var(--r0); box-shadow: inset 0 2px 0 var(--gold); }
.chip--riding { background: var(--g1); color: var(--pale); box-shadow: inset 0 2px 0 var(--g2); }
.chip--quiet { background: var(--well); color: var(--light); }
.chip--sim { color: var(--gold); }
/* GROUP RIDE · 2ND OF 7: a chip that links the room's result. */
.chip--group { background: var(--b1); color: var(--gold); text-decoration: none; box-shadow: inset 0 2px 0 var(--b2); }
a.chip--group:hover { background: var(--b2); color: var(--gold); }
/* The seat meter: a pip a seat, lit green for each rider, all amber when full. */
.seats { display: inline-flex; align-items: center; gap: 8px; font: 16px/20px var(--pixel); color: var(--light); -webkit-font-smoothing: none; white-space: nowrap; }
.seats__pips { display: inline-flex; gap: 2px; }
.seats__pips i { display: block; width: 10px; height: 16px; background: var(--night); border: 2px solid var(--ink); }
.seats__pips i.is-on { background: var(--g3); box-shadow: inset 0 2px 0 var(--g4); }
.seats.is-full .seats__pips i { background: var(--amber); box-shadow: inset 0 2px 0 var(--gold); }
.seats.is-full .seats__n { color: var(--gold); }
/* A live square that blinks in two steps, as the game's minimap marks you (still with reduced motion). */
.live-dot { display: inline-block; flex: none; width: 12px; height: 12px; background: var(--g3); border: 2px solid var(--ink); animation: live-blink 1.2s steps(1) infinite; }
@keyframes live-blink { 50% { background: var(--g1); } }
.live-intro .lede { margin: 0 0 4px; max-width: none; }
.refresh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 0 !important; color: var(--muted); }
.refresh a:where(:not(.btn)) { color: var(--light); }
/* A room's card: its status and name, the route, the host, then the seats and its chips along the bottom. */
.card.room-card { display: flex; flex-direction: column; }
.room-card .card__head { align-items: flex-start; }
.room-card .card__name { white-space: normal; overflow-wrap: anywhere; }
.room-card__foot { margin-top: auto; }
.room-card__route { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--pale); }
.room-card__route-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-card__host { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--light); }
.room-card__host > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-card__label { flex: none; width: 44px; font: 16px/20px var(--pixel); color: var(--muted); -webkit-font-smoothing: none; }
.room-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px; }
.room-card__note { color: var(--muted); line-height: 1.4; }
.room-empty { margin: 0 !important; padding: 16px 20px; }
/* The route on an invite and a room's page, and the facts under it. */
.room-route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 12px !important; font-size: 17px; }
.room-route a { color: var(--pale); font-weight: 600; }
.room-facts { display: grid; gap: 10px; margin: 16px 0 0; }
.room-facts > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.room-facts dt { font: 16px/24px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.room-facts dd { margin: 0; color: var(--light); }
.room-facts__seats { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.room-join .code-caps { justify-content: flex-start; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--light); }
.room-join__account { display: grid; gap: 10px; justify-items: start; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(60, 94, 139, 0.45); }
.room-join__account p { margin: 0 !important; }
@media (max-width: 559px) {
  .room-join .code-caps .key { min-width: 0; font-size: 24px; line-height: 32px; padding: 2px 5px 6px; }
  .room-join .code-caps .dash { font-size: 24px; line-height: 40px; }
  .room-join .code-caps { gap: 3px; }
}
/* Who's in a room: the rider and the host's chip, then under the name, the trainer and READY. */
.list.seat-list li { display: grid; gap: 6px; }
.seat__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.seat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 28px; }
.list.seat-list li.is-me { box-shadow: inset 4px 0 0 var(--gold); padding-left: 10px; }
.list.seat-list li.is-away .who { opacity: 0.8; }
/* The ping: one to three bars rising left to right, lit green. */
.ping { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.ping i { display: block; width: 4px; background: var(--slate2); }
.ping i:nth-child(1) { height: 6px; }
.ping i:nth-child(2) { height: 10px; }
.ping i:nth-child(3) { height: 14px; }
.ping i.is-on { background: var(--g3); }
.chip--closed { background: var(--slate2); color: var(--light); }
/* The result: the podium's ranks in gold, silver and bronze. */
.room-result .podium--1 .rank, .race-result .podium--1 .rank { color: var(--gold); }
.room-result .podium--2 .rank, .race-result .podium--2 .rank { color: var(--light); }
.room-result .podium--3 .rank, .race-result .podium--3 .rank { color: var(--br3); }

/* --- races in rooms (docs/16 "Phase 2: races in group rides") ------------------------------------ */

.race-art { display: flex; justify-content: center; }
.race-art svg { max-width: 100%; height: auto; border: 2px solid var(--ink); }
.race-art-panel { display: flex; align-items: center; justify-content: center; padding: 12px; }
.race-result .status { width: 1%; }
.race-result tr.is-bot td { color: var(--light); }
.results tr td.up { color: var(--up); font-weight: 700; }
.results tr td.down { color: var(--down); font-weight: 700; }
.primes { display: inline-block; min-width: 20px; padding: 0 4px; text-align: center; font-weight: 700; color: var(--r0); background: var(--amber); border: 1px solid var(--ink); }
.chip--status { background: var(--slate2); color: var(--light); }
.chip--out { background: var(--r1); color: var(--r5); box-shadow: inset 0 2px 0 var(--r2); }
.chip--pulled { background: var(--slate); color: var(--b5); box-shadow: inset 0 2px 0 var(--slate2); }
.chip--relegated { background: var(--au1); color: var(--au5); box-shadow: inset 0 2px 0 var(--au2); }
.chip--caught { background: var(--p1); color: var(--p5); box-shadow: inset 0 2px 0 var(--p2); }
.chip--prime { background: var(--amber); color: var(--r0); }
.results .chip--status, .race-story .chip { font-size: 16px; }
.race-part { margin-top: 24px; }
.race-part > .heading { margin: 0 0 10px; }
.sprint-grid { min-width: 0; }
.sprint-grid th.num { line-height: 1.1; }
.sprint-grid__n, .sprint-grid__lap { display: block; }
.sprint-grid__lap { font-weight: 400; color: var(--muted); letter-spacing: 0.02em; }
.sprint-grid td.num { width: 52px; }
.sprint-grid td.sprint-grid__top { color: var(--gold); font-weight: 700; }
.list.race-story li { display: grid; grid-template-columns: 76px auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.race-story__when { font: 16px/24px var(--pixel); color: var(--muted); -webkit-font-smoothing: none; }
.race-story__duel { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.list.race-story .who a { color: var(--pale); }
@media (max-width: 559px) { .list.race-story li { grid-template-columns: 64px minmax(0, 1fr); } .list.race-story li > :nth-child(3) { grid-column: 1 / -1; } }
/* A club's CLUB RIDES. */
.club-rooms { margin-top: 28px; }
.club-rooms__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }

/* --- the SHARE menu ----------------------------------------------------------------------------- */

.share { position: relative; display: inline-block; }
.share > summary { list-style: none; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; user-select: none; }
.share > summary::-webkit-details-marker { display: none; }
.share[open] > summary { border-color: var(--gold); color: var(--gold); }
.share__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  display: grid;
  gap: 12px;
  padding: 14px;
  text-align: left;
  background: #172038;
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--line), 4px 4px 0 rgba(9, 10, 20, 0.6);
}
.share--end .share__menu, .share--start.share--flip .share__menu { left: auto; right: 0; }
.share--end.share--flip .share__menu { left: 0; right: auto; }
.share__text { margin: 0 !important; font-size: 14px; line-height: 1.4; color: var(--light); }
.share__field { display: grid; gap: 4px; }
.share__label { font: 16px/20px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.share__url { min-height: 40px; padding: 6px 8px; font-size: 14px; }
.share__js { display: flex; gap: 6px; }
.share__js .btn { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.share__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 8px;
  font: 16px/20px var(--pixel);
  -webkit-font-smoothing: none;
  color: var(--btn-text);
  background: var(--btn);
  border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 var(--slate2);
  text-decoration: none;
}
.share__link:hover { background: var(--btn-hover); color: #fff; }
.share__link:focus-visible { outline: none; border-color: var(--focus); color: var(--focus); box-shadow: 0 0 0 2px var(--focus), 0 0 0 4px var(--ink); }
.share__link:active { background: var(--btn-edge); border-color: var(--focus); color: var(--focus); box-shadow: inset 0 2px 0 var(--ink); }
.share__close { justify-self: end; }
/* On phones the menu is a sheet along the bottom of the screen. */
@media (max-width: 559px) {
  .share__menu, .share--end .share__menu, .share--flip .share__menu { position: fixed; top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; z-index: 60; }
  /* The page dims behind the sheet; taps go through, so SHARE still closes it without JavaScript. */
  .share[open]::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(9, 10, 20, 0.55); pointer-events: none; }
}

/* --- motion ------------------------------------------------------------------------------------- */

@view-transition { navigation: auto; }
::view-transition-group(tabbar) { animation-duration: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* --- the TRACK CUP (docs/16 Phase 3) ---------------------------------------------------------------- */

.medal { display: inline-block; vertical-align: middle; }
.cup-mark { display: inline-flex; align-self: center; flex: none; }
.page-head__title { display: flex; align-items: center; gap: 14px; min-width: 0; }
@media (max-width: 559px) { .cup-mark svg { width: 21px; height: auto; } .page-head__title { gap: 10px; } }
.page-head--cup { align-items: center; }
.page-head--cup .heading { min-width: 0; overflow-wrap: anywhere; }
.cup-card .card__meta { justify-content: space-between; }
.cup-card .card__name { white-space: normal; }
/* An event's chips on its route's card (/events): the series in its colour, then when, green while it's open. */
.chip--series.chip--daily { color: var(--b4); }
.chip--series.chip--classic { color: var(--gold); }
.chip--event-open { color: var(--g4); }
.programme__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin: -4px 0 12px; }
.programme__head .refresh { margin: 0; }
.cup-card__seats { display: inline-flex; align-items: center; gap: 6px; }
.cup-facts > div { grid-template-columns: 76px minmax(0, 1fr); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 28px 0 12px; }
.tz-note { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.panel .tz-note { margin-top: 12px; }
/* The programme, day by day. */
.programme__day + .programme__day { margin-top: 18px; }
.programme__date { margin: 0 0 4px; font: 16px/24px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.list.sessions > li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; grid-template-areas: "time what status" "time more more"; gap: 4px 14px; align-items: start; }
.session__time { grid-area: time; display: grid; font: 16px/24px var(--pixel); color: var(--pale); -webkit-font-smoothing: none; }
.session__until { font: 12px/1.3 var(--sans); color: var(--muted); }
.session__what { grid-area: what; display: grid; min-width: 0; }
.session__name { font: 16px/24px var(--pixel); -webkit-font-smoothing: none; }
.list a.session__name { color: var(--pale); }
.session__kind { color: var(--muted); }
.session__status { grid-area: status; }
.session__more { grid-area: more; min-width: 0; }
.session__more:empty { display: none; }
.session--lobby { box-shadow: inset 4px 0 0 var(--amber); padding-left: 10px !important; }
.session--live { box-shadow: inset 4px 0 0 var(--g3); padding-left: 10px !important; }
@media (max-width: 559px) {
  .list.sessions > li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time status" "what what" "more more"; }
  .session__time { grid-auto-flow: column; justify-content: start; gap: 8px; align-items: baseline; }
}
.podium-line { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.list .podium-line > li { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; }
.podium-line__who { display: inline-flex; align-items: center; gap: 6px; }
/* The next session: the way in from the game. */
.next-session__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 6px !important; font: 24px/32px var(--pixel); -webkit-font-smoothing: none; }
.next-session__line a { color: var(--pale); text-decoration: none; }
.next-session__when { margin: 0 0 10px !important; color: var(--gold); }
.next-session--lobby { box-shadow: inset 0 2px 0 var(--line), inset 4px 0 0 var(--amber); }
.next-session .steps { margin: 8px 0 0; }
/* The medal table. */
.medal-table { min-width: 0; }
.medal-table th.medal-table__m { text-align: center; width: 52px; }
.medal-table th.medal-table__m .medal { margin: 0 auto; }
.medal-table td.medal-table__n { text-align: center; color: var(--muted); }
.medal-table td.is-gold { color: var(--gold); font-weight: 700; }
.medal-table td.is-silver { color: var(--light); font-weight: 700; }
.medal-table td.is-bronze { color: var(--br3); font-weight: 700; }
/* The podium as steps: second, first, third. */
.podium-panel { display: grid; align-content: center; }
.podium-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin: 0; padding: 0; list-style: none; }
.podium-steps__step { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.podium-steps__who { display: grid; justify-items: center; gap: 4px; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.podium-steps__time { font: 16px/20px var(--pixel); color: var(--light); -webkit-font-smoothing: none; }
.podium-steps__block { display: grid; place-items: center; width: 100%; margin-top: 6px; font: 24px/32px var(--pixel); color: var(--r0); -webkit-font-smoothing: none; border: 2px solid var(--ink); }
.podium-steps__step--1 .podium-steps__block { height: 72px; background: var(--au5); box-shadow: inset 0 3px 0 #f3d892; }
.podium-steps__step--2 .podium-steps__block { height: 52px; background: var(--light); box-shadow: inset 0 3px 0 var(--pale); }
.podium-steps__step--3 .podium-steps__block { height: 36px; background: var(--br3); box-shadow: inset 0 3px 0 var(--br4); }
/* The sprint's bracket: a column a round, each match joined to the next by an ink line. */
.bracket-scroll { overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.bracket { --gap: 28px; display: grid; grid-template-columns: repeat(var(--rounds), minmax(212px, 1fr)); column-gap: var(--gap); min-width: calc(var(--rounds) * 212px + (var(--rounds) - 1) * 28px); }
.bracket__round { display: grid; grid-template-rows: auto 1fr; }
.bracket__name { margin: 0 0 10px; font: 16px/24px var(--pixel); color: var(--gold); -webkit-font-smoothing: none; }
.bracket__matches { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.bracket__pair { position: relative; display: flex; flex-direction: column; justify-content: space-around; gap: 14px; flex: 1; }
.bracket__pair.is-pair::after { content: ""; position: absolute; right: calc(var(--gap) / -2); top: 25%; bottom: 25%; width: calc(var(--gap) / 2); border: 2px solid var(--ink); border-left: 0; }
.bracket__round:not(.is-last) .match::after { content: ""; position: absolute; right: calc(var(--gap) / -2 - 2px); top: 50%; width: calc(var(--gap) / 2); border-top: 2px solid var(--ink); }
.bracket__round.is-fed .bracket__pair:not(.bracket__bronze) .match::before { content: ""; position: absolute; left: calc(var(--gap) / -2 - 2px); top: 50%; width: calc(var(--gap) / 2); border-top: 2px solid var(--ink); }
.bracket__round:not(.is-last) .bracket__pair.is-pair .match::after { width: calc(var(--gap) / 2); }
.bracket__bronze { margin-top: 10px; }
.match { position: relative; display: grid; background: var(--b0); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); }
.match__label { padding: 2px 8px; font: 16px/20px var(--pixel); color: var(--br3); -webkit-font-smoothing: none; border-bottom: 1px solid rgba(9, 10, 20, 0.6); }
.match__side { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 5px 8px; font-size: 14px; min-height: 32px; }
.match__side + .match__side { border-top: 1px solid rgba(60, 94, 139, 0.45); }
.match__side.is-winner { background: var(--zebra); }
.match__side.is-winner .match__name a { color: var(--gold); }
.match__side:not(.is-winner) .match__name a { color: var(--light); }
.match__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match__name a { text-decoration: none; }
.match__seed { font: 16px/20px var(--pixel); color: var(--grey2); -webkit-font-smoothing: none; text-align: right; }
.match__heats { display: inline-flex; gap: 3px; }
.match__heats i { width: 8px; height: 8px; border: 2px solid var(--ink); background: var(--slate); }
.match__heats i.is-on { background: var(--gold); }
.match__side.is-empty { grid-template-columns: 1fr; color: var(--muted); font-size: 13px; }
.match__bye { font: 16px/20px var(--pixel); color: var(--grey2); -webkit-font-smoothing: none; }
.match__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px; border-top: 1px solid rgba(9, 10, 20, 0.6); background: var(--shade); }
.match__room { margin-left: auto; }
/* A walkover's loser, dimmed in its words rather than see-through, so they still read. */
.match--walkover .match__side:not(.is-winner) .match__name a { color: var(--muted); }
.match--lobby { border-color: var(--amber); }
.match--live { border-color: var(--g3); }
@media (max-width: 599px) {
  /* On a phone the rounds stack, each under its name; the lines go. */
  .bracket { display: block; min-width: 0; }
  .bracket__round + .bracket__round { margin-top: 20px; }
  .bracket__pair.is-pair::after, .bracket .match::after, .bracket .match::before { display: none; }
  .bracket__matches, .bracket__pair { gap: 8px; }
}
/* The keirin's heats, a race's round, the omnium's races. */
.heats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.heats .panel + .panel { margin-top: 0; }
.heat__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.chip--cup { background: var(--au1); color: var(--au5); text-decoration: none; box-shadow: inset 0 2px 0 var(--au2); }
a.chip--cup:hover { background: var(--au2); color: var(--au5); }
.chip--qualified { background: var(--g1); color: var(--g5); box-shadow: inset 0 2px 0 var(--g2); }
.list.places li { gap: 12px; padding: 8px 0; flex-wrap: nowrap; }
.list.places li > .who { flex: 1; min-width: 0; }
.list.places li > .who > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.places__n { min-width: 40px; font: 16px/24px var(--pixel); color: var(--muted); -webkit-font-smoothing: none; }
.places__pts { margin-left: auto; font-weight: 700; color: var(--gold); }
.list.places li.is-me { box-shadow: inset 4px 0 0 var(--gold); padding-left: 10px; }
.results.omnium { min-width: 0; }
.list.cup-riders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); column-gap: 24px; }
.list.cup-riders li { border-top: 1px solid rgba(60, 94, 139, 0.45); }
.list.cup-riders li.is-me { box-shadow: inset 4px 0 0 var(--gold); padding-left: 10px; }
/* Making a cup: the programmes as cards to pick, the live times, the preview. */
.template-picks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.template-pick { position: relative; display: block; cursor: pointer; }
.template-pick input { position: absolute; opacity: 0; inset: 0; }
.template-pick__card { display: grid; align-content: start; gap: 6px; height: 100%; padding: 12px; background: var(--well); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--b1); }
.template-pick input:checked + .template-pick__card { background: var(--b1); border-color: var(--gold); box-shadow: inset 0 4px 0 var(--gold); }
.template-pick input:focus-visible + .template-pick__card { outline: 2px solid var(--focus); outline-offset: 2px; }
.template-pick__name { font: 16px/24px var(--pixel); color: var(--pale); -webkit-font-smoothing: none; }
.template-pick input:checked + .template-pick__card .template-pick__name { color: var(--gold); }
.template-pick__days { font: 16px/20px var(--pixel); color: var(--muted); -webkit-font-smoothing: none; }
.template-pick__blurb { font-size: 13px; color: var(--light); }
.template-preview { display: grid; gap: 2px; margin: 4px 0 0; padding: 6px 0 0; list-style: none; border-top: 1px dashed var(--grey); }
.template-preview li { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.template-preview__when { font-variant-numeric: tabular-nums; }
.template-preview__name { color: var(--light); }
.live-times { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.live-times + .live-times { margin-top: 10px; }
.js .live-times[hidden] { display: none; }
.live-times__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.input--time { width: auto; min-width: 120px; }
.cup-preview { margin-top: 20px; }
.row2--top { align-items: start; }
.list.sessions--wide > li { grid-template-columns: 196px minmax(0, 1fr) auto; }
@media (max-width: 559px) { .list.sessions--wide > li { grid-template-columns: minmax(0, 1fr) auto; } }

/* --- Free and Pro: the till, the allowance, codes ------------------------------------------------- */

.plan__foot--buy { flex-direction: column; align-items: stretch; gap: 10px; }
/* The year above the month, each the card's width. */
.buy { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.buy form, .buy .btn { width: 100%; }
/* The month's allowance, as the game's meter: used in gold over the well. */
.meter { height: 16px; background: var(--well); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--night); }
.meter > span { display: block; height: 100%; min-width: 2px; background: var(--amber); box-shadow: inset 0 2px 0 var(--gold); }
.allowance { max-width: 32em; }
.input--redeem { font-size: 24px; line-height: 32px; letter-spacing: 2px; text-transform: uppercase; max-width: 420px; }

/* --- /download ----------------------------------------------------------------------------------- */

.dl-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin: 20px 0; }
@media (min-width: 900px) { .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dl-grid > .panel + .panel { margin-top: 0; }
.dl { display: flex; flex-direction: column; }
.dl__files { display: grid; gap: 12px; }
.dl__file .btn, .dl__files > .btn { width: 100%; white-space: normal; text-align: center; }
.dl__sum { margin-top: 6px; }
.dl__sum summary { cursor: pointer; color: var(--b4); }
.dl__sum code { display: block; margin-top: 6px; padding: 6px 8px; font-size: 12px; color: var(--light); background: var(--well); border: 2px solid var(--ink); overflow-wrap: anywhere; }
.dl code, .steps code { font-size: 13px; overflow-wrap: anywhere; }
.dl__soon { display: grid; gap: 8px; justify-items: start; }
.dl .dl__how { margin: 18px 0 6px; }
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; color: var(--light); font-size: 15px; }
.steps + .steps { margin-top: 10px; }

/* Safety (docs/13 "Safety, as built"): the quiet report link, the report's reasons, the rules box. */
.report-link { margin: 24px 0 0; text-align: right; }
.report-link a:where(:not(.btn)) { color: var(--muted); }
.reasons { display: grid; gap: 10px; }
/* The rules to agree to sit under a form, on the sky: on a panel of their own, so their words and switch read. */
.rules-box { margin: 4px 0 0; padding: 10px 12px; background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--line); }
label.rules-box { display: flex; }

/* --- agents (/agents) ---------------------------------------------------------------------------- */

/* The MCP server's address, with COPY beside it; a config snippet in a well. */
.agents-url { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 12px; background: var(--well); border: 2px solid var(--ink); }
.agents-url code { font-size: 15px; color: var(--pale); overflow-wrap: anywhere; }
.snippet { margin: 0 0 12px; padding: 10px 12px; background: var(--well); border: 2px solid var(--ink); overflow-x: auto; }
.snippet code { font-size: 14px; color: var(--pale); white-space: pre; }

/* --- workouts (docs/30) ------------------------------------------------------------------------- */
.zone-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; padding: 0 4px; font-family: var(--pixel); font-size: 16px; line-height: 20px; -webkit-font-smoothing: none; color: var(--ink); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--lit, transparent), inset -2px 0 0 var(--shade, transparent); }
.zone-tag--z1 { background: var(--z1); --lit: var(--z1-lit); --shade: var(--z1-shade); }
.zone-tag--z2 { background: var(--z2); --lit: var(--z2-lit); --shade: var(--z2-shade); }
.zone-tag--z3 { background: var(--z3); --lit: var(--z3-lit); --shade: var(--z3-shade); }
.zone-tag--z4 { background: var(--z4); --lit: var(--z4-lit); --shade: var(--z4-shade); }
.zone-tag--z5 { background: var(--z5); --lit: var(--z5-lit); --shade: var(--z5-shade); }
.zone-tag--z6 { background: var(--z6); --lit: var(--z6-lit); --shade: var(--z6-shade); }
.zone-tag--free { background: repeating-conic-gradient(var(--free) 0 25%, var(--free-2) 0 50%) 0 0 / 4px 4px; }
.workout-card { gap: 8px; align-content: start; }
.workout-card .chart { border-width: 2px; }
.workout-card__meta { gap: 6px 12px; }
.workout-card__actions { margin-top: 2px; }
.zone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zone-list li { display: grid; grid-template-columns: auto minmax(0, 9em) 1fr auto; align-items: center; gap: 10px; font-family: var(--pixel); font-size: 16px; line-height: 20px; -webkit-font-smoothing: none; }
.zone-list__name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-list__bar { height: 10px; border: 2px solid var(--ink); background: var(--well); position: relative; }
.zone-list__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); }
.step-words { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.step-words__label { display: block; font-family: var(--pixel); font-size: 16px; line-height: 20px; color: var(--gold); -webkit-font-smoothing: none; }
.cue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cue-list .num { display: inline-block; min-width: 4.5em; color: var(--muted); font-family: var(--pixel); -webkit-font-smoothing: none; }
.mark-counts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--pixel); font-size: 16px; line-height: 20px; -webkit-font-smoothing: none; }
.mark-counts li, .mark { display: inline-flex; align-items: center; gap: 6px; }
.step-marks { margin-top: 12px; }
.step-marks summary { cursor: pointer; font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--gold); -webkit-font-smoothing: none; }
.add-workout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.add-workout__in { display: grid; gap: 14px; }
.add-workout__text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; min-height: 220px; }
.code { margin: 0; padding: 10px 12px; background: var(--well); border: 2px solid var(--ink); color: var(--pale); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; white-space: pre; overflow-x: auto; }
@media (max-width: 699px) { .add-workout { grid-template-columns: minmax(0, 1fr); } }

/* --- focus ------------------------------------------------------------------------------------------ */

/* The gold focus outline has an ink ring inside it, so it shows on the sky's light bands as well as on a panel.
   Last in the sheet, so while focused it takes the place of a resting box-shadow (a card's lit line); a
   control's own focus rule (.btn, .input, .navlink …) is more specific and keeps its own. */
:focus-visible { box-shadow: 0 0 0 2px var(--ink); }

/* /controls (controls.tsx): key caps in the KEY column, where an action works under its name, and the device table's
   first column, held while the rest scroll on a phone. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.controls td, .controls th { vertical-align: top; }
.results.controls td { white-space: normal; padding-top: 7px; padding-bottom: 7px; line-height: 1.45; }
.results.controls td .key--inline { margin-bottom: 2px; }
.results.controls td.controls__keys { white-space: nowrap; }
.controls__where { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.controls__where--narrow { display: none; }
@media (max-width: 599px) { .controls__where--narrow { display: block; } .results.controls td.controls__keys { white-space: normal; width: 36%; } }
.controls--devices { min-width: 860px; }
.results.controls--devices th[scope="row"] { text-align: left; min-width: 150px; max-width: 190px; white-space: normal; text-transform: none; letter-spacing: 0; font: 600 14px/1.35 var(--sans); color: var(--pale); position: sticky; left: 0; background: var(--b0); z-index: 1; }
.results.controls--devices th[scope="row"] .controls__where { font-weight: 400; }
.controls-page h3 { margin: 18px 0 8px; }

/* Club marks (the game's docs/48 "Wave 2: clubs"): the emblem drawn from the game's masks, the short name's chip. */
.emblem, .club-chip { flex: none; vertical-align: middle; }
.home-club { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.home-club .label { font-family: var(--pixel); color: var(--muted); font-size: 16px; line-height: 16px; }
.who .club-chip { margin-left: 6px; }

/* The season (the game repo's docs/51 "Festive online"): the home page's banner under its snow edge (pixel.ts
   SNOW_EDGE at 2x), and BETWEEN THE YEARS' total and stamps (the game's HD stamps at 2x). */
.season-sec { padding: 24px 0 4px; }
.season { position: relative; display: grid; grid-template-columns: 76px 1fr auto; gap: 8px 18px; align-items: center; padding: 26px 20px 18px; background: var(--panel); border: 2px solid var(--ink); }
.season .snow-edge { position: absolute; left: 0; top: -6px; display: block; pointer-events: none; }
.season__words { min-width: 0; }
.season__kicker { margin: 0; color: var(--b4); }
.season__line { margin: 6px 0 0; color: var(--light); }
.season__go { justify-self: end; }
@media (max-width: 699px) {
  .season { grid-template-columns: 76px 1fr; }
  .season__go { grid-column: 1 / -1; justify-self: start; }
}
.stamp-art { display: block; flex: none; width: 76px; height: 76px; }
.everyone { display: grid; justify-items: center; gap: 6px; margin: 0 0 8px; padding: 20px 16px; text-align: center; border: 2px solid var(--ink); }
.everyone__kicker { margin: 0; color: var(--b4); }
.everyone__line { margin: 0; color: var(--light); }
.stamp-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 10px 0 0; padding: 0; list-style: none; }
.stamp-row li { display: grid; justify-items: center; gap: 6px; color: var(--light); }
.stamp-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.stamp-list li { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.stamp-list h3 { margin: 0; color: var(--gold); }
.stamp-list p { margin: 2px 0 0; color: var(--light); }
/* YOUR 2026 on /me (docs/51 "Festive online"): the year's badges and facts beside its card, the card under them on a phone. */
.your-year .heading { margin-bottom: 4px; }
.your-year__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.your-year__facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 16px 0 0; }
.your-year__facts dt { margin: 0; color: var(--gold); }
.your-year__facts dd { margin: 0; color: var(--light); }
.your-year__flags { display: flex; flex-wrap: wrap; gap: 6px; }
/* The card one of its pixels to a CSS pixel (400 x 210, the HD look's 600 x 315 in hd.css), with its 2 px border. */
.your-year__card { margin: 0; width: 404px; max-width: 100%; }
.your-year__card img { display: block; }
.your-year__card figcaption { margin-top: 6px; }
@media (min-width: 1180px) {
  .your-year__grid { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 559px) {
  .your-year__facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .your-year__facts dd { margin-bottom: 8px; }
}

/* pedalmania.cc in the game's HD look (the game repo's docs/50 D11, D14, D16): direction A, fine pixel, with C's cream
   paper for cards and banners. Served only by the HD entries (src/hd/serve.ts) with the HD switch on, after
   public/css/site.css, which it restyles: production never has it.

   - Words in Pedal Jersey at its own sizes: the classic site's 16 px pixel words are Jersey 15 at its 27 px (cap 15),
     24 px ones Jersey 20 at 34, 32 px ones Jersey 25 at 41, through each face's size-adjust. Running text and tables
     are Nunito (the HD study's C face, tools/sprites/hd/ui/fonts_src): rounded like Pedal Display, every accent.
   - Big words in Pedal Display, drawn art (src/views/hd/display.ts), the real words over them in clear letters.
   - Art in the art unit --u: a CSS pixel an art pixel (two device pixels on a 2× screen, as the game draws its
     960 × 540 at 2× on 1080p), two thirds of one on a 3× phone (two device pixels again). Never bigger, whole
     device pixels, no zoom. Game shots are whole frames, never cropped.
   - Panels 80 % ink with the fine pixel frame: a 1 px ink outline with stepped corners, a lit top-left edge and two
     rows of stepped shadow. Colours are the HD UI's (the game's ui.json, UiHd).
   - Motion: a menu rises 6 px and fades in, as a screen does in the game; nothing with prefers-reduced-motion. */

@font-face { font-family: "Pedal Jersey 10"; src: url("/hd/fonts/PedalJersey10.woff2?v=99763ecde") format("woff2"); font-display: block; }
@font-face { font-family: "Pedal Jersey 15"; src: url("/hd/fonts/PedalJersey15.woff2?v=99763ecde") format("woff2"); font-display: block; }
@font-face { font-family: "Pedal Jersey 20"; src: url("/hd/fonts/PedalJersey20.woff2?v=99763ecde") format("woff2"); font-display: block; }
@font-face { font-family: "Pedal Jersey 25"; src: url("/hd/fonts/PedalJersey25.woff2?v=99763ecde") format("woff2"); font-display: block; }
@font-face { font-family: "Pedal Departure Mono"; src: url("/hd/fonts/PedalDepartureMono.woff2?v=99763ecde") format("woff2"); font-display: block; }
/* The classic sizes, each drawn by the Jersey face whose own size it becomes: 16 → 27, 24 → 34, 32 → 41, 8 → 20. */
@font-face { font-family: "Pedal Jersey at 16"; src: url("/hd/fonts/PedalJersey15.woff2?v=99763ecde") format("woff2"); size-adjust: 168.75%; font-display: block; }
@font-face { font-family: "Pedal Jersey at 24"; src: url("/hd/fonts/PedalJersey20.woff2?v=99763ecde") format("woff2"); size-adjust: 141.6667%; font-display: block; }
@font-face { font-family: "Pedal Jersey at 32"; src: url("/hd/fonts/PedalJersey25.woff2?v=99763ecde") format("woff2"); size-adjust: 128.125%; font-display: block; }
@font-face { font-family: "Pedal Jersey at 8"; src: url("/hd/fonts/PedalJersey10.woff2?v=99763ecde") format("woff2"); size-adjust: 250%; font-display: block; }
@font-face { font-family: "Nunito"; src: url("/hd/fonts/Nunito.woff2?v=99763ecde") format("woff2"); font-weight: 200 1000; font-display: swap; }
/* Until Nunito comes: Arial sized to its letters and lines, so the page doesn't move when it does (fontTools'
   measures: its average letter and its ascent, descent and line gap). */
@font-face { font-family: "Nunito Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); size-adjust: 97.25%; ascent-override: 103.96%; descent-override: 36.3%; line-gap-override: 0%; }

:root {
  --pixel: "Pedal Jersey at 16", ui-monospace, monospace;
  --sans: "Nunito", "Nunito Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --u: 1px;
  /* UiHd's keys (the game's ui.json colors) */
  --k0: #090a14; --k1: #10141f; --k2: #151d28; --k3: #202e37; --k4: #394a50; --k6: #819796; --k7: #a8b5b2; --k8: #c7cfcc; --k9: #ebede9;
  --hd-ink: rgba(9, 10, 20, 0.95);
  --hd-rim: rgba(37, 58, 94, 0.9);
  --panel: rgba(16, 20, 31, 0.8);          /* panel_hud: ink-navy at 80 % */
  --menu: rgba(23, 32, 56, 0.88);          /* panel_menu: navy at 88 % */
  --well: rgba(9, 10, 20, 0.55);
  --zebra: rgba(37, 58, 94, 0.35);
  --paper: rgba(231, 213, 179, 0.97); --paper-edge: #4d2b32; --paper-lip: #d7b594; --paper-title: #752438; --paper-words: #241527; --paper-quiet: #7a4841;
  --focus: #e8c170;
  /* The fine frame: the outline in four strips that leave each corner's pixel out (styles.frame, r 1), and the two
     stepped rows of shadow under it. */
  --hd-frame: 0 -2px 0 -1px var(--hd-ink), 0 2px 0 -1px var(--hd-ink), -2px 0 0 -1px var(--hd-ink), 2px 0 0 -1px var(--hd-ink);
  --hd-drop: 0 3px 0 -1px rgba(9, 10, 20, 0.3), 0 4px 0 -1px rgba(9, 10, 20, 0.15);
  --hd-corners: linear-gradient(var(--hd-ink), var(--hd-ink)) 0 0 / 1px 1px no-repeat, linear-gradient(var(--hd-ink), var(--hd-ink)) 100% 0 / 1px 1px no-repeat,
    linear-gradient(var(--hd-ink), var(--hd-ink)) 0 100% / 1px 1px no-repeat, linear-gradient(var(--hd-ink), var(--hd-ink)) 100% 100% / 1px 1px no-repeat;
  --hd-rim-tl: linear-gradient(var(--hd-rim), var(--hd-rim)) 1px 0 / calc(100% - 2px) 1px no-repeat, linear-gradient(var(--hd-rim), var(--hd-rim)) 0 1px / 1px calc(100% - 2px) no-repeat;
  accent-color: #de9e41;
}
@media (min-resolution: 2.5dppx) { :root { --u: calc(2px / 3); } }

body { font: 16px/1.55 var(--sans); background: #3f78c4; }
::selection { background: #e8c170; color: #241527; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.hdart, .hdi, .flag, .dsp__w i, .hdsea { image-rendering: pixelated; }
.hdart { display: block; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
.hdi { display: inline-block; flex: none; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); vertical-align: middle; }

/* --- words ------------------------------------------------------------------------------------------- */

/* Each classic pixel size in the Jersey face it becomes (the size-adjusted faces above): 8 → Jersey 10, 16 → 15,
   24 → 20, 32 → 25. --pixel is the 16 px one; these are the rest, each where the classic site sets that size. */
.px-8 { font-family: "Pedal Jersey at 8"; }
.px-24, .badge__value--big, .heading__venue, .heading__sep, .round-row .n { font-family: "Pedal Jersey at 24"; }
.px-32, .plan__big, .input--code { font-family: "Pedal Jersey at 32"; }
.plan__big .muted { font-family: "Pedal Jersey at 16"; }
/* A heading the face hasn't every letter of stays in Pedal Jersey, with the game's ink ring (uikit.ptext). */
.heading {
  font-family: "Pedal Jersey at 32";
  color: #e8c170;
  text-shadow: -1px -1px 0 var(--k0), 0 -1px 0 var(--k0), 1px -1px 0 var(--k0), -1px 0 0 var(--k0), 1px 0 0 var(--k0), -1px 1px 0 var(--k0), 0 1px 0 var(--k0), 1px 1px 0 var(--k0);
}
.heading.heading--24 { font-family: "Pedal Jersey at 24"; }
.heading.heading--16 { font-family: "Pedal Jersey at 16"; }
@media (max-width: 559px) { .page-head--club .heading { font-family: "Pedal Jersey at 24"; } }
/* A code from the game (HdCodeSheets): a tile 30 × 40 a letter, in the title face in gold, 3 apart; the dash a gap.
   In a line of words, key caps at the words' size. */
.code-caps { gap: 3px; }
.code-caps:not(.code-caps--small) .key { min-width: 30px; padding: 0 4px 2px; font: 34px/39px "Pedal Jersey 20"; color: #e8c170; }
.code-caps:not(.code-caps--small) .dash { width: 14px; font: 34px/42px "Pedal Jersey 20"; color: var(--k6); text-align: center; }
.code-caps--small .key, .code-caps--small .dash { font-family: "Pedal Jersey at 16"; }
.outlined { text-shadow: -1px -1px 0 var(--k0), 0 -1px 0 var(--k0), 1px -1px 0 var(--k0), -1px 0 0 var(--k0), 1px 0 0 var(--k0), -1px 1px 0 var(--k0), 0 1px 0 var(--k0), 1px 1px 0 var(--k0); }

/* Pedal Display: word boxes of glyph cells, the words over them in clear letters (src/views/hd/display.ts). */
.hd-dsp { font-size: 0; line-height: 0; text-shadow: none; }
.dsp { display: inline; }
.dsp__w {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  margin: 0 calc(var(--m, 0) * var(--u)) calc(4 * var(--u)) 0;
}
.dsp__a { position: absolute; inset: 0; }
.dsp__w i {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  background-position: calc(var(--bx) * var(--u) * -1) calc(var(--by) * var(--u) * -1);
  background-size: calc(var(--aw) * var(--u)) calc(var(--ah) * var(--u));
  pointer-events: none;
}
.dsp__t {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: transparent;
  font: calc(var(--h) * var(--u) * 0.7) / calc(var(--h) * var(--u)) var(--pixel);
  white-space: pre;
  text-shadow: none;
}
.dsp--xs { --aw: 2034; --ah: 68; } .dsp--s { --aw: 2034; --ah: 82; } .dsp--ms { --aw: 2046; --ah: 176; }
.dsp--m { --aw: 2024; --ah: 288; } .dsp--l { --aw: 2043; --ah: 535; } .dsp--xl { --aw: 2040; --ah: 870; }
.dsp--xs i { background-image: url("/hd/display/xs-gold.png?v=99763ecde"); }
.dsp--s i { background-image: url("/hd/display/s-gold.png?v=99763ecde"); }
.dsp--ms i { background-image: url("/hd/display/ms-gold.png?v=99763ecde"); }
.dsp--m i { background-image: url("/hd/display/m-gold.png?v=99763ecde"); }
.dsp--l i { background-image: url("/hd/display/l-gold.png?v=99763ecde"); }
.dsp--xl i { background-image: url("/hd/display/xl-gold.png?v=99763ecde"); }
.dsp--xs.dsp--cream i { background-image: url("/hd/display/xs-cream.png?v=99763ecde"); }
.dsp--s.dsp--cream i { background-image: url("/hd/display/s-cream.png?v=99763ecde"); }
.dsp--ms.dsp--cream i { background-image: url("/hd/display/ms-cream.png?v=99763ecde"); }
.dsp--m.dsp--cream i { background-image: url("/hd/display/m-cream.png?v=99763ecde"); }
.dsp--l.dsp--cream i { background-image: url("/hd/display/l-cream.png?v=99763ecde"); }
.dsp--xl.dsp--cream i { background-image: url("/hd/display/xl-cream.png?v=99763ecde"); }
/* On the cream paper, the paper's title red (ui.json paper_title). */
.hd-paper .dsp--xs i { background-image: url("/hd/display/xs-paper.png?v=99763ecde"); }
.hd-paper .dsp--s i { background-image: url("/hd/display/s-paper.png?v=99763ecde"); }
.hd-paper .dsp--ms i { background-image: url("/hd/display/ms-paper.png?v=99763ecde"); }
/* A logo's name over its lockup, in clear letters (src/views/hd/layout.tsx Logo). */
.hero__logo, .footer__logo { position: relative; }
.logo__t { position: absolute; inset: 0; overflow: hidden; color: transparent; font: 40px/56px var(--pixel); white-space: nowrap; text-shadow: none; }
.footer__logo .logo__t { font-size: 20px; line-height: 28px; }
/* High contrast: the words themselves. */
@media (forced-colors: active) {
  .dsp__w { width: auto; height: auto; }
  .dsp__w i { display: none; }
  .dsp__t { position: static; color: CanvasText; font-size: 24px; line-height: 32px; }
  .logo__t { position: static; color: CanvasText; }
  .logo__t + span { display: none; }
}

/* --- the sky: the menus' (HdSky), still --------------------------------------------------------------- */

/* The cloud bank over the far peaks along the sky's foot, at one art unit a pixel, repeated across: each drawn at the
   foot of a clear strip as tall as any window (sync:hd's *_foot), so it's the page's background, never its largest
   picture (LCP), and the page's own words and pictures come first. */
.sky--hd {
  background:
    url("/hd/sky/bank_foot.webp?v=99763ecde") repeat-x center bottom / calc(1020 * var(--u)) calc(1800 * var(--u)),
    url("/hd/sky/peaks_foot.webp?v=99763ecde") repeat-x center bottom / calc(960 * var(--u)) calc(1800 * var(--u)),
    linear-gradient(#3f78c4 calc(100% - 540 * var(--u)), #69a2dc calc(100% - 313.2 * var(--u)), #a6cfee calc(100% - 151.2 * var(--u)), #e4f2f4);
  image-rendering: pixelated;
}
.hdsky__cloud { position: absolute; left: calc(50% + (var(--x) - 480) * var(--u)); bottom: calc((540 - var(--y) - var(--h)) * var(--u)); }

/* --- panels, paper, wells --------------------------------------------------------------------------- */

.panel, .navbar__bar, .navmenu__list, .consent {
  background: var(--hd-corners), var(--hd-rim-tl), var(--panel);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}
.panel { padding: 22px; }
@media (max-width: 559px) { .panel { padding: 16px; } }
.panel--well, .faq details, .platform-list li, .news-post, .plan, .go-groups > li, .island-cups__rules {
  background: var(--hd-corners), var(--well);
  border: 0;
  box-shadow: var(--hd-frame);
}
/* C's cream paper: cards and banners (paper_card, paper_banner). */
.hd-paper, .offer {
  color: var(--paper-words);
  background: var(--hd-corners), linear-gradient(rgba(235, 237, 233, 0.9), rgba(235, 237, 233, 0.9)) 1px 0 / calc(100% - 2px) 1px no-repeat,
    linear-gradient(var(--paper-lip), var(--paper-lip)) 1px 100% / calc(100% - 2px) 2px no-repeat, var(--paper);
  border: 0;
  box-shadow: 0 -2px 0 -1px var(--paper-edge), 0 2px 0 -1px var(--paper-edge), -2px 0 0 -1px var(--paper-edge), 2px 0 0 -1px var(--paper-edge), var(--hd-drop);
}
.offer { padding: 12px 14px 14px; color: var(--paper-words); }
.offer:hover, .offer:focus-visible { background: var(--hd-corners), linear-gradient(#e8c170, #e8c170) 1px 0 / calc(100% - 2px) 2px no-repeat, var(--paper); color: var(--paper-words); }
.offer:hover::before, .offer:focus-visible::before { display: none; }
.offer:focus-visible { outline: none; box-shadow: 0 0 0 2px #e8c170, 0 0 0 3px var(--k0); }
.offer__head, .offer:hover .offer__head { color: var(--paper-title); }
.offer__text { color: var(--paper-words); font-size: 15px; }
/* The season's banner on paper (docs/51 "Festive online"): the snow edge lies along its top, the words in the paper's ink. */
.season .snow-edge { left: 1px; width: calc(100% - 2px); }
.season__kicker { color: var(--paper-quiet); }
.season__line { color: var(--paper-words); }
.everyone { border: 0; }
.your-year__card { width: 604px; }

/* --- buttons (the game's buttons table: secondary, primary, danger) ------------------------------------- */

.btn {
  --bf: #253a5e; --bt: #4f8fba; --bb: #1f2f4e; --bw: #ebede9;
  min-height: 44px;
  padding: 10px 18px;
  font: 16px/24px var(--pixel);
  color: var(--bw);
  background: var(--hd-corners), linear-gradient(var(--bt), var(--bt)) 1px 0 / calc(100% - 2px) 1px no-repeat,
    linear-gradient(var(--bb), var(--bb)) 1px 100% / calc(100% - 2px) 1px no-repeat, var(--bf);
  border: 0;
  box-shadow: var(--hd-frame), 0 3px 0 -1px rgba(9, 10, 20, 0.35);
}
.btn:hover { --bf: #3c5e8b; --bt: #73bed3; --bb: #314c71; color: var(--bw); background: var(--hd-corners), linear-gradient(var(--bt), var(--bt)) 1px 0 / calc(100% - 2px) 1px no-repeat, linear-gradient(var(--bb), var(--bb)) 1px 100% / calc(100% - 2px) 1px no-repeat, var(--bf); }
.btn--primary { --bf: #de9e41; --bt: #e8c170; --bb: #af7d37; --bw: #241527; }
.btn--primary:hover { --bf: #e8c170; --bt: #ebede9; --bb: #b7995c; --bw: #241527; }
.btn--danger { --bf: #a53030; --bt: #da863e; --bb: #83282a; }
.btn--danger:hover { --bf: #cf573c; --bt: #da863e; --bb: #a34633; }
.btn--quiet { --bf: #172038; --bt: #4f8fba; --bb: #141b30; }
.btn--quiet:hover { --bf: #172038; --bt: #73bed3; --bb: #141b30; }
/* Focus: the gold ring with an ink keyline outside it, words gold on the plain buttons. */
.btn:focus-visible, .btn.is-focus, .btn--primary:focus-visible, .menu .btn.is-focus, .menu .btn:focus-visible { outline: none; color: var(--bw); box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0), 0 4px 0 0 rgba(9, 10, 20, 0.35); }
.btn:not(.btn--primary):not(.btn--danger):focus-visible, .btn:not(.btn--primary):not(.btn--danger).is-focus { color: #e8c170; }
/* Pressed: a step darker, the top line in ink a pixel down, the words a pixel down. */
.btn:active, .btn--primary:active, .btn--danger:active {
  --bb: transparent;
  padding-top: 11px; padding-bottom: 9px;
  background: var(--hd-corners), linear-gradient(var(--k0), var(--k0)) 1px 1px / calc(100% - 2px) 1px no-repeat, var(--bf);
  box-shadow: var(--hd-frame);
}
.btn:active { --bf: #172038; color: #e8c170; }
.btn--primary:active { --bf: #be772b; color: #241527; }
.btn--danger:active { --bf: #752438; color: var(--k9); }
.btn[disabled], .btn[disabled]:hover, .btn[disabled]:active, .btn[aria-disabled="true"], .btn--primary[disabled], .btn--primary[disabled]:hover {
  --bf: #202e37; --bt: transparent; --bb: #1b262f; color: #a8b5b2; cursor: not-allowed;
  background: var(--hd-corners), linear-gradient(var(--bb), var(--bb)) 1px 100% / calc(100% - 2px) 1px no-repeat, var(--bf);
  box-shadow: var(--hd-frame);
}
.btn--small { min-height: 32px; padding: 4px 12px; }

/* --- chips, tabs, badges ------------------------------------------------------------------------------- */

/* A chip: words on a fill with its corners stepped (UiHd.chip). */
.chip {
  min-height: 24px;
  padding: 0 7px;
  font: 20px/22px "Pedal Jersey 10";
  border: 0;
  box-shadow: none;
  clip-path: polygon(1px 0, calc(100% - 1px) 0, calc(100% - 1px) 1px, 100% 1px, 100% calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) 100%, 1px 100%, 1px calc(100% - 1px), 0 calc(100% - 1px), 0 1px, 1px 1px);
}
.chip--small, .chip--tag { min-height: 20px; line-height: 20px; padding: 0 5px; }
.chip--upcoming { background: #3c5e8b; color: var(--k9); }
.chip--live { background: #25562e; box-shadow: none; }
.chip--date { background: rgba(9, 10, 20, 0.7); color: var(--k8); }
.tabs { gap: 3px; margin-bottom: 0; }
.tab {
  margin-top: 4px;
  padding: 6px 14px;
  font: 16px/24px var(--pixel);
  color: var(--k8);
  background: var(--hd-corners), rgba(16, 20, 31, 0.82);
  border: 0;
  box-shadow: var(--hd-frame);
}
.tab:hover { color: var(--k9); background: var(--hd-corners), rgba(37, 58, 94, 0.82); }
.tab[aria-current] { margin-top: 0; padding: 10px 16px 6px; color: #e8c170; background: var(--hd-corners), rgba(37, 58, 94, 0.95); }
.tab[aria-current]::before { left: 1px; right: 1px; top: 0; height: 2px; background: #e8c170; }
.tabs + .panel { margin-top: 3px; }
/* A tab's short label on a phone (MORE for MORE ROUTES): the full label stays in the link, out of sight, so the link
   says where it goes (search engines read link text); the short one shows. */
@media (max-width: 559px) {
  .tab__full { display: inline; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.badge {
  background: var(--hd-corners), var(--hd-rim-tl), rgba(23, 32, 56, 0.88);
  border: 0;
  box-shadow: var(--hd-frame);
}
.badge__label { font: 20px/20px "Pedal Jersey 10"; color: var(--k7); letter-spacing: 1px; }
.badge__value { font: 27px/27px "Pedal Jersey 15"; color: var(--k9); }
.badge__value--big { font: 34px/34px "Pedal Jersey 20"; }

/* --- forms (the game's field: an edge, the well at 90 %, a lit line at its top) ------------------------- */

.field > label, .field > .label, legend.label { color: #e8c170; }
.input, .select {
  background: linear-gradient(var(--k2), var(--k2)) 1px 1px / calc(100% - 2px) 1px no-repeat, rgba(9, 10, 20, 0.9);
  border: 1px solid #3c5e8b;
  font-family: var(--sans);
}
.input:hover, .select:hover { border-color: #4f8fba; }
.input:focus, .select:focus { border-color: #e8c170; box-shadow: 0 0 0 1px #e8c170, 0 0 0 2px var(--k0); }
.input::placeholder { color: #819796; }
.input--px, .input--code { font-family: var(--pixel); }
.select { background-image: linear-gradient(45deg, transparent 50%, #e8c170 50%), linear-gradient(-45deg, transparent 50%, #e8c170 50%), linear-gradient(var(--k2), var(--k2)); background-position: right 16px top 50%, right 10px top 50%, 1px 1px; background-size: 6px 6px, 6px 6px, calc(100% - 2px) 1px; background-repeat: no-repeat; background-color: rgba(9, 10, 20, 0.9); }
.select option { background: var(--k1); }
.switch input { border-width: 1px; border-color: #3c5e8b; background: #202e37; }
.switch input:checked { background: #75a743; border-color: #a8ca58; }
.seg label { background: rgba(9, 10, 20, 0.9); border: 1px solid #3c5e8b; }
.seg input:checked + label { background: #de9e41; color: #241527; border-color: #af7d37; box-shadow: inset 0 1px 0 #e8c170; }

/* --- the floating bar ----------------------------------------------------------------------------------- */

.navbar__bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* The logo's small lockup in the bar; its home lockup where the bar folds to MENU (src/views/hd/layout.tsx HdBrand). */
.brand picture { display: block; line-height: 0; }
.brand .brand__logo { display: block; flex: none; width: calc(90 * var(--u)); height: calc(13 * var(--u)); border: 0; image-rendering: pixelated; }
@media (max-width: 1099px) { .brand .brand__logo { width: calc(182 * var(--u)); height: calc(28 * var(--u)); } }
/* The bar reads over the page under it: nearly opaque. */
.navbar__bar { background: var(--hd-corners), var(--hd-rim-tl), rgba(16, 20, 31, 0.94); }
.navmenu__btn { border: 0; padding: 8px 12px; }
.navmenu__btn:hover, .navmenu__btn[aria-expanded="true"] { color: #e8c170; background: var(--hd-corners), rgba(37, 58, 94, 0.92); border: 0; box-shadow: var(--hd-frame); }
.navmenu__btn:focus-visible { outline: none; color: #e8c170; background: rgba(37, 58, 94, 0.92); box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0); }
.navmenu.is-here > .navmenu__btn { color: #e8c170; box-shadow: inset 0 -2px 0 #e8c170; }
.navmenu--end > .navmenu__btn { background: var(--hd-corners), linear-gradient(#4f8fba, #4f8fba) 1px 0 / calc(100% - 2px) 1px no-repeat, #253a5e; box-shadow: var(--hd-frame); }
.navmenu__list { background: var(--hd-corners), var(--hd-rim-tl), rgba(23, 32, 56, 0.96); }
.navmenu__btn[aria-expanded="true"] + .navmenu__list, html:not(.js) .navmenu:hover > .navmenu__list, html:not(.js) .navmenu:focus-within > .navmenu__list { animation: hd-rise 0.18s steps(4) both; }
.navlink { grid-template-columns: 16px minmax(0, 1fr); border: 0; }
.navlink svg { margin-top: 4px; }
.navlink:hover { background: var(--hd-corners), rgba(37, 58, 94, 0.92); }
.navlink:focus-visible { outline: none; background: rgba(37, 58, 94, 0.92); box-shadow: inset 0 0 0 2px var(--focus); }
.navlink[aria-current="page"] { box-shadow: inset 2px 0 0 #e8c170; }
.navlink__blurb { font-size: 14px; }
.navbar__end .btn { padding: 8px 14px; min-height: 40px; }
@media (max-width: 1099px) {
  .navbar__nav { background: var(--hd-corners), var(--hd-rim-tl), rgba(23, 32, 56, 0.96); box-shadow: var(--hd-frame), var(--hd-drop); }
  .navmenu__btn { background: var(--hd-corners), linear-gradient(#4f8fba, #4f8fba) 1px 0 / calc(100% - 2px) 1px no-repeat, #253a5e; box-shadow: var(--hd-frame); }
  .navmenu__list, .navmenu--end .navmenu__list { background: none; box-shadow: none; animation: none; }
}
.navbar__fold[open] > .navbar__toggle { --bf: #172038; --bt: #4f8fba; --bb: #141b30; color: #e8c170; }
@keyframes hd-rise { from { opacity: 0; transform: translateY(6px); } }

/* --- the page --------------------------------------------------------------------------------------- */

/* A page's title on the sky: a chip or a plate beside it sits on the middle of the drawn words, not their foot. */
.page-head { align-items: center; }
/* Words straight on the sky sit on a strip of panel: the light sky is too pale for them. */
.crumbs, .page-head > .outlined, .page-head > p, .island-panel__place { padding: 2px 8px; background: var(--panel); }
.crumbs { display: inline-block; }
.crumbs a:where(:not(.btn)) { color: var(--k8); }
.lede { font-size: 17px; color: var(--k8); }
.stage-kicker { color: #73bed3; }
.panel .sub { color: #e8c170; }
.section-title { gap: 12px; }
a { color: #73bed3; }
a:hover { color: #a4dddb; }

/* The game's shots: whole frames, never cropped, filling their slot's width with their shape kept (the owner,
   2026-12-03). Each is scaled from the file the browser takes for its width (src/views/hd/transform.ts SHOT_SIZES):
   under 2 device pixels a grid pixel, smoothly from the art at 2x, so every pixel comes out the same size and the
   game's small words stay legible; from 2 device pixels a grid pixel (a slot of 960 px or more on a 2x screen, 640 on
   a 3x, 1,920 on a 1x), with each pixel kept square and sharp. A pair keeps two halves side by side. */
.shot { width: 100%; max-width: 100%; height: auto; border: 1px solid var(--k0); box-sizing: border-box; image-rendering: auto; }
.hd-row__pic, .hd-whole { container: hdpic / inline-size; }
@container hdpic (min-width: 1922px) { .shot { image-rendering: pixelated; } }
@media (min-resolution: 1.5dppx) { @container hdpic (min-width: 1282px) { .shot { image-rendering: pixelated; } } }
@media (min-resolution: 2dppx) { @container hdpic (min-width: 962px) { .shot { image-rendering: pixelated; } } }
@media (min-resolution: 3dppx) { @container hdpic (min-width: 642px) { .shot { image-rendering: pixelated; } } }
/* A pair's halves at half a grid pixel an art unit, their 1 px edge outside it. */
.pair .shot { width: calc(480 * var(--u) + 2px); image-rendering: pixelated; }
.pair { justify-items: start; }
@media (max-width: 699px) { .pair .shot { width: 100%; image-rendering: auto; } }
.road img.shot { object-fit: contain; }
/* A slot still waiting for its HD shot (the classic one stands in): marked. */
img[data-hd-waiting] { outline: 3px dashed #de9e41; outline-offset: -3px; filter: grayscale(0.85); }

/* Flags: the menus' HD flags, 14 × 9 in a row and 27 × 18 where the site drew them bigger, in a 1 px ink frame. */
.flag:not(.flag--body):not(.flag--none) {
  width: calc(14 * var(--u)); height: calc(9 * var(--u)); border-width: var(--u);
  background-image: url("/hd/flags/flags_small.png?v=99763ecde");
  background-size: calc(224 * var(--u)) calc(117 * var(--u));
  background-position: calc(var(--fx) / 18 * -14 * var(--u)) calc(var(--fy) / 12 * -9 * var(--u));
}
.flag.flag--2:not(.flag--body):not(.flag--none), .flag.flag--3:not(.flag--body):not(.flag--none), .flag.flag--4:not(.flag--body):not(.flag--none) {
  width: calc(27 * var(--u)); height: calc(18 * var(--u));
  background-image: url("/hd/flags/flags.png?v=99763ecde");
  background-size: calc(432 * var(--u)) calc(234 * var(--u));
  background-position: calc(var(--fx) / 18 * -27 * var(--u)) calc(var(--fy) / 12 * -18 * var(--u));
}

/* Tables: Nunito with even figures, the game's labels over them, rows on the panel. */
.table-scroll { border: 0; background: rgba(9, 10, 20, 0.5); box-shadow: var(--hd-frame); margin: 0; }
.results { font: 15px/1.35 var(--sans); font-variant-numeric: tabular-nums; }
.results th { font: 20px/20px "Pedal Jersey 10"; letter-spacing: 1px; text-transform: uppercase; color: #e8c170; background: rgba(37, 58, 94, 0.9); border-bottom: 1px solid var(--k0); }
.results td { border-top: 1px solid rgba(9, 10, 20, 0.7); }
.results tbody tr:nth-child(odd) { background: var(--zebra); }
.results tbody tr:nth-child(even) { background: transparent; }
.results tbody tr:hover { background: rgba(37, 58, 94, 0.7); }
.results tr.is-me { background: rgba(190, 119, 43, 0.22) !important; box-shadow: inset 2px 0 0 #e8c170; }
.results .rank { font-weight: 800; }

/* --- the grid (the restructure of 2026-12-02): every page full width, with a gutter that grows with the window -------- */

/* The gutter: 16 px on a phone, 4 % of the window between, 64 px from 1,600 px. The bar, the pages and the footer stand
   on it, and the whole stops at 2,400 px. */
:root { --gutter: clamp(16px, 4vw, 64px); --page-max: 2400px; }
.wrap { max-width: var(--page-max); padding: 0 var(--gutter); }
.navbar { left: max(var(--gutter), env(safe-area-inset-left, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); max-width: calc(var(--page-max) - 2 * var(--gutter)); }
/* Running text fills its panel (the owner, 2026-12-03: no early wrap): on a wide window the sections stand side by
   side (below), so lines stay readable by the layout, not by stopping short. */
.update__notes { max-inline-size: none; }
/* Tiles: as many of 240 px as fit a row (1 on a phone, 3 at 1,024 px, 5 at 1,440, 7 at 1,920), and fewer share the
   row between them, so a row of three is as wide as the panel. Cards the same, 300 px at least. */
.offers, .offers.offers--3, .offers.offers--4 { gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
@media (max-width: 559px) { .cards { grid-template-columns: minmax(0, 1fr); } }
/* The other grids of cards the same: a short row shares the panel's width (Track Cups' programmes, the island cups,
   the velodromes, a league's rounds, a cup's heats and riders, the programmes to pick). */
.formats { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.island-cups__list { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.venues { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.round-strip { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.heats { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.template-picks { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.list.cup-riders { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
/* A tab's groups of cards (a region's circuits, a month's races: src/views/hd/sections.ts) share a row where they're
   short, each its cards a column apiece, so the page is full across; a group of four or more has a row of its own. */
@media (min-width: 1200px) {
  .hd-groups { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 24px; }
  /* Each group as wide as its cards at 300 px (and the gaps), growing to share what's left of its row. */
  .hd-groups > .group { flex: 1 1 312px; min-width: 0; }
  .hd-groups > .group:has(> .cards > :nth-child(2)) { flex-basis: 624px; }
  .hd-groups > .group:has(> .cards > :nth-child(3)) { flex-basis: 936px; }
  .hd-groups > .group:has(> .cards > :nth-child(4)) { flex-basis: 100%; }
  .hd-groups > .group:not(:has(> .cards > :nth-child(4))) > .cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); }
}
/* NEWS: the posts two a row on a wide panel. */
@container hdflow (min-width: 1500px) {
  .hd-whole:has(> .news-post) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; align-items: start; }
  .hd-whole:has(> .news-post) > :not(.news-post) { grid-column: 1 / -1; }
  .hd-whole > .news-post { margin: 0; }
}
/* A panel of paragraphs alone (COMPUTER's opening): two columns on a wide window, not lines across it all. */
@media (min-width: 1500px) {
  .panel:not(.hd-flow):has(> p:nth-of-type(4)):not(:has(> :not(p, ul, ol, .kicker, .lede, .hint, h2, h3))) { columns: 2; column-gap: 48px; }
  .panel:not(.hd-flow):has(> p:nth-of-type(4)) > :is(p, li, ul, ol) { break-inside: avoid-column; }
  .panel:not(.hd-flow):has(> p:nth-of-type(4)) > .kicker { break-after: avoid; }
}
/* Pictures: whole frames at one art unit a pixel or half that, never between. A pair shows its two at half side by
   side, and at one art unit each where two of those fit (a 2,560 px window). */
.pair { container-type: inline-size; display: flex; flex-wrap: wrap; gap: 12px; }
@container (min-width: 1936px) { .pair .shot { width: calc(960 * var(--u) + 2px); } }

/* --- a page's sections side by side (src/views/hd/sections.ts) ------------------------------------------------------ */

/* A feature page or a page of prose, split into its sections: each as wide as the panel on a phone; on a wider one a
   section beside its picture, sections of words as cards two or three a row, a long one in two columns. */
.hd-flow { container: hdflow / inline-size; }
.hd-flow > :is(.hd-row, .hd-cards, .hd-whole) { margin-top: 28px; }
.hd-flow .hd-row--opening { margin-top: 16px; }
.hd-flow :is(.hd-row__head, .hd-row__text, .hd-card, .hd-whole) > :first-child { margin-top: 0; }
.hd-flow :is(.hd-row__text, .hd-card) > :last-child { margin-bottom: 0; }
.hd-flow .hd-row__head > .sub, .hd-flow .hd-card > h2 { margin-bottom: 10px; }
.hd-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hd-row__pic { display: block; }
.hd-row__pic > .shot, .hd-row__pic .still .shot { display: block; margin: 0; }
.hd-row__pic > .still, .hd-row__pic > .pair { margin: 0; }
.hd-row__text > :first-child { margin-top: 0; }
.hd-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.hd-card, .hd-whole, .hd-row > * { min-width: 0; }
@container hdflow (min-width: 1000px) {
  .hd-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto 1fr; grid-template-areas: "head pic" "text pic"; column-gap: 32px; row-gap: 0; align-items: start; }
  .hd-row--flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "pic head" "pic text"; }
  .hd-row__head { grid-area: head; }
  .hd-row__pic { grid-area: pic; }
  .hd-row__text { grid-area: text; }
  .hd-row__head > .lede { margin-top: 0; }
  .hd-row--opening .hd-row__text { margin-top: 20px; }
  .hd-cards--2, .hd-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-cards--2 > .hd-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* A card: a well with the fine frame, its heading on top. */
  .hd-card { padding: 14px 16px 16px; background: rgba(9, 10, 20, 0.35); box-shadow: var(--hd-frame); }
  .hd-cards--1 > .hd-card { padding: 0; background: none; box-shadow: none; }
  /* A list of short lines in a section alone: two columns of them. */
  .hd-cards--1 > .hd-card:not(.hd-card--cols) > .feature-list:has(> li:nth-child(4)) { display: block; columns: 2; column-gap: 40px; }
  .hd-cards--1 > .hd-card:not(.hd-card--cols) > .feature-list > li { break-inside: avoid; margin-bottom: 10px; }
}
@container hdflow (min-width: 1500px) {
  .hd-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* A section of words alone, long enough: two columns. */
  .hd-cards--1 > .hd-card--cols { columns: 2; column-gap: 40px; }
  .hd-cards--1 > .hd-card--cols > :is(h2, .sub) { column-span: all; }
  .hd-cards--1 > .hd-card--cols :is(li, pre, h3, h4) { break-inside: avoid; }
  .hd-cards--1 > .hd-card--cols :is(h3, h4) { break-after: avoid; }
  .hd-cards--1 > .hd-card--cols > p { orphans: 2; widows: 2; }
}

/* A panel's list of short lines alone (THINGS TO ASK): two columns of them on a wide window. */
@media (min-width: 1500px) { .prose > ul:has(> li:nth-child(4)) { columns: 2; column-gap: 40px; } .prose > ul > li { break-inside: avoid; } }

/* --- parts on every page: cards, jump rows, swatches, words on the sky ----------------------------------------------- */

/* A route's card: a panel of its own (80 % ink, the fine frame, a lit top-left edge), where the classic site edges it
   with 2 px of ink; under the pointer a lighter navy with the gold bar. A club's card is the community pages'. */
.hd .card:not(.club-card) {
  background: var(--hd-corners), var(--hd-rim-tl), var(--panel);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}
.hd .card:not(.club-card):hover {
  color: var(--k9);
  background: var(--hd-corners), linear-gradient(#73bed3, #73bed3) 1px 0 / calc(100% - 2px) 1px no-repeat, rgba(37, 58, 94, 0.92);
}
.hd .card:not(.club-card):is(:hover, :focus-visible)::before { left: 1px; top: 1px; bottom: 1px; width: 3px; background: #e8c170; }
.hd .card:not(.club-card):focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0); }
.hd .card__leader { font-size: 13px; color: var(--k7); }
.hd .card__leader b { color: var(--k9); }
.hd .card__blurb--text { font-family: var(--sans); color: var(--k8); }
/* A blurb in caps is the body role, Pedal Jersey 10: the classic's 16 px caps would be Jersey 15, a heading's weight. */
.hd .card__blurb:not(.card__blurb--text) { font: 20px/20px "Pedal Jersey 10"; letter-spacing: 0; }

/* The jump rows (months, regions, decades, the Veloverse's islands): a strip of the game's small buttons. */
.hd .jump {
  gap: 3px;
  padding: 5px;
  background: var(--hd-corners), var(--hd-rim-tl), var(--menu);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}
.hd .jump__item {
  color: #ebede9;
  background: var(--hd-corners), linear-gradient(#4f8fba, #4f8fba) 1px 0 / calc(100% - 2px) 1px no-repeat, #253a5e;
  border: 0;
  box-shadow: var(--hd-frame);
}
.hd .jump__item:hover { color: #e8c170; background: var(--hd-corners), linear-gradient(#73bed3, #73bed3) 1px 0 / calc(100% - 2px) 1px no-repeat, #3c5e8b; }
.hd .jump__item:focus-visible { outline: none; color: #e8c170; box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0); }
.hd .jump__item[aria-current] { color: #241527; background: var(--hd-corners), linear-gradient(#e8c170, #e8c170) 1px 0 / calc(100% - 2px) 1px no-repeat, #de9e41; }
.hd .jump__item.is-empty { color: #a8b5b2; background: var(--hd-corners), rgba(9, 10, 20, 0.6); box-shadow: none; }

/* The rules to agree to: a panel of their own. */
.hd .rules-box {
  background: var(--hd-corners), var(--hd-rim-tl), var(--panel);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}

/* Keys and swatches: a pixel of ink, not the classic 2 px. */
.hd :is(.swatch, .dot) { border-width: 1px; }
.hd .swatch { width: 14px; height: 10px; vertical-align: -1px; }

/* On the sky: words, a group's kicker and the quiet report link on a strip of panel; the time zone's note a step lighter. */
.hd .outlined-text { text-shadow: none; }
.hd p.outlined-text { display: table; padding: 2px 8px; background: var(--panel); }
.hd span.outlined-text { padding: 2px 8px; background: var(--panel); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hd .kicker { display: table; padding: 2px 8px; text-align: left; background: var(--panel); }
.hd .report-link a:where(:not(.btn)) { padding: 2px 8px; color: var(--k8); text-shadow: none; background: var(--panel); }
.hd .tz-note { color: var(--k7); }

/* Pixel art drawn as SVG at one art unit a pixel (the rider in a kit, club emblems: src/views/hd/rider.ts, emblem.ts). */
.hdart-svg { display: inline-block; flex: none; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); vertical-align: middle; }
/* A club's short name on its chip (ClubChip): Pedal Jersey 10 on the club's colours, a lit top row, a pixel of ink round. */
.club-chip--hd {
  display: inline-block;
  padding: 0 4px;
  font: 20px/16px "Pedal Jersey 10";
  color: var(--i);
  background: linear-gradient(var(--t), var(--t)) 0 0 / 100% 1px no-repeat, var(--g);
  box-shadow: 0 0 0 1px var(--k0);
  vertical-align: middle;
  white-space: nowrap;
}

/* An island's HD map (src/views/island.tsx HdIslandMap): route select's big map at one art unit a pixel in a pixel of
   ink, scrolling sideways in its own frame where the screen is narrower. A pin is a 7-pixel square (gold a circuit,
   sky a cantonal road, its own route's ringed in coral) in the middle of a 24 px tap target. */
.island-map--hd .island-map__scroll { max-width: 100%; overflow-x: auto; padding: 1px; scrollbar-width: thin; }
.island-map--hd .island-map__frame { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); border: 0; box-shadow: 0 0 0 1px var(--k0); box-sizing: content-box; }
.island-map--hd .island-map__img { width: 100%; height: 100%; image-rendering: pixelated; }
.island-map--hd .pin, .island-map--hd .pin:hover, .island-map--hd .pin.is-here {
  left: calc(var(--x) * var(--u) - 12px);
  top: calc(var(--y) * var(--u) - 12px);
  width: 24px;
  height: 24px;
  background: none;
  border: 0;
  box-shadow: none;
  outline: 0;
}
.island-map--hd .pin::before {
  content: "";
  position: absolute;
  left: calc(12px - 3 * var(--u));
  top: calc(12px - 3 * var(--u));
  width: calc(7 * var(--u));
  height: calc(7 * var(--u));
  background: #e8c170;
  box-shadow: 0 0 0 var(--u) var(--k0), inset 0 var(--u) 0 #ebede9;
}
.island-map--hd .pin--road::before { background: #73bed3; box-shadow: 0 0 0 var(--u) var(--k0), inset 0 var(--u) 0 #a4dddb; }
.island-map--hd .pin:hover::before { background: #ebede9; }
.island-map--hd .pin.is-here { z-index: 1; }
.island-map--hd .pin.is-here::before { box-shadow: 0 0 0 var(--u) var(--k0), 0 0 0 calc(2 * var(--u)) #cf573c; }
.island-map--hd .pin:focus-visible { z-index: 2; outline: 2px solid var(--focus); outline-offset: -2px; }
.island-map--hd .pin--key { position: relative; left: auto; top: auto; display: inline-block; width: calc(9 * var(--u)); height: calc(9 * var(--u)); vertical-align: -1px; }
.island-map--hd .pin--key::before { left: var(--u); top: var(--u); }

/* The drawings a page repeats, drawn once (src/views/hd/transform.ts shareDrawings): out of the way. */
.hd-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
/* A ride's charts, the bars and the rider card's hexagon at one art unit a pixel (src/views/hd/rides.ts), a pixel of ink
   round the charts; narrower than its box, a chart shrinks to it rather than push the page sideways. */
.chart.chart--hd, .bars--hd, .hexagon--hd { max-width: 100%; height: auto; }
.chart.chart--hd { border: 0; box-shadow: 0 0 0 1px var(--k0); }

/* --- the home page ---------------------------------------------------------------------------------- */

/* The title screen (D14): the logo, the slogan, the island, the two buttons and where it runs, one column with the
   same gap between each, on the art grid (24 art units: 24 px, or 16 on a 3x phone). The island's stage is the game's
   960 wide, centred, its islets running off a narrow screen as the game's do. */
.hero--hd {
  --g: calc(24 * var(--u));
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--g);
  padding: calc(var(--nav-space) + 2 * var(--g)) 16px calc(2 * var(--g));
  overflow: hidden;
  text-align: center;
}
/* A short screen (a 1024 x 768 tablet on its side): 16 units between, so the whole title screen fits it. */
@media (max-height: 819px) { .hero--hd { --g: calc(16 * var(--u)); } }
.hero__logo { margin: 0; }
/* The slogan's words wrap on a phone; its last line's 4 units under it go, so every gap is the same. */
.hero__slogan { margin: 0 0 calc(-4 * var(--u)); font-size: 0; line-height: 0; }
.hdstage { position: relative; flex: none; width: calc(960 * var(--u)); height: calc(394 * var(--u)); }
/* The title screen's picture (2026-12-02): a whole HD frame filling the page's width on a phone; on a wider window
   960 px, and more as the window is taller, so the title screen still fits it (the owner, 2026-12-03: pictures fill).
   Scaled as every shot is (above): smoothly under 2 device pixels a grid pixel, square and sharp from 2. */
.hero--hd .hero__shot { flex: none; width: min(100%, max(960px, (100svh - 460px) * 16 / 9)); max-width: 100%; height: auto; }
@media (max-width: 991px) { .hero--hd .hero__shot { width: 100%; } }
@media (min-resolution: 2dppx) and (min-width: 992px) { .hero--hd .hero__shot { image-rendering: pixelated; } }
@media (min-resolution: 3dppx) and (min-width: 660px) { .hero--hd .hero__shot { image-rendering: pixelated; } }
.hdstage .hdart { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); }
.hero--hd .menu.menu--two { margin: 0; gap: 16px; }
.hero--hd .menu.menu--two .btn { width: 200px; min-height: 48px; padding: 10px 18px; font-size: 16px; line-height: 24px; }
@media (max-width: 759px) { .hero--hd .menu.menu--two { width: 100%; max-width: 420px; } .hero--hd .menu.menu--two .btn { width: auto; } }
.hero__where { margin: 0; padding: 2px 10px; color: var(--k9); background: var(--panel); box-shadow: var(--hd-frame); text-wrap: balance; }
.hero--hd .menu:not(.menu--two) { display: flex; justify-content: center; margin: 0; }
.hero--hd .menu:not(.menu--two) .btn { width: 200px; min-height: 48px; }

/* The home page's sections with pictures are laid out when they come near the window (content-visibility), so the title
   screen paints first with less to lay out. Until then each stands in at their mean height at that width (measured
   2026-12-03, again once the pictures filled), so the page is as tall as it will be and nothing jumps; then each keeps the size it had. The short
   sections and the footer are always laid out, so the cloud sea sits just under the last one. */
.landing .home-sec:has(.shot) { content-visibility: auto; contain-intrinsic-size: auto 1370px; }
@media (min-width: 600px) { .landing .home-sec:has(.shot) { contain-intrinsic-size: auto 1200px; } }
@media (min-width: 1200px) { .landing .home-sec:has(.shot) { contain-intrinsic-size: auto 810px; } }
@media (min-width: 1680px) { .landing .home-sec:has(.shot) { contain-intrinsic-size: auto 770px; } }
@media (min-width: 2200px) { .landing .home-sec:has(.shot) { contain-intrinsic-size: auto 970px; } }
/* A section: its line, then its picture beside its tiles where the panel has the room, the picture a little over half
   of it and filling its share (the owner, 2026-12-03); on a phone, the picture over them, the panel's width. FLIP puts
   the picture on the right. */
.home-sec .panel { container-type: inline-size; }
.home-sec__body { gap: 20px; }
.home-sec__pic .shot { width: 100%; }
/* Its frame keeps the picture's place while the picture waits to be near the window (site.js), so nothing moves when it
   comes; until then it isn't shown, so it isn't asked for. */
.home-sec__pic { width: 100%; aspect-ratio: 16 / 9; container: hdpic / inline-size; }
.js .home-sec__pic:not(.is-near) > .shot { display: none; }
@container (min-width: 900px) {
  .home-sec__body:not(.home-sec__body--text) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .home-sec__body--flip:not(.home-sec__body--text) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .home-sec__body--flip .home-sec__pic { order: 2; }
}
/* LATEST NEWS and COMMUNITY: each post and each place a well with the fine frame. */
.news-list__item, .community-link { background: var(--hd-corners), var(--well); border: 0; box-shadow: var(--hd-frame); }
.news-list__meta { font: 20px/20px "Pedal Jersey 10"; color: var(--k7); letter-spacing: 1px; }
.news-list__title { color: var(--k9); }
.news-list__title:hover { color: #e8c170; }
.community-link { grid-template-columns: calc(32 * var(--u)) minmax(0, 1fr); color: var(--k9); }
.community-link:hover { color: #e8c170; background: var(--hd-corners), rgba(37, 58, 94, 0.92); }
.community-link__line { color: var(--k7); }
.faq summary { font-weight: 700; }
.faq summary::before { color: #e8c170; }

/* --- the footer: the cloud sea under the islands, then its panel ------------------------------------------ */

.footer { margin-top: 40px; }
.hdsea { height: calc(96 * var(--u)); background: url("/hd/sky/sea_clear.webp?v=99763ecde") repeat-x 50% 0 / calc(960 * var(--u)) calc(480 * var(--u)); }
.footer__panel { background: var(--hd-corners), linear-gradient(var(--hd-rim), var(--hd-rim)) 0 0 / 100% 1px no-repeat, var(--k1); box-shadow: 0 -1px 0 var(--k0); }
.footer__logo { margin: 0; }
.footrow__head:not(.btn) { color: #e8c170; }
.footrow__links li:not(:last-child)::after { color: var(--k6); }
/* The footer's rows on the grid, the logo as far under the panel's top edge as the rows are apart (the owner,
   2026-12-03: the logo stood against it). .wrap's own padding is the gutter at the sides only. */
.footer__in { color: var(--k7); font-size: 14px; padding-top: 20px; padding-bottom: 28px; }
.footer a:where(:not(.btn)) { color: var(--k8); }

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


/* The HD look's help pages (the game repo's docs/50 D16): the feature pages, CONTROLS, COMPUTER and PEDAL MANIA GO's
   frame, FREE AND PRO and its codes, SUPPORT, AGENTS, the community rules and the policies. After hd.css
   (src/hd/pages.ts), in its units: art in --u, words in CSS px at each face's own size. Colours are the game's ui.json
   recipes (key, slider, the panels' accent line) and the PRO plate's (pro.png). */

/* --- key caps (ui.json key): an ink edge with its corners stepped, navy, a lit top line and a 2 px lip --------------- */

.key {
  color: var(--k9);
  background: var(--hd-corners), linear-gradient(#4f8fba, #4f8fba) 1px 0 / calc(100% - 2px) 1px no-repeat,
    linear-gradient(#1d2c48, #1d2c48) 1px 100% / calc(100% - 2px) 2px no-repeat, #253a5e;
  border: 0;
  box-shadow: var(--hd-frame);
}
.key--inline { padding: 1px 6px 3px; margin: 0 3px; }

/* --- FREE AND PRO -------------------------------------------------------------------------------------------- */

/* PRO's plan: a bluer well with the panels' gold accent along its top. */
.plan.plan--pro { background: var(--hd-corners), linear-gradient(#e8c170, #e8c170) 1px 1px / calc(100% - 2px) 1px no-repeat, rgba(37, 58, 94, 0.55); }
/* The PRO plate (the game's pro.png badge): amber, a lit top row, the lip in two rows, a plum edge, plum words. */
.pro-badge {
  padding: 1px 5px 3px;
  font: 20px/20px "Pedal Jersey 10";
  color: #341c27;
  background: linear-gradient(#5e293e, #5e293e) 0 0 / 1px 1px no-repeat, linear-gradient(#5e293e, #5e293e) 100% 0 / 1px 1px no-repeat,
    linear-gradient(#5e293e, #5e293e) 0 100% / 1px 1px no-repeat, linear-gradient(#5e293e, #5e293e) 100% 100% / 1px 1px no-repeat,
    linear-gradient(#fccf6d, #fccf6d) 1px 0 / calc(100% - 2px) 1px no-repeat, linear-gradient(#c5654a, #c5654a) 1px 100% / calc(100% - 2px) 1px no-repeat,
    linear-gradient(#d38045, #d38045) 1px calc(100% - 1px) / calc(100% - 2px) 1px no-repeat, #e29b41;
  border: 0;
  box-shadow: 0 -2px 0 -1px #5e293e, 0 2px 0 -1px #5e293e, -2px 0 0 -1px #5e293e, 2px 0 0 -1px #5e293e, var(--hd-drop);
}
.pro-badge--big { padding: 2px 9px 5px; font: 34px/34px "Pedal Jersey 20"; }

/* --- COMPUTER and PEDAL MANIA GO: screens in a row ------------------------------------------------------------ */

/* Each shot whole in a 1 px ink edge: Computer's HD screens at half a point an art unit in a row that scrolls, and
   from 1,200 px six across the panel, each filling its share (the owner, 2026-12-03); Go's watch shots (its own game,
   not HD) as they are, 211 px. */
.phone-shots .shot { width: calc(220 * var(--u) + 2px); max-width: none; height: auto; }
@media (min-width: 1200px) {
  .phone-shots:not(.phone-shots--watch) ul { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: auto; }
  .phone-shots:not(.phone-shots--watch) li { width: auto; }
  .phone-shots:not(.phone-shots--watch) .shot { width: 100%; }
}
.phone-shots--watch .shot { width: 213px; image-rendering: pixelated; }
.phone-shots li { width: calc(220 * var(--u) + 2px); }
.phone-shots--watch li { width: 213px; }
/* A caption wraps under its screen where the screen is narrow (a 3× phone), never into the next one's. */
.phone-shots figcaption { margin: 8px 0 0; font: 16px/24px var(--pixel); color: #e8c170; white-space: normal; text-wrap: balance; }
/* Go's icon, as it is, in the fine edge. */
.go-icon { border: 0; box-shadow: 0 0 0 1px var(--k0); }

/* --- WHAT YOU NEED: how a 10% climb feels ------------------------------------------------------------------------- */

/* The drawing at one CSS pixel its pixel, and under it the game's slider (ui.json slider): a 4 px ink track, the gold
   fill 2 px in it, the kit's knob. */
.feel { width: 200px; margin: 0 auto; border: 0; box-shadow: 0 0 0 1px var(--k0); }
.slider { width: 200px; height: calc(16 * var(--u)); margin: 12px auto 4px; background: linear-gradient(var(--k0), var(--k0)) 0 calc(6 * var(--u)) / 100% calc(4 * var(--u)) no-repeat; border: 0; }
.slider span { inset: calc(7 * var(--u)) 50% calc(7 * var(--u)) var(--u); background: #e8c170; box-shadow: none; }
.slider i {
  left: calc(50% - 6 * var(--u)); top: calc(-2 * var(--u)); width: calc(13 * var(--u)); height: calc(18 * var(--u));
  border: 0; box-shadow: none; image-rendering: pixelated;
  background: url("/hd/kit/kit.png?v=99763ecde") calc(-202 * var(--u)) calc(-56 * var(--u)) / calc(256 * var(--u)) calc(93 * var(--u)) no-repeat;
}

/* --- THE PAIN CAVE: its places, each shot whole at half size with its words beside it -------------------------------- */

/* Each place's picture filling its share: beside its words from 900 px, the three side by side from 1,500. */
.places { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.places .shot { width: 100%; max-width: 100%; }
@media (min-width: 900px) {
  .places { grid-template-columns: minmax(0, 1fr); }
  .places figure { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .places figcaption { margin-top: 0; }
}
@media (min-width: 1500px) {
  .places { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .places figure { display: block; }
  .places figcaption { margin-top: 10px; }
}
.place__slot { border: 0; box-shadow: 0 0 0 1px var(--k0); }
.place__about { font-size: 15px; color: var(--k8); }

/* --- AGENTS: the address and the snippets in wells ------------------------------------------------------------- */

.agents-url, .snippet { background: var(--hd-corners), linear-gradient(var(--k2), var(--k2)) 1px 1px / calc(100% - 2px) 1px no-repeat, rgba(9, 10, 20, 0.9); border: 0; box-shadow: var(--hd-frame); }

/* --- the policies: IN SHORT in a well ------------------------------------------------------------------------------ */

.legal__summary { background: var(--hd-corners), var(--well); border: 0; box-shadow: var(--hd-frame); }
.legal__contents li { color: var(--k7); }

/* Routes and racing in the game's HD look (the game repo's docs/50 D16): /routes and its tabs, the route pages, the
   track, crits, raceways and cyclocross, Track Cups, events, races and rooms, leagues, the ranking, the island and
   the world championships, and workouts. After hd.css (src/hd/pages.ts), in the HD entries only; production never
   has it.

   - Charts (src/views/hd/charts.ts, maps.ts) are drawn at 1×: an art pixel a CSS pixel, the size their attributes
     give, never stretched to fit. Where a box is narrower, a chart shrinks to it rather than push the page sideways.
   - The frame of a chart is a pixel of ink, as the HD panels' fine frame. */

/* --- charts at 1× ------------------------------------------------------------------------------------------ */

.hd :is(.profile--hd, .minimap--hd, .workout-chart--hd, .surface-bar--hd, .oval--hd, .crit-map--hd) {
  width: auto;
  max-width: 100%;
  height: auto;
}
.hd :is(.profile--hd, .minimap--hd, .workout-chart--hd) { border: 1px solid var(--k0); box-sizing: border-box; }
.hd .profile--hd { display: block; }
.hd .numtag { vertical-align: middle; }

/* A chart drawn for each room (src/views/hd/racing.ts HD_AT): the page's full width, 700 to 1151 px, a phone; and
   for a chart as wide as the page, 1,700 px and 2,300 px windows, where it has a drawing for them. */
.hd :is(.hd-at-m, .hd-at-s, .hd-at-xl, .hd-at-xxl) { display: none; }
@media (max-width: 1151px) { .hd .hd-at-l { display: none; } .hd .hd-at-m { display: block; } }
@media (max-width: 699px) { .hd .hd-at-m { display: none; } .hd .hd-at-s { display: block; } }
@media (min-width: 1700px) { .hd :is(.hd-at-l, .wide-only):has(~ .hd-at-xl) { display: none; } .hd .hd-at-xl { display: block; } }
@media (min-width: 2300px) { .hd .hd-at-xl:has(~ .hd-at-xxl) { display: none; } .hd .hd-at-xxl { display: block; } }

/* --- routes and route pages ------------------------------------------------------------------------------- */

/* A velodrome and the island cups' rules: panels of their own (80 % ink, the fine frame, a lit top-left edge), where
   the classic site edges them with 2 px of ink. (A route's card is hd.css's: every page has them.) */
.hd :is(.venue, .island-cups__rules) {
  background: var(--hd-corners), var(--hd-rim-tl), var(--panel);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}
/* Pictures on a card or a panel: a pixel of ink round them, as the HD shots have. */
.hd :is(.card__oval, .card__map) svg, .hd .crit-panel svg { border: 1px solid var(--k0); }
.hd .card__oval svg { background: var(--k1); }

/* A group's count stands on its heading's foot, not on the drawn words' box. */
.hd .group__head { align-items: flex-end; }
.hd .group__head > .outlined { margin-bottom: 12px; }

/* The champion's bands: a pixel of ink, not the classic 2 px. */
.hd .route-champs .bands { border-width: 1px; }

/* Words straight on the sky sit on a strip of panel, as the crumbs do: the light sky is too pale for them. */
.hd :is(.event-blurb, .route-blurb, .route-champs, .route-cx) { text-shadow: none; }
.hd :is(.event-blurb, .route-blurb, .route-cx) { display: table; padding: 2px 8px; background: var(--panel); }
.hd .route-champs { width: fit-content; padding: 2px 8px; background: var(--panel); }

/* A blurb in caps (a card's, a velodrome's, a format's) is the body role, Pedal Jersey 10: the classic's 16 px caps
   would be Jersey 15 at 27 px, a heading's weight, for a line or three of words. */
.hd :is(.venue__blurb, .format__blurb, .venue__facts, .races__facts) {
  font: 20px/20px "Pedal Jersey 10";
  letter-spacing: 0;
}
.hd .format__blurb { color: var(--k8); }

/* --- cups, events, rooms, leagues, the ranking and workouts ----------------------------------------------- */

/* A round, a match of a bracket, the next session, a race's picture and the rules to agree to: panels of their own. */
.hd :is(.round, .match, .next-session, .race-art-panel) {
  background: var(--hd-corners), var(--hd-rim-tl), var(--panel);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}
.hd .round:hover {
  color: var(--k9);
  background: var(--hd-corners), linear-gradient(#73bed3, #73bed3) 1px 0 / calc(100% - 2px) 1px no-repeat, rgba(37, 58, 94, 0.92);
}
.hd .round:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0); }
.hd .round[aria-current] { box-shadow: var(--hd-frame), inset 0 2px 0 #e8c170, var(--hd-drop); }
.hd .race-art svg { border: 1px solid var(--k0); }
/* Wells in a panel, framed a pixel. */
.hd :is(.rank-box > div, .ranking-empty, .round-row, .template-pick__card, .private-ride, .room-empty, .podium-panel) {
  border: 0;
  box-shadow: var(--hd-frame);
}
.hd :is(.rank-box > div, .ranking-empty, .round-row, .template-pick__card, .private-ride) { background: var(--hd-corners), var(--well); }

/* Seats, pips, bars and meters: a pixel of ink and a pixel of light, not the classic 2 px. */
.hd :is(.seats__pips i, .pips li, .best-bars__bar, .specialties__bar > span, .zone-list__bar, .meter, .match__heats i, .cup-panel__n, .primes) { border-width: 1px; }
.hd .live-dot { border-width: 1px; width: 10px; height: 10px; }
.hd .seats__pips i { width: 8px; height: 14px; }
.hd :is(.seats__pips i.is-on, .seats.is-full .seats__pips i, .meter > span, .specialties__bar > span, .best-bars__bar > span) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.hd .results tfoot :is(th, td) { border-top-width: 1px; }
.hd .results tr.is-split td { border-top: 1px dashed #577277; }

/* Small words in the body role (Pedal Jersey 10): a zone's tag, a rider's type in a table, a room card's labels. */
.hd :is(.zone-tag, .results .type-badge__word, .room-card__label) { font: 20px/20px "Pedal Jersey 10"; letter-spacing: 0; }

/* --- the island ------------------------------------------------------------------------------------------- */

/* An island without an HD map yet (the HD ones are hd.css's, .island-map--hd) keeps the classic one: a classic pixel two CSS pixels,
   as the classic art stands on the HD grid, never blown up further; a wider map a pixel each. Its pins scale with it. */
.hd .island-map:not(.island-map--hd) .island-map__frame { --k: 2; --mid: 1px; border-width: 1px; }
.hd .island-map--wide:not(.island-map--hd) .island-map__frame { --k: 1; --mid: 0px; }
/* A pin is drawn 10 px at 1× (a pixel of ink round its colour, a lit top on a road's), on its start's pixel, in a link
   24 px square round it, so a finger finds it. */
.hd .island-map:not(.island-map--hd) .pin:not(.pin--key) {
  left: calc(var(--x) * var(--k) * 1px + var(--mid) - 12px);
  top: calc(var(--y) * var(--k) * 1px + var(--mid) - 12px);
  width: 24px;
  height: 24px;
  border: 0;
  background: none;
  box-shadow: none;
  outline: 0;
}
.hd .island-map:not(.island-map--hd) .pin:not(.pin--key)::before, .hd .island-map:not(.island-map--hd) .pin--key {
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 1px solid var(--k0);
  background: #e8c170;
  box-shadow: inset 0 1px 0 #ebede9;
}
.hd .island-map:not(.island-map--hd) .pin:not(.pin--key)::before { content: ""; position: absolute; left: 7px; top: 7px; }
.hd .island-map:not(.island-map--hd) .pin--key { vertical-align: -1px; }
.hd .island-map:not(.island-map--hd) .pin--road:not(.pin--key)::before, .hd .island-map:not(.island-map--hd) .pin--key.pin--road { background: #73bed3; box-shadow: inset 0 1px 0 #a4dddb; }
.hd .island-map:not(.island-map--hd) .pin:not(.pin--key):is(:hover, .is-here)::before { background: #ebede9; }
.hd .island-map:not(.island-map--hd) .pin.is-here::before { outline: 2px solid #cf573c; }
.hd .island-map:not(.island-map--hd) .pin:not(.pin--key):focus-visible { outline: none; }
.hd .island-map:not(.island-map--hd) .pin:not(.pin--key):focus-visible::before { outline: 2px solid var(--focus); outline-offset: 1px; }

/* The HD look's account pages (the game repo's docs/50 D16): signing in, linking a device, the forms' notes, /me and
   its settings, and your own workouts. After hd.css and help.css (src/hd/pages.ts), in their units: art in --u, words
   in CSS px. Colours are the game's ui.json recipes (toast, field). Cards are the route pages' (racing.css). */

/* --- notes on a form (ui.json toast): a HUD panel, an accent along its top, green for done and red for a setback --- */

.notice, .errors {
  padding: 12px 16px 12px;
  color: var(--k9);
  border: 0;
  box-shadow: var(--hd-frame), var(--hd-drop);
}
.notice { background: var(--hd-corners), linear-gradient(#75a743, #75a743) 1px 1px / calc(100% - 2px) 2px no-repeat, var(--hd-rim-tl), var(--panel); }
.errors, .notice.notice--removed { background: var(--hd-corners), linear-gradient(#cf573c, #cf573c) 1px 1px / calc(100% - 2px) 2px no-repeat, var(--hd-rim-tl), var(--panel); }
/* Development's code, in a well with a dotted edge (the fake only). */
.dev-hint { border: 1px dashed var(--k5); background: var(--well); color: var(--k8); }

/* --- fields -------------------------------------------------------------------------------------------------- */

/* The username's @: a key on the field's left, the field's blue edge round both. */
.input-at__at { color: #e8c170; background: linear-gradient(#4f8fba, #4f8fba) 0 0 / 100% 1px no-repeat, #253a5e; border: 1px solid #3c5e8b; border-right: 0; }
/* A file field's button, as the game's quiet button; the file's name beside it in the field's words. */
.input[type="file"] { padding: 6px; }
.input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 4px 12px;
  font: 16px/24px var(--pixel);
  color: var(--k9);
  background: linear-gradient(#4f8fba, #4f8fba) 0 0 / 100% 1px no-repeat, #253a5e;
  border: 1px solid var(--k0);
  cursor: pointer;
}
.input[type="file"]::file-selector-button:hover { background: linear-gradient(#73bed3, #73bed3) 0 0 / 100% 1px no-repeat, #3c5e8b; }
/* A workout's text format, in the field's well. */
pre.code { background: var(--hd-corners), linear-gradient(var(--k2), var(--k2)) 1px 1px / calc(100% - 2px) 1px no-repeat, rgba(9, 10, 20, 0.9); border: 0; box-shadow: var(--hd-frame); }

/* --- /me: your flag on its pole, the HD flag (27 × 18) at one art unit, waving a column at a time ------------------ */

.flagpole { width: calc(32 * var(--u)); height: calc(60 * var(--u)); }
.flagpole__pole { left: var(--u); top: calc(2 * var(--u)); width: var(--u); background: var(--k8); box-shadow: var(--u) 0 var(--k6); }
.flagpole__finial { width: calc(3 * var(--u)); height: calc(3 * var(--u)); background: #e8c170; }
.flagpole__cloth { left: calc(3 * var(--u)); top: calc(3 * var(--u)); }
/* 18 columns of a 27-wide flag: each a column and a half of its pixels, so the flag is whole at its own size. */
.flagpole__cloth i {
  width: calc(1.5 * var(--u));
  height: calc(18 * var(--u));
  background-image: url("/hd/flags/flags.png?v=99763ecde");
  background-size: calc(432 * var(--u)) calc(234 * var(--u));
  background-position: calc((var(--fx) / 18 * 27 + var(--c) * 1.5) * var(--u) * -1) calc(var(--fy) / 12 * 18 * var(--u) * -1);
  box-shadow: 0 calc(-1 * var(--u)) 0 var(--k0), 0 var(--u) 0 var(--k0);
  animation-name: hd-wave;
}
.flagpole__cloth i:last-child { box-shadow: 0 calc(-1 * var(--u)) 0 var(--k0), 0 var(--u) 0 var(--k0), var(--u) 0 0 var(--k0); }
.flagpole__cloth i:first-child { box-shadow: 0 calc(-1 * var(--u)) 0 var(--k0), 0 var(--u) 0 var(--k0), calc(-1 * var(--u)) 0 0 var(--k0); }
@keyframes hd-wave {
  0% { transform: translateY(0); filter: none; }
  8.3% { transform: translateY(calc(var(--amp) * var(--u))); }
  25% { filter: brightness(0.86); }
  41.7% { transform: translateY(0); }
  58.3% { transform: translateY(calc(var(--amp) * var(--u) * -1)); }
  75% { filter: none; }
  91.7% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .flagpole__cloth i { animation: none; } }

/* The HD look's community pages (the game repo's docs/50 D16): riders and their pages, rides, clubs, group rides and
   their invites, the SHARE menu, and the site's errors. After hd.css (src/hd/pages.ts), in its units: art in --u,
   words in CSS px. Other cards are the route pages' (racing.css); a club's card is drawn the same way here. Club
   emblems stay the classic ones, at a whole number of CSS pixels a pixel, until the game redraws them. */

/* A page's small label over its title (GROUP RIDE, INVITE) starts where the title does. */
main.page .kicker { text-align: left; }

/* --- a club's card: a panel of its own (80 % ink, the fine frame, a lit top-left edge), bluer with a gold edge on hover */

.card.club-card { background: var(--hd-corners), var(--hd-rim-tl), var(--panel); border: 0; box-shadow: var(--hd-frame), var(--hd-drop); }
.card.club-card:hover { color: var(--k9); background: var(--hd-corners), linear-gradient(#73bed3, #73bed3) 1px 0 / calc(100% - 2px) 1px no-repeat, rgba(37, 58, 94, 0.92); }
.card.club-card:is(:hover, :focus-visible)::before { left: 1px; top: 1px; bottom: 1px; width: 3px; background: #e8c170; }
.card.club-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0); }
.club-card .card__name { font-family: "Pedal Jersey at 16"; }

/* --- a group ride's live dot: a pixel of ink round it (the seats are racing.css's) --------------------------------- */

.live-dot { border: 0; box-shadow: 0 0 0 1px var(--k0); }

/* --- SHARE: a menu panel (ui.json panel_menu), its links the game's quiet buttons --------------------------------- */

.share[open] > summary { color: #e8c170; }
.share__menu { background: var(--hd-corners), var(--hd-rim-tl), rgba(23, 32, 56, 0.96); border: 0; box-shadow: var(--hd-frame), var(--hd-drop); }
.share__text { color: var(--k8); }
.share__label { color: #e8c170; }
.share__link {
  color: var(--k9);
  background: var(--hd-corners), linear-gradient(#4f8fba, #4f8fba) 1px 0 / calc(100% - 2px) 1px no-repeat, linear-gradient(#1f2f4e, #1f2f4e) 1px 100% / calc(100% - 2px) 1px no-repeat, #253a5e;
  border: 0;
  box-shadow: var(--hd-frame);
}
.share__link:hover { color: var(--k9); background: var(--hd-corners), linear-gradient(#73bed3, #73bed3) 1px 0 / calc(100% - 2px) 1px no-repeat, #3c5e8b; }
.share__link:focus-visible { color: #e8c170; box-shadow: 0 0 0 2px var(--focus), 0 0 0 3px var(--k0); }
.share__link:active { color: #e8c170; background: var(--hd-corners), linear-gradient(var(--k0), var(--k0)) 1px 1px / calc(100% - 2px) 1px no-repeat, #172038; box-shadow: var(--hd-frame); }

/* An admin's question about a member (ASK): the same menu panel, its red accent along the top. */
.ask__menu { background: var(--hd-corners), linear-gradient(#cf573c, #cf573c) 1px 1px / calc(100% - 2px) 2px no-repeat, var(--hd-rim-tl), rgba(23, 32, 56, 0.96); border: 0; box-shadow: var(--hd-frame), var(--hd-drop); }
.ask__text { color: var(--k8); }
/* A club's invite link, in a field's well. */
.invite__link code { background: var(--hd-corners), rgba(9, 10, 20, 0.9); border: 0; box-shadow: var(--hd-frame); color: var(--k8); }

/* --- a rider's card: the ratings in the fine frame, big numbers in the faces of their size --------------------- */

.rating__card { border: 0; background: var(--hd-corners), #151d33; box-shadow: var(--hd-frame), inset 0 0 0 1px var(--type), inset 0 0 0 2px var(--k0); }
.ovr { border: 0; background: var(--hd-corners), linear-gradient(var(--type), var(--type)) 1px 0 / calc(100% - 2px) 1px no-repeat, var(--k1); box-shadow: var(--hd-frame); }
.ovr__label { font: 20px/20px "Pedal Jersey 10"; }
.ovr__num { font: 41px/44px "Pedal Jersey 25"; text-shadow: -1px -1px 0 var(--k0), 0 -1px 0 var(--k0), 1px -1px 0 var(--k0), -1px 0 0 var(--k0), 1px 0 0 var(--k0), -1px 1px 0 var(--k0), 0 1px 0 var(--k0), 1px 1px 0 var(--k0); }
.ovr--none .ovr__num { text-shadow: none; }
.rank-box__num { font-family: "Pedal Jersey at 32"; }
@media (max-width: 559px) { .rank-box__num { font-family: "Pedal Jersey at 24"; } }
.results tfoot th, .results tfoot td { border-top: 1px solid var(--k0); }

/* --- a heading with a count beside it (OPEN RIDES 4, CLUB RIDES 1): the words in the face of the heading's size ---- */

.heading .muted.small { font: 20px/20px "Pedal Jersey 10"; }

/* --- words straight on the sky sit on a strip of panel, as the page's own title line does (hd.css) -------------- */

.hint.outlined-text, .report-link.outlined-text { padding: 2px 8px; background: var(--panel); text-shadow: none; color: var(--k8); }
.report-link.outlined-text { display: table; margin-left: auto; }
.report-link.outlined-text a:where(:not(.btn)) { color: var(--k8); }

/* The HD look's admin pages (the game repo's docs/50 D16): the frame and the tables are hd.css's; the chatter
   queue's boxes get the fine frame. After hd.css (src/hd/pages.ts). */

.chatter-card { background: var(--hd-corners), var(--well); border: 0; box-shadow: var(--hd-frame); }
.chatter-preview { background: var(--hd-corners), linear-gradient(var(--k4), var(--k4)) 1px 0 / calc(100% - 2px) 1px no-repeat, var(--k3); border: 0; box-shadow: var(--hd-frame); }
