/* MyTrainApp · "Noche de bosque": the athletics track painted forest green, under the lights.
   Big Shoulders Display for what has to be read from across the gym, Geologica for the rest.
   Both self-hosted under the SIL Open Font License (see fonts/*-OFL.txt). */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/BigShouldersDisplay-latin-ext.030b66f1bb3f.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  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;
}
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/BigShouldersDisplay-latin.e1ffd6608051.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  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: "Geologica";
  src: url("../fonts/Geologica-latin-ext.a1091c3b669f.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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;
}
@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-latin.429fc8a75e26.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --page: #0e1f17;
  --sheet: #15291f;
  --ink: #f2eeea;
  --soft: #a9b8af;
  --rule: #24382d;
  --edge: #5f7468; /* the outline of a control: 3:1 against the page */
  --track: #1b4a35;
  --on-track: #ffffff;
  --on-track-soft: #f7c6d6;
  --infield: #24563f;
  --line: #ff8fb3;
  --accent: #ff8fb3;
  --accent-deep: #ff6f9c;
  --on-accent: #0e1f17;
  --up: #7bd6a0;
  --warn: #f3b15a;
  --late: #ff7a7a;
  --bar: #08140f;
  --on-bar: #f2eeea;
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--edge) transparent; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
/* Headings are painted on the track: tall, narrow, uppercase. */
h1, h2, .display {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  line-height: 0.94; letter-spacing: 0.005em;
}
h1 { font-size: 3rem; overflow-wrap: anywhere; }
h2 { font-size: 2.125rem; }
h3 { font-size: 1.125rem; line-height: 1.25; font-weight: 620; }
p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
input, textarea { caret-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.icon {
  flex: none; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon--small { width: 16px; height: 16px; vertical-align: -3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Brand bar ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 0 16px;
  background: var(--bar); color: var(--on-bar);
}
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 680px; margin: 0 auto; }
.logo {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 900 1.375rem/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--on-bar); text-decoration: none;
}
.logo b { color: var(--accent); font-weight: 900; }
.bar__link, .bar__out {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  border: 0; background: none; cursor: pointer;
  color: var(--on-bar); font-size: 0.8125rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.bar__link:hover, .bar__out:hover { text-decoration-thickness: 2px; }
.bar__clock { font-size: 0.8125rem; font-weight: 600; }

/* ---------- The track: forest-green tartan, finely dotted ---------- */
.track {
  position: relative; overflow: hidden;
  background-color: var(--track); color: var(--on-track);
  background-image: radial-gradient(rgb(0 0 0 / 0.1) 1px, transparent 1.4px);
  background-size: 5px 5px;
}
.track__in { position: relative; max-width: 680px; margin: 0 auto; padding: 24px 20px 28px; }
.track p { color: var(--on-track-soft); }
.track a:not(.cta) { color: var(--on-track); }
.track :focus-visible { outline-color: var(--on-track); }

.kick {
  display: inline-block; padding: 5px 10px;
  background: var(--bar); color: var(--on-bar);
  font: 700 0.9375rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn, .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 0;
  background: var(--accent); color: var(--on-accent);
  font: 800 1.25rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color 150ms, transform 120ms var(--ease-out);
}
.btn:hover, .cta:hover { background: var(--accent-deep); }
.btn:active, .cta:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: 1.125rem; flex: none; }
.btn--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--edge); }
.btn--quiet:hover { background: var(--sheet); box-shadow: inset 0 0 0 2px var(--soft); }
.btn--wide { width: 100%; }

/* The big call to action on the track: full width, label left, arrow right. */
.cta { justify-content: space-between; width: 100%; min-height: 54px; padding: 0 18px; font-size: 1.375rem; }
.cta span { font-family: var(--font); font-weight: 400; font-size: 1.375rem; }
.cta--line { background: transparent; color: var(--on-track); box-shadow: inset 0 0 0 2px var(--line); }
.cta--line:hover { background: rgb(255 143 179 / 0.12); }
.ctas { display: grid; gap: 10px; margin-top: 22px; max-width: 420px; }

.link {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 0.9375rem; color: var(--soft);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.link:hover { color: var(--ink); }
.link--danger { color: var(--late); }
.link--danger:hover { color: var(--late); text-decoration-thickness: 2px; }

/* ---------- Panel shell ---------- */
.page { max-width: 680px; margin: 0 auto; padding: 24px 16px 72px; }

.heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-bottom: 20px;
}
.heading h1, .heading h2 { overflow-wrap: anywhere; }
.heading--sub { align-items: center; margin-bottom: 6px; }
.heading--hero h1 { font-size: 3.625rem; }

.lead { margin-top: 10px; color: var(--soft); }

.back {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; margin: -10px 0 6px -4px; padding-right: 8px;
  font-size: 0.875rem; color: var(--soft); text-decoration: none;
}
.back .icon { width: 18px; height: 18px; }
.back:hover { color: var(--ink); }

/* ---------- Messages ---------- */
.notice {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 20px; padding: 12px 14px;
  background: var(--infield); color: var(--ink);
  box-shadow: inset 4px 0 0 var(--up);
  font-size: 0.9375rem;
}
.notice .icon { margin-top: 1px; color: var(--up); }
.notice code { font-size: 0.875em; }
.error { margin: 6px 0 0; color: var(--late); font-size: 0.875rem; font-weight: 500; }

/* ---------- Lists ---------- */
.filters { display: grid; gap: 12px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--edge); border-radius: 0;
  background: transparent; cursor: pointer;
  font: 800 1rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  transition: background-color 150ms, border-color 150ms;
}
.chip:hover { border-color: var(--soft); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--page); }

.roster { list-style: none; margin: 0; padding: 0; }
.roster li { border-bottom: 1px solid var(--rule); }
.roster__row {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 12px 0;
  color: var(--ink); text-decoration: none;
}
.roster__row:hover .roster__name { text-decoration: underline; text-underline-offset: 4px; }
.roster__name { flex: 1; min-width: 0; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.roster__meta { font-size: 0.8125rem; color: var(--soft); text-align: right; }
.roster__row .icon { width: 18px; height: 18px; color: var(--edge); }
.roster__row:hover .icon { color: var(--soft); }
.roster__row.is-off .roster__name { color: var(--soft); font-weight: 400; }

/* The trainer's list of students: name and badge on top, modality underneath. */
.students { list-style: none; margin: 8px 0 0; padding: 0; }
.students li { border-bottom: 1px solid var(--rule); }
.student {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  min-height: 72px; padding: 14px 0;
  color: var(--ink); text-decoration: none;
}
.student:hover .student__name { text-decoration: underline; text-underline-offset: 4px; }
.student__name { min-width: 0; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.student__meta { grid-column: 1; font-size: 0.8125rem; color: var(--soft); }
.student .badge { grid-column: 2; grid-row: 1 / span 2; }
.student.is-off .student__name { color: var(--soft); font-weight: 400; }

.badge {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px;
  font: 800 1rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  color: var(--soft);
}
.badge--overdue { background: var(--late); color: var(--bar); }
.badge--soon { color: var(--ink); box-shadow: inset 0 0 0 2px var(--warn); }

/* What students logged on their own today, for the trainer to look over. */
.review { display: block; margin-top: 24px; padding: 16px; background: var(--bar); color: var(--on-bar); }
.review h2 { font-size: 1.875rem; }
.review ul { list-style: none; margin: 8px 0 0; padding: 0; }
.review a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; color: var(--on-bar); font-size: 0.875rem; text-decoration: none;
}
.review a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.review .icon { width: 18px; height: 18px; color: var(--accent); }

.empty { margin: 24px 0; color: var(--soft); }
.empty--first { padding: 28px 20px; border: 2px dashed var(--rule); }
.empty--first p:first-child { margin-bottom: 4px; color: var(--ink); font-size: 1.125rem; font-weight: 620; }

.block { margin-top: 36px; }
.hint { margin-top: 4px; font-size: 0.875rem; color: var(--soft); }
.prose { margin-top: 8px; max-width: 65ch; }

.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--rule); }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 0.8125rem; color: var(--soft); }
.facts dd { margin: 2px 0 0; font-weight: 560; overflow-wrap: anywhere; }

.tag {
  display: inline-block; margin: -8px 0 12px; padding: 4px 10px;
  box-shadow: inset 0 0 0 2px var(--edge);
  font: 800 0.9375rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft);
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; margin-top: 22px; }
.form--tight { gap: 16px; margin-top: 14px; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
label, legend { padding: 0; font-size: 0.9375rem; font-weight: 560; }
.optional { font-size: 0.8125rem; font-weight: 400; color: var(--soft); }
.field .hint { margin: 0; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"],
input[type="date"], input[type="url"], input[type="tel"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1.5px solid var(--edge); border-radius: 0;
  background: var(--sheet); color: var(--ink);
  transition: border-color 150ms, box-shadow 150ms;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--soft); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--soft); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(255 143 179 / 0.25);
}
input[readonly] { background: var(--bar); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.choices--stack { grid-template-columns: 1fr; }
.choice { position: relative; font-weight: 500; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 12px; text-align: center;
  border: 1.5px solid var(--edge); background: var(--sheet);
  transition: background-color 150ms, border-color 150ms;
}
.choices--stack .choice span { justify-content: flex-start; text-align: left; }
.choice:hover span { border-color: var(--soft); }
.choice input:checked + span {
  border-color: var(--accent); background: rgb(255 143 179 / 0.12);
  box-shadow: inset 0 0 0 1px var(--accent); font-weight: 620;
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }

.inline-form { display: flex; gap: 10px; margin-top: 12px; }
.inline-form select, .inline-form input { flex: 1; min-width: 0; }

.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.copy-row div { display: grid; gap: 2px; min-width: 0; }
.copy-row .roster__meta { text-align: left; }

/* ---------- A routine, as the trainer edits it ---------- */
.plan { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: plan; border-top: 1px solid var(--rule); }
.plan__item {
  counter-increment: plan;
  display: grid; grid-template-columns: 2rem 1fr auto; gap: 4px 8px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.plan__item::before { content: counter(plan); font: 900 1.75rem/0.9 var(--display); color: var(--accent); }
.plan__main { display: grid; gap: 2px; min-width: 0; }
.plan__name { font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.plan__dose { font: 800 1.25rem/1.1 var(--display); letter-spacing: 0.03em; }
.plan__note { font-size: 0.875rem; color: var(--soft); overflow-wrap: anywhere; }
.plan__tools { display: flex; align-items: center; gap: 6px; }
.plan__tools form { display: flex; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 1.5px solid var(--edge);
  background: transparent; cursor: pointer;
  font-size: 0.875rem; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: background-color 150ms, border-color 150ms;
}
.tool:hover:not(:disabled) { border-color: var(--soft); background: var(--sheet); }
.tool:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 439px) {
  .plan__item { grid-template-columns: 2rem 1fr; }
  .plan__tools { grid-column: 2; margin-top: 6px; }
}

/* ---------- A session's loads: compact, so the whole sheet fits one phone screen ---------- */
.loads { list-style: none; margin: 0; padding: 0 0 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.loads__item { display: grid; gap: 6px; padding: 4px 0; }
.loads__item--first { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--rule); }
.loads__item--first:first-child { margin-top: 0; border-top: 0; }
.set { display: grid; grid-template-columns: 3.75rem 1fr 1fr; gap: 8px; align-items: center; }
.set__n { font-size: 0.8125rem; color: var(--soft); }
.loads__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.loads__name { font-weight: 600; overflow-wrap: anywhere; }
.loads__prev { flex: none; font-size: 0.8125rem; color: var(--soft); }
.unit { position: relative; display: block; }
.unit input { min-height: 44px; padding-right: 3.25rem; }
.unit__label {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-size: 0.875rem; font-weight: 400; color: var(--soft); pointer-events: none;
}

/* ---------- When a plan runs out (student detail) ---------- */
.due { display: block; }
.due--line { margin-top: 4px; font-size: 0.9375rem; color: var(--soft); }
.due--soon { color: var(--warn); font-weight: 560; }
.due--overdue { color: var(--late); font-weight: 560; }

/* ---------- The student's page ---------- */
.me h1 { font-size: clamp(3.25rem, 17vw, 4.5rem); }
.big { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; }
.big b { font: 900 clamp(3.25rem, 16vw, 4.25rem)/0.85 var(--display); text-transform: uppercase; color: var(--on-track); }
.big span { max-width: 9.5rem; font-size: 0.875rem; line-height: 1.3; color: var(--on-track-soft); }
.me__line { margin-top: 12px; max-width: 22rem; font-size: 0.9375rem; }

/* One box per session of the month: solid when they came, outlined when they missed it. */
.laps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.laps i { width: 18px; height: 28px; background: var(--line); }
.laps i.miss { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.laps span { margin-left: 6px; font-size: 0.8125rem; line-height: 1.3; color: var(--on-track-soft); }

.rows { list-style: none; margin: 0; padding: 0; }
.row { padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
.row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.row__name { min-width: 0; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.row__delta { flex: none; text-align: right; font: 900 1.75rem/1 var(--display); color: var(--up); }
.row__delta--flat { font-size: 1.375rem; color: var(--soft); text-transform: uppercase; }
.row__delta--first { font: 500 0.8125rem/1.3 var(--font); color: var(--soft); }
.row__delta small { display: block; margin-top: 2px; font: 400 0.75rem/1.2 var(--font); color: var(--soft); }
/* The load as a bar: where it started in a darker pink, what was added in full pink. */
.meter {
  position: relative; height: 12px; margin-top: 10px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 2px, transparent 2px 10%);
}
.meter__now, .meter__start { position: absolute; left: 0; top: 0; bottom: 0; }
.meter__now { width: var(--now); background: var(--accent); }
.meter__now::after { content: ""; position: absolute; right: -2px; top: -4px; bottom: -4px; width: 4px; background: var(--ink); }
.meter__start { width: var(--start); background: #b9577a; }
.row__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; font-size: 0.75rem; color: var(--soft); }
.row__foot span:last-child { color: var(--ink); text-align: right; }

/* The student's two tabs: fixed to the thumb on a phone, under the track on a wider screen. */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--sheet); border-top: 1px solid var(--rule);
}
.tabbar a {
  display: grid; place-items: center;
  font: 800 1.125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--soft); text-decoration: none;
  transition: color 150ms;
}
.tabbar a:hover { color: var(--ink); }
.tabbar a[aria-current] { color: var(--ink); box-shadow: inset 0 4px 0 var(--accent); }

.page--student { padding: 8px 20px 104px; }
.basis { font-size: 0.8125rem; color: var(--soft); }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--edge);
  font: 800 1.0625rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.jump a:hover { border-color: var(--soft); }
.routine { scroll-margin-top: 16px; padding-top: 16px; }
.routine + .routine { margin-top: 32px; }
.routine__log { margin-top: 18px; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: step; border-top: 3px solid var(--ink); }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 2.25rem 1fr auto; gap: 2px 10px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.step::before { content: counter(step); grid-row: span 2; font: 900 2rem/0.85 var(--display); color: var(--accent); }
.step__name { font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.step__dose { grid-column: 3; grid-row: 1; text-align: right; font: 800 1.375rem/1 var(--display); letter-spacing: 0.03em; white-space: nowrap; }
.step__note { grid-column: 2; font-size: 0.875rem; color: var(--soft); overflow-wrap: anywhere; }
.step__last { grid-column: 3; grid-row: 2; text-align: right; font-size: 0.8125rem; color: var(--soft); white-space: nowrap; }
.step__video {
  grid-column: 2 / -1; justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin: 4px 0 -6px -2px; padding: 0 2px;
  font-size: 0.9375rem; font-weight: 600; color: var(--accent); text-decoration: none;
}
.step__video:hover { text-decoration: underline; text-underline-offset: 3px; }

.fineprint { margin-top: 40px; font-size: 0.8125rem; color: var(--soft); }

/* ---------- Login ---------- */
.page--login { max-width: 420px; padding: 28px 20px 72px; }

/* ---------- The public page ---------- */
.hero h1 { margin-top: 18px; font-size: clamp(2.75rem, 13.5vw, 4.75rem); overflow-wrap: normal; }
.hero p { margin-top: 16px; max-width: 21rem; }
/* The start of a race: three lanes with their painted numbers, under the content. */
.strip { margin: 28px -20px -28px; border-top: 3px solid var(--line); }
.strip div { position: relative; height: 34px; border-bottom: 3px solid var(--line); }
.strip div::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(40px + var(--o) * 26px); width: 3px; background: var(--line); }
.strip b { position: absolute; left: calc(52px + var(--o) * 26px); top: 3px; font: 900 1.75rem/1 var(--display); color: var(--line); }

.page--home { padding-top: 8px; }
.home-block { padding: 30px 0 6px; }
.home-block h2 { font-size: 2.75rem; }
.home-block h2 small {
  display: block; margin-bottom: 8px;
  font: 700 0.875rem/1.2 var(--font); letter-spacing: 0.12em; color: var(--accent);
}
.home-block > p { margin-top: 10px; max-width: 60ch; }

/* How it works: a staggered start, one lane per step. */
.lanes { list-style: none; margin: 18px 0 0; padding: 0; border-top: 3px solid var(--ink); }
.lane {
  display: grid; grid-template-columns: 54px 1fr; gap: 12px;
  padding: 14px 0 14px calc(var(--s) * 14px); border-bottom: 3px solid var(--ink);
}
.lane i { font: 900 3.375rem/0.8 var(--display); font-style: normal; color: var(--accent); }
.lane b { display: block; font: 800 1.5rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.lane span { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--soft); }

.modes { display: grid; gap: 12px; margin-top: 18px; }
.mode { padding: 18px; background: var(--infield); }
.mode + .mode { background: var(--bar); }
.mode h3 { font: 900 1.875rem/1 var(--display); text-transform: uppercase; }
.mode p { margin-top: 6px; font-size: 0.875rem; color: var(--ink); opacity: 0.9; }

.finale { margin-top: 30px; }
.finale h2 { font-size: 3.375rem; }
.finale p { margin-top: 12px; }
.finale .ctas { margin-top: 18px; }

.home-foot { max-width: 680px; margin: 0 auto; padding: 24px 16px 40px; font-size: 0.875rem; color: var(--soft); }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  .bar { padding: 0 32px; }
  .page { padding-top: 40px; }
  h1 { font-size: 3.5rem; }
  .heading--hero h1 { font-size: 4.25rem; }
  .filters { grid-template-columns: 1fr auto; align-items: center; }
  .track__in { padding: 36px 20px 36px; }
  .strip { margin: 36px -20px -36px; }
  .modes { grid-template-columns: 1fr 1fr; }

  .tabbar {
    position: static; display: flex; gap: 28px;
    max-width: 680px; height: auto; margin: 0 auto; padding: 0 20px;
    border: 0; background: none;
  }
  .tabbar a { min-height: 52px; padding: 0 2px; }
  .page--student { padding-top: 20px; padding-bottom: 72px; }
}

/* ---------- Motion ---------- */
/* One arrival, once: the bars fill like a lap being run. The resting state is the visible one. */
@media (prefers-reduced-motion: no-preference) {
  .meter__now, .meter__start { animation: bar-fills 800ms var(--ease-out) both; transform-origin: left; }
  .meter__now { animation-delay: 150ms; }
  .laps i { animation: lap-lands 280ms var(--ease-out) calc(var(--i, 0) * 45ms) both; }
}
@keyframes bar-fills { from { transform: scaleX(0); } }
@keyframes lap-lands { from { opacity: 0; transform: translateY(6px); } }

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