/* FORM45 marketing site.
   The blue room: a dark site where every photo is lit by one Electric Blue gel
   (see tools/build_photos.py). Palette is the app's FormTheme: Midnight ground,
   White type, Electric Blue for identity and actions, Volt only for completion
   and the live timer. One variable family (Archivo): condensed display caps,
   regular text, and semi-expanded labels. The logo is drawn, not typed (#mark and
   #wordmark in each page's sprite). */

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

:root {
  --midnight: #0C111B;
  --black: #05070C;          /* the room's shadows, matched to the photo grade */
  --panel: #131B29;
  --panel-2: #1C2637;
  --white: #FFFFFF;
  --steel: #A3AFC5;          /* secondary text on Midnight: 8.4:1 */
  --blue: #316BFF;           /* signature graphic blue */
  --blue-fill: #306AFF;      /* fills carrying white text: 4.53:1 */
  --blue-press: #2458E0;
  --blue-ink: #86A6FF;       /* blue text on Midnight: 7.6:1 */
  --volt: #D4FF38;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);

  --maxw: 1400px;
  --gutter: clamp(16px, 4vw, 56px);
  --edge: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  --nav-h: 68px;
  --day: 5200ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  overflow-x: clip;
  background: var(--midnight);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, h4, dl, dd, ol, ul, figure { margin: 0; }
h3, h4 { font-size: inherit; font-weight: inherit; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:disabled { cursor: default; }
svg { flex: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  left: 16px; top: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--white);
  color: var(--midnight);
  font-weight: 700;
  transform: translateY(-180%);
}
.skip:focus { transform: none; }

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

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

.display {
  font-stretch: 62%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.005em;
}
.num { font-variant-numeric: tabular-nums; }

/* Section labels: a small blue dot, like the one on the f. */
.label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.2em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.label::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.h2 {
  margin-top: 22px;
  font-size: clamp(3.4rem, 8vw, 8.25rem);
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.125rem, 0.5vw + 0.98rem, 1.3125rem);
  line-height: 1.5;
  color: var(--steel);
  max-width: 32em;
  text-wrap: pretty;
}

.fine {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--steel);
  text-wrap: pretty;
}

.dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-left: 0.05em;
  border-radius: 50%;
  background: var(--blue);
}

/* ---------- Controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 2px;
  font-size: 0.875rem;
  font-weight: 750;
  font-stretch: 112%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.12s ease-out, background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn-blue { background: var(--blue-fill); color: var(--white); }
.btn-blue:hover { background: var(--blue-press); }
.btn-white { background: var(--white); color: var(--midnight); }
.btn-white:hover { background: #DDE5F5; }
.btn-ghost { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--midnight); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 0.75rem; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--nav-h);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(12, 17, 27, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  height: 100%;
  padding: 0 var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 5.4px;            /* the logo's spacing: a quarter of the mark */
  min-height: 44px;
  color: var(--white);
}
/* Lockup from the logo artwork: the letters are 79.6% of the mark's height. */
.logo-mark { flex: none; width: 22px; height: 22px; color: var(--blue); }
.logo-word { flex: none; width: 112.6px; height: 17.5px; color: var(--white); }

.nav-links { display: flex; gap: 6px; }
.nav-links a { white-space: nowrap; }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 8px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover { color: var(--white); }
.nav-links a[aria-current] { color: var(--white); }
.nav-links a[aria-current]::after,
.nav-links a:hover::after { transform: none; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: clamp(96px, 12vw, 184px) 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px 72px;
  align-items: end;
}

/* ---------- Hero: a week in the blue room ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: max(640px, 100svh);
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.shot.on { opacity: 1; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}
.shot.on img { animation: drift calc(var(--day) + 1400ms) linear both; }
@keyframes drift { from { transform: scale(1.1); } to { transform: scale(1.02); } }
.hero.paused .shot.on img { animation-play-state: paused; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.7) 0, rgba(5, 7, 12, 0) 24%),
    linear-gradient(0deg, rgba(5, 7, 12, 0.94) 0, rgba(5, 7, 12, 0.55) 34%, rgba(5, 7, 12, 0) 62%),
    linear-gradient(90deg, rgba(5, 7, 12, 0.55) 0, rgba(5, 7, 12, 0) 58%);
}

.hero-inner {
  align-self: end;
  padding: calc(var(--nav-h) + 48px) var(--edge) clamp(28px, 4vh, 48px);
}
.hero-title {
  margin-top: 18px;
  font-size: clamp(4.4rem, min(12.4vw, 21svh), 13.5rem);
  line-height: 0.84;
}
.hero-title .line { display: block; overflow: hidden; padding: 0.04em 0 0.02em; margin: -0.04em 0 -0.02em; }
.hero-title .line > span { display: inline-block; }
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(22px, 3.4vh, 36px);
}
.hero-lead {
  max-width: 27em;
  font-size: clamp(1.0625rem, 0.45vw + 0.95rem, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-week {
  padding: 0 var(--edge) calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(5, 7, 12, 0.6), rgba(5, 7, 12, 0));
}
.hero-week-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line-strong);
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-week-title { color: var(--steel); }
.hero-week-title b { color: var(--white); font-weight: 700; }
.hero-week-focus { margin-left: auto; color: var(--blue-ink); text-align: right; }
.hero-pause {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin: -6px -8px -6px 0;
  color: var(--white);
  opacity: 0.8;
}
.hero-pause:hover { opacity: 1; }
.hero-pause svg { width: 16px; height: 16px; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 6px 0 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}
.days button:hover,
.days button[aria-pressed="true"] { color: var(--white); }
.days .d {
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.days .s {
  font-size: clamp(1rem, 1.9vw, 1.75rem);
  font-stretch: 62%;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.days .bar {
  position: relative;
  width: 100%;
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}
.days .bar i {
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
}
.days button.past .bar i { transform: none; background: rgba(255, 255, 255, 0.55); }
.days button[aria-pressed="true"] .bar i { background: var(--blue); }
.days .bar i.run { animation: fill var(--day) linear forwards; }
.hero.paused .days .bar i.run { animation-play-state: paused; }
.hero.still .days .bar i.run { animation: none; transform: none; }
@keyframes fill { to { transform: none; } }

/* ---------- Programs ---------- */

.programs-head { grid-template-columns: minmax(0, 1fr); gap: 0; }
.programs-head .h2 { font-size: clamp(3.2rem, 7.4vw, 8rem); }
.programs-head .h2 span { color: var(--blue); }
.programs-head .lead { margin-top: 28px; }
.pcards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(48px, 6vw, 80px);
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(460px, 40vw, 580px);
  padding: 22px 20px 20px;
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
}
.pcard img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(5, 7, 12, 0.96) 0, rgba(5, 7, 12, 0.72) 38%, rgba(5, 7, 12, 0.05) 70%, rgba(5, 7, 12, 0.35) 100%);
  transition: background-color 0.4s;
}
.pcard-days {
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}
.pcard-days b {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(4rem, 6vw, 6rem);
  font-stretch: 62%;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.8;
}
.pcard-name { font-size: clamp(2rem, 2.8vw, 2.75rem); line-height: 0.9; }
.pcard-sub { margin-top: 10px; font-weight: 650; line-height: 1.35; }
.pcard-who { margin-top: 8px; font-size: 0.9375rem; line-height: 1.45; color: var(--steel); text-wrap: pretty; }
.pcard-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.pcard-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 750;
  font-stretch: 112%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}
.pcard-link::after { content: ""; position: absolute; inset: 0; }
.pcard-link svg { width: 18px; height: 18px; color: var(--blue); transition: transform 0.3s var(--ease-out); }
.pcard:hover img { transform: scale(1.05); }
.pcard:hover .pcard-link svg { transform: translateX(4px); }
.pcard:has(.pcard-link:focus-visible) { outline: 2px solid var(--white); outline-offset: 3px; }
.pcard-link:focus-visible { outline: none; }

/* On wide screens with a pointer, who-it's-for opens on hover. */
@media (hover: hover) and (min-width: 1100px) {
  .pcard-who {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.45s var(--ease-out), opacity 0.3s, margin 0.45s var(--ease-out);
    margin-top: 0;
  }
  .pcard-who > span { min-height: 0; overflow: hidden; }
  .pcard:hover .pcard-who,
  .pcard:focus-within .pcard-who { grid-template-rows: 1fr; opacity: 1; margin-top: 8px; }
}

/* ---------- Your week (Electric Blue) ---------- */

.week { background: var(--blue-fill); color: var(--white); }
.week .label { color: var(--white); }
.week .label::before { background: var(--midnight); }
.week-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px 80px;
  align-items: end;
}
.finder { padding-bottom: 6px; }
.field-label { margin: 22px 0 10px; font-size: 0.9375rem; font-weight: 650; }
.finder .field-label:first-child { margin-top: 0; }

.segmented {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: 4px;
  background: rgba(5, 7, 12, 0.24);
}
.segmented button {
  position: relative;
  z-index: 1;
  min-height: 46px;
  padding: 0 10px;
  font-size: 0.9375rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
}
.segmented button[aria-checked="true"] { color: var(--midnight); }
.segmented button:active { transform: scale(0.97); }
.segmented button:focus-visible { outline-offset: -2px; }
.seg-pill {
  position: absolute;
  top: 4px; bottom: 4px; left: 0;
  width: 0;
  border-radius: 2px;
  background: var(--white);
  will-change: transform, width;
}

.plan {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 80px;
  align-items: end;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.5);
}
.plan-name { margin-top: 14px; font-size: clamp(3.5rem, 8.6vw, 8.5rem); line-height: 0.84; }
.plan-meta {
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.plan-why { font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty; }
.plan-alt { margin-top: 12px; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.84); text-wrap: pretty; }
.plan-alt:empty { display: none; }
.plan-alt b { color: var(--white); font-weight: 700; }
.plan.changed .plan-name,
.plan.changed .plan-meta,
.plan.changed .plan-copy { animation: rise-in 0.5s var(--ease-out) both; }
.plan.changed .plan-meta { animation-delay: 40ms; }
.plan.changed .plan-copy { animation-delay: 80ms; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }

.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 36px;
}
.tile {
  display: flex;
  flex-direction: column;
  min-height: clamp(200px, 19vw, 260px);
  padding: 16px 14px 14px;
  background: var(--white);
  color: var(--midnight);
}
.tile.enter { animation: tile-in 0.55s var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(14px); } }
.t-day {
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4A5670;
}
.t-name {
  margin-top: auto;
  padding-top: 18px;
  font-size: clamp(1.5rem, 2.3vw, 2.25rem);
  line-height: 0.88;
  overflow-wrap: anywhere;
}
.t-focus { margin-top: 10px; font-size: 0.875rem; line-height: 1.35; color: #3A4660; text-wrap: pretty; }
.t-count {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(12, 17, 27, 0.14);
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-press);
}
.tile.rest { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); }
.tile.rest .t-day { color: rgba(255, 255, 255, 0.85); }
.tile.rest .t-name { color: rgba(255, 255, 255, 0.72); }

.plan-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}
.plan-tabs-label {
  margin-right: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  font-weight: 650;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.tab:hover { box-shadow: inset 0 0 0 1.5px var(--white); }
.tab[aria-pressed="true"] { background: var(--midnight); color: var(--white); box-shadow: none; }
.week-fine { margin-top: 20px; color: rgba(255, 255, 255, 0.84); }

/* ---------- The workout (Midnight, like the app's workout screen) ---------- */

.workout { padding-bottom: clamp(64px, 7vw, 104px); }
.workout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 64px 104px;
  align-items: center;
}
.workout-copy .lead { margin-top: 28px; }
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}
.features strong {
  display: block;
  font-size: 1.375rem;
  font-stretch: 62%;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.features span { display: block; margin-top: 8px; font-size: 0.9375rem; color: var(--steel); text-wrap: pretty; }

.logger {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 160px;
  border-radius: 34px;
  background: #0A0F18;
  box-shadow: 0 0 0 1px var(--line), 0 60px 120px -50px rgba(49, 107, 255, 0.45);
}
.logger::after {
  content: "Check off a set to start the rest timer.";
  position: absolute;
  left: 0; right: 0;
  bottom: 62px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--steel);
  pointer-events: none;
}
.logger.is-saved::after { content: none; }
.logger-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.pill-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: transform 0.1s ease-out, opacity 0.2s, background-color 0.2s;
}
.pill-btn:active:not(:disabled) { transform: scale(0.96); }
.pill-btn:hover:not(:disabled) { background: var(--panel-2); }
.pill-btn:disabled { opacity: 0.4; }
.pill-action { color: var(--blue-ink); }
.logger-session { text-align: center; font-weight: 700; font-size: 1.0625rem; }
.logger-progress { margin: 16px 6px 14px; font-size: 0.9375rem; color: var(--steel); }

.logger-card { padding: 22px 20px 10px; border-radius: 24px; background: var(--panel); }
.logger-lift { font-size: 2.25rem; }
.logger-rest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--steel);
}
.logger-rest svg { width: 18px; height: 18px; }
.sets { margin-top: 18px; }
.sets-head,
.set-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.2fr) 48px;
  gap: 10px;
  align-items: center;
}
.sets-head { padding-bottom: 8px; font-size: 0.75rem; font-weight: 600; color: var(--steel); }
.set-row { padding: 10px 0; border-top: 1px solid var(--line); }
.set-n { font-weight: 700; padding-left: 4px; }
.set-row input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
  color: var(--white);
  font: inherit;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}
.set-row input:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 1px; }
.check {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  color: var(--white);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s ease-out;
}
.check svg { width: 22px; height: 22px; stroke-dasharray: 21; stroke-dashoffset: 21; transition: stroke-dashoffset 0.3s var(--ease-out) 0.04s; }
.check:active { transform: scale(0.88); }
.check[aria-checked="true"] { background: var(--blue-fill); box-shadow: none; }
.check[aria-checked="true"] svg { stroke-dashoffset: 0; }
.check.pop { animation: pop 0.38s var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.82); } }

.saved {
  padding: 28px 24px 30px;
  border-radius: 24px;
  background: var(--panel);
  animation: rise-in 0.5s var(--ease-out) both;
}
.saved-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--volt);
  color: var(--midnight);
  font-size: 0.9375rem;
  font-weight: 700;
}
.saved-badge svg { width: 18px; height: 18px; }
.saved-count { margin-top: 28px; font-size: 8rem; line-height: 0.8; color: var(--volt); }
.saved-label {
  margin-top: 10px;
  font-size: 1.75rem;
  font-stretch: 62%;
  font-weight: 850;
  text-transform: uppercase;
}
.saved-line { margin-top: 14px; color: var(--steel); }

.restbar {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 2;
  padding: 16px 20px 10px;
  border-radius: 24px;
  background: rgba(32, 45, 66, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  will-change: transform;
}
.restbar-row { display: flex; align-items: center; justify-content: space-between; }
.restbar-label { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.0625rem; }
.restbar-label svg { width: 22px; height: 22px; }
.restbar-time {
  font-size: 2.75rem;
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1;
  color: var(--volt);
}
.restbar-actions { display: flex; gap: 22px; margin-top: 4px; }
.restbar-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--blue-ink);
}
.restbar-actions svg { width: 18px; height: 18px; }

/* ---------- The library: a wall of names ---------- */

.library { margin-top: clamp(80px, 9vw, 128px); }
.library-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px 72px;
  align-items: end;
  padding-top: 40px;
  border-top: 1px solid var(--line-strong);
}
.library-title { font-size: clamp(2.5rem, 4.6vw, 4.5rem); }
.library-lead { max-width: 30em; font-size: 0.9375rem; }
.move-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip small { font-size: inherit; color: var(--steel); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--white); }
.chip[aria-pressed="true"] { background: var(--white); color: var(--midnight); box-shadow: none; }
.chip[aria-pressed="true"] small { color: var(--blue-press); }

.wall-wrap {
  position: relative;
  max-height: clamp(180px, 24vw, 300px);
  margin-top: 28px;
  padding: 0 var(--edge);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent);
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}
.wall {
  font-size: clamp(1.5rem, 2.8vw, 2.75rem);
  font-stretch: 62%;
  font-weight: 850;
  line-height: 1.02;
  text-transform: uppercase;
  transition: opacity 0.18s ease;
}
.wall.fading { opacity: 0; }
.wall li { display: inline; color: rgba(255, 255, 255, 0.34); transition: color 0.25s; }
.wall .nw { white-space: nowrap; }
.wall i {
  display: inline-block;
  width: 0.18em; height: 0.18em;
  margin: 0 0.32em 0.1em;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: middle;
}
.wall li:hover { color: var(--white); }
.wall.grouped li { color: rgba(255, 255, 255, 0.12); }
.wall.grouped li.hit { color: var(--white); }

/* ---------- Share ---------- */

.share-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px 96px;
  align-items: center;
}
.share-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(560px, 52vw, 720px);
  padding: 48px 24px;
  overflow: hidden;
  background: var(--black);
}
.share-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.share-copy .lead { margin-top: 28px; }
.share-copy .segmented { max-width: 340px; margin-top: 32px; background: var(--panel); }
.share-copy .fine { margin-top: 16px; max-width: 30em; }

.cards {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 4 / 5;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.scard {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  container-type: inline-size;
  cursor: grab;
  will-change: transform;
  box-shadow: 0 44px 80px -30px rgba(0, 0, 0, 0.8), 0 16px 30px -18px rgba(0, 0, 0, 0.5);
}
.cards.dragging .scard { cursor: grabbing; }
.scard[aria-hidden="true"] { cursor: pointer; }

.sc-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 7cqw 6.7cqw 0; }
.sc-brand {
  display: inline-flex;
  align-items: center;
  gap: 1.57cqw;
}
.sc-mark { width: 6.4cqw; height: 6.4cqw; }
.sc-word { width: 32.8cqw; height: 5.1cqw; }
.sc-tag {
  padding: 1.6cqw 1.9cqw;
  background: var(--midnight);
  color: var(--white);
  font-size: 2.1cqw;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
}
.sc-title {
  padding: 11cqw 6.7cqw 0;
  font-size: 9.4cqw;
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
}
.sc-big {
  margin-top: auto;
  padding: 0 6.7cqw;
  font-size: 34cqw;
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.78;
  color: var(--volt);
}
.sc-big-label {
  padding: 3.4cqw 6.7cqw 7cqw;
  font-size: 6.2cqw;
  font-stretch: 62%;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}
.sc-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 5cqw;
  padding: 6cqw 6.7cqw 5.4cqw;
  background: var(--midnight);
  color: var(--white);
}
.sc-strip b, .sc-panel b {
  display: block;
  font-size: 7.4cqw;
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.9;
}
.sc-strip span, .sc-panel span {
  display: block;
  margin-top: 1.6cqw;
  font-size: 2.1cqw;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sc-date, .sc-more {
  font-size: 2.1cqw;
  font-stretch: 112%;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}
.sc-strip .sc-date { grid-column: 1 / -1; color: var(--steel); }

.scard-statement { background: var(--blue); color: var(--white); }

.scard-session { background: var(--white); color: var(--midnight); }
.scard-session .sc-mark { color: var(--blue); }
.scard-session .sc-tag { background: none; color: var(--midnight); padding-right: 0; }
.scard-session .sc-title { padding-top: 8cqw; }
.sc-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 6cqw 6.7cqw 0;
  padding: 4.6cqw 3.6cqw;
  background: var(--midnight);
  color: var(--white);
}
.sc-panel .volt { color: var(--volt); }
.sc-list { margin: 3cqw 6.7cqw 0; }
.sc-list li {
  display: grid;
  grid-template-columns: 8.4cqw minmax(0, 1fr) auto;
  align-items: center;
  padding: 2.3cqw 0;
  border-bottom: 1px solid rgba(12, 17, 27, 0.1);
}
.sc-list li > span { font-size: 2.9cqw; font-weight: 600; color: #526078; }
.sc-list b { display: block; font-size: 3.5cqw; font-weight: 700; line-height: 1.2; }
.sc-list small { display: block; font-size: 2.7cqw; color: #526078; }
.sc-list svg { width: 4.6cqw; height: 4.6cqw; color: var(--blue); }
.sc-more { margin: 2.4cqw 6.7cqw 0; color: #526078; }
.scard-session .sc-date { margin-top: auto; padding: 0 6.7cqw 6.4cqw; color: #526078; }

/* ---------- FAQ ---------- */

.faq { padding-top: 0; }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px 96px;
  align-items: start;
}
.qa { border-top: 1px solid var(--line-strong); }
.qa details { border-bottom: 1px solid var(--line-strong); }
.qa summary {
  position: relative;
  display: block;
  padding: 26px 56px 26px 0;
  cursor: pointer;
  list-style: none;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-stretch: 62%;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before,
.qa summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 18px; height: 2.5px;
  margin-top: -1px;
  background: var(--blue);
  transition: transform 0.3s var(--ease-out);
}
.qa summary::after { transform: rotate(90deg); }
.qa details[open] summary::after { transform: rotate(0deg); }
.qa summary:hover { color: var(--blue-ink); }
.qa p { padding: 0 56px 28px 0; max-width: 40em; color: var(--steel); text-wrap: pretty; }
.qa a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

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

.footer {
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
  background: var(--midnight);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color 0.2s;
}
.footer-links a:hover,
.footer-links a[aria-current="page"] { color: var(--white); }

/* ---------- Legal pages ---------- */

.legal-top { display: flex; align-items: center; min-height: 80px; max-width: 800px; }
.legal { max-width: 800px; padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(72px, 9vw, 120px); }
.legal .label { color: var(--blue-ink); }
.legal h1 { margin-top: 18px; font-size: clamp(3.5rem, 10vw, 7rem); }
.legal .lead { margin-top: 24px; }
.legal h2 { margin-top: 52px; font-size: 1.75rem; font-stretch: 62%; font-weight: 900; line-height: 1.05; text-transform: uppercase; }
.legal p { margin-top: 12px; color: var(--steel); max-width: 40em; }
.legal ul:not(.legal-promises) { margin-top: 12px; }
.legal ul:not(.legal-promises) li { position: relative; padding: 6px 0 6px 22px; color: var(--steel); }
.legal ul:not(.legal-promises) li::before,
.legal-promises li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(6px + 0.62em);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.legal strong { color: var(--white); font-weight: 650; }
.faq-page .qa { margin-top: 18px; }
.faq-page .qa p { margin-top: 0; }
.legal a { color: var(--blue-ink); font-weight: 600; }
.legal a:hover { text-decoration: underline; }
.legal-promises { margin-top: 32px; padding: 22px 24px; background: var(--panel); box-shadow: inset 3px 0 0 var(--blue); }
.legal-promises li { position: relative; padding: 6px 0 6px 24px; font-weight: 600; }
.legal-promises li::before { left: 4px; }

/* ---------- Team invite (/i/<code>) ---------- */

.invite {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: max(640px, 100svh);
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
}
.invite-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 40%;
}
/* Dark where the words sit, fading into the Midnight footer at the bottom. */
.invite::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.7) 0, rgba(5, 7, 12, 0) 22%),
    linear-gradient(0deg, var(--midnight) 0, rgba(12, 17, 27, 0.6) 34%, rgba(12, 17, 27, 0) 64%),
    linear-gradient(90deg, rgba(5, 7, 12, 0.92) 0, rgba(5, 7, 12, 0.62) 42%, rgba(5, 7, 12, 0) 72%);
}
.invite-top { display: flex; align-items: center; min-height: 80px; padding: 0 var(--edge); }
.invite-main { align-self: end; padding: 48px var(--edge) clamp(56px, 9vh, 104px); }
.invite-body { max-width: 780px; }
.invite-title {
  margin-top: 20px;
  max-width: 9.5em;
  font-size: clamp(3.4rem, 7.4vw, 7.75rem);
  text-wrap: balance;
}
.invite-lead { margin-top: 24px; color: rgba(255, 255, 255, 0.86); }
.invite-code {
  display: inline-block;
  margin-top: 32px;
  padding: 16px 24px 20px;
  background: var(--panel);
  box-shadow: inset 3px 0 0 var(--blue);
}
.invite-code-label {
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
}
.invite-code-value {
  margin: 12px -0.2em 0 0;
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-stretch: 75%;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1;
}
.invite-actions { margin-top: 28px; }
.invite-fine { margin-top: 22px; max-width: 34em; }
.invite-fine b { color: var(--white); font-weight: 700; letter-spacing: 0.08em; }

/* On a phone the photo is a band at the top (the fist bump sits just under the
   logo) and the words run on Midnight below it, where they stay readable. */
@media (max-width: 640px) {
  .invite { --photo-h: 360px; grid-template-rows: auto auto; min-height: 0; background: var(--midnight); }
  .invite-photo { inset: 0 0 auto; height: var(--photo-h); object-position: 70% 36%; }
  .invite::before {
    background: linear-gradient(180deg,
      rgba(5, 7, 12, 0.6) 0, rgba(5, 7, 12, 0) 96px,
      rgba(12, 17, 27, 0.1) calc(var(--photo-h) * 0.45),
      rgba(12, 17, 27, 0.86) calc(var(--photo-h) * 0.82),
      var(--midnight) var(--photo-h));
  }
  .invite-main { align-self: start; padding-top: calc(var(--photo-h) - 180px); padding-bottom: 64px; }
}

/* ---------- Team: buddies and coaching (the app's Team tab) ---------- */

.team { padding-bottom: clamp(64px, 7vw, 104px); }
.team-grid,
.coach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 64px 104px;
  align-items: center;
}
.coach-grid { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); }
.team-copy .lead,
.coach-copy .lead { margin-top: 28px; }

/* The phone panel: the same room as the workout logger. */
.team-app,
.coach-app {
  position: relative;
  padding: 22px 18px 18px;
  border-radius: 34px;
  background: #0A0F18;
  box-shadow: 0 0 0 1px var(--line), 0 60px 120px -50px rgba(49, 107, 255, 0.45);
}
.ta-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.ta-title { font-size: 2.5rem; }
.ta-pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.875rem;
  font-weight: 600;
}
.ta-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 4px 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.6875rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.ta-label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.ta-label span { margin-left: auto; color: var(--steel); }
.ta-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 4px;
  background: var(--panel);
}
.ta-row + .ta-row { margin-top: 8px; }
.ta-tile {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 4px;
  background: var(--blue-fill);
  font-size: 1.25rem;
  font-stretch: 62%;
  font-weight: 900;
  color: var(--white);
}
.ta-tile.coach { background: var(--white); color: var(--midnight); }
.ta-body { min-width: 0; }
.ta-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem; }
.ta-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue-fill);
  font-size: 0.75rem;
  font-weight: 700;
}
.ta-meta { margin-top: 3px; font-size: 0.875rem; color: var(--steel); overflow-wrap: anywhere; }
.ta-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 150px; margin-top: 9px; }
.ta-week i { height: 3px; background: rgba(255, 255, 255, 0.18); }
.ta-week i.on { background: var(--blue); }
.ta-week i.today { background: linear-gradient(90deg, var(--white) 45%, rgba(255, 255, 255, 0.18) 45%); }
.ta-action {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 64px;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  transition: transform 0.1s ease-out, background-color 0.2s, color 0.2s;
}
.ta-action svg { width: 24px; height: 24px; }
.ta-action:hover { background: var(--panel-2); }
.ta-action:active { transform: scale(0.95); }
.ta-action[aria-pressed="true"] { color: var(--blue-ink); }
.ta-action[aria-pressed="true"] svg { color: var(--blue); }
.ta-action:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; }
.ta-status { min-height: 1.5em; margin: 14px 4px 0; font-size: 0.875rem; color: var(--steel); }

/* The coach's dashboard, with a client's form tip laid over its corner. */
.coach-stage { position: relative; padding-bottom: 150px; }
.ca-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
.ca-seg span { padding: 8px 0; border-radius: 999px; }
.ca-seg .on { background: var(--white); color: var(--midnight); font-weight: 700; }
.ca-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 4px 18px; }
.ca-stats b { display: block; font-size: 2.75rem; font-stretch: 62%; font-weight: 900; line-height: 1; }
.ca-stats b.warn { color: #FF9A91; }
.ca-stats span {
  display: block;
  margin-top: 6px;
  font-size: 0.625rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.ca-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ca-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 4px;
  background: var(--panel);
}
.ca-status {
  margin-top: 4px;
  font-size: 0.6875rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.ca-status.warn { color: #FF9A91; }
.ca-bars { display: flex; align-items: flex-end; gap: 4px; height: 22px; max-width: 180px; margin-top: 10px; }
.ca-bars i { flex: 1; height: calc(var(--h) * 100%); background: rgba(134, 166, 255, 0.55); }
.ca-bars i.now { background: var(--blue); }
.ca-tip {
  position: absolute;
  right: -28px;
  bottom: 0;
  width: min(300px, 70%);
  padding: 18px 18px 18px 21px;
  border-radius: 4px;
  background: var(--panel-2);
  box-shadow: inset 3px 0 0 var(--blue), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  font-size: 0.9375rem;
}
.ca-tip-label {
  font-size: 0.625rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.ca-tip-lift { margin: 8px 0 4px; font-size: 1.375rem; font-stretch: 62%; font-weight: 900; text-transform: uppercase; }
.coach-cta { display: grid; justify-items: start; gap: 16px; margin-top: 40px; }
.coach-cta .fine { max-width: 34em; }

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-title .line > span { animation: line-up 1s var(--ease-out) both; }
.js .hero-title .line:nth-child(2) > span { animation-delay: 90ms; }
.js .hero-label,
.js .hero-foot { animation: rise-in 0.9s var(--ease-out) 0.25s both; }
@keyframes line-up { from { transform: translateY(108%); } }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .pcards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pcard { grid-column: span 2; min-height: 500px; }
  .pcard:nth-child(4), .pcard:nth-child(5) { grid-column: span 3; }
  .workout-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; }
  .team-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; }
  /* Six links don't fit beside the logo and button: keep the four that jump furthest. */
  .nav-links .nav-wide { display: none; }
  .coach-grid { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 56px; }
  .ca-tip { right: -12px; }
  .features { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .tile { padding: 14px 10px 12px; }
  .t-focus { font-size: 0.8125rem; }
}

@media (max-width: 899px) {
  .nav-links { display: none; }

  .hero-foot { flex-direction: column; align-items: stretch; }
  .hero-week-title { display: none; }
  .hero-week-focus { margin-left: 0; text-align: left; }
  .hero-pause { margin-left: auto; }
  .days { gap: 4px; }

  .section-head,
  .library-head,
  .week-top,
  .plan,
  .workout-grid,
  .team-grid,
  .coach-grid,
  .share-grid,
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .team-app, .coach-stage { width: min(100%, 480px); }
  .coach-copy { order: -1; }
  .section-head { gap: 20px; }


  /* Program cards become a swipeable row. */
  .pcards {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 340px);
    gap: 10px;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .pcards::-webkit-scrollbar { display: none; }
  .pcard, .pcard:nth-child(4), .pcard:nth-child(5) { grid-column: auto; min-height: 520px; scroll-snap-align: start; }

  /* The week board becomes a list of days. */
  .board { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tile {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 12px;
    min-height: 0;
    padding: 14px 14px;
  }
  .t-day { grid-row: 1 / span 3; padding-top: 3px; }
  .t-name { margin-top: 0; padding-top: 0; font-size: 1.625rem; }
  .t-focus { margin-top: 6px; }
  .t-count { margin-top: 8px; padding-top: 0; border-top: 0; }
  .tile.rest { padding-block: 12px; }
  .tile.rest .t-name { font-size: 1.25rem; }

  .share-stage { min-height: 0; aspect-ratio: auto; padding: 44px 20px; }
  .share-copy { order: -1; }
  .cards { width: min(100%, 360px); }
}

@media (max-width: 640px) {
  .nav .btn-small { padding: 0 14px; }
  .hero-title { font-size: clamp(3.9rem, 21vw, 6.5rem); }
  .hero-inner { padding-bottom: 20px; }
  .btn { max-width: 100%; white-space: normal; text-align: center; padding: 12px 20px; }
  .actions .btn { width: 100%; }
  .days .s { font-size: 0.9375rem; }
  .days .d { font-size: 0.625rem; letter-spacing: 0.1em; }
  .hero-week-head { font-size: 0.6875rem; letter-spacing: 0.12em; }

  .features { grid-template-columns: 1fr; }

  .segmented button { font-size: 0.875rem; line-height: 1.2; padding: 6px 8px; }
  .plan-tabs-label { width: 100%; }
  .tab { flex: 1 1 auto; }

  .logger { padding: 14px 14px 156px; border-radius: 30px; }
  .team-app, .coach-app { padding: 18px 14px 14px; border-radius: 30px; }
  .ta-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  .ta-tile { width: 40px; height: 40px; font-size: 1.125rem; }
  .ca-list li { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .coach-stage { padding-bottom: 0; }
  .ca-tip { position: relative; right: auto; width: auto; margin: -14px 14px 0; }
  .logger-card { padding: 20px 14px 8px; }
  .sets-head, .set-row { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1.2fr) 44px; gap: 8px; }
  .restbar { left: 14px; right: 14px; bottom: 14px; }

  .chip { padding: 11px 12px 0; }
  .qa summary { padding-right: 44px; }
  .qa p { padding-right: 0; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 0.3s ease; }
  .js .hero-title .line > span, .js .hero-label, .js .hero-foot { animation: none; }
  .shot { transition-duration: 0.3s; }
  .shot.on img { animation: none; transform: none; }
  .tile.enter, .plan.changed *, .saved, .check.pop { animation: none !important; }
  .pcard:hover img { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled { background: var(--midnight); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .restbar { background: var(--panel-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --steel: #D0D8E6; --line: rgba(255, 255, 255, 0.4); --line-strong: rgba(255, 255, 255, 0.6); }
  .wall li { color: rgba(255, 255, 255, 0.6); }
  .wall.grouped li { color: rgba(255, 255, 255, 0.35); }
}
