/* =========================================================
   CRENOE: /ai-running-coach page styles
   Uses tokens from site.css and device/layout primitives from home.css.
   3-state responsive reflow: phone (<640px), tablet (640-959px), desktop (>=960px).
   ========================================================= */

.coach-page {
  overflow-x: clip;
}

.coach-page h1,
.coach-page h2,
.coach-page h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
  color: inherit;
}

.coach-page p {
  margin: 0;
}

/* ── Hero ── */
.coach-hero {
  padding: calc(76px + clamp(24px, 3.4vw, 44px)) 0 clamp(48px, 6vw, 84px);
}

.coach-hero-grid {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

@media (min-width: 960px) {
  .coach-hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  }
}

.coach-hero .hero-copy {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.coach-hero h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -.045em;
  max-width: 14.5ch;
}

@media (max-width: 390px) {
  .coach-hero h1 {
    font-size: clamp(30px, 8.6vw, 36px);
  }
}

.coach-hero .lead {
  max-width: 46ch;
}

.coach-hero-visual {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.coach-hero-visual .phone {
  width: min(296px, 72vw);
}

/* ── Band 2: 5-step feedback loop strip ── */
.loop-band {
  background: var(--s1);
  padding: clamp(48px, 6.5vw, 84px) 0;
}

.loop-head {
  display: grid;
  gap: 14px;
  max-width: 62ch;
}

.loop-head h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.loop-head .lead {
  max-width: 56ch;
  color: var(--muted);
}

.loop-flow {
  list-style: none;
  margin: clamp(24px, 3.4vw, 40px) 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .loop-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .loop-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
}

.loop-step {
  min-width: 0;
}

.loop-step a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 44px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--s2);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text);
  transition: background-color .18s ease, transform .18s ease;
}

.loop-step a:hover {
  background: var(--s3);
  transform: translateY(-2px);
}

.loop-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--control);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.loop-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--text);
}

.loop-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 640px) and (max-width: 999px) {
  .loop-step:last-child {
    grid-column: 1 / -1;
  }
}

/* ── Shared section framing (RHYTHM 3) ── */
.coach-sec {
  padding: clamp(56px, 7.5vw, 100px) 0;
}

.coach-sec.sec-alt {
  background: var(--s1);
}

.coach-sec h2 {
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.coach-sec h3 {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.coach-split {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

@media (min-width: 900px) {
  .coach-split {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  }
  .coach-split--media-left {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    align-items: center;
  }
  .coach-split--media-right {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
  }
}

.coach-copy {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.coach-prose {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 58ch;
  overflow-wrap: break-word;
}

.coach-prose strong {
  color: var(--text);
  font-weight: 700;
}

.coach-phone-wrap {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.coach-phone-wrap .phone {
  width: min(280px, 70vw);
}

/* Tier markers: Free tonal, PRO uses .badge-pro from site.css */
.tier-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--control);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

/* Band 3 state ledger */
.state-ledger {
  margin: 0;
  box-shadow: var(--shadow-card);
}

.state-ledger .doc-kv-k {
  display: grid;
  gap: 8px;
  justify-items: start;
  align-content: start;
}

.state-ledger .doc-kv-v {
  font-size: 15px;
  line-height: 1.6;
}

.tier-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Band 4: Guardrails strip & multisport note */
.guard-grid {
  display: grid;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 48px);
}

@media (min-width: 600px) {
  .guard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .guard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.guard-cell {
  background: var(--s2);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.guard-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.guard-rule {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.multisport-note {
  margin: clamp(20px, 3vw, 32px) 0 0;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--s2);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 6px;
  max-width: 72ch;
}

.multisport-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.multisport-note p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* Band 5: Execution Score proportional bar */
.exec-meter {
  background: var(--s2);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow-card);
  max-width: 58ch;
}

.exec-meter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exec-meter-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.exec-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--control);
}

.exec-seg--exec {
  width: 40%;
  background: var(--brand);
}

.exec-seg--end {
  width: 35%;
  background: var(--selected);
}

.exec-seg--form {
  width: 25%;
  background: var(--muted);
}

.exec-legend {
  display: grid;
  gap: 10px;
}

@media (min-width: 560px) {
  .exec-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.exec-leg-item {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.exec-leg-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.exec-sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.exec-sw--exec { background: var(--brand); }
.exec-sw--end { background: var(--selected); }
.exec-sw--form { background: var(--muted); }

.exec-leg-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.exec-sublist {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.exec-subitem {
  display: grid;
  gap: 6px;
}

.exec-subitem-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

/* Band 6: Dark showcase - Rules decide, AI writes */
.adapt-band {
  padding: clamp(64px, 8vw, 112px) 0;
}

.adapt-head {
  display: grid;
  gap: 16px;
  max-width: 62ch;
}

.adapt-head h2 {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.adapt-head .lead {
  max-width: 54ch;
  color: var(--media-muted);
}

.ladder-panel {
  margin-top: clamp(28px, 4vw, 44px);
  background: var(--media-top);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.8vw, 28px);
  box-shadow: var(--float-shadow), inset 0 0 0 1px rgba(255, 255, 255, .07);
  display: grid;
  gap: 20px;
}

.ladder-rows {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .ladder-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .ladder-rows {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ladder-cell {
  background: var(--media);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--media-border);
  display: grid;
  gap: 6px;
  align-content: start;
}

.ladder-verdict {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--media-muted);
}

.ladder-action {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--media-text);
}

.ladder-note {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--media-muted);
}

.gate-strip {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--media-border);
}

@media (min-width: 780px) {
  .gate-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

.gate-step {
  background: var(--media-control);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.gate-step--guard {
  background: var(--media);
  border: 1px solid var(--media-border);
}

.gate-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--media);
  color: var(--media-text);
}

.gate-label--lime {
  background: var(--brand);
  color: var(--on-brand);
}

.gate-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--media-text);
}

.adapt-grid {
  display: grid;
  gap: 24px;
  margin-top: clamp(28px, 4vw, 44px);
}

@media (min-width: 760px) {
  .adapt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

.adapt-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.adapt-col h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  color: var(--media-text);
}

.adapt-col p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--media-muted);
}

/* Band 7: Race day + heat table + Cren + watches */
.race-head {
  display: grid;
  gap: 14px;
  max-width: 58ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.heat-card {
  background: var(--s2);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.6vw, 28px);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.heat-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.heat-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--s1);
}

.heat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.heat-table th,
.heat-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.heat-table th:last-child,
.heat-table td:last-child {
  white-space: normal;
}

@media (max-width: 639px) {
  .coach-page .proof-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .coach-page .proof-card .phone {
    justify-self: center;
    max-width: 240px;
    margin-bottom: 0;
  }
}

.heat-table tr:last-child th,
.heat-table tr:last-child td {
  border-bottom: 0;
}

.heat-table thead th {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.heat-table tbody th {
  font-weight: 700;
  color: var(--text);
}

.heat-table tbody td {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
}

.coach-chat-block {
  margin-top: clamp(48px, 7vw, 88px);
}

.watch-strip {
  margin-top: clamp(32px, 5vw, 56px);
  background: var(--s1);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 820px) {
  .watch-strip {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 40px;
  }
}

.watch-strip .face-round {
  width: clamp(132px, 15vw, 176px);
}

.watch-strip .face-rect {
  width: clamp(110px, 12vw, 142px);
}

.watch-strip-copy {
  display: grid;
  gap: 10px;
  justify-items: start;
  min-width: 0;
}

/* Band 8: Pricing tweaks for coach page */
.coach-pricing {
  padding: clamp(56px, 8vw, 100px) 0 clamp(40px, 6vw, 72px);
}

/* Band 9: FAQ */
.coach-faq {
  background: var(--s1);
  padding: clamp(56px, 7.5vw, 96px) 0;
}

.coach-faq-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 420px) {
  .coach-faq-inner {
    padding: 0 16px;
  }
}

.coach-faq h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-bottom: 24px;
}

.coach-faq .faq-a p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* Closing band on coach page */
.coach-close h2 {
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.foot-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .loop-step a:hover {
    transform: none;
  }
}
