/* Autoclean Academy — member app (Track B Phase 4)
   Light, fast, mobile-first. One accent, generous space, no clutter.
   Went white 2026-09-02 (Aaron's call): it's a reading surface used in bright
   places, and members are coming from Skool's white UI. Image cards (posters,
   banners) keep their dark scrims + white type — those sit on artwork, not on
   the page. */

:root {
  --bg: #f5f6f8;
  --bg-raise: #edeff3;
  --bg-card: #ffffff;
  --border: #e2e5eb;
  --text: #171b26;
  --dim: #565f70;
  --faint: #8a92a4;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .09);
  --green: #169a63;
  --amber: #d97706;
  --radius: 14px;
  --pad: clamp(16px, 4vw, 28px);
}

/* Learning and discovery share the existing card and blue accent system. */
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid var(--accent);outline-offset:3px;
}
.replay-highlights { display:grid;gap:10px;margin-top:12px;font-size:13px; }
.replay-highlights a { color:var(--accent); }
.topic-filter { margin-top:8px; }
.topic-filter summary { cursor:pointer;color:var(--dim);padding:8px 0;font-size:14px; }
.profile-file { display:block;max-width:190px;font-size:12px;margin-top:6px; }
.ask-feedback [aria-pressed=true] { background:var(--accent);color:white; }
button.module-head { width:100%;border:0;background:none;color:inherit;text-align:left;font:inherit; }
@media(max-width:720px) {
  .topbar { flex-wrap:wrap;gap:8px !important; }
  .searchbox { flex-basis:100% !important;max-width:none !important;order:3; }
  .ask-open { margin-left:auto; }
  .search-panel { top:108px !important; }
}

* { box-sizing: border-box; }
/* An installed app does not pinch-zoom (2026-10-14, Aaron on Android): the
   sticky top bar and fixed tab bar pin to the layout viewport, so a pinch
   zooms the feed out from under them and nothing lines up. The viewport meta
   locks it in the browser; touch-action is the belt for Chrome. */
html { -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; -webkit-tap-highlight-color: transparent; }
.topbar, .tabbar, .nav { -webkit-touch-callout: none; user-select: none; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  /* 16px (was 15, Aaron 2026-09-06): the browser default, matches Skool, and
     it's the size below which iOS zooms into a focused input. Captions and
     chips keep their own smaller sizes; reading text inherits this. */
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ── Sign in ─────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100dvh; display: grid; place-items: center; padding: var(--pad);
  background:
    radial-gradient(700px 400px at 85% -10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(500px 320px at -10% 100%, rgba(37,99,235,.06), transparent 60%),
    var(--bg);
}
.login-card { width: min(380px, 100%); text-align: center; }
.login-logo { font-size: 22px; font-weight: 800; letter-spacing: .14em; }
.login-logo span, .brand span { color: var(--accent); }
.login-sub { color: var(--dim); margin: 6px 0 26px; }
.login-label { display: block; text-align: left; color: var(--dim); font-size: 12.5px; margin-bottom: 6px; }
.login-card input {
  width: 100%; padding: 13px 16px; border-radius: 12px; margin-bottom: 12px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font-size: 16px;
}
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-err { color: #d64545; min-height: 1.2em; font-size: 13px; }

.btn-primary {
  width: 100%; padding: 13px 18px; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; }

.login-sent-title { font-size: 18px; font-weight: 700; margin: 4px 0 10px; }
.login-sent-sub { color: var(--dim); font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.login-sent-sub span { color: var(--text); }
.btn-ghost {
  padding: 9px 16px; border-radius: 10px; margin-top: 6px;
  background: transparent; border: 1px solid var(--border); color: var(--dim); font-size: 13px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--dim); }
.link-btn {
  background: none; border: 0; padding: 0; color: var(--accent); font-size: inherit;
  text-decoration: underline; cursor: pointer;
}
#login-help { text-align: left; }
#login-help .login-sent-title, #login-help .login-sent-sub { text-align: center; }

/* Admin: access requests + invite-everyone (Members tab) */
.req-card { padding: 12px 14px; margin-bottom: 10px; }
.req-head { font-weight: 600; font-size: 14px; }
.req-sub { color: var(--dim); font-size: 12.5px; margin: 2px 0 8px; }
.req-cands { display: flex; gap: 6px; flex-wrap: wrap; }
.req-why { color: var(--dim); font-size: 11.5px; margin-top: 6px; }
.invite-all-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.member-row .aliases { color: var(--dim); font-weight: 400; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 12px var(--pad);
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; letter-spacing: .12em; font-size: 14px; white-space: nowrap; cursor: pointer; }
.searchbox { flex: 1; max-width: 520px; }
.searchbox input {
  width: 100%; padding: 9px 16px; border-radius: 999px; font-size: 16px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
}
.searchbox input:focus { outline: none; border-color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 7px 14px; border-radius: 999px; color: var(--dim); font-weight: 600; font-size: 14px; }
.nav a.active { color: var(--text); background: var(--accent-soft); }

/* Mobile: bottom tab bar instead of top nav */
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 9px 0 7px; color: var(--faint); font-size: 11px; font-weight: 600;
  }
  .tabbar a.active { color: var(--accent); }
  .tab-ico { font-size: 17px; line-height: 1; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ── Layout ──────────────────────────────────────────────────────────── */
main { max-width: 1060px; margin: 0 auto; padding: var(--pad); }
.section-title {
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); margin: 26px 0 12px;
}
.section-title:first-child { margin-top: 4px; }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: block;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
a.card { transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ── Home ────────────────────────────────────────────────────────────── */
.hero-card {
  position: relative; overflow: hidden; padding: 22px;
  background: linear-gradient(135deg, rgba(37,99,235,.09), rgba(37,99,235,.02) 55%), var(--bg-card);
}
/* Art cards sit on poster/banner images behind a dark scrim — type stays white
   there even though the page went light. */
.hero-card.has-art {
  min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center; color: #fff;
}
.hero-card.has-art .hero-kicker { color: #9db9f5; }
.hero-card.has-art::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,9,13,.94) 8%, rgba(7,9,13,.45) 55%, rgba(7,9,13,.12));
}
.hero-card.has-art > * { position: relative; }
.hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.hero-title { font-size: clamp(19px, 3.4vw, 24px); font-weight: 750; margin: 0 0 4px; }
.hero-meta { color: var(--dim); font-size: 13px; }
.hero-card.has-art .hero-meta { color: #b9c1d4; }
.progress-track { height: 5px; background: var(--border); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.hero-card.has-art .progress-track { background: rgba(255,255,255,.22); }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.home-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .home-grid { grid-template-columns: 1fr 1fr; } }

/* ── Classroom ───────────────────────────────────────────────────────── */
.course-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .course-grid { grid-template-columns: 1fr 1fr; } }
.course-card {
  position: relative; padding: 0; aspect-ratio: 16 / 8.5;
  display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center; color: #fff;
}
.course-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(to top, rgba(7,9,13,.95) 10%, rgba(7,9,13,.42) 52%, rgba(7,9,13,.05));
}
.course-card .inner { position: relative; padding: 18px; }
.course-card .hero-title { font-size: 19px; }
.course-card .hero-meta { color: #b9c1d4; }
.course-stats { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #b9c1d4; font-size: 13px; }
.course-stats .progress-track { flex: 1; margin: 0; background: rgba(255,255,255,.22); }

.course-banner {
  /* No overflow:hidden on purpose: an aspect-ratio box only grows with its
     content when overflow is visible AND min-height stays auto; the title must never clip. */
  position: relative; border-radius: var(--radius); border: 1px solid var(--border);
  aspect-ratio: 16 / 5.5; background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 16px;
  color: #fff;
}
.course-banner::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(to top, rgba(7,9,13,.92) 5%, rgba(7,9,13,.35) 50%, rgba(7,9,13,.05));
}
.course-banner .inner { position: relative; padding: 20px; }
.course-banner .desc { color: #b9c1d4; font-size: 13.5px; max-width: 62ch; margin-top: 4px; }

.thumb {
  width: 96px; aspect-ratio: 16/9; border-radius: 8px; flex: none;
  object-fit: cover; background: var(--bg-raise); border: 1px solid var(--border);
}
.thumb.sm { width: 78px; }

.module { border-bottom: 1px solid var(--border); }
.module:last-child { border-bottom: 0; }
.module-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 4px; cursor: pointer;
  font-weight: 700; user-select: none;
}
.module-head .chev { color: var(--faint); transition: transform .15s; }
.module.open .chev { transform: rotate(90deg); }
.module-count { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 600; }
.lesson-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px 11px 26px;
  border-radius: 10px; color: var(--text);
}
.lesson-row:hover { background: var(--bg-raise); }
.check {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--faint); display: grid; place-items: center; font-size: 11px;
}
.check.done { background: var(--green); border-color: var(--green); color: #fff; font-weight: 800; }
.lesson-row .t { flex: 1; min-width: 0; }
.lesson-row .d { color: var(--faint); font-size: 12px; }
.back-link { display: inline-block; color: var(--dim); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }

/* ── Player pages ────────────────────────────────────────────────────── */
.player-wrap {
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 16 / 9;
}
.player-wrap video { width: 100%; height: 100%; display: block; }
.lesson-head { margin: 18px 0 6px; }
.crumb { color: var(--dim); font-size: 13px; margin-bottom: 4px; }
.crumb b { color: var(--accent); font-weight: 600; }
h1.title { font-size: clamp(20px, 3.6vw, 26px); margin: 0; font-weight: 750; line-height: 1.25; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
}
.chip:hover { border-color: var(--accent); }
.chip.done { background: rgba(22,154,99,.10); border-color: var(--green); color: var(--green); }
.chip.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.body-text { color: #333b4d; white-space: pre-wrap; max-width: 74ch; }
/* Converted Skool lesson copy (lib/skoolRichText.js). Whitelisted tags only:
   p, strong, em, u, s, code, a, ol, ul, li, h2-h6, blockquote, pre, hr, img. */
.body-rich { color: #333b4d; max-width: 74ch; font-size: 16px; line-height: 1.65; }
.body-rich > *:first-child { margin-top: 0; }
.body-rich p { margin: 0 0 12px; }
.body-rich strong { color: var(--text); font-weight: 700; }
.body-rich a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.body-rich h2, .body-rich h3, .body-rich h4, .body-rich h5, .body-rich h6 {
  color: var(--text); margin: 22px 0 10px; line-height: 1.3;
}
.body-rich h2 { font-size: 19px; }
.body-rich h3 { font-size: 17px; }
.body-rich h4, .body-rich h5, .body-rich h6 { font-size: 16px; }
.body-rich ol, .body-rich ul { margin: 0 0 12px; padding-left: 22px; }
.body-rich li { margin-bottom: 6px; }
.body-rich li > p { margin: 0 0 4px; }
.body-rich blockquote {
  margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent);
  background: var(--bg-card); border-radius: 0 8px 8px 0;
}
.body-rich code { background: var(--bg-card); padding: 2px 5px; border-radius: 4px; font-size: 13px; }
.body-rich pre { background: var(--bg-card); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 0 0 12px; }
.body-rich pre code { background: none; padding: 0; }
.body-rich hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.body-rich img { max-width: 100%; height: auto; border-radius: 8px; }
.attachments { margin-top: 14px; display: grid; gap: 8px; }
.attachments a { display: flex; gap: 8px; align-items: center; color: var(--accent); font-size: 14px; font-weight: 600; }
.coach-chip {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ── Replays ─────────────────────────────────────────────────────────── */
.replay-filter { margin-bottom: 14px; }
.replay-filter input {
  width: 100%; max-width: 420px; padding: 11px 16px; border-radius: 12px; font-size: 16px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
}
.replay-filter input:focus { outline: none; border-color: var(--accent); }
.replay-row {
  display: flex; align-items: center; gap: 14px; padding: 10px 6px;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.replay-row:hover { background: var(--bg-raise); border-radius: 10px; }
.replay-row .t { flex: 1; min-width: 0; font-weight: 600; line-height: 1.35; }
.replay-row .sub { color: var(--faint); font-size: 12.5px; font-weight: 500; margin-top: 3px; }

/* ── Live calls ──────────────────────────────────────────────────────── */
.call-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; }
.call-row + .call-row { border-top: 1px solid var(--border); }
.call-row .t { flex: 1; min-width: 0; font-weight: 650; }
.call-row .sub { color: var(--dim); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); margin-right: 6px; animation: pulse 1.4s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.push-optin {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px;
  background: var(--accent-soft); border: 1px solid transparent; border-radius: 10px;
  color: var(--accent); font-size: 13px; font-weight: 600; text-align: center;
}
.push-optin:hover { border-color: var(--accent); }
.push-note {
  margin-top: 6px; padding: 8px 12px; text-align: center;
  color: var(--dim); font-size: 12.5px;
}

/* ── Replay library (cards, rails, filters) ──────────────────────────── */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fchip {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--dim);
}
.fchip:hover { color: var(--text); }
.fchip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.replay-grid {
  display: grid; gap: 12px; margin-bottom: 20px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.replay-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 300px);
  gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px;
  scroll-snap-type: x mandatory;
}
.replay-rail .replay-card { scroll-snap-align: start; }
.replay-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color .15s;
}
.replay-card:hover { border-color: var(--accent); }
.rc-poster { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-raise); display: block; }
.rc-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; }
.rc-title { font-weight: 650; font-size: 14px; line-height: 1.35; }
.rc-meta { color: var(--dim); font-size: 12px; }
.rc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.rc-tags span {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ── Home greeting + skeleton loaders ────────────────────────────────── */
.home-greeting { font-size: 22px; font-weight: 800; margin: 4px 0 14px; }
.skel-wrap { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.skel {
  border-radius: var(--radius); background: var(--bg-raise);
  animation: skel 1.4s ease-in-out infinite;
}
@keyframes skel { 50% { opacity: .45; } }

/* ── Transcript pane ─────────────────────────────────────────────────── */
.transcript { padding: 12px; margin-bottom: 16px; }
.transcript input {
  width: 100%; padding: 9px 12px; border-radius: 10px; margin-bottom: 10px;
  background: var(--bg-raise); border: 1px solid var(--border); color: var(--text); font-size: 16px;
}
.transcript input:focus { outline: none; border-color: var(--accent); }
.tr-list { max-height: 44vh; overflow-y: auto; display: flex; flex-direction: column; }
.tr-cue {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 7px 8px; border-radius: 8px; background: none; border: 0; color: var(--text);
  font-size: 14px; line-height: 1.5;
}
.tr-cue:hover { background: var(--bg-raise); }
.tr-cue.active { background: var(--accent-soft); }
.tr-cue.active .tr-time { color: var(--accent); }
.tr-time { color: var(--faint); font-size: 12px; font-weight: 700; flex: 0 0 44px; padding-top: 2px; }
.tr-text { color: var(--dim); }
.tr-cue.active .tr-text { color: var(--text); }

/* ── Ask the Academy ─────────────────────────────────────────────────── */
.ask-open {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; flex: none;
}
.ask-open:active { transform: translateY(1px); }
.ask-panel {
  position: fixed; z-index: 50; display: flex; flex-direction: column;
  background: var(--bg-raise); border: 1px solid var(--border); overflow: hidden;
  left: 0; right: 0; bottom: 0; top: 16vh; border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 48px rgba(15, 23, 42, .22);
}
@media (min-width: 721px) {
  .ask-panel {
    left: auto; top: auto; right: 24px; bottom: 24px;
    width: 420px; height: min(640px, 82vh); border-radius: 18px;
  }
}
.ask-head { padding: 14px 44px 12px 16px; border-bottom: 1px solid var(--border); position: relative; }
.ask-title { font-weight: 800; font-size: 15px; }
.ask-sub { color: var(--dim); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.ask-close {
  position: absolute; top: 10px; right: 10px; background: none; border: 0;
  color: var(--dim); font-size: 15px; padding: 8px;
}
.ask-close:hover { color: var(--text); }
.ask-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.ask-msg {
  max-width: 88%; padding: 10px 13px; border-radius: 14px;
  font-size: 15px; line-height: 1.55; white-space: pre-wrap;
}
.ask-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.ask-msg.bot { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ask-msg.thinking { color: var(--dim); animation: askpulse 1.6s ease-in-out infinite; }
@keyframes askpulse { 50% { opacity: .45; } }
.ask-ref { color: var(--accent); font-weight: 700; }
.ask-cites { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ask-cite {
  display: flex; gap: 8px; align-items: center; padding: 7px 10px;
  border-radius: 10px; background: var(--accent-soft); font-size: 12.5px;
}
.ask-cite-n { color: var(--accent); font-weight: 800; }
.ask-cite-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ask-cite:hover .ask-cite-t { color: var(--accent); }
.ask-form {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.ask-form input {
  flex: 1; padding: 11px 14px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font-size: 16px;
}
.ask-form input:focus { outline: none; border-color: var(--accent); }
.ask-send { width: 44px; height: 42px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font-size: 17px; }
.ask-empty { color: var(--dim); font-size: 13px; margin-bottom: 2px; }
.ask-sugg {
  text-align: left; padding: 10px 13px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font-size: 13.5px;
}
.ask-sugg:hover { border-color: var(--accent); color: var(--accent); }

/* ── Chapters ────────────────────────────────────────────────────────── */
.chapters { padding: 6px 8px; }
.chapter-row {
  display: flex; align-items: baseline; gap: 14px; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text); padding: 9px 10px; border-radius: 9px;
  font: inherit; font-size: 14px;
}
.chapter-row:hover { background: var(--bg-raise); }
.ch-time {
  color: var(--accent); font-weight: 700; font-size: 12.5px; width: 52px; flex: none;
  font-variant-numeric: tabular-nums;
}
.ch-title { line-height: 1.4; }

/* ── Search ──────────────────────────────────────────────────────────── */
.search-panel {
  position: fixed; inset: 57px 0 0 0; z-index: 15; overflow-y: auto;
  background: rgba(245,246,248,.97); backdrop-filter: blur(10px);
  padding: var(--pad);
}
.search-inner { max-width: 760px; margin: 0 auto; }
.search-hit { display: block; padding: 15px 16px; margin-bottom: 10px; }
.search-hit .where { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.search-hit .t { font-weight: 700; margin: 3px 0 5px; }
.search-hit .snip { color: var(--dim); font-size: 14px; }
.stamp-chip {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.search-empty { color: var(--dim); text-align: center; padding: 40px 0; }

/* ── Misc ────────────────────────────────────────────────────────────── */
.spinner { color: var(--faint); text-align: center; padding: 48px 0; }
.pager { display: flex; gap: 10px; margin-top: 22px; }
.pager a { flex: 1; }
.pager .card { padding: 13px 16px; }
.pager .lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }
.pager .nm { font-weight: 650; font-size: 14px; margin-top: 2px; }
.pager .next { text-align: right; }

/* ── calendar page (§6.9) ─────────────────────────────────────────────── */
.page-sub { color: var(--dim); font-size: 15px; margin: 4px 0 14px; }
.cal-actions { margin-bottom: 18px; }
.cal-list { display: grid; gap: 10px; margin-bottom: 22px; }
.cal-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.cal-row.live { border-color: var(--green); }
.cal-time { font-weight: 700; min-width: 76px; }
.cal-info { flex: 1; min-width: 0; }
.cal-title { font-weight: 600; }
.cal-meta { color: var(--dim); font-size: 13px; margin-top: 2px; }
.cal-meta b { color: var(--green); }
.cal-row.ended { opacity: .62; }
.cal-row.cancelled .cal-title { text-decoration: line-through; color: var(--dim); }
.cal-cancel { color: #b3261e; font-weight: 600; }

/* Live Calls — view toggle, month nav, the grid (2026-09-06) */
.cal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-raise); border: 1px solid var(--border); }
.seg-btn { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--dim); }
.seg-btn.active { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .10); }
.cal-sub { margin: -6px 0 16px; }
.cal-sub-card { padding: 14px 16px; }
.cal-sub-title { font-weight: 600; margin-bottom: 10px; }
.cal-sub-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-sub-note { color: var(--dim); font-size: 12.5px; margin-top: 10px; }
.cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-month { font-weight: 700; font-size: 17px; min-width: 176px; text-align: center; }
.cal-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--dim); font-size: 22px; line-height: 1; padding: 0 0 2px;
}
.cal-arrow:hover { border-color: var(--accent); color: var(--text); }
.cal-today { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 18px; }
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint); padding: 4px 0;
}
.cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 84px; min-width: 0; padding: 6px; overflow: hidden; text-align: left;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.other { background: transparent; border-color: transparent; color: var(--faint); }
.cal-cell.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-num { font-size: 13px; font-weight: 600; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; }
.cal-dots { display: none; gap: 3px; }
.cal-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-dot.ended { background: var(--faint); }
.cal-dot.live { background: var(--green); }
.cal-dot.cancelled { background: transparent; border: 1.5px solid var(--faint); width: 5px; height: 5px; }
.cal-evts { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; }
.cal-evt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 11.5px; font-weight: 500; line-height: 1.3; padding: 2px 6px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); overflow-wrap: anywhere;
}
.cal-evt b { font-weight: 700; }
.cal-evt.ended { background: var(--bg-raise); color: var(--dim); }
.cal-evt.live { background: rgba(22, 154, 99, .12); color: var(--green); }
.cal-evt.cancelled { background: var(--bg-raise); color: var(--faint); text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--dim); padding-left: 6px; }
.cal-daypanel { margin-top: 6px; }
@media (max-width: 720px) {
  .cal-cell { min-height: 46px; align-items: center; gap: 3px; padding: 5px 2px; }
  .cal-evts { display: none; }
  .cal-dots { display: flex; }
  .cal-month { min-width: 0; flex: 1; }
  .cal-time { min-width: 64px; }
}

/* ── feed (§6.8) ──────────────────────────────────────────────────────── */
.feed-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.composer {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; margin-bottom: 18px;
}
.composer textarea {
  width: 100%; background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 10px; font: inherit; resize: vertical;
}
.composer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.composer select {
  background: var(--bg-raise); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 10px; font: inherit;
}
.post-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; color: var(--text);
}
.post-card:hover { border-color: var(--accent); }
.post-card.pinned { border-color: var(--amber); }
.post-meta { color: var(--dim); font-size: 13px; margin-bottom: 6px; }
.post-author { font-weight: 600; color: var(--text); }
.post-title { font-weight: 700; margin-bottom: 4px; }
.post-body { color: var(--dim); font-size: 14px; white-space: pre-wrap; }
.post-counts { color: var(--faint); font-size: 13px; margin-top: 8px; }
.post-full { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.post-body-full { white-space: pre-wrap; margin: 10px 0 14px; line-height: 1.6; }
.comment { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; font-size: 14px; }

/* home community strip */
.see-all { float: right; color: var(--accent); font-size: 13px; font-weight: 600; }
.mini-post { display: block; padding: 10px 6px; color: var(--text); border-bottom: 1px solid var(--border); }
.mini-post:last-child { border-bottom: 0; }
.mini-post-body { font-size: 14px; margin: 2px 0 4px; }
.mini-post .post-counts { margin-top: 0; }

/* ── Skool-style home: feed main column + personal side rail ──────────── */
/* Rows: rail top, rail bottom, then a 1fr spacer that soaks up the feed's height so
   the bottom rail sits directly under the top one instead of mid-page. */
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto 1fr; gap: 0 24px; align-items: start; }
.home-main { grid-column: 1; grid-row: 1 / 4; }
.home-side { grid-column: 2; }
.home-side .section-title { margin-top: 18px; }
.home-side .home-grid.side-grid { grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .home-cols { display: flex; flex-direction: column; }
  /* home = community: only the essentials (next step + calls) sit above the
     feed on mobile; replay/moments/jump-in follow it */
  .side-top { order: 0; }
  .home-main { order: 1; margin-top: 16px; }
  .side-bottom { order: 2; margin-top: 8px; }
}

/* ── Members (admin) + feed moderation ─────────────────────────────────── */
.member-invite { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; }
.member-invite input {
  flex: 1; min-width: 200px; background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 9px 12px; font: inherit;
}
.member-invite input:focus { outline: none; border-color: var(--accent); }
.member-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.member-row .t { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; }
.member-row .sub { font-weight: 400; font-size: 12px; color: var(--dim); margin-top: 2px; overflow-wrap: anywhere; }
.member-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.coach-chip.admin { background: rgba(22, 154, 99, .12); color: var(--green); }
.post-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.chip.danger { color: #b3261e; }
.chip.danger:hover { border-color: #b3261e; }
.comment .post-meta { display: flex; align-items: center; gap: 8px; }
.c-del {
  margin-left: auto; border: 0; background: none; color: var(--dim);
  font-size: 13px; padding: 2px 6px; border-radius: 6px;
}
.c-del:hover { color: #b3261e; background: var(--bg-raise); }

/* ── Likes, schedule editor, install card ──────────────────────────────── */
.likers { font-size: 12px; color: var(--dim); margin-top: 6px; min-height: 1em; }
.comment-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.c-like {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--dim);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.c-like.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cal-note { color: var(--accent); font-weight: 600; font-size: 13px; }
.sched-manage summary { cursor: pointer; list-style: none; }
.sched-manage summary::-webkit-details-marker { display: none; }
.sched-form { padding: 14px 16px; margin-bottom: 12px; }
.sf { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 12px; color: var(--dim); font-weight: 600; }
.sf input, .sf select {
  background: var(--bg-raise); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 10px; font: inherit; font-size: 14px;
}
.sf input:focus, .sf select:focus { outline: none; border-color: var(--accent); }
.sf-check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.occ-editor { margin: 6px 0 10px; }
.install-card { position: relative; padding: 14px 16px; margin-top: 14px; }
.install-card .c-del { position: absolute; top: 8px; right: 8px; margin-left: 0; }

/* ── ⋯ menus + pinned comments ─────────────────────────────────────────── */
.kebab-wrap { position: relative; margin-left: auto; flex: none; }
.kebab {
  border: 0; background: none; color: var(--dim); font-size: 18px; line-height: 1;
  padding: 3px 9px; border-radius: 8px; cursor: pointer;
}
.kebab:hover { background: var(--bg-raise); color: var(--text); }
.kmenu {
  position: absolute; right: 0; top: 28px; z-index: 30; min-width: 190px; padding: 6px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 25, 40, .14);
}
.kmenu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 12px; border-radius: 7px; font: inherit; font-size: 14px;
  color: var(--text); cursor: pointer;
}
.kmenu button:hover { background: var(--bg-raise); }
.kmenu .kdanger { color: #b3261e; }
.post-head { display: flex; align-items: center; gap: 8px; }
.comment.pinned { border-left: 3px solid var(--accent); }

/* ── Avatars, directory, profile modal ─────────────────────────────────── */
.av {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none;
  vertical-align: middle; margin-right: 8px;
}
.av-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.av-sm { width: 24px; height: 24px; font-size: 11px; }
.av-lg { width: 52px; height: 52px; font-size: 20px; }
.av-xl { width: 84px; height: 84px; font-size: 30px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 22px; }
.dir-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.dir-name { font-weight: 700; font-size: 15px; }
.dir-bio { font-size: 14px; color: var(--dim); margin-top: 4px; line-height: 1.45; }
.modal-wrap {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 28, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; width: 100%; max-width: 420px; box-shadow: 0 18px 50px rgba(10, 14, 24, .25);
}
.pf-row { display: flex; align-items: center; gap: 14px; }

.comment-body { white-space: pre-wrap; }
.post-body a, .post-body-full a, .comment-body a { color: var(--accent, #2563eb); text-decoration: underline; word-break: break-all; }
.post-body .url { color: var(--accent); }

/* ── Link cards under posts (2026-09-05) ───────────────────────────────── */
.link-card {
  display: flex; align-items: stretch; margin-top: 10px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-raise);
  color: inherit; text-decoration: none;
}
a.link-card:hover { border-color: var(--accent); }
.lc-img { width: 112px; min-height: 76px; max-height: 96px; object-fit: cover; flex: none; background: var(--border); }
.lc-text { padding: 9px 12px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.lc-title {
  font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lc-site { font-size: 12px; color: var(--dim); margin-top: 3px; }
.post-body-full a.link-card, .post-body a.link-card { text-decoration: none; word-break: normal; }

/* Install steps (home card + "Get the app" in the profile sheet), 2026-09-22 */
.install-steps { margin: 8px 0 0; padding-left: 20px; color: var(--dim); font-size: 13.5px; line-height: 1.55; }
.install-steps li { margin-bottom: 6px; }
.install-steps b { color: var(--text); }

/* Sign in with the 6-digit code from the email */
.login-code-form { margin: 14px 0 10px; }
.login-code-form input { text-align: center; font-size: 22px; letter-spacing: 4px; font-weight: 700; }
