/* =========================================================================
   CRM+ Academy — a course, not a landing page

   The page has one job: get a new customer from "I just signed up" to "I can
   run this" in about an hour. So the layout is a syllabus — a sticky table of
   contents on one side, six expandable modules on the other, and a progress
   bar that actually means something because the visitor ticks lessons off
   themselves (state lives in localStorage; there is no back end).

   Lesson artwork is drawn, not photographed: an abstract wireframe of the
   product window. Fake screenshots age badly and lie about a UI that changes,
   while a wireframe reads as "this is the shape of the screen" and stays true.
   Swap in real captures later by replacing .ac-mock with an <img>.

   Plain CSS on purpose — the Tailwind sheet is compiled (build/README.md).
   ========================================================================= */

.ac-page {
  --ac-accent: #D4FB0A;
  --ac-ink: #0B0F14;
  --ac-text: #1E293B;
  --ac-soft: #475569;
  --ac-faint: #94A3B8;
  --ac-surface: #FFFFFF;
  --ac-surface-2: #F6F8FA;
  --ac-border: rgba(15, 23, 42, 0.1);
  --ac-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.35);
}

body.dark-mode .ac-page {
  --ac-ink: #F1F5F9;
  --ac-text: #E2E8F0;
  --ac-soft: #94A3B8;
  --ac-faint: #64748B;
  --ac-surface: #0E121A;
  --ac-surface-2: #121722;
  --ac-border: rgba(148, 163, 184, 0.16);
  --ac-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.8);
}

/* The compiled Tailwind sheet (loaded after this file) puts overflow-x:hidden
   on <body>, which makes the body a scroll container and silently disables
   position:sticky on .ac-side — the TOC scrolled away with the page.
   `clip` crops the same overflow without creating a scroll container. */
body { overflow-x: clip !important; }

/* Keyboard skip link — the page front-loads a mega menu and 25 disclosure
   widgets; give keyboard users a way past them. Visible only on focus. */
.ac-skip {
  position: fixed;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  background: #0B0F14;
  color: #D4FB0A;
  font-size: 0.8125rem;
  font-weight: 900;
  text-decoration: none;
  transform: translateY(-200%);
}
.ac-skip:focus-visible { transform: none; }

/* One focus ring for every interactive element on the page. --ac-ink flips
   with the theme, so the ring reads on white cards, the yellow hero and the
   dark body alike (the UA default was 1.5px slate — 2.56:1 on white). */
.ac-page a:focus-visible,
.ac-page button:focus-visible,
.ac-page summary:focus-visible,
.ac-page input:focus-visible,
.ac-skip:focus-visible {
  outline: 2px solid var(--ac-ink);
  outline-offset: 2px;
}
.ac-skip:focus-visible { outline-color: #D4FB0A; }

.ac-shell {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================================================================
   HERO
   ========================================================================= */

.ac-hero {
  position: relative;
  padding: 8.5rem 0 4.5rem;
  overflow: hidden;
}

.ac-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 3rem;
}

.ac-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.18;
  font-weight: 900;
  color: #0B0F14;
  margin: 0 0 1rem;
}

.ac-hero-title span { display: block; }

.ac-hero-lead {
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  line-height: 2;
  color: rgba(11, 15, 20, 0.72);
  max-width: 30rem;
  margin: 0 0 2rem;
}

.ac-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  background: #0B0F14;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 0.9375rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 34px -20px rgba(11, 15, 20, 0.8);
}

.ac-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -18px rgba(11, 15, 20, 0.9); }
.ac-hero-cta i, .ac-hero-cta svg { width: 1.0625rem; height: 1.0625rem; }

.ac-hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: rgba(11, 15, 20, 0.62);
}

.ac-hero-facts b { color: #0B0F14; font-weight: 900; }

.ac-hero-facts span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.ac-hero-dot {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 999px;
  background: rgba(11, 15, 20, 0.28);
}

/* hero product shot — the PNG carries its own rounded frame and shadow */
.ac-hero-shot {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================================================
   WIREFRAME MOCK — one component, five variants
   ========================================================================= */

.ac-mock {
  position: relative;
  border-radius: 1.25rem;
  background: #0B0F14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.ac-mock--hero { padding: 1rem; border-radius: 1.5rem; }

.ac-mock-bar {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  padding-bottom: 0.625rem;
}

.ac-mock-bar i {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: block;
}

.ac-mock-bar i:first-child { background: var(--ac-accent); }

.ac-mock-body {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.5rem;
  min-height: 8.5rem;
}

.ac-mock--hero .ac-mock-body { grid-template-columns: 5rem minmax(0, 1fr); min-height: 16rem; }

.ac-mock-side,
.ac-mock-main {
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.ac-mock-line {
  height: 0.375rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.ac-mock-line.is-accent { background: var(--ac-accent); }
.ac-mock-line.w-40 { width: 40%; }
.ac-mock-line.w-55 { width: 55%; }
.ac-mock-line.w-70 { width: 70%; }
.ac-mock-line.w-85 { width: 85%; }

.ac-mock-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.375rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
}

.ac-mock-row.is-active {
  background: rgba(212, 251, 10, 0.14);
  border: 1px solid rgba(212, 251, 10, 0.3);
}

.ac-mock-avatar {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
}

.ac-mock-row.is-active .ac-mock-avatar { background: var(--ac-accent); }

.ac-mock-stack { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 auto; min-width: 0; }

/* bars variant — for the reporting module */
.ac-mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.3125rem;
  height: 3.75rem;
  padding-top: 0.375rem;
}

.ac-mock-chart span {
  flex: 1 1 0;
  border-radius: 0.25rem 0.25rem 0 0;
  background: rgba(255, 255, 255, 0.16);
}

.ac-mock-chart span:nth-child(3),
.ac-mock-chart span:nth-child(6) { background: var(--ac-accent); }

/* node variant — for the automation module */
.ac-mock-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.ac-mock-node {
  width: 2.25rem;
  height: 1.5rem;
  border-radius: 0.4375rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ac-mock-node.is-accent { background: rgba(212, 251, 10, 0.2); border-color: var(--ac-accent); }

.ac-mock-link {
  width: 0.875rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
  flex: 0 0 auto;
}

/* channel chips — for the integrations module */
.ac-mock-chips { display: flex; flex-wrap: wrap; gap: 0.3125rem; }

.ac-mock-chip {
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
  width: 2.75rem;
}

.ac-mock-chip.is-accent { background: rgba(212, 251, 10, 0.2); border-color: var(--ac-accent); }

/* =========================================================================
   STAT STRIP
   ========================================================================= */

.ac-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: -2.75rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.ac-stat {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-radius: 1rem;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  box-shadow: var(--ac-shadow);
}

.ac-stat-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: rgba(212, 251, 10, 0.16);
  color: var(--ac-ink);
  flex: 0 0 auto;
}

.ac-stat-ico i, .ac-stat-ico svg { width: 1.125rem; height: 1.125rem; }

.ac-stat-label { font-size: 0.6875rem; font-weight: 800; color: var(--ac-faint); }
.ac-stat-value { font-size: 0.875rem; font-weight: 900; color: var(--ac-ink); margin-top: 0.125rem; }

/* =========================================================================
   COURSE LAYOUT
   ========================================================================= */

.ac-course { padding: 4rem 0 3rem; }

.ac-grid {
  display: grid;
  grid-template-columns: 19.5rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.ac-side { grid-column: 1; grid-row: 1; position: sticky; top: 6.5rem; }
.ac-tracks { grid-column: 2; grid-row: 1; }

/* ---- sidebar cards ---- */
.ac-card {
  border-radius: 1.125rem;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  box-shadow: var(--ac-shadow);
  overflow: hidden;
}

.ac-card + .ac-card { margin-top: 1rem; }

.ac-card-head {
  padding: 1rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 900;
  color: var(--ac-ink);
  border-bottom: 1px solid var(--ac-border);
}

.ac-card-body { padding: 0.625rem; }

.ac-toc { display: flex; flex-direction: column; gap: 0.125rem; }

.ac-toc-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem; /* 44px tap target */
  padding: 0.5625rem 0.625rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ac-soft);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.ac-toc-item:hover { background: var(--ac-surface-2); color: var(--ac-ink); }

.ac-toc-item.is-current {
  background: rgba(212, 251, 10, 0.16);
  color: var(--ac-ink);
  font-weight: 900;
}

.ac-toc-num {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 900;
  background: var(--ac-surface-2);
  color: var(--ac-soft);
  border: 1px solid var(--ac-border);
  flex: 0 0 auto;
}

.ac-toc-item.is-current .ac-toc-num,
.ac-toc-item.is-done .ac-toc-num { background: var(--ac-accent); color: #0B0F14; border-color: transparent; }

.ac-toc-item.is-done { color: var(--ac-faint); }

/* ---- resource + support cards ---- */
.ac-res {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 0.625rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ac-soft);
  text-decoration: none;
}

.ac-res:hover { background: var(--ac-surface-2); color: var(--ac-ink); }
.ac-res i, .ac-res svg { width: 1rem; height: 1rem; color: var(--ac-faint); flex: 0 0 auto; }
.ac-res:hover i, .ac-res:hover svg { color: var(--ac-ink); }

.ac-res--soon { color: var(--ac-faint); cursor: default; }
.ac-res--soon:hover { background: transparent; color: var(--ac-faint); }

.ac-soon-tag {
  margin-inline-start: auto;
  font-size: 0.5625rem;
  font-weight: 900;
  padding: 0.125rem 0.4375rem;
  border-radius: 999px;
  background: var(--ac-surface-2);
  border: 1px solid var(--ac-border);
  color: var(--ac-faint);
}

.ac-help {
  padding: 1.25rem;
  text-align: center;
}

.ac-help-ico {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  background: rgba(212, 251, 10, 0.16);
  color: var(--ac-ink);
}

.ac-help-ico i, .ac-help-ico svg { width: 1.375rem; height: 1.375rem; }
.ac-help h3 { font-size: 0.875rem; font-weight: 900; color: var(--ac-ink); margin: 0 0 0.375rem; }
.ac-help p { font-size: 0.75rem; line-height: 1.9; color: var(--ac-soft); margin: 0 0 0.875rem; }

.ac-help-btn {
  display: block;
  padding: 0.6875rem;
  border-radius: 0.75rem;
  background: var(--ac-accent);
  color: #0B0F14;
  font-size: 0.8125rem;
  font-weight: 900;
  text-decoration: none;
}

/* =========================================================================
   TRACKS
   ========================================================================= */

.ac-tracks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.125rem 1.25rem;
  border-radius: 1.125rem 1.125rem 0 0;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  border-bottom: 0;
}

.ac-tracks-title { font-size: 1rem; font-weight: 900; color: var(--ac-ink); margin: 0; }

.ac-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 12rem;
  max-width: 22rem;
  min-width: 0;
}

.ac-progress-rail {
  flex: 1 1 auto;
  height: 0.4375rem;
  border-radius: 999px;
  background: var(--ac-surface-2);
  border: 1px solid var(--ac-border);
  overflow: hidden;
}

.ac-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--ac-accent);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ac-progress-label {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--ac-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ac-reset {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--ac-faint);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ac-reset:hover { color: var(--ac-ink); }

.ac-modules {
  border: 1px solid var(--ac-border);
  border-radius: 0 0 1.125rem 1.125rem;
  background: var(--ac-surface);
  box-shadow: var(--ac-shadow);
  overflow: hidden;
}

.ac-module + .ac-module { border-top: 1px solid var(--ac-border); }

.ac-module-head {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 9.5rem;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
}

.ac-module-num {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  font-weight: 900;
  background: var(--ac-accent);
  color: #0B0F14;
  flex: 0 0 auto;
}

.ac-module.is-done .ac-module-num { background: #16A34A; color: #FFFFFF; }

.ac-module-title { font-size: 0.9375rem; font-weight: 900; color: var(--ac-ink); margin: 0 0 0.5rem; }

.ac-module-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--ac-faint);
  margin-top: 0.625rem;
}

.ac-module-meta i, .ac-module-meta svg { width: 0.8125rem; height: 0.8125rem; }

/* ---- lessons ---- */
.ac-lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }

.ac-lesson {
  border-radius: 0.75rem;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.ac-lesson[open] { background: var(--ac-surface-2); border-color: var(--ac-border); }

.ac-lesson > summary {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem; /* 44px tap target */
  padding: 0.5rem 0.625rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ac-soft);
  border-radius: 0.75rem;
}

.ac-lesson > summary::-webkit-details-marker { display: none; }
.ac-lesson > summary:hover { color: var(--ac-ink); }

.ac-lesson-bullet {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
  background: var(--ac-accent);
  flex: 0 0 auto;
}

.ac-lesson-chev {
  margin-inline-start: auto;
  width: 0.875rem;
  height: 0.875rem;
  color: var(--ac-faint);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

/* chevron-right points against the RTL reading direction — mirror it when
   closed; open keeps the symmetric "collapse" up-chevron. */
[dir="rtl"] .ac-lesson-chev { transform: scaleX(-1); }
.ac-lesson[open] .ac-lesson-chev { transform: rotate(-90deg); }
.ac-lesson.is-done > summary { color: var(--ac-faint); text-decoration: line-through; text-decoration-color: var(--ac-border); }

.ac-lesson-body {
  padding: 0.25rem 1.375rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 2.1;
  color: var(--ac-soft);
}

.ac-lesson-body ol { margin: 0 0 0.75rem; padding-inline-start: 1.125rem; }
.ac-lesson-body li { margin-bottom: 0.25rem; }
.ac-lesson-body strong { color: var(--ac-ink); font-weight: 900; }

.ac-note {
  display: flex;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: rgba(212, 251, 10, 0.12);
  border: 1px solid rgba(212, 251, 10, 0.28);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--ac-text);
  margin-bottom: 0.75rem;
}

.ac-note i, .ac-note svg { width: 0.9375rem; height: 0.9375rem; color: var(--ac-ink); flex: 0 0 auto; margin-top: 0.25rem; }

.ac-done {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem; /* 44px tap target */
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ac-soft);
  cursor: pointer;
  user-select: none;
}

/* "next lesson" hand-off, injected by academy.js after each lesson body */
.ac-next {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  margin-inline-start: 1rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--ac-ink);
  cursor: pointer;
}
.ac-next:hover { color: var(--ac-accent-dark, #5a6b04); text-decoration: underline; }

/* per-module lesson count at the end of each TOC row (painted by academy.js) */
.ac-toc-count {
  margin-inline-start: auto;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--ac-faint);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.ac-toc-item.is-done .ac-toc-count { color: #16A34A; }

.ac-done input {
  width: 1.0625rem;
  height: 1.0625rem;
  accent-color: #16A34A;
  cursor: pointer;
}

/* =========================================================================
   VIDEO LESSONS
   ========================================================================= */

.ac-videos { padding: 3.5rem 0; }

.ac-sec-head { margin-bottom: 1.75rem; }

.ac-sec-title { font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 900; color: var(--ac-ink); margin: 0 0 0.5rem; }
.ac-sec-lead { font-size: 0.875rem; line-height: 2; color: var(--ac-soft); margin: 0; max-width: 42rem; }

/* .ac-videos / .ac-tips / .ac-faq sit directly on the site's dark <body>
   background in BOTH themes, so their heads can't use the light-mode ink
   tokens (near-black on black, 1.03:1). Fixed colors that read on dark. */
.ac-videos .ac-sec-title, .ac-tips .ac-sec-title, .ac-faq .ac-sec-title { color: #F1F5F9; }
.ac-videos .ac-sec-lead, .ac-tips .ac-sec-lead, .ac-faq .ac-sec-lead { color: #94A3B8; }

.ac-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.ac-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 1.125rem;
  overflow: hidden;
  background: #0B0F14;
  border: 1px solid var(--ac-border);
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  cursor: pointer;
}

.ac-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.ac-player-play {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ac-accent);
  color: #0B0F14;
  box-shadow: 0 18px 34px -18px rgba(212, 251, 10, 0.7);
  transition: transform 0.2s ease;
}

.ac-player:hover .ac-player-play { transform: scale(1.08); }
.ac-player-play i, .ac-player-play svg { width: 1.5rem; height: 1.5rem; }

.ac-player-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(11, 15, 20, 0.92), transparent);
  color: #FFFFFF;
  text-align: start;
}

.ac-player-caption b { display: block; font-size: 0.9375rem; font-weight: 900; }
.ac-player-caption span { font-size: 0.75rem; color: rgba(255, 255, 255, 0.62); font-weight: 700; }

.ac-clips { display: flex; flex-direction: column; gap: 0.75rem; }

.ac-clip {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.875rem;
  align-items: center;
  padding: 0.625rem;
  border-radius: 0.875rem;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  width: 100%;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.ac-clip:hover { border-color: rgba(212, 251, 10, 0.55); transform: translateY(-2px); }

.ac-clip-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.625rem;
  background: #0B0F14;
  display: grid;
  place-items: center;
  color: var(--ac-accent);
  overflow: hidden;
}

.ac-clip-thumb i, .ac-clip-thumb svg { width: 1.125rem; height: 1.125rem; }
.ac-clip-title { font-size: 0.8125rem; font-weight: 800; color: var(--ac-ink); }
.ac-clip-time { font-size: 0.6875rem; font-weight: 800; color: var(--ac-faint); margin-top: 0.25rem; display: block; font-variant-numeric: tabular-nums; }

/* a clip with no video URL yet is inert, and says so */
.ac-clip.is-soon, .ac-player.is-soon { cursor: default; }
.ac-clip.is-soon:hover { border-color: var(--ac-border); transform: none; }
.ac-clip.is-soon .ac-clip-thumb { color: rgba(255, 255, 255, 0.3); }
.ac-player.is-soon .ac-player-play { opacity: 0.35; }
.ac-player.is-soon:hover .ac-player-play { transform: none; }

.ac-soon-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.6875rem;
  font-weight: 900;
}

/* =========================================================================
   TIPS
   ========================================================================= */

.ac-tips { padding: 3rem 0; }

.ac-tips-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.ac-tip {
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
}

.ac-tip-ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6875rem;
  display: grid;
  place-items: center;
  background: rgba(212, 251, 10, 0.16);
  color: var(--ac-ink);
  margin-bottom: 0.75rem;
}

.ac-tip-ico i, .ac-tip-ico svg { width: 1.0625rem; height: 1.0625rem; }
.ac-tip h3 { font-size: 0.8125rem; font-weight: 900; color: var(--ac-ink); margin: 0 0 0.375rem; }
.ac-tip p { font-size: 0.75rem; line-height: 1.9; color: var(--ac-soft); margin: 0; }

/* =========================================================================
   FAQ
   ========================================================================= */

.ac-faq { padding: 2rem 0 4rem; }

.ac-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ac-q {
  border-radius: 0.875rem;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  overflow: hidden;
}

.ac-q > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9375rem 1.125rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--ac-ink);
}

.ac-q > summary::-webkit-details-marker { display: none; }

.ac-q-sign {
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  color: var(--ac-faint);
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.ac-q[open] .ac-q-sign { transform: rotate(45deg); }
.ac-q[open] > summary { color: var(--ac-ink); }
.ac-q-body { padding: 0 1.125rem 1rem 2.9375rem; font-size: 0.8125rem; line-height: 2.05; color: var(--ac-soft); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 1023px) {
  .ac-hero { padding: 7rem 0 3.5rem; }
  .ac-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .ac-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem; margin-top: -1.5rem; margin-bottom: 2rem; }
  .ac-grid { grid-template-columns: minmax(0, 1fr); }

  /* On a phone the syllabus is a lid you lift, not a column you scroll past. */
  .ac-side { grid-column: 1; grid-row: 1; position: static; }
  .ac-tracks { grid-column: 1; grid-row: 2; }

  .ac-video-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-tips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-faq-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .ac-shell { padding: 0 1rem; }
  .ac-stats { grid-template-columns: minmax(0, 1fr); }
  .ac-module-head { grid-template-columns: 1.75rem minmax(0, 1fr); }
  .ac-module-art { display: none; }
  .ac-tips-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-hero-cta { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-progress-fill, .ac-lesson, .ac-clip, .ac-hero-cta, .ac-player-play, .ac-lesson-chev, .ac-q-sign {
    transition: none;
  }
}

/* the wireframe column inside a module row */
.ac-module-art { align-self: start; }
.ac-module-art .ac-mock { padding: 0.5rem; border-radius: 0.875rem; }
.ac-module-art .ac-mock-body { min-height: 6.25rem; }

/* ---- hero composition: sidebar + conversation list + open thread ---- */
.ac-mock--hero .ac-mock-body {
  grid-template-columns: 3.5rem 11rem minmax(0, 1fr);
  min-height: 17rem;
}

.ac-mock-thread {
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.ac-bubble {
  border-radius: 0.75rem;
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  max-width: 82%;
  background: rgba(255, 255, 255, 0.07);
}

.ac-bubble.is-me {
  align-self: flex-end;
  background: rgba(212, 251, 10, 0.16);
  border: 1px solid rgba(212, 251, 10, 0.28);
}

.ac-bubble .ac-mock-line { background: rgba(255, 255, 255, 0.2); }
.ac-bubble.is-me .ac-mock-line { background: rgba(212, 251, 10, 0.6); }

.ac-mock-compose {
  margin-top: auto;
  height: 1.625rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  gap: 0.375rem;
}

.ac-mock-compose .ac-mock-line { flex: 1 1 auto; }

.ac-mock-send {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--ac-accent);
  flex: 0 0 auto;
}

@media (max-width: 1023px) {
  .ac-mock--hero .ac-mock-body { grid-template-columns: 3rem minmax(0, 1fr); min-height: 13rem; }
  .ac-mock--hero .ac-mock-main { display: none; }
}

/* Bubbles size to their content, and their content is a percentage — so give
   them an explicit width or they collapse into pills. */
.ac-bubble { width: 78%; max-width: none; }
.ac-bubble.is-me { width: 62%; }

/* =========================================================================
   SYLLABUS AS A COLLAPSIBLE (phones)

   On a phone the aside would otherwise push the lessons a full screen down.
   `display: contents` dissolves it so its three cards become grid items in
   their own right — the syllabus stays on top (collapsed), and the resource
   and support cards drop below the lessons where they belong.
   ========================================================================= */

.ac-toc-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.ac-toc-card > summary::-webkit-details-marker { display: none; }

.ac-toc-chev {
  width: 1rem;
  height: 1rem;
  color: var(--ac-faint);
  transition: transform 0.2s ease;
}

.ac-toc-card[open] .ac-toc-chev { transform: rotate(180deg); }

@media (max-width: 1023px) {
  .ac-side { display: contents; }
  .ac-toc-card { grid-row: 1; }
  .ac-tracks { grid-row: 2; }
  .ac-card--extra { grid-column: 1; }
  .ac-card + .ac-card { margin-top: 0; }
  .ac-toc-card:not([open]) { border-radius: 1.125rem; }
  .ac-toc-card:not([open]) > summary { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-toc-chev { transition: none; }
}
