/* Sign-in, "Surface close-up". The page is a few square metres of the home
   straight at the finish line, seen from straight above. The track is
   measured in one unit, --P, the lane pitch (1.22 m); a lane line is 5 cm,
   so --t = P / 24.4. Runners come up the page: the painted lane number,
   then the finish line, then the heading. Every step of the sign-in is
   written on a sheet of paper lying in lane 6, over its number. */

:root { --grain: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320"%3E%3Cfilter id="g" x="0" y="0" width="100%25" height="100%25" color-interpolation-filters="sRGB"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="11" stitchTiles="stitch" result="fine"/%3E%3CfeColorMatrix in="fine" type="matrix" result="dark" values="0 0 0 0 0.08 0 0 0 0 0 0 0 0 0 0 4.2 0 0 0 -2.85"/%3E%3CfeColorMatrix in="fine" type="matrix" result="light" values="0 0 0 0 1 0 0 0 0 0.9 0 0 0 0 0.82 0 -3.6 0 0 1.12"/%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.018" numOctaves="2" seed="4" stitchTiles="stitch" result="coarse"/%3E%3CfeColorMatrix in="coarse" type="matrix" result="mottle" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.16 0.11"/%3E%3CfeMerge%3E%3CfeMergeNode in="mottle"/%3E%3CfeMergeNode in="dark"/%3E%3CfeMergeNode in="light"/%3E%3C/feMerge%3E%3C/filter%3E%3Crect width="320" height="320" filter="url(%23g)"/%3E%3C/svg%3E'); }

/* Archivo in two subsets: basic Latin, and Latin Extended for ą č ę ė į
   š ų ū ž. The browser fetches each only for the letters in its range. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --tartan: #a9341f;
  --paint: #f5f1e8;                 /* 5.8:1 on the tartan */
  /* the sheet: near-black by default (the owner's pick), paper only when
     someone has chosen the light theme in the archive */
  --paper: #141518;
  --paper-edge: rgb(255 255 255 / .09);  /* the lit top edge */
  --field: #0d0e10;                 /* fields sit a step darker than the sheet */
  --field-hover: #101114;
  --ink: #f1eee8;
  --ink-2: #c3c5cb;
  --ink-3: #9a9ea6;
  --edge: #666a72;                  /* field border: 3.4:1 on the sheet, 3.6:1 on the field */
  --edge-hover: #7d828b;
  --rule: #2a2d33;
  --rule-2: #4a4e56;
  --link: #f08a73;
  --err: #ff8f78;
  --go: #f5f1e8;                    /* the one strong button */
  --on-go: #16171b;
  --go-hover: #a9341f;              /* hover paints it track red, 6.2:1 */
  --go-active: #8a2a18;
  --on-go-hover: #ffffff;
  --focus: #f5f1e8;
  --meter-off: #34373d;
  --meter-on: #f08a73;
  --shade: rgb(0 0 0 / .5);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", "Liberation Sans Narrow", sans-serif-condensed, sans-serif;
  color-scheme: dark;

  --u: 16px;

  /* phone: lane 5 fills most of the width */
  --P: 76vw;
  --t: max(3px, calc(var(--P) / 24.4));
  --a0: 10vw;                        /* left edge of the 4|5 lane line */
  --fy0: 70px;                       /* top edge of the finish line */
  /* the intro moves the track box and shifts these to match (see below) */
  --a: var(--a0);
  --fy: var(--fy0);
  --st: clamp(196px, 30svh, 256px);  /* where the sheet starts */
}
/* The track stays red in every theme. The archive's light theme, once
   chosen, turns the sheet into paper; every other case keeps it dark. */
:root[data-theme="light"] {
  --paper: #fbfaf6; --paper-edge: rgb(255 255 255 / .6);
  --field: #ffffff; --field-hover: #ffffff;
  --ink: #16171b; --ink-2: #43464d; --ink-3: #5a5d65;
  --edge: #767a82; --edge-hover: #43464d;
  --rule: #ddd7cb; --rule-2: #b3ab9b;
  --link: #962b18; --err: #a3301c;
  --go: #16171b; --on-go: #ffffff; --go-hover: #a9341f; --go-active: #8a2a18; --on-go-hover: #ffffff;
  --focus: #16171b; --meter-off: #c9c2b4; --meter-on: #a9341f;
  --shade: rgb(0 0 0 / .16);
  color-scheme: light;
}
:root[data-theme="oled"] { --paper: #050505; --field: #121214; --field-hover: #16171a; --edge: #6f737b; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--tartan);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }

/* flow-root: overflow: clip alone would let the sheet's top margin collapse
   through and push the whole track down */
.page { position: relative; display: flow-root; min-height: 100vh; min-height: 100svh; overflow: hidden; overflow: clip; }

/* ---------------------------------------------------------------- track */

/* The surface is its own layer (lines, numbers, grain), apart from the
   content, so an intro can be attached to it later. Nine lines bound lanes
   1-8; only those near the content are ever on screen. */
.track {
  position: absolute; inset: 0;
  --line: linear-gradient(var(--paint) 0 0);
  background:
    var(--line) calc(var(--a) - 4 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - 3 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - 2 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) var(--a) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 2 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 3 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 4 * var(--P)) 0 / var(--t) 100% no-repeat,
    linear-gradient(var(--paint) 0 0) 0 var(--fy) / 100% var(--t) no-repeat,
    var(--tartan);
}
/* rubber granules over everything painted, so the paint sits in the surface */
.track::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grain) 0 0 / 320px 320px;
  opacity: .55;
}
/* lane numbers: centred in their lane, upright for a runner coming up the
   page, painted just before the finish line, all on one row */
.num {
  --lane: 0;               /* lane 5 = 0, lane 6 = 1, lane 4 = -1 ... */
  position: absolute;
  left: calc(var(--a) + var(--lane) * var(--P) + var(--t) + (var(--P) - var(--t)) / 2);
  top: calc(var(--fy) + var(--t) + var(--P) * .09);
  transform: translateX(-50%);
  color: var(--paint);
  font: 800 calc(var(--P) * 1.04)/1 var(--display);
  font-stretch: 75%;
  text-box: trim-both cap alphabetic;
}
.n6 { --lane: 1; }
.n1 { --lane: -4; } .n2 { --lane: -3; } .n3 { --lane: -2; } .n4 { --lane: -1; } .n7 { --lane: 2; } .n8 { --lane: 3; }

/* ---------------------------------------------------------------- brand
   Mark + name + tag are one block: a new name or logo replaces it whole. */

.brand {
  position: absolute; z-index: 1;
  top: 13px; left: calc(var(--a) + var(--t) + 14px);
  display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px;
  min-height: 44px;
  color: var(--paint); text-decoration: none;
}
.brand:focus-visible { outline-color: var(--paint); outline-offset: 4px; }
/* the logo: one inline SVG drawn in currentColor, cut-outs show the track */
.brand .logo { display: block; height: 40px; width: auto; aspect-ratio: 2734 / 990; color: var(--paint); grid-row: span 2; }   /* 28 px cap height */
.brand .tag { grid-column: 2; font-size: 12.5px; line-height: 1.2; font-weight: 500; }
/* phones: the tagline would crowd the lane line, the name stands alone */
@media (max-width: 599px) { .brand .tag { display: none; } }

/* ------------------------------------------------- paper (phone layout) */

.main {
  position: relative;
  margin: var(--st) 12px 0;
  min-height: calc(100svh - var(--st));
  padding: 22px 20px 0;
  background: var(--paper);
  display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 var(--paper-edge), 0 0 0 1px rgb(30 4 0 / .3), 0 2px 0 rgb(30 4 0 / .25), 0 18px 40px -18px rgb(30 4 0 / .6);
}
.intro, .sheet { display: contents; }
.step { order: 1; display: flex; flex-direction: column; margin: 18px 0 16px; font-size: var(--u); }
.facts, .source { order: 2; }
.foot { order: 3; }

h1 {
  margin: 0;
  font: 820 31px/1 var(--display);
  font-stretch: 64%;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h1:focus { outline: none; }
.lede { margin: 10px 0 0; font-size: 16px; color: var(--ink-2); text-wrap: pretty; overflow-wrap: anywhere; }
.lede b { color: var(--ink); font-weight: 650; }
.facts { margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); text-align: center; text-wrap: balance; }
.source { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); text-align: center; text-wrap: balance; }

/* ------------------------------------------------------------------ forms
   One spacing scale, in --u (16 px phone, up to 17.3 px desktop):
   .5u label to field, 1.25u between fields, 1.75u before the button,
   1.5u around the "arba" rule, 1u before the small print. */

form { display: grid; gap: calc(var(--u) * 1.25); margin: 0; }
form > .btn-go { margin-top: calc(var(--u) * .5); }
.field { display: grid; gap: calc(var(--u) * .5); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
label { font-size: calc(var(--u) * .875); font-weight: 650; letter-spacing: .01em; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; height: calc(var(--u) * 3); padding: 0 calc(var(--u) * .875);
  border: 1px solid var(--edge); border-radius: 0;
  background: var(--field); color: var(--ink);
  font: calc(var(--u) * 1.0625) var(--sans);
  transition: border-color .12s, box-shadow .12s;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover { border-color: var(--edge-hover); background: var(--field-hover); }
/* focus: the border itself turns paint-white and thickens to 2 px, no
   second ring around it */
input[type="text"]:focus-visible, input[type="email"]:focus-visible, input[type="password"]:focus-visible {
  outline: none; border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus);
}
input[aria-invalid="true"] { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.note { margin: 0 0 calc(var(--u) * 1.25); padding-left: 12px; border-left: 3px solid var(--tartan); font-size: calc(var(--u) * .875); color: var(--ink-2); text-wrap: pretty; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; text-decoration: none; }
.btn-go {
  min-height: calc(var(--u) * 3.25); padding: 0 16px; border: 0;
  background: var(--go); color: var(--on-go);
  font: 800 calc(var(--u) * 1.125)/1 var(--display); font-stretch: 78%;
  letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .12s;
}
/* hover only where a pointer hovers: a phone keeps :hover after a tap, and a
   red button after a failed sign-in would read as an error */
@media (hover: hover) { .btn-go:not(:disabled):hover { background: var(--go-hover); color: var(--on-go-hover); } }
.btn-go:active { background: var(--go-active); color: var(--on-go-hover); transform: translateY(1px); }
/* the whole form is switched off until the opening */
input:disabled, input:disabled:hover {
  border-color: var(--rule-2); background: transparent; box-shadow: none; cursor: not-allowed;
}
label:has(+ input:disabled) { color: var(--ink-3); }
button:disabled { cursor: not-allowed; }
.btn-go:disabled, .btn-go:disabled:hover, .btn-go:disabled:active {
  background: var(--rule); color: var(--ink-2); transform: none;
}

/* the other ways in, under a dotted rule */
.alt { display: grid; }
.or {
  display: flex; align-items: center; gap: 14px;
  margin: calc(var(--u) * 1.5) 0;
  font-size: calc(var(--u) * .75); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.or::before, .or::after { content: ""; flex: 1; border-top: 2px dotted var(--rule-2); }
.btn-google {
  min-height: calc(var(--u) * 3); padding: 0 16px;
  border: 1px solid var(--rule-2); background: transparent;
  color: var(--ink); font-size: calc(var(--u) * .9375); font-weight: 600;
  transition: border-color .12s, background-color .12s;
}
.btn-google:disabled { color: var(--ink-3); border-color: var(--rule); }
.btn-google:disabled svg { filter: grayscale(1); opacity: .45; }
@media (hover: hover) { .btn-google:not(:disabled):hover { border-color: var(--edge-hover); background: rgb(127 127 127 / .06); } }
.btn-google svg { width: calc(var(--u) * 1.125); height: calc(var(--u) * 1.125); flex: none; }

.signup { margin: calc(var(--u) * .75) 0 0; font-size: calc(var(--u) * .875); color: var(--ink-2); text-align: center; text-wrap: balance; }

.foot {
  margin-top: 0; padding: calc(var(--u) * 1) 0 calc(var(--u) * 1.25);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px calc(var(--u) * 1.5);
  font-size: calc(var(--u) * .75);
}
.foot { color: var(--ink-3); }


/* tablets and short wide windows: the same column, centred in lane 5 */
@media (min-width: 600px) {
  :root { --P: min(76vw, 560px); --a0: calc(50vw - (var(--P) + var(--t)) / 2); }
  .main { width: min(100% - 24px, 520px); margin-inline: auto; padding: 28px 32px 0; }
  h1 { font-size: 40px; }
}

/* ============================================================== desktop */
@media (min-width: 960px) and (min-height: 600px) and (min-aspect-ratio: 5/4) {
  :root {
    /* The content keeps the size it has at 1440 x 900 (the approved picture)
       on any larger window: it sits in a frame at most 1440 px wide, centred,
       and only the surface around it grows. */
    --brandh: 52px;
    --fw: min(100vw, 1440px);
    --fx: calc((100vw - var(--fw)) / 2);
    --u: clamp(16px, calc(4px + .36vw + .9vh), 17.3px);
    --P: calc(var(--fw) / 2);
    --a0: calc(var(--fx) + var(--fw) * .03);
    --top: calc(clamp(28px, 5.6vh, 50px) + max(0px, (100vh - 1000px) / 3));
    --pad: clamp(32px, calc(var(--fw) * .039), 56px);
    --lane5: calc(var(--a) + var(--t) + var(--pad));
    --sw: clamp(400px, calc(var(--u) * 28), 560px);
    --h1: min(calc(var(--fw) * .064), 9.4vh, 85px);
    --gap: clamp(24px, 4.4vh, 44px);
    /* centre of lane 6 */
    --c6: calc(var(--a) + var(--P) + var(--t) + (var(--P) - var(--t)) / 2);
    /* the finish line: low enough for the brand, a two-line heading and
       three lines under it; otherwise worked back from the login sheet
       (about 36 u tall), whose bottom edge then covers the top of the 6 */
    --fy0: max(calc(var(--top) + var(--u) * 36 - var(--P) * .25 - var(--t)),
              calc(var(--top) + var(--brandh) + 24px + 1.8 * var(--h1) + 96px + var(--gap)));
  }
  .page { height: 100vh; height: 100svh; }

  .brand { top: var(--top); left: var(--lane5); grid-template-columns: auto auto auto; }
  .brand .logo { height: 52px; grid-row: auto; }   /* 36 px cap height: the lane lines show */
  .brand .tag { grid-column: 3; margin: 0 0 0 4px; padding-left: 14px; border-left: 1.5px solid currentColor; font-size: 14px; line-height: 1.1; font-weight: 400; }

  .main { position: absolute; inset: 0; width: auto; margin: 0; min-height: 0; padding: 0; background: none; box-shadow: none; display: block; }

  /* painted on the track, beyond the finish line */
  .intro {
    position: absolute; display: flex; flex-direction: column; justify-content: safe flex-end;
    left: var(--lane5);
    width: min(calc(var(--P) - var(--t) - 2 * var(--pad)), calc(var(--c6) - var(--sw) / 2 - var(--lane5) - 32px));
    top: calc(var(--top) + var(--brandh) + 24px);
    bottom: calc(100% - var(--fy) + var(--gap));
    color: var(--paint);
  }
  h1 { font-size: var(--h1); line-height: .9; font-stretch: 62%; font-weight: 850; }
  h1.long { font-size: calc(var(--h1) * .72); }
  .lede { margin-top: clamp(14px, 2.4vh, 24px); max-width: 38ch; font-size: 17px; line-height: 1.45; font-weight: 500; color: var(--paint); }
  .lede b { color: var(--paint); font-weight: 750; }
  .facts {
    margin: clamp(14px, 2.4vh, 24px) 0 0; padding: 0; border: 0; max-width: 36ch;
    font-size: 17px; line-height: 1.45; font-weight: 500; color: var(--paint); text-align: left;
  }
  .source { margin-top: 6px; max-width: 46ch; font-size: 13px; color: var(--paint); text-align: left; opacity: 1; }

  /* the sheet is as tall as its step; a step taller than the window scrolls
     inside it, with a shadow at the edge that still has more */
  .sheet {
    position: absolute; display: flex; flex-direction: column;
    top: var(--top);
    max-height: calc(100% - var(--top) - 12px);
    left: max(16px, min(calc(var(--c6) - var(--sw) / 2), calc(var(--fx) + var(--fw) - var(--sw) - 24px)));
    width: var(--sw);
    padding: calc(var(--u) * 2.5) calc(var(--u) * 2.5) 0;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    background:
      linear-gradient(var(--paper) 30%, transparent) center top / 100% 40px no-repeat,
      linear-gradient(transparent, var(--paper) 70%) center bottom / 100% 40px no-repeat,
      radial-gradient(farthest-side at 50% 0, var(--shade), transparent) center top / 100% 14px no-repeat,
      radial-gradient(farthest-side at 50% 100%, var(--shade), transparent) center bottom / 100% 14px no-repeat,
      var(--paper);
    background-attachment: local, local, scroll, scroll, scroll;
    /* a solid object lying on the track: crisp dark edge, a lit top edge,
       a short contact shadow and a longer soft one */
    box-shadow: inset 0 1px 0 var(--paper-edge), 0 0 0 1px rgb(30 4 0 / .35),
      0 2px 0 rgb(30 4 0 / .3), 0 28px 44px -24px rgb(30 4 0 / .75);
  }
  .step { margin-top: 0; flex: none; }
  .foot { margin-top: 0; flex: none; border-top: 1px solid var(--rule); }
}
/* short desktop windows (720-760 px): the same sheet, a notch tighter, so a
   sign-in with an error line or the Google note still fits without scrolling */
@media (min-width: 960px) and (min-height: 600px) and (max-height: 760px) and (min-aspect-ratio: 5/4) {
  .sheet { padding-top: calc(var(--u) * 2); }
  .or { margin: calc(var(--u) * 1.125) 0; }
}


/* ================================================================ intro
   "Down the lane" (intro.js). A low camera flies up lanes 5 and 6 over the
   real marks before the finish, comes down a little as it brakes, and stops
   on the frame above; the sheet is set down as it stops. intro.js adds
   .m2-on to <html> before the body paints, only when the intro will play,
   and takes it off when the camera has stopped or on any key, click, tap or
   focus. Without the script none of this applies.

   While it runs the track box is made larger than the window (by --ox and
   --oy, whole grain tiles, set by intro.js) so the camera can be higher than
   at rest; --a and --fy shift by the same amount so every line stays on its
   pixels. The static finish line and grain swap for moving copies. */

.run, .run-grain { display: none; }
.m2-on .track {
  inset: calc(-1 * var(--oy, 0px)) calc(-1 * var(--ox, 0px));
  --a: calc(var(--a0) + var(--ox, 0px));
  --fy: calc(var(--fy0) + var(--oy, 0px));
  background:
    var(--line) calc(var(--a) - 4 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - 3 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - 2 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) var(--a) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 2 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 3 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 4 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--tartan);
  will-change: transform;
}
.m2-on .track::after { display: none; }
.m2-on .run { display: block; position: absolute; inset: 0; visibility: hidden; }
.m2-go .run { visibility: visible; }

/* grain that travels with the surface: one tile taller than the box, moved
   by a remainder of the distance, stretched into streaks at speed */
.m2-on .run-grain {
  display: block; position: absolute; left: 0; right: 0; top: 0;
  height: calc(100% + 320px);
  background: var(--grain) 0 0 / 320px 320px;
  opacity: .55;
  transform-origin: 0 0;
  will-change: transform;
}

/* marks, 5 cm wide like the lines, centred on their distance before the
   finish (World Athletics colour code: 100 m H yellow, 110 m H and the
   4 x 400 m zone blue) */
.mk {
  --d: 0;
  position: absolute; left: 0; right: 0;
  height: var(--t);
  top: calc(var(--fy) + var(--t) + var(--d) * var(--P) / 1.22 - var(--t) / 2);
  will-change: transform, opacity;
}
.at2316 { --d: 23.16; }
.at19   { --d: 19; }
.at1402 { --d: 14.02; }
.at105  { --d: 10.5; }
.at10   { --d: 10; }
.fin { top: var(--fy); background: var(--paint); }
/* hurdle positions: a 20 cm bar across each lane line */
.hu {
  --w: calc(var(--P) * .2 / 1.22);
  --bar: linear-gradient(var(--c) 0 0);
  --x: calc(var(--a) + var(--t) / 2 - var(--w) / 2);
  background:
    var(--bar) calc(var(--x) - 4 * var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) - 3 * var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) - 2 * var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) - var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) var(--x) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) + var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) + 2 * var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) + 3 * var(--P)) 0 / var(--w) 100% no-repeat,
    var(--bar) calc(var(--x) + 4 * var(--P)) 0 / var(--w) 100% no-repeat;
}
.h100 { --c: #ecc13a; }
.h110 { --c: #3f6fc4; }
/* 4 x 400 m takeover zone, 10 m before the finish: a line across the
   lanes with the white lane lines running through it */
.rl {
  background:
    var(--line) calc(var(--a) - 4 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - 3 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - 2 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) - var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) var(--a) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 2 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 3 * var(--P)) 0 / var(--t) 100% no-repeat,
    var(--line) calc(var(--a) + 4 * var(--P)) 0 / var(--t) 100% no-repeat,
    #3f6fc4;
}

/* before the first frame: lanes only; moving parts get their own layers */
.m2-on .num, .m2-on .brand, .m2-on .main { will-change: transform, opacity; }
.m2-on .num, .m2-on .brand, .m2-on .main { opacity: 0; }
.m2-go .num, .m2-go .brand { opacity: 1; }
@media (min-width: 960px) and (min-height: 600px) and (min-aspect-ratio: 5/4) {
  .m2-on .main { opacity: 1; will-change: auto; }
  .m2-on .intro, .m2-on .sheet { will-change: transform, opacity; }
  .m2-on .sheet { opacity: 0; }
  .m2-on .intro { opacity: 0; }
  .m2-go .intro { opacity: 1; }
}
/* the sheet's shadow on the track while it is still in the air */
.land-shadow {
  position: absolute; pointer-events: none;
  box-shadow: 0 10px 70px 6px rgb(50 8 0 / .5);
  will-change: transform, opacity;
}

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

/* 404 page: size to its content, no empty sheet below */
.main.main-404 { min-height: 0; }
