:root {
  color-scheme: light dark;
  --bg: 247 247 245;
  --surface: 255 255 255;
  --surface-2: 238 238 234;
  --border: 220 220 214;
  --text: 20 20 18;
  --text-muted: 86 86 79;
  --primary: 20 20 18;
  --on-primary: 255 214 10;
  --accent: 255 243 176;
  --success: 22 101 52;
  --warning: 146 64 14;
  --danger: 185 28 28;
  --bib-fill: 255 214 10;
  --on-bib-band: 255 214 10;
  --bib-band: 20 20 18;
  --on-bib: 20 20 18;
  --partner-pill: 255 243 176;
  --yellow: 255 214 10;
  --ink: 20 20 18;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: 15 15 14;
    --surface: 24 24 22;
    --surface-2: 34 34 31;
    --border: 51 51 46;
    --text: 244 244 239;
    --text-muted: 176 176 167;
    --primary: 255 214 10;
    --on-primary: 20 20 18;
    --accent: 58 52 16;
    --success: 74 222 128;
    --warning: 251 191 36;
    --danger: 248 113 113;
    --bib-fill: 255 214 10;
    --on-bib-band: 255 214 10;
    --bib-band: 20 20 18;
    --on-bib: 20 20 18;
    --partner-pill: 58 52 16;
  }
}

/*
 * milesahead.fitness. The colour tokens (--bg, --text, --primary, ... and --yellow, --ink) come first in the
 * built style.css: site/build.mjs writes them from the app's src/globals.css (Race Bib), light by default and
 * dark under prefers-color-scheme. Sizes are in rem, so the pages follow the reader's text size (200% too).
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--text));
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: inherit;
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 0.1875rem solid currentColor;
  outline-offset: 0.1875rem;
  border-radius: 0.25rem;
}

[hidden] {
  display: none !important;
}

/*
 * One store per phone: the head script names the phone on <html> (data-os), and the other phone's buttons and steps
 * (data-only) go. Computers, and browsers without scripts, show both.
 */
[data-os='ios'] [data-only='android'],
[data-os='android'] [data-only='ios'] {
  display: none !important;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 800;
  margin: 2rem 0 0.5rem;
}

/* The header: the lab's Lockup, the Bib and the bold MilesAhead wordmark. */
.top {
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: inline;
  }
}

/* The home page's yellow hero: timing-board yellow and ink in both modes, like the app's Welcome. */
.hero {
  background: rgb(var(--yellow));
  color: rgb(var(--ink));
  padding: 1.5rem 0 2.25rem;
}

.hero .mark {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 0 0 0.5rem -0.5rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.meta {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}

/* Buttons: 48 px tall at 100% text, and taller as text grows. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 0.125rem solid transparent;
  border-radius: 999px;
  background: rgb(var(--primary));
  color: rgb(var(--on-primary));
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.hero .btn {
  background: rgb(var(--ink));
  color: rgb(var(--yellow));
}

.btn-quiet {
  background: transparent;
  color: rgb(var(--text));
  border-color: rgb(var(--text));
}

/* The store buttons: side by side where both show (a computer), wrapping when they don't fit. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

/*
 * The "Your phone" switch (build.mjs phoneChooser, the lab's PhoneChooser): two radios drawn as segments, 48 px tall
 * and taller as text grows. The radios come first, so CSS alone shows the checked phone's side (no scripts needed);
 * they stay focusable, and their segment shows the focus.
 */
.pick-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.pick {
  margin: 1.5rem 0 0;
}

.pick-label {
  margin: 0 0 0.5rem;
  color: rgb(var(--text-muted));
  font-size: 0.875rem;
  font-weight: 600;
}

.pick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: rgb(var(--surface-2));
}

.pick-options label {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: rgb(var(--text-muted));
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

#iphone:checked ~ .pick label[for='iphone'],
#android:checked ~ .pick label[for='android'] {
  background: rgb(var(--surface));
  color: rgb(var(--text));
  font-weight: 700;
}

#iphone:focus-visible ~ .pick label[for='iphone'],
#android:focus-visible ~ .pick label[for='android'] {
  outline: 0.1875rem solid rgb(var(--text));
  outline-offset: -0.1875rem;
}

#iphone:checked ~ .for-android,
#android:checked ~ .for-ios {
  display: none;
}

/*
 * /download's eyebrow names the picked phone. It sits above the switch, out of the radios' reach, so it takes :has();
 * a browser without it names Android, the switch's default. (Separate rules: one unknown selector drops a whole list.)
 */
.eyebrow .for-ios {
  display: none;
}

:root:has(#iphone:checked) .eyebrow .for-ios {
  display: inline;
}

:root:has(#iphone:checked) .eyebrow .for-android {
  display: none;
}

/* The iPhone's side on /download starts as far below the switch as Android's heading does. */
.download .for-ios .how-intro {
  margin-top: 1.5rem;
}

/* The iPhone beta's one step: its button (as wide as the steps' on /download), then what to tap in TestFlight. */
.beta-go {
  margin: 0.75rem 0 0;
}

.download .beta-go .btn {
  width: 100%;
}

.beta-note {
  margin: 0.5rem 0 1.25rem;
  color: rgb(var(--text-muted));
  font-size: 0.9375rem;
}

/* Install steps, numbered in bib circles. */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  min-height: 2.25rem;
  padding: 0.25rem 0 1rem 3rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgb(var(--primary));
  color: rgb(var(--on-primary));
  font-weight: 900;
}

.note {
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgb(var(--surface-2));
}

/* In the hero the text is ink in both modes, so the note's tint can't follow the theme (dark mode's surface is ink). */
.hero .note {
  background: rgb(var(--ink) / 0.08);
}

/* An invite or friend link: the code on a bib, pinned at the corners (the logo's bib). */
.bib {
  margin: 0.75rem 0.25rem 1.5rem;
  padding: 1.75rem 0.75rem;
  border: 0.1875rem solid rgb(var(--ink));
  border-radius: 1rem;
  color: rgb(var(--ink));
  text-align: center;
  transform: rotate(-1.5deg);
  background:
    radial-gradient(circle at 0.9rem 0.9rem, rgb(var(--ink)) 0.28rem, transparent 0.32rem),
    radial-gradient(circle at calc(100% - 0.9rem) 0.9rem, rgb(var(--ink)) 0.28rem, transparent 0.32rem),
    radial-gradient(circle at 0.9rem calc(100% - 0.9rem), rgb(var(--ink)) 0.28rem, transparent 0.32rem),
    radial-gradient(circle at calc(100% - 0.9rem) calc(100% - 0.9rem), rgb(var(--ink)) 0.28rem, transparent 0.32rem),
    rgb(var(--yellow));
}

@media (prefers-color-scheme: dark) {
  .bib {
    border-color: transparent;
  }
}

.code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Roboto Mono', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.label {
  margin: 1.5rem 0 0;
}

/* The legal pages: the app's texts, with its draft banner. */
.banner {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 0.3125rem solid rgb(var(--warning));
  border-radius: 0.5rem;
  background: rgb(var(--warning) / 0.15);
}

.banner p {
  margin: 0;
}

.banner p + p {
  margin-top: 0.25rem;
}

.glance {
  margin: 1rem 0 0.5rem;
  padding: 0.25rem 1.25rem 0.75rem;
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
  background: rgb(var(--surface));
}

.glance h2 {
  margin-top: 1rem;
  font-size: 1.125rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin: 0.375rem 0;
}

/* Footer. */
.foot {
  margin-top: 3rem;
  padding: 1rem 0 2.5rem;
  border-top: 1px solid rgb(var(--border));
  color: rgb(var(--text-muted));
  font-size: 0.9375rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  color: rgb(var(--text));
  overflow-wrap: anywhere;
}

.foot p {
  margin: 0.5rem 0 0;
}

/* The footer's Cookies: a button that reads like the links beside it. */
.foot .link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0;
  border: 0;
  background: none;
  color: rgb(var(--text));
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

/*
 * The cookie choice (European time zones only): a small card above the footer, in the page's flow, so it never covers
 * the steps or Open in Chrome. Accept and Decline look the same.
 */
.consent {
  margin: 2rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
  background: rgb(var(--surface));
  font-size: 0.9375rem;
}

.consent p {
  margin: 0;
}

.consent .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.consent .btn {
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

button:focus-visible {
  outline: 0.1875rem solid currentColor;
  outline-offset: 0.1875rem;
}

/*
 * /download: an invitation. The yellow hero carries the app's icon and the invite; the three steps follow, each with
 * its button, then a look at the app.
 */
.invite .app-icon {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0.5rem 0 1rem;
  border-radius: 1.125rem;
}

/* "MilesAhead" is one long word: the heading shrinks a little on narrow screens so it fits at 200% text too. */
.invite h1 {
  font-size: clamp(1.625rem, 0.5rem + 7vw, 2.25rem);
  overflow-wrap: break-word;
}

.invite .lede {
  margin-bottom: 1.25rem;
}

.invite .btn {
  width: 100%;
}

.inapp {
  margin: 0 0 0.75rem;
}

/* Three real screens: a strip to swipe on a phone (edge to edge, snapping), side by side from 40rem. */
.peek {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62%;
  gap: 0.75rem;
  margin: 1.5rem -1rem 0;
  padding: 0 1rem 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 1rem;
  list-style: none;
}

.peek:focus-visible {
  outline: 0.1875rem solid currentColor;
  outline-offset: -0.1875rem;
}

.peek li {
  scroll-snap-align: start;
}

.peek figure {
  margin: 0;
}

.peek img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgb(var(--border));
  border-radius: 1.25rem;
}

.peek figcaption {
  margin-top: 0.5rem;
  font-weight: 700;
  line-height: 1.3;
}

/* The facts: chips that wrap whole. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgb(var(--surface-2));
  font-size: 0.9375rem;
  font-weight: 700;
}

/*
 * The steps: numbered (the bib circles), each a title, a short note and its button, then (once they all exist) its
 * phone screenshots with their tap targets ringed (an SVG over the image, in its own pixels).
 */

.how-intro {
  margin: 0.5rem 0 0;
  color: rgb(var(--text-muted));
}

.how {
  counter-reset: step;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.how > li {
  counter-increment: step;
  display: grid;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgb(var(--border));
}

.how > li:first-child {
  border-top: 0;
  padding-top: 0.5rem;
}

.how-title {
  position: relative;
  margin: 0;
  padding: 0.75rem 0 0 3.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.how-note {
  margin: 0.375rem 0 0;
  padding-left: 3.25rem;
  color: rgb(var(--text-muted));
  font-size: 0.9375rem;
  line-height: 1.45;
}

.how-go {
  margin: 0.875rem 0 0;
  padding-left: 3.25rem;
}

.how-go .btn {
  width: 100%;
}

.how-title::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgb(var(--primary));
  color: rgb(var(--on-primary));
  font-weight: 900;
}

/* A step's screenshots: under its button, side by side; in line with the step's text from 30rem. */
.shots {
  display: flex;
  gap: 0.75rem;
}

.shot {
  position: relative;
  flex: 0 1 13.5rem;
  min-width: 0;
  margin: 0;
}

@media (min-width: 30rem) {
  .shots {
    margin-left: 3.25rem;
  }
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgb(var(--border));
  border-radius: 1.25rem;
}

.tap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.tap rect {
  fill: none;
  stroke: rgb(var(--danger));
  stroke-width: 3.5px;
  vector-effect: non-scaling-stroke;
}

@media (min-width: 40rem) {
  .peek {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 0;
    padding: 0;
    overflow: visible;
  }
}

/*
 * The invite pages (/join, /e, /f, /app; #117, the lab's InviteLanding): one centred column. Who invited you and to what on a
 * rounded ink panel inset in it (light on ink in both modes, like the app's invite door), the card the app shows, then
 * Get the app: the switch, the steps and their buttons all as wide as the column.
 */
.link-page {
  padding-bottom: 2rem;
}

.link-page .inapp {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
  background: rgb(var(--surface));
  font-size: 0.875rem;
  font-weight: 600;
}

.link-page .btn {
  border-radius: 0.75rem;
  width: 100%;
}

.link-page .inapp .btn {
  width: auto;
}

.link-page h2 {
  margin: 1.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.landing {
  /* Ink and its light text stay the same in dark mode: --bg turns dark there, so the lines on ink use this. */
  --on-ink: 247 247 245;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid transparent;
  border-radius: 1.5rem;
  background: rgb(var(--ink));
  color: rgb(var(--yellow));
}

@media (prefers-color-scheme: dark) {
  .landing {
    border-color: rgb(var(--border));
  }
}

.landing p,
.landing h1 {
  margin: 0;
}

.landing .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(var(--on-ink));
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.landing #heading {
  font-size: 1.875rem;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.landing #line,
.landing #bad {
  color: rgb(var(--on-ink));
  font-weight: 600;
}

#card:empty {
  display: none;
}

.face,
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(var(--border));
  border-radius: 999px;
  background: rgb(var(--surface-2));
  color: rgb(var(--text));
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* The race on ink (the lab's RaceCard, onInk): chips, the name, the day ribbon, who wins, faces and a stamp. */
.rcard {
  --tick: var(--yellow);
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgb(var(--on-ink) / 0.2);
  border-radius: 1.5rem;
  background: rgb(var(--on-ink) / 0.1);
  color: rgb(var(--on-ink));
}

@media (prefers-color-scheme: dark) {
  .rcard {
    border-color: rgb(var(--border));
    background: rgb(var(--surface));
  }
}

.rcard p {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.75rem;
  padding: 0 0.5rem;
  border: 1px solid rgb(var(--on-ink) / 0.4);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .chip {
    border-color: rgb(var(--border));
  }
}

.icon {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
}

.rcard-name {
  color: rgb(var(--yellow));
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.ribbon {
  display: flex;
  gap: 0.25rem;
  height: 0.75rem;
}

.tick {
  flex: 1;
  border-radius: 0.125rem;
  background: rgb(var(--tick));
}

.tick.off {
  background: rgb(var(--on-ink) / 0.25);
}

.rcard-dates {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: -0.375rem !important;
  color: rgb(var(--on-ink) / 0.8);
  font-size: 0.75rem;
  font-weight: 700;
}

.rcard-win {
  color: rgb(var(--yellow));
  font-size: 1.125rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rcard-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.faces {
  display: flex;
  align-items: center;
}

.faces .avatar + .avatar {
  margin-left: -0.5rem;
}

.faces .more {
  margin-left: 0.5rem;
  color: rgb(var(--on-ink) / 0.8);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Joining closed or Ended, stamped at the faces' right end (the lab's Stamp). */
.stamp {
  margin-left: auto;
  padding: 0.25rem 0.625rem;
  border: 0.1875rem solid rgb(var(--yellow));
  border-radius: 0.5rem;
  color: rgb(var(--yellow));
  font-size: 1.125rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  transform: rotate(-6deg);
}

/* The event as the app lists it (the lab's EventCard): a light card, its medal, title and status, goal, dates, Join. */
.ecard {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
  background: rgb(var(--surface));
  color: rgb(var(--text));
}

.ecard p {
  margin: 0;
}

.ecard-body {
  display: grid;
  flex: 1;
  gap: 0.25rem;
  min-width: 0;
}

.ecard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.ecard-title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
}

.ecard-goal {
  font-weight: 600;
}

.ecard-dates,
.ecard .card-by {
  color: rgb(var(--text-muted));
  font-size: 0.875rem;
}

.ecard .card-by {
  font-weight: 600;
}

.ecard-act {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem !important;
}

.badge {
  flex: none;
  padding: 0.125rem 0.625rem;
  border: 1px solid rgb(var(--border));
  border-radius: 999px;
  background: rgb(var(--surface-2));
  font-size: 0.8125rem;
  font-weight: 600;
}

.badge-strong {
  border-color: rgb(var(--primary));
  background: rgb(var(--primary));
  color: rgb(var(--on-primary));
}

.badge-warning {
  color: rgb(var(--warning));
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: rgb(var(--primary));
  color: rgb(var(--on-primary));
  font-weight: 700;
  text-decoration: none;
}

.pill-closed {
  background: rgb(var(--surface-2));
  color: rgb(var(--text-muted));
}

/* The event's medal (the lab's EventMedal, md): the ribbon's V over a disc in its tone, the kind's icon on it. */
.medal {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  width: 3.5rem;
  color: rgb(var(--text));
}

.medal-ribbon {
  width: 3.5rem;
  height: 1.5rem;
}

.medal-disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-top: -0.4rem;
  border: 0.1875rem solid rgb(var(--ink));
  border-radius: 999px;
  background: rgb(var(--yellow));
  color: rgb(var(--ink));
}

.medal-disc .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.medal-count {
  font-weight: 900;
}

.medal-ink .medal-disc {
  border-color: rgb(var(--yellow));
  background: rgb(var(--ink));
  color: rgb(var(--yellow));
}

.medal-pale .medal-disc {
  border-color: rgb(var(--text));
  background: rgb(var(--accent));
  color: rgb(var(--text));
}

/* A partner's event wears its brand's colours (only its #rrggbb tokens, set by the page's script). */
.card-brand .medal-disc {
  border-color: var(--brand-primary, rgb(var(--ink)));
  background: var(--brand-tint, rgb(var(--yellow)));
  color: var(--brand-primary, rgb(var(--ink)));
}

.card-brand .pill:not(.pill-closed) {
  background: var(--brand-primary, rgb(var(--primary)));
  color: var(--brand-on-primary, rgb(var(--on-primary)));
}

.landing-steps {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.landing-steps li {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.landing-steps .num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgb(var(--yellow));
  color: rgb(var(--ink));
  font-weight: 900;
}

.landing-steps li > div {
  flex: 1;
  min-width: 0;
}

.landing-steps h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1rem;
}

.landing-steps p {
  margin: 0;
}

/* The come-back lines (under step 2, under the iPhone's beta): an instruction, so the text's own colour, not muted. */
.link-page .come-back {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.open {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  font-weight: 700;
}

/* The open host's "no app yet" line (#no-app), right under Get the app: what to do instead of opening the app. */
.link-page .no-app {
  margin: 0.75rem 0 0;
  font-weight: 700;
}

/* Under it, the quiet way in for an app too old to claim the open host: a muted link, still a full touch target. */
.link-page .no-app-open {
  margin: 0;
  font-size: 0.9375rem;
}

.link-page .no-app-open a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  color: rgb(var(--text-muted));
  font-weight: 600;
}

/* An install button copied the link: said in place, under it (never a toast). */
.link-page .copied {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* A computer: the link's QR code for a phone's camera, dark on light in both themes so every camera reads it. */
.qr {
  margin: 1.5rem 0 0;
  display: grid;
  justify-items: start;
  gap: 0.5rem;
}

.qr svg {
  width: 11rem;
  height: 11rem;
  border-radius: 0.75rem;
}

.qr-bg {
  fill: white;
}

.qr-ink {
  fill: rgb(var(--ink));
}

.qr figcaption {
  color: rgb(var(--text-muted));
  font-size: 0.9375rem;
}
