:root {
  color-scheme: dark;
  --bg: #070b17;
  --surface: #10182b;
  --surface-2: #17213a;
  --surface-3: #202d4b;
  --text: #f7f8fc;
  --muted: #9da8be;
  --primary: #ff0033;
  --primary-2: #ff4d5e;
  --accent: #ff365d;
  --success: #5ce1a5;
  --danger: #ff647c;
  --warning: #ffc857;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1180px;
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -10%, rgba(255, 0, 51, 0.22), transparent 31rem),
    radial-gradient(circle at 96% 12%, rgba(255, 77, 94, 0.1), transparent 25rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(255, 77, 94, 0.82);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 10px;
  background: #fff;
  color: #050817;
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 32px), 760px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(7, 11, 23, 0.78);
  backdrop-filter: blur(18px);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand img {
  width: 38px;
  height: 38px;
}

.brand-mark {
  color: var(--primary);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a {
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.header-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(255, 0, 51, 0.4);
  border-radius: 14px;
  background: rgba(255, 0, 51, 0.13);
  color: #ffd9df;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero {
  position: relative;
  padding: clamp(54px, 8vw, 100px) 0 44px;
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: 46px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.eyebrow,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(255, 0, 51, 0.36);
  border-radius: 999px;
  background: rgba(255, 0, 51, 0.1);
  color: #ffd5dc;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 15px var(--success);
}

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

h1 {
  max-width: 800px;
  margin: 19px 0 20px;
  font-size: clamp(2.45rem, 7.5vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 4.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 8px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.gradient-text {
  background: linear-gradient(100deg, #ff1744, #ff5064 48%, #ff9aa8);
  background-clip: text;
  color: transparent;
}

.hero-copy > p {
  max-width: 640px;
  margin-bottom: 28px;
  color: #bdc6d8;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 13px 30px rgba(255, 0, 51, 0.25);
  color: #fff;
}

.btn-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.btn-ghost {
  min-height: 42px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-small {
  min-height: 40px;
  padding-inline: 13px;
  font-size: 0.86rem;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-proof span::before {
  content: "✓";
  margin-right: 7px;
  color: var(--success);
}

.daily-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 0, 51, 0.18), rgba(16, 24, 43, 0.96) 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.daily-card::after {
  position: absolute;
  top: -70px;
  right: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 77, 94, 0.13);
  content: "";
  filter: blur(2px);
}

.daily-score-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 25px 0 18px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.score-number {
  font-size: 2.1rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.dots {
  letter-spacing: 0.16em;
}

.section {
  padding: clamp(48px, 7vw, 86px) 0;
}

.section-muted {
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.022);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.section-head p {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
}

.text-link {
  color: #ffc1ca;
  font-weight: 800;
}

.text-link:hover {
  color: var(--accent);
}

.quick-grid,
.feature-grid,
.course-grid,
.stats-grid {
  display: grid;
  gap: 15px;
}

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

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

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

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

.quick-card,
.feature-card,
.course-card,
.stat-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 24, 43, 0.82);
}

.quick-card {
  display: flex;
  min-height: 96px;
  align-items: center;
  gap: 13px;
  padding: 17px;
  font-weight: 850;
}

.quick-card:hover,
.course-card:hover {
  border-color: rgba(255, 0, 51, 0.55);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.quick-icon,
.course-icon {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 0, 51, 0.13);
  font-size: 1.45rem;
}

.feature-card {
  min-height: 230px;
  padding: 24px;
}

.feature-card p,
.course-card p,
.muted {
  color: var(--muted);
}

.feature-number {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 38px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 77, 94, 0.11);
  color: var(--accent);
  font-weight: 950;
}

.course-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box input,
.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: rgba(8, 13, 26, 0.8);
  color: var(--text);
}

.search-box input:focus,
.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 0, 51, 0.12);
}

.course-card {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.course-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.course-card h3 {
  margin-top: 17px;
}

.course-card p {
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: #c5cde0;
  font-size: 0.78rem;
  font-weight: 750;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  letter-spacing: -0.05em;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.ad-break {
  display: none;
  min-height: 130px;
  align-items: center;
  justify-content: center;
  margin: 30px auto;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ads-active .ad-break {
  display: flex;
}

.site-footer {
  padding: 42px 0 calc(90px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mobile-menu-toggle,
.mobile-menu-close {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.mobile-menu-backdrop {
  position: fixed;
  z-index: 118;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(1, 3, 9, 0.74);
  backdrop-filter: blur(4px);
}

.mobile-menu-panel {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  display: grid;
  width: min(88vw, 370px);
  height: 100dvh;
  align-content: start;
  padding: 18px 18px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: #0b1120;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.48);
  transform: translateX(105%);
  transition: transform 0.22s ease;
}

.mobile-menu-open {
  overflow: hidden;
}

.mobile-menu-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-head .mobile-menu-close {
  display: grid;
}

.mobile-menu-nav {
  display: grid;
  gap: 7px;
  padding-top: 18px;
}

.mobile-menu-nav a {
  display: grid;
  min-height: 52px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #c7cfdf;
  font-weight: 820;
  grid-template-columns: 28px minmax(0, 1fr);
}

.mobile-menu-nav a > span:first-child {
  color: var(--primary-2);
  font-size: 1.15rem;
  text-align: center;
}

.mobile-menu-nav a[aria-current="page"] {
  border-color: rgba(255, 0, 51, 0.24);
  background: rgba(255, 0, 51, 0.12);
  color: #fff;
}

.mobile-menu-nav .mobile-menu-secondary {
  margin-top: 11px;
  padding-top: 11px;
  border-top-color: var(--border);
  border-radius: 0 0 14px 14px;
}

.bottom-nav {
  position: fixed;
  z-index: 75;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 10px;
  display: none;
  min-height: 62px;
  align-items: center;
  justify-content: space-around;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(12, 18, 33, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: flex;
  min-width: 62px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 13px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
}

.bottom-nav a span:first-child {
  font-size: 1.15rem;
}

.bottom-nav a[aria-current="page"] {
  background: rgba(255, 0, 51, 0.16);
  color: #ffe2e7;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.breadcrumbs span::before {
  content: "/";
  margin-right: 7px;
  opacity: 0.5;
}

.course-hero {
  padding: 38px 0 28px;
}

.course-hero h1 {
  max-width: 900px;
  margin-block: 14px;
  font-size: clamp(2.1rem, 6vw, 4.3rem);
}

.course-hero p {
  max-width: 700px;
  color: var(--muted);
}

.course-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.course-facts span {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #c7d0e2;
  font-size: 0.82rem;
  font-weight: 750;
}

.course-shell {
  display: grid;
  align-items: start;
  gap: 20px;
  grid-template-columns: 330px minmax(0, 1fr);
  padding-bottom: 76px;
}

.course-main {
  min-width: 0;
}

.syllabus-trigger {
  display: none;
}

.syllabus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.syllabus-close {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
}

.syllabus-backdrop {
  position: fixed;
  z-index: 124;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(1, 3, 9, 0.76);
  backdrop-filter: blur(4px);
}

.course-syllabus-open {
  overflow: hidden;
}

.course-sidebar {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 16px;
}

.progress-wrap {
  margin-bottom: 15px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.35s ease;
}

.module-list {
  display: grid;
  gap: 8px;
}

.module-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.module-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 850;
}

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

.lesson-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: 0.78rem;
}

.lesson-link:hover,
.lesson-link.active {
  background: rgba(255, 0, 51, 0.12);
  color: var(--text);
}

.lesson-status {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.lesson-link.completed .lesson-status {
  display: grid;
  place-items: center;
  border-color: transparent;
  background: var(--success);
  color: #07120d;
}

.lesson-link.completed .lesson-status::after {
  content: "✓";
  font-size: 0.67rem;
  font-weight: 950;
}

.lesson-panel {
  overflow: hidden;
}

.video-stage {
  position: relative;
  display: grid;
  min-height: min(52vw, 520px);
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #02040a;
}

.video-stage img,
.video-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-stage::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.55));
  content: "";
  pointer-events: none;
}

.play-button {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 0, 51, 0.96);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  font-size: 1.55rem;
}

.lesson-body {
  padding: clamp(18px, 4vw, 28px);
}

.lesson-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lesson-head h2 {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.lesson-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.icon-btn {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.icon-btn.active {
  border-color: rgba(255, 200, 87, 0.5);
  color: var(--warning);
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.lesson-resources {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(4, 8, 18, 0.3);
}

.lesson-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.lesson-tab {
  position: relative;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.lesson-tab + .lesson-tab {
  border-left: 1px solid var(--border);
}

.lesson-tab::after {
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: transparent;
  content: "";
}

.lesson-tab:hover:not([disabled]),
.lesson-tab.active {
  background: rgba(255, 0, 51, 0.08);
  color: #fff;
}

.lesson-tab.active::after {
  background: var(--primary);
}

.lesson-tab[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
}

.lesson-resource-panel {
  min-height: 180px;
  padding: clamp(18px, 4vw, 26px);
}

.quiz-content .question-text {
  padding: 2px 0 4px;
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
}

.quiz-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.quiz-navigation .quiz-share {
  margin-right: auto;
}

.pdf-content {
  padding: 0;
  overflow: hidden;
}

.pdf-frame {
  width: 100%;
  height: min(76vh, 820px);
  min-height: 520px;
  border: 0;
  background: #fff;
}

.lesson-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--border);
}

.loading-state,
.empty-state {
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.dialog {
  width: min(calc(100% - 24px), 640px);
  max-height: min(88vh, 780px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #0d1426;
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(1, 3, 9, 0.8);
  backdrop-filter: blur(8px);
}

.dialog-inner {
  padding: clamp(20px, 5vw, 30px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.question-text {
  margin-bottom: 20px;
  font-size: 1.06rem;
  font-weight: 760;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: left;
}

.option-button:hover:not([disabled]) {
  border-color: rgba(255, 0, 51, 0.55);
  background: rgba(255, 0, 51, 0.1);
}

.option-button.correct {
  border-color: rgba(92, 225, 165, 0.75);
  background: rgba(92, 225, 165, 0.12);
}

.option-button.wrong {
  border-color: rgba(255, 100, 124, 0.75);
  background: rgba(255, 100, 124, 0.1);
}

.option-letter {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.76rem;
  font-weight: 900;
}

.feedback-box {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: #ccd3e2;
  font-size: 0.9rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field label,
.field legend {
  color: #d5dbea;
  font-size: 0.82rem;
  font-weight: 800;
}

.choice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-pills label {
  position: relative;
}

.choice-pills input {
  position: absolute;
  opacity: 0;
}

.choice-pills span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 0.8rem;
}

.choice-pills input:checked + span {
  border-color: var(--primary);
  background: rgba(255, 0, 51, 0.16);
  color: #ffe2e7;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  display: grid;
  max-width: min(360px, calc(100% - 32px));
  gap: 9px;
}

.toast {
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #17213a;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  color: #e8ebf4;
  font-size: 0.86rem;
  animation: toast-in 0.22s ease both;
}

@keyframes toast-in {
  from { transform: translateY(10px); opacity: 0; }
}

.challenge-wrap {
  padding: 34px 0 80px;
}

.challenge-card {
  padding: clamp(20px, 5vw, 34px);
}

.challenge-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.timer {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.challenge-dots {
  display: flex;
  gap: 7px;
}

.challenge-dots span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.challenge-dots span.current {
  width: 25px;
  background: var(--primary);
}

.challenge-dots span.done {
  background: var(--success);
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 0, 51, 0.4);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 0, 51, 0.17), rgba(16, 24, 43, 0.95));
}

.result-score {
  margin: 12px 0;
  font-size: clamp(3.6rem, 16vw, 7rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.08em;
}

.leaderboard {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.leader-row {
  display: grid;
  align-items: center;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}

.leader-row:last-child {
  border-bottom: 0;
}

.leader-rank {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.leader-score {
  text-align: right;
}

.leader-score strong,
.leader-score small {
  display: block;
}

.leader-score small {
  color: var(--muted);
  font-size: 0.7rem;
}

.prose {
  color: #c9d1e0;
}

.prose h2,
.prose h3 {
  margin-top: 2em;
  color: var(--text);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .hero-grid,
  .course-shell {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: fixed;
    z-index: 130;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(90vw, 390px);
    max-height: 100dvh;
    padding: 18px 16px calc(26px + env(safe-area-inset-bottom));
    border-radius: 0 22px 22px 0;
    background: #0b1120;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.5);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

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

  .syllabus-close {
    display: grid;
  }

  .syllabus-trigger {
    position: sticky;
    z-index: 72;
    top: 78px;
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    padding: 0 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 51, 0.28);
    border-radius: 14px;
    background: rgba(12, 18, 33, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(16px);
    font-weight: 850;
  }

  .syllabus-trigger > span:first-child {
    color: var(--primary-2);
    font-size: 1.1rem;
  }

  .syllabus-current {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

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

@media (max-width: 720px) {
  .container,
  .narrow {
    width: min(calc(100% - 24px), var(--max));
  }

  .desktop-nav,
  .header-action {
    display: none;
  }

  .mobile-menu-toggle {
    display: grid;
  }

  .header-inner {
    min-height: 60px;
  }

  .course-hero {
    padding: 20px 0 18px;
  }

  .course-hero h1 {
    margin-block: 10px;
    font-size: clamp(1.85rem, 9vw, 2.8rem);
  }

  .course-hero p {
    margin-bottom: 14px;
    font-size: 0.92rem;
  }

  .course-facts {
    margin-top: 12px;
  }

  .course-facts span {
    padding: 6px 9px;
    font-size: 0.74rem;
  }

  .syllabus-trigger {
    top: 68px;
  }

  .bottom-nav {
    display: flex;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-grid {
    gap: 30px;
  }

  .daily-card {
    padding: 22px;
  }

  .feature-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-grid,
  .lesson-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head .text-link {
    display: none;
  }

  .course-card {
    min-height: 150px;
  }

  .video-stage {
    min-height: auto;
    border-radius: 0;
  }

  .lesson-panel {
    margin-inline: -12px;
    border-inline: 0;
    border-radius: 0;
  }

  .lesson-body {
    padding: 18px 16px;
  }

  .lesson-resources {
    margin-inline: -2px;
  }

  .lesson-resource-panel {
    padding: 18px 14px;
  }

  .pdf-content {
    padding: 0;
  }

  .pdf-frame {
    height: 72vh;
    min-height: 470px;
  }

  .dialog {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 480px) {
  .quick-grid,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-card {
    min-height: 110px;
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-card {
    padding: 16px;
  }

  .button-row .btn {
    flex: 1 1 100%;
  }

  .lesson-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
