/* PWR Lab site styles.

   Direction: forceful, exact, plain-spoken. Two things are loud, headlines
   and measurements, and they share one voice. Everything else is quiet.

   Color   60/30/10. Ink neutrals for the page, brand violet in flat blocks,
           volt on the primary action and on measured gains only.
   Type    One loud voice: Archivo's heavy expanded cut, the same wide block
           letters as the PWR logo. Headlines use it in capitals (.h-page,
           .h-section); measured numbers use it too (.num). Everything else
           is Archivo at 400 or 500 in sentence case. JetBrains Mono for
           units and ruler labels. Six sizes (--t-*).
   Grid    One 12-column page grid with three working edges: the left margin,
           column 5 and column 9. --span-4 is the width of four columns and
           works anywhere inside .wrap, so nested blocks land on the same lines.
   Shape   4px controls, 8px surfaces. Hard corners, like the logo's letters.
   Space   A 4px grid: every margin, gap and padding is one of the --s steps.
   Depth   A surface step plus a hairline. No shadows, glows or gradients.
   Motion  Press feedback, the readout's ruler sweep, the map camera.

   Layers: --z-menu < --z-nav < --z-skip. The map card isolates its own
   stacking context and layers its controls inside it.
*/

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Arial resized to Archivo's measured width and vertical metrics, so text does
   not move when the real font swaps in. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 99%;
  ascent-override: 89%;
  descent-override: 21%;
  line-gap-override: 0%;
}

/* The same idea for the loud voice. Archivo's heavy expanded cut measures 30%
   wider than bold Arial (headlines 1.297x, numbers 1.293x), and no system font
   has a wide cut, so bold Arial is enlarged to match. Headlines then break at
   the same words before and after the real font arrives. The vertical metrics
   are the ones above divided by the same 1.3, so the baseline stays put. */
@font-face {
  font-family: "Archivo Wide Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica-Bold");
  font-weight: 100 900;
  size-adjust: 130%;
  ascent-override: 68%;
  descent-override: 16%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Progress of the ruler sweep, 0 to 1. Registered so it can be animated and
   read back from script as a number. Browsers without @property (Safari before
   16.4, Firefox before 128) never define --t, so every use falls back to 1:
   the ruler shows its finished state and simply does not sweep. */
@property --t {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  --ink: #0a0a0b;
  --surface: #121214;
  --raised: #1b1b1f;
  --hairline: rgba(246, 245, 248, 0.08);
  --hairline-strong: rgba(246, 245, 248, 0.18);
  /* The edge of something you type in. Opaque and 3:1 or better against both
     the page and the field's own fill, so the box can be found without color cues. */
  --field-line: #6f6c7b;

  /* Three text roles. */
  --fg: #f6f5f8;
  --fg-2: #b6b3c0;
  --fg-3: #8d8a98;

  --violet: #7b2fff;
  --violet-text: #9459ff;
  --on-violet: #ffffff;
  --on-violet-2: #f1eaff;
  --volt: #d4ff3f;
  --volt-hover: #e0ff6b;

  /* Error red pulled toward the violet, so it belongs to this palette. */
  --danger: #ff6f91;
  --danger-text: #ffb3c4;

  --font-sans: "Archivo", "Archivo Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* For the heavy expanded cut only: headlines and measured numbers. */
  --font-wide: "Archivo", "Archivo Wide Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --t-micro: 0.75rem;
  --t-small: 0.875rem;
  --t-body: 1rem;
  --t-large: clamp(1.125rem, 1.4vw, 1.25rem);
  --t-section: clamp(1.5rem, 2.6vw, 2.25rem);
  --t-page: clamp(2.25rem, 6.4vw, 5.75rem);

  /* ease-out for things arriving or answering input, ease-in-out for things
     already on screen that move. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  /* A gentler ease-out for the ruler. The sharper curve above covered 80% of
     the distance in the first 200ms and then crawled, which read as a jump
     followed by a wait. This one keeps moving all the way to the mark. */
  --ease-sweep: cubic-bezier(0.33, 1, 0.68, 1);

  --r-1: 4px;
  --r-2: 8px;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;
  --s-32: 8rem;

  /* These step up with the viewport instead of scaling fluidly, so they stay on the grid. */
  --gutter: var(--s-5);
  --section: var(--s-16);
  --pad: var(--s-6);
  --pad-panel: var(--s-6);

  /* The page grid. 100cqw is the width of the nearest .wrap. */
  --g: var(--s-6);
  --col: calc((100cqw - 11 * var(--g)) / 12);
  --span-4: calc(4 * var(--col) + 3 * var(--g));

  --z-menu: 40;
  --z-nav: 50;
  --z-skip: 70;
}

@media (min-width: 48rem) {
  :root {
    --gutter: var(--s-8);
    --section: var(--s-24);
    --pad: var(--s-8);
    --pad-panel: var(--s-12);
    --g: var(--s-8);
  }
}

@media (min-width: 75rem) {
  :root {
    --gutter: var(--s-12);
    --section: var(--s-32);
    --pad-panel: var(--s-16);
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--s-24);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--fg-2);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure,
blockquote,
address {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 500;
  color: var(--fg);
  text-wrap: balance;
}

p,
dd,
li {
  text-wrap: pretty;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  padding: 0;
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

address {
  font-style: normal;
}

/* Focus is neutral on purpose: a volt or violet ring would compete with the
   two places those colors mean something. */
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

::selection {
  background: var(--violet);
  color: var(--on-violet);
}

/* Violet on violet would hide the selection inside a panel. */
.panel ::selection {
  background: var(--ink);
  color: var(--fg);
}

[hidden] {
  display: none !important;
}

/* A control that does nothing until site.js runs. It keeps its space so the
   layout does not jump when the script reveals it. */
[data-needs-script] {
  visibility: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: currentColor;
}

.skip {
  position: fixed;
  top: var(--s-2);
  left: var(--s-2);
  z-index: var(--z-skip);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-1);
  background: var(--fg);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

/* ---------- Type ---------- */

/* The headline voice: wide, heavy capitals, set tight. It is the logo's own
   lettering, so a headline reads as the brand speaking. Kept to headlines,
   place names and the phone menu; never labels, buttons or body copy. */
.h-page,
.h-section,
.location__city,
.menu__links a {
  font-family: var(--font-wide);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.h-page {
  font-size: var(--t-page);
}

.h-page span {
  display: block;
}

.h-section {
  font-size: var(--t-section);
}

.h-item {
  font-size: var(--t-large);
  line-height: 1.25;
}

.accent {
  color: var(--violet-text);
}

.lede {
  max-width: 36rem;
  font-size: var(--t-large);
  line-height: 1.5;
}

/* A quiet heading for a small group: "Who it's for", "Visit". */
.label {
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-3);
}

/* The one loud voice on the site. Only for numbers that were measured. */
.num {
  font-family: var(--font-wide);
  font-stretch: 116%;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.num small {
  margin-left: var(--s-2);
  font-family: var(--font-mono);
  font-stretch: 100%;
  font-size: var(--t-small);
  font-weight: 400;
  letter-spacing: 0;
}

.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--fg-3);
  transition: text-decoration-color 150ms ease;
}

/* Text links are a line of type tall; this gives them a 44px target. */
.link::after {
  content: "";
  position: absolute;
  inset: calc(var(--s-3) * -1) 0;
}

.link--quiet {
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--fg-2);
}

@media (hover: hover) and (pointer: fine) {
  .link:hover {
    text-decoration-color: var(--fg);
  }
}

/* ---------- Layout ---------- */

.wrap {
  container-type: inline-size;
  width: min(100% - 2 * var(--gutter), 82.5rem);
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section--flush {
  padding-top: 0;
}

.section--tight {
  padding-block: var(--s-16);
}

.section__head {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
  margin-bottom: var(--s-8);
}

/* A heading in columns 1 to 4 and its content from column 5. */
.split {
  display: grid;
  gap: var(--s-6);
}

.split__head {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  justify-items: start;
}

.prose {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
  max-width: 40rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: var(--span-4) minmax(0, 1fr);
    gap: var(--s-12) var(--g);
    align-items: start;
  }

  .section__head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-8);
  }
}

/* ---------- Buttons and tabs ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--s-12);
  padding: 0 var(--s-5);
  border-radius: var(--r-1);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 120ms var(--ease-out), background-color 150ms ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn--sm {
  min-height: var(--s-10);
  padding: 0 var(--s-4);
  font-size: var(--t-small);
}

/* 40px tall to the eye, 48px to the finger. */
.btn--sm::after {
  content: "";
  position: absolute;
  inset: calc(var(--s-1) * -1) 0;
}

.btn--primary {
  background: var(--volt);
  color: var(--ink);
}

/* One tone below a form field, so a waiting button never reads as somewhere to type. */
.btn--quiet {
  background: var(--surface);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.tab {
  min-height: 2.75rem;
  padding: 0 var(--s-3);
  border-radius: var(--r-1);
  font-size: var(--t-small);
  color: var(--fg-2);
  transition: transform 120ms var(--ease-out), color 150ms ease, background-color 150ms ease;
}

.tab:active {
  transform: scale(0.96);
}

/* The outline is the cue: the fill alone is too close to the page to tell
   which choice is on. */
.tab[aria-pressed="true"] {
  background: var(--raised);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--fg-3);
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    background: var(--volt-hover);
  }

  .btn--quiet:hover {
    background: var(--raised);
  }

  .tab:hover {
    color: var(--fg);
  }
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--ink);
  box-shadow: 0 1px 0 var(--hairline);
}

.nav__bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--s-16);
}

.nav__logo {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin-right: auto;
}

.nav__logo img {
  width: auto;
  height: 1.75rem;
}

.nav__links {
  display: flex;
  gap: var(--s-1);
}

.nav__links a {
  display: flex;
  align-items: center;
  min-height: var(--s-10);
  padding: 0 var(--s-3);
  border-radius: var(--r-1);
  font-size: var(--t-small);
  color: var(--fg-2);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav__links a[aria-current="page"] {
  color: var(--fg);
}

.nav__toggle {
  display: none;
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-1);
}

.nav__toggle-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--s-6);
  height: 2px;
  margin: -1px 0 0 calc(var(--s-3) * -1);
  background: var(--fg);
  transition: transform 200ms var(--ease-in-out);
}

.nav__toggle-line:nth-of-type(2) {
  transform: translateY(-4px);
}

.nav__toggle-line:nth-of-type(3) {
  transform: translateY(4px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-of-type(2) {
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-of-type(3) {
  transform: rotate(-45deg);
}

/* Leaves a little faster than it arrives. */
.menu {
  position: fixed;
  inset: var(--s-16) 0 0;
  z-index: var(--z-menu);
  padding-block: var(--s-8);
  background: var(--ink);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 150ms var(--ease-out);
}

.menu.is-open {
  opacity: 1;
  transition-duration: 200ms;
}

.menu__links {
  display: grid;
}

.menu__links a {
  padding: var(--s-3) 0;
  font-size: var(--t-section);
  color: var(--fg);
  text-decoration: none;
}

.menu__links a[aria-current="page"] {
  color: var(--violet-text);
}

@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover {
    color: var(--fg);
  }
}

@media (max-width: 55.99rem) {
  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: block;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: var(--s-12) var(--s-16);
}

.hero__top {
  display: grid;
  gap: var(--s-6);
}

.hero__copy {
  display: grid;
  gap: var(--s-6);
}

.hero__copy .lede {
  max-width: 44rem;
  color: var(--fg);
}

@media (min-width: 62rem) {
  .hero {
    padding-top: var(--s-16);
  }

  .hero__top {
    gap: var(--s-8);
  }

  /* Copy in columns 1 to 8, buttons from column 9. */
  .hero__copy {
    grid-template-columns: minmax(0, 1fr) var(--span-4);
    gap: var(--g);
    align-items: center;
  }
}

/* ---------- Readout: one athlete's before and after, on a ruler ---------- */

.readout {
  display: grid;
  gap: var(--s-8);
  margin-top: var(--s-12);
}

.readout__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-8);
}

.readout__name {
  font-size: var(--t-large);
  font-weight: 500;
  line-height: 1.25;
  color: var(--fg);
}

.readout__metric {
  font-size: var(--t-small);
  color: var(--fg-3);
}

.readout__figures {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  align-items: last baseline;
  gap: var(--s-6) var(--s-12);
}

.figure {
  display: grid;
  gap: var(--s-2);
}

.figure__label {
  font-size: var(--t-small);
  line-height: 1;
  color: var(--fg-3);
}

/* Holds the width of the final value while the number counts up to it, so the
   unit beside it does not jump when a digit is added. */
.figure__live {
  display: inline-block;
}

.figure--before .num {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--fg-3);
}

.figure--after .num {
  font-size: clamp(5rem, 13vw, 11rem);
  color: var(--fg);
}

.figure--after .num small {
  color: var(--fg-2);
}

.figure--gain .num {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--volt);
}

/* Four names wrap raggedly on a phone, so they sit in two even columns there. */
@media (max-width: 39.99rem) {
  .readout .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .readout .tab {
    text-align: left;
  }
}

@media (min-width: 40rem) {
  .figure--gain {
    margin-left: auto;
    justify-items: end;
  }
}

/* The ruler. --lo and --hi are the ends of the scale, --from and --to the
   athlete's two values; all four are plain numbers set inline. The bar and the
   two markers are full-width layers placed with transforms, and --t (0 to 1)
   is how far the sweep from the first value to the second has got. */
.ruler {
  --units: calc(var(--hi) - var(--lo));
  --p-from: calc((var(--from) - var(--lo)) / var(--units));
  --p-span: calc((var(--to) - var(--from)) / var(--units));
  --rise: var(--s-10);
  position: relative;
  height: calc(var(--rise) + var(--s-6));
  pointer-events: none;
  user-select: none;
}

.ruler__ticks {
  position: absolute;
  inset: 0 0 auto;
  height: var(--rise);
  border-right: 1px solid rgba(246, 245, 248, 0.34);
  background-image: linear-gradient(90deg, rgba(246, 245, 248, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 245, 248, 0.16) 1px, transparent 1px);
  background-size: calc(100% / var(--units) * 5) 100%, calc(100% / var(--units)) 40%;
  background-position: 0 100%, 0 100%;
  background-repeat: repeat-x;
}

.ruler__track {
  position: absolute;
  inset: 0 0 auto;
  height: var(--rise);
  overflow: hidden;
}

.ruler__bar {
  position: absolute;
  inset: 0 0 auto;
  height: var(--s-2);
  background: var(--volt);
  transform-origin: 0 50%;
  transform: translateX(calc(var(--p-from) * 100%)) scaleX(calc(var(--p-span) * var(--t, 1)));
}

.ruler__mark {
  position: absolute;
  inset: 0;
}

.ruler__mark i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
}

.ruler__mark--start {
  transform: translateX(calc(var(--p-from) * 100%));
}

.ruler__mark--start i {
  background: var(--fg);
}

.ruler__mark--end {
  transform: translateX(calc((var(--p-from) + var(--p-span) * var(--t, 1)) * 100%));
}

.ruler__mark--end i {
  background: var(--volt);
}

.ruler__labels {
  position: absolute;
  inset: auto 0 0;
  height: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: var(--s-4);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

.ruler__labels span {
  position: absolute;
  left: calc((var(--v) - var(--lo)) / var(--units) * 100%);
  transform: translateX(-50%);
}

.ruler--compact {
  --rise: var(--s-6);
}

.ruler--compact .ruler__bar {
  height: var(--s-1);
}

/* The hero's one piece of motion: the bar runs from the before value to the
   after value. It plays once on load from CSS alone, and site.js replays it
   when another athlete is picked by dropping and restoring the animation. */
@media (prefers-reduced-motion: no-preference) {
  .readout .ruler {
    animation: ruler-sweep 600ms var(--ease-sweep) both;
  }

  .readout.is-reset .ruler {
    animation: none;
  }
}

@keyframes ruler-sweep {
  from {
    --t: 0;
  }

  to {
    --t: 1;
  }
}

/* ---------- Affiliations ---------- */

.affiliations {
  display: grid;
  gap: var(--s-6);
}

.affiliations__title {
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-3);
}

.affiliations__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: start;
  gap: var(--s-8) var(--s-6);
  padding: 0;
  list-style: none;
}

.affiliations__list img {
  width: auto;
  height: var(--s-12);
}

.affiliations__list img[src$="texas.svg"] {
  height: var(--s-8);
}

@media (min-width: 48rem) {
  .affiliations__list {
    display: flex;
    justify-content: space-between;
  }

  .affiliations__list img {
    height: var(--s-16);
  }

  .affiliations__list img[src$="texas.svg"] {
    height: var(--s-10);
  }
}

/* ---------- Violet panel and stats ---------- */

.panel {
  display: grid;
  gap: var(--s-8);
  padding: var(--pad-panel);
  border-radius: var(--r-2);
  background: var(--violet);
  color: var(--on-violet-2);
}

.panel h2 {
  color: var(--on-violet);
}

.panel .link {
  color: var(--on-violet);
  text-decoration-color: var(--on-violet-2);
}

.panel__head {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  justify-items: start;
}

.closer {
  gap: var(--s-6);
  justify-items: start;
}

.closer .lede {
  max-width: 34rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-8) var(--g);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--s-2);
}

.stat dd {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  color: var(--on-violet);
  white-space: nowrap;
}

/* "Sub 4.5s" at the normal size is wider than half of a 320px screen. */
@media (max-width: 22.5rem) {
  .stat dd {
    font-size: 1.75rem;
  }
}

.stat__prefix {
  margin-right: 0.25em;
  font-size: 0.4em;
  letter-spacing: 0;
  vertical-align: 1em;
}

.stat dt {
  max-width: 18ch;
  font-size: var(--t-small);
  line-height: 1.4;
}

/* The panel is inset from the page edge by its padding, so its first column
   is shortened by that much and the columns after it land on columns 5 and 9. */
@media (min-width: 62rem) {
  .panel--split {
    grid-template-columns: calc(var(--span-4) - var(--pad-panel)) minmax(0, 1fr);
    gap: var(--g);
  }

  .stats {
    grid-template-columns: var(--span-4) minmax(0, 1fr);
    row-gap: var(--s-12);
  }

  .stats--wide {
    grid-template-columns: calc(var(--span-4) - var(--pad-panel)) var(--span-4) minmax(0, 1fr);
  }
}

/* ---------- Equipment list ---------- */

.kit {
  display: grid;
  gap: var(--s-10);
}

.kit__group {
  display: grid;
  gap: var(--s-4);
}

.kit__label {
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-3);
}

.kit__list {
  display: grid;
  gap: var(--s-4);
}

.kit__list > div {
  display: grid;
  gap: var(--s-1) var(--g);
}

.kit__list dt {
  font-weight: 500;
  color: var(--fg);
}

@media (min-width: 40rem) {
  .kit__list > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .kit__list > div {
    grid-template-columns: var(--span-4) minmax(0, 1fr);
  }
}

/* ---------- Locations ---------- */

.locations {
  display: grid;
  gap: var(--s-4) var(--g);
}

.location {
  display: grid;
  gap: var(--s-2);
  align-content: start;
  justify-items: start;
  padding: var(--pad);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: box-shadow 150ms ease;
}

/* The card for whichever lab the map is showing. */
.location.is-active {
  box-shadow: inset 0 0 0 1px var(--fg-3);
}

.location__region {
  font-size: var(--t-small);
  line-height: 1.4;
  color: var(--fg-3);
}

.location__city {
  font-size: var(--t-section);
}

.location__address {
  margin-bottom: var(--s-4);
  line-height: 1.5;
}

.locations__note {
  display: grid;
  gap: var(--s-2);
  align-content: start;
  justify-items: start;
  padding-block: var(--pad);
}

@media (min-width: 48rem) {
  .locations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .locations--three .locations__note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 62rem) {
  .locations {
    grid-template-columns: var(--span-4) minmax(0, 1fr);
  }

  .locations--three {
    grid-template-columns: var(--span-4) var(--span-4) minmax(0, 1fr);
  }

  .locations--three .locations__note {
    grid-column: auto;
  }
}

/* ---------- Locations map ----------
   The card holds a static diagram, the live map canvas and the controls that
   sit over it. data-map-state (set by map.js) decides which is showing:
     none     no script yet: diagram
     loading  library on its way: diagram stays, so the card is never empty
     ready    live map and controls
     failed   diagram again */

.mapcard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 24rem;
  max-height: 76dvh;
  margin-bottom: var(--s-4);
  border-radius: var(--r-2);
  background: #0c0c0e;
}

.mapcard__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--s-6);
}

.mapcard[data-map-state="ready"] .mapcard__fallback {
  visibility: hidden;
}

.plot {
  width: auto;
  max-width: min(100%, 32.5rem);
  max-height: 100%;
}

.plot__ref {
  fill: var(--fg-3);
}

.plot__ref-label {
  fill: var(--fg-3);
  font-family: var(--font-sans);
  font-size: 14px;
}

.plot__lab {
  fill: var(--volt);
}

.plot__lab-label {
  fill: var(--fg);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
}

/* The drawing shrinks to fit a phone, and its labels with it. These sizes are
   in the drawing's own units, so larger numbers keep the text near 14px. */
@media (max-width: 40rem) {
  .plot__ref-label {
    font-size: 21px;
  }

  .plot__lab-label {
    font-size: 25px;
  }
}

/* Needs the extra class: the map library's own stylesheet sets position on the same element. */
.mapcard .mapcard__canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}

.mapcard[data-map-state="ready"] .mapcard__canvas {
  opacity: 1;
}

.mapcard[data-map-state="failed"] .mapcard__canvas {
  display: none;
}

.mapcard .maplibregl-canvas:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -4px;
}

/* The hint shown when someone scrolls or drags the map without the modifier. */
.mapcard .maplibregl-cooperative-gesture-screen {
  z-index: 3;
  background: rgba(10, 10, 11, 0.8);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 500;
}

/* Picker: two identical rows. The top one is the selected look, clipped to the
   active choice, so the block slides and each label recolors exactly at its edge. */
.seg {
  position: absolute;
  top: var(--s-4);
  left: var(--s-4);
  z-index: 2;
  padding: var(--s-1);
  border-radius: var(--r-2);
  background: var(--ink);
}

.seg__row {
  position: relative;
  display: flex;
}

.seg__item {
  position: relative;
  display: grid;
  place-items: center;
  min-height: var(--s-10);
  padding: 0 var(--s-3);
  border-radius: var(--r-1);
  font-family: var(--font-sans);
  font-size: var(--t-small);
  line-height: 1;
  white-space: nowrap;
  color: var(--fg-2);
}

button.seg__item {
  transition: transform 120ms var(--ease-out), color 150ms ease;
}

/* Fills the picker's own padding, so each choice is 48px tall to the finger. */
button.seg__item::after {
  content: "";
  position: absolute;
  inset: calc(var(--s-1) * -1) 0;
}

button.seg__item:active {
  transform: scale(0.96);
}

.seg__row--active {
  position: absolute;
  inset: var(--s-1);
  border-radius: var(--r-1);
  background: var(--fg);
  clip-path: inset(0 100% 0 0 round 4px);
  transition: clip-path 240ms var(--ease-in-out);
  pointer-events: none;
}

.seg__row--active .seg__item {
  color: var(--ink);
}

.mapcard__zoom {
  position: absolute;
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: 2;
  display: grid;
  gap: var(--s-1);
}

.mapcard__zoom-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-1);
  background: var(--ink);
  color: var(--fg);
  transition: transform 120ms var(--ease-out), background-color 150ms ease, opacity 150ms ease;
}

.mapcard__zoom-btn:active {
  transform: scale(0.96);
}

/* aria-disabled, not disabled: a button that disables itself while focused
   would drop keyboard focus to the top of the page. */
.mapcard__zoom-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

.mapcard__credit {
  position: absolute;
  left: var(--s-4);
  bottom: var(--s-4);
  z-index: 2;
  max-width: calc(100% - var(--s-24));
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-1);
  background: var(--ink);
  font-size: var(--t-micro);
  line-height: 1.4;
  color: var(--fg-2);
}

.mapcard__credit a {
  color: inherit;
  text-decoration: none;
}

/* Pin. The button itself is positioned by the map library through its own
   transform, so press feedback lives on .pin__body. */
.pin {
  display: block;
  font-family: var(--font-sans);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
}

.pin:focus-visible {
  outline: none;
}

.pin__body {
  display: grid;
  justify-items: center;
  gap: var(--s-1);
  transform-origin: 50% 100%;
  transition: transform 120ms var(--ease-out);
}

.pin:active .pin__body {
  transform: scale(0.96);
}

.pin__chip {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-1);
  background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}

.pin__chip img {
  width: auto;
  height: var(--s-3);
}

.pin__dot {
  width: var(--s-4);
  height: var(--s-4);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--volt);
}

.pin[aria-pressed="true"] .pin__chip {
  background: var(--fg);
  color: var(--ink);
  box-shadow: none;
}

.pin:focus-visible .pin__chip {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  button.seg__item:hover {
    color: var(--fg);
  }

  .mapcard__zoom-btn:not([aria-disabled="true"]):hover {
    background: var(--raised);
  }

  .mapcard__credit a:hover {
    color: var(--fg);
    text-decoration: underline;
  }
}

@media (min-width: 48rem) {
  .mapcard {
    aspect-ratio: 2.2 / 1;
    max-height: 72dvh;
  }
}

/* ---------- Quote ---------- */

.quote {
  display: grid;
  gap: var(--s-4);
  max-width: 52rem;
}

.quote blockquote p {
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
}

.quote figcaption {
  font-size: var(--t-small);
  color: var(--fg-3);
}

/* ---------- Inner page hero ---------- */

.page-hero {
  padding-block: var(--s-12);
}

.page-hero .wrap {
  display: grid;
  gap: var(--s-6);
  justify-items: start;
}

.page-hero--full {
  display: grid;
  align-content: center;
  min-height: 60dvh;
}

@media (min-width: 62rem) {
  .page-hero {
    padding-block: var(--s-24) var(--s-16);
  }
}

/* ---------- About ---------- */

.stack {
  display: grid;
  gap: var(--s-10);
}

.item {
  display: grid;
  gap: var(--s-2);
  max-width: 40rem;
}

.milestones {
  display: grid;
  gap: var(--s-4);
  padding: 0;
  list-style: none;
}

.milestones li {
  display: grid;
  grid-template-columns: var(--s-16) minmax(0, 1fr);
  gap: var(--s-6);
}

.milestones__year {
  font-weight: 500;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.milestones p {
  max-width: 36rem;
}

/* ---------- Services ---------- */

.formats {
  display: grid;
  gap: var(--s-16);
}

.format__body {
  display: grid;
  gap: var(--s-8);
}

.format__lead {
  max-width: 40rem;
  color: var(--fg);
}

.format__cols {
  display: grid;
  gap: var(--s-8) var(--g);
}

.format__cols > div {
  display: grid;
  gap: var(--s-3);
  align-content: start;
}

.list {
  display: grid;
  gap: var(--s-2);
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding-left: var(--s-5);
}

.list li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0;
  width: var(--s-1);
  height: var(--s-1);
  background: var(--fg-3);
}

@media (min-width: 40rem) {
  .format__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .formats {
    gap: var(--s-24);
  }

  .format__cols {
    grid-template-columns: var(--span-4) minmax(0, 1fr);
  }
}

/* ---------- Results ---------- */

.athletes {
  display: grid;
  gap: var(--s-4) var(--g);
  padding: 0;
  list-style: none;
}

.athlete {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-6);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.athlete__name {
  font-size: var(--t-body);
  line-height: 1.4;
}

.athlete__metric {
  font-size: var(--t-small);
  line-height: 1.4;
  color: var(--fg-3);
}

.athlete__figures {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-2);
  margin-block: var(--s-6) var(--s-4);
}

.athlete__figures .icon {
  align-self: center;
  color: var(--fg-3);
}

.athlete__before {
  font-size: 1.75rem;
  color: var(--fg-3);
}

.athlete__after {
  font-size: 3rem;
  color: var(--fg);
}

.athlete__after small {
  color: var(--fg-2);
}

.athlete__gain {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--volt);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.athletes__empty {
  padding-block: var(--s-8);
}

@media (min-width: 40rem) {
  .athletes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .athletes {
    grid-template-columns: var(--span-4) var(--span-4) minmax(0, 1fr);
  }
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  gap: var(--s-16) var(--g);
}

.form {
  display: grid;
  gap: var(--s-2);
}

.form__row {
  display: grid;
  gap: var(--s-2) var(--g);
}

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  display: grid;
  gap: var(--s-2);
  align-content: start;
}

.field label {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--fg);
}

.field__optional {
  font-weight: 400;
  color: var(--fg-3);
}

/* Fields are the brightest surface on the page, so they read as the place to type. */
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--s-12);
  padding: var(--s-3);
  border: 1px solid var(--field-line);
  border-radius: var(--r-1);
  background-color: var(--raised);
  color: var(--fg);
  font: inherit;
  line-height: 1.4;
  transition: border-color 150ms ease;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: var(--s-10);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23b6b3c0'><path d='M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--s-3) center;
  background-size: 1rem;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 0;
  border-color: transparent;
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
}

/* Fixed-height slot under an input for its hint or error, so showing an error never shifts the layout. */
.field__note {
  min-height: var(--s-5);
  font-size: var(--t-small);
  line-height: var(--s-5);
}

.field__hint {
  color: var(--fg-3);
}

.field__error {
  color: var(--danger-text);
}

.form__status {
  margin-bottom: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-1);
  background: rgba(255, 111, 145, 0.12);
  color: var(--danger-text);
}

.form__done {
  display: grid;
  gap: var(--s-6);
  justify-items: start;
}

.form__done:focus {
  outline: none;
}

.contact__aside {
  display: grid;
  gap: var(--s-8);
  align-content: start;
}

.contact__block {
  display: grid;
  justify-items: start;
}

.contact__block .label {
  margin-bottom: var(--s-2);
}

.contact__block .address-block + .address-block {
  margin-top: var(--s-4);
}

.contact__line {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--fg);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.address-block {
  display: grid;
  gap: var(--s-1);
  justify-items: start;
}

.address-block__city {
  font-weight: 500;
  color: var(--fg);
}

.address-block address {
  line-height: 1.5;
}

@media (hover: hover) and (pointer: fine) {
  .contact__line:hover {
    text-decoration: underline;
  }
}

@media (min-width: 36rem) {
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The form takes columns 1 to 8 with its second field column on column 5; the
   details start on column 9. */
@media (min-width: 62rem) {
  .contact {
    grid-template-columns: minmax(0, 1fr) var(--span-4);
    align-items: start;
  }

  .form__row {
    grid-template-columns: var(--span-4) minmax(0, 1fr);
  }
}

/* ---------- Footer ---------- */

.footer {
  padding-top: var(--s-16);
  box-shadow: 0 -1px 0 var(--hairline);
  font-size: var(--t-small);
}

.footer__grid {
  display: grid;
  gap: var(--s-10) var(--g);
}

.footer__brand img {
  width: 7.5rem;
  height: auto;
}

.footer__brand p {
  margin-top: var(--s-6);
}

.footer__col {
  display: grid;
  align-content: start;
  justify-items: start;
}

.footer__col--locations {
  gap: var(--s-4);
}

.footer__heading {
  margin-bottom: var(--s-2);
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-3);
}

.footer__col--locations .footer__heading {
  margin-bottom: calc(var(--s-2) * -1);
}

.footer__col > a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--fg-2);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 150ms ease;
}

.footer__base {
  padding-block: var(--s-12) var(--s-8);
  font-size: var(--t-small);
  color: var(--fg-3);
}

@media (hover: hover) and (pointer: fine) {
  .footer__col > a:hover {
    color: var(--fg);
  }
}

@media (min-width: 40rem) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__brand,
  .footer__col--locations {
    grid-column: 1 / -1;
  }
}

/* Brand in columns 1 to 4, locations from column 5, the two link lists from column 9. */
@media (min-width: 62rem) {
  .footer__grid {
    grid-template-columns: var(--span-4) var(--span-4) minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer__brand,
  .footer__col--locations {
    grid-column: auto;
  }
}

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

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