/* ===== Phase Strength v5 brand tokens (single source of truth; js/brand.js reads these) ===== */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-latin-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/barlow-condensed-latin-800.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600.woff2) format("woff2"); }
:root {
  /* surfaces */
  --bg: #0b0f14; --surface: #11161d; --panel: #161c24; --panel2: #1c232d; --line: #262e39; --line-strong: #36404d;
  --text: #f2f4f7; --muted: #97a2b0; --faint: #5b6573;
  /* brand */
  --primary: #e5383b; --primary-hover: #f04a4d; --primary-press: #c42b2e; --on-primary: #fff; --primary-tint: rgba(229,56,59,0.12);
  --primary-line: rgba(229,56,59,0.45);
  --info: #3dd6ff; --info-line: rgba(61,214,255,0.32); --info-tint: rgba(61,214,255,0.08);
  /* status (errors always paired with icon + text) */
  --ok: #34d399; --ok-line: rgba(52,211,153,0.35); --warn: #f5b942; --warn-tint: rgba(245,185,66,0.10); --warn-line: rgba(245,185,66,0.35);
  --danger: #ff6b6b; --danger-line: rgba(255,107,107,0.4);
  /* phases */
  --ph-ecc: #8a96a6; --ph-iso: #f2f4f7; --ph-react: #e5383b; --ph-peak: #3dd6ff; --ph-deload: #5b6573;
  /* legacy aliases used across the stylesheet */
  --accent: var(--primary); --accent2: var(--info);
  /* type */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif; --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display-track: .04em;
  /* shape */
  --radius: 16px; --radius-ctl: 12px; --tab-h: 66px; --tap: 44px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.45 var(--font-body); }
body { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 18px); min-height: 100vh; }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { display: block; width: 26px; height: 30px; flex: none; }
.logo.xl { width: 64px; height: 72px; }
.brand-name { font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--text); line-height: 1; margin-bottom: 2px; }
.brand-name span { color: var(--primary); }
.topbar h1 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.05; font-weight: 800; letter-spacing: var(--display-track); text-transform: uppercase; }
.avatar { width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; }
.avatar svg { width: 22px; height: 22px; fill: var(--muted); }

main { padding: 14px 14px 0; max-width: 640px; margin: 0 auto; }
h2 { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 4px 8px; font-weight: 700; }
h2.h-big { font-size: 30px; line-height: 1.05; letter-spacing: var(--display-track); color: var(--text); margin: 10px 2px 10px; font-weight: 800; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; } .card h3.big { font-family: var(--font-display); font-size: 26px; line-height: 1.05; font-weight: 800; text-transform: uppercase; letter-spacing: var(--display-track); margin: 4px 0; }
b, strong { font-weight: 600; }
.card.hero { border-color: var(--primary-line); }
.card.center { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .grid2 .card { margin-bottom: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; } .row.between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .gap6 { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); text-transform: uppercase; letter-spacing: .5px; }
.pill.accent { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.pill.blue { color: var(--info); border-color: var(--info-line); } .pill.ok { color: var(--ok); border-color: var(--ok-line); } .pill.warn { color: var(--warn); border-color: var(--warn-line); }
.note { font-size: 13px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.demo-banner { font-size: 12.5px; color: var(--warn); border: 1px solid var(--warn-line); background: var(--warn-tint); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; }
.chev { color: var(--muted); font-size: 22px; padding: 0 4px; }
.accent-t { color: var(--accent); }
.up { color: var(--ok); } .down { color: var(--warn); }

/* buttons: 44px+ targets; lime reserved for primary */
.btn { appearance: none; border: 1px solid var(--line-strong); background: transparent; color: var(--text); min-height: var(--tap); padding: 10px 16px; border-radius: var(--radius-ctl); font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--panel2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.primary:active { background: var(--primary-press); border-color: var(--primary-press); }
.btn.blue { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn.ghost { background: transparent; }
.btn.block { display: block; width: 100%; } .btn.lg { min-height: 52px; font-size: 16px; } .btn.xl { min-height: 60px; font-family: var(--font-display); font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-radius: var(--radius-ctl); }
.btn.sq { width: var(--tap); padding: 0; font-size: 22px; }
.btn.back { padding: 8px 12px; margin-left: -6px; }
.icon-btn { background: transparent; border: 0; color: var(--muted); min-width: var(--tap); min-height: var(--tap); font-size: 18px; }

input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--info); }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
label.f { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .6px; }

.list-item { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; }
.list-item .grow b { display: block; } .list-item.current { border-color: var(--primary); }
.day-badge { width: 44px; height: 44px; border-radius: var(--radius-ctl); background: var(--panel2); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .04em; color: var(--muted); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--tap); border: 1px solid var(--line-strong); background: var(--panel); border-radius: var(--radius-ctl); padding: 8px 14px; font-size: 14px; font-weight: 600; }
.chip.on { border-color: var(--primary); color: var(--text); background: var(--primary-tint); }
.chip.static { cursor: default; min-height: 36px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ctl); padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 42px; background: transparent; border: 0; padding: 8px 4px; border-radius: 9px; font-weight: 600; color: var(--muted); font-size: 13.5px; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
.small-seg button { font-size: 12px; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; } .stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.big-num { font-family: var(--font-display); font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums; } .big-num small { font-size: 16px; color: var(--muted); margin-left: 4px; }
ul.plain { margin: 6px 0 0; padding-left: 18px; } ul.plain li { margin: 4px 0; font-size: 13.5px; }
.cue { font-style: italic; }

/* phase banner + timeline: phase color only on the active phase */
.phase-banner { border-radius: var(--radius); padding: 14px; margin-bottom: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--pc, var(--primary)) 14%, var(--panel)) 0%, var(--panel) 70%); border: 1px solid color-mix(in srgb, var(--pc, var(--primary)) 40%, var(--line)); }
.phase-banner.slim { padding: 10px 14px; }
.pb-track { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.pb-phase { font-family: var(--font-display); font-size: 30px; line-height: 1.05; font-weight: 800; text-transform: uppercase; letter-spacing: var(--display-track); color: var(--pc, var(--text)); }
.pb-phase .muted { font-size: 18px; font-weight: 700; }
.pb-tip { font-size: 13px; color: var(--text); opacity: .85; margin-top: 6px; }
.timeline { display: flex; gap: 4px; }
.tl-seg { min-width: 0; } .tl-bar { height: 8px; border-radius: 4px; background: var(--panel2); }
.tl-seg.past .tl-bar { background: var(--line-strong); } .tl-seg.cur .tl-bar { background: var(--pc, var(--primary)); box-shadow: 0 0 8px color-mix(in srgb, var(--pc, var(--primary)) 45%, transparent); }
.tl-name { font-family: var(--font-display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-seg.cur .tl-name { color: var(--pc, var(--primary)); } .tl-wk { font-size: 10.5px; color: var(--muted); }
details.week { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
details.week.cur { border-color: color-mix(in srgb, var(--pc, var(--primary)) 45%, var(--line)); }
details.week summary { list-style: none; min-height: 52px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
details.week summary::-webkit-details-marker { display: none; }
details.week .body { padding: 0 8px 4px; } details.week .list-item { background: var(--bg); }

/* today */
.today-card { border-color: var(--primary-line); }
.ex-peek { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ex-peek span { font-size: 12px; padding: 4px 9px; border-radius: 8px; background: var(--panel2); color: var(--muted); }
.ring-svg .rg-bg { fill: none; stroke: var(--panel2); stroke-width: 9; } .ring-svg .rg-fg { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.ring-svg .rg-t { fill: var(--text); font-family: var(--font-display); font-size: 24px; font-weight: 800; } .ring-svg .rg-s { fill: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.wk-days { display: flex; gap: 4px; margin-top: 8px; } .wk-days span { width: 22px; height: 22px; border-radius: 6px; background: var(--panel2); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; color: var(--muted); }
.wk-days span.done { background: var(--primary); color: var(--on-primary); }
.nt-title { display: block; font-size: 16px; margin-top: 4px; }
.learn-peek { cursor: pointer; } .lp-k { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--info); text-transform: uppercase; letter-spacing: 1px; }

/* exercise rows + library */
.ex-row { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-bottom: 8px; cursor: pointer; min-height: 64px; }
.ex-thumb { width: 104px; flex: none; } .ex-thumb .media-slot { padding: 2px; border-radius: 10px; }
.grp-t { font-family: var(--font-display); color: var(--info); font-weight: 800; font-size: 1.1em; }
.tempo { font-variant-numeric: tabular-nums; color: var(--accent2); font-weight: 700; }
.filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; } .filters select { padding: 8px; font-size: 13px; }
.ph-dots { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; } .ph-dots span { font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 6px; }
ol.cues { margin: 10px 0 0; padding-left: 0; list-style: none; counter-reset: c; }
ol.cues li { counter-increment: c; position: relative; padding: 6px 0 6px 34px; font-size: 14px; font-weight: 600; }
ol.cues li::before { content: counter(c); position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--info); }
ol.cues.big li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; padding: 12px 12px 12px 46px; }
ol.cues.big li::before { left: 12px; top: 11px; }
ul.faults { margin: 0; padding-left: 0; list-style: none; } ul.faults li { margin: 6px 0; position: relative; padding-left: 26px; }
ul.faults li::before { content: "!"; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--danger); color: var(--danger); font-size: 11px; font-weight: 600; line-height: 14px; text-align: center; }

/* learn */
.diag-card { padding: 10px; } svg.diag { width: 100%; height: auto; }
svg.diag text { fill: var(--text); font-size: 11px; font-weight: 600; } svg.diag .d-s { fill: var(--muted); font-size: 10px; font-weight: 500; } svg.diag .d-t { font-size: 9.5px; letter-spacing: .04em; }
svg.diag .d-a { fill: color-mix(in srgb, var(--ph-ecc) 16%, var(--panel)); stroke: var(--ph-ecc); } svg.diag .d-b { fill: color-mix(in srgb, var(--ph-iso) 10%, var(--panel)); stroke: var(--ph-iso); } svg.diag .d-c { fill: var(--primary-tint); stroke: var(--ph-react); } svg.diag .d-n { fill: var(--panel2); stroke: var(--line); }
svg.diag .d-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; } svg.diag .d-line2 { fill: none; stroke: var(--info); stroke-width: 2.5; stroke-dasharray: 5 4; }
svg.diag .d-axis { stroke: var(--line-strong); stroke-width: 1.5; } svg.diag .dash { stroke-dasharray: 3 3; } svg.diag .d-dot { fill: var(--primary); }
.learn-body { font-size: 15.5px; line-height: 1.6; } .refs .small { color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line); } .refs .small:last-child { border: 0; }

/* charts */
.chart-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.chart-card canvas { width: 100% !important; height: 220px !important; }
.mk-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; } .mk-legend span { font-size: 11px; color: var(--muted); }
.mk-legend span::before { content: ''; display: inline-block; width: 10px; border-top: 2px dashed var(--pc); margin-right: 5px; vertical-align: middle; }
details.hist { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
details.hist summary { list-style: none; min-height: 52px; padding: 12px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
details.hist summary::-webkit-details-marker { display: none; } details.hist .body { padding: 0 14px 12px; border-top: 1px solid var(--line); }
details.hist table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; } details.hist td { padding: 4px 0; color: var(--muted); } details.hist td:first-child { color: var(--text); }

/* builder */
.ex-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.ex-head { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; } .ex-head .grp { width: 54px; text-align: center; font-weight: 800; }
.set-grid { display: grid; grid-template-columns: 22px 1fr 1fr 1.25fr .9fr 36px; gap: 5px; align-items: center; }
.set-grid .hd { font-size: 10.5px; color: var(--muted); text-transform: uppercase; } .set-grid input { padding: 8px 4px; text-align: center; font-size: 14px; }
.set-grid .n { color: var(--muted); font-weight: 700; text-align: center; font-size: 13px; } .set-grid .icon-btn { min-width: 36px; }

/* profile */
.track-pick { display: grid; gap: 8px; margin-top: 10px; }
.track-opt { text-align: left; min-height: 60px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.track-opt b { display: block; } .track-opt span { font-size: 12.5px; color: var(--muted); } .track-opt.on { border-color: var(--primary); background: var(--primary-tint); } .track-opt.on b { color: var(--text); }

/* session player (one-handed: controls docked at the bottom) */
body.in-session .tabbar { display: none; }
body.in-session { padding-bottom: calc(250px + var(--safe-b)); }
.pl-media .media-slot { padding: 4px; } .pl-media svg.illus { max-height: 120px; }
.pl-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pl-dots { flex: 1; display: flex; gap: 4px; } .pl-dots span { flex: 1; height: 5px; border-radius: 3px; background: var(--panel2); }
.pl-dots span.done { background: color-mix(in srgb, var(--primary) 45%, var(--panel2)); } .pl-dots span.on { background: var(--accent); }
.pl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; touch-action: pan-y; }
.pl-name { font-size: 32px; line-height: 1.02; letter-spacing: var(--display-track); color: var(--text); margin: 2px 0 4px; font-weight: 800; }
.pl-rx { font-size: 15px; font-weight: 600; } .pl-media { margin-top: 10px; cursor: pointer; }
.pl-sets { display: grid; gap: 6px; margin-top: 10px; }
.pl-set { display: grid; grid-template-columns: 56px 1fr 24px; align-items: center; min-height: 46px; padding: 0 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); text-align: left; font-size: 14px; }
.pl-set span:first-child { color: var(--muted); font-weight: 700; font-size: 12.5px; } .pl-set.cur { border-color: var(--primary); background: var(--primary-tint); }
.pl-set.done { border-color: var(--line-strong); } .pl-set.done span:nth-child(2) { font-weight: 600; } .pl-set.done span:last-child { color: var(--ok); font-weight: 600; }
.pl-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: color-mix(in srgb, var(--surface) 97%, transparent); border-top: 1px solid var(--line); padding: 10px 14px calc(12px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.pl-inputs { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.stepper label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.stepper .row { gap: 4px; } .stepper input { text-align: center; font-family: var(--font-display); font-size: 26px; font-weight: 800; padding: 4px 2px; font-variant-numeric: tabular-nums; }
.rpe { display: flex; align-items: center; gap: 6px; margin: 8px 0; } .rpe .chip { flex: 1; padding: 6px 0; min-height: 40px; }
.pl-nav { margin-top: 8px; } .pl-nav .btn { min-height: 44px; }

/* full-screen rest */
.rest-full { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--bg) 97%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.rf-label { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.rf-ring { position: relative; width: min(72vw, 300px); aspect-ratio: 1; } .rf-ring svg { width: 100%; height: 100%; }
.rf-bg { fill: none; stroke: var(--panel2); stroke-width: 12; } .rf-fg { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.rf-time { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 84px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rf-next { color: var(--muted); font-weight: 600; text-align: center; min-height: 20px; }
.rf-btns { display: flex; gap: 10px; width: 100%; max-width: 360px; } .rf-btns button { flex: 1; min-height: 56px; border-radius: var(--radius-ctl); border: 1px solid var(--line-strong); background: transparent; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .04em; }
.rest-full > .btn { max-width: 360px; }
.rest-full.finished .rf-time { color: var(--accent); }

/* onboarding */
body.onboarding .topbar, body.onboarding .tabbar { display: none; } body.onboarding { padding-bottom: 20px; }
.ob { min-height: calc(100vh - 30px); display: flex; flex-direction: column; padding-top: 14px; }
.ob-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 40px 6px; }
.ob-hero .brand-name { font-size: 16px; margin-top: 10px; }
.ob-title { font-family: var(--font-display); font-size: 44px; line-height: 1; margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: var(--display-track); }
.ob-q { font-family: var(--font-display); font-size: 32px; line-height: 1.05; margin: 14px 0 14px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--display-track); }
.ob-dots { display: flex; gap: 5px; } .ob-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--panel2); } .ob-dots span.on { background: var(--accent); }
.ob-opts { display: grid; gap: 8px; } .ob-opts.two { grid-template-columns: 1fr 1fr; }
.ob-opt { text-align: left; min-height: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.ob-opt b { display: block; font-size: 15.5px; font-weight: 600; } .ob-opt span { font-size: 12.5px; color: var(--muted); } .ob-opt.on { border-color: var(--primary); background: var(--primary-tint); } .ob-opt.on b { color: var(--text); }
.ob-track { margin-top: 12px; } .ob-track b { display: block; font-size: 17px; }
.ob-nav { margin-top: auto; padding-top: 18px; display: flex; gap: 8px; } .ob-nav.col { flex-direction: column; }
.chips.days .chip { flex: 1; min-width: 44px; padding: 8px 0; }

/* modal, toast, summary */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; justify-content: center; }
.modal-card { width: 100%; max-width: 640px; max-height: 86vh; overflow: auto; background: var(--panel); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); }
.modal-card h3 { margin: 0 0 10px; }
.lib-cat { font-family: var(--font-display); font-size: 13px; color: var(--info); text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 4px; font-weight: 700; }
.lib-item { display: flex; width: 100%; text-align: left; min-height: var(--tap); align-items: center; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.summary { text-align: center; } .sum-ring { width: 72px; height: 72px; border-radius: 50%; border: 6px solid var(--accent); display: grid; place-items: center; margin: 6px auto 10px; font-family: var(--font-display); font-size: 34px; color: var(--accent); font-weight: 800; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 90px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-ctl); font-weight: 600; z-index: 80; font-size: 14px; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 98%, transparent); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; min-height: var(--tap); }
.tabbar svg { width: 24px; height: 24px; fill: currentColor; } .tabbar a.on { color: var(--primary); }

/* illustrations */
.media-slot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.media-slot video { width: 100%; border-radius: 10px; display: block; }
.media-slot.thumb { padding: 4px; }
svg.illus { width: 100%; height: auto; display: block; }
svg.illus .limb { stroke: var(--text); stroke-width: 4.2; stroke-linecap: round; }
svg.illus .limb.torso { stroke-width: 5.5; }
svg.illus .limb.back { stroke: var(--faint); }
svg.illus .headc { fill: var(--text); }
svg.illus .plate { fill: none; stroke: var(--primary); stroke-width: 3.5; }
svg.illus .prop { fill: var(--panel2); stroke: var(--muted); stroke-width: 1.5; }
svg.illus .prop-l { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }
svg.illus .ground { stroke: var(--line-strong); stroke-width: 1.5; }
svg.illus .arrow { stroke: var(--muted); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.illus .plabel { fill: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
svg.illus .ph-bg { fill: var(--surface); stroke: var(--line-strong); stroke-dasharray: 4 4; }
svg.illus .ph-glyph { fill: var(--line-strong); font-family: var(--font-display); font-size: 48px; font-weight: 800; }
svg.illus .ph-txt { fill: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .4px; }

/* primary CTAs: Barlow 800 at >=20px so white-on-red (4.2:1) qualifies as WCAG large text */
.btn.primary.lg { font-family: var(--font-display); font-size: 21px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

/* ===== goals (v6) ===== */
.goal-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; }
.goal-card:active { background: var(--panel2); }
.goal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.goal-title { font-size: 16px; font-weight: 600; line-height: 1.25; }
.goal-pct { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--text); }
.goal-pct.big { font-size: 40px; }
.goal-bar { position: relative; height: 10px; border-radius: 999px; background: var(--line); margin-top: 12px; }
.goal-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--primary); min-width: 10px; }
.goal-ghost { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--muted); transform: translateX(-1px); }
.goal-scale { position: relative; display: flex; justify-content: space-between; margin-top: 6px; min-height: 20px; font-size: 12px; color: var(--muted); }
.goal-scale .gs-cur { position: absolute; top: 0; transform: translateX(-50%); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; }
.goal-scale.stack { min-height: 38px; } .goal-scale.stack .gs-cur { top: 18px; }
.goal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.goal-foot .pill { flex: none; }
.goal-est { line-height: 1.35; margin-top: 4px; } .est-k { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--info); margin-right: 4px; }
.goal-card.hit { display: flex; gap: 14px; align-items: flex-start; border-color: var(--primary-line); background: linear-gradient(135deg, var(--primary-tint), var(--panel) 70%); cursor: default; }
.goal-logo { width: 40px; height: 46px; flex: none; margin-top: 2px; }
.gh-k { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); line-height: 1.1; }
.goal-done summary .chev { transition: transform .15s; } .goal-done[open] summary .chev { transform: rotate(90deg); }
.gd-row { padding: 10px 0; border-bottom: 1px solid var(--line); } .gd-row:last-child { border-bottom: 0; }
.goal-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: var(--tap); margin: -2px 0 10px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); text-align: left; font-size: 13.5px; font-weight: 500; }
.goal-chip span:not(.chev) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .goal-chip b { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: .02em; }
.goal-chip .chev { font-size: 18px; padding: 0; }
.form-err { display: flex; gap: 8px; align-items: center; color: var(--danger); font-size: 13.5px; margin-top: 10px; }
.err-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--danger); font-size: 11px; font-weight: 600; }
select optgroup { color: var(--muted); }

/* ===== compact exercise display + rest (v7) ===== */
.ex-list { padding: 4px 12px; }
.ex-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ex-line:last-child { border-bottom: 0; }
.ex-line > .grp-t { width: 26px; flex: none; padding-top: 3px; text-align: left; }
.ex-name { appearance: none; background: none; border: 0; padding: 2px 0; min-height: 32px; color: var(--text); font-weight: 600; font-size: 15.5px; text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1.5px; display: inline-flex; align-items: center; gap: 4px; }
.ex-name:hover, .ex-name:focus-visible { text-decoration-color: var(--primary); }
.ex-name .chev { font-size: 18px; padding: 0 0 0 2px; color: var(--muted); text-decoration: none; }
.rx { color: var(--text); opacity: .92; } .rest-t { color: var(--muted); font-weight: 500; white-space: nowrap; }
.pl-name .ex-name { font-family: var(--font-display); font-size: 34px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--display-track); line-height: 1.02; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.pl-name .ex-name .chev { font-size: 26px; }
.pl-setno { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); margin-top: 2px; }
.info-btn { min-width: 36px; min-height: 36px; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-family: Georgia, serif; font-style: italic; font-weight: 600; font-size: 17px; color: var(--muted); padding: 0; }
.rf-why { color: var(--muted); font-size: 13.5px; text-align: center; max-width: 340px; min-height: 18px; }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: -6px auto 10px; }
.video-ph { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; min-height: 64px; border: 1px dashed var(--line-strong); border-radius: var(--radius-ctl); color: var(--muted); font-size: 13px; background: var(--surface); }
.video-ph span { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--muted); display: grid; place-items: center; font-size: 11px; }
details.ex-edit { margin-top: 8px; } details.ex-edit summary { cursor: pointer; color: var(--info); font-size: 13px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.ex-block .ex-head { align-items: flex-start; } .ex-block .ex-head .grp { margin-top: 2px; }

/* ===== v7 conditioning & golf ===== */
.plan-card h3 { margin: 0; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--muted); }
.pc-meta span::before { content: "›"; color: var(--primary); font-weight: 800; margin-right: 4px; }
.plan-struct { margin-top: 12px; border-top: 1px solid var(--line); }
.ps-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ps-row > b { font-family: var(--font-display); font-size: 16px; letter-spacing: .03em; color: var(--primary); text-transform: uppercase; }
.ps-row span { font-weight: 700; }
.tt-group { margin: 6px 0 8px; } .tt-g { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 2px 6px; }
.tt-group .chip { min-height: 38px; padding: 6px 12px; font-size: 13px; }
.iv-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.iv-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); }
.iv-dots span.done { background: var(--ok); border-color: var(--ok); } .iv-dots span.cur { border-color: var(--primary); }
.pl-inputs.three { grid-template-columns: 1fr 1fr; }
.pl-test { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-ctl); }
.pl-test .row { gap: 8px; align-items: flex-end; flex-wrap: nowrap; }
.iv-full { position: fixed; inset: 0; z-index: 72; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: var(--bg); transition: background .25s; }
.iv-full[data-phase="work"] { background: color-mix(in srgb, var(--primary) 26%, var(--bg)); }
.iv-full[data-phase="rest"] { background: color-mix(in srgb, var(--info) 14%, var(--bg)); }
.iv-full[data-phase="done"] { background: color-mix(in srgb, var(--ok) 16%, var(--bg)); }
.iv-top { position: absolute; top: 14px; left: 16px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.iv-name { font-weight: 700; color: var(--muted); }
.iv-phase { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: .06em; text-transform: uppercase; }
.iv-full[data-phase="work"] .iv-phase { color: var(--text); } .iv-full[data-phase="rest"] .iv-phase { color: var(--info); } .iv-full[data-phase="ready"] .iv-phase { color: var(--warn); }
.iv-time { font-family: var(--font-display); font-weight: 800; font-size: 120px; line-height: 1; font-variant-numeric: tabular-nums; }
.iv-round { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--muted); letter-spacing: .04em; }
.iv-bar { width: 100%; max-width: 360px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.iv-bar span { display: block; height: 100%; width: 0; background: var(--text); transition: width .15s linear; }
.iv-next { color: var(--muted); text-align: center; min-height: 20px; max-width: 360px; }
.iv-full > .btn { max-width: 360px; background: var(--primary); color: var(--on-primary); }
.iv-full[data-phase="work"] > .btn { background: var(--text); color: var(--bg); }

/* ===== v7: stretching, profile, tempo coach, waitlist ===== */
:root { --ph-ecc: #6f8fa8; --ph-iso: #f2f4f7; --ph-drive: var(--primary); }
.why-line, .why-mini { font-size: 13px; color: var(--muted); border-left: 3px solid var(--info); padding: 2px 0 2px 8px; margin: 6px 0; }
.why-mini { font-size: 12px; margin: 4px 0 0; }
.why-line b { color: var(--text); }
.why-card { border-left: 3px solid var(--info); }
.tc-toggle { margin-top: 8px; }
.tc-toggle.on { background: color-mix(in srgb, var(--primary) 18%, var(--panel)); border-color: var(--primary); }
.iv-full.hidden { display: none; }
#tc-timer[data-phase="lead"] { background: color-mix(in srgb, var(--warn) 14%, var(--bg)); }
#tc-timer[data-phase="ecc"] { background: color-mix(in srgb, var(--ph-ecc) 38%, var(--bg)); }
#tc-timer[data-phase="iso"] { background: color-mix(in srgb, var(--ph-iso) 22%, var(--bg)); }
#tc-timer[data-phase="drive"] { background: color-mix(in srgb, var(--ph-drive) 42%, var(--bg)); }
#tc-timer[data-phase="top"] { background: var(--bg); }
#tc-timer[data-phase="done"] { background: color-mix(in srgb, var(--ok) 16%, var(--bg)); }
#tc-timer[data-phase="ecc"] .iv-phase { color: var(--ph-ecc); } #tc-timer[data-phase="iso"] .iv-phase { color: var(--ph-iso); } #tc-timer[data-phase="drive"] .iv-phase { color: var(--text); }
#tc-timer.pulse .tc-big { animation: tcpulse .9s ease-out; }
@keyframes tcpulse { 0% { transform: scale(1.14); opacity: 1; } 100% { transform: scale(1); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { #tc-timer.pulse .tc-big { animation: none; } }
.tc-big { font-size: 140px; line-height: 1; font-variant-numeric: tabular-nums; }
.tc-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.tc-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.tc-legend .ecc::before { background: var(--ph-ecc); } .tc-legend .iso::before { background: var(--ph-iso); } .tc-legend .drive::before { background: var(--ph-drive); }
.iv-full > .btn.iv-done { max-width: 360px; width: 100%; }
#ht-timer[data-phase="hold"] { background: color-mix(in srgb, var(--ok) 14%, var(--bg)); }
#ht-timer[data-phase="hold"] .iv-phase { color: var(--ok); }
.ht-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; text-align: center; max-width: 340px; }
.rd-row { display: flex; gap: 8px; } .rd-row .chip { flex: 1; justify-content: center; }
.res-row { padding: 8px 0; border-bottom: 1px solid var(--line); } .res-row:last-child { border-bottom: 0; }
.baseline-card { border-left: 3px solid var(--primary); }
.waitlist-card { position: relative; border: 1px solid var(--line-strong); }
.waitlist-card .wl-x { position: absolute; top: 6px; right: 6px; }
.waitlist-card .btn[disabled] { opacity: .6; cursor: not-allowed; }
.plain-ol { margin: 10px 0; padding-left: 20px; } .plain-ol li { margin: 4px 0; }
.ns-stat .stat-strip { margin-top: 8px; }
.ob-rec { display: block; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.ob-rec.on { border-color: var(--primary); }
.onramp-banner { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--info-line); background: var(--info-tint); }
.onramp-banner b { font-family: var(--font-display); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--info); }
.onramp-banner span { font-size: 12px; color: var(--muted); }
.sa-out { margin-top: 12px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.sa-out.on { border-style: solid; border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--panel)); }
.sa-mode { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.sa-rpe .chip { min-width: 34px; padding: 0 8px; }
.chip.sm { font-size: 12px; min-height: 32px; padding: 0 10px; }
.legal-list { margin: 8px 0 12px; padding-left: 20px; } .legal-list li { margin: 6px 0; line-height: 1.45; }
.legal-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; min-height: 44px; font-size: 15px; }
.legal-check input { width: 24px; height: 24px; flex: none; margin-top: 1px; accent-color: var(--primary); }
.legal-foot { text-align: center; margin: 14px 0 4px; font-size: 13px; color: var(--muted); }
.legal-foot a, .legal-list a { color: var(--muted); text-decoration: underline; }
#legal-card a.list-item { color: inherit; text-decoration: none; }
.ob-legal { margin-top: 4px; }
/* standalone legal pages */
.legal-page { max-width: 720px; margin: 0 auto; padding: 24px 18px 60px; line-height: 1.55; }
.legal-page h1 { font-family: var(--font-display); font-size: 34px; margin: 10px 0 4px; }
.legal-page h2 { font-size: 18px; margin: 24px 0 6px; }
.legal-page a { color: var(--info); }
#view a:not(.list-item):not(.btn), #modal-card a:not(.btn) { color: var(--info); }
#view .legal-foot a, #modal-card .legal-list a { color: var(--muted); }

/* =====================================================================
   v8 POLISH PASS (design/POLISH-SPEC.md). Tokens + overrides, appended so
   earlier rules keep working. All colors come from CSS variables.
   ===================================================================== */
:root {
  --card: #161c24; --elevated: #1c232d; --border: #262e39; --border-strong: #36404d;
  --success: #34d399; --warning: #f5b942; --error: #ff6b6b;
  --panel: var(--card); --panel2: var(--elevated); --line: var(--border); --line-strong: var(--border-strong);
  --ph-peak: #3dd6ff; --ph-deload: #5b6573;
  --s-0: 0; --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --gutter: 20px; --card-pad: 16px; --card-gap: 12px; --section-gap: 28px; --tab-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --r-sm: 8px; --r-ctl: 12px; --r-card: 16px; --r-sheet: 24px; --r-pill: 999px;
  --d-instant: 100ms; --d-press: 120ms; --d-fast: 160ms; --d-tab: 200ms; --d-push: 300ms; --d-sheet-in: 300ms; --d-sheet-out: 220ms; --d-fill: 600ms; --d-launch: 1100ms;
  --e-out: cubic-bezier(.22,1,.36,1); --e-in: cubic-bezier(.4,0,1,1); --e-in-out: cubic-bezier(.65,0,.35,1); --e-spring: cubic-bezier(.32,1.25,.5,1); --e-back: cubic-bezier(.34,1.36,.64,1);
  color-scheme: dark; --scrim: rgba(5,7,10,.6); --launch-glow: rgba(229,56,59,.32); --toast-shadow: rgba(0,0,0,.45);
}
main { padding: var(--s-4) var(--gutter) 0; max-width: 560px; }
.topbar { padding: calc(var(--safe-t) + 12px) var(--gutter) 12px; }
h2 { margin: var(--section-gap) 0 var(--s-2); font-size: 13px; letter-spacing: .14em; }
.card { padding: var(--card-pad); margin-bottom: var(--card-gap); border-radius: var(--r-card); }
.grid2 { gap: var(--card-gap); }
.num, .stat b, .big-num, .timer, .rx { font-variant-numeric: tabular-nums lining-nums; }
.overline { font: 700 12px/14px var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.faint { color: var(--faint); }
.ic { flex: none; vertical-align: middle; }

/* shared states */
.tap { transition: transform var(--d-press) var(--e-out), background-color var(--d-fast) linear; cursor: pointer; }
.tap:active { transform: scale(.98); background: var(--elevated); }
.is-selected { border-color: var(--primary-line); box-shadow: inset 0 0 0 1px var(--primary-line); background: linear-gradient(var(--primary-tint), var(--primary-tint)), var(--card); }
.is-disabled { opacity: .45; pointer-events: none; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

/* buttons: press scale; primary in Barlow; icon+label alignment */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform var(--d-press) var(--e-out), background-color var(--d-fast) linear; }
.btn.block { display: flex; }
.btn:active { transform: scale(.97); }
.btn.primary { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.btn.primary.lg, .btn.primary.xl { font-size: 20px; }
.btn.blue { color: var(--text); }
.link-btn { appearance: none; background: none; border: 0; color: var(--muted); font: 600 14px/20px var(--font-body); min-height: var(--tap); width: 100%; margin-top: var(--s-1); cursor: pointer; }
.link-btn:hover { color: var(--text); }

/* row chevrons: Lucide chevron-right via mask, works for every existing <span class="chev"> */
.chev { display: inline-block; flex: none; width: 20px; height: 20px; padding: 0; font-size: 0; color: transparent; background-color: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 20px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 20px no-repeat; }
.row-chev { color: var(--faint); }
.list-item { cursor: pointer; transition: transform var(--d-press) var(--e-out), background-color var(--d-fast) linear; }
.list-item:active { transform: scale(.98); background: var(--elevated); }

/* tab bar + avatar: Lucide outline icons */
.tabbar svg, .tabbar .ic { width: 24px; height: 24px; fill: none; stroke: currentColor; }
.avatar svg, .avatar .ic { width: 24px; height: 24px; fill: none; stroke: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; }
.icon-btn .ic { color: var(--muted); }

/* tempo + codes: quiet (tempo is --t-small in --muted; codes faint Barlow) */
.tempo { color: var(--muted); font-weight: 500; font-size: 13px; }
.grp-t { color: var(--faint); font-size: 15px; font-weight: 700; }
.ex-name { text-decoration: none; }
.ex-name-chev { color: var(--faint); margin-left: 2px; }

/* phase hero (Today) */
.phase-hero { position: relative; border-radius: var(--r-card); padding: var(--card-pad); margin-bottom: var(--card-gap); border: 1px solid color-mix(in srgb, var(--pc) 30%, var(--border));
  background: linear-gradient(150deg, color-mix(in srgb, var(--pc) 13%, var(--card)), var(--card) 70%); }
.phase-hero.ph-deload { border-style: dashed; border-color: var(--ph-deload); background: var(--card); }
.ph-eyebrow { display: flex; align-items: center; gap: var(--s-2); color: var(--pc); }
.ph-eyebrow .ic { width: 16px; height: 16px; }
.ph-title { font: 800 30px/32px var(--font-display); text-transform: uppercase; color: var(--text); margin-top: var(--s-2); }
.ph-tip { color: var(--muted); font-size: 14px; line-height: 20px; margin-top: var(--s-1); }
.week-bar { display: flex; gap: 4px; margin-top: var(--s-3); }
.wb-seg { flex: 1; height: 6px; border-radius: 3px; background: var(--elevated); border: 1px solid transparent; }
.wb-seg.past { background: color-mix(in srgb, var(--pc) 45%, var(--elevated)); }
.wb-seg.cur { background: var(--pc); box-shadow: 0 0 8px color-mix(in srgb, var(--pc) 50%, transparent); }
.wb-seg.ph-deload { background: transparent; border: 1px dashed var(--ph-deload); }
.wb-seg.ph-deload.cur, .wb-seg.ph-deload.past { background: color-mix(in srgb, var(--ph-deload) 40%, transparent); }
.tl-seg.ph-deload .tl-bar { background: transparent; border: 1px dashed var(--ph-deload); }
.tl-seg.ph-deload.cur .tl-bar { background: color-mix(in srgb, var(--ph-deload) 45%, transparent); box-shadow: none; }
details.week.ph-deload { border-style: dashed; border-color: var(--ph-deload); }

/* goal row (Today) */
.goal-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: 0 var(--s-3) 0 var(--card-pad); margin-bottom: var(--card-gap);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); color: var(--text); text-align: left; font: inherit; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.g-dot.st-ok { background: var(--success); } .g-dot.st-warn { background: var(--warning); } .g-dot.st-hit { background: var(--primary); }
.gr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gr-l { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gr-s { font-size: 13px; color: var(--muted); }
.gr-pct { font: 800 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }

/* session card (Today) */
.session-card { border-color: var(--border); }
.sc-title { font: 800 24px/26px var(--font-display); letter-spacing: .01em; text-transform: uppercase; color: var(--text); margin: var(--s-2) 0 var(--s-1); }
.sc-meta { color: var(--muted); font-size: 13px; line-height: 18px; }
.sc-peek { color: var(--muted); font-size: 14px; line-height: 20px; margin-top: var(--s-2); }

/* stat tiles: no ring */
.stat-tiles .tile { display: flex; flex-direction: column; min-height: 120px; }
.tile-v { font: 800 28px/30px var(--font-display); letter-spacing: .01em; margin-top: var(--s-2); font-variant-numeric: tabular-nums; }
.tile-v .unit { font-size: 60%; color: var(--faint); font-weight: 700; margin-left: 2px; }
.nt-tile .nt-title { margin-top: var(--s-2); }
.nt-due { color: var(--text); display: flex; align-items: center; gap: 4px; } .nt-due .ic { color: var(--info); }
.wk-days span.done { background: var(--text); color: var(--bg); }
.lp-more { margin-top: var(--s-2); color: var(--muted); display: flex; align-items: center; gap: 2px; }

/* compact exercise rows: whole row is the tap target */
.ex-list { padding: var(--s-1) 0; }
.exrs { display: flex; flex-direction: column; }
.exr { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-2) var(--s-3) var(--s-2) var(--card-pad); border-radius: var(--r-ctl); }
.exr + .exr { border-top: 1px solid var(--border); }
.exr.ss-cont { border-top-color: transparent; }
.ex-code { width: 28px; flex: none; font: 700 15px/1 var(--font-display); color: var(--faint); align-self: flex-start; padding-top: 4px; }
.ex-title { font-weight: 600; font-size: 16px; line-height: 22px; color: var(--text); }
.exr .rx { color: var(--muted); font-size: 13px; line-height: 18px; }
.exr .rest-t { color: var(--muted); }
.exr .why-mini { border-left-color: var(--border-strong); }
.exr.ss-start::after, .exr.ss-cont::before { content: ""; position: absolute; left: calc(var(--card-pad) + 13px); width: 2px; background: var(--border-strong); }
.exr.ss-start::after { top: 26px; bottom: -1px; }
.exr.ss-cont::before { top: 0; height: 4px; }

/* session preview */
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.pv-pills { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.ph-pill, .dur-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--s-3); border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 600; color: var(--text); }
.ph-pill .dot, .ph-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--text)); flex: none; }
.ph-pill.ph-deload { border-style: dashed; border-color: var(--ph-deload); } .ph-pill.ph-deload .dot { background: transparent; border: 1px dashed var(--ph-deload); }
.dur-pill { color: var(--muted); } .dur-pill.ok { color: var(--success); }
.pv-eyebrow { margin-top: var(--s-3); }
.pv-title { font: 800 30px/32px var(--font-display); text-transform: uppercase; margin: var(--s-1) 0 var(--s-1); }
.pv-sub { color: var(--muted); font-size: 13px; margin-bottom: var(--s-3); }
.sticky-cta { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + var(--s-3)); z-index: 5; margin-top: var(--s-4); padding-top: var(--s-6);
  background: linear-gradient(transparent, var(--bg) 30%); }
body.in-session .sticky-cta { bottom: calc(var(--safe-b) + var(--s-3)); }
.wk-h { display: flex; align-items: center; gap: var(--s-2); }
.wk-h.ph-peak .ph-dot { background: var(--ph-peak); } .wk-h.ph-react .ph-dot { background: var(--ph-react); } .wk-h.ph-iso .ph-dot { background: var(--ph-iso); } .wk-h.ph-ecc .ph-dot { background: var(--ph-ecc); }
.wk-h.ph-deload .ph-dot { background: transparent; border: 1px dashed var(--ph-deload); }

/* plans list */
.pl-intro { margin: 0 0 var(--s-3); }
.pill-row { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--s-1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); }
.pill-row::-webkit-scrollbar { display: none; }
.f-pill { flex: none; height: 36px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: transparent; color: var(--muted); font: 600 14px var(--font-body); }
.f-pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.plan-card h3 { font: 800 24px/26px var(--font-display); letter-spacing: .01em; text-transform: uppercase; margin: 0; }
.pc-desc { color: var(--muted); font-size: 14px; line-height: 20px; margin-top: var(--s-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: var(--s-2); }
.pc-meta span::before { content: none !important; }
.pc-actions { margin-top: var(--s-3); gap: var(--s-2); }
.pc-actions .btn { min-height: var(--tap); }
.btn.add-sm { min-height: 36px; padding: 6px 14px; flex: none; color: var(--text); border-color: var(--border-strong); }
.btn.added { flex: none; color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); opacity: 1; }
.safety-end { margin-top: var(--section-gap); padding: var(--card-pad); border: 1px solid var(--border); border-radius: var(--r-card); }
.safety-end p { color: var(--muted); font-size: 13px; line-height: 19px; margin: var(--s-2) 0 0; }
.empty-state { text-align: center; padding: var(--s-8) var(--s-4); border: 1px dashed var(--border); border-radius: var(--r-card); color: var(--faint); }
.empty-state h3 { font: 800 24px/26px var(--font-display); text-transform: uppercase; color: var(--text); margin: var(--s-3) 0 var(--s-1); }
.empty-state p { color: var(--muted); margin: 0 0 var(--s-3); }

/* settings groups */
.set-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; margin-bottom: var(--card-gap); }
.set-note { padding: var(--s-3) var(--card-pad); color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--border); }
.set-row { appearance: none; display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 52px; padding: 0 var(--s-3) 0 var(--card-pad); background: transparent; border: 0; color: var(--text); font: 500 15px var(--font-body); text-align: left; cursor: pointer; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.set-row .ic:first-child { color: var(--muted); }
.set-row:active { background: var(--elevated); }
.set-label { margin: var(--section-gap) 0 var(--s-2); }
.set-group.destructive .set-row, .set-group.destructive .set-row .ic { color: var(--error); }
.chips.seg { gap: 0; border: 1px solid var(--border-strong); border-radius: var(--r-ctl); overflow: hidden; flex-wrap: nowrap; }
.chips.seg .chip { flex: 1; border: 0; border-radius: 0; background: transparent; min-height: 40px; }
.chips.seg .chip + .chip { border-left: 1px solid var(--border-strong); }
.chips.seg .chip.on { background: var(--elevated); color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
input.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--border-strong); position: relative; cursor: pointer; flex: none; margin: 0; padding: 0; border: 0; transition: background-color var(--d-fast) linear; min-height: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--text); transition: transform var(--d-tab) var(--e-out); }
input.switch:checked { background: var(--success); } input.switch:checked::after { transform: translateX(20px); }

/* player */
.pl-set .set-check { color: var(--success); margin-right: 4px; vertical-align: -3px; }
.stepper .btn.sq { min-width: 56px; min-height: 56px; }
.stepper input { font-size: 32px; min-height: 56px; }
.pl-nav .btn { gap: 2px; }

/* rest + interval timers: no amber; keep --bg, color only ring and label */
.rest-full .rf-label { color: var(--info); }
.iv-full[data-phase="work"], .iv-full[data-phase="rest"], .iv-full[data-phase="done"] { background: var(--bg); }
.iv-full[data-phase="work"] .iv-phase { color: var(--primary); }
.iv-full[data-phase="ready"] .iv-phase { color: var(--text); animation: ready-pulse 1s var(--e-in-out) infinite; }
.iv-full[data-phase="work"] .iv-bar span { background: var(--primary); } .iv-full[data-phase="rest"] .iv-bar span { background: var(--info); }
.iv-full[data-phase="done"] .iv-phase { color: var(--success); }
.iv-full[data-phase="work"] > .btn { background: var(--elevated); color: var(--text); border-color: var(--border-strong); }
.iv-full .rf-btns button { min-height: 56px; }
@keyframes ready-pulse { 50% { opacity: .55; } }

/* toasts: dark elevated with icon, never the brightest thing on screen */
.toast { display: flex; align-items: center; gap: var(--s-2); background: var(--elevated); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px var(--toast-shadow);
  padding: 12px 16px; border-radius: var(--r-ctl); font-weight: 500; max-width: calc(100% - 2 * var(--gutter)); bottom: calc(var(--tab-h) + var(--safe-b) + var(--s-3)); }
.toast.hidden { display: none; }
.toast .toast-ic { color: var(--success); } .toast.warn .toast-ic { color: var(--warning); }
body.in-session .toast { bottom: calc(var(--safe-b) + 140px); }

/* sheets (POLISH-SPEC §6/§7.2) */
.modal { background: var(--scrim); backdrop-filter: blur(2px); opacity: 0; transition: opacity var(--d-sheet-out) linear; }
.modal.open { opacity: 1; transition-duration: var(--d-sheet-in); }
.modal-card { background: var(--elevated); border-radius: var(--r-sheet) var(--r-sheet) 0 0; border: 1px solid var(--border); border-bottom: 0; max-height: min(88dvh, calc(100dvh - var(--safe-t) - 24px));
  padding: var(--s-2) var(--gutter) calc(var(--safe-b) + 16px); overscroll-behavior: contain; transform: translateY(100%); transition: transform var(--d-sheet-out) var(--e-in); }
.modal.open .modal-card { transform: none; transition: transform var(--d-sheet-in) var(--e-spring); }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto 12px; }
#modal-card .set-group { background: var(--card); }
@media (prefers-reduced-motion: reduce) { .modal-card, .modal.open .modal-card { transform: none; transition: opacity 150ms linear; } }

/* learn reading */
.learn-body, .learn-article p { font-size: 17px; line-height: 26px; max-width: 64ch; }

/* page transitions (POLISH-SPEC §7.1) */
.topbar { view-transition-name: topbar; } .tabbar { view-transition-name: tabbar; }
#view { view-transition-name: page; }
::view-transition-old(topbar), ::view-transition-new(topbar), ::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; }
html[data-nav="tab"]::view-transition-old(page) { animation: vt-fade-out var(--d-tab) var(--e-out) both; }
html[data-nav="tab"]::view-transition-new(page) { animation: vt-fade-up var(--d-tab) var(--e-out) both; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-up { from { opacity: 0; transform: translateY(6px); } }
html[data-nav="push"]::view-transition-old(page) { animation: vt-push-old var(--d-push) var(--e-out) both; }
html[data-nav="push"]::view-transition-new(page) { animation: vt-push-new var(--d-push) var(--e-out) both; }
html[data-nav="back"]::view-transition-old(page) { animation: vt-back-old var(--d-push) var(--e-out) both; z-index: 2; }
html[data-nav="back"]::view-transition-new(page) { animation: vt-back-new var(--d-push) var(--e-out) both; }
@keyframes vt-push-old { to { transform: translateX(-8%); filter: brightness(.6); } }
@keyframes vt-push-new { from { transform: translateX(24%); opacity: 0; } }
@keyframes vt-back-old { to { transform: translateX(24%); opacity: 0; } }
@keyframes vt-back-new { from { transform: translateX(-8%); filter: brightness(.6); } }
#view.enter-tab { animation: vt-fade-up var(--d-tab) var(--e-out); }
#view.enter-push { animation: vt-push-new var(--d-push) var(--e-out); }
#view.enter-back { animation: vt-back-new var(--d-push) var(--e-out); }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 1ms !important; } #view.enter-tab, #view.enter-push, #view.enter-back { animation: none; } }

/* launch splash (POLISH-SPEC §7.3; design/launch-demo.html) */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); pointer-events: none; }
.splash .mark { width: 120px; height: 136px; overflow: visible; animation: launch-glow 300ms var(--e-in-out) 620ms both; }
.splash .chev { display: inline; width: auto; height: auto; padding: 0; font-size: inherit; background: none; -webkit-mask: none; mask: none;
  fill: none; stroke-width: 80; stroke-linejoin: miter; stroke-miterlimit: 10; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; animation: launch-rise 420ms var(--e-back) forwards; }
.splash .c-red { stroke: var(--primary); animation-delay: 240ms; } .splash .c-white { stroke: var(--text); animation-delay: 120ms; } .splash .c-steel { stroke: var(--faint); animation-delay: 0ms; }
@keyframes launch-rise { 0% { opacity: 0; transform: translateY(40%); } 55% { opacity: 1; } 100% { opacity: 1; transform: translateY(0); } }
@keyframes launch-glow { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 45% { filter: drop-shadow(0 0 10px var(--launch-glow)); } }
.splash.out { background: transparent; transition: background-color 240ms var(--e-out); }
.splash.out .mark { transition: transform 260ms var(--e-in-out), opacity 260ms var(--e-out); }
.splash.out-fade { opacity: 0; transition: opacity 150ms linear; }
body.launching .topbar, body.launching main, body.launching .tabbar { opacity: 0; }
body.launching.launch-out .topbar, body.launching.launch-out main, body.launching.launch-out .tabbar { opacity: 1; transition: opacity 240ms var(--e-out); }
body.launching .topbar .logo { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .splash .chev { animation: none; opacity: 1; } .splash .mark { animation: launch-fade 150ms linear both; } @keyframes launch-fade { from { opacity: 0; } } }
.tl-bar { background: color-mix(in srgb, var(--pc, var(--elevated)) 22%, var(--elevated)); }
.tl-seg.past .tl-bar { background: color-mix(in srgb, var(--pc, var(--border-strong)) 45%, var(--elevated)); }

/* v9 fix: onboarding add-on card header stacks (pill row, then title) instead of wrapping beside the pill */
.ob-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-rec-meta { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ob-rec-title { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 15px; line-height: 20px; text-align: left; }

/* =====================================================================
   v9 PREMIUM PASS (design/premium/PREMIUM-SPEC.md §15 + workout/NOTES.md).
   Supersedes the v8 block where they conflict: radii 6/8/10, hairlines,
   no backdrop-filter, no card shadows, no gradients except sticky-CTA fade.
   ===================================================================== */
:root {
  --bg: #0b0f14; --surface: #11161d; --card: #161c24; --elevated: #1c232d;
  --line: #262e39; --line-strong: #36404d; --border: var(--line); --border-strong: var(--line-strong);
  --text: #f2f4f7; --muted: #97a2b0; --steel: #5b6573; --faint: var(--steel);
  --red: #e5383b; --red-hover: #f04a4d; --red-press: #c42b2e; --red-tint: rgba(229,56,59,.10); --red-line: rgba(229,56,59,.5);
  --blue: #3dd6ff; --ok: #34d399; --warn: #f5b942; --err: #ff6b6b;
  --ph-ecc: #8a96a6; --ph-iso: #f2f4f7; --ph-react: #e5383b; --ph-peak: #3dd6ff; --ph-deload: #5b6573; --ph-drive: #e5383b;
  --on-red: #0b0f14;
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-sheet: 14px;
  --r-ctl: var(--r-md); --r-card: var(--r-md); --r-pill: var(--r-sm); --radius: var(--r-md);
  --hair: 1px;
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif; --f-body: Inter, system-ui, -apple-system, sans-serif;
  --d-press: 90ms; --d-fast: 150ms; --d-base: 200ms; --d-slow: 250ms;
  --e-out: cubic-bezier(.2,.8,.2,1); --e-spring: cubic-bezier(.34,1.56,.64,1);
}
@media (min-resolution: 2dppx) { :root { --hair: .5px; } }
/* §1/§4: no glass, no card shadows, no card gradients */
.topbar, .tabbar, .modal, .pl-dock { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.topbar { background: var(--bg); }
.card, .goal-card, .phase-banner, .plan-card, .chart-card, .list-item { box-shadow: none; }
.card, .chart-card { border: var(--hair) solid var(--line); border-radius: var(--r-md); }
.phase-banner, .goal-card.hit, .is-selected { background-image: none; }
.tl-seg.cur .tl-bar, .wb-seg.cur { box-shadow: none; }
.avatar { border-radius: 999px; }
/* type utilities */
.num { font-family: var(--f-display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: .86; }
.num .unit, .unit { font-size: .4em; color: var(--steel); margin-left: 2px; letter-spacing: 0; font-weight: 800; }
.ov { font: 700 11px/14px var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.h1 { font: 800 32px/1 var(--f-display); text-transform: uppercase; letter-spacing: -.005em; }
.h2 { font: 800 24px/1.05 var(--f-display); text-transform: uppercase; }
.h3 { font: 600 15px/20px var(--f-body); letter-spacing: -.006em; }
.meta { font: 500 12.5px/16px var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.code-red { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tn { font-variant-numeric: tabular-nums; }
.set-sub { display: block; font: 500 12.5px/16px var(--f-body); color: var(--muted); margin-top: 2px; }
/* buttons */
.btn { border-radius: var(--r-md); }
.btn.primary { background: var(--red); color: #fff; border-color: var(--red); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.18); }
.btn.primary:active { background: var(--red-press); transform: scale(.985); }
.btn.xl { height: 58px; min-height: 58px; font: 800 20px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; gap: 10px; display: flex; align-items: center; justify-content: center; }
.btn.ghost { border: var(--hair) solid var(--line-strong); }
.ib { appearance: none; position: relative; width: 40px; height: 40px; flex: none; border-radius: 999px; border: var(--hair) solid var(--line-strong); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform var(--d-press) var(--e-out), background var(--d-fast); }
.ib::after { content: ""; position: absolute; inset: -4px; } /* ≥44px hit area */
.ib:active { transform: scale(.94); background: var(--elevated); }
.ib.is-muted { border-style: dashed; color: var(--muted); }
.ib-sp { width: 40px; }
/* signature ticks + tempo bars */
.ticks { display: flex; gap: 6px; align-items: center; }
.ticks .tick { display: block; overflow: visible; }
.ticks .tick path { stroke-width: 3; }
.ticks.sm .tick path { stroke-width: 2.5; }
.tick.done { color: var(--red); } .tick.cur { color: var(--text); } .tick.todo { color: var(--line-strong); }
.tempo-bar { display: flex; gap: 3px; margin-top: 10px; }
.tb-seg i { display: block; height: 4px; }
.tb-seg.ecc i { background: var(--ph-ecc); } .tb-seg.iso i { background: var(--ph-iso); } .tb-seg.drive i { background: var(--red); }
.tb-lab { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.tb-lab .num { font-size: 22px; line-height: 1; }
.tb-seg.drive .tb-lab .num { color: var(--red); }
.tb-lab .ov { font-size: 10.5px; }
.mini-tempo { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.mini-tempo i { display: block; height: 3px; }
.mini-tempo .ecc { background: var(--ph-ecc); } .mini-tempo .iso { background: var(--ph-iso); } .mini-tempo .drive { background: var(--red); }

/* ---------- shared workout header (player / rest / tempo / preview) ---------- */
.wk-head { display: flex; align-items: center; gap: 14px; min-height: 48px; padding-top: 8px; }
.wk-head > .ov, .wk-head > .grow { flex: 1; text-align: center; }
body.in-session .topbar, body.focus-head .topbar { display: none; }
body.in-session main, body.focus-head main { padding-top: calc(var(--safe-t) + 4px); }
.pp { flex: 1; min-width: 0; }
.pp-bar { display: flex; gap: 3px; }
.pp-seg { flex: 1; height: 3px; background: var(--line); position: relative; overflow: hidden; }
.pp-seg i { position: absolute; inset: 0 auto 0 0; background: var(--red); transition: width var(--d-base) var(--e-out); }
.pp-seg.done i { background: var(--text); }
.pp-meta { display: flex; justify-content: space-between; margin-top: 7px; }
.pp-meta .ov { color: var(--steel); font-size: 10.5px; }
.wk-warm { margin-top: 14px; border-top: var(--hair) solid var(--line); border-bottom: var(--hair) solid var(--line); }
.wk-warm summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; list-style: none; cursor: pointer; }
.wk-warm summary::-webkit-details-marker { display: none; }
.wk-warm[open] .row-chev { transform: rotate(90deg); }
.wk-warm ul { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

/* ---------- 01 player ---------- */
body.in-session { padding-bottom: calc(150px + var(--safe-b)); }
#view .pl-card { background: none; border: 0; padding: 0; margin: 0; box-shadow: none; touch-action: pan-y; }
.pl-ctx { margin-top: 28px; color: var(--muted); }
.pl-title { appearance: none; background: none; border: 0; padding: 0; margin: 10px 0 0; color: var(--text); text-align: left; cursor: pointer; display: block; width: 100%;
  font: 800 64px/.906 var(--f-display); text-transform: uppercase; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-title.l2 { font-size: 52px; } .pl-title.l3 { font-size: 44px; -webkit-line-clamp: 3; }
.pl-target { display: flex; align-items: baseline; gap: 6px; margin-top: 22px; }
.tgt { appearance: none; background: none; border: 0; padding: 0 0 6px; margin: 0; color: var(--text); cursor: pointer; font: 800 104px/.86 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 0); background-size: 6px 2px; background-repeat: repeat-x; background-position: 0 100%; min-height: 44px; }
.tgt .unit { font-size: 36px; margin-left: 3px; }
.tgt:active { transform: scale(.985); }
.tgt-x { font: 800 44px/1 var(--f-display); color: var(--steel); margin: 0 4px; }
.pl-target.xfade .tgt { animation: xfade var(--d-base) var(--e-out); }
@keyframes xfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pl-alldone { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font: 600 16px var(--f-body); }
.pl-alldone .ic { color: var(--red); }
.pl-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.pl-meta b { color: var(--text); font-weight: 600; }
.rpe-btn { appearance: none; background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer; }
.pl-sets-row { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }
.pl-sets-row .set-n { font-size: 18px; color: var(--text); vertical-align: -1px; margin: 0 2px; }
.ticks[class*="pop-"] .tick.done:last-of-type, .ticks.pop-0 .tick:nth-child(1), .ticks.pop-1 .tick:nth-child(2), .ticks.pop-2 .tick:nth-child(3), .ticks.pop-3 .tick:nth-child(4), .ticks.pop-4 .tick:nth-child(5), .ticks.pop-5 .tick:nth-child(6), .ticks.pop-6 .tick:nth-child(7) { animation: tick-pop 220ms var(--e-spring); }
@keyframes tick-pop { 0% { transform: scale(.6); color: var(--text); } 100% { transform: scale(1); } }
.pl-tempo { margin-top: 24px; }
.pl-tempo .row.between { display: flex; justify-content: space-between; align-items: center; }
.link-ic { appearance: none; background: none; border: 0; color: var(--text); display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--f-body); min-height: 44px; padding: 0; cursor: pointer; }
.pl-card .why-line { margin-top: 18px; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; }
.swipe-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; color: var(--steel); font: 500 12.5px var(--f-body); }
.swipe-hint span { color: var(--muted); }
.pl-dock { background: var(--bg) !important; border-top: 0 !important; padding: 0 var(--gutter) calc(12px + var(--safe-b)) !important; }
.pl-dock > .btn.xl { margin-top: 12px; }
.next-row { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0; background: none; color: var(--text); text-align: left;
  border: 0; border-top: var(--hair) solid var(--line); border-bottom: var(--hair) solid var(--line); cursor: pointer; }
.next-row .ov { color: var(--steel); width: 34px; }
.next-row .code { font: 700 13px var(--f-display); color: var(--steel); width: 22px; }
.next-row .num { font-size: 20px; }
.next-row.static { cursor: default; }
.pl-dock.classic .pl-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pl-dock.classic .pl-nav { margin-top: 8px; }
/* edit sheet */
.es-row { padding: 16px 0; border-bottom: var(--hair) solid var(--line); }
.es-row:last-of-type { border-bottom: 0; }
.es-ctl { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.es-b { appearance: none; width: 64px; height: 64px; flex: none; border-radius: var(--r-md); border: var(--hair) solid var(--line-strong); background: var(--elevated); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.es-b:active { transform: scale(.96); background: var(--line); }
.es-v { flex: 1; min-width: 0; width: 100%; text-align: center; background: none !important; border: 0 !important; color: var(--text); font-size: 64px !important; height: 72px; padding: 0 !important; -moz-appearance: textfield; }
.es-v::-webkit-outer-spin-button, .es-v::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.es-mid { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: baseline; gap: 4px; }
.es-mid .es-v { flex: none; width: 3.4ch; }
.es-u { font-size: 22px; }
.es-rpe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.es-chip { appearance: none; height: 48px; border-radius: var(--r-sm); border: var(--hair) solid var(--line-strong); background: transparent; color: var(--text); font: 800 22px var(--f-display); cursor: pointer; }
.es-chip.on { background: var(--red-tint); border-color: var(--red); color: var(--text); }

/* ---------- 02 session preview ---------- */
.pv-head { justify-content: space-between; }
.pv-head .dur-pill { border-radius: var(--r-xs); }
.pv-eyebrow { margin-top: 22px; color: var(--muted); }
.pv-ph { color: var(--text); }
.pv-title { font: 800 46px/.913 var(--f-display) !important; text-transform: uppercase; margin: 10px 0 0 !important; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-stats { display: grid; grid-template-columns: 1.2fr 1fr 1fr; margin-top: 22px; border-top: var(--hair) solid var(--line-strong); border-bottom: var(--hair) solid var(--line-strong); padding: 14px 0; }
.pv-stats > div + div { border-left: var(--hair) solid var(--line-strong); padding-left: 14px; }
.pv-stats .num { font-size: 38px; }
.pv-stats .ov { color: var(--steel); margin-top: 6px; }
.pv-note { margin: 12px 0 0; }
.pv-rows { margin-top: 8px; }
.pvr { position: relative; display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 11px 0; border-bottom: var(--hair) solid var(--line); cursor: pointer; transition: transform var(--d-press) var(--e-out), background var(--d-fast); }
.pvr:last-child { border-bottom: 0; }
.pvr:active { transform: scale(.985); background: var(--surface); }
.pvr.ss-start { border-bottom: 0; }
.pvr.ss-start::before, .pvr.ss-cont::before { content: ""; position: absolute; left: -9px; width: 2px; background: var(--line-strong); }
.pvr.ss-start::before { top: 50%; bottom: 0; } .pvr.ss-cont::before { top: 0; bottom: 50%; } .pvr.ss-start.ss-cont::before { top: 0; bottom: 0; }
.pvr-code { width: 22px; flex: none; font: 700 13px var(--f-display); color: var(--steel); align-self: flex-start; padding-top: 3px; }
.pvr-code.lead { color: var(--red); }
.pvr-name { color: var(--text); }
.pvr-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font: 500 12.5px/16px var(--f-body); color: var(--muted); flex-wrap: wrap; }
.pvr-meta .tempo, .pvr-meta .rest-t { color: var(--muted); }
.pvr-rx { text-align: right; flex: none; }
.pvr-rx .num { font-size: 20px; line-height: 1; }
.pvr-load { font: 500 14px var(--f-body); color: var(--muted); margin-top: 3px; }
body.focus-head .sticky-cta { padding-top: 34px; background: linear-gradient(transparent, var(--bg) 34%); }
body.focus-head main { padding-bottom: 120px; }

/* ---------- 03 rest timer (full screen) ---------- */
.rest-full { position: fixed; inset: 0; z-index: 70; background: var(--bg) !important; display: flex !important; flex-direction: column; align-items: stretch !important; justify-content: flex-start !important; gap: 0 !important;
  padding: calc(var(--safe-t) + 8px) var(--gutter) calc(16px + var(--safe-b)) !important; }
.rest-full.hidden { display: none !important; }
.rest-full.enter { animation: rest-up var(--d-slow) var(--e-out); }
@keyframes rest-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.rest-full .rf-label { color: var(--muted) !important; }
.rf-ring { position: relative; width: min(340px, 86vw); aspect-ratio: 1; margin: 28px auto 0; }
.rf-ring svg { width: 100%; height: 100%; display: block; }
.rf-bg { fill: none; stroke: var(--elevated); stroke-width: 2; }
.rf-fg { fill: none; stroke: var(--red); stroke-width: 3; transition: stroke .2s; }
.rf-fg.nudge { transition: stroke-dasharray 150ms var(--e-out); }
.rf-head { fill: var(--red); }
.rf-q { stroke: var(--line-strong); stroke-width: 1.5; }
.rf-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rf-center .rf-time { position: static; display: block; font-size: 128px !important; line-height: .86; letter-spacing: -.02em !important; color: var(--text); transition: color var(--d-base); }
.rf-center .ov { color: var(--steel); margin-top: 10px; }
.rest-full.warn .rf-time { color: var(--red); }
.rest-full.finished .rf-time { color: var(--red); }
.rest-full.finished .rf-fg, .rest-full.finished .rf-bg { animation: ring-flash 200ms linear; }
@keyframes ring-flash { 50% { stroke: var(--red); stroke-width: 6; } }
.rest-full .rf-btns { display: grid !important; grid-template-columns: 1fr 1.25fr 1fr; gap: 10px; margin-top: 30px; width: 100%; }
.rest-full .rf-btns .btn { height: 56px; font: 800 18px var(--f-display); letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--card); color: var(--text); }
.rest-full .rf-why { text-align: center; margin-top: 14px; min-height: 16px; }
.rest-full .rf-next { margin-top: auto; border-top: var(--hair) solid var(--line); padding-top: 14px; text-align: left; color: var(--text); font-size: inherit; }
.rest-full .rf-next .row.between { display: flex; justify-content: space-between; align-items: center; }
.rf-nx { display: flex; align-items: flex-end; gap: 12px; margin-top: 8px; }
.rf-nx-name { font-size: 30px; line-height: 1; }
.rf-nx .meta { margin-top: 6px; }
.rf-nx-load { font-size: 40px; white-space: nowrap; } .rf-nx-load .x { color: var(--steel); font-size: 24px; }

/* ---------- 04 tempo coach (full screen) ---------- */
#tc-timer.tc-full, #tc-timer.tc-full[data-phase] { background: var(--bg); }
#tc-timer.tc-full { align-items: stretch; justify-content: flex-start; gap: 0; padding: calc(var(--safe-t) + 8px) var(--gutter) calc(20px + var(--safe-b)) 28px; transition: none; }
#tc-timer.tc-full.hidden { display: none; }
.tc-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--steel); }
#tc-timer.tc-full[data-phase="ecc"] .tc-spine { background: var(--ph-ecc); }
#tc-timer.tc-full[data-phase="iso"] .tc-spine, #tc-timer.tc-full[data-phase="top"] .tc-spine { background: var(--ph-iso); }
.tc-title { color: var(--muted); }
.tc-title .num { font-size: 13px; letter-spacing: .06em; }
.tc-line { display: flex; gap: 3px; margin-top: 14px; }
.tc-track { height: 3px; background: var(--line); position: relative; overflow: hidden; }
.tc-track i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--text); transition: width 1s linear; }
.tc-seg .ov { display: block; margin-top: 7px; color: var(--steel); font-size: 10.5px; }
.tc-seg.on .ov { color: var(--text); }
.tc-main { margin-top: 40px; flex: 1; min-height: 0; }
.tc-lab { font: 800 64px/.9 var(--f-display); text-transform: uppercase; color: var(--text); letter-spacing: -.005em; }
.tc-sub { font: 500 15px var(--f-body); color: var(--muted); margin-top: 8px; min-height: 20px; }
.tc-count { font-size: 300px !important; line-height: .8 !important; margin-top: 18px; color: var(--text); }
.tc-count .ic { color: var(--red); }
.tc-count.bump { animation: tc-bump 150ms var(--e-out); }
@keyframes tc-bump { from { transform: scale(1.04); opacity: .6; } to { transform: none; opacity: 1; } }
#tc-timer.tc-full[data-phase="ecc"] .tc-count, #tc-timer.tc-full[data-phase="ecc"] .tc-lab { color: var(--ph-ecc); }
.tc-chevs { width: 230px; height: 230px; display: block; }
.tc-foot { display: flex; justify-content: space-between; align-items: flex-end; border-top: var(--hair) solid var(--line); padding-top: 14px; }
.tc-rep { font-size: 56px; margin: 4px 0 8px; } .tc-rep .unit { font-size: 24px; }
.tc-reps { display: flex; gap: 10px; margin-top: 12px; }
.tc-play { appearance: none; width: 76px; height: 76px; border-radius: 999px; border: 1.5px solid var(--text); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.tc-play:active { transform: scale(.96); }
/* drive: full-bleed red beat, cuts in instantly */
#tc-timer.tc-full[data-phase="drive"] { background: var(--red); color: var(--on-red); }
#tc-timer.tc-full[data-phase="drive"] .tc-lab, #tc-timer.tc-full[data-phase="drive"] .tc-sub, #tc-timer.tc-full[data-phase="drive"] .tc-count, #tc-timer.tc-full[data-phase="drive"] .ov, #tc-timer.tc-full[data-phase="drive"] .tc-title,
#tc-timer.tc-full[data-phase="drive"] .tc-rep, #tc-timer.tc-full[data-phase="drive"] .unit, #tc-timer.tc-full[data-phase="drive"] .ib, #tc-timer.tc-full[data-phase="drive"] .tc-play, #tc-timer.tc-full[data-phase="drive"] .tick { color: var(--on-red) !important; border-color: var(--on-red); }
#tc-timer.tc-full[data-phase="drive"] .tc-spine, #tc-timer.tc-full[data-phase="drive"] .tc-track i { background: var(--on-red); }
#tc-timer.tc-full[data-phase="drive"] .tc-track { background: rgba(11,15,20,.25); }
#tc-timer.tc-full[data-phase="drive"] .tc-foot { border-color: rgba(11,15,20,.3); }
#tc-timer.tc-full[data-phase="done"] .tc-lab { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  #tc-timer.tc-full[data-phase="drive"] { background: var(--bg); color: var(--text); }
  #tc-timer.tc-full[data-phase="drive"] .tc-lab, #tc-timer.tc-full[data-phase="drive"] .tc-count { color: var(--red) !important; }
  #tc-timer.tc-full[data-phase="drive"] .tc-sub, #tc-timer.tc-full[data-phase="drive"] .ov, #tc-timer.tc-full[data-phase="drive"] .tc-title, #tc-timer.tc-full[data-phase="drive"] .tc-rep, #tc-timer.tc-full[data-phase="drive"] .ib, #tc-timer.tc-full[data-phase="drive"] .tc-play { color: var(--text) !important; border-color: var(--line-strong); }
  #tc-timer.tc-full[data-phase="drive"] .tc-spine { width: 12px; background: var(--red); }
  #tc-timer.tc-full[data-phase="drive"] .tc-track i { background: var(--text); }
  .tc-count.bump, .rest-full.enter, .pl-target.xfade .tgt, .ticks .tick { animation: none !important; }
  .pp-seg i, .tc-track i { transition: none; }
}
#tc-timer.tc-full[data-phase="drive"] .ib, #tc-timer.tc-full[data-phase="drive"] .tc-play { border-color: var(--on-red) !important; }
.pl-card.classic-pad { padding-bottom: 150px !important; }
.pl-dock.classic .stepper .row { display: flex; gap: 6px; align-items: center; }
.pl-dock.classic .stepper input { flex: 1; min-width: 0; width: 100%; text-align: center; font: 800 26px var(--f-display); }
.pl-dock.classic .stepper .btn.sq { width: 44px; min-width: 44px; padding: 0; }
.pill, .ph-pill, .dur-pill { white-space: nowrap; flex: none; }
.tg-strip { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 0; margin: 0 0 4px; background: none; border: 0; border-bottom: var(--hair) solid var(--line); color: var(--muted); text-align: left; cursor: pointer; }
.tg-strip .ov { color: var(--steel); flex: none; width: 44px; }
.tg-list { flex: 1; min-width: 0; font: 500 13px/18px var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-list .pri { color: var(--text); font-weight: 600; }
.tg-list i { font-style: normal; color: var(--steel); margin: 0 6px; }
/* contrast rule (v9): #5b6573 only for units + axis labels; labels/meta/codes use --muted */
.tg-strip .ov, .pp-meta .ov, .next-row .ov, .next-row .code, .pv-stats .ov, .rf-center .ov, .pvr-code, .tc-seg .ov, .tgt-x, .rf-nx-load .x { color: var(--muted); }
.pvr-code.lead { color: var(--red); }
.grp-t, .ex-code, .faint, .empty-state { color: var(--muted); }

/* =====================================================================
   v10 · home/01–09, v10 SPEC §5–7, jump-test, Meet the coach
   ===================================================================== */
body.today-head .topbar, body.in-flow .topbar, body.in-flow .tabbar { display: none; }
body.in-flow main, body.today-head main { padding-top: calc(var(--safe-t) + 12px); }
/* shared primitives */
.c-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.c-hero { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 16px; display: grid; gap: 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--border-strong); font: 700 10.5px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tag.red, .tag.rec { color: var(--red); border-color: var(--red-line); } .tag.warn { color: var(--warning); border-color: var(--warn-line); } .tag.ok { color: var(--success); border-color: var(--ok-line); }
.tag.src-app { color: var(--blue); border-color: var(--info-line); } .tag.src-self { color: var(--text); } .tag.src-est { color: var(--muted); border-style: dashed; }
.st-ok { color: var(--success); } .st-warn { color: var(--warning); }
.sq52 { width: 52px; min-width: 52px; height: 52px; padding: 0; justify-content: center; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; position: relative; }
.on > .radio, [aria-checked="true"] > .radio { border-color: var(--red); } .on > .radio::after, [aria-checked="true"] > .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--red); }
.u-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; }
.u-tabs button { appearance: none; background: none; border: 0; padding: 12px 0; font: 700 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 44px; cursor: pointer; }
.u-tabs button.on { color: var(--text); border-bottom-color: var(--red); }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border-strong); border-radius: var(--r-ctl); overflow: hidden; margin: 14px 0 18px; }
.seg3 button { appearance: none; background: transparent; border: 0; min-height: 44px; color: var(--muted); font: 700 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.seg3 button + button { border-left: 1px solid var(--border-strong); } .seg3 button.on { background: var(--elevated); color: var(--text); box-shadow: inset 0 -2px 0 var(--red); }
.wk-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; min-height: 48px; }
.ib-sp { width: 44px; }
/* Today */
.td-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.td-logo { display: flex; align-items: center; gap: 10px; }
.td-av { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); font: 700 13px/1 var(--f-display); letter-spacing: .06em; display: grid; place-items: center; cursor: pointer; }
.td-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.td-head { font-size: 40px; line-height: .95; margin: 0; } .td-head span { display: block; color: var(--muted); font-size: 22px; line-height: 1.1; margin-top: 8px; text-transform: none; font-weight: 700; letter-spacing: 0; }
.phase-stack .ps-ecc, .phase-stack .ps-iso, .phase-stack .ps-react { stroke-dasharray: calc(var(--p) * 690) 690; transition: stroke-dasharray .6s var(--e-out); }
.phase-stack .ps-ecc { stroke: var(--ph-ecc); } .phase-stack .ps-iso { stroke: var(--ph-iso); } .phase-stack .ps-react { stroke: var(--red); }
.td-rl-top { display: flex; justify-content: space-between; margin: 26px 0 8px; }
.ruler { display: flex; gap: 3px; } .rl-seg { flex: 1; position: relative; text-align: center; }
.rl-seg i { display: block; height: 6px; border-radius: 1px; background: var(--border-strong); opacity: .7; }
.rl-seg.past i { opacity: 1; } .rl-seg.cur i { height: 10px; margin-top: -2px; }
.rl-seg.ph-foundation i, .rl-seg.ph-ecc i { background: var(--ph-ecc); } .rl-seg.ph-build i, .rl-seg.ph-iso i { background: var(--ph-iso); }
.rl-seg.ph-strength i, .rl-seg.ph-react i { background: var(--red); } .rl-seg.ph-peak i { background: var(--ph-peak); } .rl-seg.ph-deload i { background: transparent; outline: 1px dashed var(--ph-deload); }
.rl-seg:not(.past):not(.cur) i { opacity: .28; }
.rl-seg span { font: 700 9.5px/1 var(--f-display); letter-spacing: .08em; color: var(--steel, #5b6573); display: block; margin-top: 6px; } .rl-seg.cur span { color: var(--text); }
.rl-mark { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); color: var(--text); }
.td-sess { margin-top: 22px; } .td-sess .h2 { font-size: 28px; }
.td-rows { margin-top: 14px; border-top: 1px solid var(--border); }
.td-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); } .td-row .grow { display: grid; gap: 2px; } .td-row .num { font-size: 20px; }
.td-more { padding: 10px 0 2px; }
.td-cta { display: flex; gap: 10px; margin-top: 14px; }
.td-sess.live { border-color: var(--red-line); } .live-ov { color: var(--red); display: inline-flex; align-items: center; gap: 8px; } .live-ov i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.td-live-strip { display: flex; align-items: flex-end; gap: 22px; margin-top: 14px; } .td-live-strip .num { font-size: 34px; } .td-live-strip .btn { margin-left: auto; }
.sa-chip, .td-goal, .td-test, .coach-card { appearance: none; width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--text); padding: 16px 0; min-height: 56px; cursor: pointer; font: inherit; }
.sa-chip { margin-top: 18px; border-top: 1px solid var(--border); } .sa-chip .grow { font: 600 15px/20px var(--f-body); } .sa-chip svg:first-child { color: var(--red); }
.td-goal { display: block; } .td-gv { display: flex; align-items: center; gap: 12px; margin-top: 10px; } .td-gv .num { font-size: 24px; }
.td-bar { flex: 1; height: 4px; background: var(--border-strong); border-radius: 2px; position: relative; } .td-bar i { position: absolute; inset: 0 auto 0 0; background: var(--red); border-radius: 2px; }
.td-bar svg { position: absolute; top: 6px; transform: translateX(-50%); color: var(--text); } .td-tg { color: var(--muted); }
.td-test .grow, .coach-card .grow, .hub-row .grow, .tier-row .grow { display: grid; gap: 3px; } .td-test .num { font-size: 22px; } .blue-ic { color: var(--blue); }
/* mini player */
.mini { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 8px); z-index: 25; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 14px; background: var(--elevated); border: 1px solid var(--border-strong); border-radius: var(--r-card); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.45); font: inherit; }
.mini.hidden { display: none; } body.has-mini main { padding-bottom: calc(var(--tab-h) + 96px); }
.mini-line { position: absolute; left: 0; top: 0; height: 2px; background: var(--red); transition: width .4s var(--e-out); }
.mini-txt { flex: 1; min-width: 0; display: grid; gap: 2px; } .mini-txt .h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mini-txt .meta b { color: var(--text); font-weight: 600; }
.mini-t { display: grid; justify-items: end; gap: 2px; } .mini-t .num { font-size: 22px; line-height: 1; } .mini[data-mode="rest"] .mini-t .num { color: var(--red); } .mini-go { color: var(--success); }
.mini-up { color: var(--muted); } .mini.flash { animation: miniflash .9s 2; } @keyframes miniflash { 50% { border-color: var(--success); background: color-mix(in srgb, var(--success) 14%, var(--card)); } }
/* Tests hub */
.hub-hero-r { display: flex; justify-content: space-between; align-items: flex-end; } .hub-hero .h1 { font-size: 34px; }
.hub-days { text-align: right; } .hub-days .num { font-size: 44px; line-height: .9; }
.hub-h { margin: 24px 0 10px; }
.hub-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hub-m { appearance: none; display: grid; gap: 6px; justify-items: start; text-align: left; padding: 14px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); color: var(--text); cursor: pointer; font: inherit; min-height: 120px; }
.hub-m svg { color: var(--red); } .hub-m .meta { font-size: 12px; }
.hub-list { border-top: 1px solid var(--border); }
.hub-row { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 0; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-height: 60px; }
.hub-row.static { cursor: default; } .hub-ics { display: inline-flex; gap: 4px; vertical-align: -2px; margin-left: 6px; color: var(--muted); }
.hub-v { display: grid; justify-items: end; gap: 4px; } .hub-v .num, .hub-row > .num { font-size: 24px; }
.ms-list { display: grid; gap: 8px; margin-top: 12px; }
.ms-opt { appearance: none; display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-ctl); color: var(--text); cursor: pointer; font: inherit; }
.ms-opt.on { border-color: var(--red); } .ms-opt .grow { display: grid; gap: 4px; } .ms-ic { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--elevated); display: grid; place-items: center; color: var(--red); flex: none; }
/* manual entry */
.me-pick { margin-bottom: 16px; } .me-pick .chips { margin-top: 8px; }
.me-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .me-fields.one { grid-template-columns: 1fr; }
.me-f { appearance: none; text-align: left; display: grid; gap: 8px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-ctl); color: var(--text); cursor: pointer; font: inherit; }
.me-f.on { border-color: var(--red); } .me-f .num { font-size: 44px; line-height: 1; } .me-f .unit, .unit { color: var(--steel, #5b6573); font: 700 15px/1 var(--f-display); margin-left: 6px; letter-spacing: .04em; text-transform: none; }
.caret { display: inline-block; width: 2px; height: 36px; background: var(--red); vertical-align: -4px; margin-left: 3px; animation: blink 1s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } }
.me-est { margin-top: 14px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; gap: 6px; } .me-1rm { font-size: 34px; }
.me-date { display: flex; align-items: center; gap: 12px; padding: 12px 0; margin: 6px 0 12px; border-bottom: 1px solid var(--border); color: var(--text); } .me-date input { background: transparent; border: 0; color: var(--text); font: inherit; width: auto; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.keypad button { appearance: none; height: 54px; border: 0; border-radius: var(--r-sm); background: var(--card); color: var(--text); font: 700 26px/1 var(--f-display); cursor: pointer; display: grid; place-items: center; } .keypad button:active { background: var(--elevated); }
/* guided */
.gd-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 16px 0 22px; } .gd-s i { display: block; height: 4px; border-radius: 2px; background: var(--border-strong); }
.gd-s.done i { background: var(--text); } .gd-s.on i { background: var(--red); } .gd-s .ov { font-size: 9.5px; display: block; margin-top: 6px; } .gd-s.on .ov { color: var(--text); }
.gd-title { font-size: 36px; margin: 6px 0 14px; } .gd-timer { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } .gd-timer .num { font-size: 72px; line-height: .9; } .gd-timer .num.go { color: var(--success); }
.gd-bar { height: 3px; background: var(--border-strong); margin-top: 14px; } .gd-bar i { display: block; height: 100%; background: var(--red); transition: width .25s linear; }
.gd-cues, .jt-rules { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px solid var(--border); }
.gd-cues li, .jt-rules li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); } .gd-cues li > span:last-child, .jt-rules li > span:last-child { display: grid; gap: 3px; }
.gd-cues .num, .jt-rules .num { font-size: 15px; color: var(--muted); width: 22px; }
.gd-att { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; } .gd-att > div { padding: 12px; border: 1px solid var(--border); border-radius: var(--r-sm); display: grid; gap: 6px; } .gd-att .num { font-size: 24px; }
.gd-dock, .jt-res-dock { display: flex; gap: 10px; position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); padding-top: 8px; }
.gd-in { font-size: 56px; background: transparent; border: 0; border-bottom: 2px solid var(--red); color: var(--text); width: 180px; padding: 0; }
/* jump test */
.jt-diag { width: 100%; height: auto; margin: 18px 0 6px; }
.jt-dock { margin-top: 22px; }
.jt-cam { position: fixed; inset: 0; background: #000; z-index: 40; } .jt-cam video { width: 100%; height: 100%; object-fit: cover; }
.jt-brk { position: absolute; inset: 18% 10% 22%; border: 2px solid rgba(255,255,255,.35); border-radius: 6px; } .jt-floor { position: absolute; left: 10%; right: 10%; bottom: 30%; border-top: 2px dashed var(--red); }
.jt-top { position: absolute; top: calc(var(--safe-t) + 12px); left: 14px; right: 14px; display: flex; gap: 8px; align-items: center; } .jt-top .ib { margin-right: auto; } .jt-top .tag { background: rgba(0,0,0,.6); }
.ib.on-dark { background: rgba(0,0,0,.5); color: #fff; } .jt-hint { position: absolute; left: 0; right: 0; bottom: 140px; text-align: center; color: #fff; }
.jt-shutter { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 36px); transform: translateX(-50%); width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
.jt-shutter i { width: 58px; height: 58px; border-radius: 50%; background: var(--red); transition: all .2s; } .jt-shutter.on i { width: 28px; height: 28px; border-radius: 6px; }
.jt-vwrap { position: relative; margin-top: 8px; border-radius: var(--r-card); overflow: hidden; background: #000; aspect-ratio: 4 / 5; } .jt-vwrap video { width: 100%; height: 100%; object-fit: contain; display: block; }
.jt-fc { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.65); color: var(--text); }
.jt-zoom { position: absolute; right: 10px; bottom: 10px; width: 92px; height: 60px; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; display: grid; align-items: end; justify-items: center; } .jt-zoom span { font: 700 9px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: #fff; padding: 4px; background: rgba(0,0,0,.5); }
.jt-fpsline { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .jt-fpsline .chips { display: flex; gap: 4px; }
.jt-big { font-size: 40px; line-height: 1; }
.jt-strip { position: relative; height: 80px; margin-top: 14px; border-radius: var(--r-sm); overflow: hidden; background: var(--card); } .jt-strip canvas { width: 100%; height: 100%; display: block; opacity: .75; }
.jt-strip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.jt-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); transform: translateX(-1px); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.jt-tmark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--blue); pointer-events: none; display: none; font: 700 10px/1 var(--f-display); color: var(--bg); } .jt-tmark::after { content: 'T'; position: absolute; top: 4px; left: 4px; background: var(--blue); padding: 2px 4px; border-radius: 2px; }
.jt-span { position: absolute; top: 0; bottom: 0; background: rgba(61,214,255,.18); pointer-events: none; display: none; }
.jt-step { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr 1fr; gap: 8px; margin: 12px 0; } .jt-step .btn { justify-content: center; min-height: 52px; padding: 0 6px; }
.jt-res { font-size: 112px; line-height: .9; margin: 8px 0 18px; } .jt-res .unit { font-size: 28px; }
.jt-formula { margin-top: 12px; font-variant-numeric: tabular-nums; } .jt-atts { border-top: 1px solid var(--border); margin-top: 8px; }
/* tier previews */
.tier-h { margin: 30px 0 10px; } .tier-list { border-top: 1px solid var(--border); }
.tier-row { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 0; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-height: 60px; }
.tier-ic { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--card); display: grid; place-items: center; color: var(--muted); flex: none; } .tier-t { color: var(--muted); } .tier-lock { color: var(--muted); }
.tier-pts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; } .tier-pts li { display: flex; gap: 10px; align-items: flex-start; } .tier-pts svg { color: var(--success); flex: none; margin-top: 2px; }
/* welcome + onboarding */
.wel { position: relative; min-height: calc(100vh - var(--safe-t) - 24px); display: flex; flex-direction: column; overflow: hidden; }
.wel-photo { position: absolute; inset: 0 -24px auto auto; width: 82%; height: 500px; object-fit: cover; object-position: 50% 30%; opacity: .7; pointer-events: none; background: #000;
  -webkit-mask-image: linear-gradient(180deg,#000 40%,transparent 100%); mask-image: linear-gradient(180deg,#000 40%,transparent 100%); }
.wel::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, transparent 0, transparent 200px, rgba(11,15,20,.75) 330px, var(--bg) 470px); }
.wel-cap { position: absolute; top: 46px; right: 4px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(11,15,20,.6); color: #e7ecf2; font-size: 12px; letter-spacing: .02em; backdrop-filter: blur(6px); pointer-events: none; }
.wel-chev { position: absolute; right: -120px; top: 250px; width: 360px; height: auto; opacity: .55; pointer-events: none; }
.wel-top { display: flex; align-items: center; gap: 10px; position: relative; } .wel-body { position: relative; margin-top: auto; padding-top: 220px; display: grid; gap: 14px; }
.wel-leg { display: flex; align-items: center; gap: 6px; } .wel-leg i { width: 14px; height: 4px; border-radius: 1px; } .wel-leg i.e { background: var(--ph-ecc); } .wel-leg i.i { background: var(--ph-iso); } .wel-leg i.r { background: var(--red); margin-right: 6px; }
.wel-h { font: 800 52px/.92 var(--f-display); text-transform: uppercase; margin: 0; } .wel-h span { display: block; color: var(--muted); }
.wel-p { color: var(--muted); font-size: 16px; line-height: 1.45; margin: 0 0 6px; max-width: 32ch; }
.wel-link { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; } .wel-note { text-align: center; } .wel-demo { min-height: 44px; }
.wel .coach-card { border-top: 1px solid var(--border); margin-top: 6px; }
.coach-card img { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.ob-head { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; margin-bottom: 26px; }
.ob-prog { display: flex; gap: 4px; } .ob-prog i { flex: 1; height: 3px; border-radius: 2px; background: var(--border-strong); } .ob-prog i.on { background: var(--red); }
.ob-ov { margin-bottom: 8px; } .ob-ov2 { margin: 22px 0 10px; } .ob .ob-q { font: 800 36px/1 var(--f-display); text-transform: uppercase; margin: 0 0 8px; } .ob-q2 { display: block; color: var(--muted); }
.ob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; } .ob-grid.two { grid-template-columns: 1fr 1fr; }
.ob-ov2 + .ob-grid { margin-top: 0; }
.ob-g { appearance: none; min-height: 52px; padding: 8px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--card); color: var(--text); font: 600 14px/1.2 var(--f-body); cursor: pointer; }
.ob-g.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.ob-radios { display: grid; gap: 8px; margin-top: 18px; }
.ob-radio { appearance: none; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font: inherit; min-height: 64px; }
.ob-radio.on { border-color: var(--red); } .ob-radio .grow { display: grid; gap: 3px; } .ob-gic { color: var(--muted); } .ob-radio.on .ob-gic { color: var(--red); }
.ob-dob { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 52px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--card); color: var(--muted); }
.ob-dob input { flex: 1; background: transparent; border: 0; color: var(--text); font: 600 16px var(--f-body); min-height: 50px; color-scheme: dark; }
.ob-first { margin-top: 22px; }
/* Meet the coach */
.co-hero { position: relative; margin: 4px calc(-1 * var(--gutter)) 22px; aspect-ratio: 4 / 5; max-height: 74vh; width: auto; overflow: hidden; background: #000; }
.co-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; display: block; filter: brightness(.62) contrast(1.08); }
.co-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,13,18,.15) 0%, rgba(10,13,18,0) 35%, rgba(10,13,18,.75) 78%, var(--bg, #0b0e13) 100%); }
.co-hero-txt { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 6px; z-index: 1; } .co-hero-txt .co-title { margin: 6px 0 0; text-shadow: 0 2px 18px rgba(0,0,0,.5); } .co-hero-txt .ov { color: var(--red); }
.co-title { font-size: 56px; margin: 6px 0 18px; }
.co-body p { font-size: 17px; line-height: 1.6; color: var(--text); margin: 0 0 16px; max-width: 36em; } .co-body p:first-child { font-size: 19px; }
.co-journey { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 30px; }
.co-step { display: inline-flex; gap: 10px; align-items: baseline; color: var(--text); } .co-step .num { color: var(--red); font-size: 15px; }
.co-cap { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 6px 0 10px; }
.co-clips { display: grid; gap: 8px; } .co-clips.two { grid-template-columns: 1fr 1fr; }
.co-clips video, .co-ph { width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; object-fit: cover; border-radius: var(--r-sm); background: var(--card); display: block; }
.co-clips:not(.two) video, .co-clips:not(.two) .co-ph { aspect-ratio: 4 / 5; }
.co-ph { background-size: cover; background-position: center; display: grid; place-items: end start; padding: 12px; }
.co-gallery { margin-top: 30px; } .co-gallery img { width: 100%; border-radius: var(--r-sm); display: block; }
a.btn { text-decoration: none; }
/* contrast fixes (v9 audit leftovers): steel only for units and axis labels */
.pp-meta .ov, .next-row .ov, .next-row .code, .pv-stats .ov, .rf-center .ov, .pvr-code, .tc-seg .ov, .tgt-x, .rf-nx-load .x, .tg-strip .ov { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .live-ov i, .caret, .mini.flash { animation: none; } .phase-stack path { transition: none; } }
.h2, h2.h2 { color: var(--text); }
.wk-head.pl-head { grid-template-columns: 44px 1fr 44px 44px; gap: 6px; }
.co-gallery.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .co-gallery figure { margin: 0; } .co-gallery img[src*="photo-cf-throw"], .co-gallery img[src*="photo-lead"] { object-position: 60% 50%; } .co-gallery img { aspect-ratio: 3/4; object-fit: cover; } .co-gallery figcaption { margin-top: 6px; }
.co-clips.wide video { aspect-ratio: 16 / 9; } .co-clips.sq video { aspect-ratio: 1 / 1; } .co-clips.r32 video { aspect-ratio: 3 / 2; }
.co-vwrap { position: relative; } .co-snd { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(11,15,20,.72); color: #fff; font: 600 13px var(--f-body); backdrop-filter: blur(6px); cursor: pointer; } .co-snd[aria-pressed="true"] { background: var(--red); }

/* v10.4 desktop: full-bleed welcome + coach hero */
@media (min-width: 900px) {
  .co-hero { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); aspect-ratio: auto; height: min(78vh, 680px); max-height: none; }
  .co-hero img { object-position: 50% 47%; }
  .co-hero-txt { left: 0; right: 0; max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); bottom: 18px; } .co-hero-txt .co-title { font-size: 84px; }
  .wel { min-height: calc(100vh - 24px); justify-content: center; }
  .wel-photo { position: fixed; inset: 0 0 0 46%; width: 54vw; height: 100vh; opacity: .95; object-position: 50% 40%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
  .wel-chev { position: fixed; left: auto; right: -70px; top: auto; bottom: -150px; width: 340px; opacity: .9; }
  main:has(.wel) { max-width: none; padding-left: max(6vw, calc(50vw - 560px)); padding-right: 0; }
  .wel::before { display: none; } .wel-cap { position: fixed; top: 20px; right: 24px; } .wel-top, .wel-body { max-width: 480px; } .wel-body { padding-top: 60px; margin-top: 0; } .wel-h { font-size: 64px; }
}
@media (min-width: 900px) { html, body { overflow-x: clip; } }

/* v10.6.2: show whole moves, no cover-crops */
.co-clips video, .co-clips:not(.two) video, .co-clips.wide video, .co-clips.sq video, .co-clips.r32 video { aspect-ratio: auto; height: auto; max-height: 80vh; object-fit: contain; background: #000; border-radius: 12px; }
.co-clips.two { align-items: start; }
.co-gallery img, .co-gallery.two img { aspect-ratio: auto; height: auto; object-fit: contain; background: #000; border-radius: 12px; }
.co-gallery figure.gv { grid-column: 1 / -1; } .co-gallery video { width: 100%; height: auto; display: block; background: #000; border-radius: 12px; }

/* v10.7 Meet the coach: clean layout */
.cp-wrap { max-width: 720px; margin: 0 auto; }
.cp-head { display: flex; flex-direction: column; gap: 18px; margin: 4px 0 22px; }
.cp-portrait { width: 100%; height: auto; aspect-ratio: 800 / 1174; max-height: 72vh; object-fit: contain; border-radius: 18px; background: #000; display: block; }
.cp-intro .h1 { margin: 4px 0 6px; }
.cp-line { font-size: 17px; line-height: 1.45; color: var(--txt2, inherit); margin: 0; }
.cp-story p { line-height: 1.6; }
.cp-vids { display: flex; flex-direction: column; gap: 22px; margin: 28px 0; }
.cp-card { margin: 0; }
.cp-card video { width: 100%; height: auto; display: block; object-fit: contain; background: #000; border-radius: 16px; }
.cp-card figcaption { margin-top: 8px; font-size: 14px; opacity: .8; }
.cp-yt { margin: 6px 0 14px; }
.cp-note { margin: 12px 0 24px; }
@media (min-width: 900px) {
  .cp-head { flex-direction: row; align-items: center; gap: 32px; }
  .cp-portrait { width: 300px; flex: none; max-height: none; }
}

/* v10.8 desktop layout (>=900px): left sidebar nav, wide content, two-column Today. Phone unchanged. */
@media (min-width: 900px) {
  body { padding-bottom: 32px; padding-left: 220px; }
  body.onboarding, body.in-session, body.in-flow { padding-left: 0; }
  .tabbar { top: 0; bottom: 0; right: auto; width: 220px; height: auto; padding: 28px 12px; display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); }
  .tabbar::before { content: 'PHASE STRENGTH'; font: 800 13px var(--font-display, inherit); letter-spacing: .12em; color: var(--text); padding: 0 12px 18px; }
  .tabbar a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; min-height: 46px; border-radius: 12px; font-size: 15px; }
  .tabbar a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
  .tabbar a.on { background: color-mix(in srgb, var(--primary) 14%, transparent); }
  main { max-width: 1100px; padding-left: 40px; padding-right: 40px; }
  body.today-head #view { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 28px; grid-auto-flow: row dense; align-items: start; }
  body.today-head #view > * { grid-column: 1 / -1; }
  body.today-head #view > .td-sess { grid-column: 1; grid-row: span 4; margin-top: 0; }
  body.today-head #view > .sa-chip, body.today-head #view > .td-goal, body.today-head #view > .td-test { grid-column: 2; margin-top: 0; margin-bottom: 12px; }
  .mini { left: 240px; right: auto; width: min(560px, calc(100vw - 280px)); bottom: 20px; }
  body.has-mini main { padding-bottom: 110px; }
  .toast { bottom: 40px; }
  .pl-dock { left: 220px; }
}

/* v10.8.1 welcome carousel */
div.wel-photo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: inherit; opacity: 0; transition: opacity .7s ease; }
div.wel-photo video.on { opacity: 1; }
div.wel-photo.still { background: #000 url(../clips/photo-jumpshot.jpg) center 30% / cover no-repeat; } div.wel-photo.still video { display: none; }
.wel-dots { position: absolute; top: 18px; right: 4px; z-index: 2; display: flex; gap: 6px; width: 132px; }
.wel-dots button { flex: 1; height: 24px; padding: 10px 0; border: 0; background: none; cursor: pointer; }
.wel-dots i { display: block; height: 3px; width: 0; border-radius: 2px; background: #fff; box-shadow: 0 0 0 100vw transparent; }
.wel-dots button { background: linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) center / 100% 3px no-repeat; }
.wel-cap { top: 50px; }
@media (min-width: 900px) {
  .wel-dots { position: fixed; top: 56px; right: 24px; width: 180px; }
  .wel-cap { top: 20px; }
}

.cp-blooper { margin: 8px 0 18px; max-width: 360px; } .cp-blooper .ov { margin-bottom: 8px; }
.cp-card video { max-height: 80vh; }

/* v11.0.1: welcome carousel = small dots only (no captions, no progress bars) */
.wel-cap { display: none !important; }
.wel-dots { width: auto; gap: 2px; }
.wel-dots button { flex: none; width: 18px; height: 24px; padding: 0; background: none; display: grid; place-items: center; }
.wel-dots i { width: 6px !important; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background .2s, transform .2s; }
.wel-dots button[aria-selected="true"] i { background: #fff; transform: scale(1.25); }
@media (min-width: 900px) { .wel-dots { width: auto; } }
/* v11.0.2 typed DOB */
.dob-f { display: inline-flex; align-items: center; gap: 4px; }
.dob-in { width: 3.2ch; min-height: 44px; padding: 0 6px; text-align: center; background: var(--bg, #0b0f14); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: 600 16px var(--f-body); }
.dob-in.dob-y { width: 5.4ch; } .dob-in:focus { outline: 2px solid var(--accent, #e5383b); outline-offset: 1px; } .dob-in[aria-invalid="true"] { border-color: var(--red); }
.dob-sep { color: var(--muted); } .dob-err { display: block; color: var(--err); font-size: 13px; min-height: 0; } .dob-err:empty { display: none; }
.ob-dob { flex-wrap: wrap; padding: 4px 14px; } .ob-dob .dob-in { flex: none; min-height: 44px; } .ob-dob .dob-err { flex-basis: 100%; padding-bottom: 6px; }
.dob-f { flex: none; flex-wrap: nowrap; } .set-row .dob-f { margin-left: auto; }
.dob-f input.dob-in, .ob-dob .dob-f input.dob-in { flex: none !important; width: 52px !important; min-width: 0; max-width: none; min-height: 44px; padding: 0 4px; text-align: center; border: 1px solid var(--border); background: var(--bg, #0b0f14); }
.dob-f input.dob-in.dob-y, .ob-dob .dob-f input.dob-in.dob-y { width: 72px !important; }
.set-row:has(.dob-f) { flex-wrap: wrap; } .set-row:has(.dob-f) > .grow { min-width: 160px; }
/* v11.0.3 coach page: link only */
.cp-only { padding-top: 24px; max-width: 520px; margin: 0 auto; }
/* v11.1 goal picker + timeline */
.ob-check .ob-rank { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font: 700 13px var(--f-display, inherit); flex: none; }
.ob-check.on .ob-rank { background: var(--accent, #e5383b); border-color: var(--accent, #e5383b); color: #fff; }
.ob-day { width: 100%; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; }
.goal-cps { margin-top: 6px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; } .goal-cps .cp-past { text-decoration: line-through; opacity: .6; }
.ob-tgt .pill { font-size: 11px; }
button.gs-row { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 0; color: var(--text); font: inherit; cursor: pointer; }
button.gs-row .h3 { color: var(--text); } button.gs-row svg { color: var(--muted); flex: none; }

/* v11.2: phone welcome hero = full content width, 4:5, nothing pushed off-screen; landscape clips letterboxed, not cropped to half */
@media (max-width: 899px) {
  .wel-photo { inset: 52px 0 auto 0; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 60vh; background: transparent; opacity: .8; }
  div.wel-photo video.wide { object-fit: contain; object-position: 50% 0; }
  .wel-dots { top: 60px; right: 8px; }
  .wel-body { padding-top: min(calc((100vw - 2 * var(--gutter, 20px)) * 1.25 - 40px), 60vh); }
}

/* v11.4 account */
.acct-btns { display: grid; gap: 8px; margin-top: 12px; }
.acct-btns .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.acct-apple { background: #fff; color: #000; border-color: #fff; }
.acct-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.acct-pick { min-height: 64px; justify-content: flex-start; }
#acct-email, #acct-code { width: 100%; }

/* v11.5 recommended programs + Profile settings fold */
.prog-list { display: grid; gap: 10px; }
.prog-card { margin: 0; }
.prog-card.is-selected { border-color: var(--primary-line); }
.prog-title { margin: 8px 0 4px; }
.prof-more { margin-top: 18px; }
.prof-more > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); font-weight: 600; }
.prof-more > summary::-webkit-details-marker { display: none; }
.prof-more > summary::after { content: '›'; font-size: 22px; color: var(--muted); transition: transform .2s; }
.prof-more[open] > summary { margin-bottom: 12px; }
.prof-more[open] > summary::after { transform: rotate(90deg); }
.prof-more > summary { padding: 10px 16px; } .prof-more-sub { display: block; font-weight: 400; margin-top: 2px; }

/* v11.6 exercise swaps */
.swap-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.swap-list { display: grid; gap: 6px; margin-top: 12px; }
.swap-opt { text-align: left; width: 100%; }
.swap-opt .meta { display: block; margin-top: 2px; }

/* =====================================================================
   v11.9 THEMES (js/theme.js). Classic = the :root tokens above. A theme
   only swaps color tokens; layout, type and radii stay the same.
   ===================================================================== */
:root[data-theme="carbon"] {
  color-scheme: dark;
  --bg: #0a0a0b; --surface: #111113; --panel: #18181b; --panel2: #202024; --card: #18181b; --elevated: #202024;
  --line: #29292e; --line-strong: #3b3b42; --border: #29292e; --border-strong: #3b3b42;
  --text: #f4f4f5; --muted: #a1a1aa; --faint: #6b6b74; --steel: #6b6b74;
  --primary: #e5383b; --primary-hover: #ee4a4d; --primary-press: #c42b2e; --on-primary: #fff; --primary-tint: rgba(229,56,59,.10); --primary-line: rgba(229,56,59,.45);
  --red: #e5383b; --red-hover: #ee4a4d; --red-press: #c42b2e; --red-tint: rgba(229,56,59,.10); --red-line: rgba(229,56,59,.45); --on-red: #0a0a0b;
  --info: #9cc3ff; --blue: #9cc3ff; --info-line: rgba(156,195,255,.32); --info-tint: rgba(156,195,255,.07);
  --ok: #4ade80; --success: #4ade80; --ok-line: rgba(74,222,128,.35);
  --warn: #fbbf24; --warning: #fbbf24; --warn-tint: rgba(251,191,36,.10); --warn-line: rgba(251,191,36,.38);
  --danger: #f87171; --error: #f87171; --err: #f87171; --danger-line: rgba(248,113,113,.4);
  --ph-ecc: #8e8e98; --ph-iso: #f4f4f5; --ph-react: #e5383b; --ph-drive: #e5383b; --ph-peak: #9cc3ff; --ph-deload: #5c5c64;
  --scrim: rgba(0,0,0,.66);
}
:root[data-theme="daylight"] {
  color-scheme: light;
  --bg: #f4f5f7; --surface: #ffffff; --panel: #ffffff; --panel2: #eef0f3; --card: #ffffff; --elevated: #eef0f3;
  --line: #e1e4e9; --line-strong: #c8cdd5; --border: #e1e4e9; --border-strong: #c8cdd5;
  --text: #11161d; --muted: #545e6b; --faint: #7d8796; --steel: #7d8796;
  --primary: #d92d30; --primary-hover: #e23b3e; --primary-press: #b8262a; --on-primary: #fff; --primary-tint: rgba(217,45,48,.08); --primary-line: rgba(217,45,48,.45);
  --red: #d92d30; --red-hover: #e23b3e; --red-press: #b8262a; --red-tint: rgba(217,45,48,.08); --red-line: rgba(217,45,48,.45); --on-red: #ffffff;
  --info: #0a6f96; --blue: #0a6f96; --info-line: rgba(10,111,150,.35); --info-tint: rgba(10,111,150,.07);
  --ok: #0f7d56; --success: #0f7d56; --ok-line: rgba(15,125,86,.35);
  --warn: #a35f00; --warning: #a35f00; --warn-tint: rgba(163,95,0,.08); --warn-line: rgba(163,95,0,.38);
  --danger: #c93434; --error: #c93434; --err: #c93434; --danger-line: rgba(201,52,52,.4);
  --ph-ecc: #6b7a8c; --ph-iso: #11161d; --ph-react: #d92d30; --ph-drive: #d92d30; --ph-peak: #0a6f96; --ph-deload: #a7b0bc;
  --scrim: rgba(17,22,29,.45); --toast-shadow: rgba(17,22,29,.18);
}
/* welcome screen stays cinematic (video and photos) in every theme */
:root[data-theme="daylight"] .wel { color-scheme: dark; --bg: #0b0f14; --surface: #11161d; --card: #161c24; --panel: #161c24; --elevated: #1c232d; --panel2: #1c232d;
  --line: #262e39; --line-strong: #36404d; --border: #262e39; --border-strong: #36404d; --text: #f2f4f7; --muted: #97a2b0; --faint: #5b6573; --steel: #5b6573;
  --blue: #3dd6ff; --info: #3dd6ff; background: var(--bg); color: var(--text); }
:root[data-theme="daylight"] .co-hero::after { background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,0) 35%, color-mix(in srgb, var(--bg) 80%, transparent) 80%, var(--bg) 100%); }
:root[data-theme="daylight"] .co-hero-txt .co-title { text-shadow: none; }
:root[data-theme="daylight"] .acct-apple { background: #000; color: #fff; border-color: #000; }
:root[data-theme="daylight"] .btn.primary { box-shadow: none; }
:root[data-theme="daylight"] .ob-dob input { color-scheme: light; }

.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.theme-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 112px; padding: 12px; text-align: left; color: var(--text);
  background: var(--card); border: var(--hair) solid var(--line); border-radius: var(--r-md); font: inherit; cursor: pointer; }
.theme-opt.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.theme-opt .small { line-height: 1.3; }
.theme-sw { display: flex; margin-bottom: 6px; } .theme-sw i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); margin-right: -6px; }
:root[data-theme="daylight"] input.switch::after { background: #fff; box-shadow: 0 1px 3px rgba(17,22,29,.25); }
