/* ============================================================
   LES Training Demo — Stylesheet
   Mastermind Marketing, Inc.
   Single shared stylesheet for the phase overview and all
   module detail pages. Color is driven by CSS variables so the
   accent can be re-themed in one place.
   ============================================================ */

:root {
  --green: #1a9d6b;          /* primary brand green (badges, accents) */
  --green-dark: #157a52;     /* hover / link text */
  --green-darker: #0f5e3f;
  --ink: #1f2430;            /* primary text */
  --ink-soft: #4b5563;       /* secondary text */
  --ink-faint: #9aa3af;      /* captions / muted labels */
  --line: #e6e8eb;           /* card + divider borders */
  --bg: #f4f5f6;             /* page background */
  --card: #ffffff;           /* card background */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 6px 18px rgba(16, 24, 40, 0.10);
  --maxw: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- Top bar ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;          /* anchor for the mobile nav drawer */
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand .dot {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}
.topbar nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}
.topbar nav a:hover { color: var(--green-dark); }

/* ---------- Hamburger button (shown on mobile only) ---------- */
.nav-toggle {
  display: none;               /* hidden on desktop; shown in mobile media query */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
/* Morph the three bars into an X when the menu is open. */
.topbar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Phase header banner ---------- */
.phase-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin: 30px 0 26px;
  box-shadow: var(--shadow);
}
.phase-banner h1 {
  margin: 0 0 4px;
  font-size: 30px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.phase-banner .sub {
  margin: 0 0 14px;
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
}
.phase-banner p {
  margin: 0 0 18px;
  max-width: 760px;
  color: var(--ink-soft);
}
.pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5faf7;
  border: 1px solid #d7ece1;
  color: var(--ink);
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 999px;
}
.pill b { color: var(--green-dark); }

/* ---------- Section heading row ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 16px;
  gap: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.section-head .note {
  color: var(--ink-faint);
  font-size: 13px;
  text-align: right;
}

/* ---------- Module grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  padding-bottom: 40px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 196px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: #d7ece1;
}
.badge {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  flex-grow: 1;
}
.open-link {
  margin-top: 14px;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.open-link::after { content: "\2192"; transition: transform .15s ease; }
.card:hover .open-link::after { transform: translateX(3px); }

/* ---------- Module detail page ---------- */
.module-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: var(--radius);
  padding: 22px 28px;
  margin: 30px 0 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.module-head .badge { margin: 0; width: 38px; height: 38px; font-size: 15px; }
.module-head h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 34px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.panel .purpose-label {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.panel .rule {
  height: 3px;
  width: 100%;
  background: var(--green);
  border-radius: 2px;
  margin-bottom: 16px;
}
.panel .purpose-text {
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.entry { padding: 16px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: none; }
.entry .label {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.entry .title { margin: 0; font-size: 16px; color: var(--ink); }

/* media placeholder shown where a lesson video will live */
.media {
  margin-top: 12px;
  border: 1px dashed #c9d2cd;
  background: #f7faf8;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 13px;
  cursor: pointer;
}
.media .play {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  padding-left: 3px;
}
.media video { width: 100%; height: 100%; border-radius: 10px; display: block; }

/* ---------- Prev / Next footer nav ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-bottom: 50px;
}
.pager a, .pager span {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pager a:hover { border-color: #d7ece1; box-shadow: var(--shadow-hover); }
.pager .cap {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 4px;
}
.pager .ttl { font-weight: 700; color: var(--ink); }
.pager .next { text-align: right; }
.pager .disabled { opacity: .45; }

footer.site {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink-faint);
  font-size: 13px;
  padding: 22px 0;
}
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .wrap { padding: 0 18px; }
  .phase-banner h1 { font-size: 24px; }
  .pager { grid-template-columns: 1fr; }
  .panel { padding: 24px 20px; }

  /* Show the hamburger; turn the link list into a dropdown drawer. */
  .nav-toggle { display: flex; }
  .topbar nav {
    display: none;             /* collapsed until the hamburger is tapped */
    position: absolute;
    top: 60px;                 /* sits right under the 60px topbar */
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-hover);
    padding: 6px 18px 12px;
    z-index: 60;
  }
  .topbar.nav-open nav { display: flex; }
  .topbar nav a {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .topbar nav a:last-child { border-bottom: none; }
}
@media (max-width: 440px) {
  .grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Lesson player (principle pages): nav | video | transcript
   ============================================================ */
.crumbs {
  margin: 24px 0 14px;
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.crumbs a:hover { color: var(--green-dark); }
.crumbs .sep { color: #ccd2d8; }
.crumbs .here { color: var(--ink); font-weight: 600; }

.lesson-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  padding-bottom: 50px;
}

/* --- Left: principle navigation --- */
.principle-nav {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 18px;
}
.principle-nav h4 {
  margin: 4px 8px 12px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.principle-nav ol { list-style: none; margin: 0; padding: 0; }
.principle-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: background .14s ease, color .14s ease;
}
.principle-nav li a:hover { background: #f5faf7; color: var(--ink); }
.principle-nav li.active a {
  background: #eef8f2;
  color: var(--green-darker);
  font-weight: 700;
  border-left-color: var(--green);
}
.pn-num {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: #e8eef0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.principle-nav li.active .pn-num { background: var(--green); color: #fff; }

/* Quiz link beneath the 7 Principles list */
.principle-nav .quiz-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 2px;
  padding: 10px 10px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  border-left: 3px solid var(--green-darker);
  transition: background .14s ease;
}
.principle-nav .quiz-link:hover { background: var(--green-dark); color: #fff; }
.principle-nav .quiz-link .pn-num { background: rgba(255,255,255,.22); color: #fff; }
.principle-nav .quiz-divider { height: 1px; background: var(--line); margin: 12px 4px 2px; }

/* --- Center: video --- */
.video-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1411;
  border-radius: 10px;
  overflow: hidden;
}
.video-frame video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.video-frame .ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #cfe3d8;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.video-frame .ph .play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  padding-left: 4px;
}
.video-frame .ph small { color: #8fb3a2; font-size: 12.5px; }
.video-card .lesson-meta { margin-top: 16px; }
.video-card .lesson-meta .eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.video-card .lesson-meta h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.video-card .lesson-meta p { margin: 0; color: var(--ink-soft); }

/* --- Right: transcript --- */
.transcript {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 40px);
}
.transcript .t-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.transcript .t-head .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.transcript .t-head h3 { margin: 0; font-size: 15px; }
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.live-dot i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #cfd6dc;
  display: inline-block;
}
.transcript.is-playing .live-dot i { background: var(--green); box-shadow: 0 0 0 3px rgba(26,157,107,.18); }
.t-controls { margin-top: 10px; display: flex; align-items: center; gap: 14px; }
.t-controls label { font-size: 12.5px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.t-preview {
  border: 1px solid #d7ece1;
  background: #f5faf7;
  color: var(--green-dark);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.t-preview:hover { background: #e9f5ef; }

.transcript-scroll {
  position: relative;
  overflow-y: auto;
  padding: 8px 10px 14px;
  scroll-behavior: smooth;
}
.cue {
  display: flex;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.cue:hover { background: #f7faf8; }
.cue .ts {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
  min-width: 36px;
}
.cue.active {
  background: #eef8f2;
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--green);
}
.cue.active .ts { color: var(--green-dark); }

/* Word-level read-along */
.cue .line { flex: 1 1 auto; }
.cue .w {
  border-radius: 4px;
  transition: color .12s ease, background-color .12s ease, font-weight .12s ease;
}
.cue .w.said { color: var(--ink); }
.cue .w.speak {
  font-weight: 700;
  color: var(--green-dark);
  background: #d3efe2;
  box-shadow: 0 0 0 2px #d3efe2;
}

@media (max-width: 1024px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .principle-nav, .transcript { position: static; max-height: none; }
  .transcript-scroll { max-height: 360px; }
}
