
/* Layout: fixed left rail of views, one working canvas, a person drawer that slides over from the right. Single dark look, matching kngmvmt.com/admin. */
:root {
  --bg: #0d0d0d; --surface: #151515; --surface-2: #1d1d1c; --surface-3: #262522;
  --fg: #f2f0ea; --muted: #8f8c84; --muted-2: #5d5b55;
  --gold: #c9a84c; --gold-hi: #e0c06a; --gold-dim: rgba(201,168,76,.12); --gold-brd: rgba(201,168,76,.32);
  --brd: rgba(255,255,255,.08);
  --ok: #5fae7c; --warn: #d9a441; --bad: #d0584f; --info: #7f9ec4;
  --display: "Bebas Neue", "DIN Condensed", Impact, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 14px; line-height: 1.5; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, .nav a:focus-visible, .card:focus-visible, tr:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.app { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: 100%; }
.rail { border-right: 1px solid var(--brd); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.rail img { width: 150px; opacity: .95; }
.rail .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--fg); background: var(--surface); }
.nav a.on { color: var(--fg); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--gold); }
.badge { font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--gold); color: #111; }
.sync { margin-top: auto; font-size: 12px; color: var(--muted); display: grid; gap: 5px; }
.sync b { color: var(--fg); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; }

main { padding-block: 22px 60px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); min-width: 0; }
.head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: end; margin-bottom: 18px; }
h1 { font-family: var(--display); font-weight: 400; font-size: 38px; letter-spacing: .04em; line-height: 1; margin: 0; }
h2 { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .06em; margin: 0 0 10px; color: var(--gold); }
.sub { color: var(--muted); margin: 6px 0 0; }
.sample { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--muted-2); padding: 4px 8px; border-radius: 4px; }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g2 { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
.panel { background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 16px; min-width: 0; }
.kpi .l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font-family: var(--display); font-size: 40px; line-height: 1.05; letter-spacing: .02em; }
.kpi .d { font-size: 12px; color: var(--muted); }
.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--gold); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.chip.gold { background: var(--gold-dim); color: var(--gold-hi); }
.chip.ok { background: rgba(95,174,124,.14); color: var(--ok); }
.chip.warn { background: rgba(217,164,65,.14); color: var(--warn); }
.chip.bad { background: rgba(208,88,79,.15); color: var(--bad); }
.chip.info { background: rgba(127,158,196,.14); color: var(--info); }

.q { display: grid; gap: 10px; }
.qi { border: 1px solid var(--brd); border-radius: 8px; padding: 12px; background: var(--surface-2); display: grid; gap: 8px; }
.qi .top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.qi .who { font-weight: 600; }
.qi .why { font-size: 12px; color: var(--muted); }
.qi blockquote { margin: 0; padding: 8px 10px; border-left: 2px solid var(--gold-brd); color: #d8d5cc; font-size: 13px; background: rgba(0,0,0,.2); white-space: pre-line; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 1px solid var(--brd); background: var(--surface-3); padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.btn:hover { border-color: var(--gold-brd); }
.btn.go { background: var(--gold); color: #111; border-color: var(--gold); }
.btn.go:hover { background: var(--gold-hi); }
.done { font-size: 13px; color: var(--ok); }

.list { display: grid; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--brd); }
.row:last-child { border-bottom: 0; }
.row .m { color: var(--muted); font-size: 12px; }
.link { background: none; border: 0; padding: 0; text-align: left; font-weight: 600; }
.link:hover { color: var(--gold-hi); }

/* pipeline */
.board-wrap { overflow-x: auto; padding-bottom: 8px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 212px; gap: 12px; }
.col { background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; }
.col h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .06em; display: flex; justify-content: space-between; }
.col h3 span { color: var(--muted); }
.card { background: var(--surface-2); border: 1px solid var(--brd); border-radius: 8px; padding: 10px; display: grid; gap: 6px; text-align: left; width: 100%; }
.card:hover { border-color: var(--gold-brd); }
.card .n { font-weight: 600; }
.card .s { font-size: 12px; color: var(--muted); }
.card.risk { box-shadow: inset 3px 0 0 var(--bad); }
.auto { font-size: 11px; color: var(--muted); border-top: 1px dashed var(--brd); padding-top: 8px; margin-top: auto; }

/* tables */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--brd); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--brd); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
.health { display: inline-flex; gap: 2px; }
.health i { width: 6px; height: 14px; border-radius: 2px; background: var(--surface-3); }
.health.h3 i:nth-child(-n+3), .health.h4 i:nth-child(-n+4), .health.h5 i { background: var(--ok); }
.health.h2 i:nth-child(-n+2) { background: var(--warn); }
.health.h1 i:nth-child(1) { background: var(--bad); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button { border: 1px solid var(--brd); background: none; border-radius: 99px; padding: 4px 12px; font-size: 12px; color: var(--muted); }
.filters button.on { color: #111; background: var(--gold); border-color: var(--gold); }

/* calendar */
.week { display: grid; grid-template-columns: 52px repeat(6, minmax(120px,1fr)); min-width: 820px; position: relative; }
.week .h { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px; border-bottom: 1px solid var(--brd); }
.week .h.today { color: var(--gold); }
.week .t { font-size: 11px; color: var(--muted-2); height: 44px; padding: 2px 6px; border-top: 1px solid var(--brd); }
.week .c { height: 44px; border-top: 1px solid var(--brd); border-left: 1px solid var(--brd); position: relative; }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 5px; padding: 3px 6px; font-size: 11px; line-height: 1.3; overflow: hidden; z-index: 1; border-left: 3px solid; background: var(--surface-3); }
.ev.pt { border-color: var(--gold); } .ev.consult { border-color: var(--info); } .ev.checkin { border-color: var(--ok); } .ev.skin { border-color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* funnel bars */
.fun { display: grid; gap: 14px; }
.fr { display: grid; grid-template-columns: 150px minmax(0,1fr) 70px; gap: 12px; align-items: center; }
.fr .lab { font-weight: 600; }
.fr .lab small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.steps { display: flex; gap: 3px; height: 26px; }
.steps span { background: var(--surface-3); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--fg); min-width: 26px; }
.steps span.p { background: var(--gold); color: #111; font-weight: 700; }
.fr .cv { text-align: right; font-family: var(--display); font-size: 22px; color: var(--gold-hi); }

/* automations */
.rule { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--brd); }
.rule:last-child { border-bottom: 0; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.flow .arrow { color: var(--muted-2); }
.rule .m { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sw { width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--brd); position: relative; padding: 0; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.sw[aria-checked="true"] { background: var(--gold-dim); border-color: var(--gold-brd); }
.sw[aria-checked="true"]::after { transform: translateX(16px); background: var(--gold); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); border-left: 1px solid var(--brd); z-index: 21; overflow-y: auto; padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(30px + env(safe-area-inset-bottom, 0px)) 20px; display: grid; gap: 18px; align-content: start; }
.drawer .x { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); background: none; border: 1px solid var(--brd); border-radius: 6px; width: 32px; height: 32px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.facts div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.facts .l { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts .v { font-weight: 600; }
.next { border: 1px solid var(--gold-brd); background: var(--gold-dim); border-radius: 8px; padding: 12px; }
.next .l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); }
.tl { display: grid; }
.te { display: grid; grid-template-columns: 74px 18px minmax(0,1fr); gap: 8px; }
.te .when { font-size: 11px; color: var(--muted); padding-top: 2px; text-align: right; }
.te .line { position: relative; }
.te .line::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: var(--brd); }
.te .line::after { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.te .what { padding-bottom: 14px; }
.te .what small { display: block; color: var(--muted); font-size: 12px; }

/* HubFit */
.hf { border: 1px solid var(--brd); border-radius: 10px; padding: 14px; display: grid; gap: 14px; background: var(--surface-2); }
.hf-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hf-head h2 { margin: 0; }
.hf-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.hf-box { background: var(--surface); border-radius: 8px; padding: 10px; min-width: 0; }
.hf-box .l { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.hf-box .big { font-family: var(--display); font-size: 26px; line-height: 1; }
.hf-box .m { font-size: 12px; color: var(--muted); }
.spark { width: 100%; height: 40px; display: block; margin-top: 6px; }
.adh { display: flex; gap: 4px; align-items: end; height: 40px; margin-top: 6px; }
.adh span { flex: 1; background: var(--gold); border-radius: 2px 2px 0 0; position: relative; }
.adh span.lo { background: var(--warn); } .adh span.vlo { background: var(--bad); }
.mac { display: grid; grid-template-columns: 54px minmax(0,1fr) 78px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.mac .bar { margin: 0; }
.mac .bar i.over { background: var(--warn); }
.ans { display: grid; gap: 6px; font-size: 13px; }
.ans div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 8px; }
.ans b { font-weight: 500; color: var(--muted); }
.habit { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--surface-3); } .dots i.y { background: var(--ok); }
.srcs { display: grid; gap: 4px; }
.srcs div { display: flex; justify-content: space-between; gap: 6px; }
.srcs .bad { color: var(--bad); }
.dot.bad { background: var(--bad); }
.syncbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid rgba(208,88,79,.4); background: rgba(208,88,79,.08); border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; font-size: 13px; }
@media (max-width: 760px) { .hf-grid { grid-template-columns: minmax(0,1fr); } .ans div { grid-template-columns: minmax(0,1fr); gap: 0; } }

/* nav groups */
.rail { overflow-y: auto; }
.navlabel { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); padding: 12px 10px 4px; }
.navlabel:first-child { padding-top: 0; }

/* onboarding steps */
.steps5 { display: flex; gap: 4px; flex-wrap: wrap; }
.st { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--surface-3); color: var(--muted-2); white-space: nowrap; }
.st.done { background: rgba(95,174,124,.14); color: var(--ok); }
.st.now { background: var(--gold-dim); color: var(--gold-hi); }
.st.bad { background: rgba(208,88,79,.15); color: var(--bad); }

/* gym day */
.cards3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gcard { background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.gcard .time { font-family: var(--display); font-size: 28px; color: var(--gold); line-height: 1; }
.kv { display: grid; gap: 6px; font-size: 13px; }
.kv div { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 8px; }
.kv b { color: var(--muted); font-weight: 500; font-size: 12px; }

/* check-in workbench */
.wb { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 16px; }
.wbl { display: grid; gap: 8px; align-content: start; }
.wbl button { text-align: left; border: 1px solid var(--brd); background: var(--surface); border-radius: 8px; padding: 10px; display: grid; gap: 2px; }
.wbl button.on { border-color: var(--gold-brd); background: var(--gold-dim); }
.wbl small { color: var(--muted); font-size: 12px; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.photos div { aspect-ratio: 3/4; max-width: 100%; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--surface-3) 0 8px, var(--surface-2) 8px 16px); display: flex; align-items: end; padding: 6px; font-size: 11px; color: var(--muted); }
textarea.draft { width: 100%; min-height: 120px; background: var(--surface); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
textarea.draft:focus, .ask input:focus, .calc input:focus, .calc select:focus { outline: 2px solid var(--gold-brd); }

/* client portal (client-facing, light on purpose: client documents are white) */
.portal-wrap { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 24px; align-items: start; }
.phone { width: min(360px, 100%); border: 1px solid var(--brd); border-radius: 36px; padding: 10px; background: #000; justify-self: center; }
.screen { background: #fbfaf7; color: #141414; border-radius: 28px; height: 640px; overflow: hidden; display: flex; flex-direction: column; }
.screen .sc { flex: 1; overflow-y: auto; padding: 18px 16px; display: grid; gap: 12px; align-content: start; }
.screen h3 { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .04em; margin: 0; }
.screen .pc { background: #fff; border: 1px solid #e8e4da; border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.screen .pl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8a6d1f; font-weight: 700; }
.screen .pm { font-size: 12px; color: #6b675e; }
.screen .pbtn { background: #141414; color: #fff; border: 0; border-radius: 8px; padding: 9px 12px; font-weight: 600; font-size: 13px; }
.screen .pbtn.gold { background: #c9a84c; color: #141414; }
.screen .slot { border: 1px solid #e8e4da; background: #fff; border-radius: 8px; padding: 8px; font-size: 12px; text-align: center; }
.screen .slots { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.ptabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #e8e4da; background: #fff; }
.ptabs button { background: none; border: 0; padding: 10px 0 14px; font-size: 11px; font-weight: 600; color: #8b877d; }
.ptabs button.on { color: #141414; box-shadow: inset 0 2px 0 #c9a84c; }

/* proof */
.pcard { background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.pcard q { font-family: var(--display); font-size: 24px; letter-spacing: .02em; line-height: 1.1; quotes: none; }

/* sales calc */
.calc { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.calc label { font-size: 11px; color: var(--muted); display: grid; gap: 4px; }
.calc input, .calc select { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 6px; padding: 7px 8px; font: inherit; width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--brd); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--gold); color: #111; font-weight: 600; }
.macros4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.macros4 div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.macros4 .v { font-family: var(--display); font-size: 26px; line-height: 1; }

/* ask trinity */
.ask { display: grid; gap: 10px; }
.ask form { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; }
.ask .ans-box { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; border-left: 2px solid var(--gold); white-space: pre-line; }
.qs { display: flex; flex-wrap: wrap; gap: 6px; }
.qs button { border: 1px solid var(--brd); background: none; border-radius: 99px; padding: 3px 10px; font-size: 12px; color: var(--muted); }
.qs button:hover { color: var(--fg); border-color: var(--gold-brd); }

/* home */
.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; }
.hello h1 { font-size: 52px; }
.goals { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.goal { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 18px; align-items: center; }
.ring { width: 120px; height: 120px; max-width: 100%; }
.goal .big { font-family: var(--display); font-size: 48px; line-height: 1; letter-spacing: .02em; }
.goal .of { color: var(--muted); font-size: 13px; }
.pace { margin-top: 8px; font-size: 13px; }
.home2 { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 16px; margin-bottom: 16px; }
.next3 { display: grid; gap: 10px; counter-reset: n; }
.n3 { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--brd); }
.n3::before { counter-increment: n; content: counter(n); font-family: var(--display); font-size: 28px; color: var(--gold); text-align: center; }
.n3 .m { color: var(--muted); font-size: 12px; }
.strip { display: grid; gap: 8px; }
.slot2 { display: grid; grid-template-columns: 64px 4px minmax(0,1fr); gap: 10px; align-items: center; font-size: 13px; }
.slot2 i { height: 100%; min-height: 30px; border-radius: 2px; background: var(--gold); }
.slot2 i.consult { background: var(--info); } .slot2 i.checkin { background: var(--ok); } .slot2.past { opacity: .45; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.tile { text-align: left; background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.tile:hover { border-color: var(--gold-brd); }
.tile .l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.tile .mini { display: grid; gap: 4px; font-size: 13px; }
.tile .mini div { display: flex; justify-content: space-between; gap: 8px; }
.tile .mini b { font-variant-numeric: tabular-nums; }
.trend { width: 100%; height: auto; display: block; }
.statusline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); border-top: 1px solid var(--brd); padding-top: 14px; }
@media (max-width: 1050px) { .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } .home2 { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 760px) { .goals { grid-template-columns: minmax(0,1fr); } .hello h1 { font-size: 40px; } }
@media (max-width: 420px) { .tiles { grid-template-columns: minmax(0,1fr); } .goal { grid-template-columns: 90px minmax(0,1fr); gap: 12px; } .goal .big { font-size: 38px; } }

/* content today */
.ctoday { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.cbtn { text-align: left; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; }
.cbtn:hover { border-color: var(--gold-brd); }
.cbtn .fmt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.cbtn .fmt span:last-child { color: var(--muted); font-weight: 500; letter-spacing: .04em; }
.cbtn .ttl { font-family: var(--display); font-size: 24px; letter-spacing: .03em; line-height: 1.1; }
.drawer.wide { width: min(820px, 100%); }
.sec { display: grid; gap: 8px; }
.sec > .l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); font-weight: 700; }
.hook { font-family: var(--display); font-size: 30px; letter-spacing: .02em; line-height: 1.1; }
.shots td { white-space: normal; vertical-align: top; min-width: 90px; }
.shots td:first-child { min-width: 34px; color: var(--gold); font-family: var(--display); font-size: 20px; }
.shots td.t { min-width: 64px; color: var(--muted); }
.shots td.wide { min-width: 200px; }
.copybox { background: var(--surface-2); border: 1px solid var(--brd); border-radius: 8px; padding: 12px; white-space: pre-line; font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fy { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .ctoday { grid-template-columns: minmax(0,1fr); } }

.kept { border: 1px dashed var(--muted-2); border-radius: 10px; padding: 14px; color: var(--muted); font-size: 13px; }

@media (max-width: 1050px) { .portal-wrap { grid-template-columns: minmax(0,1fr); } .wb { grid-template-columns: minmax(0,1fr); } .wbl { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); } .calc { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { .navlabel { display: none; } .macros4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .calc { grid-template-columns: repeat(2, minmax(0,1fr)); } .kv div { grid-template-columns: minmax(0,1fr); gap: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--gold-brd); padding: 10px 16px; border-radius: 8px; z-index: 30; font-size: 13px; max-width: calc(100% - 32px); }

@media (max-width: 1050px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g2 { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0,1fr); }
  .rail { position: sticky; top: 0; height: auto; z-index: 10; background: var(--bg); flex-direction: row; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--brd); gap: 12px; }
  .rail .brand { display: none; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; gap: 6px; }
  .nav a.on { box-shadow: inset 0 -2px 0 var(--gold); }
  .sync { display: none; }
  main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 32px; }
  .fr { grid-template-columns: minmax(0,1fr) 56px; } .fr .steps { grid-column: 1 / -1; grid-row: 2; }
  .facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 420px) { .g4 { grid-template-columns: minmax(0,1fr); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* phone navigation: bottom tab bar + full menu sheet instead of a sideways-scrolling list */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--brd); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabbar button { background: none; border: 0; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; position: relative; }
.tabbar button.on { color: var(--gold-hi); }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .tb { position: absolute; top: 0; left: calc(50% + 6px); font-size: 10px; min-width: 16px; padding: 0 4px; border-radius: 99px; background: var(--gold); color: #111; }
.mtitle { display: none; }
.sheet { position: fixed; inset: 0; z-index: 25; background: var(--bg); overflow-y: auto; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; align-content: start; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 28px; color: var(--fg); }
.sheet .grp { display: grid; gap: 8px; }
.sheet .grp > span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sheet .opts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.sheet .opts button { text-align: left; background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 14px 12px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 52px; }
.sheet .opts button.on { border-color: var(--gold-brd); background: var(--gold-dim); color: var(--gold-hi); }
@media (max-width: 760px) {
  .rail .nav { display: none; }
  .rail .brand { display: flex !important; align-items: center; }
  .rail .brand img { width: 108px; }
  .rail .tag { display: none; }
  .mtitle { display: block; margin-left: auto; font-family: var(--display); font-size: 22px; letter-spacing: .05em; color: var(--gold-hi); }
  .tabbar { display: grid; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* page base (the mockup got these from the artifact frame) */
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { -webkit-font-smoothing: antialiased; }
:root { padding-top: env(safe-area-inset-top, 0px); }
.login { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
select { font: inherit; }

/* iPhone fix (16 Oct 2026): Safari zooms in on any text box under 16px and stays zoomed, so on phones every
   input, select and textarea is 16px (beats the inline font:inherit), and Safari's text inflation is off. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; }
  body { overflow-x: hidden; }
  main { max-width: 100vw; }
}

/* Passcode keypad (17 Oct 2026) */
.pin { max-width: 320px; margin: 0 auto; min-height: 100svh; padding-block: max(40px, env(safe-area-inset-top)) 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.pin-logo { width: 150px; }
.pin-label { margin: 0; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pin-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pin-dots { display: flex; gap: 16px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--muted-2, #666); transition: background .12s, border-color .12s; }
.pin-dots i.on { background: var(--gold, #c9a84c); border-color: var(--gold, #c9a84c); }
.pin-dots.bad { animation: pinshake .4s; } .pin-dots.bad i { border-color: #e0705f; }
@keyframes pinshake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 22px; }
.pin-pad button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--surface-2, #1e1e1d); color: var(--fg); font: 400 32px/1 var(--display, "Bebas Neue", sans-serif); letter-spacing: .02em; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .1s, transform .1s; }
.pin-pad button:active { background: var(--gold, #c9a84c); color: #111; transform: scale(.94); }
.pin-pad .pin-txt { background: none; font: 500 15px/1 var(--body, Inter, sans-serif); color: var(--muted); }
.pin-pad .pin-txt[data-k="del"] { font-size: 24px; }
.pin-pad button:disabled { opacity: .4; }
.pin-msg { margin: 0; min-height: 20px; font-size: 14px; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .pin-dots.bad { animation: none; } }

/* coach view (17 Oct 2026) */
.ktiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ktiles .panel { display: grid; gap: 2px; padding: 12px 14px; } .ktiles b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; } .ktiles span { font-size: 12px; color: var(--muted); }
.adh { width: 90px; height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; flex: none; } .adh i { display: block; height: 100%; background: var(--gold); border-radius: 9px; }
.ksums .adh { width: 100%; }
tr[data-c] { cursor: pointer; } tr[data-c]:hover td { background: var(--surface-2); }
.chead { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cwho { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cav { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-3); color: var(--gold-hi); display: grid; place-items: center; font-family: var(--display); font-size: 26px; border: 2px solid var(--gold); overflow: hidden; flex: none; }
.cav img { width: 100%; height: 100%; object-fit: cover; }
.cchips, .cflags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .cflags { margin: 0 0 14px; } .cflags .chip { font-size: 12px; padding: 5px 11px; }
.ksums { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ksum { display: grid; gap: 5px; align-content: start; padding: 12px 14px; } .ksum .l { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; } .ksum .m { font-size: 12px; color: var(--muted); }
.trio3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; } .trio3 b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; } .trio3 small { font-size: 11px; color: var(--muted); }
.cmain { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cmain { grid-template-columns: minmax(0, 1fr); } }
.ctabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--brd); border-radius: 10px; padding: 4px; }
.ctabs button { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 7px; }
.ctabs button.on { background: var(--gold); color: #111; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pp figure, .pgrid2 figure { margin: 0; } .pp img, .pgrid2 img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.pp figcaption, .pgrid2 figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; max-height: 520px; overflow-y: auto; }
.cic { border-top: 1px solid var(--brd); padding: 12px 0; display: grid; gap: 8px; } .cic:first-child { border-top: 0; padding-top: 0; }
.scs { display: flex; flex-wrap: wrap; gap: 6px; } .scs span { background: var(--surface-2); border-radius: 8px; padding: 5px 9px; font-size: 12px; color: var(--muted); } .scs b { color: var(--fg); margin-right: 5px; }
.pubnote { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; } .pubnote .l, label.l { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); font-weight: 600; }
#cnote { width: 100%; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
.blks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; } .blks i { height: 28px; border-radius: 5px; background: var(--surface-3); }
.blks i.done { background: rgba(201,168,76,.28); } .blks i.cur { background: linear-gradient(90deg, var(--gold) var(--p, 50%), var(--surface-3) var(--p, 50%)); }
.since { display: grid; gap: 10px; } .since > div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; } .since i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); margin-top: 6px; flex: none; } .since i.g { background: var(--gold); }
.cmain .m, .chead .m, .cgrid .m { color: var(--muted); font-size: 12px; }
.pchk { display: flex; gap: 8px; align-items: center; font-size: 14px; } .pchk input { accent-color: var(--gold); width: 16px; height: 16px; }

/* manual edits (17 Oct 2026) */
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.ef { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.ef input, .ef select { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
.etools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--brd); }
.etools .m { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.pgrid2 figure.hid img { opacity: .3; } .pgrid2 figure .link { font-size: 11px; color: var(--gold-hi); padding: 0; background: none; border: 0; }

/* HubFit notes (17 Oct 2026) */
.nlist { display: grid; gap: 10px; } .nitem { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; } .nitem p { margin: 6px 0; white-space: pre-line; font-size: 13px; }
.nitem .acts { align-items: center; } .nitem .link { color: var(--gold-hi); background: none; border: 0; padding: 0; font-size: 12px; }
.nform { display: grid; gap: 8px; } .nform input:not([type=checkbox]), .nform textarea { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical; }

/* Supplements editor (17 Oct 2026) */
.suprows { display: grid; gap: 6px; margin: 8px 0; } .suprow { display: grid; grid-template-columns: 110px 1.2fr .7fr 1fr 1.3fr 1.6fr; gap: 6px; }
#protof .suprow { grid-template-columns: 1.2fr .7fr 1fr 1.3fr 1.6fr; }
.suprow input, .suprow select, #prtitle, #prbreak { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; min-width: 0; width: 100%; box-sizing: border-box; }
@media (max-width: 900px) { .suprow, #protof .suprow { grid-template-columns: 1fr 1fr; } }

/* Billing (17 Oct 2026) */
.bops { display: grid; gap: 10px; margin-top: 10px; } .bform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .bform .l { flex-basis: 100%; }
.bform select, .bform input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
.bconfirm { margin-top: 10px; border: 1px solid var(--gold); border-radius: 10px; padding: 12px; background: rgba(201,168,76,.08); } .bconfirm p { margin: 6px 0 10px; }
.breq { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--gold); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.bfail { border: 1px solid var(--bad, #c0392b); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.bfail .acts { flex-wrap: wrap; }

.stform { display: grid; gap: 8px; margin-top: 10px; } .stform select { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; } .bconfirm ul { margin: 6px 0 10px; padding-left: 18px; }
/* Onboarding setup (17 Oct 2026) */
.obgrid { display: grid; gap: 14px; } .obsec .l { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.obrows { display: grid; gap: 6px; margin: 6px 0; } .obrow { display: grid; gap: 6px; align-items: start; }
.obrow.ob6 { grid-template-columns: 124px 1.2fr .7fr 1fr 1.2fr 1.2fr auto; } .obrow.ob1 { grid-template-columns: minmax(0, 1fr) auto; }
.obsec input, .obsec select, .obsec textarea { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; min-width: 0; width: 100%; box-sizing: border-box; }
.obsec textarea { resize: vertical; line-height: 1.45; } .obinline { display: flex; gap: 8px; align-items: center; } .obinline input { width: 80px; }
.obmv { display: flex; gap: 4px; } .btn.sm { padding: 6px 9px; min-width: 0; }
.obchecks { display: grid; gap: 6px; } .obframe { width: 100%; height: 560px; border: 1px solid var(--brd); border-radius: 10px; background: #fff; margin-top: 8px; }
.obtick { padding: 0; background: none; border: 0; cursor: pointer; }
@media (max-width: 900px) { .obrow.ob6 { grid-template-columns: 1fr 1fr; } .obrow.ob6 .obmv { grid-column: 1 / -1; } }
.obsec input[type="checkbox"] { width: 16px; height: 16px; padding: 0; flex: none; } .obchecks .pchk { justify-content: flex-start; }

/* Messages panel (19 Oct 2026) */
.mthread { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.mrow { display: grid; gap: 2px; max-width: 80%; }
.mrow.coach { justify-self: end; text-align: right; }
.mrow .mb { padding: 9px 12px; border-radius: 14px; background: rgba(201,168,76,.14); white-space: pre-wrap; }
.mrow.coach .mb { background: rgba(255,255,255,.08); }

/* iMessage-style thread (David, 19 Oct 2026): David's messages right in blue, the client's left in grey. */
.mthread { display: flex; flex-direction: column; gap: 2px; max-height: 460px; overflow: auto; padding: 4px; }
.mthread .imtime { align-self: center; font-size: 11px; opacity: .6; margin: 10px 0 4px; }
.mthread .imb { max-width: 75%; padding: 7px 12px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.mthread .imb.own { align-self: flex-end; background: #0a84ff; color: #fff; }
.mthread .imb.them { align-self: flex-start; background: #3a3a3c; color: #fff; }
.mthread .imb.own.tail { border-bottom-right-radius: 5px; margin-bottom: 5px; }
.mthread .imb.them.tail { border-bottom-left-radius: 5px; margin-bottom: 5px; }
.mthread .imstat { align-self: flex-end; font-size: 11px; opacity: .6; margin: -2px 2px 4px; }
.imreply { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.imreply textarea { flex: 1; min-width: 0; border-radius: 18px; padding: 8px 14px; resize: none; }
.imreply .imsend { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #0a84ff; color: #fff; display: grid; place-items: center; cursor: pointer; }
.imreply .imsend svg { width: 18px; height: 18px; }
/* Tracking tab (21 Oct 2026) */
.trd { border-bottom: 1px solid var(--brd); padding: 8px 0; }
.trd summary { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; cursor: pointer; flex-wrap: wrap; }
.trd .list { margin-top: 6px; }
.trx { opacity: .45; }
/* Voice notes (21 Oct 2026) */
.imreply { position: relative; }
.immic { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--brd); background: var(--surface-2); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.immic svg { width: 18px; height: 18px; }
.imb.voice { padding: 7px 11px; }
.vn { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; }
.vn-p { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.22); color: inherit; flex: none; }
.vn-p svg { width: 14px; height: 14px; }
.vn-bar { flex: 1; height: 4px; border-radius: 2px; background: currentColor; opacity: .35; position: relative; overflow: hidden; }
.vn-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: currentColor; }
.vn small { font-size: 12px; font-variant-numeric: tabular-nums; }
.vn-box { position: absolute; inset: 0; z-index: 2; }
.vn-rec { display: flex; align-items: center; gap: 10px; height: 100%; box-sizing: border-box; border: 1px solid var(--brd); border-radius: 18px; padding: 6px 8px 6px 14px; background: var(--surface-2); font-size: 13px; }
.vn-rec span { flex: 1; color: var(--muted); } .vn-rec .vn-t { font-variant-numeric: tabular-nums; }
.vn-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; animation: vnblink 1s infinite; }
@keyframes vnblink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .vn-dot { animation: none; } }
.vn-x, .vn-send { border: 0; border-radius: 12px; padding: 6px 11px; font: inherit; font-weight: 600; cursor: pointer; }
.vn-x { background: var(--brd); color: var(--fg); } .vn-send { background: #c9a84c; color: #111; }
/* Week summary (21 Oct 2026) */
.wb { border-color: rgba(201,168,76,.45); }
.wb-h { font-size: 16px; font-weight: 600; margin: 4px 0 8px; }
.wb-l { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 5px; line-height: 1.45; }
.wb-w, .wb-f { margin: 6px 0 0; line-height: 1.45; } .wb-w b, .wb-f b { color: #c9a84c; margin-right: 6px; }
/* Create post (21 Oct 2026) */
.cip-w { position: relative; } .cip-b { position: absolute; top: 2px; right: 0; z-index: 1; }
.postsheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.ps-in { background: var(--surface, #151515); border: 1px solid var(--brd); border-radius: 18px; padding: 18px; width: min(1100px, 100%); }
.ps-g { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; }
.ps-cv { width: 100%; height: auto; border-radius: 12px; background: #0d0d0d; }
.ps-o { display: grid; gap: 8px; align-content: start; } .ps-o textarea { width: 100%; box-sizing: border-box; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 10px; padding: 10px; font: inherit; }
.ps-q { display: grid; gap: 6px; } .ps-q .btn { text-align: left; white-space: normal; }
@media (max-width: 760px) { .ps-g { grid-template-columns: 1fr; } }
/* Roster sort and search (21 Oct 2026) */
.rbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.rbar .filters { margin-bottom: 0; }
.rtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rtools input, .rtools select { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; }
.rtools input { width: 200px; max-width: 100%; }
.rsort { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
/* In-person coaching (floor mode) button (21 Oct 2026) */
.floorbtn { display: flex; align-items: center; gap: 8px; justify-content: center; background: var(--gold); color: #111; font-weight: 700; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.floorbtn:hover { background: var(--gold-hi); }
.floorbtn svg { width: 18px; height: 18px; }
.floorbtn.sm { display: inline-flex; padding: 8px 12px; font-size: 13px; white-space: nowrap; }
/* My training: David's own app (26 Oct 2026); head coach of KNGMVMT only */
.floorbtn.myapp { margin-top: 8px; background: transparent; color: var(--gold); border: 1px solid var(--gold); cursor: pointer; font-family: inherit; width: 100%; }
.floorbtn.myapp:hover { background: var(--gold); color: #111; }
.floorbtn.sm.myapp { margin-top: 0; width: auto; }
.coach-mode [data-myapp], .biz-mode [data-myapp] { display: none !important; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pushcard { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; border-color: var(--gold-brd); }
/* Weekly check-in review (21 Oct 2026) */
.rvrow { width: 100%; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.rvrow:hover { background: var(--surface-2); }
.rvbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rvgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 14px; align-items: start; }
.rvreply { position: sticky; top: 14px; }
.rvreply input, .rvreply textarea { width: 100%; box-sizing: border-box; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 10px; font: inherit; font-size: 14px; line-height: 1.5; }
.rvreply textarea { resize: vertical; min-height: 260px; }
.rvsc { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.rvsc div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.rvsc b { font-size: 22px; color: var(--gold); }
.rvsc span { font-size: 12.5px; }
.rvlast { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; max-height: 420px; overflow: auto; margin-top: 8px; }
.rvrecbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 1000px) { .rvgrid { grid-template-columns: minmax(0, 1fr); } .rvreply { position: static; } }

/* Messages page (21 Oct 2026): every conversation, the thread beside it on wide screens, full screen on the phone */
#nav .tb { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: #111; margin-left: 4px; }
.mt-wrap { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; margin-top: 12px; align-items: start; }
.mt-list { padding: 4px; display: grid; max-height: calc(100vh - 170px); overflow: auto; }
.mt-row { position: relative; display: grid; gap: 2px; text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px 40px 10px 12px; color: inherit; font: inherit; cursor: pointer; }
.mt-row:hover { background: var(--surface2, rgba(255,255,255,.04)); }
.mt-row.on { background: rgba(201,168,92,.12); }
.mt-top { display: flex; justify-content: space-between; gap: 8px; }
.mt-top small { color: var(--muted); white-space: nowrap; }
.mt-last { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-row.new .mt-last { color: inherit; }
.mt-n { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; min-width: 20px; text-align: center; padding: 2px 6px; border-radius: 99px; background: var(--gold); color: #111; font-weight: 700; }
.mt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mt-head b { flex: 1; min-width: 0; }
.mt-back { display: none; }
.mt-pane #msgbox .mthread { max-height: calc(100vh - 300px); }
@media (max-width: 760px) {
  .mt-wrap { grid-template-columns: 1fr; }
  .mt-wrap.open .mt-list, .mt-wrap:not(.open) .mt-pane { display: none; }
  .mt-back { display: inline-flex; }
  .mt-list { max-height: none; }
  .mt-pane #msgbox .mthread { max-height: calc(100vh - 330px); }
}
.mt-pane #msgbox > h2 { display: none; }
.tabbar .tb { font-style: normal; font-weight: 700; }
.imreply textarea { font: inherit; }
/* Body weight chart readout and weigh-in list (22 Oct 2026) */
.wread { margin: 6px 0 0; min-height: 18px; font-size: 13px; }
.wread b { color: var(--fg); }
.whist { margin-top: 10px; border-top: 1px solid var(--brd); padding-top: 8px; }
.whist summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.wh-list { max-height: 300px; overflow-y: auto; margin-top: 6px; }
.wh-r { display: grid; grid-template-columns: 1fr auto 70px; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--brd); font-size: 13px; font-variant-numeric: tabular-nums; }
.wh-r small { text-align: right; color: var(--muted); }
/* Discard a training session (22 Oct 2026) */
.wodisc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.bad { border-color: var(--bad, #d9534f); color: var(--bad, #d9534f); }

/* Messages, redesigned (22 Oct 2026): three panes on a computer, list then full-screen chat on a phone.
   Bubbles in the brand: David's gold with black text, the client's grey. */
.mx { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; height: calc(100vh - 44px); height: calc(100dvh - 44px); min-height: 520px;
  background: var(--surface); border: 1px solid var(--brd); border-radius: 14px; overflow: hidden; }
.mx-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--brd); }
.mx-ltitle { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 16px 8px; }
.mx-ltitle h1 { margin: 0; font-size: 30px; }
#mx-lbody { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.mx-lhead { display: flex; gap: 8px; padding: 0 12px 10px; }
.mx-search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 10px; padding: 0 10px; min-width: 0; }
.mx-search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.mx-search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); padding: 9px 0; outline: none; }
.mx-newb { white-space: nowrap; }
.mx-chips { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.mx-chips::-webkit-scrollbar { display: none; }
.mx-chip { flex: none; border: 1px solid var(--brd); background: none; color: var(--muted); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; }
.mx-chip[aria-pressed="true"] { background: var(--gold-dim); border-color: var(--gold-brd); color: var(--gold-hi); }
.mx-rows { overflow-y: auto; flex: 1; min-height: 0; padding: 0 6px 10px; }
.mx-row { width: 100%; display: flex; gap: 11px; align-items: center; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px; color: var(--fg); }
.mx-row:hover { background: var(--surface-2); }
.mx-row.on { background: var(--surface-3); }
.mx-rt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mx-r1, .mx-r2 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mx-r1 b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-r1 small { color: var(--muted); font-size: 12px; flex: none; }
.mx-row.new .mx-r1 b { font-weight: 800; } .mx-row.new .mx-r1 small { color: var(--gold-hi); }
.mx-last { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-row.new .mx-last { color: var(--fg); }
.mx-n { font-style: normal; background: var(--gold); color: #111; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 99px; display: inline-grid; place-items: center; padding: 0 6px; flex: none; }
.mx-seen { color: var(--muted-2); font-size: 11.5px; flex: none; }
.mx-hint { color: var(--muted); font-size: 13px; padding: 8px 14px; margin: 0; }
.mx-av { --h: 40; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; font-size: 14px;
  background: hsl(var(--h) 22% 24%); color: hsl(var(--h) 45% 82%); }
.mx-av img { width: 100%; height: 100%; object-fit: cover; }
.mx-av.lg { width: 56px; height: 56px; font-size: 18px; }

.mx-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mx-chead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--brd); }
.mx-back { display: none; background: none; border: 0; padding: 6px; margin-left: -6px; color: var(--gold-hi); }
.mx-back svg, .mx-pick svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mx-cwho { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; text-align: left; padding: 0; color: var(--fg); }
.mx-cwho > span:last-child { display: grid; min-width: 0; }
.mx-cwho b { font-size: 15px; } .mx-cwho small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-infob { display: none; }
.mx-thread { flex: 1; overflow-y: auto; padding: 14px 18px 8px; display: flex; flex-direction: column; gap: 3px; }
.mx-day { display: flex; justify-content: center; margin: 14px 0 8px; }
.mx-day span { font-size: 11.5px; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 3px 10px; }
.mx-b { max-width: min(72%, 520px); padding: 8px 12px; border-radius: 18px; font-size: 14.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.mx-b time { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.mx-b.own { align-self: flex-end; background: var(--gold); color: #141311; }
.mx-b.them { align-self: flex-start; background: var(--surface-3); color: var(--fg); }
.mx-b.own.first { margin-top: 6px; } .mx-b.them.first { margin-top: 6px; }
.mx-b.own:not(.last) { border-bottom-right-radius: 6px; } .mx-b.own:not(.first) { border-top-right-radius: 6px; }
.mx-b.them:not(.last) { border-bottom-left-radius: 6px; } .mx-b.them:not(.first) { border-top-left-radius: 6px; }
.mx-b.voice { padding: 8px 10px; min-width: 220px; }
.mx-b.own .vn-p { background: #141311; color: var(--gold); } .mx-b.own .vn-bar { background: rgba(20,19,17,.25); } .mx-b.own .vn-bar i { background: #141311; } .mx-b.own .vn small { color: #141311; }
.mx-stat { align-self: flex-end; font-size: 11.5px; color: var(--muted); margin: 2px 4px 6px; }
.mx-ci { align-self: center; width: min(100%, 440px); display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 12px 14px; border: 1px solid var(--gold-brd); background: var(--gold-dim); border-radius: 14px; }
.mx-ci-i svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-hi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.mx-ci-t { flex: 1; min-width: 0; display: grid; } .mx-ci-t small { color: var(--muted); font-size: 12px; }
.mx-empty, .mx-pick { margin: auto; text-align: center; color: var(--muted); display: grid; gap: 6px; justify-items: center; padding: 30px; }
.mx-empty b, .mx-pick b { color: var(--fg); font-size: 16px; } .mx-empty p, .mx-pick p { margin: 0; }
.mx-pick svg { width: 40px; height: 40px; color: var(--gold); stroke-width: 1.5; }
.mx-reply { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--brd); flex-wrap: wrap; }
.mx-reply .vn-box { flex-basis: 100%; }
.mx-reply textarea { flex: 1; min-width: 0; resize: none; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 20px; padding: 9px 14px; font: inherit; max-height: 180px; outline: none; }
.mx-reply textarea:focus { border-color: var(--gold-brd); }
.mx-mic, .mx-send { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1px solid var(--brd); background: var(--surface-2); color: var(--fg); padding: 0; }
.mx-mic svg { width: 20px; height: 20px; }
.mx-send { background: var(--gold); border-color: var(--gold); color: #141311; }
.mx-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.mx-ctx { border-left: 1px solid var(--brd); overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mx-ctx:empty { display: none; }
.mx-who { display: flex; gap: 12px; align-items: center; } .mx-who > div { display: grid; min-width: 0; } .mx-who b { font-size: 16px; } .mx-who small { color: var(--muted); }
.mx-file { width: 100%; }
.mx-sec { display: grid; gap: 6px; border-top: 1px solid var(--brd); padding-top: 12px; }
.mx-sec h3 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mx-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .mx-kv span { color: var(--muted); } .mx-kv b { font-weight: 600; text-align: right; }
.mx-spark { width: 100%; height: 44px; margin-top: 4px; }
.mx:not(.open) .mx-ctx { display: none; }
.mx:not(.open) { grid-template-columns: 320px minmax(0, 1fr); }

/* iPad and small laptops: the client opens from Details */
@media (max-width: 1180px) {
  .mx, .mx.open { grid-template-columns: 300px minmax(0, 1fr); }
  .mx-infob { display: inline-flex; }
  .mx-ctx { display: none; }
  .mx.open.info .mx-ctx { display: flex; position: absolute; right: 0; top: 0; bottom: 0; width: 300px; background: var(--surface); z-index: 3; box-shadow: -12px 0 30px rgba(0,0,0,.4); }
  .mx { position: relative; }
}
/* Phone: the list, then the chat full screen over everything */
@media (max-width: 760px) {
  .mx, .mx.open { display: block; height: auto; min-height: 0; border: 0; background: none; border-radius: 0; }
  .mx-list { border: 0; }
  .mx-ltitle { padding: 4px 4px 10px; } .mx-lhead, .mx-chips { padding-inline: 0; } .mx-rows { padding: 0; overflow: visible; }
  .mx-row { padding: 10px 4px; border-radius: 0; border-bottom: 1px solid var(--brd); }
  .mx-chat { display: none; }
  .mx.open .mx-chat { display: flex; position: fixed; inset: 0; z-index: 30; background: var(--bg); padding-top: env(safe-area-inset-top, 0px); }
  .mx.open .mx-chead { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .mx-back { display: inline-flex; }
  .mx-thread { padding: 12px max(12px, env(safe-area-inset-left, 0px)) 8px; }
  .mx-b { max-width: 82%; }
  .mx-reply { padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); background: var(--bg); }
  .mx.open.info .mx-ctx { position: fixed; inset: 0; width: auto; z-index: 31; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 24px; }
  .mx-ctx .mx-file { order: 9; }
}
/* the client file's own Messages panel: same brand bubbles */
.imb.own { background: var(--gold) !important; color: #141311 !important; }
.mx-ctxclose { display: none; align-self: flex-start; }
@media (max-width: 760px) { .mx-ctxclose { display: inline-flex; } }

/* HQ upgrade (22 Oct 2026, audit "as presented"): five-section menu, search everywhere, slim phone header. */
.navsearch { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 10px; padding: 8px 10px; color: var(--muted); margin-bottom: 10px; font-size: 13.5px; }
.navsearch svg { width: 16px; height: 16px; } .navsearch span { flex: 1; text-align: left; }
.navsearch kbd { font: 600 11px var(--body); color: var(--muted-2); border: 1px solid var(--brd); border-radius: 5px; padding: 1px 5px; }
.navsec { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: var(--fg); padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; text-align: left; }
.navsec:hover { background: var(--surface-2); }
.navsec svg { width: 18px; height: 18px; color: var(--muted); flex: none; } .navsec span { flex: 1; }
.navsec.on, .navsec.cur { color: var(--gold-hi); } .navsec.on svg, .navsec.cur svg { color: var(--gold); }
.navsec.on { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--gold); }
.navchev { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.navgrp.open .navchev { transform: rotate(45deg); }
.navsub { display: grid; gap: 1px; margin: 2px 0 8px 28px; }
.navsub a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; text-decoration: none; }
.navsub a:hover { color: var(--fg); background: var(--surface-2); }
.navsub a.on { color: var(--fg); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--gold); }
/* Live demo inside the Platform group (29 Oct 2026, menu stage 1) */
.navsub .navdemo { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 0; background: none; color: var(--gold); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.navsub .navdemo:hover { background: var(--surface-2); color: var(--gold-hi); } .navsub .navdemo svg { width: 15px; height: 15px; flex: none; }
.nav { gap: 2px; }
.msearch { display: none; background: none; border: 0; color: var(--fg); padding: 6px; }
/* My training on a phone: a small dumbbell icon next to the day/night icon (26 Oct 2026, David) */
.msearch svg { width: 22px; height: 22px; }
.srch { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.srch-box { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--brd); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.srch-in { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--brd); }
.srch-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.srch-in input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); font: inherit; font-size: 16px; padding: 8px 0; outline: none; }
.srch-res { max-height: 60vh; overflow-y: auto; padding: 6px; }
.srch-h { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px 4px; }
.srch-r { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: none; border: 0; color: var(--fg); padding: 9px 10px; border-radius: 10px; text-align: left; }
.srch-r.on, .srch-r:hover { background: var(--surface-2); } .srch-r small { color: var(--muted); }
@media (max-width: 760px) {
  .rail { padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important; padding-bottom: 8px !important; gap: 10px; }
  .rail .floorbtn { display: none !important; }
  .rail .brand img { width: 96px; }
  .mtitle { font-size: 20px; }
  .msearch { display: inline-flex; margin-left: 4px; }
  .srch { padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px; background: var(--bg); }
  .srch-box { border: 0; box-shadow: none; background: none; } .srch-res { max-height: none; }
}
/* Home: Needs you first, numbers as a strip */
.ny-rows { display: grid; }
.ny-r { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--brd); }
.ny-r:first-child { border-top: 0; padding-top: 4px; }
.ny-t { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.ny-n { font-weight: 600; font-size: 15px; color: var(--fg); padding: 0; text-align: left; }
.ny-c { display: flex; flex-wrap: wrap; gap: 4px; }
/* Long reasons wrap inside the card instead of pushing it past the screen (30 Oct 2026, David: "Why are these extended past the screen?") */
.ny-t > * { max-width: 100%; }
.ny-c { min-width: 0; }
.ny-c .chip { white-space: normal; max-width: 100%; text-align: left; line-height: 1.35; overflow-wrap: anywhere; }
.ny-a { display: flex; gap: 6px; flex: none; }
.ny-z { color: var(--muted); }
.ny-more { color: var(--gold-hi); margin: 10px 14px 0 0; }
.kstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.ks { display: grid; gap: 3px; text-align: left; background: var(--surface); border: 1px solid var(--brd); border-radius: 14px; padding: 12px 14px; color: var(--fg); min-width: 0; }
.ks:hover { border-color: var(--gold-brd); }
.ks small { color: var(--muted); font-size: 12px; } .ks b { font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1.05; }
.ks span { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ks em.bad { color: var(--bad); font-style: normal; }
.ks-bar { display: inline-block; width: 46px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; } .ks-bar i { display: block; height: 100%; background: var(--gold); }
@media (max-width: 760px) {
  .kstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ks { padding: 10px 12px; } .ks b { font-size: 24px; }
  .ny-r { flex-wrap: wrap; } .ny-r .mx-av { width: 36px; height: 36px; font-size: 13px; }
  .ny-a { width: 100%; padding-left: 48px; } .ny-a .btn { flex: 1; justify-content: center; }
}
/* Client file: two main actions, ••• for the rest, tabs in one row that sticks on scroll */
.cacts { position: relative; }
.cmore { position: relative; }
.cmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; min-width: 220px; background: var(--surface); border: 1px solid var(--brd); border-radius: 12px; padding: 6px; display: grid; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.cmenu button { background: none; border: 0; color: var(--fg); text-align: left; padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.cmenu button:hover { background: var(--surface-2); }
.ctabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 6; }
.ctabs::-webkit-scrollbar { display: none; }
.ctabs button { flex: none; white-space: nowrap; }
@media (max-width: 760px) {
  .ctabs { top: calc(52px + env(safe-area-inset-top, 0px)); border-radius: 0; margin-inline: -16px; border-left: 0; border-right: 0; padding-inline: 12px; }
  .ksums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ksums .ksum { padding: 10px 12px; } .ksums .ksum b { font-size: 14px; }
  .chead .acts { display: flex; flex-wrap: nowrap; gap: 8px; } .cacts > .btn { flex: 1; justify-content: center; }
  .cmenu { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); min-width: 0; }
  .cmenu button { padding: 14px 12px; font-size: 15px; }
}
/* Roster: cards on a phone, so the reason is never cut off */
.rcards { display: none; }
@media (max-width: 760px) {
  .rtable { display: none; }
  .rcards { display: grid; gap: 8px; }
  .rcard { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--brd); border-radius: 14px; padding: 12px; cursor: pointer; }
  .rc-t { flex: 1; min-width: 0; display: grid; gap: 3px; } .rc-t b { font-size: 15px; } .rc-t small { color: var(--muted); font-size: 12.5px; }
  .rc-c { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
  .rc-m { flex: none; align-self: center; }
  .rbar .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; } .rbar .filters button { flex: none; white-space: nowrap; }
}
/* People: CRM list, search as you type, cards on a phone */
.psrch { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 10px; padding: 0 12px; margin-bottom: 12px; }
.psrch svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.psrch input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); font: inherit; padding: 10px 0; outline: none; }
.pcards { display: none; }
@media (max-width: 760px) {
  .ptable { display: none; }
  .pcards { display: grid; gap: 0; margin-bottom: 10px; }
  .pcard { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--brd); cursor: pointer; }
  .pc-t { flex: 1; min-width: 0; display: grid; gap: 4px; } .pc-t b { font-size: 15px; } .pc-t small { color: var(--muted); font-size: 12.5px; }
  .pc-c { display: flex; flex-wrap: wrap; gap: 4px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .filters button { flex: none; white-space: nowrap; }
}
a.btn, a.btn:visited { color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; }
/* Programme and meal plan editors (22 Oct 2026) */
.ped-entry { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ped { position: fixed; inset: 0; z-index: 35; background: var(--bg); overflow-y: auto; }
.ped-in { max-width: 980px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; }
.ped-h { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--brd); }
.ped-h h2 { margin: 0; font-size: 28px; } .ped-hb { display: flex; gap: 8px; }
.ped-note { margin: 0; } .ped-err { color: var(--bad); margin: 0; }
.ped-s { background: var(--surface); border: 1px solid var(--brd); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.ped-sh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ped-sn { flex: 1; min-width: 160px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: 600 15px var(--body); }
.ped-sh select, .ped-f input, .ped-f select, .med-oh input, .med-name { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 7px 8px; font: inherit; }
.ped-ex { display: grid; grid-template-columns: minmax(0, 1fr) 70px 80px minmax(0, 220px) auto; gap: 8px; align-items: end; padding: 8px 0; border-top: 1px solid var(--brd); }
.ped-ex.picking { grid-template-columns: 1fr; }
.ped-name { display: grid; gap: 2px; text-align: left; background: none; border: 0; color: var(--fg); padding: 4px 0; } .ped-name b { font-weight: 600; } .ped-name small { color: var(--muted); font-size: 12px; }
.ped-name:hover b { color: var(--gold-hi); }
.ped-f { display: grid; gap: 3px; min-width: 0; } .ped-f span { font-size: 11.5px; color: var(--muted); } .ped-f input, .ped-f select { width: 100%; min-width: 0; }
.ped-ctl { display: flex; gap: 4px; } .btn.sm { padding: 5px 9px; font-size: 13px; }
.ped-add { justify-self: start; }
.ped-pick { display: grid; gap: 6px; background: var(--surface-2); border: 1px solid var(--gold-brd); border-radius: 12px; padding: 10px; }
.ped-pick input { background: var(--bg); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 9px 10px; font: inherit; }
.ped-res { display: grid; max-height: 320px; overflow-y: auto; }
.ped-res button { display: grid; gap: 1px; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px; color: var(--fg); } .ped-res button:hover { background: var(--surface-3); } .ped-res small { color: var(--muted); font-size: 12px; font-weight: 400; }
.ped-vers { border-top: 1px solid var(--brd); padding-top: 10px; } .ped-vers summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.ped-vr { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--brd); font-size: 13px; }
.med-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .med-tot { font-family: var(--display); font-size: 24px; font-weight: 400; color: var(--gold-hi); }
.med-o { display: grid; gap: 6px; padding: 6px 0; border-top: 1px solid var(--brd); } .med-oh { display: flex; gap: 8px; align-items: center; } .med-oh input { flex: 1; }
.med-it { display: grid; grid-template-columns: minmax(0, 1fr) 90px 34px minmax(0, 190px) auto; gap: 8px; align-items: end; }
.med-name { min-width: 0; } .med-u { color: var(--muted); padding-bottom: 8px; font-size: 13px; } .med-mac { color: var(--muted); font-size: 12.5px; padding-bottom: 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .ped-ex { grid-template-columns: 1fr 1fr; } .ped-ex .ped-exn, .ped-ex .ped-hist { grid-column: 1 / -1; } .ped-ctl { grid-column: 1 / -1; justify-content: flex-end; }
  .med-it { grid-template-columns: 1fr 90px 34px; } .med-name { grid-column: 1 / -1; } .med-mac { grid-column: 1 / 3; padding: 0; } .med-it .btn.sm { justify-self: end; }
  .ped-h h2 { font-size: 22px; }
}
.tg { margin-bottom: 14px; } .tg-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tg-f { display: grid; gap: 3px; } .tg-f span { font-size: 12px; color: var(--muted); } .tg-f small { font-size: 11.5px; color: var(--muted); min-height: 14px; }
.tg-f input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: 600 16px var(--body); width: 100%; min-width: 0; }
@media (max-width: 760px) { .tg-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Starting a programme, switching on, templates */
.ped-start { display: grid; gap: 10px; }
.ped-opt { display: grid; gap: 6px; text-align: left; background: var(--surface); border: 1px solid var(--brd); border-radius: 14px; padding: 14px; color: var(--fg); }
button.ped-opt:hover { border-color: var(--gold-brd); } .ped-opt small { color: var(--muted); }
.ped-tl { display: flex; flex-wrap: wrap; gap: 6px; } .ped-cp { display: flex; gap: 8px; } .ped-cp select { flex: 1; min-width: 0; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px; font: inherit; }
.ped-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; } .ped-bb { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ped-bb input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 7px 10px; font: inherit; }
.ped-tn { font-size: 20px; margin-top: 2px; }
.tpl-g { display: grid; gap: 10px; } .tpl { display: grid; gap: 10px; }
.tpl-as { display: grid; gap: 8px; border-top: 1px solid var(--brd); padding-top: 10px; }
.tpl-as input#taq { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; }
.tpl-cl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 300px; overflow-y: auto; }
.ls { margin-bottom: 14px; } .ls-r span.num { text-align: right; white-space: nowrap; }
@media (max-width: 760px) { .ls-r span.num { white-space: normal; } }
.cf-q { display: grid; grid-template-columns: minmax(0, 1.6fr) 150px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: end; padding: 8px 0; border-top: 1px solid var(--brd); }
.cf-q:first-child { border-top: 0; }
@media (max-width: 760px) { .cf-q { grid-template-columns: 1fr 1fr; } .cf-q .cf-t { grid-column: 1 / -1; } .cf-q .ped-ctl { grid-column: 1 / -1; justify-content: flex-end; } }
/* Habits in HQ, exercise library */
.hb-ed { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 6px; }
.hb-ed input, .exf input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; min-width: 0; }
.hb-grid { display: grid; grid-template-columns: minmax(110px, 1.5fr) repeat(14, minmax(14px, 1fr)); gap: 5px 4px; align-items: center; overflow-x: auto; }
.hb-grid small { color: var(--muted); font-size: 10.5px; text-align: center; } .hb-n { font-size: 13px; font-weight: 600; }
.hb-grid i { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-3); justify-self: center; } .hb-grid i.on { background: var(--gold); }
.exf { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, .8fr); gap: 10px; }
@media (max-width: 760px) { .exf { grid-template-columns: 1fr; } .hb-grid { grid-template-columns: minmax(90px, 1.5fr) repeat(14, 14px); } }
/* Warm-ups and cool-downs in the programme editor, cardio plan (24 Oct 2026) */
.ped-wu { display: grid; gap: 8px; border-top: 1px dashed var(--brd); padding-top: 10px; }
.ped-wb { display: grid; gap: 6px; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 12px; padding: 10px; }
.ped-wbh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .ped-wbh small { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.ped-wbh input { flex: 1; min-width: 140px; background: var(--surface); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 7px 8px; font: 600 14px var(--body); }
.ped-wi { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: end; padding: 6px 0; border-top: 1px solid var(--brd); }
.ped-wi .ped-f input { background: var(--surface); }
.cx-st { max-width: 260px; margin-top: 6px; } .cx-st input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; }
.cx-ed { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr) auto; }
@media (max-width: 760px) { .ped-wi { grid-template-columns: 1fr 1fr; } .ped-wi .ped-f:first-child, .ped-wi .ped-f:nth-child(3) { grid-column: 1 / -1; } .ped-wi .ped-ctl { grid-column: 1 / -1; justify-content: flex-end; }
  .cx-ed { grid-template-columns: 1fr; } .cx-ed .ped-ctl { justify-content: flex-end; } .cx-st { max-width: none; } }
/* AI generators and meal templates (22 Oct 2026) */
.ai-tools { margin: 0 0 12px; flex-wrap: wrap; }
.ai-tools select, .ai-tools input { min-width: 0; max-width: 260px; }
.ai-note { border: 1px solid var(--gold); background: rgba(201,162,74,.08); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.ai-in .ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.ai-f { display: grid; gap: 4px; }
.ai-f textarea, .ai-f select, .ai-f input { width: 100%; box-sizing: border-box; }
.ai-wait { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 12px; }
.ai-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line, #333); border-top-color: var(--gold); animation: aispin 0.9s linear infinite; }
@keyframes aispin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-spin { animation-duration: 3s; } }
/* Meal editor, easier to read (22 Oct 2026, David: "too hard to read and see each section") */
.ml-day { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--brd); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ml-pname { flex: 1; min-width: 200px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--fg); font: 600 16px var(--body); padding: 6px 8px; }
.ml-pname:hover, .ml-pname:focus, .ml-mname:hover, .ml-mname:focus, .ml-oh input:hover, .ml-oh input:focus, .ml-name:hover, .ml-name:focus { border-color: var(--brd); background: var(--surface-2); outline: none; }
.ml-dt { display: grid; justify-items: end; gap: 2px; }
.ml-dt small { color: var(--muted); font-size: 11.5px; }
.ml-dt b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; color: var(--gold-hi); }
.ml-dt span { display: flex; gap: 6px; } .ml-dt i { font-style: normal; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 99px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.ml-meal { background: var(--surface); border: 1px solid var(--brd); border-radius: 16px; padding: 14px 16px 12px; display: grid; gap: 10px; margin-top: 6px; }
.ml-mh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--brd); }
.ml-badge { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-dim); color: var(--gold-hi); font-weight: 700; font-size: 13px; flex: none; }
.ml-mname { flex: 1; min-width: 140px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--fg); font: 400 24px/1.1 var(--display); letter-spacing: .02em; padding: 4px 8px; }
.ml-mt { font-size: 13px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-ctl { display: flex; gap: 4px; }
.ml-ic { background: transparent; border: 1px solid var(--brd); color: var(--muted); border-radius: 8px; padding: 4px 9px; font: 500 12.5px var(--body); cursor: pointer; }
.ml-ic:hover { color: var(--fg); border-color: var(--muted-2); } .ml-del:hover { color: var(--bad); }
.ml-opt { display: grid; gap: 2px; }
.ml-opt + .ml-opt { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--brd); }
.ml-oh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.ml-olab { font-size: 11.5px; font-weight: 700; color: var(--gold); background: var(--gold-dim); border-radius: 99px; padding: 2px 9px; }
.ml-oh input { flex: 1; min-width: 140px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--fg); font: 600 15px var(--body); padding: 5px 8px; }
.ml-ot { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ml-head, .ml-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px 56px 44px 44px 44px 30px; gap: 8px; align-items: center; }
.ml-head { font-size: 11px; font-weight: 600; color: var(--muted-2); padding: 4px 8px; border-bottom: 1px solid var(--brd); }
.ml-head span:nth-child(n+3) { text-align: right; }
.ml-row { padding: 3px 0 3px 0; border-bottom: 1px solid var(--brd); }
.ml-row:last-of-type { border-bottom: 0; }
.ml-name { min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--fg); font: 500 14.5px var(--body); padding: 7px 8px; }
.ml-amt { display: flex; align-items: center; gap: 5px; }
.ml-amt input { width: 72px; background: var(--surface-2); border: 1px solid var(--brd); border-radius: 8px; color: var(--fg); font: 600 14px var(--body); padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.ml-amt small { color: var(--muted); font-size: 12px; }
.ml-n { text-align: right; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; } .ml-k { color: var(--fg); font-weight: 600; }
.ml-none { grid-column: span 4; font-size: 12px; }
.ml-x { background: transparent; border: 0; color: var(--muted-2); cursor: pointer; font-size: 13px; padding: 4px; border-radius: 6px; } .ml-x:hover { color: var(--bad); background: var(--surface-2); }
.ml-add { justify-self: start; background: transparent; border: 0; color: var(--gold); font: 600 13.5px var(--body); padding: 8px 8px; cursor: pointer; }
.ml-addo { color: var(--muted); font-weight: 500; padding-top: 2px; } .ml-add:hover { color: var(--gold-hi); }
.ml-addm { justify-self: start; margin-top: 4px; }
@media (max-width: 640px) {
  .ml-head { display: none; }
  .ml-row { grid-template-columns: minmax(0, 1fr) auto 30px; grid-template-areas: "n n x" "a m m"; row-gap: 2px; padding: 6px 0; }
  .ml-name { grid-area: n; } .ml-amt { grid-area: a; } .ml-x { grid-area: x; }
  .ml-row .ml-n { display: none; } .ml-row .ml-k { display: block; grid-area: m; text-align: right; } .ml-row .ml-k::after { content: " kcal"; color: var(--muted); font-weight: 400; }
  .ml-mt { order: 5; width: 100%; padding-left: 38px; }
}

/* Day mode (23 Oct 2026, David): the same HQ on a white page. Toggle in the menu (phone: header), remembered per device. */
:root[data-theme="light"] { color-scheme: light;
  --bg: #f3f1ec; --surface: #fbfaf7; --surface-2: #ffffff; --surface-3: #e9e5dd;
  --fg: #141311; --muted: #6b665e; --muted-2: #9a958c;
  --gold: #b8963f; --gold-hi: #8a6d1f; --gold-dim: rgba(184,150,63,.14); --gold-brd: rgba(184,150,63,.45);
  --brd: rgba(0,0,0,.1);
  --ok: #2f8f5b; --warn: #a87516; --bad: #b8433b; --info: #3f6a9e; }
:root[data-theme="light"] img[src*="logo-white"] { filter: invert(1); }
:root[data-theme="light"] .qi blockquote { color: var(--fg); background: var(--surface-2); }
:root[data-theme="light"] .mrow.coach .mb, :root[data-theme="light"] .vn-p { background: rgba(0,0,0,.07); }
:root[data-theme="light"] .mt-row:hover { background: rgba(0,0,0,.04); }
:root[data-theme="light"] .mthread .imb.them { background: #e5e5ea; color: #141311; }
.themebtn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.themebtn:hover { color: var(--fg); }
.themebtn svg { width: 16px; height: 16px; flex: none; }
.ic-sun, .t-night { display: none; }
:root[data-theme="light"] .ic-sun, :root[data-theme="light"] .t-night { display: block; }
:root[data-theme="light"] .ic-moon, :root[data-theme="light"] .t-day { display: none; }
@media (max-width: 760px) { .themebtn { display: none; } }

/* Team (23 Oct 2026): coaches, their clients, handover, activity; coach sign-in and invite set-up. */
.tm-box { border: 1px solid var(--brd); border-radius: 10px; padding: 12px; margin: 4px 0 10px; display: grid; gap: 14px; background: var(--surface); }
.tm-sec h3 { margin: 0 0 4px; font-size: 13px; }
.tm-sec .sub { margin: 0 0 8px; }
.tm-cl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 280px; overflow-y: auto; }
.tm-c { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.tm-inv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.clog { display: grid; gap: 12px; width: min(340px, 100%); }
.clog input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 10px 12px; font: inherit; }
.pin-alt { margin-top: 14px; color: var(--muted); font-size: 13px; background: none; border: 0; }
.app.coachmode { grid-template-columns: minmax(0, 1fr); }
.app.coachmode #main { max-width: 760px; margin: 0 auto; width: 100%; }

/* Review queue (23 Oct 2026): coaches' work waiting for David. */
.wk-i { border: 1px solid var(--brd); border-radius: 10px; padding: 12px; display: grid; gap: 8px; margin-bottom: 10px; background: var(--surface); }
.wk-h { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; } .wk-h .m { margin-left: auto; color: var(--muted); font-size: 12px; }
.wk-t, .wk-n { width: 100%; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; resize: vertical; }
.wk-p { margin: 0; white-space: pre-wrap; }
.wk-note { margin-top: 6px; padding: 8px 10px; border-left: 2px solid var(--gold); background: var(--gold-dim); border-radius: 0 8px 8px 0; font-size: 13px; }
.wk-done summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 6px; }
.wk-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--gold-brd); }
.pb ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; } .pb .sub { margin: 10px 0 0; }
/* The coach's HQ: head coach controls are hidden (the server refuses them anyway). */
.viewing-as .floorbtn, .coach-mode .pushcard, .coach-mode [data-ctab="supps"], .coach-mode [data-ctab="account"], .coach-mode .cmore, .coach-mode [data-cp],
.coach-mode .hfcreate, .coach-mode #sync a[href*="classic"], .coach-mode [data-cstatus], .coach-mode [data-cedit], .coach-mode [data-rvskip] { display: none !important; }
/* Buttons the server refuses for a sub-coach (25 Oct 2026 audit): no dead taps. */
.coach-mode [data-tgsave], .coach-mode #posef .acts, .coach-mode [data-ndel], .coach-mode [data-wrmask], .coach-mode [data-wrm], .coach-mode [data-ptplask],
.coach-mode [data-ptplsave], .coach-mode [data-mtplask], .coach-mode [data-mtplsave], .coach-mode [data-mreset], .coach-mode [data-exdel], .coach-mode [data-vnmic],
.coach-mode [data-hfopen], .coach-mode [data-hfrefresh], .coach-mode .hfc { display: none !important; }
/* View as is read only (25 Oct 2026 audit): every control that would change something is hidden, so nothing looks tappable that isn't. */
.viewing-as .btn.go, .viewing-as button[type="submit"], .viewing-as [data-cyfree], .viewing-as [data-cshare], .viewing-as [data-tkdone], .viewing-as [data-tkdis],
.viewing-as [data-wkwd], .viewing-as [data-tbedit], .viewing-as [data-tgsave], .viewing-as [data-ndel], .viewing-as [data-nedit], .viewing-as [data-wrmask],
.viewing-as [data-vnmic], .viewing-as [data-rvrec], .viewing-as .mx-send, .viewing-as [data-strm], .viewing-as [data-stwd] { display: none !important; }
.viewing-as #vabar .btn { display: inline-flex !important; }
.cme-r { display: flex; gap: 14px; align-items: flex-start; }
.cme-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--surface-3); font: 400 28px var(--display); }
.cme-av img { width: 100%; height: 100%; object-fit: cover; }
.mx-by { align-self: flex-end; font-size: 11.5px; color: var(--muted); margin: 6px 4px -2px; }
.wk-ch { margin: 2px 0 4px; padding-left: 18px; display: grid; gap: 3px; font-size: 13.5px; }
.tm-scw { overflow-x: auto; } .tm-sc { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.tm-sc th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--brd); }
.tm-sc td { padding: 8px; border-bottom: 1px solid var(--brd); font-variant-numeric: tabular-nums; }
.tm-pc summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 8px 0; } .tm-pcr { margin: 4px 0; } .tm-pcr > span { min-width: 140px; }
.tm-stmt { margin-top: 12px; } .tm-stmt h3 { margin: 0 0 6px; font-size: 14px; } .tm-sc tfoot td { border-bottom: 0; }
.tm-big { font-family: var(--display); font-size: 36px; margin: 0 0 6px; }
.tn-add { display: flex; gap: 8px; align-items: flex-end; margin: 8px 0; } .tn-add textarea { flex: 1; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.tn { padding: 8px 0; border-bottom: 1px solid var(--brd); } .tn:last-child { border-bottom: 0; } .tn-h { display: flex; justify-content: space-between; gap: 8px; } .tn-h .m { color: var(--muted); font-size: 12px; } .tn-b { white-space: pre-wrap; font-size: 13.5px; margin-top: 2px; }
.tn-list { max-height: 320px; overflow-y: auto; } .tn-sr { border-top: 1px solid var(--brd); margin-top: 10px; padding-top: 10px; }
.tc-l { max-height: 60vh; overflow-y: auto; }
.tidy summary { cursor: pointer; } .tidy .m { color: var(--muted); font-size: 12px; margin-left: 6px; } .tidy-i { padding: 8px 0; border-top: 1px solid var(--brd); margin-top: 8px; font-size: 13.5px; }
.chbar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; width: 140px; margin-bottom: 3px; } .chbar i { display: block; height: 100%; background: var(--gold); }
.biz-mode #sync a[href*="classic"] { display: none !important; }
/* Your brand (MVMT HQ) */
.br-img { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--brd); } .br-img:first-of-type { border-top: 0; }
.br-prev { width: 120px; height: 56px; flex: none; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; font-size: 12px; color: var(--muted); overflow: hidden; }
.br-prev.sq { width: 56px; } .br-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.br-phone { width: min(300px, 100%); border: 1px solid var(--brd); border-radius: 28px; padding: 22px 18px; background: #fff; color: #111; display: grid; gap: 10px; margin-bottom: 10px; }
.br-logo { max-height: 34px; max-width: 160px; } .br-txt { font: 400 24px var(--display); letter-spacing: .04em; } .br-hi { margin: 0; font: 600 18px var(--body); }
.br-card { background: #f4f3ef; border-radius: 14px; padding: 12px; display: grid; gap: 2px; } .br-card span { font-size: 11px; color: #777; } .br-card i { display: block; height: 5px; border-radius: 5px; background: var(--acc); width: 40%; margin-top: 6px; }
.br-btn { background: var(--acc); color: #111; border-radius: 12px; padding: 11px; text-align: center; font-weight: 700; }
.br-msg { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #555; } .br-msg img, .br-msg > span:first-child { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #111; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--acc); }
.br-msg b { color: #111; }
.pl-p { font: 400 34px var(--display); margin: 4px 0 0; } .pl-p small { font: 500 13px var(--body); color: var(--muted); } .pl-c.on { border-color: var(--gold); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } @media (max-width: 760px) { .g3 { grid-template-columns: minmax(0,1fr); } }
.setup .bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 6px 0 8px; } .setup .bar i { display: block; height: 100%; background: var(--gold); }
/* The KNGMVMT mark sits faintly over every page (24 Oct 2026, David), fixed in place while the page scrolls. It lets every tap through. */
body::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: url(/me/mark-white.svg) no-repeat center 55% / min(70vw, 520px) auto; opacity: .045; }
:root[data-theme="light"] body::after { background-image: url(/me/mark-dark.svg); opacity: .04; }
@media print { body::after { display: none; } }
/* Payment failed tags open the client's billing (24 Oct 2026) */
.paychip { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; } .paychip:hover { text-decoration: underline; }
.floorback { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: block; margin: -6px 0 14px; padding: 12px 16px; background: var(--gold); color: #111; font-weight: 700; text-decoration: none; border-radius: 10px; }

/* Pull to refresh (24 Oct 2026) */
.pullbar { position: fixed; left: 50%; top: env(safe-area-inset-top, 0px); z-index: 90; transform: translate(-50%, -56px); opacity: 0; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--surface, var(--panel)); color: var(--fg, var(--ink)); border: 1px solid var(--gold-brd, var(--gold)); box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 13px; font-weight: 600; pointer-events: none; }
.pullbar svg { width: 18px; height: 18px; color: var(--gold); }
.pullbar.ready { border-color: var(--gold); }
.pullbar.spin svg { animation: pullspin .8s linear infinite; }
@keyframes pullspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pullbar.spin svg { animation: none; } }
.cysup { margin: 10px 0 14px; } .cysup-t { font-size: 14px; line-height: 1.55; margin-top: 8px; white-space: normal; } .cysup summary { cursor: pointer; font-weight: 600; }
.cysup-t h3 { font-size: 15px; margin: 12px 0 4px; } .cysup-t p { margin: 4px 0; } .cysup-t ul { margin: 4px 0; padding-left: 18px; }

/* Home tasks, grouped (24 Oct 2026) */
.panel.tk h2 { display: flex; align-items: center; gap: 8px; }
.tk-c { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--gold-dim); color: var(--gold-hi); font: 600 12px/1 var(--body); }
.tk-g { display: block; border-top: 1px solid var(--brd); }
.panel.tk .tk-g:first-of-type { border-top: 0; }
.tk-g > summary, .tk-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; cursor: pointer; list-style: none; background: none; border: 0; color: var(--fg); font: inherit; text-align: left; }
.tk-g > summary::-webkit-details-marker { display: none; }
.tk-g > summary::after { content: "›"; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
.tk-g[open] > summary::after { transform: rotate(90deg); }
.tk-t { flex: 1; min-width: 0; font-weight: 600; }
.tk-t small, .tk-n small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-go { color: var(--muted); font-size: 20px; line-height: 1; }
.panel.tk:has(> .tk-link:only-child) { padding-block: 4px; }
.tk-l { display: grid; padding-bottom: 8px; }
.tk-r { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--brd); }
.tk-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-n .link { font-weight: 500; }
.tk-d { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tk-d.bad { color: var(--bad); background: rgba(208,88,79,.12); padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.tk-i { flex: none; width: 34px; height: 34px; border-radius: 99px; border: 1px solid var(--brd); background: var(--surface); color: var(--muted); font-size: 15px; cursor: pointer; }
.tk-i.ok { border-color: var(--gold-brd); color: var(--gold); }
.tk-g .btn.sm { margin: 2px 0 12px; }

/* Bottom bar each person sets (24 Oct 2026): up to 5 pages plus Menu, so the columns follow the number of buttons. */
.tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tabbar button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbprev { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 10px 6px; margin-bottom: 14px; border: 1px solid var(--brd); border-radius: 12px; background: var(--surface); }
.tbprev span { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--gold-hi); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbprev span.m { color: var(--muted); }
.tbprev svg { width: 22px; height: 22px; }
.sheet .opts button .tbn { order: 2; min-width: 22px; height: 22px; border-radius: 99px; background: var(--gold); color: #111; font-size: 12px; display: inline-grid; place-items: center; }
.sheet .opts button:disabled { opacity: .45; }

/* Calendar (24 Oct 2026) */
.cal { display: grid; gap: 14px; }
.calbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: space-between; }
.calnav { display: flex; gap: 6px; }
.calnav .btn { min-width: 44px; }
.caltitle { margin: 0; font-size: 18px; flex: 1 1 auto; text-align: center; }
.calseg button[aria-pressed="true"] { background: var(--gold); color: #111; font-weight: 600; }
.callegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.callegend span { display: inline-flex; align-items: center; gap: 6px; }
.callegend i, .calmonth .dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.k-pt { --k: var(--gold); } .k-checkin { --k: var(--info); } .k-skinfolds { --k: var(--ok); } .k-consult { --k: var(--warn); }
.callegend i, .calmonth .dots i { background: var(--k); }
.calweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calday { min-width: 0; display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--brd); border-radius: 10px; }
.calday.today { border-color: var(--gold-brd); background: var(--gold-dim); }
.caldh { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.caldh span { color: var(--muted); }
.caldh em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.calfree { margin: 0; font-size: 12px; color: var(--muted-2); }
.calev { display: grid; grid-template-columns: auto 3px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--brd); border-radius: 8px; padding: 7px 8px; color: inherit; font: inherit; cursor: pointer; }
.calev[data-p]:hover { border-color: var(--gold-brd); }
.calev:not([data-p]) { cursor: default; }
.calev .t { font-size: 12px; color: var(--muted); }
.calev i { align-self: stretch; border-radius: 2px; background: var(--k); }
.calev .w { display: grid; min-width: 0; }
.calev b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calev small { font-size: 11px; color: var(--muted); }
.calev.past { opacity: .55; }
@media (max-width: 1100px) { .calweek { grid-template-columns: 1fr; } .calday { grid-template-columns: 1fr; } .calfree { display: inline; } }
.calwd, .calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calwd span { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.calcell { min-width: 0; min-height: 86px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: left; padding: 6px; background: var(--surface); border: 1px solid var(--brd); border-radius: 8px; color: inherit; font: inherit; cursor: pointer; overflow: hidden; }
.calcell.out { opacity: .4; }
.calcell.today { border-color: var(--gold-brd); background: var(--gold-dim); }
.calcell .n { font-size: 12px; font-weight: 700; }
.calcell .mini { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 2px solid var(--k); padding-left: 4px; }
.calcell .more { font-size: 11px; color: var(--muted); }
.calcell .dots { display: none; gap: 3px; flex-wrap: wrap; }
@media (max-width: 700px) { .calcell { min-height: 52px; align-items: center; } .calcell .mini, .calcell .more { display: none; } .calcell .dots { display: flex; justify-content: center; } .caltitle { order: -1; flex-basis: 100%; text-align: left; } }

/* 3-day time grid (24 Oct 2026): three days across, swipes a day at a time, hours stretch with a pinch. */
.c3tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.c3tools .sub { margin: 0; font-size: 12px; }
.c3 { --gw: 52px; --dw: 110px; position: relative; height: min(70vh, 860px); height: min(calc(100dvh - 300px), 860px); min-height: 360px; overflow: auto; overscroll-behavior: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: var(--gw); border: 1px solid var(--brd); border-radius: 12px; background: var(--bg, var(--surface)); touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.c3in { display: grid; grid-template-columns: var(--gw) repeat(var(--nd), var(--dw)); grid-template-rows: 46px calc(24 * var(--hh)); width: max-content; }
.c3corner { grid-row: 1; position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--brd); }
.c3dh { grid-row: 1; position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--brd); display: grid; justify-items: center; align-content: center; scroll-snap-align: start; }
.c3dh small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.c3dh b { font-size: 17px; line-height: 1.1; }
.c3dh.today b { background: var(--gold); color: #111; border-radius: 99px; min-width: 28px; padding: 1px 6px; text-align: center; }
.c3gut { grid-row: 2; position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--brd); }
.c3gut span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.c3col { grid-row: 2; position: relative; border-right: 1px solid var(--brd); background-image: linear-gradient(to bottom, var(--brd) 1px, transparent 1px); background-size: 100% var(--hh); }
.c3col.today { background-color: var(--gold-dim); }
.c3ev { position: absolute; z-index: 1; margin-left: 2px; display: grid; align-content: start; gap: 1px; overflow: hidden; text-align: left; padding: 3px 5px; border: 0; border-left: 3px solid var(--k); border-radius: 6px;
  background: var(--surface); background: color-mix(in srgb, var(--k) 26%, var(--surface)); color: var(--fg); font: inherit; cursor: pointer; }
.c3ev b { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3ev small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c3ev:not([data-p]) { cursor: default; }
.c3ev.past { opacity: .6; }
.c3now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; }
.c3now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.cal3 .calbar .calnav .btn, .c3tools .btn { min-width: 44px; }
@media (max-width: 700px) {
  .cal3 { padding: 10px; gap: 8px; }
  .cal3 .callegend, .c3tools .sub { display: none; }
  .cal3 .calbar { gap: 8px; }
  .cal3 .caltitle { font-size: 15px; }
  .cal3 .calnav .btn, .c3tools .btn { min-width: 40px; padding-inline: 10px; }
  .c3tools { justify-content: flex-end; margin-top: -48px; pointer-events: none; }
  .c3tools .calnav { pointer-events: auto; }
  .cal3 .calbar .calseg { margin-right: 96px; }
  .c3 { --gw: 44px; }
}
.c3ev { display: block; line-height: 1.25; }
.c3ev b, .c3ev small { display: inline; white-space: normal; }
.c3ev small::before { content: " "; }
/* David, 24 Oct 2026: keep the colour key on the 3-day view, and today's column a faint neutral tint so it no longer
   competes with the gold PT sessions. */
.c3col.today { background-color: rgba(127,127,127,.07); background-color: color-mix(in srgb, var(--fg) 5%, transparent); }
@media (max-width: 700px) { .cal3 .callegend { display: flex; gap: 4px 12px; font-size: 11px; } .c3tools { margin-top: 0; } .cal3 .calbar .calseg { margin-right: 0; } }
.k-consult { --k: #a77bc8; }   /* consults purple, so they can't be mistaken for gold PT */
.c3col.today { background-color: rgba(127,127,127,.035); background-color: color-mix(in srgb, var(--fg) 2.5%, transparent); }

/* Block planner (24 Oct 2026) */
.blknow { margin: 0; font-size: 16px; }
.blkstrip { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.blkc { height: 12px; border-radius: 2px; background: var(--brd); }
.blkc.st { background: rgba(127,127,127,.18); }
.blkc.past { background: var(--gold-brd); }
.blkc.dl { outline: 1px dashed var(--muted-2); outline-offset: -1px; }
.blkc.cur { background: var(--gold); outline: 2px solid var(--gold-hi); outline-offset: 1px; }
.blklabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 11px; color: var(--muted); margin-top: 4px; }
.blkform { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; align-items: end; }
.blkform .acts { grid-column: 1 / -1; }

/* View as a coach (24 Oct 2026) */
.vabar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--gold); color: #111; font-size: 14px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); box-shadow: 0 -2px 10px rgba(0,0,0,.25); }
.viewing-as body { padding-bottom: 56px; }
.vabar .btn { background: #111; color: var(--gold); border-color: #111; }
.tkform { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.tkform textarea { width: 100%; }
@media (max-width: 760px) { .vabar { bottom: calc(62px + env(safe-area-inset-bottom, 0px)); padding-bottom: 8px; box-shadow: none; } .viewing-as main { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } }
.pkown { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--brd); }

/* Booking hours as a week (24 Oct 2026) */
.hw { display: grid; gap: 10px; }
.hwgrid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 4px; height: min(60vh, 520px); min-height: 320px; padding-top: 22px; position: relative; }
.hwgut { position: relative; }
.hwgut span { position: absolute; right: 4px; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); }
.hwday { display: grid; grid-template-rows: auto 1fr; margin-top: -22px; min-width: 0; }
.hwday b { font-size: 12px; text-align: center; height: 22px; }
.hwcol { position: relative; border: 1px solid var(--brd); border-radius: 6px; background-image: linear-gradient(to bottom, var(--brd) 1px, transparent 1px); background-size: 100% calc(100% / var(--rows)); }
.hwblk { position: absolute; left: 3px; right: 3px; border-radius: 4px; background: var(--k); opacity: .55; }
.hwblk.r { left: 50%; }
.hwcol em { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-style: normal; color: var(--muted-2); }
/* Editor safety (24 Oct 2026) */
.ed-restore { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--gold-brd); background: var(--gold-dim); border-radius: 10px; font-size: 14px; }

/* Sub-coaches never see buttons only the head coach can use (24 Oct 2026 audit: they showed and then failed). */
.coach-mode [data-cedit], .coach-mode [data-cfedit], .coach-mode [data-chide], .coach-mode [data-cnote], .coach-mode [data-ppsave], .coach-mode [data-hnsave],
.coach-mode [data-wbp], .coach-mode [data-aiopen], .coach-mode [data-aigo], .coach-mode [data-pstart], .coach-mode [data-pstatus], .coach-mode [data-pvrestore],
.coach-mode [data-cstatus], .coach-mode [data-csync], .coach-mode [data-crefresh], .coach-mode [data-hfcreate] { display: none !important; }
/* No more HubFit profiles: clients start in the app (24 Oct 2026). */
.panel.hfc { display: none !important; }
/* Sheets never pan sideways on a phone (25 Oct 2026, David's iPhone screenshot of a client sheet): long emails and handles
   wrap inside their chip, grids shrink, and the sheet itself only scrolls up and down. */
html { overflow-x: hidden; } @supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.drawer, .sheet { overflow-x: hidden; touch-action: pan-y; overscroll-behavior-x: none; }
.drawer > *, .sheet > * { min-width: 0; max-width: 100%; }
.drawer .chip, .sheet .chip { white-space: normal; overflow-wrap: anywhere; max-width: 100%; min-width: 0; }
.drawer h1, .drawer .te .what, .drawer .ans span, .drawer .ans b { overflow-wrap: anywhere; }
.drawer .facts > div, .drawer .hf-grid > div, .drawer .hf-box { min-width: 0; }
.drawer .facts .v { overflow-wrap: anywhere; }
.drawer .hf-head { flex-wrap: wrap; min-width: 0; }
.drawer .tl, .drawer .te { min-width: 0; }
/* Bookings: cards on a phone, the table on a wider screen (25 Oct 2026 audit). */
.bk-cards { display: none; }
@media (max-width: 760px) { .bk-table { display: none; } .bk-cards { display: grid; gap: 10px; margin-bottom: 14px; }
  .bk-c { padding: 12px 14px; display: grid; gap: 4px; min-width: 0; } .bk-c.past { opacity: .7; }
  .bk-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; } .bk-w { overflow-wrap: anywhere; }
  .bk-c .acts { margin-top: 6px; } }
/* Swap picker on the exercise library (25 Oct 2026 audit). */
.exsw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .exswc { font-size: 12px; padding: 4px 6px 4px 10px; } .exswc .link { padding: 0 4px; color: var(--muted); }
/* Coaches' work: saved again since the coach wrote it (25 Oct 2026 audit). */
.wk-stale { margin: 6px 0; padding: 8px 10px; border: 1px solid rgba(217,164,65,.45); background: rgba(217,164,65,.08); border-radius: 8px; font-size: 13px; }
/* Mac mini warning on Home (25 Oct 2026, j3/h10): one quiet line. */
.macwarn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px solid rgba(217,164,65,.45); background: rgba(217,164,65,.07); border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.macwarn b { color: var(--warn); }
.acctseg { max-width: 320px; }

/* The Calendar as the booking tool (25 Oct 2026): availability shading, booking sheets, availability and set times. */
.calpane { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.calpane .seg button { min-height: 36px; }
.caldh .calbk { margin-left: 6px; padding: 2px 8px; font-size: 11px; min-height: 28px; }
.c3col { cursor: copy; }
.c3av, .c3blk, .c3busy { position: absolute; left: 0; right: 0; pointer-events: none; display: block; }
.c3av { background: rgba(201,168,76,.07); border-left: 2px solid var(--gold-brd); }
.c3blk { z-index: 1; background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 6px, transparent 6px 12px); border-left: 2px solid var(--muted-2); }
.c3busy { background: rgba(255,255,255,.05); border-left: 2px solid var(--muted-2); }
.bksheet h3 { margin: 0 0 4px; font-size: 16px; }
.bkf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.bkf .seg, .bkf .acts { grid-column: 1 / -1; }
.bkf .ef:first-child { grid-column: 1 / -1; }
.bkrules { margin-top: 12px; padding: 12px; border: 1px solid var(--gold-brd); border-radius: 10px; background: var(--gold-dim); font-size: 14px; }
.bkrules ul { margin: 6px 0 8px; padding-left: 18px; }
.bkrules li + li { margin-top: 4px; }
.bkrules li { overflow-wrap: anywhere; }
.stprev li.skip { color: var(--muted); }
.bkerr { color: var(--bad, #d9534f); margin: 8px 0 0; overflow-wrap: anywhere; }
.bkdone { margin-top: 12px; display: grid; gap: 10px; }
.bkdone p { margin: 0; overflow-wrap: anywhere; }
.bktell { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--brd); }
.bkinv { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.av .avpick { max-width: 320px; }
.avtype { margin-top: 14px; }
.avtype h3 { margin: 0 0 6px; font-size: 14px; }
.avdays, .avadd { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.avadd { margin-top: 12px; }
.avadd .acts, .avtype .acts { grid-column: 1 / -1; }
.avdays input, .avadd input, .avadd select { min-width: 0; width: 100%; }
.panel.stp { grid-column: 1 / -1; }
.stgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stgrid > .ef:nth-child(2) { grid-column: 1 / -1; }
.strow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; margin-bottom: 6px; }
.strow select, .strow input { background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; min-width: 0; }
.stchg { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .bkf, .avdays, .avadd, .stgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bkf .ef input, .bkf .ef select, .stgrid .ef input, .stgrid .ef select, .av .ef select { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 480px) { .avdays.avhrs { grid-template-columns: minmax(0, 1fr); } }

/* Needs you: people already messaged in the last 3 days (25 Oct 2026) */
.ny-wait { margin-top: 10px; border-top: 1px solid var(--brd); padding-top: 8px; }
.ny-wait summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.ny-wait .ny-r { opacity: .75; }

/* Meal editor: their target and the numbers check (25 Oct 2026) */
.ml-tgt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 4px; font-size: 13px; }
.ml-chk { display: grid; gap: 6px; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--warn, #c98a1b); border-radius: 10px; }
.ml-chk-r { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ml-chk-r small { display: block; color: var(--muted, #777); }
.ml-chk-r > span { min-width: 0; flex: 1 1 220px; }

/* A recorded review, played back before sending (25 Oct 2026) */
.rvvoice { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--brd); border-radius: 12px; background: var(--surface-2); }
.rvvoice audio { width: 100%; height: 40px; }

/* Coach notes (25 Oct 2026) */
.cn { display: grid; gap: 8px; } .cn.read { opacity: .7; }
.cn-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.cn-sum { white-space: pre-line; font-size: 15px; line-height: 1.5; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.cn-hl { margin: 0; font-weight: 600; font-size: 15px; }
.cn-tr { white-space: pre-line; font-size: 14px; line-height: 1.5; color: var(--fg); margin: 8px 0 0; }
.cn audio, .cvn audio { width: 100%; height: 40px; }
.cn-v { display: grid; gap: 4px; }
.cn-t { margin: 18px 0 8px; }
.cvn .ef { display: grid; gap: 4px; margin-top: 6px; }

/* Live review (25 Oct 2026): one topic per tab, readable on a shared screen; present mode for live calls. */
.rvleft { min-width: 0; display: grid; gap: 14px; align-content: start; }
.rvtabs { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0 8px; border-bottom: 1px solid var(--brd); scrollbar-width: none; }
.rvtabs::-webkit-scrollbar { display: none; }
.rvtabs button { flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--brd); background: var(--surface); color: var(--fg); font: 600 14px var(--font, inherit); cursor: pointer; }
.rvtabs button.on { background: var(--gold); color: #111; border-color: var(--gold); }
.rvbody { display: grid; gap: 14px; }
.rvks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rvk { display: grid; gap: 2px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--brd); background: var(--surface); color: var(--fg); cursor: pointer; font: inherit; }
.rvk:hover { border-color: var(--gold); } .rvk .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; } .rvk b { font-size: 26px; }
.rvtr { display: grid; gap: 6px; }
.rvtr-r { display: grid; grid-template-columns: minmax(120px, 1fr) auto 80px; gap: 10px; align-items: center; }
.rvtr-v { display: flex; gap: 4px; } .rvtr-v i { font-style: normal; min-width: 28px; text-align: center; padding: 3px 0; border-radius: 6px; background: var(--surface-2); font-size: 13px; } .rvtr-v i.now { background: var(--gold); color: #111; font-weight: 700; }
.rvans { display: grid; gap: 12px; } .rvans-r b { display: block; font-size: 13px; color: var(--muted); } .rvans-r p { margin: 2px 0; font-size: 16px; line-height: 1.5; }
.rvph-c { display: grid; gap: 10px; }
.rvph-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; } .rvph-row .ef { display: grid; gap: 4px; } .rvph-vs { padding-bottom: 10px; color: var(--muted); } .rvph-m { margin-left: auto; }
.rvph-v { padding: 10px; }
.rvph-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .rvph-two figure { margin: 0; display: grid; gap: 6px; }
.rvph-two img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; } .rvph-two figcaption { text-align: center; font-weight: 600; }
.rvph-none { display: grid; place-items: center; min-height: 240px; border: 1px dashed var(--brd); border-radius: 12px; color: var(--muted); }
.rvph-all { display: grid; gap: 16px; } .rvph-pair > b { display: block; margin-bottom: 6px; }
.rvsl { position: relative; max-width: 560px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #000; user-select: none; }
.rvsl > img, .rvsl-top img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; }
.rvsl-top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.rvsl-top img { height: 100%; }
.rvsl-h { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1px; background: var(--gold); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.rvsl-h::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #111; display: grid; place-items: center; font-weight: 700; }
.rvsl input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.rvsl-l, .rvsl-r { position: absolute; top: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; }
.rvsl-l { left: 10px; } .rvsl-r { right: 10px; }
.rvph-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.rvph-strip button { flex: none; width: 96px; display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: var(--surface-2); color: var(--fg); font: 600 11px var(--font, inherit); cursor: pointer; }
.rvph-strip button.a { border-color: var(--muted); } .rvph-strip button.b { border-color: var(--gold); }
.rvph-strip img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; background: #000; }
.rvsess { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.rvses { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--brd); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.rvses.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); } .rvses.off { opacity: .55; cursor: default; }
.rvt { width: 100%; border-collapse: collapse; font-size: 14px; } .rvt th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--brd); }
.rvt td { padding: 8px; border-bottom: 1px solid var(--brd); vertical-align: top; } .rvt td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rvfolds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.rvfold { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--brd); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.rvfold.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); } .rvfold .num { font-size: 20px; font-weight: 700; }
html.rv-present .rail, html.rv-present .tabbar, html.rv-present #tabbar, html.rv-present .rvreply, html.rv-present [data-rvback] { display: none !important; }
html.rv-present .app { grid-template-columns: minmax(0, 1fr); }
html.rv-present .rvgrid { grid-template-columns: minmax(0, 1fr); }
html.rv-present main { font-size: 17px; max-width: 1280px; margin: 0 auto; }
html.rv-present .rvtabs button { font-size: 16px; min-height: 46px; padding: 10px 20px; }
html.rv-present .rvans-r p { font-size: 19px; } html.rv-present .rvt { font-size: 16px; }
@media (max-width: 700px) { .rvph-two { grid-template-columns: 1fr 1fr; gap: 6px; } .rvtr-r { grid-template-columns: 1fr auto; } .rvtr-r .m { display: none; } .rvph-m { margin-left: 0; } }
.rvhead-x { flex-wrap: wrap; } html.rv-present .rvhead-x { display: none !important; }
.rvph-all .rvph-two img { max-height: 52vh; }
.rvv-ck { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 14px; cursor: pointer; } .rvv-ck input { width: 18px; height: 18px; margin: 2px 0 0; }

/* Week brief (25 Oct 2026 redesign): headline first, each point a short card, wins and the reply focus side by side. */
.wbx { display: grid; gap: 14px; border-color: rgba(201,168,76,.45); }
.wbx-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wbx-top h2 { margin: 0; } .wbx-h { margin: 6px 0 0; font-size: 19px; font-weight: 600; line-height: 1.35; max-width: 62ch; text-wrap: balance; }
.wbx-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.wbx-pts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.wbx-pt { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--brd); }
.wbx-pt b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.wbx-pt p { margin: 0; line-height: 1.5; font-size: 14px; }
.wbx-bot { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.wbx-wins, .wbx-focus { padding: 12px 14px; border-radius: 12px; }
.wbx-wins { background: rgba(46,160,67,.08); border: 1px solid rgba(46,160,67,.3); }
.wbx-wins b, .wbx-focus b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.wbx-wins b { color: #2e8b47; } .wbx-wins ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; line-height: 1.45; font-size: 14px; }
.wbx-focus { background: var(--gold-dim, rgba(201,168,76,.12)); border: 1px solid rgba(201,168,76,.5); } .wbx-focus b { color: #9a7b22; } .wbx-focus p { margin: 0; line-height: 1.5; font-size: 15px; font-weight: 500; }
.wbx-note { margin: 0; font-size: 12px; }
html.rv-present .wbx-h { font-size: 24px; } html.rv-present .wbx-pt p, html.rv-present .wbx-wins ul { font-size: 16px; }
/* Meal plan inside the review */
.rvmp { display: grid; gap: 14px; } .rvmp .hf-head { margin: 0; }
.rvmp-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--brd); margin-bottom: 8px; }
.rvmp-meals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rvmp-m { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--brd); background: var(--surface); }
.rvmp-mh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.rvmp-m ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; } .rvmp-m li { display: flex; justify-content: space-between; gap: 8px; }
/* Line up body on the photo slider */
.rvsl-top img { transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--sc, 1)); transform-origin: center; }
.rvsl.al { cursor: grab; touch-action: none; outline: 2px dashed var(--gold); outline-offset: 3px; } .rvsl.al:active { cursor: grabbing; }
.rvsl.al input[data-rvsl] { pointer-events: none; }
.rvsl.gh .rvsl-top img { opacity: .5; } .rvsl.gh .rvsl-h { display: none; }
.rval { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.rval-z { display: flex; align-items: center; gap: 6px; font-size: 13px; } .rval-z input { width: 140px; accent-color: var(--gold); }
/* Review recorder (25 Oct 2026) */
.rvrec-live { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 2px solid #d92d20; background: rgba(217,45,32,.06); }
.rvrec-live.paused { border-color: var(--gold); background: var(--gold-dim, rgba(201,168,76,.12)); }
.rvrec-top { display: flex; align-items: center; gap: 10px; font-size: 16px; } .rvrec-top .num { font-size: 22px; font-variant-numeric: tabular-nums; }
.rvrec-live .vn-dot { width: 12px; height: 12px; border-radius: 50%; background: #d92d20; animation: rvblink 1s infinite; flex: none; display: inline-block; }
.rvrec-live.paused .vn-dot { background: var(--gold); animation: none; }
@keyframes rvblink { 50% { opacity: .25; } } @media (prefers-reduced-motion: reduce) { .rvrec-live .vn-dot { animation: none; } }
.rvmeter { flex: 1; height: 10px; border-radius: 99px; background: var(--surface-2, #e8e5de); overflow: hidden; min-width: 60px; } .rvmeter i { display: block; height: 100%; width: 0; background: #2e8b47; transition: width .08s linear; }
.rvrec-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .rvrec-btns .btn { padding-inline: 6px; }
.rvrec-fin { width: 100%; min-height: 44px; font-size: 15px; }
.rvpill { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; border: 0; background: #d92d20; color: #fff; font: 600 14px var(--font, inherit); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.rvpill .vn-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; display: inline-block; }
.rvpill { gap: 10px; padding: 8px 8px 8px 16px; cursor: default; }
.rvpill button { border: 0; border-radius: 99px; padding: 7px 12px; background: rgba(255,255,255,.2); color: #fff; font: 600 13px var(--font, inherit); cursor: pointer; }
.rvpill button:hover { background: rgba(255,255,255,.32); }
/* App invites */
.aibar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; } .aibar .seg { margin-right: auto; }
.aiprev { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; }
.aiprev-in { width: min(720px, 100%); height: min(92vh, 1100px); background: var(--bg); border-radius: 14px; padding: 16px; display: grid; grid-template-rows: auto auto 1fr; gap: 8px; }
.aiprev iframe { width: 100%; height: 100%; border: 1px solid var(--brd); border-radius: 10px; background: #f2f1ee; }
/* iPhone home-screen app: paint the strip under the clock and battery so the page doesn't scroll behind it (25 Oct 2026) */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 70; pointer-events: none; }
.myph { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; } .myph img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
/* Your brand (25 Oct 2026) */
.brg { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.brc { display: grid; gap: 14px; min-width: 0; }
.brv { position: sticky; top: 16px; } .brv-in { display: grid; justify-items: center; }
@media (max-width: 1000px) { .brg { grid-template-columns: minmax(0, 1fr); } .brv { position: static; order: -1; } }
.br-pre { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.br-pre button { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--brd); border-radius: 12px; background: var(--surface); color: var(--fg); font: 600 12px var(--font, inherit); cursor: pointer; text-align: left; }
.br-pre button:hover { border-color: var(--gold); }
.br-pre button > span { display: flex; gap: 4px; align-items: flex-end; height: 40px; padding: 6px; border-radius: 8px; border: 4px solid; }
.br-pre i { width: 18px; height: 18px; border-radius: 50%; display: block; }
.br-col { display: grid; grid-template-columns: 44px minmax(0, 1fr) 96px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--brd); }
.br-col:last-of-type { border-bottom: 0; } .br-col input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--brd); border-radius: 10px; background: none; cursor: pointer; }
.br-col small, .br-f small { display: block; color: var(--muted); font-size: 12px; } .br-hex { font-family: ui-monospace, Menlo, monospace; font-size: 13px; text-transform: lowercase; }
.br-f { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: center; padding: 8px 0; } @media (max-width: 600px) { .br-f { grid-template-columns: 1fr; } .br-col { grid-template-columns: 44px minmax(0, 1fr); } .br-hex { grid-column: 2; } }
.br-warn { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(217,45,32,.08); border: 1px solid rgba(217,45,32,.35); font-size: 13px; } .br-warn p { margin: 2px 0; }
.br-save { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); }
/* The phone preview: the client app's look from the chosen tokens */
.brp { width: 340px; max-width: 100%; height: 640px; border-radius: 36px; border: 10px solid #111; background: var(--bg); color: var(--tx); font-family: var(--bf); padding: 18px 14px 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.18); position: relative; }
.brp-top { display: flex; justify-content: space-between; align-items: center; } .brp-top img { height: 22px; max-width: 150px; object-fit: contain; } .brp-top b { font-family: var(--hf); font-size: 20px; }
.brp-ic { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--tx); display: grid; place-items: center; font-size: 13px; }
.brp-h { font-family: var(--hf); font-weight: 800; font-size: 44px; line-height: .95; margin-top: 6px; } .brp-s { color: var(--sf); font-size: 14px; margin-top: -6px; }
.brp-al { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 12px 14px; border-radius: var(--r); background: var(--tx); color: var(--bg); font-size: 13px; } .brp-al span { grid-column: 1; opacity: .75; } .brp-al i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: var(--a); font-weight: 700; }
.brp-bar { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--ln); font-size: 13px; } .brp-n { font-weight: 700; color: var(--a); } .brp-bar div { grid-column: 1 / -1; height: 6px; border-radius: 9px; background: var(--ln); } .brp-bar div i { display: block; height: 100%; border-radius: 9px; background: var(--a); }
.brp-card { padding: 14px; border-radius: var(--r); background: var(--cd); display: grid; gap: 4px; } .brp-card small { color: var(--sf); } .brp-ct { font-family: var(--hf); font-weight: 800; font-size: 28px; line-height: 1; } .brp-cs { color: var(--sf); font-size: 13px; }
.brp-btn { margin-top: 8px; padding: 12px; text-align: center; border-radius: var(--r); background: var(--a); color: var(--on); font-weight: 700; font-size: 14px; }
.brp-msg { display: flex; gap: 8px; align-items: flex-end; } .brp-msg img, .brp-msg > span { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; background: var(--aw); display: grid; place-items: center; font-weight: 700; }
.brp-msg p { margin: 0; padding: 10px 12px; border-radius: calc(var(--r) + 2px); background: var(--cd); font-size: 13px; line-height: 1.4; }
.brp-tabs { margin-top: auto; display: flex; justify-content: space-around; border-top: 1px solid var(--ln); padding: 10px 0 14px; font-size: 11px; color: var(--sf); } .brp-tabs .on { color: var(--tx); font-weight: 700; }
/* App layout (25 Oct 2026) */
.al-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--brd); }
.al-row:last-child { border-bottom: 0; } .al-ud { display: flex; gap: 4px; } .al-name { max-width: 180px; } .al-lbl { min-width: 0; }
.al-on { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; } .al-on input { width: 18px; height: 18px; }
.al-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
@media (max-width: 600px) { .al-row { grid-template-columns: auto minmax(0, 1fr) auto; } .al-row > .m { display: none; } }
.alp { width: 300px; height: 600px; border-radius: 34px; border: 10px solid #111; background: #fff; color: #111; padding: 18px 12px 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.alp-h { font: 800 30px var(--display, Impact); margin-bottom: 4px; }
.alp-s { padding: 10px 12px; border-radius: 10px; background: #f2f2ee; font-size: 12px; font-weight: 600; color: #333; }
.alp-alerts { background: #111; color: #fff; } .alp-badges { background: #fff; border: 1px solid #e4e4df; } .alp-renewal { border: 1px dashed #c9a84c; background: #fffaf0; }
.alp-tabs { margin-top: auto; display: flex; justify-content: space-around; border-top: 1px solid #e4e4df; padding: 10px 0 14px; font-size: 11px; color: #777; } .alp-tabs .on { color: #111; font-weight: 700; }
.rail-name { font: 700 20px/1.1 var(--display, inherit); letter-spacing: .02em; color: var(--fg); display: block; max-width: 180px; }
.pin-name { display: block; font: 700 26px/1.1 var(--display, inherit); color: #fff; text-align: center; margin: 0 auto 6px; }
/* Browse the exercise library (26 Oct 2026) */
.exb-f{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}.exb-f input{flex:1 1 220px;min-width:0}.exb-f select{flex:0 1 auto}
.exb-r{border-top:1px solid var(--brd)}.exb-h{display:flex;gap:12px;align-items:center;width:100%;padding:8px 2px;background:none;border:0;color:inherit;text-align:left;cursor:pointer;font:inherit}
.exb-h img,.exb-ni{width:72px;height:48px;object-fit:cover;border-radius:6px;background:var(--brd);flex:none}.exb-h span{display:flex;flex-direction:column;min-width:0}
.exb-h:hover b{text-decoration:underline}.exb-d{padding:4px 2px 14px}.exb-ph{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:560px}.exb-ph img{width:100%;aspect-ratio:3/2;object-fit:contain;border-radius:8px;background:var(--brd)}
.exb-st{margin:10px 0 6px;padding-left:20px;max-width:68ch;line-height:1.5}.exb-st li{margin:3px 0}

/* A queued programme change (26 Oct 2026): shown at the top of the editor */
.ped-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 14%, transparent); border: 1px solid var(--gold); font-size: 14px; }

/* Check-in review: this week's and next week's RPE (26 Oct 2026) */
.rvrpe-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.rvrpe-g > div { display: grid; gap: 3px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.rvrpe-g > div + div { border: 1px solid var(--gold); }
.rvrpe-g b { font-size: 22px; } .rvrpe-g .l { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .rvrpe-g { grid-template-columns: 1fr; } }
/* Another business's HQ (29 Oct 2026): no K watermark behind the pages. */
.biz-mode body::after { content: none !important; }

/* Live demo (29 Oct 2026): David's HQ opens the demo business in a new tab; that tab shows End demo instead. */
.coach-mode [data-demo], .biz-mode [data-demo], .demo-tab [data-demo], .support-tab [data-demo] { display: none !important; }
/* Open a business (1 Nov 2026): the support banner uses the View as bar (.vabar) */
.support-tab body { padding-bottom: 56px; }
.support-tab .pushcard { display: none !important; }   /* never subscribe David's device to their notifications */
@media (max-width: 760px) { .support-tab main { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } }
[data-demoend] { display: none !important; }
.demo-tab .floorbtn[data-demoend] { display: flex !important; }
@media (max-width: 760px) { .demo-tab .rail .floorbtn[data-demoend] { display: none !important; } .demo-tab .msearch[data-demoend] { display: inline-flex !important; } }

/* Sales tracker (29 Oct 2026) */
.sl-tw { overflow-x: auto; margin-top: 10px; }
table.sl { min-width: 640px; border-collapse: collapse; }
table.sl th[scope=row] { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: 500; white-space: nowrap; padding-right: 12px; z-index: 1; }
table.sl thead th small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
table.sl td { padding: 3px 4px; }
table.sl .sl-calc th, table.sl .sl-calc td { color: var(--muted); font-style: italic; }
table.sl .sl-m { font-weight: 600; }
.sl-in { width: 84px; text-align: right; font-variant-numeric: tabular-nums; padding: 5px 7px; }
.sl-in.ov { box-shadow: inset 3px 0 0 var(--gold); }

/* Automations (29 Oct 2026) */
.au-f textarea { font: inherit; width: 100%; background: var(--surface-2); color: var(--fg); border: 1px solid var(--brd); border-radius: 8px; padding: 10px; line-height: 1.5; }
.au-r + .au-r { margin-top: 12px; }

/* Seamless redraws (29 Oct 2026): the page stays while its new version loads */
#main.hq-refresh { opacity: .72; transition: opacity .12s ease .08s; }
#main { transition: opacity .12s ease; }

/* Client view beside the client file (29 Oct 2026): a third column on wide screens */
@media (min-width: 1280px) {
  body.cvdock-on .app { grid-template-columns: 220px minmax(0,1fr) 400px; }
  .cvdock { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-left: 1px solid var(--brd); background: var(--surface); min-width: 0; }
  .cvdock-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--brd); font-weight: 600; }
  .cvdock-ph { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 14px; overflow: hidden; }
  .cvdock-ph iframe { width: 372px; height: 100%; max-height: 820px; border: 1px solid var(--brd); border-radius: 28px; background: var(--bg); }
  .cvshow { position: fixed; right: 18px; bottom: 18px; z-index: 40; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--gold-brd); background: var(--surface-2); color: var(--gold-hi); font-weight: 600; cursor: pointer; }
}

/* Settings > Onboarding flow (30 Oct 2026): the client's journey as numbered steps on a rail */
.obf{list-style:none;margin:0 0 16px;padding:0;display:grid;gap:0}
.obf-s{display:grid;grid-template-columns:34px 1fr;gap:12px;position:relative;padding-bottom:16px}
.obf-s:not(:last-child)::before{content:"";position:absolute;left:16px;top:34px;bottom:0;width:2px;background:var(--gold-brd)}
.obf-n{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--gold);color:var(--gold-hi);font-weight:700;background:var(--bg)}
.obf-b{min-width:0;padding-top:5px}
.obf-b .au-r{margin:0}
.ob-prev{border:1px solid var(--gold-brd);border-radius:10px;padding:12px 14px;font-size:14px;line-height:1.55;background:var(--surface-2)}
