/* App-frame: makes server-rendered coach/coaches pages feel like the PWA —
   a centred phone column with a rounded card on desktop + an app-style top bar
   with a back arrow that returns into the app (history.back). */
body.appframe { background: var(--n-200); }
.appshell { width: min(100vw, 480px); margin: 0 auto; min-height: 100dvh; background: var(--bg-page); }
@media (min-width: 540px) {
  body.appframe { padding: 28px 0; }
  .appshell { min-height: calc(100dvh - 56px); border-radius: 30px; overflow: hidden;
    box-shadow: 0 50px 90px -30px rgba(20,20,18,.45), 0 0 0 1px rgba(20,20,18,.06); }
}
.appbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border-1); background: var(--bg-page); }
.appbar__back { flex: none; width: 38px; height: 38px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: var(--n-100); color: var(--ink); text-decoration: none; font-size: 19px; line-height: 1; }
.appbar__back:hover { background: var(--n-200); }
.appbar__brand { font-weight: 900; font-size: 20px; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.appbar__brand .t { color: var(--track); }
.appbar__share { margin-left: auto; flex: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800;
  padding: 8px 14px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); }
.appbar__share:hover { background: var(--track-deep); }
.legal__topr { display: inline-flex; align-items: center; gap: 14px; }
/* Inside the narrow shell the profile uses tighter padding than the wide doc. */
.appframe .coach { max-width: none; padding: 24px 20px calc(40px + env(safe-area-inset-bottom)); }
.appframe .coach__hero { flex-direction: column; align-items: flex-start; text-align: left; }

/* decoded.training — coach profile + article pages (built on tokens + legal.css). */
.coach { max-width: 720px; margin: 0 auto; padding: 28px 22px 64px; }

.coach__hero { display: flex; gap: 20px; align-items: center; margin-bottom: 28px; }
.coach__avatar {
  flex: none; width: 104px; height: 104px; border-radius: var(--r-pill);
  background: var(--ink); background-size: cover; background-position: center;
  color: var(--volt); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 44px; text-transform: uppercase;
  box-shadow: var(--shadow-md);
}
.coach__badge { font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--track-deep); }
.coach__name { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(30px, 6vw, 46px); line-height: .95; letter-spacing: -.01em; margin: 4px 0 6px; }
.coach__tagline { font-size: 16px; font-weight: 600; color: var(--fg-2); margin: 0 0 6px; }
.coach__link { font-size: 14px; font-weight: 700; color: var(--fg-link); text-decoration: none; }
.coach__link:hover { text-decoration: underline; }

/* Full-bleed hero banner when the coach has a photo: the image fills the top of
   the card and the name sits on a dark gradient, instead of the small avatar.
   Negative margins cancel the .coach padding so the image runs edge to edge. */
.coach__hero--photo {
  position: relative; display: block; margin: -24px -20px 24px;
  aspect-ratio: 4 / 5; max-height: 72vh;
  background: var(--ink) center top / cover no-repeat;
}
.coach__hero--photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,15,13,.9) 0%, rgba(15,15,13,.5) 30%, rgba(15,15,13,0) 58%);
}
.coach__heroinner {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 22px 20px;
}
.coach__badge--on { color: var(--volt); }
.coach__name--on { color: #fff; }
.coach__tagline--on { color: rgba(255,255,255,.86); }
.coach__link--on { color: var(--volt); }

.coach__sec { margin-top: 30px; }
.coach__h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }
.coach__ach ul { list-style: none; padding-left: 0; }
.coach__ach li { padding-left: 22px; position: relative; }
.coach__ach li::before { content: "▸"; position: absolute; left: 0; color: var(--track-deep); }

.coach__articles { display: flex; flex-direction: column; gap: 12px; }
.coach__article {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: var(--bg-surface); border: 1px solid var(--border-1);
  border-radius: var(--r-md); padding: 16px; color: var(--fg-1);
}
.coach__article:hover { border-color: var(--ink); }
.coach__article strong { font-size: 17px; }
.coach__lead { font-size: 14px; color: var(--fg-2); }
.coach__tag { align-self: flex-start; font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--track-deep); background: var(--track-soft); padding: 3px 8px; border-radius: var(--r-pill); text-decoration: none; }

.coach__answers { display: flex; flex-direction: column; gap: 16px; }
.coach__qa { background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: var(--r-md); padding: 16px; }
.coach__q { font-size: 16px; font-weight: 700; margin: 8px 0 10px; }
.coach__a { font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.coach__a strong { color: var(--ink); }

@media (max-width: 480px) {
  .coach__hero { gap: 14px; }
  .coach__avatar { width: 80px; height: 80px; font-size: 34px; }
}

/* Coaches index (/coaches) — roster cards */
.coachgrid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
@media (min-width: 560px) { .coachgrid { grid-template-columns: 1fr 1fr; } }
.coachcard {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  background: var(--bg-surface); border: 1px solid var(--border-1);
  border-radius: var(--r-lg); padding: 16px; color: var(--fg-1);
  box-shadow: var(--shadow-sm); transition: border-color .12s ease, transform .12s ease;
}
.coachcard:hover { border-color: var(--ink); transform: translateY(-2px); }
.coachcard__av {
  flex: none; width: 64px; height: 64px; border-radius: var(--r-pill);
  background: var(--ink); background-size: cover; background-position: center;
  color: var(--volt); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 28px; text-transform: uppercase;
}
.coachcard__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.coachcard__name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.coachcard__tag { font-size: 14px; color: var(--fg-2); }
.coachcard__go { font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--track-deep); margin-top: 4px; }

/* Article byline + media */
.abyl-row { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.abyl { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg-1); font-weight: 700; font-size: 14px; }
.abyl:hover .abyl__name { text-decoration: underline; }
.abyl__av { width: 30px; height: 30px; border-radius: 999px; background: var(--ink); background-size: cover; background-position: center; color: var(--volt); display: grid; place-items: center; font-family: var(--font-display); font-size: 14px; text-transform: uppercase; flex: none; }
.abyl__date { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
.article__img { width: 100%; border-radius: var(--r-lg); margin: 6px 0 18px; display: block; }
.article__lead { font-size: 19px; line-height: 1.5; font-weight: 600; color: var(--fg-1); margin: 0 0 20px; }
.btn-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fg-link); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
