/* Noah Grimé, Fit Dad Revive. Tokens written for him: ground from the laundry basket, ink and cyan from his
   Race for Impact graphic, teal from his link image. Display Alfa Slab One, body Public Sans. */
:root {
  --ground: #eef4f5;
  --ground-2: #dfe9ec;
  --ink: #14191b;
  --ink-soft: #3a474c;
  --teal: #00677f;
  --teal-deep: #004d5f;
  --cyan: #00cefe;
  --cyan-soft: #8fe6fb;
  --bib: #ffffff;
  --white: #ffffff;
  --err: #a3261b;
  --rule-dark: rgba(238, 244, 245, 0.2);
  --station-dark: rgba(238, 244, 245, 0.38);
  --station-light: #a7babf;
  --run-tint: rgba(0, 206, 254, 0.1);
  --line: #c3d3d7;
  --on-dark: #eef4f5;
  --on-dark-soft: #b9c9cd;
  --focus-light: #00677f;
  --focus-dark: #00cefe;
  --display: "Alfa Slab One", "Rockwell", "Roboto Slab", serif;
  --body: "Public Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.4vw, 2.9rem);
  --step-4: clamp(2.1rem, 1.5rem + 3.2vw, 3.8rem);
  --s1: 0.5rem; --s2: 0.75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2rem; --s6: 3rem; --s7: 4.5rem; --s8: 6.5rem;
  --gutter: max(1rem, env(safe-area-inset-left));
  --radius: 6px;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pin: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-mid: 520ms;
  --t-slow: 900ms;
  --shadow: 0 10px 24px -12px rgba(20, 25, 27, 0.45);
  --maxw: 72rem;
}

@font-face {
  font-family: "Alfa Slab One";
  src: url("../fonts/alfa-slab-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400; 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: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.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;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.55;
  font-synthesis: none; overflow-x: clip; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
::selection { background: var(--cyan); color: var(--ink); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus-light); outline-offset: 3px;
}
.dark a:focus-visible, .dark button:focus-visible, .dark input:focus-visible, .dark summary:focus-visible { outline-color: var(--focus-dark); }
h1, h2, h3 {
  font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -0.005em;
  text-wrap: balance; overflow-wrap: break-word; min-width: 0; margin: 0;
}
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: var(--s3); top: -4rem; z-index: 50; background: var(--ink); color: var(--on-dark); padding: var(--s2) var(--s3); border-radius: var(--radius); }
.skip:focus-visible { top: var(--s2); }

/* Header */
.head {
  position: relative; top: 0; z-index: 30; background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.head-in {
  max-width: var(--maxw); margin: 0 auto; height: 3.5rem;
  padding: 0 var(--gutter); display: flex; align-items: center; gap: var(--s2);
}
.js .head { position: sticky; }
.mark { font-family: var(--display); font-size: clamp(1rem, 0.6rem + 2vw, 1.25rem); text-decoration: none; margin-right: auto; white-space: nowrap; display: flex; align-items: center; min-height: 44px; }
.links { display: none; }
.links a { text-decoration: none; padding: 0 var(--s2); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--teal); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 1.15rem; border-radius: var(--radius);
  font: 700 1rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 2px solid var(--ink); background: var(--cyan); color: var(--ink);
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-ink { background: var(--ink); color: var(--on-dark); }
.head .btn { min-height: 44px; padding: 0 clamp(0.55rem, 0.2rem + 1.5vw, 0.9rem); font-size: clamp(0.85rem, 0.62rem + 1.1vw, 0.95rem); }
.head-in { gap: clamp(0.35rem, 1.5vw, 0.75rem); }
.menu-btn {
  display: none; min-width: 44px; min-height: 44px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); place-items: center; cursor: pointer; padding: 0;
}
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--on-dark); }
.js .menu-btn { display: inline-grid; }
.sheet { border-top: 1px solid var(--line); background: var(--ground); }
.js .sheet { display: none; }
.js .sheet.open { display: block; }
.sheet ul { list-style: none; margin: 0; padding: var(--s2) var(--gutter) var(--s4); max-width: var(--maxw); margin-inline: auto; }
.sheet a { display: flex; align-items: center; min-height: 52px; font-family: var(--display); font-size: 1.45rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.sheet a[aria-current="page"] { color: var(--teal); }
.lane-progress { height: 3px; background: var(--cyan); transform: scaleX(0); transform-origin: 0 50%; position: absolute; left: 0; right: 0; bottom: -2px; display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .lane-progress { display: block; animation: lane-grow linear both; animation-timeline: scroll(root); }
  }
}
@keyframes lane-grow { to { transform: scaleX(1); } }

/* Page tops: his station photo, then the bib */
.top { position: relative; }
.top-photo { position: relative; overflow: hidden; background: var(--ink); height: 62svh; min-height: 330px; max-height: 640px; }
.top-photo img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; left: var(--gutter); bottom: var(--s3); z-index: 2;
  background: var(--ink); color: var(--on-dark); font-weight: 700; font-size: var(--step--1);
  padding: 0.35rem 0.6rem 0.35rem 0.55rem; border-radius: 4px; border-left: 4px solid var(--cyan);
}
.bib {
  position: relative; background: var(--bib); color: var(--ink); border: 2px solid var(--ink);
  border-radius: var(--radius-lg); padding: 1.15rem 1.1rem 1.1rem; box-shadow: var(--shadow);
}
.bib::before, .bib::after {
  content: ""; position: absolute; top: 0.6rem; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ground-2); border: 2px solid var(--ink);
}
.bib::before { left: 0.6rem; } .bib::after { right: 0.6rem; }
.bib-pins::before, .bib-pins::after {
  content: ""; position: absolute; bottom: 0.6rem; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ground-2); border: 2px solid var(--ink);
}
.bib-pins::before { left: 0.6rem; } .bib-pins::after { right: 0.6rem; }
.bib-strip {
  display: flex; justify-content: space-between; gap: var(--s2); margin: 0 1rem var(--s2);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
}
.top .bib { margin: -4.5rem var(--gutter) 0; z-index: 3; }
.top h1 { font-size: var(--step-3); }
.lead { margin-top: var(--s2); color: var(--ink-soft); }
.name-line { font-weight: 700; margin-bottom: 0.35rem; }

/* Home hero: the photo fills the screen and the bib is pinned on it */
.hero { position: relative; background: var(--ink); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; }
.hero > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.hero .tag { top: var(--s3); bottom: auto; }
.hero .bib { margin: clamp(16rem, 36svh, 26rem) var(--gutter) var(--s4); z-index: 3; max-width: 34rem; }
.hero h1 { font-size: clamp(1.85rem, 1.2rem + 3vw, 3.2rem); }
.hero .lead { font-size: 0.98rem; line-height: 1.45; }

/* The sign-up form */
.signup { margin-top: var(--s3); }
.signup label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.field-row { display: flex; gap: var(--s1); }
.field-row input {
  flex: 1 1 auto; min-width: 0; min-height: 50px; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 0 0.8rem; font: 500 1rem var(--body); color: var(--ink); background: var(--bib);
}
.field-row .btn { flex: 0 0 auto; min-height: 50px; }
.signup .under { margin-top: 0.45rem; font-size: var(--step--1); color: var(--ink-soft); }
.signup .err { margin-top: 0.4rem; font-size: var(--step--1); font-weight: 700; color: var(--err); }
.done { display: none; }
.done.show { display: block; margin-top: var(--s3); }
.done h3 { font-size: var(--step-2); }
.done .day1 { margin-top: var(--s2); border: 2px solid var(--ink); border-radius: var(--radius); padding: var(--s2) var(--s3); background: var(--ground); display: flex; gap: var(--s3); align-items: flex-start; }
.heat-no { font-family: var(--display); font-size: 3rem; line-height: 0.9; color: var(--teal); }
.heat-go { font-size: var(--step-2); color: var(--white); }
.done .day1 strong { font-family: var(--display); font-weight: 400; font-size: 1.15rem; display: block; line-height: 1.15; margin-bottom: 0.2rem; }
.done .sig { margin-top: var(--s2); font-family: var(--display); font-size: 1.1rem; }
.done .preview-line { margin-top: var(--s2); font-size: var(--step--1); color: var(--ink-soft); }
.bib.is-done { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .bib.pinned { animation: pin var(--t-mid) var(--ease-pin) both; }
}
@keyframes pin { from { transform: translateY(-14px) rotate(-2.5deg) scale(1.02); } to { transform: none; } }

/* Sections */
main { display: block; }
.sec { padding: var(--s7) var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.sec + .sec { padding-top: var(--s4); }
.sec h2 { font-size: var(--step-3); }
.sec h2 + p, .sec h2 + .prose { margin-top: var(--s3); }
.prose { max-width: 38rem; }
.prose p + p { margin-top: var(--s3); }
.quote { font-family: var(--display); font-size: var(--step-2); line-height: 1.15; }
.quote-src { display: block; margin-top: var(--s2); font-family: var(--body); font-size: var(--step--1); color: var(--ink-soft); }
.dark { background: var(--ink); color: var(--on-dark); }
.dark .quote-src, .dark .lead, .dark .soft { color: var(--on-dark-soft); }
.band { padding: var(--s7) 0; }
.band > .sec { padding-top: 0; padding-bottom: 0; }
.teal { background: var(--teal); color: var(--white); }
.teal a:focus-visible, .teal button:focus-visible { outline-color: var(--white); }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s3); font-weight: 700; text-decoration: underline; text-decoration-color: var(--teal); }
.dark .more { text-decoration-color: var(--cyan); }

/* Photo frames that settle */
.frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 2px solid var(--ink); background: var(--ink); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.cap { font-size: var(--step--1); color: var(--ink-soft); margin-top: var(--s2); }
.dark .cap { color: var(--on-dark-soft); }
.frame > figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 0.6rem 0.8rem; background: var(--ink); color: var(--on-dark); font-size: var(--step--1); line-height: 1.4; }
figure { margin: 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .settle img { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  }
}
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1); } }

/* Station tags with a lane line */
.lane { position: relative; display: inline-block; padding-bottom: 0.4rem; }
.tag.lane { position: absolute; }
.lane::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cyan); transform-origin: 0 50%; }
@media (prefers-reduced-motion: no-preference) {
  .js .lane:not(.is-in)::after { transform: scaleX(0); }
  .js .lane::after { transition: transform var(--t-slow) var(--ease-out) 120ms; }
}

/* Home: dads over 40 */
.split { display: grid; gap: var(--s4); align-items: center; }
.split .frame { aspect-ratio: 4 / 5; }
.dads h2 { font-size: var(--step-2); line-height: 1.12; }

/* Stations strip */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: var(--s3);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: var(--s2) var(--gutter) var(--s3); margin-top: var(--s4); scrollbar-width: thin;
}
.strip > * { scroll-snap-align: start; }
.strip .frame { aspect-ratio: 3 / 4; }
.strip .frame.wide img { object-position: 50% 50%; }
.strip .tag { bottom: var(--s2); left: var(--s2); }

/* The 14 days as a month view: Mon to Sun across, week 1 and week 2 as rows (calendar fix, 1 Dec) */
.cal { width: calc(100% + 6px); max-width: 44rem; margin: var(--s4) -3px 0; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal th { padding: 0 0 0.15rem; font: 800 0.8rem/1.2 var(--body); text-align: center; color: var(--ink-soft); }
.cal abbr { text-decoration: none; }
.cal td { padding: 0; height: 4.25rem; vertical-align: top; }
.cal .c {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.2rem; height: 100%; min-height: 4.25rem;
  padding: 0.3rem 0.15rem 0.35rem 0.2rem; border: 2px solid var(--ink); border-radius: 5px; background: var(--bib); color: var(--ink);
}
.cal .c b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; line-height: 1; }
.cal .c span { display: block; font-weight: 700; font-size: clamp(0.625rem, 0.36rem + 1.3vw, 0.8125rem); line-height: 1.1; letter-spacing: -0.01em; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.cal .s .c { background: var(--cyan); }
.cal .m .c { border-color: var(--station-light); }
.cal .t .c { background: var(--teal); color: var(--white); }
.dark .cal th { color: var(--on-dark-soft); }
.dark .cal .c { background: transparent; border-color: var(--station-dark); color: var(--on-dark); }
.dark .cal .s .c { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.dark .cal .t .c { background: var(--teal); border-color: var(--teal); color: var(--white); }
.cal-key { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); font-size: var(--step--1); color: var(--ink-soft); }
.dark .cal-key { color: var(--on-dark-soft); }
.key { display: inline-flex; align-items: center; gap: 0.4rem; }
.key i { width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--station-light); background: var(--bib); display: inline-block; }
.key i.s, .key i.t { border-color: var(--ink); }
.key i.s { background: var(--cyan); }
.key i.t { background: var(--teal); }
.dark .key i { border-color: var(--station-dark); background: transparent; }
.dark .key i.s { background: var(--cyan); border-color: var(--cyan); }
.dark .key i.t { background: var(--teal); border-color: var(--teal); }
/* the days fill in left to right, row by row, like a lane lighting up */
@media (max-width: 22rem) {
  .cal { width: calc(100% + 4px); margin-inline: -2px; border-spacing: 2px; }
  .cal .c { padding-inline: 0.12rem 0.08rem; }
  .cal .c span { font-size: 0.59rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .cal:not(.cal--week):not(.is-in) .c { clip-path: inset(0 100% 0 0); }
  .js .cal:not(.cal--week) .c { transition: clip-path 380ms var(--ease-out); transition-delay: calc(var(--i, 0) * 55ms); }
}

/* Numbers */
.numbers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s3); margin-top: var(--s4); }
.numbers div { border-top: 3px solid var(--ink); padding-top: var(--s2); }
.numbers b { display: block; font-family: var(--display); font-weight: 400; font-size: var(--step-4); line-height: 1; font-variant-numeric: tabular-nums; }
.numbers span { display: block; margin-top: 0.3rem; font-size: 0.95rem; }

/* Crew strip of client frames, as posted */
.crew { grid-auto-columns: 46%; }
.crew .frame { aspect-ratio: 9 / 16; border-color: var(--on-dark-soft); }

/* Close bands */
.close { padding: var(--s7) var(--gutter); }
.close-in { max-width: 36rem; margin: 0 auto; }
.close h2 { font-size: var(--step-3); }
.ready { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.ready li { padding: 0.65rem 0 0.65rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.ready li::before { content: ""; position: absolute; left: 0; top: 0.95rem; width: 1.1rem; height: 1.1rem; border: 2px solid var(--ink); border-radius: 3px; }
.dark .ready li { border-color: var(--rule-dark); }
.dark .ready li::before { border-color: var(--cyan); }
.close .bib { margin-top: var(--s4); }

/* 14 days: week tabs and day rows */
.tabs { display: flex; gap: var(--s1); margin-top: var(--s4); }
.tabs button {
  min-height: 48px; padding: 0 1.1rem; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--bib);
  font: 700 1rem var(--body); color: var(--ink); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--on-dark); }
.days { list-style: none; margin: var(--s3) 0 0; padding: 0; border-top: 2px solid var(--ink); }
.days li { display: grid; grid-template-columns: 3.4rem 1fr; gap: var(--s2); padding: 0.85rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.days .d { font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--teal); font-variant-numeric: tabular-nums; }
.days .k { display: inline-block; font-weight: 800; font-size: 0.8rem; padding: 0.1rem 0.45rem; border-radius: 3px; margin-bottom: 0.25rem; border: 2px solid var(--ink); }
.days .k.s { background: var(--cyan); }
.days .k.m { background: var(--bib); }
.days .k.t { background: var(--teal); color: var(--white); }
.days li p { font-size: 1rem; }
.panel[hidden] { display: none; }
.note { margin-top: var(--s3); font-size: 0.95rem; color: var(--ink-soft); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); cursor: pointer; font-weight: 700; list-style: none; padding: 0.5rem 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; border-right: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(45deg); flex: none; transition: transform var(--t-fast) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details p { padding: 0 0 var(--s3); max-width: 38rem; }
.faq { margin-top: var(--s4); border-top: 2px solid var(--ink); }

/* Series: build your heat */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.chip {
  min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--bib); color: var(--ink);
  font: 700 1rem var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem;
}
.chip svg { width: 16px; height: 16px; flex: none; }
.chip .i-tick, .chip[aria-pressed="true"] .i-add { display: none; }
.chip[aria-pressed="true"] .i-tick { display: block; }
.chip .i-add { color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.chip[aria-pressed="true"] svg { color: var(--cyan); }
.chip:active { transform: scale(0.97); }
.heat { margin-top: var(--s4); border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--ink); background: var(--ink); color: var(--on-dark); }
.heat-head { background: var(--teal); color: var(--white); padding: var(--s3); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.heat-head h3 { font-size: 1.35rem; }
.count { font-weight: 700; white-space: nowrap; }
.count b { font-family: var(--display); font-weight: 400; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.heat ol { list-style: none; margin: 0; padding: 0; }
.heat li { display: grid; grid-template-columns: 2.6rem 1fr; gap: var(--s2); padding: 0.8rem var(--s3); border-bottom: 1px solid var(--rule-dark); }
.heat li .n { font-family: var(--display); font-size: 1rem; line-height: 1.5; color: var(--cyan); }
/* the heat as one week of his calendar: sessions fixed, chores land on the days between */
.heat-week { padding: var(--s2) 2px; border-bottom: 1px solid var(--rule-dark); }
.cal--week { margin-top: 0; }
.cal--week td { height: 4.5rem; }
.cal--week .c { min-height: 4.5rem; justify-content: flex-start; padding-inline: 0.1rem; }
.cal--week .c span { font-size: clamp(0.5625rem, 0.21rem + 1.7vw, 0.75rem); }
.dark .cal--week .rest .c { border-color: var(--rule-dark); border-style: dashed; }
@media (prefers-reduced-motion: no-preference) {
  .cal--week .c span.new { animation: drop 420ms var(--ease-pin) both; }
}
.heat li.run { background: var(--run-tint); }
.heat li.run .n { color: var(--on-dark); }
.heat li strong { display: block; }
.heat li span { color: var(--on-dark-soft); font-size: 0.95rem; }
.heat .empty { padding: var(--s4) var(--s3); color: var(--on-dark-soft); }
.heat-end { padding: var(--s3); background: var(--teal-deep); }
.heat-end .bib { margin-top: var(--s2); }
@media (prefers-reduced-motion: no-preference) {
  .heat li.new { animation: drop 420ms var(--ease-pin) both; }
}
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s4); }
.gallery .frame { aspect-ratio: 3 / 4; }
.gallery .frame.wide { grid-column: span 2; aspect-ratio: 3 / 2; }
.gallery .tag { bottom: var(--s2); left: var(--s2); }

/* Coaching */
.plans { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s3); }
.plans li { border-left: 4px solid var(--cyan); padding: 0.2rem 0 0.2rem var(--s3); font-size: 1.1rem; }
.loop { position: relative; aspect-ratio: 3 / 4; }
.loop video { width: 100%; height: 100%; object-fit: cover; }
.pause {
  position: absolute; right: var(--s2); bottom: var(--s2); z-index: 2; min-width: 44px; min-height: 44px; border-radius: var(--radius);
  border: 2px solid var(--on-dark); background: var(--ink); color: var(--on-dark); font: 700 0.9rem var(--body); padding: 0 0.7rem; cursor: pointer;
}
.crew-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: var(--s4); }
.crew-grid .frame { aspect-ratio: 9 / 16; border-width: 1px; border-radius: 8px; }
.certs { margin-top: var(--s3); font-weight: 700; }

/* About */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s4); }
.duo .frame { aspect-ratio: 9 / 14; }
.facts { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.facts li { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.facts li strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.25rem; line-height: 1.15; }
.beliefs { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s4); }
.beliefs li { font-family: var(--display); font-size: var(--step-2); line-height: 1.15; }

/* Footer */
.foot { background: var(--ink); color: var(--on-dark-soft); padding: var(--s6) var(--gutter) max(var(--s5), env(safe-area-inset-bottom)); }
.foot-in { max-width: var(--maxw); margin: 0 auto; display: grid; gap: var(--s3); font-size: 0.95rem; }
.foot .fmark { font-family: var(--display); font-size: 1.5rem; color: var(--on-dark); }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s3); }
.foot nav a, .foot .ig { color: var(--on-dark); display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }
.foot a:focus-visible { outline-color: var(--focus-dark); }
.preview-note { font-size: 0.8rem; color: var(--on-dark-soft); border-top: 1px solid var(--rule-dark); padding-top: var(--s3); }

/* Arrivals: blocks of text come up once (sections only, never the first screen) */
@media (prefers-reduced-motion: no-preference) {
  .js .rise:not(.is-in) { opacity: 0; transform: translateY(18px); }
  .js .rise { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); color: var(--cyan); }
  .btn-ink:hover { background: var(--teal); color: var(--white); }
  .links a:hover, .more:hover { text-decoration-color: var(--cyan); }
  .chip:hover { border-color: var(--teal); }
  .tabs button:hover { border-color: var(--teal); }
  .menu-btn:hover { background: var(--ground-2); }
  .faq summary:hover { color: var(--teal); }
}

@media (min-width: 40rem) {
  .strip { grid-auto-columns: 40%; }
  .crew { grid-auto-columns: 24%; }
  .split { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .numbers { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery .frame.wide { grid-column: span 3; aspect-ratio: 21 / 9; }
  .crew-grid { grid-template-columns: repeat(6, 1fr); }
  .duo { max-width: 40rem; }
}
@media (min-width: 60rem) {
  .js .menu-btn { display: none; }
  .sheet, .js .sheet.open { display: none; }
  .links { display: flex; gap: var(--s1); margin-right: var(--s3); }
  .hero { min-height: calc(100vh - 3.5rem); min-height: calc(100svh - 3.5rem); }
  .hero > img { object-position: 50% 20%; left: 0; width: 50%; height: 100%; }
  .hero::after { content: ""; position: absolute; inset: 0 0 0 50%; background: var(--teal); }
  .hero .bib { position: relative; margin: auto 6% auto 55%; width: 39%; max-width: 34rem; }
  .hero .tag { left: var(--s4); }
  .top { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; max-width: var(--maxw); margin: 0 auto; padding: var(--s5) var(--gutter) 0; gap: var(--s5); }
  .top-photo { height: auto; aspect-ratio: 4 / 5; max-height: 74svh; border-radius: var(--radius-lg); border: 2px solid var(--ink); }
  .top .bib { margin: 0; padding: var(--s5); }
  .top h1 { font-size: var(--step-4); }
  .top .lead { font-size: var(--step-1); }
  .top-photo.wide { aspect-ratio: 3 / 2; }
  .strip { padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* A-053, 1 Dec: tomorrow, or Start now. Two lanes, light then dark; Start now opens his day 1 screen, pinned
   like the bib, the lane line showing day 1 of 14, the four moves numbered like stations */
.done .now-row {
  margin-top: var(--s2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s2) var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s3);
  background: var(--ink); color: var(--on-dark); border: 2px solid var(--ink); border-radius: var(--radius);
}
.now-row p { font-family: var(--display); font-size: 1.15rem; line-height: 1.15; }
.now-row .btn { min-height: 48px; }
.now-row .btn:focus-visible, .heat-phone .btn:focus-visible { outline-color: var(--focus-dark); }
.heat-phone {
  margin: var(--s3) auto 0; max-width: 20rem; padding: var(--s3) var(--s3) var(--s4);
  background: var(--ink); color: var(--on-dark); border-radius: 28px; box-shadow: var(--shadow);
}
.heat-phone .hp-bar { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--step--1); font-weight: 700; color: var(--on-dark-soft); }
.hp-lane { height: 4px; margin: var(--s1) 0 var(--s3); border-radius: 2px; background: var(--rule-dark); overflow: hidden; }
.hp-lane span { display: block; width: calc(100% / 14); height: 100%; background: var(--cyan); transform-origin: 0 50%; }
.hp-h { margin: 0; font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1; color: var(--white); }
.hp-h:focus { outline: none; }
.hp-meta { margin-top: var(--s1); font-size: 1rem; line-height: 1.45; color: var(--on-dark-soft); }
.hp-moves { list-style: none; margin: var(--s3) 0 var(--s4); padding: 0; }
.hp-moves li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: var(--s2); align-items: center; padding: 0.55rem 0; border-top: 1px solid var(--rule-dark); }
.hp-moves li:last-child { border-bottom: 1px solid var(--rule-dark); }
.heat-phone .hp-n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 4px; background: var(--cyan); color: var(--ink); font-family: var(--display); font-size: 1rem; }
.heat-phone .hp-mv { font-weight: 700; font-size: 1rem; line-height: 1.25; color: var(--on-dark); }
.heat-phone .hp-r { max-width: 5.25rem; font-family: var(--display); font-size: 1rem; line-height: 1.2; text-align: right; color: var(--cyan); }
@media (max-width: 22rem) {
  .heat-phone .hp-moves li { grid-template-columns: 2rem minmax(0, 1fr); row-gap: 0; }
  .heat-phone .hp-r { grid-column: 2; max-width: none; text-align: left; }
}
.hp-go { width: 100%; min-height: 52px; font-size: 1.1rem; border-color: var(--cyan); }
.done .hp-live { color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .heat-phone.is-open { animation: pin var(--t-mid) var(--ease-pin) both; }
  .heat-phone.is-open .hp-lane span { animation: hp-lane 700ms 260ms var(--ease-out) both; }
  .heat-phone.is-open .hp-moves li { animation: hp-off 420ms var(--ease-out) both; animation-delay: calc(220ms + var(--i, 0) * 90ms); }
}
@keyframes hp-lane { from { transform: scaleX(0); } }
@keyframes hp-off { from { opacity: 0; transform: translateX(-14px); } }

/* Live mode (A-053): the code lane on the same bib, busy buttons, the "Open my program" line */
.bib.is-code .join-open, .bib.is-done .join-open { display: none; }
.code-lane { margin-top: var(--s3); }
.code-lane h3 { font-size: var(--step-2); }
.code-lane h3:focus { outline: none; }
.code-lane .code-say { margin-top: var(--s1); color: var(--ink-soft); }
.code-lane .code-say b { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.code-form { margin-top: var(--s2); }
.code-form label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.code-form input { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.3em; }
.code-form .err, .done .err { margin-top: 0.4rem; font-size: var(--step--1); font-weight: 700; color: var(--err); }
.code-more { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin-top: var(--s1); }
.text-btn {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 700 0.95rem var(--body); color: var(--teal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.text-btn:disabled { color: var(--ink-soft); text-decoration: none; cursor: default; }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.now-row[hidden] { display: none; }
.join-open { margin-top: 0.15rem; font-size: var(--step--1); color: var(--ink-soft); }
.join-open a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.join-open.is-back {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3);
  margin-top: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3);
  background: var(--ink); color: var(--on-dark); border-radius: var(--radius);
  font-family: var(--display); font-size: 1.15rem;
}
.join-open.is-back a {
  min-height: 48px; padding: 0 1.15rem; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--cyan); color: var(--ink); font: 700 1rem/1 var(--body); text-decoration: none;
}
.join-open.is-back a:focus-visible { outline-color: var(--focus-dark); }
