/* ============================================================
   NOVA — Working Demo · stylesheet
   Tokens mirror Final Design/nova.css (source of truth)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&family=Spline+Sans+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: oklch(0.146 0 0);
  --bg-deep: oklch(0.115 0 0);
  --surface: oklch(0.205 0.004 80);
  --surface-2: oklch(0.255 0.005 80);
  --line: oklch(0.32 0.006 80);
  --ink: oklch(0.955 0.007 90);
  --ink-2: oklch(0.76 0.012 85);
  --ink-3: oklch(0.60 0.010 85);
  --flare: oklch(0.81 0.158 75);
  --flare-hot: oklch(0.70 0.175 55);
  --ember: oklch(0.63 0.195 35);
  --frost: oklch(0.80 0.085 200);
  --on-flare: oklch(0.205 0.045 75);
  --danger: oklch(0.67 0.19 25);
  --flare-dim: oklch(0.81 0.158 75 / 0.14);
  --frost-dim: oklch(0.80 0.085 200 / 0.14);

  --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: 'Spline Sans Mono', 'SF Mono', ui-monospace, monospace;

  --t-xs: 0.75rem; --t-sm: 0.8125rem; --t-md: 0.9375rem; --t-lg: 1.0625rem;
  --t-xl: 1.25rem; --t-2xl: 1.5rem; --t-3xl: 1.8125rem; --t-4xl: 2.1875rem; --t-5xl: 2.625rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-fast: 150ms; --dur-base: 220ms; --dur-slow: 400ms;

  --z-sticky: 10; --z-nav: 20; --z-overlay: 30; --z-toast: 50;
  --gutter: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
svg { display: block; flex-shrink: 0; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--flare); outline-offset: 2px; border-radius: 4px; }

/* ---- type voices ---- */
.display {
  font-variation-settings: 'wdth' 122;
  font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.005em; line-height: 0.98;
}
.display-2 {
  font-variation-settings: 'wdth' 112;
  font-weight: 750; letter-spacing: -0.01em; line-height: 1.05;
}
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.data-label {
  font-family: var(--font-data); font-size: 0.6875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.01em;
}
.section-head .more { font-size: var(--t-sm); font-weight: 600; color: var(--flare); cursor: pointer; }

/* ---- buttons / chips ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px;
  border-radius: var(--r-pill);
  font-size: var(--t-lg); font-weight: 700; letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) ease, opacity var(--dur-fast) ease;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn-flare { background: var(--flare); color: var(--on-flare); }
.btn-flare:hover { background: oklch(0.84 0.158 75); }
.btn-surface { background: var(--surface-2); color: var(--ink); }
.btn-surface:hover { background: oklch(0.29 0.005 80); }
.btn-ghost { background: transparent; color: var(--ink-2); height: 48px; }
.btn-sm { height: 44px; padding: 0 20px; font-size: var(--t-md); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.ibtn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-2); color: var(--ink);
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) ease;
}
.ibtn:hover { background: oklch(0.29 0.005 80); }
.ibtn:active { transform: scale(0.92); }
.ibtn-ghost { background: oklch(1 0 0 / 0.10); backdrop-filter: blur(8px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--surface-2);
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
  white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip.is-on { background: var(--ink); color: var(--bg); }
.chip-flare { background: var(--flare-dim); color: var(--flare); }
.chip svg { width: 15px; height: 15px; }

.meta { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; flex-wrap: wrap; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

/* ---- media cards ---- */
.media-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform var(--dur-fast) var(--ease-out);
  cursor: pointer; text-align: left; width: 100%;
}
.media-card:active { transform: scale(0.985); }
.media-card .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(186deg,
    oklch(0.10 0.01 60 / 0.30) 0%,
    oklch(0.10 0.01 60 / 0.45) 40%,
    oklch(0.10 0.01 60 / 0.72) 68%,
    oklch(0.08 0.01 60 / 0.95) 100%);
}
.media-card > .card-body { position: relative; padding: var(--s5); width: 100%; }

/* ---- progress primitives ---- */
.segs { display: flex; gap: 4px; }
.segs span { height: 4px; flex: 1; border-radius: 2px; background: var(--surface-2); }
.segs span.done { background: var(--flare); }
.segs span.now { background: var(--flare); opacity: 0.45; }
.bar { height: 4px; border-radius: 2px; background: oklch(1 0 0 / 0.15); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 2px; background: var(--flare); transition: width 600ms var(--ease-out); }

.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-wrap svg.dial { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-wrap .track { stroke: var(--surface-2); }
.ring-wrap .fill { stroke: var(--flare); stroke-linecap: round; transition: stroke-dashoffset 800ms var(--ease-out); }

/* ---- rows / avatars ---- */
.row { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) 0; width: 100%; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.row .row-main { flex: 1; min-width: 0; }
.row .row-title { font-weight: 600; font-size: var(--t-md); }
.row .row-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.row .row-day { font-family: var(--font-data); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 2px; }
.row .thumb { width: 64px; height: 48px; border-radius: var(--r-sm); background: var(--surface-2) center/cover; flex-shrink: 0; }
.row .chev { color: var(--ink-3); }
button.row { cursor: pointer; }
button.row:hover .row-title { color: var(--flare); }
.row.done-row { opacity: 0.55; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); background-size: cover; background-position: center;
  font-weight: 700; font-size: var(--t-sm); letter-spacing: 0.04em; flex-shrink: 0;
}
.avatar-flare { background: var(--flare); color: var(--on-flare); }
.avatar-image {
  background-color: var(--surface-2);
  background-repeat: no-repeat;
  background-size: auto 118%;
  box-shadow: inset 0 0 0 2px var(--flare-dim);
}

/* ============================================================
   APP SHELL — bottom tabs on mobile, sidebar ≥1100px
   ============================================================ */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
main#view {
  flex: 1; width: 100%;
  padding: var(--s5) var(--gutter) 120px;
  max-width: 560px; margin: 0 auto;
  animation: view-in var(--dur-base) var(--ease-out) both;
}
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main#view.full-bleed { max-width: none; padding: 0 0 120px; }
main#view.no-nav { padding-bottom: var(--s7); }
main#view.full-bleed.no-nav { padding-bottom: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: var(--z-nav);
  display: flex; justify-content: center;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: oklch(0.146 0 0 / 0.88);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar .tabs { display: flex; width: 100%; max-width: 560px; }
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--ink-3); padding: 4px 0;
  transition: color var(--dur-fast) ease;
}
.tabbar a.is-active { color: var(--ink); }
.tabbar a.is-active svg { color: var(--flare); }
.tabbar svg { width: 24px; height: 24px; }
.tabbar.is-hidden { display: none; }

.side-logo { display: none; }

@media (min-width: 1100px) {
  .shell { flex-direction: row; }
  .tabbar {
    position: sticky; top: 0; bottom: auto; height: 100vh;
    width: 232px; flex-shrink: 0;
    flex-direction: column; justify-content: flex-start;
    padding: var(--s6) var(--s4);
    border-top: 0; border-right: 1px solid var(--line);
    background: var(--bg); backdrop-filter: none;
  }
  .side-logo {
    display: block;
    font-variation-settings: 'wdth' 125;
    font-weight: 850; font-size: 1.375rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0 var(--s3); margin-bottom: var(--s7);
  }
  .side-logo em { color: var(--flare); font-style: normal; }
  .tabbar .tabs { flex-direction: column; gap: 2px; max-width: none; }
  .tabbar a {
    flex: 0 0 auto; flex-direction: row; gap: 12px;
    height: 44px; padding: 0 var(--s3);
    border-radius: var(--r-sm);
    font-size: var(--t-md); align-items: center;
  }
  .tabbar a:hover { background: var(--surface); color: var(--ink); }
  .tabbar a.is-active { background: var(--surface); }
  .tabbar svg { width: 20px; height: 20px; }
  main#view { max-width: 1160px; padding: var(--s7) var(--s8) var(--s9); }
  main#view.full-bleed { padding: 0; }
}

/* ============================================================
   SCREENS
   ============================================================ */

/* ---- welcome ---- */
.welcome {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background-size: cover; background-position: center 25%;
  padding: var(--s6) var(--s6) var(--s5);
}
.welcome .logo {
  font-variation-settings: 'wdth' 125;
  font-weight: 850; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.14em; text-indent: 0.14em;
  text-align: center; margin-top: var(--s4);
}
.welcome .logo em { color: var(--flare); font-style: normal; }
.welcome-body { margin-top: auto; display: flex; flex-direction: column; gap: var(--s4); max-width: 460px; }
.welcome h1 { font-size: clamp(2.4rem, 7vw, 3.4rem); max-width: 9ch; }
.welcome h1 .lit { color: var(--flare); }
.welcome .lede { font-size: var(--t-lg); line-height: 1.45; color: var(--ink-2); max-width: 32ch; }
.welcome .cta-stack { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.welcome .coach-proof {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s1);
}
.welcome .coach-proof .avatar { width: 28px; height: 28px; font-size: 0.625rem; }
@media (min-width: 1100px) {
  .welcome { padding: var(--s8) 8vw; }
  .welcome .logo { text-align: left; text-indent: 0; margin-top: 0; }
}

/* ---- onboarding ---- */
.ob { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding: var(--s5) var(--s6) var(--s6); width: 100%; }
.ob-top { display: flex; align-items: center; gap: var(--s4); }
.ob-steps { flex: 1; display: flex; gap: 6px; }
.ob-steps span { height: 4px; flex: 1; border-radius: 2px; background: var(--surface-2); }
.ob-steps span.done { background: var(--flare); }
.ob h1 { font-size: var(--t-3xl); margin-top: var(--s6); }
.ob .sub { color: var(--ink-2); margin-top: var(--s2); }
.goal-list { margin-top: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.goal {
  display: flex; align-items: center; gap: var(--s4);
  padding: 13px var(--s5); width: 100%; text-align: left;
  border-radius: var(--r-lg); background: var(--surface);
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.goal:active { transform: scale(0.98); }
.goal .g-title { font-weight: 700; font-size: var(--t-lg); }
.goal .g-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 1px; }
.goal .g-check {
  margin-left: auto; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center; color: var(--on-flare); flex-shrink: 0;
}
.goal.is-on { border-color: var(--flare); background: var(--flare-dim); }
.goal.is-on .g-check { background: var(--flare); border-color: var(--flare); }
.q-label { font-weight: 700; font-size: var(--t-lg); margin: var(--s6) 0 var(--s3); }
.q-label:first-of-type { margin-top: var(--s5); }
.q-label small { display: block; font-weight: 500; font-size: var(--t-sm); color: var(--ink-3); margin-top: 2px; }
.level-row { display: flex; gap: var(--s2); }
.level {
  flex: 1; padding: var(--s4) var(--s3);
  border-radius: var(--r-md); background: var(--surface);
  border: 1.5px solid transparent; text-align: center;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.level:active { transform: scale(0.97); }
.level .l-name { font-weight: 700; font-size: var(--t-md); }
.level .l-sub { font-size: 0.6875rem; color: var(--ink-3); margin-top: 3px; line-height: 1.3; }
.level.is-on { border-color: var(--flare); background: var(--flare-dim); }
.level.is-on .l-sub { color: var(--ink-2); }
.equip-wrap { display: flex; flex-wrap: wrap; gap: var(--s2); }
.days-row { display: flex; gap: var(--s2); }
.day-pill {
  flex: 1; height: 52px; border-radius: var(--r-md); background: var(--surface);
  display: grid; place-items: center;
  font-family: var(--font-data); font-weight: 600; font-size: var(--t-lg);
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease;
}
.day-pill:active { transform: scale(0.95); }
.day-pill.is-on { border-color: var(--flare); background: var(--flare-dim); color: var(--flare); }
.ob-cta { margin-top: auto; padding-top: var(--s5); }
.ob-cta .hint { text-align: center; font-size: var(--t-sm); color: var(--ink-3); margin-top: var(--s2); }
.coach-aside { margin-top: var(--s5); display: flex; gap: var(--s3); align-items: center; }
.coach-aside .avatar { width: 32px; height: 32px; font-size: 0.625rem; }
.coach-aside p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; max-width: 38ch; }
.ob input.name-input {
  width: 100%; height: 56px; margin-top: var(--s2);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-md); color: var(--ink);
  padding: 0 var(--s4); font: inherit; font-weight: 600;
}
.ob input.name-input:focus { outline: none; border-color: var(--flare); }

/* ---- today ---- */
.today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.today-head .date { font-family: var(--font-data); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.today-head h1 { font-size: var(--t-3xl); margin-top: 4px; }
.streak-chip {
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--flare-dim); color: var(--flare);
  font-weight: 700; font-size: var(--t-sm); flex-shrink: 0;
}
.streak-chip svg { width: 15px; height: 15px; }
.streak-chip.zero { background: var(--surface); color: var(--ink-3); }
.coach-note { margin-top: var(--s5); display: flex; align-items: center; gap: var(--s3); }
.coach-note .avatar { width: 38px; height: 38px; font-size: 0.6875rem; }
.coach-note p { flex: 1; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.4; }
.coach-note p strong { color: var(--ink); }
.hero { margin-top: var(--s5); min-height: 380px; }
.hero .prog-tag {
  display: inline-flex; font-family: var(--font-data); font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--flare); margin-bottom: var(--s2);
}
.hero h2 { font-size: clamp(1.8rem, 6vw, 2.2rem); max-width: 12ch; }
.hero .meta { margin-top: var(--s3); color: var(--ink-2); }
.hero .hero-cta { margin-top: var(--s4); display: flex; align-items: center; gap: var(--s3); }
.hero .hero-cta .btn { flex: 1; max-width: 320px; }
.section { margin-top: var(--s7); }
.week-strip { display: flex; gap: var(--s2); margin-top: var(--s4); }
.wday { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 56px; }
.wday .wd-label { font-family: var(--font-data); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-3); }
.wday .wd-dot {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink-3);
  font-size: var(--t-sm);
}
.wday.done .wd-dot { background: var(--flare); color: var(--on-flare); }
.wday.today-dot .wd-dot { border: 1.5px solid var(--flare); color: var(--flare); background: var(--flare-dim); }
.wday svg { width: 16px; height: 16px; }
.week-line { margin-top: var(--s3); font-size: var(--t-sm); color: var(--ink-2); }
.week-line strong { color: var(--ink); }
.express-scroll {
  display: flex; gap: var(--s3);
  overflow-x: auto; scrollbar-width: none;
  margin: var(--s4) calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter);
}
.express-scroll::-webkit-scrollbar { display: none; }
.express { min-width: 224px; max-width: 260px; height: 136px; flex-shrink: 0; border-radius: var(--r-lg); }
.express .scrim {
  background: linear-gradient(186deg,
    oklch(0.10 0.01 60 / 0.42) 0%,
    oklch(0.10 0.01 60 / 0.62) 55%,
    oklch(0.08 0.01 60 / 0.94) 100%);
}
.express .card-body { padding: var(--s4); }
.express h3 { font-size: var(--t-md); font-weight: 700; }
.express .meta { margin-top: 4px; font-size: var(--t-xs); }
.rest-card {
  margin-top: var(--s5); padding: var(--s6);
  border-radius: var(--r-lg);
  background: radial-gradient(ellipse 120% 120% at 100% 0%, var(--frost-dim), transparent 60%), var(--surface);
}
.rest-card h2 { font-size: var(--t-xl); }
.rest-card p { color: var(--ink-2); margin-top: var(--s2); font-size: var(--t-sm); max-width: 44ch; }

@media (min-width: 1100px) {
  .today-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--s5); margin-top: var(--s5); align-items: stretch; }
  .today-grid .hero { margin-top: 0; min-height: 440px; }
  .today-grid .hero .card-body { padding: var(--s7); }
  .today-grid .hero h2 { font-size: 2.8rem; }
  .today-rail { display: flex; flex-direction: column; gap: var(--s5); }
  .today-rail .panel { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); }
  .today-rail .panel .coach-note, .today-rail .panel .week-strip { margin-top: var(--s4); }
  .today-rail .panel h3 { font-size: var(--t-md); font-weight: 700; }
  .below-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--s8); }
  .below-grid .section .express-scroll { flex-direction: column; margin: var(--s4) 0 0; padding: 0; overflow: visible; }
  .below-grid .express { min-width: 0; max-width: none; height: 104px; }
}

/* ---- train / programme cards ---- */
.train-head h1 { font-size: var(--t-3xl); }
.prog-card { margin-top: var(--s4); min-height: 300px; }
.prog-card.compact { min-height: 220px; }
.prog-card .pc-state {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-data); font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--flare); margin-bottom: var(--s2);
}
.prog-card h2 { font-size: clamp(1.7rem, 5.5vw, 2.1rem); }
.prog-card .byline { margin-top: 4px; font-size: var(--t-sm); color: var(--ink-2); font-weight: 600; }
.prog-card .meta { margin-top: var(--s3); }
.prog-card .segs { margin-top: var(--s4); }
@media (min-width: 1100px) {
  .train-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
  .train-grid .prog-card { margin-top: 0; min-height: 360px; }
}

/* ---- programme detail ---- */
.prog-hero {
  position: relative; min-height: 360px;
  background-size: cover; background-position: center 30%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s5) var(--gutter);
}
.prog-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(190deg,
    oklch(0.12 0.01 60 / 0.3) 0%,
    oklch(0.12 0.01 60 / 0.1) 35%,
    oklch(0.146 0 0 / 0.85) 82%,
    oklch(0.146 0 0) 100%);
}
.prog-hero > * { position: relative; }
.prog-hero .topbar { position: absolute; top: var(--s5); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; }
.prog-hero .byline { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); margin-bottom: var(--s2); }
.prog-hero .byline .avatar { width: 26px; height: 26px; font-size: 0.5625rem; }
.prog-hero h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
.prog-hero h1 span { color: var(--flare); }
.prog-body { padding: 0 var(--gutter) 150px; max-width: 560px; margin: 0 auto; width: 100%; }
.fact-strip { display: flex; border-radius: var(--r-md); background: var(--surface); margin-top: var(--s5); }
.fact { flex: 1; padding: var(--s4) var(--s2); text-align: center; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact .f-v { font-family: var(--font-data); font-weight: 600; font-size: var(--t-md); white-space: nowrap; }
.fact .f-k { font-size: 0.6563rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin-top: 3px; font-weight: 600; }
.promise { margin-top: var(--s6); }
.promise p { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); }
.promise p strong { color: var(--ink); }
.promise .sig { margin-top: var(--s3); font-size: var(--t-sm); color: var(--ink-3); }
.outcomes { margin-top: var(--s6); display: flex; flex-direction: column; gap: var(--s3); }
.outcome { display: flex; gap: var(--s3); align-items: center; font-weight: 600; }
.outcome .o-ic {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--flare-dim); color: var(--flare);
  display: grid; place-items: center; flex-shrink: 0;
}
.outcome svg { width: 15px; height: 15px; }
.weeks { margin-top: var(--s7); }
.week-row { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) 0; }
.week-row + .week-row { border-top: 1px solid var(--line); }
.week-num { font-family: var(--font-data); font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); width: 38px; flex-shrink: 0; }
.week-row.done .week-num { color: var(--flare); }
.week-row .w-main { flex: 1; }
.week-row .w-title { font-weight: 700; }
.week-row .w-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 1px; }
.week-row .segs { width: 72px; flex-shrink: 0; }
.session-list { margin-top: var(--s2); }
.proof { margin-top: var(--s7); padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); }
.proof blockquote { font-size: var(--t-lg); line-height: 1.5; font-weight: 500; }
.proof .who { margin-top: var(--s3); font-size: var(--t-sm); color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.proof .who .avatar { width: 28px; height: 28px; font-size: 0.5625rem; background: var(--frost-dim); color: var(--frost); }
.proof .count { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); }
.proof .count strong { color: var(--flare); font-family: var(--font-data); }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky);
  padding: var(--s4) var(--gutter) calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, oklch(0.146 0 0 / 0));
  display: flex; justify-content: center;
}
.sticky-cta .inner { width: 100%; max-width: 520px; }
.sticky-cta .included { text-align: center; font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s2); font-weight: 500; }
@media (min-width: 1100px) {
  .prog-hero { min-height: 420px; border-radius: var(--r-lg); margin: var(--s7) var(--s8) 0; padding: var(--s7); }
  .prog-hero .topbar { top: var(--s6); left: var(--s6); right: var(--s6); }
  .prog-layout { display: grid; grid-template-columns: 1fr 360px; gap: var(--s8); max-width: 1160px; margin: 0 auto; padding: 0 var(--s8) var(--s9); align-items: start; }
  .prog-body { padding: 0; max-width: none; }
  .enrol-rail { position: sticky; top: var(--s6); background: var(--surface); border-radius: var(--r-lg); padding: var(--s6); margin-top: var(--s7); }
  .enrol-rail .fact-strip { flex-direction: column; background: none; margin: 0 0 var(--s4); }
  .enrol-rail .fact { display: flex; justify-content: space-between; padding: var(--s2) 0; text-align: left; }
  .enrol-rail .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .enrol-rail .fact .f-k { margin-top: 0; align-self: center; order: -1; font-size: var(--t-sm); text-transform: none; letter-spacing: 0; color: var(--ink-2); font-weight: 500; }
  .sticky-cta { display: none; }
}

/* ---- player ---- */
.player-page { min-height: 100dvh; background: var(--bg-deep); display: flex; flex-direction: column; }
.pl-top { padding: var(--s4) var(--gutter) 0; max-width: 1160px; margin: 0 auto; width: 100%; }
.pl-head { display: flex; align-items: flex-start; gap: var(--s4); margin-top: var(--s3); }
.pl-head .move-label { font-family: var(--font-data); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--flare); }
.pl-head h1 { font-size: clamp(1.5rem, 5vw, 1.9rem); margin-top: 4px; }
.pl-head .set-info { font-size: var(--t-sm); color: var(--ink-2); margin-top: 4px; font-weight: 600; }
.pl-head .ibtn { margin-left: auto; }
.video-wrap {
  position: relative; margin: var(--s4) var(--gutter) 0;
  border-radius: var(--r-lg); overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  max-width: 1160px;
}
.video-wrap iframe, .video-wrap #yt-mount { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-bottom { padding: var(--s5) var(--gutter) calc(28px + env(safe-area-inset-bottom)); max-width: 1160px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: var(--s4); }
.session-progress { display: flex; align-items: center; gap: var(--s3); }
.session-progress .bar { flex: 1; height: 5px; }
.session-progress .t { font-family: var(--font-data); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink);
  background: oklch(1 0 0 / 0.07);
  padding: 10px 18px; border-radius: var(--r-pill);
  align-self: flex-start;
}
.cue svg { width: 15px; height: 15px; color: var(--flare); }
.pl-actions { display: flex; gap: var(--s3); align-items: center; }
.pl-actions .btn { flex: 1; max-width: 420px; }
.credit { font-size: var(--t-xs); color: var(--ink-3); }
.credit a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 1100px) {
  .pl-grid { display: grid; grid-template-columns: 1fr 320px; gap: var(--s5); max-width: 1160px; margin: 0 auto; width: 100%; padding: 0 var(--gutter); align-items: start; }
  .pl-grid .video-wrap { margin: var(--s4) 0 0; }
  .pl-rail { margin-top: var(--s4); background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); }
  .pl-rail h3 { font-size: var(--t-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: var(--s2); }
}

/* countdown overlay */
.countdown {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: grid; place-items: center;
  background: oklch(0.115 0 0 / 0.92);
  backdrop-filter: blur(6px);
}
.countdown .num {
  font-family: var(--font-data); font-weight: 700; font-size: 7rem;
  color: var(--flare);
  animation: count-tick 1s var(--ease-out) infinite;
}
@keyframes count-tick { 0% { opacity: 0; transform: scale(0.86); } 18% { opacity: 1; transform: scale(1); } 88% { opacity: 1; } 100% { opacity: 0; } }
.countdown .skip-cd { position: absolute; bottom: 56px; color: var(--ink-3); font-weight: 600; }

/* ---- complete ---- */
.done-screen {
  min-height: 100dvh;
  background: radial-gradient(ellipse 90% 42% at 50% 22%, oklch(0.81 0.158 75 / 0.16), transparent 70%), var(--bg-deep);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s8) var(--s6) var(--s7);
}
.done-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s5); width: 100%; max-width: 460px; }
.done-ring { position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
.done-ring svg.dial { position: absolute; inset: 0; transform: rotate(-90deg); }
.done-ring .track { stroke: oklch(1 0 0 / 0.10); }
.done-ring .fill {
  stroke: var(--flare); stroke-linecap: round;
  filter: drop-shadow(0 0 14px oklch(0.81 0.158 75 / 0.55));
  stroke-dasharray: 490.1;
  animation: ring-close 900ms var(--ease-out) both;
}
@keyframes ring-close { from { stroke-dashoffset: 490.1; } to { stroke-dashoffset: 0; } }
.done-ring .glyph { color: var(--flare); animation: glyph-in 500ms 600ms var(--ease-out) both; }
@keyframes glyph-in { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
.done-title .k { font-family: var(--font-data); font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--flare); }
.done-title h1 { font-size: var(--t-4xl); margin-top: var(--s2); }
.done-stats { display: flex; gap: var(--s7); }
.dstat .v { font-family: var(--font-data); font-weight: 700; font-size: var(--t-2xl); }
.dstat .k { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.streak-line { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--t-md); color: var(--flare); flex-wrap: wrap; justify-content: center; }
.streak-line svg { width: 17px; height: 17px; }
.streak-line small { font-weight: 500; color: var(--ink-2); }
.prog-bump { width: 100%; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: oklch(1 0 0 / 0.05); text-align: left; }
.prog-bump .pb-top { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-sm); font-weight: 600; }
.prog-bump .pb-top .pct { font-family: var(--font-data); color: var(--flare); }
.prog-bump .segs { margin-top: var(--s3); }
.prog-bump .pb-note { margin-top: var(--s3); font-size: var(--t-sm); color: var(--ink-2); }
.prog-bump .pb-note strong { color: var(--ink); }
.done-ctas { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s5); }

/* ---- progress ---- */
.pg-head h1 { font-size: var(--t-3xl); }
.week-block { margin-top: var(--s5); padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); display: flex; align-items: center; gap: var(--s5); }
.wb-ring { width: 108px; height: 108px; flex-shrink: 0; }
.wb-ring .c { text-align: center; }
.wb-ring .c .v { font-family: var(--font-data); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.wb-ring .c .v small { color: var(--ink-3); font-size: 1rem; }
.wb-ring .c .k { font-size: 0.5938rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.wb-info { flex: 1; }
.wb-info h2 { font-size: var(--t-lg); font-weight: 700; }
.wb-info p { font-size: var(--t-sm); color: var(--ink-2); margin-top: 4px; line-height: 1.45; }
.wb-info p strong { color: var(--ink); }
.wb-streak { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s3); font-weight: 700; font-size: var(--t-sm); color: var(--flare); }
.wb-streak svg { width: 14px; height: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 10px; justify-items: center; margin-top: var(--s4); }
.cal-grid .dow { font-family: var(--font-data); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.06em; color: var(--ink-3); }
.cal-d {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: var(--t-sm); font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.cal-d.trained { background: var(--flare); color: var(--on-flare); font-weight: 700; }
.cal-d.today-d { box-shadow: inset 0 0 0 1.5px var(--flare); color: var(--ink); }
.cal-d.trained.today-d { box-shadow: none; }
.cal-d.future { color: var(--ink-3); }
.cal-legend { display: flex; gap: var(--s4); margin-top: var(--s4); font-size: var(--t-xs); color: var(--ink-2); font-weight: 500; }
.cal-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.totals-strip { display: flex; gap: var(--s2); margin-top: var(--s4); }
.tstat { flex: 1; padding: var(--s4) var(--s3); border-radius: var(--r-md); background: var(--surface); text-align: center; }
.tstat .v { font-family: var(--font-data); font-weight: 700; font-size: var(--t-xl); }
.tstat .k { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.miles { display: flex; gap: var(--s3); overflow-x: auto; scrollbar-width: none; margin: var(--s4) calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); }
.miles::-webkit-scrollbar { display: none; }
.mile { min-width: 128px; padding: var(--s4) var(--s3); border-radius: var(--r-md); background: var(--surface); text-align: center; flex-shrink: 0; }
.mile .m-glyph { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--flare-dim); color: var(--flare); }
.mile .m-glyph svg { width: 20px; height: 20px; }
.mile .m-name { font-weight: 700; font-size: var(--t-sm); margin-top: var(--s3); }
.mile .m-date { font-family: var(--font-data); font-size: 0.625rem; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.04em; }
.mile.locked { opacity: 0.55; }
.mile.locked .m-glyph { background: var(--surface-2); color: var(--ink-3); }
@media (min-width: 1100px) {
  .pg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s5); }
  .pg-grid .week-block, .pg-grid .panel-cal { margin-top: 0; }
  .panel-cal { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); }
  .miles { margin: var(--s4) 0 0; padding: 0; flex-wrap: wrap; overflow: visible; }
  .mile { flex: 1; min-width: 150px; }
}

/* ---- you ---- */
.you-head { display: flex; align-items: center; gap: var(--s4); }
.you-head .avatar { width: 64px; height: 64px; font-size: var(--t-lg); }
.you-head h1 { font-size: var(--t-2xl); font-weight: 750; letter-spacing: -0.01em; }
.you-head .since { font-family: var(--font-data); font-size: var(--t-xs); color: var(--ink-3); margin-top: 3px; letter-spacing: 0.04em; }
.member-card {
  margin-top: var(--s5); padding: var(--s5); border-radius: var(--r-lg);
  background: radial-gradient(ellipse 110% 130% at 100% 0%, oklch(0.81 0.158 75 / 0.18), transparent 55%), var(--surface);
}
.member-card .mc-tier {
  display: flex; align-items: center; gap: 8px;
  font-variation-settings: 'wdth' 120;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--t-md);
}
.member-card .mc-tier svg { width: 16px; height: 16px; color: var(--flare); }
.member-card .mc-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 6px; }
.member-card .mc-row { margin-top: var(--s4); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.member-card .mc-renew { font-family: var(--font-data); font-size: var(--t-xs); color: var(--ink-3); }
.pref-block { margin-top: var(--s4); }
.pref-block .q-label { margin-top: var(--s5); }
.r-ic { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
.r-ic.flare { background: var(--flare-dim); color: var(--flare); }
.you-foot { margin-top: var(--s7); text-align: center; }
.you-foot .signout { color: var(--ink-3); font-weight: 600; font-size: var(--t-sm); }
.you-foot .version { margin-top: var(--s3); font-family: var(--font-data); font-size: 0.625rem; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.credits-list { margin-top: var(--s2); }
.credits-list .row-sub a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 1100px) {
  .you-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: start; }
}

/* ---- Built by NoobiBuilds badge (locked chrome — every creator build) ---- */
.noobi-badge {
  display: inline-flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center;
}
.noobi-badge .nb-label {
  font-family: var(--font-data); font-size: 0.5938rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3);
}
.noobi-badge .nb-plate {
  display: inline-flex; align-items: center;
  background:
    linear-gradient(135deg, oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.07));
  border: 1px solid oklch(1 0 0 / 0.14);
  border-radius: var(--r-pill);
  padding: 6px 11px;
  box-shadow: 0 8px 22px oklch(0 0 0 / 0.24);
  backdrop-filter: blur(12px) saturate(1.1);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.noobi-badge img {
  height: 24px; width: auto; display: block;
  filter: drop-shadow(0 1px 2px oklch(0 0 0 / 0.42));
}
.noobi-badge:hover .nb-plate { transform: scale(1.03); border-color: oklch(1 0 0 / 0.22); box-shadow: 0 10px 28px oklch(0 0 0 / 0.3); }
.noobi-badge:active .nb-plate { transform: scale(0.97); }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: var(--z-toast);
  background: var(--surface-2); color: var(--ink);
  padding: 12px 20px; border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 600;
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) ease, transform var(--dur-base) var(--ease-out);
  max-width: min(90vw, 420px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 1100px) { .toast { bottom: 40px; } }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: grid; align-items: end;
  background: oklch(0 0 0 / 0.58);
  padding: var(--s4);
}
.checkout-sheet {
  position: relative;
  width: min(100%, 520px); margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s6);
  box-shadow: 0 24px 80px oklch(0 0 0 / 0.5);
}
.checkout-sheet .display-2 { margin-top: var(--s2); }
.sheet-copy { color: var(--ink-2); margin-top: var(--s3); }
.sheet-actions { display: grid; gap: var(--s3); margin-top: var(--s5); }
.sheet-close { position: absolute; top: var(--s4); right: var(--s4); }
@media (min-width: 760px) { .sheet-backdrop { align-items: center; } }

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