/* FlowState home page. Hand-written; the home page is not generated by build.py.
   Tokens come from the approved design boards. Brand rules: Flame (#F4621E) is only ever a small fill,
   text on a Flame fill is ink, orange text is #BA4009 on light and Flame on dark, no large orange surface.
   Everything is visible by default. Motion is an enhancement: see the .js-ready and
   prefers-reduced-motion blocks near the end. */

/* ---- Font: Apple devices use their own SF Rounded (ui-rounded); everything else gets Nunito (SIL OFL) ---- */
@font-face {
  font-family: "Nunito";
  src: url(fonts/nunito-latin-wght.woff2) format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched stand-ins so the swap to Nunito does not move anything. */
@font-face {
  font-family: "Nunito Fallback";
  src: local("Arial");
  font-weight: 200 599;
  size-adjust: 101%;
  ascent-override: 100.1%;
  descent-override: 34.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Nunito Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 1000;
  size-adjust: 100.3%;
  ascent-override: 100.8%;
  descent-override: 35.2%;
  line-gap-override: 0%;
}

@property --n { syntax: "<integer>"; initial-value: 0; inherits: false; }

:root {
  color-scheme: light dark;
  --flame: #f4621e;
  --ink: #1c1b1f;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* The app in its native dark: the workout screen, the Lock Screen card and the capsule stay these in both themes. */
  --k-bg: #131217;
  --k-card: #1f1d24;
  --k-raised: #2a2732;
  --k-text: #f5f3f0;
  --k-sub: #9d978f;
  --k-mute: #6b6660;
  /* Light */
  --bg: #f7f5f2;
  --card: #ffffff;
  --raised: #ece8e4;
  --tile: #ece8e4;
  --text: #1c1b1f;
  --sub: #6f6a63;
  --sub-raised: #655f58;
  --line: rgba(28, 27, 31, 0.1);
  --accent: #ba4009;
  --accent-hover: #9f380a;
  --rings: #e6e1db;
  --cap-edge: rgba(0, 0, 0, 0);
  --lock-bg: #1c1b1f;
  --shadow: 0 1px 0 rgba(28, 27, 31, 0.04), 0 28px 56px -30px rgba(28, 27, 31, 0.26);
  --phone-edge: rgba(0, 0, 0, 0);
  --phone-shadow: 0 40px 70px -36px rgba(28, 27, 31, 0.55);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Nunito Fallback", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131217;
    --card: #1f1d24;
    --raised: #2a2732;
    --tile: #1f1d24;
    --text: #f5f3f0;
    --sub: #9d978f;
    --sub-raised: #9d978f;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #f4621e;
    --accent-hover: #ff8750;
    --rings: #24212b;
    --cap-edge: rgba(255, 255, 255, 0.12);
    --lock-bg: #0a090d;
    --shadow: none;
    --phone-edge: rgba(255, 255, 255, 0.12);
    --phone-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { flex: none; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }
[data-clock], [data-rest], .cnt { font-variant-numeric: tabular-nums; font-kerning: none; }

.page { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; overflow: clip; }
main { flex: 1 0 auto; }
.wrap { position: relative; width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }

/* Faint rings behind the hero */
.rings { position: absolute; top: 0; left: 50%; pointer-events: none; color: var(--rings); }
.rings svg { display: block; }
.rings-wide { width: 1440px; height: 960px; margin-left: -720px; }
.rings-wide svg { -webkit-mask-image: radial-gradient(900px 620px at 720px 640px, #000 20%, transparent 100%); mask-image: radial-gradient(900px 620px at 720px 640px, #000 20%, transparent 100%); }
.rings-narrow { display: none; width: 390px; height: 1000px; margin-left: -195px; }
.rings-narrow svg { -webkit-mask-image: linear-gradient(to bottom, transparent 26%, #000 58%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 26%, #000 58%, transparent 100%); }

/* The brand mark: the PNG's alpha used as a mask over a Flame fill */
.mark {
  display: block;
  flex: none;
  background: var(--flame);
  -webkit-mask: url(mark.png) center / contain no-repeat;
  mask: url(mark.png) center / contain no-repeat;
}

/* ---- Header ---- */
.site-header { display: flex; align-items: center; height: 96px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font-size: 22px; font-weight: 900; letter-spacing: -0.3px; }
.brand:hover { color: var(--text); }
.brand .mark { width: 38px; height: 17px; }

/* ---- Buttons ---- */
.btn {
  display: flex; align-items: center; justify-content: center;
  height: 54px; padding: 0 28px; border-radius: 16px;
  background: var(--flame); color: var(--ink);
  font-size: 17px; font-weight: 900; text-decoration: none;
  transition: scale 0.16s var(--ease);
}
.btn:hover { color: var(--ink); filter: brightness(1.05); }
.btn:active { scale: 0.96; }

/* ---- Hero ---- */
.hero { padding-top: 8px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { font-size: clamp(44px, 5.9vw, 84px); font-weight: 900; line-height: 1; letter-spacing: -0.035em; }
.hero-sub { margin-top: 22px; max-width: 560px; font-size: 21px; font-weight: 600; line-height: 1.45; color: var(--sub); text-wrap: pretty; }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; }
.status { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--sub); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--flame); }

/* The exhibit: three pieces of the app on the page. Wide: lock card | ring card | chart card. */
.exhibit { position: relative; width: 100%; max-width: 1148px; margin-top: 52px; display: grid; grid-template-columns: minmax(0, 344fr) minmax(0, 404fr) minmax(0, 344fr); column-gap: 28px; align-items: start; text-align: left; }
.x-lock { grid-column: 1; grid-row: 1; margin-top: 46px; display: flex; flex-direction: column; gap: 14px; }
.x-ring { grid-column: 2; grid-row: 1; }
.x-chart { grid-column: 3; grid-row: 1; margin-top: 78px; display: flex; flex-direction: column; gap: 12px; }

.card { border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.tile { width: 36px; height: 36px; border-radius: 10px; background: rgba(244, 98, 30, 0.16); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }

/* Weekly ring card */
.ringcard { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.rc-top { display: flex; align-items: center; gap: 24px; }
.ring { position: relative; width: 136px; height: 136px; flex: none; }
.ring svg { display: block; width: 100%; height: 100%; }
.track { fill: none; stroke: var(--raised); stroke-width: 11; }
.arc { fill: none; stroke: var(--flame); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 261.4 326.7; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 38px; font-weight: 900; line-height: 1; }
.cnt { --n: 4; display: inline-block; min-width: 1ch; text-align: right; counter-reset: n var(--n); }
.cnt::after { content: counter(n); }
.cnt-close { --n: 5; }
.of { color: var(--sub); font-size: 24px; }
.ring-cap { font-size: 13px; font-weight: 700; color: var(--sub); }
.rc-stats { display: flex; flex-direction: column; gap: 14px; }
.rc-stats > div { display: flex; flex-direction: column; }
.streak { display: flex; align-items: center; gap: 6px; font-size: 28px; font-weight: 900; color: var(--accent); }
.streak svg { width: 20px; height: 20px; }
.vol { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-cap { font-size: 14px; font-weight: 600; color: var(--sub); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 68px; }
.bar { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--raised); }
.bar.on, .bar.today { height: var(--h); border-radius: 6px; transform-origin: center bottom; }
.bar.on { background: var(--flame); }
.bar.today { background: none; border: 2px dashed var(--flame); }
.day:nth-child(1) { --h: 30px; }
.day:nth-child(3) { --h: 44px; }
.day:nth-child(4) { --h: 27px; }
.day:nth-child(5) { --h: 44px; }
.dl { font-size: 12px; font-weight: 700; color: var(--sub); }
.dl.now { font-weight: 900; color: var(--accent); }

/* Dynamic Island capsule and Lock Screen card (always the app's dark) */
.island { align-self: center; width: 250px; height: 37px; border-radius: 19px; background: #000; border: 1px solid var(--cap-edge); display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 14px; }
.island .mark { width: 26px; height: 12px; }
.cap { position: relative; width: 50px; height: 25px; display: flex; align-items: center; justify-content: center; flex: none; }
.cap svg { position: absolute; left: 0; top: 0; display: block; }
.cap-track { fill: none; stroke: rgba(255, 255, 255, 0.18); stroke-width: 2; }
.cap-arc { fill: none; stroke: var(--flame); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 80 100; transition: stroke-dasharray 1s linear; }
.cap-time { position: relative; font-size: 13px; font-weight: 800; color: #fff; }
.lock { border-radius: 24px; background: var(--lock-bg); border: 1px solid var(--cap-edge); color: #fff; padding: 18px; display: flex; flex-direction: column; }
.lock-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; font-size: 15px; }
.lock-head .mark { width: 28px; height: 13px; }
.lock-title { font-weight: 800; white-space: nowrap; }
.lock-time { font-weight: 700; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lock-sets { margin-left: auto; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.65); font-variant-numeric: tabular-nums; white-space: nowrap; }
.segs { margin-top: 12px; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.segs i { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
.segs i.on { background: var(--flame); }
.lock-rest { margin-top: 16px; display: flex; align-items: flex-end; gap: 16px; }
.lock-clock { display: flex; flex-direction: column; flex: none; }
.lbl { font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.big { margin-top: 2px; font-size: 50px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.lock-next { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: 2px; }
.nx { margin-top: 2px; font-size: 19px; font-weight: 900; line-height: 24px; font-variant-numeric: tabular-nums; }
.nx-ex { font-size: 13px; font-weight: 700; line-height: 17px; color: rgba(255, 255, 255, 0.65); }

/* Chart card and the New record row */
.chartcard { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cc-title { display: flex; flex-direction: column; gap: 2px; }
.cc-cap { font-size: 13px; font-weight: 700; color: var(--sub); }
.cc-num { font-size: 34px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.unit { font-size: 18px; color: var(--sub); }
.range { display: flex; padding: 3px; border-radius: 10px; background: var(--raised); font-size: 12px; font-weight: 800; color: var(--sub-raised); flex: none; }
.range span { padding: 4px 9px; border-radius: 7px; }
.range .sel { background: var(--card); color: var(--text); }
.chart { display: block; width: 100%; max-width: 304px; height: auto; overflow: visible; }
.chart .grid { fill: none; stroke: var(--line); stroke-width: 1; }
.spark { fill: none; stroke: var(--flame); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 100; }
.spark-dot { fill: var(--flame); }
.recordrow { border-radius: 20px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.rr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rr-title { font-size: 16px; font-weight: 800; }
.rr-sub { font-size: 13px; font-weight: 600; color: var(--sub); }
.rr-val { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Two-column sections ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: center; }
.copy { max-width: 540px; display: flex; flex-direction: column; align-items: flex-start; }
.eyebrow { display: block; font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.copy h2 { text-wrap: balance; margin-top: 16px; font-size: clamp(36px, 4vw, 56px); font-weight: 900; line-height: 1.04; letter-spacing: -0.03em; }
.copy p { margin-top: 22px; font-size: 20px; font-weight: 600; line-height: 1.5; color: var(--sub); text-wrap: pretty; }

.log { padding-top: 40px; padding-bottom: 130px; grid-template-rows: 1fr auto auto 1fr; }
.log h2 { font-size: clamp(38px, 4.4vw, 62px); line-height: 1.02; }
.log .copy { grid-column: 1; grid-row: 2; }
.log .beats { grid-column: 1; grid-row: 3; }
.log .visual { grid-column: 2; grid-row: 1 / 5; justify-self: center; }
.beats { margin-top: 36px; max-width: 540px; display: flex; flex-direction: column; gap: 20px; }
.beats li { display: flex; align-items: flex-start; gap: 16px; }
.n { width: 36px; height: 36px; border-radius: 10px; background: var(--tile); font-size: 15px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; }
.t { display: flex; flex-direction: column; gap: 2px; }
.t strong { font-size: 17px; font-weight: 800; }
.t span { font-size: 15px; font-weight: 600; color: var(--sub); }

.records { padding-bottom: 130px; }
.records .copy { grid-column: 2; grid-row: 1; }
.records .visual { grid-column: 1; grid-row: 1; justify-self: center; width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 12px; }
.banner { border-radius: 20px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.banner .tile { width: 40px; height: 40px; border-radius: 12px; }
.banner .rr-title { font-size: 17px; }
.banner .rr-sub { font-size: 14px; }
.banner .rr-val { font-size: 20px; }
.reps { padding: 8px 20px; display: flex; flex-direction: column; }
.reps-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 10px; font-size: 17px; font-weight: 800; }
.sub { font-size: 14px; font-weight: 700; color: var(--sub); }
.rep { display: flex; align-items: center; min-height: 52px; border-top: 1px solid var(--line); }
.rep-l { flex: 1; font-size: 16px; font-weight: 700; color: var(--sub); }
.rep-v { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rep-v small { font-size: 13px; font-weight: 700; color: var(--sub); }
.rep.best { gap: 10px; }
.rep.best .rep-l { flex: none; font-weight: 800; color: var(--text); }
.today { margin-right: auto; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: var(--accent); }

.data { padding-bottom: 110px; }
.facts { justify-self: center; width: 100%; max-width: 500px; padding: 6px 20px; display: flex; flex-direction: column; }
.facts li { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 0; }
.facts li + li { border-top: 1px solid var(--line); }
.f-text { display: flex; flex-direction: column; gap: 1px; }
.f-text strong { font-size: 16px; font-weight: 800; }
.f-text span { font-size: 14px; font-weight: 600; color: var(--sub); }
.facts a { font-weight: 700; padding: 14px 0; }

/* ---- Templates strip ---- */
.tpl-inner { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 36px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.tpl-text { display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.tpl-text h3 { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.tpl-text p { font-size: 16px; font-weight: 600; color: var(--sub); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--tile); font-size: 15px; font-weight: 800; display: flex; align-items: center; }

/* ---- Closing ---- */
.closing { padding-top: 120px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.close-ring { position: relative; width: 132px; height: 132px; }
.close-ring svg { display: block; width: 100%; height: 100%; }
.close-ring .track, .close-ring .arc { stroke-width: 9; }
.close-arc { stroke-dasharray: 326.7 326.7; }
.close-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 900; line-height: 1; }
.close-num .of { font-size: 23px; }
.closing h2 { text-wrap: balance; margin-top: 36px; font-size: clamp(36px, 4.2vw, 60px); font-weight: 900; line-height: 1.03; letter-spacing: -0.03em; }
.nw { white-space: nowrap; }
.close-sub { margin-top: 20px; max-width: 480px; font-size: 20px; font-weight: 600; line-height: 1.5; color: var(--sub); text-wrap: pretty; }
.closing .btn { margin-top: 32px; }
.fine { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--sub); }

/* ---- Footer ---- */
.site-footer { padding-bottom: 44px; }
.foot-row { border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 900; letter-spacing: -0.2px; }
.foot-brand .mark { width: 30px; height: 13px; }
.site-footer nav { display: flex; gap: 24px; font-size: 15px; font-weight: 700; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.made { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--sub); }
.site-footer .fine { margin-top: 14px; font-size: 13px; }

/* ---- The workout screen (always the app's native dark) ---- */
.panel { display: none; }
.frame { position: relative; width: 368px; height: 779px; border-radius: 58px; background: #08070a; border: 1px solid var(--phone-edge); box-shadow: var(--phone-shadow); padding: 8px; color: var(--k-text); }
.screen { position: relative; width: 350px; height: 761px; border-radius: 50px; overflow: hidden; background: var(--k-bg); }
.canvas { position: absolute; left: 0; top: 0; width: 402px; height: 874px; transform: scale(0.8706); transform-origin: 0 0; background: var(--k-bg); }
.w-body { display: flex; flex-direction: column; gap: 12px; padding: 56px 16px 0; }
.round { width: 40px; height: 40px; border-radius: 50%; background: var(--k-card); display: flex; align-items: center; justify-content: center; flex: none; }
.w-top { display: flex; align-items: center; justify-content: space-between; }
.w-time { display: flex; flex-direction: column; align-items: center; }
.w-day { font-size: 13px; font-weight: 700; color: var(--k-sub); }
.w-clock { font-size: 22px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.prog { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.prog i { height: 4px; border-radius: 2px; background: #2a2732; }
.prog .a { background: var(--k-text); }
.prog .b { background: var(--k-mute); }
.w-title { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 6px; }
.p-title { display: flex; flex-direction: column; gap: 2px; }
.ex { font-size: 30px; font-weight: 900; line-height: 1.1; letter-spacing: -0.3px; }
.ex-sub { font-size: 15px; font-weight: 600; color: var(--k-sub); }
.last { display: flex; align-items: center; gap: 8px; }
.last-lbl { font-size: 13px; font-weight: 700; color: var(--k-sub); }
.pill { height: 26px; padding: 0 9px; border-radius: 8px; background: var(--k-raised); color: var(--k-sub); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.sets { border-radius: 20px; background: var(--k-card); padding: 14px 12px 4px; display: flex; flex-direction: column; gap: 8px; }
.sets-head, .set-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; }
.sets-head { font-size: 11px; font-weight: 800; letter-spacing: 0.6px; color: var(--k-sub); text-align: center; }
.set-row { align-items: center; }
.sn { font-size: 15px; font-weight: 900; text-align: center; }
.dim { color: var(--k-sub); }
.field { height: 42px; border-radius: 12px; background: var(--k-raised); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; }
.chk { display: flex; justify-content: center; }
.chk svg { display: block; }
.set-warm { display: grid; grid-template-columns: 32px minmax(0, 1fr) 44px; gap: 8px; align-items: center; height: 30px; }
.warm-tag { justify-self: center; width: 28px; height: 22px; border-radius: 7px; border: 1.5px solid var(--k-mute); font-size: 12px; font-weight: 900; color: var(--k-sub); display: flex; align-items: center; justify-content: center; }
.warm-txt { padding-left: 6px; font-size: 15px; font-weight: 800; color: var(--k-sub); font-variant-numeric: tabular-nums; }
.warm-txt span { font-weight: 700; }
.add-set { height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--k-sub); }
.logbtn { height: 54px; border-radius: 16px; background: var(--flame); color: var(--ink); font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 8px; }
.up-next { display: flex; align-items: center; gap: 10px; padding: 4px 6px 0; }
.un-name { font-size: 15px; font-weight: 800; }
.un-meta { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--k-sub); font-variant-numeric: tabular-nums; }
.restbar { border-radius: 28px; background: var(--k-card); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35); padding: 10px; display: flex; flex-direction: column; }
.restbar.float { position: absolute; left: 12px; right: 12px; bottom: 22px; }
.rest { overflow: hidden; max-height: 60px; }
.rest-in { padding: 4px 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.rest-top { display: flex; align-items: baseline; justify-content: space-between; }
.rest-lbl { font-size: 13px; font-weight: 800; color: var(--k-sub); }
.rest-clock { font-size: 22px; font-weight: 900; line-height: 1; }
.rest-track { display: block; height: 3px; border-radius: 2px; background: var(--k-raised); overflow: hidden; }
.rline { display: block; width: 100%; height: 100%; border-radius: 2px; background: var(--flame); transform-origin: left center; transition: transform 1s linear; }
.bar-btns { display: flex; gap: 10px; }
.b-add, .b-fin { height: 52px; border-radius: 18px; background: var(--k-raised); font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.b-add { flex: 1; gap: 7px; white-space: nowrap; }
.b-fin { width: 124px; }

/* Demo states. With no classes the screen shows its finished state: set 2 logged, rest strip up. */
.wash { fill: #42271f; transform-box: fill-box; transform-origin: center; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.draw { fill: none; stroke: var(--flame); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.3s var(--ease) 0.05s; }
.logbtn { transition: transform 0.14s var(--ease); }
.rest { transition: max-height 0.35s var(--ease), opacity 0.3s var(--ease); }
.demo.press .logbtn { transform: scale(0.96); }
/* The button names the next set to log: set 3 once set 2 is ticked (the resting state and the no-script state). */
.logbtn .lbl-pre { display: none; }
.demo.pre:not(.logged) .lbl-pre { display: inline; }
.demo.pre:not(.logged) .lbl-done { display: none; }
.demo.pre:not(.logged) .wash { opacity: 0; transform: scale(0.7); }
.demo.pre:not(.logged) .draw { stroke-dashoffset: 1; }
.demo.pre:not(.resting) .rest { max-height: 0; opacity: 0; }

/* ---- Motion ---- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes ring-fill { from { stroke-dasharray: 0 326.7; } }
@keyframes cnt-hero { from { --n: 0; } }
@keyframes cnt-close { from { --n: 4; } }
@keyframes grow { from { transform: scaleY(0.1); } }
@keyframes draw { from { stroke-dashoffset: 100; } }

/* Hero, once, on load. Plain CSS: no script needed, and if animation is unsupported the final state is just the page. */
.rise { animation: rise 0.35s var(--ease) var(--d, 0s) both; }
.hero h1 { --d: 0s; }
.hero-sub { --d: 0.04s; }
.cta { --d: 0.08s; }
.ringcard { --d: 0.14s; }
.island, .lock { --d: 0.18s; }
.chartcard, .recordrow { --d: 0.22s; }
.ring-arc { animation: ring-fill 1.1s var(--ease) 0.4s both, fade 0.2s linear 0.4s both; }
.cnt-hero { animation: cnt-hero 1.1s var(--ease) 0.4s both; }
.ringcard .bar.on, .ringcard .bar.today { animation: grow 0.7s var(--ease) both; }
.day:nth-child(1) .bar { animation-delay: 0.5s; }
.day:nth-child(3) .bar { animation-delay: 0.535s; }
.day:nth-child(4) .bar { animation-delay: 0.57s; }
.day:nth-child(5) .bar { animation-delay: 0.605s; }
.spark { animation: draw 1.3s var(--ease) 0.7s both; }
.spark-dot { animation: fade 0.3s ease-out 1.8s both; }

/* Scroll reveals, once each. Hidden only after the script says it is running (.js-ready) and until it reveals them. */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal:not(.in) { opacity: 0; translate: 0 8px; }
  .js-ready .reveal.in { transition: opacity 0.35s var(--ease) calc(var(--i, 0) * 40ms), translate 0.35s var(--ease) calc(var(--i, 0) * 40ms); }
  .js-ready .btn.reveal.in { transition: opacity 0.35s var(--ease) calc(var(--i, 0) * 40ms), translate 0.35s var(--ease) calc(var(--i, 0) * 40ms), scale 0.16s var(--ease); }
  .reveal:nth-child(2) { --i: 1; }
  .reveal:nth-child(3) { --i: 2; }
  .reveal:nth-child(4) { --i: 3; }
  .reveal:nth-child(5) { --i: 4; }
  /* Closing ring: waits at 4/5 until it scrolls in, then fills to 5/5 while its number ticks 4 to 5. */
  .js-ready .reveal-ring:not(.in) .close-arc { stroke-dasharray: 261.4 326.7; }
  .js-ready .reveal-ring:not(.in) .cnt-close { --n: 4; }
  .reveal-ring.in .close-arc { transition: stroke-dasharray 0.9s var(--ease); }
  .reveal-ring.in .cnt-close { animation: cnt-close 0.9s var(--ease) both; }
}
/* Reduced motion: no travel, no ticking. A short crossfade at most. */
@media (prefers-reduced-motion: reduce) {
  .rise { animation: fade 0.25s ease-out both; }
  .ring-arc, .cnt-hero, .ringcard .bar.on, .ringcard .bar.today, .spark, .spark-dot { animation: none; }
  .btn { transition: none; }
}
@media print { .reveal { opacity: 1 !important; translate: none !important; } }

/* ---- Between a phone and a laptop ---- */
@media (max-width: 1099px) {
  .exhibit { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; row-gap: 28px; }
  .x-ring { grid-column: 1; }
  .x-lock { grid-column: 2; grid-row: 1; margin-top: 0; align-self: center; }
  .x-chart { grid-column: 1 / -1; grid-row: 2; margin-top: 0; justify-self: center; width: 344px; max-width: 100%; }
}
@media (max-width: 959px) {
  .split { display: flex; flex-direction: column; align-items: stretch; row-gap: 40px; }
  .split .copy { max-width: 540px; }
  .log { padding-bottom: 100px; }
  .log .visual { order: 2; align-self: center; }
  .log .beats { order: 3; margin-top: 0; }
  .log .copy { order: 1; }
  .records, .data { padding-bottom: 100px; }
  .records .visual, .facts { align-self: center; }
}

/* ---- Phone: its own layout, not the desktop reflowed ---- */
.wide-only { display: inline; }
@media (max-width: 759px) {
  :root { --cap-edge: rgba(0, 0, 0, 0); }
  .page { --shadow: 0 1px 0 rgba(28, 27, 31, 0.04), 0 24px 48px -28px rgba(28, 27, 31, 0.26); --phone-shadow: 0 30px 50px -30px rgba(28, 27, 31, 0.5); }
  .wrap { max-width: 540px; padding: 0 20px; }
  .wide-only { display: none; }
  .rings-wide { display: none; }
  .rings-narrow { display: block; }

  .site-header { height: 60px; }
  .brand { gap: 8px; font-size: 19px; }
  .brand .mark { width: 32px; height: 14px; }

  .hero { padding-top: 0; padding-bottom: 0; align-items: stretch; text-align: left; }
  .hero h1 { margin-top: 6px; font-size: clamp(34px, 11.4vw, 62px); line-height: 0.99; }
  .hero-sub { margin-top: 12px; font-size: 17px; max-width: none; }
  .cta { margin-top: 20px; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 12px; }
  .cta .btn { padding: 0; }
  .status { justify-content: flex-start; }
  .hero h1 { --d: 0s; } .hero-sub { --d: 0.04s; } .cta { --d: 0.08s; }

  .exhibit { display: flex; flex-direction: column; align-items: stretch; max-width: none; margin-top: 44px; }
  .x-lock, .x-chart { display: contents; }
  .x-ring { order: 1; }
  .recordrow { order: 2; margin-top: 12px; --d: 0.22s; }
  .lock { order: 3; margin-top: 12px; --d: 0.26s; }
  .chartcard { display: none; }
  .ringcard { --d: 0.14s; padding: 30px 18px 18px; gap: 14px; }
  .island { position: absolute; top: -20px; right: 14px; z-index: 1; width: 226px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5); --d: 0.14s; }
  .rc-top { gap: 20px; }
  .ring { width: 104px; height: 104px; }
  .track, .arc { stroke-width: 12; }
  .ring-num { font-size: 28px; }
  .of { font-size: 19px; }
  .ring-cap { font-size: 12px; }
  .rc-stats { gap: 12px; }
  .streak { font-size: 24px; }
  .streak svg { width: 18px; height: 18px; }
  .vol { font-size: 19px; }
  .stat-cap { font-size: 13px; }
  .days { gap: 8px; padding-top: 14px; }
  .day { height: 60px; }
  .day:nth-child(1) { --h: 26px; }
  .day:nth-child(3) { --h: 38px; }
  .day:nth-child(4) { --h: 23px; }
  .day:nth-child(5) { --h: 38px; }

  .split { display: flex; padding: 0 20px; margin-top: 88px; row-gap: 0; }
  .eyebrow { font-size: 12px; }
  .copy h2 { margin-top: 12px; font-size: 36px; line-height: 1.04; }
  .log h2 { font-size: 40px; line-height: 1.02; }
  .copy p { margin-top: 14px; font-size: 17px; }
  .log, .records, .data { padding-top: 0; padding-bottom: 0; }
  .log .visual { align-self: stretch; margin-top: 28px; }
  .log .beats { margin-top: 28px; }
  .beats { gap: 18px; }
  .beats li { gap: 14px; }
  .records .visual, .facts { margin-top: 28px; max-width: none; width: 100%; }
  .banner { padding: 12px 16px; gap: 12px; }
  .banner .tile { width: 36px; height: 36px; border-radius: 10px; }
  .banner .rr-title { font-size: 16px; }
  .banner .rr-sub { font-size: 13px; }
  .banner .rr-val { font-size: 18px; }
  .reps { padding: 6px 18px; }
  .facts { padding: 6px 18px; }

  .templates { margin-top: 72px; }
  .tpl-inner { padding: 30px 0; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 18px; }
  .tpl-text h3 { font-size: 24px; }

  .closing { padding-top: 80px; padding-bottom: 80px; }
  .close-ring { width: 116px; height: 116px; }
  .close-ring .track, .close-ring .arc { stroke-width: 10; }
  .close-num { font-size: 32px; }
  .close-num .of { font-size: 21px; }
  .closing h2 { margin-top: 30px; font-size: clamp(28px, 8.7vw, 46px); line-height: 1.05; }
  .close-sub { margin-top: 16px; font-size: 17px; }
  .closing .btn { margin-top: 26px; align-self: stretch; padding: 0; }

  .site-footer { padding-bottom: 40px; }
  .foot-row { padding-top: 26px; gap: 4px 16px; }
  .foot-brand { flex: 1; }
  .site-footer nav { gap: 22px; }
  .made { flex-basis: 100%; margin-left: 0; margin-top: 8px; }
  .site-footer .fine { margin-top: 16px; }

  /* The workout screen: the relevant part, in a frameless rounded dark panel at full width */
  .frame { display: none; }
  .panel { display: flex; flex-direction: column; gap: 12px; border-radius: 36px; background: var(--k-bg); border: 1px solid var(--phone-edge); box-shadow: var(--phone-shadow); color: var(--k-text); padding: 22px 14px 14px; }
  .p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 0 4px; }
  .panel .ex { font-size: 28px; }
  .p-clock { display: flex; flex-direction: column; align-items: flex-end; }
  .p-day { font-size: 12px; font-weight: 700; color: var(--k-sub); }
  .p-time { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
  .panel .last { flex-wrap: wrap; padding: 0 4px; }
  .panel .sets { padding: 14px 12px 12px; }
  .bar-space { margin-top: 8px; min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; }
  .panel .restbar { border-radius: 26px; box-shadow: none; }
  .panel .b-fin { width: 108px; }
  .panel .b-add { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 380px) {
  .site-header { height: 56px; }
  .lock { padding: 16px; }
  .lock-head { font-size: 14px; gap: 4px 7px; }
  .big { font-size: 44px; }
  .nx { font-size: 17px; line-height: 22px; }
  .lock-rest { gap: 12px; }
  .ringcard { padding-left: 14px; padding-right: 14px; }
  .rc-top { gap: 14px; }
  .panel { padding-left: 10px; padding-right: 10px; }
  .panel .b-fin { width: 84px; }
  .panel .b-add { font-size: 15px; gap: 5px; }
  .banner { padding: 12px; }
}
