:root {
  --bg: #f7f6fb;
  --bg-alt: #ffffff;
  --hero: #1f2433;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-soft: #faf8ff;
  --ink: #2d2f31;
  --muted: #6a6f73;
  --border: #d9dce7;
  --accent: #a435f0;
  --accent-soft: #f4e7ff;
  --secondary: #5624d0;
  --success: #1e6055;
  --hero-gradient: linear-gradient(135deg, #2b3350, #5c3cc5 58%, #4f87c6);
  --sky-soft: #edf5ff;
  --mint-soft: #eef9f4;
  --peach-soft: #fff4ec;
  --sun-soft: #fff9e8;
  --shadow: 0 8px 24px rgba(29, 31, 33, 0.08);
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(164, 53, 240, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(86, 36, 208, 0.06), transparent 28%),
    radial-gradient(circle at 20% 70%, rgba(94, 166, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #faf8ff 0%, #f7f6fb 52%, #f8fbff 100%);
  color: var(--ink);
  font-family: "Bahnschrift", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.page-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 0 10px;
  margin-bottom: 6px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  border-radius: 10px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(86, 36, 208, 0.2);
}

.brand-lockup h1,
.hero-header h2,
.track-card h3,
.hero-course-copy h3,
.section-heading h2,
.curriculum-top h2,
.lesson-header h2 {
  margin: 0;
  font-family: "Bahnschrift", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

.brand-lockup h1 {
  font-size: 1.2rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.ghost-button,
.nav-button,
.track-card button,
.hero-course-actions button,
.purchase-actions button {
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.ghost-button {
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--border);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(42, 46, 56, 0.04);
}

.nav-button,
.track-card button,
.hero-course-actions button,
.purchase-actions button {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(86, 36, 208, 0.16);
}

.nav-button.secondary,
.hero-course-actions button.secondary,
.purchase-actions button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--border);
}

.hero-panel {
  padding: 28px 0 0;
}

.hero-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 24px;
  justify-items: center;
  text-align: center;
}

.hero-header h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  max-width: none;
  white-space: nowrap;
}

.hero-summary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 72ch;
  text-align: center;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.track-card {
  position: relative;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), var(--track-soft, rgba(249, 247, 255, 0.94))),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(58, 48, 88, 0.06);
  overflow: hidden;
}

.track-card.is-active {
  border-color: var(--track-accent, var(--accent));
  box-shadow:
    inset 0 3px 0 var(--track-accent, var(--accent)),
    0 14px 28px rgba(86, 36, 208, 0.12);
}

.track-card:hover {
  border-color: var(--track-accent, var(--accent));
}

.track-card:focus-visible {
  outline: 2px solid var(--track-accent, var(--accent));
  outline-offset: 2px;
}

.track-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.track-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  position: relative;
  z-index: 1;
}

.track-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.track-watermark {
  position: absolute;
  top: -8px;
  right: 10px;
  font-size: 5.5rem;
  font-weight: 900;
  color: var(--track-accent, var(--accent));
  opacity: 0.14;
  filter: blur(1.2px);
  line-height: 1;
  pointer-events: none;
}

.mini-chip,
.stat-chip,
.progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.mini-chip {
  background: linear-gradient(180deg, #f7f8fb, #eff3f8);
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.progress-chip {
  background: linear-gradient(180deg, #faf6ff, #f1edff);
  color: var(--ink);
  flex-wrap: nowrap;
  white-space: nowrap;
  border: 1px solid rgba(164, 53, 240, 0.1);
  justify-content: center;
}

.progress-chip-count {
  color: var(--ink);
}

.progress-chip-separator {
  color: #9aa0a6;
}

.progress-chip-duration {
  color: var(--secondary);
}

.track-stats,
.hero-stat-row,
.purchase-actions,
.footer-meta,
.lesson-meta,
.lesson-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.track-stats {
  margin: 16px 0 18px;
}

.hero-course-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 24px;
  align-items: start;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 26%),
    var(--hero-gradient);
  color: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 20px 42px rgba(48, 39, 83, 0.2);
}

.hero-course-copy {
  min-width: 0;
}

.hero-course-copy h3 {
  margin: 12px 0;
  font-size: clamp(2rem, 3.1vw, 2.8rem);
  font-weight: 800;
  line-height: 1.06;
}

.hero-course-copy p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.hero-course-side {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 255, 0.95));
  color: var(--ink);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: 0 16px 30px rgba(33, 39, 60, 0.12);
}

.hero-course-side h4,
.curriculum-section h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 800;
}

.hero-course-side ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.purchase-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.purchase-figure {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
}

.purchase-summary {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.details-grid,
.experience-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.details-grid {
  grid-template-columns: minmax(0, 1.25fr) 360px;
}

.details-grid.single-column {
  grid-template-columns: 1fr;
}

.experience-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(48, 52, 77, 0.06);
}

.learn-panel,
.curriculum-panel,
.lesson-panel {
  padding: 24px;
}

.section-heading,
.curriculum-top,
.lesson-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2,
.curriculum-top h2,
.lesson-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
}

.curriculum-top {
  align-items: center;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 18px;
  text-align: center;
}

.highlight-list {
  display: grid;
  gap: 12px;
}

.highlight-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.highlight-item:nth-child(4n + 1) {
  background: linear-gradient(180deg, #fcf8ff, #f7f1ff);
}

.highlight-item:nth-child(4n + 2) {
  background: linear-gradient(180deg, #f3f9ff, #edf5ff);
}

.highlight-item:nth-child(4n + 3) {
  background: linear-gradient(180deg, #fff9ee, #fff4e6);
}

.highlight-item:nth-child(4n + 4) {
  background: linear-gradient(180deg, #f2fbf7, #eaf8f1);
}

.highlight-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--secondary);
  font-weight: 900;
}

.highlight-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 800;
}

.highlight-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.curriculum-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 255, 0.96));
}

.curriculum-section + .curriculum-section {
  margin-top: 10px;
}

.curriculum-toggle {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 0;
  padding: 14px;
  text-align: left;
  background: linear-gradient(180deg, #fbf9ff, #f5f6fb);
  border-radius: 10px 10px 0 0;
}

.curriculum-section:not(.is-open) .curriculum-toggle {
  border-radius: 10px;
}

.curriculum-toggle-title {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.curriculum-toggle-title h3 {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.curriculum-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-lesson-count {
  white-space: nowrap;
  background: linear-gradient(180deg, #f7ecff, #f1e4ff);
  color: var(--secondary);
}

.lesson-pill,
.lesson-meta span,
.footer-meta span {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.curriculum-duration {
  color: var(--secondary);
  font-size: 0.83rem;
  font-weight: 800;
  white-space: nowrap;
}

.curriculum-lessons {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.curriculum-lessons[hidden] {
  display: none;
}

.lesson-link {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.92));
  display: grid;
  gap: 5px;
}

.lesson-link.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #faf1ff, #f4e7ff);
}

.lesson-link.is-complete {
  border-color: #b9ddd4;
  background: linear-gradient(180deg, #f2fbf7, #eaf7f1);
}

.lesson-link.is-complete .lesson-pill {
  color: var(--success);
  font-weight: 800;
}

.lesson-link.is-complete .lesson-link-title {
  color: var(--success);
}

.lesson-link-title {
  display: block;
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-panel {
  min-width: 0;
}

.lesson-topbar {
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.lesson-header {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.lesson-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.lesson-meta {
  align-items: center;
}

.lesson-body {
  color: var(--ink);
}

.lesson-body > *:first-child {
  margin-top: 0;
}

.lesson-body h1,
.lesson-body h2,
.lesson-body h3,
.lesson-body h4 {
  margin: 1.75rem 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 800;
}

.lesson-body h2 {
  font-size: 1.25rem;
}

.lesson-body h3,
.lesson-body h4 {
  font-size: 1.05rem;
}

.lesson-body p,
.lesson-body li,
.lesson-body blockquote {
  line-height: 1.74;
}

.lesson-body ul,
.lesson-body ol {
  padding-left: 1.2rem;
}

.lesson-body blockquote {
  margin: 1.4rem 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbf4ff, #f7eeff);
  border-left: 4px solid var(--accent);
}

.lesson-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.lesson-body th,
.lesson-body td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.lesson-body th {
  background: linear-gradient(180deg, #fafbff, #f1f4fa);
  font-weight: 800;
}

.lesson-body pre {
  position: relative;
  margin: 1.4rem 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 10px;
  background: #111827;
  color: #f9fafb;
}

.lesson-body code {
  font-family: "Cascadia Code", "Consolas", monospace;
}

.lesson-body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7efff, #f1e8ff);
  color: #5b21b6;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
}

.lesson-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.lesson-footer {
  justify-content: space-between;
  margin-top: 26px;
}

.footer-meta {
  margin-top: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--hero);
  color: white;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  padding: 28px 0 12px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
}

.mobile-only {
  display: none;
}

@media (max-width: 1100px) {
  .details-grid,
  .experience-grid,
  .hero-course-card-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .track-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 20px, var(--content-width));
  }

  .mobile-only {
    display: inline-flex;
  }

  .curriculum-panel {
    position: fixed;
    inset: 78px 10px 10px;
    z-index: 35;
    overflow: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.is-sidebar-open .curriculum-panel {
    transform: translateX(0);
  }

  body.is-sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(29, 31, 33, 0.42);
    z-index: 34;
  }

}

@media (max-width: 620px) {
  .section-heading,
  .lesson-topbar,
  .lesson-footer,
  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .curriculum-top {
    align-items: center;
  }

  .ghost-button,
  .nav-button,
  .track-card button,
  .hero-course-actions button,
  .purchase-actions button {
    width: 100%;
  }
}
