/* Ascend with Ang — app bar, scroll body, splash, onboarding, auth, home. */

.screen { display: flex; flex-direction: column; }
.inner-screen { display: flex; flex-direction: column; min-height: 100dvh; }

.app-bar { position: sticky; top: var(--safe-top); z-index: 15; background: var(--bg); }
.app-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter) 8px; }
.app-bar-title { font-family: var(--font-display); font-size: 22px; }
.app-bar-action { background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; display: inline-flex; }
.app-bar-action svg { width: 24px; height: 24px; }

.scroll-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--gutter) 24px; }

/* --- Splash (8.1) --- */
.splash {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between;
  /* Placeholder moss tone until Ang supplies the full-bleed nature photo (OWED). */
  background: linear-gradient(180deg, #3c4636 0%, #4E5A45 55%, #333c2d 100%);
  color: #fff; padding: calc(56px + var(--safe-top)) var(--gutter) calc(40px + var(--safe-bottom));
  text-align: left;
}
.splash-logo { display: flex; justify-content: center; margin-top: 24px; }
.splash-logo img { width: 128px; height: auto; }
.splash-body { margin-top: auto; }
.splash h1 { font-size: 46px; line-height: 1.04; max-width: 8ch; }
.splash .rule { width: 46px; height: 1px; background: rgba(255,255,255,.6); margin: 24px 0 16px; }
.splash .label { color: rgba(255,255,255,.85); letter-spacing: .14em; }
.splash-actions { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.splash-actions .pill { max-width: 320px; }
.splash-actions .linkish { color: rgba(255,255,255,.85); }

/* --- Onboarding (8.2) --- */
.onb { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); padding: calc(20px + var(--safe-top)) var(--gutter) calc(32px + var(--safe-bottom)); }
.onb-top { display: flex; align-items: center; justify-content: space-between; }
.onb-top img { height: 48px; }
.onb-slide { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.onb-arch {
  position: absolute; right: calc(-1 * var(--gutter)); top: 50%; transform: translateY(-50%);
  width: 42%; aspect-ratio: 3/4; background: var(--stone);
  border-radius: 180px 180px 0 0 / 240px 240px 0 0;
}
.onb-copy { max-width: 64%; }
.onb-copy h1 { font-size: 36px; line-height: 1.08; }
.onb-copy .sub { font-family: var(--font-display); font-size: 20px; margin: 18px 0 14px; }
.onb-copy p { color: var(--muted); font-size: 15px; }
.onb-copy .rule { width: 40px; height: 1px; background: var(--border); margin: 16px 0; }
.onb-actions { display: flex; flex-direction: column; gap: 18px; align-items: center; }

/* --- Auth forms (sign up / sign in / consent / set password) --- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); padding: calc(28px + var(--safe-top)) var(--gutter) calc(32px + var(--safe-bottom)); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo img { height: 56px; }
.auth h1 { font-size: 28px; text-align: center; margin-bottom: 4px; }
.auth .lede { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 15px; }
.auth form { display: flex; flex-direction: column; }
.auth .pill { margin-top: 10px; }
.auth .alt { text-align: center; margin-top: 20px; }
.auth .form-error { color: var(--red); font-size: 14px; text-align: center; min-height: 20px; margin-top: 6px; }
.auth .consent-list { margin: 8px 0 20px; }
.flagged { background: var(--amber-pale); color: var(--text); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; margin-bottom: 16px; }

/* --- Home (Phase 1 interim) --- */
.home-hero { padding: 8px 0 20px; }
.home-hero h1 { font-size: 34px; line-height: 1.1; }
.home-quote { color: var(--muted); font-family: var(--font-display); font-size: 18px; font-style: italic; margin-top: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }

/* ===================== Phase 2: Home, Courses, Course, Lesson ===================== */

/* Continue card (Home) */
.continue-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface-2); border: 0; border-radius: var(--radius-lg);
  padding: 14px; margin-top: 8px; cursor: pointer;
}
.continue-card .thumb { width: 60px; height: 60px; }
.continue-meta { flex: 1 1 auto; min-width: 0; }
.continue-title { font-family: var(--font-display); font-size: 20px; line-height: 1.1; }
.play-btn {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: var(--olive); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.play-btn.big { width: 60px; height: 60px; }

/* Explore row (Home) */
.explore-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 8px; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.course-card {
  flex: 0 0 72%; max-width: 260px; text-align: left; background: none; border: 0; cursor: pointer;
  position: relative; padding: 0;
}
.course-card-photo { width: 100%; aspect-ratio: 3/4; border-radius: var(--radius-lg); background: var(--stone) center/cover no-repeat; }
.course-card-title { font-family: var(--font-display); font-size: 22px; margin-top: 10px; line-height: 1.1; }
.course-card-desc { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.round-arrow {
  position: absolute; right: 10px; top: calc(75vw * 0 + 0px); /* fallback */
  display: none;
}

/* Courses list */
.search-field { padding: 0 var(--gutter) 10px; }
.course-list { padding-top: 6px; }
.course-row { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; }
.course-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.course-row-title { font-size: 16px; font-weight: 400; }
.course-row-desc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.row-progress .progress { flex: 1 1 auto; max-width: 160px; }
.row-price { font-size: 15px; font-weight: 500; margin-top: 4px; }
.chev { color: var(--faint); flex: 0 0 auto; display: inline-flex; }

/* Course detail */
.course-hero { width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-lg); background: var(--stone) center/cover no-repeat; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin: 18px 0 4px; }
.tab { background: none; border: 0; cursor: pointer; padding: 10px 0; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--moss); }
.facts { display: flex; gap: 10px; margin-top: 16px; }
.fact { flex: 1 1 0; background: var(--surface-2); border-radius: var(--radius); padding: 14px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.fact svg { width: 22px; height: 22px; color: var(--olive); }
.bullets { margin: 10px 0 0 18px; color: var(--text); }
.bullets li { margin: 6px 0; }
.module-group { margin-top: 18px; }
.module-title { display: block; margin-bottom: 6px; }
.lesson-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 13px 0; cursor: pointer; }
.lesson-status { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.lesson-status.done { background: var(--green-pale); color: var(--green); }
.lesson-status.next { border: 1.5px solid var(--sage-deep); color: var(--sage-deep); }
.lesson-status.open { color: var(--faint); }
.lesson-status.locked { color: var(--faint); }
.lesson-main { display: flex; flex-direction: column; gap: 2px; }
.lesson-title { font-size: 15px; }

/* Bottom bar (course / lesson actions) */
.bottom-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--border); padding: 12px var(--gutter) calc(12px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* Lesson player */
.video-frame { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.placeholder-frame { background: var(--surface-2); display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.lesson-bar-title { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.lesson-next { display: inline-block; margin-top: 16px; text-align: left; }
.pdf-row { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); margin-top: 16px; cursor: pointer; }

/* Menu drawer */
.drawer { overflow-y: auto; }
.drawer-profile { display: flex; align-items: center; gap: 12px; margin: 10px 0 18px; }
.drawer-name { font-family: var(--font-display); font-size: 20px; }
.drawer-section { margin-bottom: 18px; }
.drawer-section .label { display: block; margin-bottom: 4px; }
.drawer-item { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 11px 0; font-size: 16px; color: var(--text); }
