:root {
  --bg: #061725;
  --bg-deep: #03111d;
  --panel: #092238;
  --panel-soft: #0d2941;
  --panel-hover: #12324e;
  --gold: #d79232;
  --gold-light: #f0b85d;
  --gold-dark: #9f6520;
  --text: #f7f3ed;
  --muted: #a9b7c4;
  --line: rgba(255,255,255,.10);
  --line-gold: rgba(215,146,50,.45);
  --success: #e4ad54;
  --shadow: 0 18px 55px rgba(0,0,0,.22);
  --sidebar-width: 310px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 12%, rgba(215,146,50,.07), transparent 26rem),
    linear-gradient(145deg, var(--bg-deep), var(--bg));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #041727 0%, #061c2f 100%);
  border-right: 1px solid var(--line-gold);
  padding: 28px 18px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(215,146,50,.5) transparent;
}

.sidebar-brand {
  text-align: center;
  padding: 3px 10px 26px;
}

.brand-kicker,
.brand-name,
.brand-subtitle {
  display: block;
}

.brand-kicker {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--gold-light);
}

.brand-name {
  margin-top: -1px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  line-height: .98;
  letter-spacing: .025em;
  color: var(--gold-light);
}

.brand-subtitle {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.progress-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.progress-heading strong {
  color: var(--gold-light);
  font-size: 14px;
}

.progress-track {
  height: 5px;
  margin: 12px 0 8px;
  overflow: hidden;
  background: rgba(255,255,255,.10);
  border-radius: 999px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: inherit;
  transition: width .25s ease;
}

.progress-card small {
  color: #8495a4;
  font-size: 11px;
}

.main-nav {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.nav-button {
  width: 100%;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #dce4ea;
  cursor: pointer;
  text-align: left;
}

.nav-button:hover {
  background: rgba(255,255,255,.035);
}

.nav-button.is-active {
  color: var(--gold-light);
  border-color: var(--line-gold);
  background: rgba(215,146,50,.055);
}

.nav-icon {
  width: 22px;
  text-align: center;
  color: currentColor;
}

.sidebar-section-title {
  margin: 26px 9px 10px;
  color: #7790a3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.lesson-list {
  display: grid;
  gap: 6px;
}

.lesson-item {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #dce4ea;
  cursor: pointer;
  text-align: left;
}

.lesson-item:hover {
  background: rgba(255,255,255,.035);
}

.lesson-item.is-active {
  background: linear-gradient(90deg, rgba(215,146,50,.10), rgba(215,146,50,.025));
  border-color: rgba(215,146,50,.34);
}

.lesson-number {
  display: grid;
  place-items: center;
  width: 36px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #0b2a43;
  color: var(--gold-light);
  font-weight: 800;
  font-size: 12px;
}

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

.lesson-copy span,
.lesson-copy strong {
  display: block;
}

.lesson-copy span {
  margin-bottom: 2px;
  color: #728ca0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.lesson-copy strong {
  overflow: hidden;
  color: #edf1f4;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-status {
  color: #587083;
  font-size: 13px;
  text-align: center;
}

.lesson-item.is-complete .lesson-status {
  color: var(--gold-light);
}

.sidebar-note {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  padding: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.sidebar-note strong {
  color: #e7edf1;
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 clamp(22px, 4vw, 52px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(6,23,37,.90);
  backdrop-filter: blur(12px);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215,146,50,.09);
}

.menu-button,
.mobile-brand {
  display: none;
}

.view {
  width: min(1100px, calc(100% - 44px));
  margin: 0 auto;
  padding: 54px 0 38px;
}

.view[hidden] {
  display: none !important;
}

.lesson-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 9px;
  font-size: clamp(29px, 4vw, 43px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.lesson-heading p,
.section-heading p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.video-card {
  overflow: hidden;
  border: 1px solid rgba(215,146,50,.34);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.lesson-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.secondary-button,
.complete-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: #d4dde4;
}

.secondary-button:last-child {
  justify-self: end;
}

.secondary-button:disabled {
  opacity: .34;
  cursor: not-allowed;
}

.secondary-button:not(:disabled):hover {
  border-color: rgba(215,146,50,.38);
  background: rgba(215,146,50,.055);
}

.complete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #e0a449, #bc7726);
  color: #061624;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(191,118,36,.15);
}

.complete-button.is-complete {
  background: #0e3049;
  border-color: rgba(215,146,50,.48);
  color: var(--gold-light);
  box-shadow: none;
}

.check-icon {
  font-size: 15px;
}

.mobile-curriculum {
  display: none;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.material-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13,41,65,.82), rgba(7,28,46,.86));
}

.material-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid var(--line-gold);
  border-radius: 10px;
  background: rgba(215,146,50,.08);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
}

.material-label {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.material-card h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.material-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.material-link {
  margin-top: auto;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.materials-help {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.materials-help strong {
  color: #eef2f4;
}

.materials-help p {
  margin: 5px 0 0;
}

.materials-help code {
  color: var(--gold-light);
}

.site-footer {
  width: min(1100px, calc(100% - 44px));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 8px auto 0;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #687e8f;
  font-size: 11px;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(0,0,0,.62);
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 292px;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 24px 0 55px rgba(0,0,0,.38);
  }

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

  .main-content {
    margin-left: 0;
  }

  .topbar {
    height: 62px;
    justify-content: space-between;
    padding: 0 18px;
  }

  .menu-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--gold-light);
  }

  .mobile-brand {
    display: grid;
    text-align: center;
    line-height: 1;
  }

  .mobile-brand span {
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 8px;
    letter-spacing: .08em;
  }

  .mobile-brand strong {
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
  }

  .topbar-status span:last-child {
    display: none;
  }

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

  .material-card {
    min-height: 210px;
  }

  .mobile-curriculum {
    display: block;
    margin-top: 48px;
  }

  .section-heading.compact h2 {
    margin-bottom: 0;
    font-size: 25px;
  }

  .mobile-lesson-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .mobile-lesson-card {
    position: relative;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    color: var(--text);
    cursor: pointer;
    text-align: left;
  }

  .mobile-lesson-card.is-active {
    border-color: var(--line-gold);
    background: rgba(215,146,50,.07);
  }

  .mobile-lesson-card.is-complete::after {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(215,146,50,.13);
    color: var(--gold-light);
    font-weight: 900;
  }

  .mobile-lesson-card span {
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
  }

  .mobile-lesson-card strong {
    max-width: 90%;
    font-size: 14px;
    line-height: 1.35;
  }
}

@media (max-width: 680px) {
  .view {
    width: min(100% - 28px, 1100px);
    padding-top: 34px;
  }

  .lesson-heading,
  .section-heading {
    margin-bottom: 18px;
  }

  h1 {
    font-size: 29px;
  }

  .lesson-heading p,
  .section-heading p {
    font-size: 14px;
  }

  .video-card {
    margin-inline: -14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .lesson-actions {
    grid-template-columns: 1fr 1fr;
  }

  .complete-button {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .secondary-button {
    width: 100%;
    padding: 0 10px;
    font-size: 12px;
  }

  .secondary-button:last-child {
    justify-self: stretch;
  }

  .mobile-lesson-grid {
    grid-template-columns: 1fr;
  }

  .mobile-lesson-card {
    min-height: 105px;
  }

  .site-footer {
    width: min(100% - 28px, 1100px);
    flex-direction: column;
    gap: 5px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
