/* Client app: one mobile column (390px design width), large tap targets, numbers big; tab bar at the bottom. */

.client-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; background: var(--canvas); }
.client-main { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 20px 20px 24px; }
.client-main--with-tabs { padding-bottom: 104px; }

.client-top { display: flex; align-items: center; justify-content: space-between; height: 44px; }

.intro { display: flex; flex-direction: column; gap: 8px; }
.intro p { font-size: 15px; line-height: 22px; color: var(--ink-2); }

.progress { display: flex; flex-direction: column; gap: 8px; }
.progress__labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.progress__labels span + span { color: var(--ink-2); font-weight: 500; }
.progress__track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress__bar { height: 8px; border-radius: 4px; background: var(--accent); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px 16px; }
.step__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.step__title { font-size: 15px; font-weight: 600; }
.step__detail { font-size: 13px; color: var(--ink-2); }
.step--current { flex-direction: column; align-items: stretch; gap: 14px; border: 2px solid var(--accent); padding: 16px; }
.step--current .step__row { display: flex; align-items: center; gap: 14px; }
.step--locked .step__title { color: var(--ink-2); }
.step--locked .step__detail { color: var(--ink-3); }
.step__soon { font-size: 13px; color: var(--ink-2); text-align: center; padding: 12px; border-radius: var(--radius); background: var(--canvas); }

.client-foot { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--ink-2); }

.consent { display: flex; flex-direction: column; gap: 10px; }
.consent__body { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.consent__required { font-size: 12px; font-weight: 700; color: var(--ink-2); }

.tab-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 16px));
}
.tab-bar__link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px;
  font-size: 11.5px; font-weight: 600; text-decoration: none; border-radius: 10px; color: #5A626A;
}
.tab-bar__link[aria-current="page"] { color: var(--accent); }
.tab-bar__link[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* Screen header with a back button (CL-3, CL-4). */
.client-header { display: flex; align-items: center; gap: 8px; margin: -20px -20px 0; padding: 12px 12px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.client-header__back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.client-header__titles { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.client-header__title { font: 600 17px var(--font-display); }
.client-header__meta { font-size: 12.5px; color: var(--ink-2); }

/* PAR-Q+ (CL-3). */
.parq-q { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.parq-q__text { font-size: 15px; line-height: 21px; font-weight: 600; padding: 0; margin-bottom: 4px; }
.parq-q__note { margin: 0; font-size: 13px; color: var(--ink-2); }
.parq-q--missing .yes-no__option span { border-color: var(--warn); }
.parq-condition { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.parq-condition__subs { padding-left: 14px; border-left: 3px solid var(--accent-soft); }

/* Intake chat (CL-4): header, section chips, captured panel, thread, composer. */
.chat { display: flex; flex-direction: column; gap: 0; margin: -20px -20px -24px; flex: 1; min-height: 0; }
/* The chat page is one screen tall: header and composer stay put, the thread scrolls between them. */
.chat-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.chat-page .client-app { flex: 1; min-height: 0; width: 100%; }
.chat-page .client-main { min-height: 0; overflow: hidden; }
.chat .client-header { margin: 0; }
.chat__progress { display: flex; flex-direction: column; gap: 12px; padding: 10px 16px 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.chip--done { background: var(--ok-soft); color: var(--ok); }
.chip--current { background: var(--accent); color: #FFFFFF; }
.captured { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.captured__head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.captured__grid { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0; font-size: 13.5px; line-height: 19px; }
.captured__grid dt { color: var(--ink-2); }
.captured__grid dd { margin: 0; }
.captured__new { color: var(--accent); font-weight: 600; }
.chat__thread { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; min-height: 0; }
.chat__thread > :first-child { margin-top: auto; }
.chat__composer { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.quick-replies { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-reply__form { display: contents; }
.quick-reply { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font: 500 13.5px var(--font); color: var(--ink); cursor: pointer; }
.quick-reply:hover { border-color: var(--accent); color: var(--accent-ink); }
.composer { display: flex; gap: 8px; align-items: center; }
.composer__input { flex: 1; min-width: 0; height: 48px; border-radius: var(--radius); border: 1px solid var(--line-strong); padding: 0 14px; font: 400 15px var(--font); color: var(--ink); background: var(--canvas); }
.composer__input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.composer__send { width: 48px; height: 48px; border-radius: var(--radius); border: none; background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.composer__send:disabled, .composer__input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Today (CL-7). */
.today-head { display: flex; justify-content: space-between; align-items: flex-start; }
.today-head h1 { font-size: 26px; line-height: 32px; }
.today-head .brand__name { display: none; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 10px; }
.week-strip__day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.week-strip__day--today { color: var(--ink); font-weight: 700; }
.week-strip__dot { width: 26px; height: 26px; border-radius: 13px; background: var(--line-soft); box-sizing: border-box; }
.week-strip__dot--done { background: var(--ok); }
.week-strip__dot--today { background: transparent; border: 2px solid var(--accent); }
.week-strip__dot--planned { background: transparent; border: 1.5px dashed var(--ink-4); }
.week-strip__dot--missed { background: var(--warn-soft); }
.today-card { background: var(--ink); color: #FFFFFF; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.today-card__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #B9C0C7; }
.today-card__title { font: 600 24px/30px var(--font-display); }
.today-card__meta { font-size: 14px; color: #D6DADE; }
.today-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #D6DADE; }
.today-card__list li { display: flex; justify-content: space-between; gap: 12px; }
.today-card__more { color: #B9C0C7; }
.today-card form { display: contents; }
.today-card__start { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: var(--radius); background: var(--accent); color: #FFFFFF; font: 600 16px var(--font); text-decoration: none; border: none; cursor: pointer; width: 100%; }
.today-card__start:hover { background: var(--accent-ink); color: #FFFFFF; }
.today-card__done { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: #9FE0BD; }
.today-card--rest { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.today-card--rest .today-card__eyebrow, .today-card--rest .today-card__meta { color: var(--ink-2); }
.nav-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.nav-card__icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.nav-card__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.nav-card__title { font-size: 15px; font-weight: 600; }
.nav-card__detail { font-size: 13px; color: var(--ink-2); }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.mini-card__label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.mini-card__value { font-size: 15px; font-weight: 600; }

/* Workout (CL-8) and exercise (CL-9). */
.dashes { display: flex; gap: 4px; flex: none; }
.dashes__dash { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.dashes__dash--on { background: var(--accent); }
.demo-block { position: relative; display: block; height: 196px; margin: 0 -20px; background: #1F2328; text-decoration: none; overflow: hidden; }
.demo-block__video { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.demo-block__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 28px; background: rgba(255,255,255,0.16); display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.demo-block__tag { position: absolute; bottom: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,0.55); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.demo-block__tag--right { right: 12px; }
.workout-title { font: 600 24px/30px var(--font-display); }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chip { padding: 4px 9px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.spec-chip--strong { font-weight: 600; }
.rest-timer { display: flex; align-items: center; justify-content: space-between; background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; }
.rest-timer__count { display: flex; align-items: baseline; gap: 8px; color: var(--accent-ink); }
.rest-timer__label { font-size: 13px; font-weight: 600; }
.rest-timer__time { font: 600 26px var(--font-display); }
.rest-timer__skip { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--accent-line); background: var(--surface); font: 600 14px var(--font); color: var(--accent-ink); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.rest-timer--done { background: var(--ok-soft); }
.rest-timer--done .rest-timer__count { color: var(--ok); }
.sets { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 15px; }
.sets th { font-size: 12px; color: var(--ink-2); text-align: left; font-weight: 600; padding: 0 6px; }
.sets td { padding: 10px 6px; background: var(--surface); }
.sets td:first-child { border-radius: 10px 0 0 10px; font-weight: 600; }
.sets td:last-child { border-radius: 0 10px 10px 0; text-align: right; }
.sets__current td { padding: 6px 4px; box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.sets__current td:first-child { box-shadow: inset 2px 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.sets__current td:last-child { box-shadow: inset -2px 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.sets__todo { color: var(--ink-3); }
.sets__queued td { opacity: 0.6; }
.sets__input { width: 60px; height: 44px; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--line-strong); text-align: center; font: 600 17px var(--font); color: var(--ink); }
.sets__input--small { width: 52px; }
.sets__log { width: 48px; height: 44px; border-radius: 10px; border: none; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.check-chip { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); align-items: center; justify-content: center; }
.quick-reply--warn { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; line-height: 20px; }
.notice--warn { background: var(--warn-soft); color: var(--warn); }
.workout-foot { position: sticky; bottom: 0; margin: 0 -20px -24px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.workout-foot form { display: contents; }
.demo-hero { position: relative; height: 260px; margin: -20px -20px 0; background: #1F2328; flex: none; }
.demo-hero__video { width: 100%; height: 100%; object-fit: contain; background: #1F2328; }
.demo-hero__empty { height: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: #D6DADE; font-size: 13px; }
.demo-hero__back { position: absolute; left: 12px; top: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 22px; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.angle-toggle { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; background: rgba(0,0,0,0.55); border-radius: 10px; padding: 3px; }
.angle-toggle__option { height: 34px; padding: 0 16px; border-radius: 8px; display: inline-flex; align-items: center; font: 600 13px var(--font); color: #FFFFFF; text-decoration: none; }
.angle-toggle__option[aria-current="true"] { background: #FFFFFF; color: var(--ink); }
.muscle-chip { padding: 4px 10px; border-radius: 999px; background: var(--line-soft); font-size: 13px; }
.muscle-chip--main { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.cue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cue-list li { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; line-height: 21px; }
.cue-list__n { font-weight: 700; color: var(--accent); }

/* Plan (CL-10, CL-11) and progress (CL-13). */
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--line-soft); border-radius: var(--radius); padding: 3px; }
.segmented__option { height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 600 14px var(--font); color: var(--ink-2); text-decoration: none; }
.segmented__option[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,23,26,0.08); }
.macro-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.macro-tiles > div { display: flex; flex-direction: column; }
.macro-tiles__value { font: 600 22px var(--font-display); }
.plan-week--current { border: 2px solid var(--accent); }
.plan-week__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.plan-week__list li { display: grid; grid-template-columns: 86px 1fr auto auto; gap: 8px; align-items: center; }
.weight-chart { width: 100%; height: auto; }
.weight-chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.weight-chart__dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.weight-chart__goal { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 5 4; }
.weight-chart__label { font: 600 11px var(--font); fill: var(--ok); }
.table--compact td, .table--compact th { padding: 8px 10px; }

/* Check-in (CL-12). */
.scale-field { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scale { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 6px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inline-field { display: flex; align-items: center; gap: 10px; }
.input--number { width: 120px; }
.chat__inner { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.package__price { font: 600 20px var(--font-display); }

/* Check-in, two steps (CL-12a, CL-12b). */
.client-header--steps { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 14px; }
.client-header__row { display: flex; align-items: center; gap: 8px; }
.step-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0 4px; }
.step-bar__seg { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.step-bar__seg--done { background: var(--accent); }
.range-field { display: flex; flex-direction: column; gap: 6px; }
.range-field__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.range-field__value { font: 600 20px var(--font-display); white-space: nowrap; }
.range-field__value span { font: 400 13px var(--font); color: var(--ink-2); }
.range-field__input { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); }
.range-field__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.inline-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.saved-strip { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--ok-soft);
  color: var(--ok); font-size: 13.5px; font-weight: 600; }
.chat-notice { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--warn-soft);
  color: var(--warn); font-size: 12.5px; font-weight: 600; }
.inline-field .input--number { width: 120px; flex: none; font-size: 18px; font-weight: 600; }
.inline-field .input--number + .small { margin-left: auto; }

/* CL-17: the package goal card. */
.goal-card { background: var(--nav); color: #FFFFFF; border-radius: var(--radius-xl); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.goal-card p { margin: 0; font-size: 15px; line-height: 22px; }
.goal-card__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nav-muted); }
.goal-card__progress { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12.5px; color: #D6DADE; }
.goal-card__track { flex: 1; height: 6px; border-radius: 3px; background: #3A424A; overflow: hidden; }
.goal-card__fill { height: 6px; background: #FFFFFF; }
.strong-500 { font-weight: 500; }
