:root {
  --purple: #6e4fed;
  --purple-dark: #3b3190;
  --purple-deep: #2f2775;
  --lime: #bdd615;
  --ink: #202137;
  --muted: #6d7085;
  --line: #e5e4ed;
  --soft: #f7f7fb;
  --white: #fff;
  --max: 1180px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  width: min(var(--max), calc(100% - 48px));
  height: 84px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 42px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand img { display: block; width: 148px; height: auto; }
.brand-divider { width: 1px; height: 27px; margin-left: 6px; background: var(--line); }
.brand-area { max-width: 72px; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.15; }
nav { display: flex; gap: 30px; margin-left: auto; }
nav a { color: #55586b; font-size: .9rem; font-weight: 600; }
nav a:hover { color: var(--purple); }
.header-help { min-height: 44px; display: inline-flex; align-items: center; padding: 0 23px; border-radius: 28px; color: white; background: var(--purple); font-size: .88rem; font-weight: 700; }
.header-help:hover { background: var(--purple-dark); }

.hero {
  min-height: 580px;
  padding: 68px max(24px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr .9fr;
  align-items: center;
  gap: 76px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 12% 24%, rgba(189,214,21,.2) 0 3px, transparent 4px),
    radial-gradient(circle at 83% 18%, rgba(255,255,255,.12) 0 2px, transparent 3px),
    linear-gradient(105deg, #342a7f 0%, #493ca0 54%, #6450cf 100%);
}
.eyebrow { margin: 0 0 13px; color: var(--purple); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; }
.hero .eyebrow, .eyebrow.light { color: var(--lime); }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(2.7rem, 4.7vw, 4.55rem); font-weight: 900; line-height: 1.04; letter-spacing: -.055em; }
h1 em { color: var(--lime); font-style: normal; }
.hero-text { max-width: 590px; margin: 24px 0 28px; color: #e3dff6; font-size: 1.05rem; line-height: 1.7; }
.search { width: min(590px, 100%); height: 62px; display: flex; align-items: center; padding: 7px; border-radius: 32px; background: white; box-shadow: 0 15px 38px rgba(25,17,74,.22); }
.search-icon { width: 18px; height: 18px; position: relative; flex: 0 0 auto; margin: 0 16px; border: 2px solid #8b8ca0; border-radius: 50%; }
.search-icon::after { content: ""; width: 7px; height: 2px; position: absolute; right: -5px; bottom: -3px; transform: rotate(45deg); background: #8b8ca0; }
.search input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search input::placeholder { color: #9697a6; }
.search button { height: 48px; padding: 0 25px; border: 0; border-radius: 28px; color: var(--purple-dark); background: var(--lime); font-weight: 800; }
.search button:hover { background: #cde71b; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-top: 20px; color: #d1ccea; font-size: .75rem; }
.hero-facts span { display: inline-flex; align-items: center; gap: 6px; }
.hero-facts b { color: var(--lime); font-size: .88rem; }

.featured {
  min-height: 450px;
  align-self: stretch;
  position: relative;
  margin: -8px 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  color: white;
  background: var(--purple);
  box-shadow: 0 30px 70px rgba(24,16,73,.35);
  transform: rotate(1deg);
}
.featured::before { content: ""; width: 78px; height: 78px; position: absolute; right: -24px; top: -23px; border: 16px solid var(--lime); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; }
.featured-top { display: flex; justify-content: space-between; align-items: center; color: #d8d1fb; font-size: .72rem; }
.pill { padding: 8px 12px; border-radius: 20px; color: #3e3380; background: var(--lime); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.featured-visual { flex: 1; min-height: 275px; display: grid; place-items: center; position: relative; }
.portal-window { width: 77%; min-width: 260px; overflow: hidden; border: 7px solid white; border-radius: 12px; background: white; transform: perspective(800px) rotateY(-9deg) rotateZ(-2deg); box-shadow: 22px 22px 0 rgba(32,24,87,.2); }
.portal-bar { height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 9px; background: #f0eef9; }
.portal-bar i { width: 6px; height: 6px; border-radius: 50%; background: #c8c6d4; }
.portal-body { height: 155px; display: flex; background: #fafafe; }
.portal-sidebar { width: 48px; display: grid; align-content: start; justify-content: center; gap: 12px; padding-top: 14px; background: #302067; }
.portal-sidebar b, .portal-sidebar i { width: 16px; height: 4px; border-radius: 3px; background: var(--lime); }
.portal-sidebar i { width: 12px; background: #826dd5; }
.portal-content { flex: 1; padding: 25px 18px; color: #4a3e78; }
.portal-content small, .portal-content strong { display: block; }
.portal-content small { margin-bottom: 3px; font-size: .52rem; }
.portal-content strong { font-size: .72rem; }
.portal-content > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.portal-content i { height: 35px; border-left: 4px solid #7456e5; border-radius: 5px; background: #ebe8fb; }
.featured-play { width: 64px; height: 64px; position: absolute; display: grid; place-items: center; padding-left: 4px; border-radius: 50%; color: var(--purple-dark); background: var(--lime); box-shadow: 0 10px 25px rgba(49,38,91,.25); }
.featured-copy p { margin: 0 0 5px; color: #d9d2ff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.featured-copy h2 { max-width: 390px; margin: 0; font-size: 1.38rem; line-height: 1.3; }

.training-section { width: min(var(--max), calc(100% - 48px)); margin: auto; padding: 96px 0 105px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; }
.section-heading h2, .how-section h2, .help h2 { margin: 0; font-size: clamp(2rem, 3.3vw, 3rem); letter-spacing: -.045em; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.6; }
.filters { display: flex; gap: 9px; padding: 36px 0 28px; overflow-x: auto; scrollbar-width: thin; }
.filter { min-height: 42px; flex: 0 0 auto; padding: 0 17px; border: 1px solid var(--line); border-radius: 28px; color: #686a7b; background: white; font-size: .82rem; font-weight: 600; }
.filter span { margin-left: 8px; color: #a7a8b4; }
.filter:hover, .filter.active { border-color: var(--purple); color: white; background: var(--purple); }
.filter.active span { color: #d9d3ff; }
.course-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 38px 24px; }
.course-card[hidden] { display: none; }
.course-card { min-width: 0; }
.course-cover { width: 100%; aspect-ratio: 16 / 8.7; position: relative; overflow: hidden; border: 0; border-radius: 22px; color: white; text-align: left; }
.course-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .28s ease; }
.course-cover:hover img { transform: scale(1.025); }
.course-duration { position: absolute; right: 18px; top: 17px; z-index: 2; padding: 5px 9px; border-radius: 20px; background: rgba(25,21,58,.72); font-size: .72rem; font-weight: 700; }
.cover-action { width: 52px; height: 52px; position: absolute; left: 25px; bottom: 19px; z-index: 2; display: grid; place-items: center; padding-left: 3px; border-radius: 50%; color: var(--purple-dark); background: white; box-shadow: 0 10px 28px rgba(22,17,54,.23); transition: transform .18s ease; }
.course-cover:hover .cover-action { transform: scale(1.08); }
.cover-caption { max-width: 52%; position: absolute; right: 18px; bottom: 17px; z-index: 2; padding: 10px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; color: white; background: rgba(47,39,117,.88); box-shadow: 0 10px 28px rgba(22,17,54,.2); text-align: left; backdrop-filter: blur(6px); }
.cover-caption small, .cover-caption strong { display: block; }
.cover-caption small { margin-bottom: 2px; color: var(--lime); font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.cover-caption strong { font-size: .92rem; line-height: 1.2; }
.course-copy { padding: 18px 5px 0; }
.course-meta { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: var(--purple); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.course-meta b { padding: 5px 9px; border-radius: 20px; color: #626476; background: #f0eff5; font-size: .65rem; letter-spacing: 0; }
.course-copy h3 { margin: 9px 0 7px; font-size: 1.25rem; letter-spacing: -.025em; }
.course-copy p { min-height: 48px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.text-action { display: inline-flex; align-items: center; gap: 14px; margin-top: 14px; padding: 0; border: 0; color: var(--purple); background: transparent; font-size: .85rem; font-weight: 800; }
.text-action span { transition: transform .18s ease; }
.text-action:hover span { transform: translateX(4px); }
.empty-state { padding: 65px 20px; border-radius: 18px; text-align: center; background: var(--soft); }
.empty-state > span { color: var(--purple); font-size: 2.5rem; }
.empty-state h3 { margin: 10px 0 6px; }
.empty-state p { color: var(--muted); }
.empty-state button { border: 0; color: var(--purple); background: transparent; font-weight: 800; }

.how-section {
  width: min(var(--max), calc(100% - 48px));
  min-height: 360px;
  margin: 0 auto 105px;
  padding: 58px 62px;
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  align-items: center;
  gap: 60px;
  border-radius: 30px;
  color: white;
  background: linear-gradient(120deg, #302779, #4c3da5);
}
.how-intro > p:not(.eyebrow) { color: #cac5df; line-height: 1.65; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.how-steps li { min-height: 82px; display: flex; align-items: center; gap: 15px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.06); }
.how-steps li > span { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--purple-deep); background: var(--lime); font-weight: 800; }
.how-steps small, .how-steps strong { display: block; }
.how-steps small { margin-bottom: 3px; color: #aaa2ca; font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.how-steps strong { font-size: .9rem; }
.how-steps p { margin: 3px 0 0; color: #c9c3df; font-size: .75rem; }

.help { width: min(var(--max), calc(100% - 48px)); margin: 0 auto 90px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.help > div:first-child { max-width: 480px; }
.help p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.help-actions { display: flex; gap: 12px; }
.help-actions a { min-width: 205px; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 28px; transition: border-color .18s ease, transform .18s ease; }
.help-actions a:hover { border-color: var(--purple); transform: translateY(-2px); }
.help-actions a > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--purple); }
.help-actions small, .help-actions strong { display: block; }
.help-actions small { color: var(--muted); }
.help-actions b { margin-left: auto; color: var(--purple); }

footer { min-height: 105px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; gap: 30px; color: #898a97; border-top: 1px solid var(--line); font-size: .75rem; }
.footer-brand { margin-right: auto; }
.footer-brand img { width: 126px; }

dialog { width: min(1050px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(28,20,66,.4); overflow: hidden; }
dialog::backdrop { background: rgba(28,24,48,.72); backdrop-filter: blur(5px); }
.modal-header { min-height: 72px; padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; color: white; background: var(--purple); }
.modal-header small, .modal-header strong { display: block; }
.modal-header small { margin-bottom: 2px; opacity: .7; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.modal-header button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: white; background: transparent; font-size: 1.7rem; line-height: 1; }
.modal-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); background: white; }
.lesson-sidebar { padding: 24px 18px; border-right: 1px solid var(--line); background: #f8f7fc; }
.lesson-sidebar > p { margin: 0 5px 14px; color: #77798a; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
#lesson-list { display: grid; gap: 8px; }
.lesson-button { width: 100%; min-height: 76px; padding: 11px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 12px; color: var(--ink); background: transparent; text-align: left; }
.lesson-button:hover { background: white; }
.lesson-button.active { border-color: #d7d0fb; background: white; box-shadow: 0 8px 22px rgba(72,55,151,.08); }
.lesson-button > img { width: 62px; aspect-ratio: 16 / 9; flex: 0 0 auto; display: block; border: 2px solid transparent; border-radius: 7px; object-fit: cover; }
.lesson-button.active > img { border-color: var(--purple); }
.lesson-button strong, .lesson-button small { display: block; }
.lesson-button strong { font-size: .78rem; line-height: 1.3; }
.lesson-button small { margin-top: 5px; color: #8a8c9b; font-size: .66rem; }
.course-total { margin: 20px 5px 0; padding-top: 16px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #8a8c9b; font-size: .72rem; }
.course-total strong { color: var(--purple); }
.player-area { min-width: 0; padding: 24px; }
.player-shell { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: #171429; }
.player-shell video { width: 100%; height: 100%; display: block; background: #171429; }
.video-unavailable { height: 100%; padding: 40px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; background: linear-gradient(135deg, #292164, #4c3ca3); color: white; }
.video-unavailable > span { width: 62px; height: 62px; display: grid; place-items: center; padding-left: 3px; border-radius: 50%; color: var(--purple-deep); background: var(--lime); font-size: 1.25rem; }
.video-unavailable h3 { margin: 17px 0 7px; }
.video-unavailable p { max-width: 490px; margin: 0; color: #d8d2ed; font-size: .85rem; line-height: 1.55; }
.lesson-details { padding-top: 18px; display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.lesson-details p { margin: 0 0 5px; color: var(--purple); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.lesson-details h3 { margin: 0 0 5px; font-size: 1.15rem; }
.lesson-details > div > span { display: block; color: var(--muted); font-size: .8rem; line-height: 1.45; }
#next-lesson { min-height: 43px; flex: 0 0 auto; padding: 0 17px; border: 0; border-radius: 24px; color: white; background: var(--purple); font-size: .78rem; font-weight: 800; }

@media (max-width: 900px) {
  nav { display: none; }
  .header-help { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 55px; padding-top: 60px; padding-bottom: 70px; }
  .featured { min-height: 460px; }
  .how-section { grid-template-columns: 1fr; }
  .help { align-items: flex-start; flex-direction: column; }
  .modal-layout { grid-template-columns: 1fr; overflow-y: auto; max-height: calc(100vh - 100px); }
  .lesson-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  #lesson-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .site-header { width: calc(100% - 28px); height: 70px; }
  .brand-divider, .brand-area, .header-help { display: none; }
  .brand img { width: 132px; }
  .hero { padding: 45px 18px 55px; }
  h1 { font-size: 2.65rem; }
  .search { height: 57px; }
  .search-icon { margin: 0 12px; }
  .search button { padding: 0 16px; }
  .hero-facts { gap: 8px 16px; }
  .featured { min-height: 420px; padding: 20px; }
  .featured-visual { min-height: 245px; }
  .portal-window { width: 87%; }
  .training-section { width: calc(100% - 28px); padding: 70px 0 80px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .course-grid { grid-template-columns: 1fr; }
  .course-copy p { min-height: 0; }
  .how-section { width: calc(100% - 28px); padding: 38px 24px; }
  .help { width: calc(100% - 28px); }
  .help-actions { width: 100%; flex-direction: column; }
  .help-actions a { width: 100%; }
  footer { padding: 28px 18px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .footer-brand { margin: 0; }
  dialog { max-height: calc(100vh - 14px); }
  .modal-header { min-height: 66px; }
  .modal-layout { max-height: calc(100vh - 80px); }
  #lesson-list { grid-template-columns: 1fr; }
  .lesson-sidebar { padding: 18px 14px; }
  .player-area { padding: 14px; }
  .lesson-details { align-items: flex-start; flex-direction: column; }
  #next-lesson { width: 100%; }
  .video-unavailable { padding: 20px; }
  .video-unavailable p { font-size: .75rem; }
}
