:root {
  --ink: #1f1830;
  --muted: #726a7f;
  --paper: #ffffff;
  --soft: #faf7fd;
  --line: #e7deef;
  --brand: #8658d8;
  --brand-dark: #60437d;
  --brand-soft: #efe6fb;
  --good: #1d7b55;
  --good-bg: #eaf8f0;
  --warn: #96631c;
  --warn-bg: #fff3df;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 12%, rgba(134, 88, 216, 0.16), transparent 30rem),
    linear-gradient(145deg, #ffffff 0%, #f8f3fb 64%, #f1eaf8 100%);
}

button,
input,
select {
  font: inherit;
}

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 38px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  background: rgba(250, 247, 253, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.brand img {
  width: 132px;
  height: auto;
}

.mode-nav {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.mode-button.active,
.mode-button:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.contact-pill,
.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.language-select {
  display: grid;
  gap: 4px;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.language-select select {
  min-height: 42px;
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.contact-pill,
.ghost-button {
  border: 1px solid var(--line);
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.78);
}

.primary-button,
.small-button {
  border: 0;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 32px rgba(96, 67, 125, 0.2);
}

.compact {
  min-height: 36px;
  padding: 0 13px;
}

.small-button {
  min-height: 36px;
  padding: 0 13px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 22px;
  align-items: stretch;
  padding: 28px 0 16px;
}

.hero-copy,
.hero-card,
.board,
.course-card,
.lesson-list,
.player-panel {
  border: 1px solid rgba(96, 67, 125, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(52, 36, 70, 0.08);
}

.hero-copy {
  padding: clamp(24px, 5vw, 46px);
}

.hero-card,
.board,
.lesson-list,
.player-panel {
  padding: 22px;
}

.hero-card {
  display: grid;
  align-content: end;
  min-height: 420px;
  color: #fff;
  background:
    linear-gradient(rgba(76, 49, 107, 0.76), rgba(76, 49, 107, 0.9)),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, 0.22) 34px 38px),
    linear-gradient(120deg, #ffffff, #eadcff);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card .eyebrow,
.hero-card .tag {
  color: #fff;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 4.2vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.78);
}

.hero-actions,
.student-actions,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.verified-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 0;
}

.verified-strip div,
.payment-line,
.progress-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

dt {
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

dd {
  margin: 5px 0 0;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  width: max-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.course-price {
  margin: 26px 0 12px;
}

.course-price strong {
  display: block;
  font-size: 2.2rem;
}

.course-price span,
.payment-line span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
}

.payment-line {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.section-block {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading.tight {
  margin-bottom: 12px;
}

.section-heading h1,
.section-heading h2 {
  margin-bottom: 0;
}

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

.course-card {
  overflow: hidden;
}

.course-art {
  min-height: 154px;
  display: flex;
  align-items: end;
  justify-content: end;
  padding: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 3.8rem;
  font-weight: 900;
  background: var(--brand);
}

.keys-art {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0 28px, #2c2038 28px 38px, rgba(255, 255, 255, 0.96) 38px 66px),
    var(--brand);
  color: rgba(96, 67, 125, 0.5);
}

.theory-art {
  background:
    linear-gradient(135deg, rgba(96, 67, 125, 0.85), rgba(134, 88, 216, 0.92)),
    radial-gradient(circle, #fff 0 5px, transparent 6px);
}

.exam-art {
  background: linear-gradient(135deg, #60437d, #b06dd4);
}

.course-body {
  padding: 18px;
}

.course-body p,
.board p,
.lesson-builder span,
.order-list span {
  color: var(--muted);
  line-height: 1.5;
}

.meta-list,
.check-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.meta-list li,
.check-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.meta-list li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.course-body footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.two-column,
.learning-layout,
.admin-grid,
.backend-grid {
  display: grid;
  gap: 16px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pill-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 700;
}

.learning-layout {
  grid-template-columns: 310px minmax(0, 1fr);
  margin-top: 24px;
}

.lesson-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

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

.lesson-item.active {
  border-color: rgba(134, 88, 216, 0.48);
  background: var(--brand-soft);
}

.lesson-item.locked {
  opacity: 0.56;
}

.lesson-item span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-dark);
  font-weight: 900;
}

.video-mock {
  display: grid;
  place-items: center;
  min-height: 390px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(rgba(31, 24, 48, 0.52), rgba(31, 24, 48, 0.62)),
    repeating-linear-gradient(90deg, #f7f2fb 0 42px, #1f1830 42px 58px);
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--brand);
  background: #fff;
  font-size: 1.8rem;
}

.lesson-content {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.lesson-content h1 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

.progress-card {
  min-width: 146px;
  text-align: center;
}

.progress-card strong {
  display: block;
  color: var(--brand-dark);
  font-size: 2.3rem;
}

.progress-card span {
  color: var(--muted);
}

.admin-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  margin-top: 24px;
}

.admin-main,
.admin-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status.live {
  color: var(--good);
  background: var(--good-bg);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.lesson-builder,
.order-list,
.toggle-list {
  display: grid;
  gap: 10px;
}

.lesson-builder div,
.order-list div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.toggle-list label {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
  font-weight: 650;
}

.toggle-list input {
  min-height: auto;
  width: 16px;
  accent-color: var(--brand);
}

.backend-hero {
  padding-top: 22px;
}

.backend-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .contact-pill,
  .language-select {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hero,
  .learning-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .course-grid,
  .backend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 10px;
  }

  .site-header {
    position: static;
    grid-template-columns: 1fr;
  }

  .brand {
    min-height: 92px;
  }

  .mode-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .contact-pill,
  .language-select {
    justify-self: stretch;
  }

  .language-select select {
    width: 100%;
  }

  .hero {
    padding-top: 12px;
  }

  .hero-copy,
  .hero-card,
  .board,
  .lesson-list,
  .player-panel {
    padding: 18px;
  }

  .verified-strip,
  .course-grid,
  .two-column,
  .backend-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .lesson-content {
    display: grid;
  }

  .course-body footer {
    align-items: stretch;
  }

  .video-mock {
    min-height: 240px;
  }

  .student-actions .primary-button,
  .student-actions .ghost-button,
  .hero-actions .primary-button,
  .hero-actions .ghost-button {
    width: 100%;
  }
}
