:root {
  /* Ground: warmer and deeper than a flat neutral, so surfaces read as paper
     stacked on a table rather than boxes on black. */
  --bg: #08090c;
  --bg-tint: #0c0e13;
  --surface: #121620;
  --surface-2: #171c28;
  --surface-3: #212838;
  --line: #2a3243;
  --line-soft: #1b2130;
  --text: #eef1f6;
  --text-dim: #96a0b3;
  --text-faint: #667084;

  --accent: #4ade80;
  --accent-ink: #04170c;
  --accent-dim: #22c55e;
  --warn: #fbbf24;
  --danger: #fb7185;
  --star: #fbbf24;

  /* Sport identity */
  --swim: #38bdf8;
  --bike: #fb923c;
  --run: #f87171;
  --tri: #a78bfa;
  --strength: #34d399;

  /* ---- Training intensity scale -------------------------------------------
     The one piece of colour in this app that carries meaning rather than
     decoration. Cool at the easy end, hot at the hard end, so a week reads as
     a shape before a single word is parsed: two blues, an amber and a red is
     "2 endurance, 1 threshold, 1 intervals" at a glance. */
  --t-recovery:  #64748b;
  --t-endurance: #38bdf8;
  --t-long:      #6366f1;
  --t-threshold: #f59e0b;
  --t-intervals: #ef4444;
  --t-strength:  #34d399;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 32px rgba(0,0,0,.32);
  --shadow-lift: 0 2px 6px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.42);
  --maxw: 1240px;

  /* Type scale — one ratio, used everywhere. */
  --fs-display: 34px;
  --fs-h1: 26px;
  --fs-h2: 16px;
  --fs-body: 14.5px;
  --fs-sm: 12.5px;
  --fs-xs: 11px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-tint) 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ header */
header.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.03em; font-size: 17px; }
.brand .mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: linear-gradient(150deg, var(--accent), #22d3ee);
  position: relative;
}
.brand .mark::after {
  content: ''; position: absolute; inset: 7px 5px auto 5px; height: 2px;
  background: var(--accent-ink); border-radius: 2px;
  box-shadow: 0 5px 0 var(--accent-ink);
}
nav.main { display: flex; gap: 4px; margin-left: 6px; }
nav.main a {
  padding: 7px 12px; border-radius: 8px; color: var(--text-dim); font-weight: 550; font-size: 14px;
}
nav.main a:hover { color: var(--text); background: var(--surface-2); }
nav.main a.on { color: var(--text); background: var(--surface-2); }
.top .spacer { flex: 1; }

.searchbar {
  display: flex; align-items: center; gap: 8px; flex: 1; max-width: 420px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; height: 38px;
}
.searchbar:focus-within { border-color: color-mix(in srgb, var(--text) 28%, var(--bg)); }
.searchbar input {
  flex: 1; background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.searchbar svg { flex: none; color: var(--text-faint); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 14px;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: none; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* -------------------------------------------------------------------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--text-dim); border: 1px solid transparent;
  white-space: nowrap;
}
.chip.sport { text-transform: capitalize; }
.chip.swim { background: color-mix(in srgb, var(--swim) 16%, transparent); color: var(--swim); }
.chip.bike { background: color-mix(in srgb, var(--bike) 16%, transparent); color: var(--bike); }
.chip.run { background: color-mix(in srgb, var(--run) 16%, transparent); color: var(--run); }
.chip.tri { background: color-mix(in srgb, var(--tri) 16%, transparent); color: var(--tri); }
.chip.strength { background: color-mix(in srgb, var(--strength) 16%, transparent); color: var(--strength); }
.chip.ok { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.chip.verified { color: var(--swim); background: color-mix(in srgb, var(--swim) 13%, transparent); }

/* ------------------------------------------------------------------ layout */
.page { padding-top: 26px; padding-bottom: 90px; }
.pagehead { margin-bottom: 20px; }
.pagehead h1 { font-size: 27px; }
.pagehead p { color: var(--text-dim); margin: 7px 0 0; font-size: 15px; max-width: 62ch; }

.browse { display: grid; grid-template-columns: 232px 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .browse { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ filters */
.filters {
  position: sticky; top: 76px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 4px 14px 14px;
}
@media (max-width: 900px) { .filters { position: static; } }
.fgroup { padding: 14px 0 4px; border-bottom: 1px solid var(--line-soft); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-faint); margin-bottom: 9px; font-weight: 700;
}
.fopt {
  display: flex; align-items: center; gap: 9px; padding: 5px 0;
  color: var(--text-dim); font-size: 13.5px; cursor: pointer; user-select: none;
}
.fopt:hover { color: var(--text); }
.fopt input { accent-color: var(--accent); width: 15px; height: 15px; flex: none; cursor: pointer; }
.fopt .n { margin-left: auto; color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.fopt.on { color: var(--text); font-weight: 550; }
.frange { width: 100%; accent-color: var(--accent); margin: 6px 0 2px; }
.frange-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }

.results-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.results-head .count { color: var(--text-dim); font-size: 14px; }
.results-head .count b { color: var(--text); }
select.sort {
  margin-left: auto; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 13.5px; outline: none;
}

/* --------------------------------------------------------------- coach card */
.grid { display: grid; gap: 14px; }
.grid.coaches { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.programs { grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .14s, transform .14s;
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }

.coach-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.coach-top { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #06090c;
  letter-spacing: -.02em;
}
.avatar.lg { width: 88px; height: 88px; font-size: 30px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.coach-id { min-width: 0; flex: 1; }
.coach-id .nm { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 15.5px; }
.coach-id .loc { color: var(--text-faint); font-size: 12.5px; margin-top: 2px; }
.coach-card .headline {
  color: var(--text-dim); font-size: 13.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
.coach-foot {
  display: flex; align-items: center; gap: 10px; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.rating { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; }
.rating .stars { color: var(--star); letter-spacing: -1px; }
.rating .n { color: var(--text-faint); font-weight: 500; }
.price { margin-left: auto; text-align: right; }
.price .amt { font-weight: 700; font-size: 16px; }
.price .per { color: var(--text-faint); font-size: 11.5px; }

/* ------------------------------------------------------------- program card */
.prog-cover {
  height: 96px; position: relative; display: flex; align-items: flex-end; padding: 11px;
}
.prog-cover .weeks {
  position: absolute; top: 10px; right: 11px;
  background: rgba(0,0,0,.42); backdrop-filter: blur(6px);
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
}
.prog-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 9px; height: calc(100% - 96px); }
.prog-body h3 { font-size: 15.5px; line-height: 1.3; }
.prog-body .sum {
  color: var(--text-dim); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prog-by { display: flex; align-items: center; gap: 7px; color: var(--text-faint); font-size: 12.5px; }

/* ----------------------------------------------------------- coach profile */
.profile-hero {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
  display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
}
.profile-hero .who { flex: 1; min-width: 260px; }
.profile-hero h1 { font-size: 25px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile-hero .sub { color: var(--text-dim); margin: 8px 0 12px; font-size: 15px; }
.statline { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.stat .v { font-weight: 700; font-size: 17px; }
.stat .k { color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; }

.cols { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 940px) { .cols { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.panel > h2 { font-size: 16px; margin-bottom: 13px; }
.panel .bio { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; }

.tier {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px; margin-bottom: 11px; background: var(--surface-2);
}
.tier.best { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tier-head { display: flex; align-items: baseline; gap: 8px; }
.tier-head .nm { font-weight: 650; font-size: 15px; }
.tier-head .amt { margin-left: auto; font-weight: 700; font-size: 19px; }
.tier-head .per { color: var(--text-faint); font-size: 12px; }
.tier .blurb { color: var(--text-dim); font-size: 13px; margin: 7px 0 10px; }
.perks { list-style: none; padding: 0; margin: 0 0 13px; display: grid; gap: 6px; }
.perks li { display: flex; gap: 8px; font-size: 13px; color: var(--text-dim); }
.perks li::before { content: '✓'; color: var(--accent); font-weight: 700; flex: none; }
.cadence-note {
  font-size: 12px; color: var(--text-faint); display: flex; align-items: center; gap: 6px;
  margin-bottom: 11px; padding: 7px 9px; background: var(--surface); border-radius: 7px;
}

.cred { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.cred:last-child { border: 0; }
.cred .t { font-weight: 600; }
.cred .i { color: var(--text-faint); font-size: 12.5px; }

/* ------------------------------------------------------------------ reviews */
.rating-summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rating-big { text-align: center; }
.rating-big .v { font-size: 40px; font-weight: 700; line-height: 1; }
.rating-big .stars { color: var(--star); font-size: 15px; margin: 4px 0; }
.rating-big .n { color: var(--text-faint); font-size: 12.5px; }
.bars { flex: 1; min-width: 190px; display: grid; gap: 4px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); }
.bar .track { flex: 1; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--star); border-radius: 3px; }

.review { padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-head .who { font-weight: 600; font-size: 13.5px; }
.review-head .meta { color: var(--text-faint); font-size: 12px; }
.review h4 { font-size: 14.5px; margin-bottom: 5px; }
.review p { color: var(--text-dim); font-size: 13.5px; margin: 0; line-height: 1.6; }
.review .stars { color: var(--star); font-size: 13px; }

/* ------------------------------------------------------ program / syllabus */
.week {
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  margin-bottom: 9px; overflow: hidden; background: var(--surface-2);
}
.week-head {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  cursor: pointer; user-select: none; width: 100%; background: none; border: 0; text-align: left;
}
.week-head:hover { background: var(--surface-3); }
.week-head .wk { font-weight: 650; font-size: 14px; min-width: 62px; }
.week-head .sum { color: var(--text-faint); font-size: 12.5px; }
.week-head .lock { margin-left: auto; color: var(--text-faint); font-size: 12px; display: flex; gap: 5px; align-items: center; }
.week-body { padding: 2px 14px 12px; display: none; }
.week.open .week-body { display: block; }
.week.open .week-head { background: var(--surface-3); }

.sess { padding: 11px 0; border-top: 1px solid var(--line-soft); }
.sess-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sess-head .day {
  font-size: 11px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .07em; width: 34px; flex: none; font-weight: 700;
}
.sess-head .ttl { font-weight: 600; font-size: 14px; }
.sess-head .dur { margin-left: auto; color: var(--text-faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* Structured workout rendering */
.struct { margin: 9px 0 0 34px; display: grid; gap: 3px; }
.blk {
  display: flex; align-items: baseline; gap: 10px; font-size: 13px;
  padding: 5px 10px; border-radius: 7px; background: var(--surface);
  border-left: 3px solid var(--line);
}
.blk.warmup, .blk.cooldown { border-left-color: color-mix(in srgb, var(--text) 30%, var(--bg)); color: var(--text-dim); }
.blk.work { border-left-color: var(--run); }
.blk.recover { border-left-color: color-mix(in srgb, var(--text) 30%, var(--bg)); color: var(--text-dim); }
.blk.lift { border-left-color: var(--strength); }
.blk.note { border-left-color: var(--warn); color: var(--warn); font-style: italic; background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.blk .lbl { font-weight: 600; flex: none; }
.blk .tgt {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: var(--surface-3); padding: 1px 7px; border-radius: 5px; color: var(--text); flex: none;
}
.blk .nt { color: var(--text-faint); font-size: 12.5px; }
.repeat {
  border-left: 2px solid var(--line); margin-left: 4px; padding-left: 10px;
}
.repeat > .rx {
  font-size: 12px; font-weight: 700; color: var(--text-dim); margin: 4px 0 3px;
  text-transform: uppercase; letter-spacing: .05em;
}
.locked-note {
  color: var(--text-faint); font-size: 13px; padding: 12px; text-align: center;
  background: var(--surface); border-radius: var(--radius-sm); border: 1px dashed var(--line);
}

/* -------------------------------------------------------------------- sheet */
.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } }
.sheet {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; width: 100%; max-width: 440px; max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow); animation: pop .18s cubic-bezier(.2,.9,.3,1);
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0 } }
.sheet-head {
  display: flex; align-items: center; gap: 10px; padding: 17px 19px 12px;
}
.sheet-head h3 { font-size: 17px; flex: 1; }
.sheet-body { padding: 0 19px 19px; }
.sheet-body p { color: var(--text-dim); font-size: 14px; }
.field { margin-bottom: 13px; }
.field label {
  display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 650;
}
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14.5px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: color-mix(in srgb, var(--text) 28%, var(--bg)); }
.line-item {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text-dim);
}
.line-item.total { border-bottom: 0; color: var(--text); font-weight: 700; font-size: 16px; padding-top: 12px; }
.notice {
  background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn);
  border-radius: 8px; padding: 9px 11px; font-size: 12.5px; margin: 12px 0;
}

.empty { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty h3 { color: var(--text-dim); margin-bottom: 8px; font-size: 16px; }
.skeleton { background: var(--surface-2); border-radius: var(--radius); height: 190px; animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5 } }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text);
  padding: 11px 17px; border-radius: 11px; z-index: 90; box-shadow: var(--shadow);
  font-size: 14px; font-weight: 550; animation: pop .18s;
}

/* ============================================================================
   Coaching OS — dashboards, plan builder, chat, charts.
   Everything below reuses the tokens declared at the top of this file.
   ========================================================================== */

.wrap.narrow, .page.narrow { max-width: 780px; margin: 0 auto; }
.muted { color: var(--text-dim); }
.muted.sm, .sm { font-size: 12.5px; }
.hot { color: var(--danger); }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 16px 0; }
.back { display: inline-block; color: var(--text-faint); font-size: 13px; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.pagehead.row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pagehead.row > div:first-child { flex: 1; }
.row-between { display: flex; gap: 8px; }
.row-between > * { flex: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel.pad0 { padding: 0; overflow: hidden; }
.panel.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line-soft)); }
.panel .reasons { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; }

/* -------------------------------------------------------------- stat row -- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 18px; }
.stat-row.tight { margin-bottom: 0; }
.stat-card { background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px 16px; }
.stat-card.alert { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.stat-card .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat-card .k { color: var(--text-faint); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .07em; font-weight: 650; margin-top: 3px; }
.stat-card .sub { color: var(--text-dim); font-size: 12px; margin-top: 5px; }

.meter { height: 5px; background: var(--surface-3); border-radius: 3px;
  overflow: hidden; margin-top: 9px; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.meter.big { height: 8px; margin: 4px 0 8px; }
.meter.mini { height: 4px; width: 54px; margin: 0 0 3px; }

/* ----------------------------------------------------------- coach strip -- */
.coach-strip { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; }
.coach-strip .nm { font-weight: 620; font-size: 14px; }
.coach-strip .sub { color: var(--text-faint); font-size: 12px; }

/* --------------------------------------------------------- session rows -- */
.sess-row { display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-soft);
  cursor: pointer; align-items: flex-start; }
.sess-row:first-of-type { border-top: 0; }
.sess-row:hover { background: var(--surface-2); margin: 0 -10px; padding-left: 10px; padding-right: 10px;
  border-radius: 9px; }
.sess-row.done { opacity: .82; }
.sess-row.missed .body .head b { text-decoration: line-through; text-decoration-color: var(--text-faint); }
.sess-row .when { width: 78px; flex: none; }
.sess-row .when .d { font-weight: 620; font-size: 13px; }
.sess-row .body { flex: 1; min-width: 0; }
.sess-row .body .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sess-row .acts { display: flex; gap: 6px; align-items: center; flex: none; }
.coach-note { margin-top: 6px; padding: 7px 10px; background: color-mix(in srgb, var(--swim) 9%, var(--surface-2));
  border-radius: 8px; font-size: 13px; color: var(--text-dim); }

.feedback .fb { display: flex; gap: 10px; }
.feedback .fb p { margin: 0 0 4px; font-size: 14px; color: var(--text); }
.goal .ev { font-weight: 650; font-size: 16px; }
.ach { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13.5px; }

/* -------------------------------------------------------- needs attention -- */
.need { display: flex; align-items: center; gap: 11px; padding: 11px 0;
  border-top: 1px solid var(--line-soft); }
.need:first-of-type { border-top: 0; }
.need:hover { background: var(--surface-2); margin: 0 -10px; padding-left: 10px;
  padding-right: 10px; border-radius: 9px; }
.need .body { flex: 1; min-width: 0; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.dot.red { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }
.dot.yellow { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.dot.green { background: var(--accent); }
.line-item.link:hover { color: var(--text); background: var(--surface-2);
  margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 7px; }
.line-item b.hot { color: var(--danger); }

/* ----------------------------------------------------------- roster table -- */
table.roster { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.roster th { text-align: left; padding: 11px 12px; color: var(--text-faint);
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
table.roster td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.roster tbody tr { cursor: pointer; }
table.roster tbody tr:hover { background: var(--surface-2); }
table.roster td.who { display: flex; align-items: center; gap: 9px; }
table.roster.tight td, table.roster.tight th { padding: 8px 10px; }
@media (max-width: 820px) {
  table.roster thead { display: none; }
  table.roster tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px;
    padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  table.roster td { border: 0; padding: 2px 0; }
}

/* ------------------------------------------------------------------ hero -- */
.hero-acts { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
@media (max-width: 700px) { .hero-acts { flex-direction: row; flex-wrap: wrap; } }

/* ----------------------------------------------------------------- chart -- */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.chart.small { height: 70px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; gap: 5px; }
.chart .bar { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0;
  min-height: 2px; transition: height .2s; }
.chart .bar.good { background: var(--accent); }
.chart .bar.ok { background: var(--warn); }
.chart .bar.bad { background: var(--danger); }
.chart .lab { font-size: 10px; color: var(--text-faint); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* -------------------------------------------------------------- timeline -- */
.timeline { position: relative; padding-left: 6px; }
.tl { display: flex; gap: 12px; padding: 9px 0; position: relative; }
.tl .dot-tl { width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  flex: none; margin-top: 6px; box-shadow: 0 0 0 3px var(--surface); }
.timeline::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px;
  width: 1px; background: var(--line); }
.tl > div:last-child { flex: 1; }

/* -------------------------------------------------------------- badges --- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 9px; }
.badge-item { text-align: center; padding: 10px 5px; border-radius: 10px;
  background: var(--surface-2); font-size: 10.5px; color: var(--text-faint);
  opacity: .38; filter: grayscale(1); line-height: 1.25; }
.badge-item.on { opacity: 1; filter: none; color: var(--text-dim);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }

/* --------------------------------------------------------------- inputs --- */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button, .stack button { background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-dim); border-radius: 9px; padding: 9px 13px; font-size: 13.5px;
  font-weight: 550; text-align: left; }
.seg button:hover, .stack button:hover { background: var(--surface-3); color: var(--text); }
.seg button.on, .stack button.on { border-color: var(--accent); color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.stack { display: grid; gap: 6px; }
.field textarea { resize: vertical; font-family: inherit; }

/* --------------------------------------------------------- plan builder --- */
.sheet.wide { max-width: 620px; }
.blocks { display: grid; gap: 6px; margin-bottom: 9px; }
.brow { display: flex; gap: 6px; align-items: center; background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: 9px; padding: 7px 9px; flex-wrap: wrap; }
.brow.rep { display: block; }
.brow-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.brow .nested { margin: 8px 0 0 14px; padding-left: 10px;
  border-left: 2px solid var(--line); display: grid; gap: 6px; }
.brow input { background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 13px; outline: none; min-width: 0; }
.brow input.mini { width: 62px; flex: none; }
.brow input.mini.wide { width: 128px; }
.brow input.wide { flex: 1; min-width: 90px; }
.brow .tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; color: var(--text-faint); width: 58px; flex: none; }
.brow .tag.work { color: var(--run); }
.brow .tag.lift { color: var(--strength); }
.brow .x { background: none; border: 0; color: var(--text-faint); font-size: 14px;
  padding: 2px 5px; border-radius: 5px; }
.brow .x:hover { color: var(--danger); background: var(--surface-3); }
.addrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.tpl-row { display: block; width: 100%; text-align: left; background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: 9px; padding: 10px 12px; margin-bottom: 6px; }
.tpl-row:hover { background: var(--surface-3); }
.tpl-row span { display: block; margin-top: 2px; }

/* ---------------------------------------------------------- review cards -- */
.review-card .rc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-card .rc-head > div:nth-child(2) { flex: 1; }
.review-card .rc-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

/* --------------------------------------------------------------- chat ----- */
.composer { display: flex; gap: 8px; margin-top: 12px; }
.composer.pad { padding: 12px; margin: 0; border-top: 1px solid var(--line-soft); }
.composer input { flex: 1; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14px; outline: none; }
.composer input:focus { border-color: color-mix(in srgb, var(--text) 28%, var(--bg)); }
.thread-row { display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft); }
.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: var(--surface-2); }
.thread-row .body { flex: 1; min-width: 0; }
.thread-row .meta { text-align: right; flex: none; }
.pill { display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-top: 3px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft); }
.chat-body { padding: 14px 15px; max-height: 56vh; overflow-y: auto; display: grid; gap: 12px; }
.msg { max-width: 78%; }
.msg.mine { margin-left: auto; text-align: right; }
.msg .bubble { background: var(--surface-2); border: 1px solid var(--line-soft);
  padding: 9px 12px; border-radius: 13px; font-size: 14px; display: inline-block; text-align: left; }
.msg.mine .bubble { background: color-mix(in srgb, var(--accent) 15%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line-soft)); }
.msg .ctx { display: block; font-size: 11.5px; color: var(--swim); margin-bottom: 3px; }
.cmt { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.cmt:first-child { border-top: 0; }
.cmt p { margin: 3px 0 0; font-size: 13.5px; color: var(--text-dim); }
.note-item { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.note-item:last-child { border-bottom: 0; }
.note-item p { margin: 0 0 3px; font-size: 13.5px; }

/* -------------------------------------------------------- notifications --- */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft); }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); margin: 0 -10px; padding-left: 10px;
  padding-right: 10px; border-radius: 9px; }
.notif.unread { border-left: 2px solid var(--accent); padding-left: 10px; margin-left: -12px; }
.notif .body { flex: 1; }
.btn.bell { position: relative; }
.btn.bell .badge { position: absolute; top: -4px; right: -4px; background: var(--danger);
  color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 5px;
  min-width: 15px; line-height: 15px; text-align: center; }
.week-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.week-title h2 { margin: 0; }

/* ============================================================================
   Design pass — training-intensity language, week timeline, nutrition.
   ========================================================================== */

/* --------------------------------------------------- intensity vocabulary -- */
.ttype {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px 3px 6px; border-radius: 6px; white-space: nowrap;
  background: color-mix(in srgb, var(--tc) 15%, transparent);
  color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 26%, transparent);
}
.ttype::before {
  content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--tc);
  box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 70%, transparent);
}
.t-recovery  { --tc: var(--t-recovery); }
.t-endurance { --tc: var(--t-endurance); }
.t-long      { --tc: var(--t-long); }
.t-threshold { --tc: var(--t-threshold); }
.t-intervals { --tc: var(--t-intervals); }
.t-strength  { --tc: var(--t-strength); }

/* A session row carries its intensity as a left edge. */
.sess-row { border-left: 3px solid transparent; padding-left: 11px; border-radius: 10px; }
.sess-row.i-recovery  { border-left-color: var(--t-recovery); }
.sess-row.i-endurance { border-left-color: var(--t-endurance); }
.sess-row.i-long      { border-left-color: var(--t-long); }
.sess-row.i-threshold { border-left-color: var(--t-threshold); }
.sess-row.i-intervals { border-left-color: var(--t-intervals); }
.sess-row.i-strength  { border-left-color: var(--t-strength); }
.sess-row:hover { margin: 0; padding-left: 11px; padding-right: 10px; }

/* ------------------------------------------------------------ typography -- */
.pagehead h1 { font-size: var(--fs-h1); letter-spacing: -.03em; }
.stat-card .v { font-size: 30px; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums lining-nums; }
.panel { border-radius: var(--radius); }
.panel > h2 { font-size: var(--fs-h2); letter-spacing: -.015em; }
.card:hover { box-shadow: var(--shadow-lift); }

/* Stat cards get a hairline of meaning at the top. */
.stat-card { position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 92%, #000) 100%); }
.stat-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: .5; }
.stat-card.alert::before { background: linear-gradient(90deg, var(--danger), transparent 70%); opacity: .8; }

/* ------------------------------------------------------- week timeline ---- */
.weekbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.weekbar h2 { font-size: 17px; margin: 0; }
.weekbar .nav { display: flex; gap: 6px; margin-left: auto; }

.weekgrid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
}
@media (max-width: 900px) { .weekgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .weekgrid { grid-template-columns: 1fr; } }

.daycol {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 13px; padding: 9px; min-height: 168px;
  display: flex; flex-direction: column; gap: 7px;
  transition: border-color .14s, background .14s;
}
.daycol:hover { border-color: var(--line); }
.daycol.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)); }
.daycol.past { opacity: .72; }
.daycol .dhead { display: flex; align-items: baseline; gap: 6px; }
.daycol .dow { font-size: 11px; font-weight: 750; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-faint); }
.daycol.today .dow { color: var(--accent); }
.daycol .dnum { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.daycol .dload { margin-left: auto; font-size: 10.5px; color: var(--text-faint);
  font-variant-numeric: tabular-nums; }

.daycard {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--tc, var(--line)); border-radius: 9px;
  padding: 8px 9px; cursor: pointer; position: relative;
}
.daycard:hover { background: var(--surface-3); }
.daycard.done { opacity: .72; }
.daycard.done .ttl { text-decoration: none; padding-right: 14px; } /* clear of the tick */
.daycard.missed { border-left-color: var(--danger); }
.daycard .ttl { font-size: 12.5px; font-weight: 620; line-height: 1.3; }
.daycard .meta { font-size: 10.5px; color: var(--text-faint); margin-top: 3px;
  display: flex; gap: 6px; align-items: center; }
.daycard .tick { position: absolute; top: 6px; right: 7px; font-size: 10px; color: var(--accent); }
.daycard .tick.auto { color: var(--t-endurance); }

.dayadd {
  margin-top: auto; border: 1px dashed var(--line); background: none;
  color: var(--text-faint); border-radius: 9px; padding: 7px; font-size: 12px;
  width: 100%; transition: all .12s;
}
.dayadd:hover { border-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* Week summary strip: the shape of the week in one line. */
.weekshape { display: flex; gap: 3px; height: 6px; margin: 8px 0 2px; }
.weekshape span { flex: 1; border-radius: 2px; background: var(--surface-3); }
.weekshape span[data-t] { background: var(--tc); }
.weeksum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); }
.weeksum b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- nutrition ----- */
.macro-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.macro {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden;
}
.macro .g { font-size: 27px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; }
.macro .g small { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.macro .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 700; margin-top: 2px; }
.macro .perkg { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }
.macro .bar2 { height: 4px; border-radius: 2px; margin-top: 9px; background: var(--mc); opacity: .85; }
.macro.carbs   { --mc: var(--t-threshold); }
.macro.protein { --mc: var(--t-intervals); }
.macro.fat     { --mc: var(--t-endurance); }
.macro.kcal    { --mc: var(--accent); }

.daytype-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 650;
  background: color-mix(in srgb, var(--dc) 15%, transparent);
  color: var(--dc); border: 1px solid color-mix(in srgb, var(--dc) 30%, transparent);
}
.dt-rest     { --dc: var(--t-recovery); }
.dt-easy     { --dc: var(--t-endurance); }
.dt-moderate { --dc: var(--t-long); }
.dt-hard     { --dc: var(--t-threshold); }
.dt-extreme  { --dc: var(--t-intervals); }

.fuelbox {
  background: linear-gradient(135deg, color-mix(in srgb, var(--t-threshold) 12%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--t-threshold) 28%, var(--line-soft));
  border-radius: var(--radius-sm); padding: 13px 15px; margin-top: 12px;
}
.fuelbox h3 { font-size: 13px; color: var(--t-threshold); margin-bottom: 6px; }

.meal { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.meal:first-of-type { border-top: 0; }
.meal .slot { width: 74px; flex: none; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding-top: 2px; }
.meal .body { flex: 1; min-width: 0; }
.meal .macros { font-size: 11.5px; color: var(--text-faint); margin-top: 3px;
  font-variant-numeric: tabular-nums; }

.nweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
@media (max-width: 700px) { .nweek { grid-template-columns: repeat(4, 1fr); } }
.nday { background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 9px 7px; text-align: center; }
.nday .d { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .07em; font-weight: 700; }
.nday .kc { font-size: 15px; font-weight: 700; margin: 4px 0 2px;
  font-variant-numeric: tabular-nums; }
.nday .cb { font-size: 11px; color: var(--text-dim); }
.nday .strip { height: 3px; border-radius: 2px; margin-top: 6px; background: var(--dc, var(--line)); }

/* --------------------------------------------------------------- strava --- */
.connect-card { display: flex; align-items: center; gap: 13px; padding: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, #fc4c02 10%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, #fc4c02 25%, var(--line-soft)); border-radius: var(--radius); }
.connect-card .logo { width: 36px; height: 36px; border-radius: 9px; background: #fc4c02;
  display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: 16px; }
.connect-card .body { flex: 1; }
.autobadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  color: var(--t-endurance); font-weight: 650; }

/* ============================================================================
   Strength — builder, exercise picker, set logger, records.
   ========================================================================== */

/* -------------------------------------------------------- coach builder --- */
.exlist { display: grid; gap: 7px; }
.exrow {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--t-strength); border-radius: 10px; padding: 9px 10px;
}
.exgrip { display: flex; flex-direction: column; gap: 2px; flex: none; }
.exgrip .mv {
  background: none; border: 0; color: var(--text-faint); font-size: 11px;
  line-height: 1; padding: 2px 3px; border-radius: 4px;
}
.exgrip .mv:hover:not([disabled]) { color: var(--text); background: var(--surface-3); }
.exgrip .mv[disabled] { opacity: .25; pointer-events: none; }
.exmain { flex: 1; min-width: 0; }
.exname { font-size: 13.5px; font-weight: 620; display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap; }
.mchip {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); background: var(--surface-3); padding: 2px 6px; border-radius: 4px;
}
.mchip.warnchip { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.exfields { display: flex; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.exfields label {
  display: flex; flex-direction: column; gap: 2px; font-size: 10px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 700;
}
.exfields input {
  width: 58px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); border-radius: 7px; padding: 5px 7px; font: inherit; font-size: 13px;
  outline: none;
}
.exfields label:nth-child(3) input { width: 78px; }
.exrow .x { background: none; border: 0; color: var(--text-faint); font-size: 13px;
  padding: 3px 5px; border-radius: 5px; flex: none; }
.exrow .x:hover { color: var(--danger); background: var(--surface-3); }

.seg.wrapseg { flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.seg.wrapseg button { padding: 5px 10px; font-size: 12.5px; }

.exresults { display: grid; gap: 5px; max-height: 320px; overflow-y: auto; padding-right: 2px; }
.exopt {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: 9px; padding: 9px 11px;
}
.exopt:hover { background: var(--surface-3); border-color: var(--line); }
.exopt b { font-size: 13.5px; font-weight: 620; }
.exopt .mchip { margin-left: 6px; }

/* ---------------------------------------------------------- set logger --- */
.exlog {
  border-top: 1px solid var(--line-soft); padding: 14px 0;
}
.exlog:first-of-type { border-top: 0; }
.exlog-head { display: flex; align-items: flex-start; gap: 10px; }
.exlog-head > div:first-child { flex: 1; }
.exlog-head b { font-size: 15px; }
.prchip {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--star) 14%, transparent); color: var(--star);
  border: 1px solid color-mix(in srgb, var(--star) 28%, transparent); white-space: nowrap;
}
.lasttime {
  font-size: 12px; color: var(--text-dim); margin: 7px 0 9px; padding: 6px 9px;
  background: var(--surface-2); border-radius: 7px;
  border-left: 2px solid var(--t-endurance);
}

.setgrid { display: grid; gap: 4px; }
.sethead, .setrow {
  display: grid; grid-template-columns: 34px 1fr 1fr 38px; gap: 7px; align-items: center;
}
.sethead span {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); font-weight: 700; text-align: center;
}
.sethead span:first-child { text-align: left; }
.setrow .setno {
  font-size: 12.5px; font-weight: 700; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.setrow input {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 15px;
  text-align: center; outline: none; width: 100%;
  font-variant-numeric: tabular-nums;
}
.setrow input:focus { border-color: var(--accent); background: var(--surface-3); }
.setrow input::placeholder { color: var(--text-faint); opacity: .55; }
.setrow.done input { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tickbtn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-faint);
  border-radius: 8px; padding: 8px 0; font-size: 13px; width: 100%;
}
.tickbtn:hover { color: var(--text); background: var(--surface-3); }
.tickbtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.addset { margin-top: 7px; }

/* Roomier tap targets on a phone — this screen is used mid-set. */
@media (max-width: 560px) {
  .setrow input { padding: 12px 10px; font-size: 16px; }
  .sethead, .setrow { grid-template-columns: 28px 1fr 1fr 44px; }
}

/* A chart with one or two data points should not stretch a bar across the
   whole panel — cap the column width and left-align. */
.chart { justify-content: flex-start; }
.chart .col { max-width: 72px; }

/* ============================================================================
   Coach context rail — benchmarks, zones and recent work beside the editor.
   ========================================================================== */
.sheet.wide { max-width: 620px; }
.sheet.wide:has(.editor-split) { max-width: 900px; }

.editor-split { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 820px) {
  .editor-split { grid-template-columns: 1fr; }
  .editor-context { order: -1; }   /* on a phone the context comes first */
}
.editor-form { min-width: 0; }
.editor-context { min-width: 0; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .three { grid-template-columns: 1fr 1fr; } }

.benchlist { display: grid; gap: 8px; }
.benchrow {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 9px; padding: 9px 11px;
}
.benchrow > div { flex: 1; min-width: 0; }
.benchrow input {
  width: 120px; flex: none; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); border-radius: 7px; padding: 7px 9px; font: inherit;
  font-size: 13.5px; outline: none; text-align: center;
}
.benchrow input:focus { border-color: var(--accent); }

/* The last-session block stacks: title, then the numbers on their own line. */
.lastsess { flex-direction: column; gap: 6px; }
.lastsess > div:first-child b { font-size: 13.5px; line-height: 1.3; display: block; }
.lastsess .lastnums { gap: 10px; }
.ctxrow { gap: 7px; }
.ctxrow .t { flex: 1 1 auto; }

/* ============================================================================
   Coach context panel — one interactive table, four views.
   ========================================================================== */
.sheet.wide:has(.editor-split) { max-width: 960px; }
.editor-split { grid-template-columns: 1fr 340px; }

.ctxpanel {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 12px; overflow: hidden;
  position: sticky; top: 0; display: flex; flex-direction: column;
  max-height: 74vh;
}
.ctxpanel.loading { display: grid; place-items: center; min-height: 90px; }

.ctxtop {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 12px; border-bottom: 1px solid var(--line-soft);
}
.ctxtop > div { flex: 1; min-width: 0; }
.ctxtop b { font-size: 13.5px; }
.ctxtop .btn { flex: none; padding: 4px 9px; }

/* ---------------------------------------------------------------- tabs --- */
.ctxtabs { display: flex; gap: 2px; padding: 7px 8px 0; border-bottom: 1px solid var(--line-soft); }
.ctxtabs button {
  flex: 1; background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-faint); font-size: 12px; font-weight: 650; padding: 6px 4px 7px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 6px 6px 0 0; white-space: nowrap;
}
.ctxtabs button:hover { color: var(--text-dim); background: var(--surface-3); }
.ctxtabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.ctxtabs button[data-empty] { opacity: .45; }
.ctxtabs .n {
  font-size: 10px; font-weight: 700; background: var(--surface-3);
  color: var(--text-faint); border-radius: 999px; padding: 0 5px; line-height: 15px;
}
.ctxtabs button.on .n { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }

/* --------------------------------------------------------------- table --- */
.ctxtablewrap { overflow: auto; flex: 1; min-height: 0; }
table.ctxtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.ctxtable th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); text-align: left; white-space: nowrap;
  padding: 8px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); font-weight: 700; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--line);
}
table.ctxtable th:hover { color: var(--text-dim); }
table.ctxtable th.r { text-align: right; }
table.ctxtable th .arrow { display: inline-block; width: 9px; opacity: 0; }
table.ctxtable th.sorted { color: var(--text); }
table.ctxtable th.sorted .arrow { opacity: 1; }
table.ctxtable th.sorted.asc .arrow::after { content: '↑'; }
table.ctxtable th.sorted.desc .arrow::after { content: '↓'; }

table.ctxtable td {
  padding: 7px 10px; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap; vertical-align: middle;
}
table.ctxtable td.r { text-align: right; }
table.ctxtable td.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums; font-size: 12px;
}
/* The one column allowed to shrink and ellipsis. */
table.ctxtable th.w, table.ctxtable td.w { width: 99%; }
table.ctxtable td.w .ttl {
  display: block; max-width: 108px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim);
}
table.ctxtable tbody tr { cursor: pointer; }
table.ctxtable tbody tr:hover { background: var(--surface-3); }
table.ctxtable tbody tr:hover td.w .ttl { color: var(--text); }
table.ctxtable tbody tr:last-child td { border-bottom: 0; }

.zdot {
  display: inline-block; width: 6px; height: 6px; border-radius: 2px;
  background: var(--zc); margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 7px color-mix(in srgb, var(--zc) 65%, transparent);
}
.dotmark { color: var(--accent); }
.feel { font-size: 11px; }
.feel.f-easy      { color: var(--t-endurance); }
.feel.f-moderate  { color: var(--text-dim); }
.feel.f-hard      { color: var(--t-threshold); }
.feel.f-very_hard { color: var(--t-intervals); }
.src {
  font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-faint);
}
.src.s-strava { color: #fc4c02; background: color-mix(in srgb, #fc4c02 14%, transparent); }
.src.s-test   { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.ctxhint {
  padding: 7px 12px; font-size: 11px; color: var(--text-faint);
  border-top: 1px solid var(--line-soft); background: var(--surface);
}
.ctxempty { padding: 20px 14px; text-align: center; }
.ctxempty p { color: var(--text-dim); font-size: 12.5px; margin: 0 0 10px; }

/* --------------------------------------------------------------- footer -- */
.ctxfoot { border-top: 1px solid var(--line); background: var(--surface); padding: 4px 0; }
.footrow {
  display: flex; gap: 10px; align-items: baseline; padding: 5px 12px; font-size: 11.5px;
}
.footrow .k {
  color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; font-size: 10px; width: 60px; flex: none;
}
.footrow .v { color: var(--text-dim); flex: 1; min-width: 0; }
.footrow.warn .v { color: var(--warn); }

@media (max-width: 820px) {
  .ctxpanel { position: static; max-height: none; }
  table.ctxtable td.w .ttl { max-width: none; }
}

/* A clipped word is worse than a dot: feel is shown as colour, named on hover. */
.feeldot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--fc, var(--text-faint)); vertical-align: middle;
}
.feeldot.f-easy      { --fc: var(--t-endurance); }
.feeldot.f-moderate  { --fc: var(--text-dim); }
.feeldot.f-hard      { --fc: var(--t-threshold); }
.feeldot.f-very_hard { --fc: var(--t-intervals); }
table.ctxtable th, table.ctxtable td { padding-left: 8px; padding-right: 8px; }
table.ctxtable th:last-child, table.ctxtable td:last-child { padding-right: 10px; }

/* ============================================================================
   Compliance — pending panel, grades, the athlete's record.
   ========================================================================== */
.panel.pending { border-color: color-mix(in srgb, var(--warn) 30%, var(--line-soft)); }
.panel.pending.urgent { border-color: color-mix(in srgb, var(--danger) 35%, var(--line-soft)); }
.panel.pending .week-title { align-items: baseline; }

.pendrow {
  display: flex; gap: 12px; align-items: center; padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.pendrow:first-of-type { border-top: 0; }
.pendrow .body { flex: 1; min-width: 0; }
.pendrow .body .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pendrow .acts { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.pendrow[data-pending] { cursor: pointer; }
.pendrow[data-pending]:hover { background: var(--surface-2); margin: 0 -10px;
  padding-left: 10px; padding-right: 10px; border-radius: 9px; }
.pendrow.late { border-left: 3px solid var(--danger); padding-left: 10px; margin-left: -13px; }
.pendrow.awaiting { border-left: 3px solid var(--warn); padding-left: 10px; margin-left: -13px; }
.pendrow.checkin { border-left: 3px solid var(--t-endurance); padding-left: 10px; margin-left: -13px; }
@media (max-width: 560px) {
  .pendrow { flex-direction: column; align-items: stretch; }
  .pendrow .acts { justify-content: stretch; }
  .pendrow .acts .btn { flex: 1; }
}

/* ------------------------------------------------------------- grades ----- */
.gradepill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px;
  border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: color-mix(in srgb, var(--gc) 15%, transparent);
  color: var(--gc); border: 1px solid color-mix(in srgb, var(--gc) 32%, transparent);
}
.gdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 18%, transparent); }
.g-excellent { --gc: var(--accent); }
.g-ontrack   { --gc: var(--t-endurance); }
.g-slipping  { --gc: var(--warn); }
.g-offtrack  { --gc: var(--danger); }
.g-none      { --gc: var(--text-faint); }

.stat-card .v .of { font-size: 17px; color: var(--text-faint); font-weight: 600; }

/* ============================================================================
   Mobile-first pass: tab bar, hero ring, phone layout.
   The structure is borrowed from consumer fitness apps; the colour is not —
   intensity keeps its meaning, so a week still reads as a shape.
   ========================================================================== */

/* -------------------------------------------------------------- the ring -- */
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { display: block; }
.ring .ringbar { transition: stroke-dashoffset .7s cubic-bezier(.2,.8,.2,1); }
.ringtext { position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center; gap: 1px; }
.ringtext .rv { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.ringtext .rv span { font-size: 17px; color: var(--text-dim); margin-left: 1px; }
.ringtext .rl { font-size: 10.5px; color: var(--text-faint); font-weight: 600;
  max-width: 88px; line-height: 1.25; margin: 0 auto; }
.ringtext .rs { font-size: 10px; color: var(--text-faint); }

/* --------------------------------------------------------------- hero ----- */
.hero {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 7%, var(--surface)) 0%,
    var(--surface) 55%);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 18px;
}
.herostats {
  flex: 1; min-width: 240px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 18px;
}
.hs .v { font-size: 25px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05;
  font-variant-numeric: tabular-nums; }
.hs .v span { font-size: 15px; color: var(--text-dim); }
.hs .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 700; margin-top: 4px; }
.hs .sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* ------------------------------------------------------------- tab bar ---- */
.tabbar { display: none; }
@media (max-width: 820px) {
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: grid; justify-items: center; gap: 2px; padding: 6px 2px;
    color: var(--text-faint); border-radius: 10px;
  }
  .tabbar a .ti { font-size: 17px; line-height: 1; }
  .tabbar a .tl { font-size: 10px; font-weight: 650; letter-spacing: .01em; }
  .tabbar a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

  /* The top nav becomes the tab bar; keep the brand and account only. */
  nav.main { display: none; }
  .top .wrap { height: 54px; gap: 10px; }
  .searchbar { max-width: none; }
  body { padding-bottom: 68px; }

  /* One column everywhere, tighter rhythm. */
  .cols { grid-template-columns: 1fr; }
  /* Longhands: most pages are `.wrap.page`, and a shorthand here would undo the other. */
  .page { padding-top: 18px; padding-bottom: 40px; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  .panel { padding: 15px; border-radius: 14px; }
  .pagehead h1 { font-size: 23px; }
  .pagehead.row { gap: 12px; }
  .hero { padding: 18px; gap: 18px; justify-content: center; }
  .herostats { grid-template-columns: repeat(2, 1fr); gap: 14px; text-align: left; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 13px; }
  .stat-card .v { font-size: 24px; }
  .profile-hero { padding: 16px; gap: 14px; }
  .hero-acts { flex-direction: row; flex-wrap: wrap; }
  .hero-acts .btn { flex: 1 1 auto; }
  .sheet { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .scrim { align-items: flex-end; padding: 0; }
  .btn { padding: 10px 15px; }         /* thumbs, not cursors */
  .sess-row .acts .btn { padding: 8px 12px; }
}

@media (max-width: 480px) {
  .herostats { grid-template-columns: 1fr 1fr; }
  .weeksum { gap: 10px; font-size: 12px; }
  table.roster th, table.roster td { font-size: 12.5px; }
}

/* SVG tab icons keep one optical weight across platforms. */
.tabbar a .ti { display: block; width: 21px; height: 21px; }
.tabbar a .ti svg { width: 100%; height: 100%; display: block; }
.tabbar a .tl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A collapsed table row is only readable if each value still says what it is. */
@media (max-width: 820px) {
  table.roster tr {
    grid-template-columns: 1fr; gap: 0;
    background: var(--surface-2); border: 1px solid var(--line-soft);
    border-radius: 12px; margin: 0 0 9px; padding: 12px 14px;
  }
  table.roster td { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
  table.roster td[data-label]::before {
    content: attr(data-label);
    flex: none; width: 96px;
    font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-faint); font-weight: 700;
  }
  table.roster td.nolabel { padding: 0; }
  table.roster td.who { padding-bottom: 10px; margin-bottom: 4px;
    border-bottom: 1px solid var(--line-soft); }
  table.roster tbody { display: block; }
  table.roster { display: block; }
  table.roster tbody tr:hover { background: var(--surface-2); }
  .meter.mini { width: 70px; }

  /* Page headers stack rather than colliding with their action button. */
  .pagehead.row { flex-direction: column; align-items: stretch; }
  .pagehead.row .btn, .pagehead.row .gradepill { align-self: flex-start; }
  .coach-strip { width: 100%; }
}

/* ============================================================================
   Hybrid — conflicts, load curve, constraints.
   ========================================================================== */
.warn {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.warn:first-of-type { border-top: 0; }
.warn .wbody { flex: 1; min-width: 0; }
.warn .whead { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.warn .whead b { font-size: 14px; }
.warn p { margin: 5px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.warn .wfix {
  margin-top: 7px; padding: 7px 10px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  color: var(--text-dim);
}
.warn .wfix b { color: var(--accent); margin-right: 5px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; }
.warn.w-high  { border-left: 3px solid var(--danger); padding-left: 11px; margin-left: -14px; }
.warn.w-med   { border-left: 3px solid var(--warn); padding-left: 11px; margin-left: -14px; }
.warn.w-info  { border-left: 3px solid var(--t-endurance); padding-left: 11px; margin-left: -14px; }

/* ------------------------------------------------------------ load chart -- */
.loadchart { display: flex; align-items: flex-end; gap: 1px; height: 150px; margin-top: 10px; }
.lcol { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; }
.lfat, .lfit { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 2px 2px 0 0; }
.lfat { background: color-mix(in srgb, var(--t-intervals) 55%, transparent); }
.lfit { background: color-mix(in srgb, var(--accent) 78%, transparent); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px;
  font-size: 12px; color: var(--text-dim); align-items: center; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 5px; vertical-align: middle; background: var(--text-faint); }
.sw.fit { background: var(--accent); }
.sw.fat { background: color-mix(in srgb, var(--t-intervals) 70%, transparent); }
.sw.endur { background: var(--t-endurance); }
.sw.stren { background: var(--t-strength); }

.splitbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.splitbar .endur { background: var(--t-endurance); }
.splitbar .stren { background: var(--t-strength); }

/* Form states reuse the grade pill. */
.f-fresh        { --gc: var(--t-endurance); }
.f-ready        { --gc: var(--accent); }
.f-productive   { --gc: var(--t-long); }
.f-overreaching { --gc: var(--warn); }
.f-strained     { --gc: var(--danger); }
.f-building     { --gc: var(--text-faint); }

.daypip {
  display: inline-grid; place-items: center; width: 19px; height: 19px;
  border-radius: 5px; font-size: 10px; font-weight: 700; margin-left: 2px;
  background: var(--surface-3); color: var(--text-faint);
}
.daypip.on { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }

/* ============================================================================
   Coach settings — tabs, plan rows, inline money inputs.
   ========================================================================== */
.settabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft); }
.settabs button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-faint); font-size: 13.5px; font-weight: 650;
  padding: 9px 13px; border-radius: 8px 8px 0 0; white-space: nowrap;
}
.settabs button:hover { color: var(--text-dim); background: var(--surface-2); }
.settabs button.on { color: var(--text); border-bottom-color: var(--accent); }

.tierrow {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.tierrow:first-of-type { border-top: 0; }
.tierrow.retired { opacity: .55; }
.tierrow .tinfo { flex: 1; min-width: 0; }
.tierrow .thead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tierrow .thead b { font-size: 15px; }
.tierrow .tmeta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px;
  font-size: 11.5px; color: var(--text-faint); }
.tierrow .tmeta span { position: relative; }
.tierrow .tmeta span + span::before { content: '·'; margin-right: 10px; }
.tierrow .tprice { text-align: right; flex: none; }
.tierrow .tprice .amt { font-size: 21px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; }
.tierrow .tacts { display: flex; gap: 6px; flex: none; }
@media (max-width: 640px) {
  .tierrow { flex-wrap: wrap; }
  .tierrow .tprice { text-align: left; }
  .tierrow .tacts { width: 100%; }
  .tierrow .tacts .btn { flex: 1; }
}

.inline-input { display: flex; align-items: center; gap: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px;
  padding-left: 11px; }
.inline-input span { color: var(--text-faint); font-size: 14.5px; }
.inline-input input { background: none; border: 0; padding-left: 4px; }
.inline-input:focus-within { border-color: color-mix(in srgb, var(--text) 28%, var(--bg)); }

.chip.removable { cursor: pointer; }
.chip.removable:hover { background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger); }

ol.steps { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; }
ol.steps li { margin-bottom: 7px; line-height: 1.5; }

/* ============================================================================
   Coach record — highlights, qualifications, results.
   ========================================================================== */
.hilite { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.hitem {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 8%, var(--surface-2)),
    var(--surface-2));
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 15px;
}
.hitem .hv { font-size: 25px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05;
  font-variant-numeric: tabular-nums; }
.hitem .hl { font-size: 12.5px; color: var(--text-dim); margin-top: 5px; line-height: 1.35; }
.hitem .chip { margin-top: 8px; }

.recgroup { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.recgroup:first-of-type { border-top: 0; padding-top: 0; }
.reclabel {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 700; margin-bottom: 8px;
}
.recitem, .recrow {
  display: flex; gap: 12px; align-items: flex-start; padding: 8px 0;
}
.recrow { border-top: 1px solid var(--line-soft); padding: 12px 0; align-items: center; }
.recrow:first-of-type { border-top: 0; }
.recrow.feat { border-left: 3px solid var(--accent); padding-left: 11px; margin-left: -14px; }
.recitem .rm, .recrow .rm {
  flex: none; min-width: 84px; font-weight: 700; font-size: 14px;
  font-variant-numeric: tabular-nums; color: var(--accent);
}
.recitem .rm.dot { color: var(--text-faint); min-width: 12px; }
.recitem .rb, .recrow .rb { flex: 1; min-width: 0; }
.recitem .rt, .recrow .rt {
  font-size: 13.5px; font-weight: 600; display: flex; gap: 7px;
  align-items: center; flex-wrap: wrap;
}
.recitem .ry, .recrow .ry {
  flex: none; color: var(--text-faint); font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chip.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
@media (max-width: 640px) {
  .recrow { flex-wrap: wrap; }
  .recrow .tacts { width: 100%; }
  .recrow .tacts .btn { flex: 1; }
}

/* ============================================================================
   The completed-workout card.
   ========================================================================== */
.wcard {
  background: linear-gradient(165deg,
    color-mix(in srgb, var(--accent) 5%, var(--surface)) 0%, var(--surface) 42%);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; overflow: hidden;
  animation: wcin .45s cubic-bezier(.2,.9,.3,1) both;
}
.wcard.still { animation: none; }
@keyframes wcin { from { opacity: 0; transform: translateY(10px); } }

.wchead { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.wctitle { flex: 1; min-width: 0; }
.wctitle h2 { font-size: 20px; letter-spacing: -.02em; margin: 7px 0 4px; }
.feelbadge {
  flex: none; font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--fc) 15%, transparent); color: var(--fc);
  border: 1px solid color-mix(in srgb, var(--fc) 30%, transparent); white-space: nowrap;
}
.feelbadge.f-easy { --fc: var(--t-endurance); }
.feelbadge.f-moderate { --fc: var(--text-dim); }
.feelbadge.f-hard { --fc: var(--t-threshold); }
.feelbadge.f-very_hard { --fc: var(--t-intervals); }

.wcbody { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.wcrings { display: flex; align-items: center; gap: 18px; flex: none; }
.rings { display: block; filter: drop-shadow(0 3px 10px rgba(0,0,0,.35)); }
.ringlegend { display: grid; gap: 11px; }
.rl { display: grid; grid-template-columns: auto auto auto 1fr; align-items: baseline; gap: 5px; }
.rl i { width: 9px; height: 9px; border-radius: 3px; align-self: center; }
.rl .n { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -.03em; }
.rl .pc { font-size: 12px; color: var(--text-dim); margin-right: 4px; }
.rl .lb { font-size: 12px; color: var(--text-dim); }
.rl .lb .muted { display: block; font-size: 11px; }

.wcstats {
  flex: 1; min-width: 220px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 14px;
}
.wcstat .v { font-size: 21px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.wcstat .k { font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 700; margin-top: 3px; }

.wcsection { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.wclabel {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--text-faint); margin-bottom: 10px; display: flex; gap: 9px;
  align-items: center; flex-wrap: wrap;
}
.vchip { text-transform: none; letter-spacing: 0; font-size: 11px; padding: 3px 9px;
  border-radius: 999px; background: color-mix(in srgb, var(--vc) 15%, transparent);
  color: var(--vc); border: 1px solid color-mix(in srgb, var(--vc) 30%, transparent); }
.v-on { --vc: var(--accent); }
.v-fast { --vc: var(--t-endurance); }
.v-slow { --vc: var(--warn); }

/* ---- where the effort landed against the band the coach asked for -------- */
.paceband { padding: 4px 0 2px; }
.pbtrack { position: relative; height: 8px; border-radius: 4px;
  background: var(--surface-3); margin: 20px 0 8px; }
.pbzone { position: absolute; top: 0; bottom: 0; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 45%, transparent); }
.pbmark { position: absolute; top: 50%; width: 3px; height: 20px; border-radius: 2px;
  background: var(--text); transform: translate(-50%, -50%);
  animation: pbslide .8s cubic-bezier(.2,.9,.3,1) both .35s; }
.wcard.still .pbmark { animation: none; }
@keyframes pbslide { from { opacity: 0; transform: translate(-50%, -50%) scaleY(.3); } }
.pbmark span {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.pbmark.v-slow { background: var(--warn); }
.pbmark.v-slow span { color: var(--warn); }
.pbmark.v-fast { background: var(--t-endurance); }
.pbmark.v-fast span { color: var(--t-endurance); }
.pblabels { display: flex; justify-content: space-between; font-size: 11px;
  color: var(--text-faint); }

.vsrow { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.vsdelta { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vsdelta.up { color: var(--accent); }
.vsdelta.down { color: var(--text-dim); }

/* --- comparison against the last session of the same kind --- */
.wclabel .matchchip { margin-left: 7px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: capitalize;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.wclabel .matchchip.loose { background: color-mix(in srgb, var(--text-faint) 14%, transparent);
  color: var(--text-dim); border-color: var(--line-soft); }
.wclabel.sub { margin-top: 14px; }

.vstable td b { font-variant-numeric: tabular-nums; }
.vsd { display: inline-block; font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.vsd.up { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.vsd.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }
.vsd.flat { color: var(--text-faint); background: var(--surface-2); }

/* --- volume by muscle --- */
.musclebars { display: grid; gap: 6px; }
.mrow { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; }
.mrow .ml { font-size: 12.5px; color: var(--text-dim); text-transform: capitalize; }
.mrow .mbar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mrow .mbar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--t-strength), color-mix(in srgb, var(--t-strength) 55%, var(--accent)));
  transition: width .5s cubic-bezier(.2,.8,.2,1); }
.mrow .mv { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-faint); }

/* --- every set, as logged --- */
.liftlist { display: grid; gap: 11px; }
.liftitem { padding: 10px 12px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line-soft); }
.lifthead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.musclechip { font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 7px; border-radius: 5px;
  color: var(--t-strength); background: color-mix(in srgb, var(--t-strength) 13%, transparent); }
.setchips { display: flex; flex-wrap: wrap; gap: 6px; }
.setchip { display: inline-flex; align-items: baseline; gap: 1px; padding: 5px 9px;
  border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); }
.setchip b { font-weight: 700; }
.setchip i { font-style: normal; font-size: 10px; color: var(--text-faint); margin-right: 2px; }
.setchip .x { color: var(--text-faint); margin: 0 2px; }
.setchip em { font-style: normal; font-size: 10.5px; color: var(--text-faint); margin-left: 4px; }
.setchip.warm { opacity: .55; border-style: dashed; }

.prlist { display: grid; gap: 7px; }
.prrow { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px;
  padding: 8px 11px; border-radius: 9px;
  background: color-mix(in srgb, var(--star) 10%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--star) 22%, transparent); }

.wcnote { margin: 0; font-size: 14px; color: var(--text-dim); font-style: italic; }
.wcsection.feedback .fb { display: flex; gap: 10px; align-items: flex-start; }
.wcsection.feedback p { margin: 0; font-size: 14px; }

@media (max-width: 640px) {
  .wcbody { gap: 18px; }
  .wcrings { width: 100%; justify-content: center; }
  .wcstats { grid-template-columns: repeat(3, 1fr); }
  .wcard { padding: 16px; }
}

/* Review queue: a header per athlete, then the same card the athlete sees. */
.reviewwrap { margin-bottom: 20px; }

/* A completed session on the athlete page: the row, then its full card. */
.sesswrap { border-top: 1px solid var(--line-soft); }
.sesswrap:first-of-type { border-top: 0; }
.sesswrap .sess-row { border-top: 0; padding-bottom: 4px; }
.sesswrap .sess-row:hover { background: none; margin: 0; padding-left: 0; padding-right: 0; }
.sesscard { margin: 0 0 18px; }
.sesscard:empty { margin: 0; min-height: 1px; }
.sesscard .wcard { border-radius: 12px; }
.rvhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 0 4px; }
.rvhead b { font-size: 14px; }

/* A card slot reserves its space before the card arrives, so the page does not
   jump and the observer has something with height to watch. */
.cardslot { min-height: 220px; }
.cardslot:has(.wcard) { min-height: 0; }
.cardskel {
  height: 220px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%; animation: skel 1.4s ease-in-out infinite;
  border: 1px solid var(--line-soft);
}
@keyframes skel { to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .cardskel { animation: none; } }

/* ============================================================ workspace === */
.brand .logo { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.joincard { max-width: 520px; margin: 0 auto; text-align: center; padding: 34px 26px; }
.joincard .avatar, .joinlogo { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 14px; display: block; object-fit: cover; }
.joincard h1 { margin: 0 0 4px; font-size: var(--fs-h1); }
.joincard .tagrow.center { justify-content: center; margin: 12px 0 18px; }
.joincard .btn.block { margin-top: 10px; }

.swatchrow { display: flex; gap: 8px; align-items: center; }
.swatchrow input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.invitebox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); margin-bottom: 10px; }
.invitebox code { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.usage { margin-bottom: 14px; }
.usagebar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 7px; }
.usagebar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.plancards { display: grid; gap: 8px; }
.plancard { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 11px 13px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--text); cursor: pointer; font: inherit; }
.plancard b { text-transform: capitalize; }
.plancard span { color: var(--text-dim); font-size: var(--fs-sm); grid-column: 1; }
.plancard em { font-style: normal; grid-column: 2; grid-row: 1 / 3; align-self: center; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.plancard.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); }
.plancard.on em { color: var(--accent); }
label.check { display: flex; gap: 9px; align-items: center; font-size: var(--fs-body); cursor: pointer; }

/* ================================================================= site === */
/* A coach's website. Editorial rather than app-like: near-black, one accent,
   square edges, heavy uppercase display type and small tracked labels. The
   accent is the coach's; everything else is shared by every coach's site. */
body.on-site > header.top, body.on-site #tabbar { display: none; }
.site { --bg0: var(--s-bg, #0a0a0b); --ink: var(--s-text, #f5f5f4);
  --mute: color-mix(in srgb, var(--ink) 66%, var(--bg0)); --faint: color-mix(in srgb, var(--ink) 44%, var(--bg0));
  --edge: color-mix(in srgb, var(--ink) 10%, transparent); --panel: color-mix(in srgb, var(--ink) 4%, var(--bg0));
  background: var(--bg0); color: var(--ink); overflow-x: clip;
  font-family: 'Archivo', 'Inter', system-ui, -apple-system, sans-serif; }
.site button { font-family: inherit; }
.site a { color: inherit; }
.s-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 44px); }

/* ---- type & controls ---- */
.s-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.s-eyebrow::before { content: ''; width: 6px; height: 6px; background: currentColor; }
.s-title, .s-h2, .s-mega { margin: 0; font-weight: 850; font-stretch: 112%; line-height: .9;
  letter-spacing: -.015em; text-transform: uppercase; text-wrap: balance; }
.s-title { margin-bottom: 26px; font-size: clamp(44px, 6vw, 92px); font-stretch: 104%; }
.s-title.long { font-size: clamp(38px, 5.2vw, 72px); }
.s-h2 { font-size: clamp(36px, 5vw, 64px); }
.s-h2.handle { text-transform: none; }
.s-btn { display: inline-flex; align-items: center; gap: 12px; padding: 17px 24px; border: 1px solid var(--accent);
  border-radius: 2px; background: var(--accent); color: var(--accent-ink); cursor: pointer; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  transition: box-shadow .3s, background .3s, color .3s, border-color .3s, translate .3s; }
.s-btn i { font-style: normal; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.s-btn:hover { translate: 0 -1px; box-shadow: 0 14px 34px -14px var(--accent); }
.s-btn:hover i { transform: translateX(5px); }
.s-btn.sm { padding: 11px 16px; font-size: 10.5px; }
.s-btn.line { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 26%, transparent); }
.s-btn.line:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; }
.s-btn.inv { background: var(--bg0); color: var(--ink); border-color: var(--bg0); }
.s-btn.block { width: 100%; justify-content: space-between; }
.s-btn.off, .s-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; translate: none; }
.s-link { padding: 6px 0; border: 0; background: none; color: var(--mute); cursor: pointer; transition: color .2s;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.s-link:hover { color: var(--ink); }

/* ---- header: clear over the hero, solid once the page moves ---- */
.s-head { position: fixed; inset: 0 0 auto; z-index: 40; border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s; }
.s-head.solid { background: color-mix(in srgb, var(--bg0) 86%, transparent); backdrop-filter: blur(14px) saturate(140%); border-color: var(--edge); }
.s-head .s-wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.s-owner { padding: 7px 12px; text-align: center; font-size: 12px; background: var(--accent); color: var(--accent-ink); }
.s-owner a { margin-left: 12px; font-weight: 700; text-decoration: underline; }
.s-logo { display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.s-logo em { font-style: normal; color: var(--accent); }
.s-logo img { height: 32px; width: auto; max-width: 150px; object-fit: contain; }
.s-head nav { display: flex; gap: 26px; margin: 0 auto; }
.s-head nav button { padding: 6px 0; border: 0; background: none; color: var(--mute); cursor: pointer; transition: color .2s;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.s-head nav button:hover { color: var(--ink); }
.s-head-acts { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* ---- hero ---- */
.s-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: min(100vh, 940px); padding: 128px 0 96px;
  background: radial-gradient(90% 80% at 78% 16%, color-mix(in srgb, var(--accent) 86%, var(--bg0)) 0%,
    color-mix(in srgb, var(--accent) 28%, var(--bg0)) 44%, var(--bg0) 80%); }
.s-hero::before { content: ''; position: absolute; inset: -20%; z-index: -1; animation: s-breathe 11s ease-in-out infinite alternate;
  background: radial-gradient(34% 34% at 70% 34%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%); }
.s-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 62%, var(--bg0)); }
.site.light .s-bgname span { color: rgba(0, 0, 0, .06); }
@keyframes s-breathe { to { transform: translate(-8%, 6%) scale(1.15); } }
.s-bgname { position: absolute; inset: 13% 0 auto; z-index: -1; white-space: nowrap; pointer-events: none; }
.s-bgname span { display: inline-block; padding-left: 4vw; will-change: transform; color: rgba(0, 0, 0, .24);
  font-size: clamp(120px, 22vw, 340px); font-weight: 900; font-stretch: 125%; line-height: .8; text-transform: uppercase; }
.s-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: center; width: 100%; }
.s-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.s-title .w > span { display: inline-block; transform: translateY(108%);
  transition: transform 1s cubic-bezier(.2, .85, .25, 1) calc(var(--i) * 80ms + 120ms); }
.site.ready .s-title .w > span { transform: none; }
.s-lede { max-width: 46ch; margin: 0 0 34px; font-size: 16.5px; line-height: 1.6; color: var(--mute); }
.s-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }
.s-proof { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 38px; font-size: 12.5px; color: var(--mute); }
.s-proof b { color: var(--ink); }
.s-art { position: relative; justify-self: center; width: min(100%, 500px); aspect-ratio: 4 / 5; max-height: 76vh; }
.s-photo { width: 100%; height: 100%; object-fit: cover; object-position: top center;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%); mask-image: linear-gradient(180deg, #000 70%, transparent 98%); }
.s-art-track { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.s-art-track svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.s-art-track path { fill: none; stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.4s cubic-bezier(.6, 0, .2, 1) calc(var(--k) * .18s + .2s); }
.s-art-track path:first-of-type { stroke: var(--accent); stroke-width: 2; }
.site.ready .s-art-track path { stroke-dashoffset: 0; }
.s-art-track circle { fill: var(--accent); filter: drop-shadow(0 0 10px var(--accent)); }
.s-art-track span { color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ink) 55%, transparent);
  font-size: clamp(90px, 12vw, 170px); font-weight: 900; font-stretch: 125%; letter-spacing: -.02em; }
.s-stats { position: absolute; left: -14%; bottom: 9%; display: flex; gap: 12px; }
.s-stat { width: 172px; padding: 18px 18px 20px; animation: s-float 7s ease-in-out infinite;
  background: color-mix(in srgb, var(--ink) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  backdrop-filter: blur(16px) saturate(140%); }
.s-stat:first-child { background: color-mix(in srgb, var(--accent) 84%, transparent); color: var(--accent-ink);
  border-color: color-mix(in srgb, var(--accent) 70%, #fff); }
.s-stat:nth-child(2) { animation-delay: -3.5s; }
.s-stat b { display: block; margin-bottom: 12px; font-size: 50px; font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.s-stat > span { display: block; font-size: 12px; line-height: 1.4; opacity: .88; }
@keyframes s-float { 50% { transform: translateY(-10px); } }

/* ---- the moving band ---- */
.s-marquee { position: relative; z-index: 2; overflow: hidden; margin-top: -22px; padding: 15px 0;
  background: var(--accent); color: var(--accent-ink); transform: rotate(-1.4deg) scale(1.03); }
.s-marquee > div { display: flex; width: max-content; animation: s-marquee 32s linear infinite; }
.s-marquee span { display: inline-flex; align-items: center; gap: 34px; padding-right: 34px; white-space: nowrap;
  font-size: 19px; font-weight: 850; font-stretch: 112%; letter-spacing: .03em; text-transform: uppercase; }
.s-marquee span::after { content: '✦'; opacity: .55; font-size: 15px; }
@keyframes s-marquee { to { transform: translateX(-50%); } }

/* ---- sections ---- */
.s-sec { position: relative; padding: clamp(84px, 11vw, 136px) 0; scroll-margin-top: 40px; }
.s-sec + .s-sec { border-top: 1px solid var(--edge); }
.s-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 30px 60px; margin-bottom: 56px; }
.s-aside { display: grid; justify-items: start; gap: 22px; max-width: 380px; font-size: 15px; line-height: 1.6; color: var(--mute); }
.s-aside p { margin: 0; }
.site .rv { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms); }
.site .rv.in { opacity: 1; transform: none; }

.s-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.s-prose p { margin: 0 0 18px; font-size: 17px; line-height: 1.72; color: var(--mute); }
.s-prose > p:first-child { font-size: 22px; line-height: 1.5; color: var(--ink); }
.s-prose ul { padding-left: 18px; color: var(--mute); line-height: 1.7; }
.s-facts { display: grid; max-width: 380px; margin-top: 36px; }
.s-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--edge); font-size: 14px; }
.s-facts span { color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; align-self: center; }
.s-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.s-socials a { padding: 10px 14px; border: 1px solid var(--edge); color: var(--mute); transition: color .2s, border-color .2s;
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.s-socials a:hover { color: var(--ink); border-color: var(--accent); }
.s-prose .s-creds { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--edge); }
.s-creds li { display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; padding: 17px 0; border-bottom: 1px solid var(--edge); }
.s-creds b { font-weight: 650; }
.s-creds span { grid-column: 1; font-size: 13px; color: var(--faint); }
.s-creds em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; color: var(--accent);
  font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.s-video { position: relative; aspect-ratio: 16 / 9; margin-top: 64px; background: var(--panel); }
.s-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- what she offers: numbered, and they flood with colour ---- */
.s-cards { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1px; background: var(--edge); border: 1px solid var(--edge); }
.s-card { position: relative; isolation: isolate; overflow: hidden; padding: 34px 28px 42px; background: var(--panel); }
.s-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: scaleY(0); transform-origin: bottom; transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.s-card:hover::before { transform: scaleY(1); }
.s-num { display: flex; align-items: center; gap: 14px; margin-bottom: 38px; color: var(--accent); transition: color .3s;
  font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.s-num::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .45; }
.s-card h3 { margin: 0 0 16px; font-size: 22px; font-weight: 800; font-stretch: 108%; line-height: 1.05; text-transform: uppercase; transition: color .3s; }
.s-card p, .s-card li { font-size: 14px; line-height: 1.65; color: var(--mute); transition: color .3s; }
.s-card p { margin: 0 0 8px; }
.s-card ul { margin: 0; padding-left: 16px; }
.s-card:hover h3, .s-card:hover p, .s-card:hover li, .s-card:hover .s-num { color: var(--accent-ink); }

/* ---- pricing ---- */
.s-pricing { background: radial-gradient(60% 60% at 88% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), var(--bg0); }
.s-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.s-plan { position: relative; display: flex; flex-direction: column; padding: 32px 28px; background: var(--panel);
  border: 1px solid var(--edge); transition: translate .4s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.s-plan:hover { translate: 0 -6px; border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.s-plan.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.s-plan-top { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.s-plan .s-num { flex: 1; margin: 0; }
.s-plan.hot .s-num { color: var(--accent-ink); }
.s-flag { padding: 5px 9px; background: var(--accent-ink); color: var(--accent);
  font-size: 9.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.s-plan h3 { margin: 0 0 10px; font-size: 20px; font-weight: 800; font-stretch: 108%; text-transform: uppercase; }
.s-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.s-price b { font-size: 58px; font-weight: 300; line-height: 1; letter-spacing: -.04em; }
.s-price span { font-size: 13px; opacity: .7; }
.s-plan p { margin: 0 0 22px; font-size: 14px; line-height: 1.55; color: var(--mute); }
.s-plan ul { display: grid; flex: 1; gap: 11px; margin: 0 0 30px; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--edge); }
.s-plan li { display: flex; gap: 10px; font-size: 14px; }
.s-plan li::before { content: '✓'; color: var(--accent); font-weight: 800; }
.s-plan.hot p, .s-plan.hot li, .s-plan.hot li::before { color: var(--accent-ink); }
.s-plan.hot ul { border-color: color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.s-compare { margin-top: 40px; overflow-x: auto; border: 1px solid var(--edge); }
.s-compare table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; }
.s-compare th { padding: 16px 18px; background: var(--panel); color: var(--faint); text-align: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.s-compare td { padding: 15px 18px; text-align: center; border-top: 1px solid var(--edge); }
.s-compare th:first-child, .s-compare td:first-child { text-align: left; color: var(--mute); }
.s-compare .yes { color: var(--accent); font-weight: 800; }
.s-compare .no { color: var(--faint); }
.s-note { margin: 28px 0 0; font-size: 14.5px; color: var(--mute); }
.s-note button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; }

/* ---- results, reviews, programs, instagram, faq ---- */
.s-numbers { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1px; background: var(--edge); border: 1px solid var(--edge); }
.s-number { padding: 36px 28px; background: var(--bg0); }
.s-number b { display: flex; align-items: baseline; gap: 10px; font-size: clamp(56px, 6vw, 84px); font-weight: 300; line-height: 1; letter-spacing: -.04em; }
.s-number small { color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.s-number > span { display: block; margin-top: 18px; font-size: 14.5px; line-height: 1.5; color: var(--mute); }
.s-number em { display: block; margin-top: 10px; font-style: normal; color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; }
.s-score { display: flex; align-items: center; gap: 16px; }
.s-score b { font-size: 76px; font-weight: 300; line-height: 1; letter-spacing: -.04em; color: var(--ink); }
.s-score > span { font-size: 12px; line-height: 1.7; letter-spacing: .08em; }
.s-score i { font-style: normal; color: var(--accent); letter-spacing: .12em; font-size: 15px; }
.s-reviews { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; }
.s-review { display: flex; flex-direction: column; margin: 0; padding: 30px 28px; background: var(--panel); border: 1px solid var(--edge); }
.s-review.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.s-stars { margin-bottom: 18px; color: var(--accent); font-size: 13px; letter-spacing: .14em; }
.s-review h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; font-stretch: 108%; line-height: 1.15; text-transform: uppercase; }
.s-review blockquote { flex: 1; margin: 0 0 26px; font-size: 15px; line-height: 1.65; color: var(--mute); }
.s-review.hot .s-stars, .s-review.hot blockquote { color: var(--accent-ink); }
.s-review figcaption { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--edge); font-size: 13px; }
.s-review.hot figcaption { border-color: color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.s-review figcaption span { display: grid; gap: 2px; }
.s-review small { opacity: .65; }
.s-review .avatar { border-radius: 0; }
.s-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.s-post { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--edge); transition: border-color .3s; }
.s-post:hover { border-color: var(--accent); }
.s-post-img { position: relative; overflow: hidden; aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, hsl(var(--h) 55% 30%), hsl(calc(var(--h) + 40) 50% 12%)); }
.s-post-img::after { content: ''; position: absolute; inset: -10%; transition: transform .9s cubic-bezier(.2, .8, .2, 1);
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, .05) 22px 23px); }
.s-post:hover .s-post-img::after { transform: translateX(34px); }
.s-post-img span { color: #fff; position: absolute; left: 20px; bottom: 14px; font-size: 46px; font-weight: 900; font-stretch: 120%; text-transform: uppercase; }
.s-post-body { display: flex; flex: 1; flex-direction: column; padding: 24px 24px 22px; }
.s-tag { align-self: flex-start; margin-bottom: 16px; padding: 5px 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 9.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.s-post h3 { margin: 0 0 10px; font-size: 18px; font-weight: 800; line-height: 1.2; }
.s-post p { flex: 1; margin: 0 0 22px; font-size: 13.5px; line-height: 1.6; color: var(--mute); }
.s-post-foot { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.s-post-foot em { font-style: normal; color: var(--accent); }
.s-ig { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.s-ig .instagram-media { margin: 0 !important; min-width: 0 !important; max-width: none !important; }
.s-faq details { border-top: 1px solid var(--edge); }
.s-faq details:last-child { border-bottom: 1px solid var(--edge); }
.s-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; list-style: none;
  font-size: 18px; font-weight: 700; cursor: pointer; transition: color .2s; }
.s-faq summary::-webkit-details-marker { display: none; }
.s-faq summary:hover { color: var(--accent); }
.s-faq summary i { position: relative; flex: none; width: 16px; height: 16px; }
.s-faq summary i::before, .s-faq summary i::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1.5px;
  background: var(--accent); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.s-faq summary i::after { transform: rotate(90deg); }
.s-faq details[open] summary i::after { transform: rotate(0); }
.s-faq details p { max-width: 62ch; margin: 0 0 24px; line-height: 1.7; color: var(--mute); }

/* ---- the close ---- */
.s-final { padding: clamp(84px, 12vw, 150px) 0; background: var(--accent); color: var(--accent-ink); }
.s-mega { margin-bottom: 46px; font-size: clamp(52px, 10vw, 150px); }
.s-final-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 30px; }
.s-final-row p { max-width: 42ch; margin: 0; font-size: 17px; line-height: 1.55; opacity: .85; }
.s-final-row div { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }
.s-link.inv { color: var(--accent-ink); opacity: .8; }
.s-link.inv:hover { opacity: 1; }
.s-foot { padding: 60px 0 40px; border-top: 1px solid var(--edge); }
.s-foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto; gap: 32px 60px; align-items: start;
  padding-bottom: 40px; border-bottom: 1px solid var(--edge); }
.s-foot-text { max-width: 44ch; margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: var(--mute); }
.s-foot-nav, .s-foot-links { display: grid; justify-items: start; gap: 12px; }
.s-foot-nav button { padding: 0; border: 0; background: none; color: var(--mute); cursor: pointer; transition: color .2s;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.s-foot-nav button:hover { color: var(--ink); }
.s-mail { padding-bottom: 2px; border-bottom: 1px solid var(--accent); font-size: 15px; font-weight: 600; }
.s-foot-links .s-socials { margin: 0; }
@media (max-width: 760px) { .s-foot-top { grid-template-columns: 1fr; } }
.s-foot-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; font-size: 12px; color: var(--faint); }
.s-foot-bot a { color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .s-head nav { display: none; }
  .s-hero { min-height: 0; padding-top: 112px; }
  .s-hero-grid, .s-split { grid-template-columns: 1fr; }
  .s-split { gap: 32px; }
  .s-art { width: min(100%, 420px); max-height: none; }
  .s-stats { left: 0; right: 0; bottom: -2%; justify-content: center; }
  .s-cards, .s-numbers, .s-reviews { grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr)); }
}
@media (max-width: 640px) { .s-cards, .s-numbers, .s-reviews { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .s-head .s-link { display: none; }
  .s-head .s-wrap { gap: 12px; }
  .s-logo { font-size: 12.5px; letter-spacing: .06em; }
  .s-head .s-btn { padding: 10px 12px; font-size: 9.5px; letter-spacing: .12em; }
  .s-head .s-btn i { display: none; }
  .s-stat { width: 46%; }
  .s-stat b { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .site *, .site *::before, .site *::after { animation: none !important; transition: none !important; }
  .site .rv, .s-title .w > span { opacity: 1; transform: none; }
  .s-art-track path { stroke-dashoffset: 0; }
}

/* ---- the coach's site editor ---- */
.addr { display: flex; align-items: center; overflow: hidden; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.field .addr input { border: 0; background: none; min-width: 0; }
.addr span { padding: 0 12px; font-size: var(--fs-sm); color: var(--text-faint); white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.rep { display: grid; gap: 8px; margin-bottom: 10px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.rep input, .rep textarea { width: 100%; padding: 9px 11px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font: inherit; outline: none; }
.rep .btn { justify-self: start; }
.savebar { position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); }
.checkrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 2px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.checkrow:last-child { border-bottom: 0; }
.checkrow .ok { color: var(--accent); font-weight: 700; }
.checkrow .todo { color: var(--text-faint); }

.subtabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.subtabs button { padding: 8px 14px; border: 0; border-radius: 9px; background: none; color: var(--text-dim); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.subtabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 16px; }
.pal { display: grid; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--pal-bg); color: var(--pal-tx);
  font: inherit; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.pal.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.pal i { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--pal-ac); }
.contrast { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; font-size: var(--fs-sm); }
.contrast span { padding: 4px 10px; border-radius: 999px; }
.contrast .ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.contrast .bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.swatchrow .hex { max-width: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-sm); }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.lay { border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; }
.lay.off { opacity: .6; }
.lay-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.lay-top .check { flex: 1; }
.lay-acts { display: flex; gap: 4px; }
.lay-body { padding: 4px 12px 12px; border-top: 1px solid var(--line-soft); }
.lay-body .check { margin: 10px 0; }
.fixedrow { padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; border: 1px dashed var(--line); color: var(--text-faint); font-size: var(--fs-sm); }
.dirty { color: var(--warn); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }

/* Marks that replaced emoji: a Strava dot, a PR tag, a medal, the bell. */
.brand em { font-style: normal; }
.autobadge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fc4c02; }
.prtag { padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  background: var(--star); color: var(--bg); }
.medal { display: block; width: 22px; height: 22px; margin: 0 auto 6px; border-radius: 50%;
  border: 2px solid currentColor; box-shadow: inset 0 0 0 3px var(--surface-2), inset 0 0 0 11px currentColor; opacity: .5; }
.badge-item.on .medal { color: var(--accent); opacity: 1; }
.ach::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 7px; background: var(--accent); }
.btn.bell svg { width: 17px; height: 17px; }

/* ============================================================ brand skin === */
/* An athlete inside a coach's workspace trains in her brand, not ours: her
   palette, her site's type and square edges, none of the app's soft chrome.
   It works by re-pointing tokens and restyling shared components, so no view
   needs to know it is branded. The coach's own dashboard stays neutral. */
:root:has(body.branded) { background: var(--ws-bg, #0a0a0b); }
body.branded {
  --bg: var(--ws-bg, #0a0a0b); --bg-tint: var(--bg); --text: var(--ws-text, #f5f5f4);
  --surface: color-mix(in srgb, var(--text) 4%, var(--bg));
  --surface-2: color-mix(in srgb, var(--text) 7%, var(--bg));
  --surface-3: color-mix(in srgb, var(--text) 11%, var(--bg));
  --line: color-mix(in srgb, var(--text) 16%, var(--bg));
  --line-soft: color-mix(in srgb, var(--text) 9%, var(--bg));
  --text-dim: color-mix(in srgb, var(--text) 68%, var(--bg));
  --text-faint: color-mix(in srgb, var(--text) 48%, var(--bg));
  --radius: 4px; --radius-sm: 3px;
  --shadow: none; --shadow-lift: 0 22px 44px -28px rgba(0, 0, 0, .5);
  background: var(--bg);
  font-family: 'Archivo', 'Inter', system-ui, -apple-system, sans-serif;
}
body.branded button, body.branded input, body.branded select, body.branded textarea { font-family: inherit; }

/* Type: heavy uppercase titles, small tracked labels with her accent square, thin big numbers. */
body.branded .pagehead h1 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 850; font-stretch: 110%;
  line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
body.branded .pagehead p { font-size: 15px; }
body.branded .panel > h2, body.branded .week-title h2, body.branded .weekbar h2 {
  display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase; }
body.branded .panel > h2::before, body.branded .week-title h2::before, body.branded .weekbar h2::before {
  content: ''; flex: none; width: 6px; height: 6px; background: var(--accent); }
body.branded .field label, body.branded .stat .k, body.branded .stat-card .k, body.branded th {
  font-size: 10.5px; font-weight: 700; letter-spacing: .18em; }
body.branded .stat-card .v, body.branded .stat .v, body.branded .hs .v { font-weight: 300; letter-spacing: -.035em; }
body.branded .stat-card .v, body.branded .hs .v { font-size: 38px; }
body.branded .hs .k { font-weight: 700; letter-spacing: .18em; }

/* Surfaces: flat panels, square edges, one hairline of accent on a stat. */
body.branded .panel, body.branded .stat-card, body.branded .sess-row, body.branded .coach-strip,
body.branded .card, body.branded .badge-item, body.branded .prrow, body.branded .rep, body.branded .lay { border-radius: var(--radius); }
body.branded .stat-card { background: var(--surface); }
body.branded .stat-card::before { width: 28px; height: 2px; background: var(--accent); opacity: 1; }
body.branded .coach-note { border-radius: 2px; background: var(--surface-2); border-left: 2px solid var(--accent); }
body.branded .field input, body.branded .field select, body.branded .field textarea,
body.branded .composer input, body.branded .searchbar, body.branded .inline-input { border-radius: 2px; }
body.branded .sheet { border-radius: 6px 6px 0 0; }
body.branded .toast { border-radius: 2px; }

/* Controls: the site's buttons and tags. */
body.branded .btn { border-radius: 2px; padding: 11px 16px; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; background: transparent;
  border-color: color-mix(in srgb, var(--text) 24%, transparent); }
body.branded .btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 42%, transparent); }
body.branded .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.branded .btn.primary:hover { filter: none; box-shadow: 0 12px 28px -14px var(--accent); }
body.branded .btn.sm { padding: 8px 12px; font-size: 10px; }
body.branded .btn.ghost { border-color: transparent; }
body.branded .chip, body.branded .ttype, body.branded .feelbadge, body.branded .vchip { border-radius: 2px; }
body.branded .chip { padding: 4px 8px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Header and tab bar: her wordmark, tracked links, an accent underline for where you are. */
body.branded .brand { font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
body.branded .brand em { color: var(--accent); }
body.branded .brand .mark { display: none; }
body.branded .brand .logo { border-radius: 0; height: 28px; width: auto; }
body.branded nav.main a { padding: 8px 12px; border-radius: 2px; font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; }
body.branded nav.main a:hover { background: none; color: var(--text); }
body.branded nav.main a.on { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
body.branded .tabbar a.on { color: var(--accent); }
body.branded .tabbar .tl { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* The consistency calendar: a column per week, a square per day, coloured by how much of the day was done. */
.heat { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.hweek { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; }
.heat i, .heat-key i { display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--surface-3); }
.heat i.h1, .heat-key i.h1 { background: color-mix(in srgb, var(--danger) 55%, var(--surface-3)); }
.heat i.h2, .heat-key i.h2 { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); }
.heat i.h3, .heat-key i.h3 { background: var(--accent); }
.heat-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: var(--fs-sm); color: var(--text-faint); }
.heat-key span { display: inline-flex; align-items: center; gap: 6px; }
body.branded .heat i, body.branded .heat-key i { border-radius: 1px; }

/* Light palettes: the same hues, deep enough to read on a pale page (each ≥ 4.5:1 on Chalk and Sand). */
:root.ws-light body.branded {
  --t-recovery: #475569; --t-endurance: #0369a1; --t-long: #4338ca; --t-threshold: #9c4706;
  --t-intervals: #b91c1c; --t-strength: #047857; --swim: #0369a1; --bike: #c2410c; --run: #b91c1c;
  --tri: #6d28d9; --strength: #047857; --warn: #9c4706; --danger: #be123c; --star: #9c4706;
  --shadow-lift: 0 22px 44px -28px rgba(0, 0, 0, .25);
}
body.branded .tabbar a { border-radius: 3px; }
body.branded .subtabs, body.branded .subtabs button, body.branded .settabs button, body.branded .seg span, body.branded .pal,
body.branded .plancard, body.branded .invitebox, body.branded .addr, body.branded .fixedrow, body.branded .contrast span { border-radius: 2px; }

/* Security */
.sec-state { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; color: var(--text-dim); }
.sec-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.sec-state.on { color: var(--accent); }
.sec-state.on::before { background: var(--accent); }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--text-dim); line-height: 1.6; }
.qrbox { width: 200px; padding: 10px; margin: 6px 0 12px; border-radius: 8px; background: #fff; }
.qrbox svg { display: block; width: 100%; height: auto; }
.keyline code, .codes code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.codes code { padding: 9px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-soft); text-align: center; }
body.branded .qrbox, body.branded .codes code { border-radius: 2px; }

/* Getting started on the coach dashboard: six steps to a first athlete, and a word when the plan is nearly full. */
.launch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.launch .meter { margin: 4px 0 14px; }
.launch-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.launch-steps button { display: flex; gap: 11px; width: 100%; height: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; font: inherit; transition: border-color .2s, background-color .2s; }
.launch-steps button:hover { border-color: var(--accent); }
.launch-steps i { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--text-faint); border-radius: 50%; }
.launch-steps .done i { border-color: var(--accent); background: var(--accent) center / 11px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 5 9l5-6' fill='none' stroke='%230b0f14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.launch-steps .done b { color: var(--text-dim); text-decoration: line-through; }
.launch-steps span { display: grid; gap: 2px; }
.launch-steps b { font-size: 13.5px; }
.launch-steps em { font-style: normal; font-size: 12px; color: var(--text-faint); }
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.nudge div { display: grid; gap: 3px; }
.nudge span { font-size: 13px; color: var(--text-dim); }
.share-kit { display: grid; gap: 10px; }
.share-row { display: flex; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.share-qr { flex: none; width: 108px; padding: 6px; border-radius: 8px; background: #fff; }
.share-qr svg { display: block; width: 100%; height: auto; }
.share-body { display: grid; align-content: start; gap: 8px; min-width: 0; }
.share-label { font-size: 12px; color: var(--text-faint); }
.share-text { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.share-acts { display: flex; gap: 8px; }
@media (max-width: 760px) { .launch-steps { grid-template-columns: 1fr; } .share-row { flex-direction: column; } .share-qr { width: 140px; } }

/* Read by screen readers, not seen. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.panel .seg.sm { margin: 2px 0 10px; }
.seg.sm button { padding: 6px 11px; font-size: 12px; }
