:root {
  --bg: #07111d;
  --surface: #0c1a2a;
  --surface-2: #112339;
  --line: #1b3150;
  --line-2: #26436a;
  --text: #e8eef5;
  --muted: #8ea3bb;
  --faint: #5d7390;
  --blue: #1a73e8;
  --blue-hi: #4c94f5;
  --green: #7fd6a6;
  --amber: #e8b75a;
  --radius: 14px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
.muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: rgba(7, 17, 29, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.mark {
  font: 700 12px/1 var(--display); letter-spacing: 0.04em; padding: 7px 8px; border-radius: 8px;
  background: var(--blue); color: #fff;
}
.brand-name { font: 600 15px var(--display); }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.who { color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font: 600 14px var(--body); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #2a80f0; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { border-color: var(--blue-hi); }
.btn.whop { background: #fff; color: #0b1320; }
.btn.whop:hover { background: #e9eef5; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn:focus-visible, .link-btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 2px; }

/* hero */
.hero {
  padding: 64px 0 44px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 15% -10%, rgba(26, 115, 232, 0.22), transparent 70%),
    linear-gradient(transparent 0 calc(100% - 1px), var(--line) 0) 0 0 / 100% 48px,
    linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(27, 49, 80, 0.45) 0) 0 0 / 48px 100%;
}
.eyebrow { font: 500 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-hi); margin: 0 0 14px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; }
.lede { font-size: 18px; color: var(--muted); max-width: 560px; margin: 16px 0 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; }
.stats li { font: 500 12px var(--mono); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); background: rgba(12, 26, 42, 0.7); }
.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-note { width: 100%; font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.progress-card {
  width: 100%; max-width: 520px; padding: 16px 18px; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: var(--surface);
}
.progress-card .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 99px; }
.progress-card .btn { margin-top: 14px; }
.plan-line { margin: 0 0 12px; font-size: 14px; color: var(--green); }
.notice {
  width: 100%; max-width: 560px; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  border: 1px solid rgba(232, 183, 90, 0.4); background: rgba(232, 183, 90, 0.08); color: #f3d9a6;
}

/* sections */
.section-head { margin: 52px 0 20px; }
.section-head h2 { font-size: 26px; }
.section-head p { margin: 6px 0 0; }

/* curriculum */
.modules { display: grid; gap: 14px; }
.module { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.module-head { display: flex; gap: 16px; align-items: baseline; padding: 18px 20px 12px; }
.module-num { font: 500 12px var(--mono); color: var(--blue-hi); white-space: nowrap; }
.module-head h3 { font-size: 19px; }
.module-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.module-meta { margin-left: auto; font: 500 12px var(--mono); color: var(--faint); white-space: nowrap; }
.lessons { list-style: none; margin: 0; padding: 0 8px 8px; }
.lesson-row {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 10px; text-decoration: none; color: inherit;
}
a.lesson-row:hover { background: var(--surface-2); }
.lesson-row .idx { font: 500 12px var(--mono); color: var(--faint); text-align: center; }
.lesson-row .t { font-weight: 600; }
.lesson-row .s { font-size: 13px; color: var(--muted); }
.lesson-row .right { display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--faint); }
.lesson-row.soon .t { color: var(--muted); }
.pill { font: 500 11px var(--mono); padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); }
.pill.live { color: var(--green); border-color: rgba(127, 214, 166, 0.4); }
.ico { width: 18px; height: 18px; flex: none; }
.ico.lock { color: var(--faint); }
.ico.done { color: var(--green); }
.ico.play { color: var(--blue-hi); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.plan.featured { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 20px 60px -30px rgba(26, 115, 232, 0.6); }
.plan .tag { position: absolute; top: -11px; left: 20px; margin: 0; font: 500 11px var(--mono); padding: 3px 9px; border-radius: 99px; background: var(--blue); color: #fff; }
.plan h3 { font-size: 18px; }
.price { font: 700 34px var(--display); margin: 8px 0 4px; }
.price span { font: 500 14px var(--body); color: var(--muted); }
.plan-rule { margin: 0 0 14px; color: var(--green); font-size: 14px; font-weight: 500; }
.plan ul { margin: 0 0 20px; padding-left: 18px; color: var(--muted); font-size: 14px; flex: 1; }
.plan li { margin: 4px 0; }

.foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 48px; padding-bottom: 40px; color: var(--faint); font-size: 13px; }
.foot a { color: var(--faint); }

/* lesson page */
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 6px; cursor: pointer; }
.player-layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 57px); }
.sidebar { border-right: 1px solid var(--line); background: var(--surface); padding: 18px 12px 40px; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; }
.back { display: inline-block; margin: 0 8px 14px; font-size: 13px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.side-progress { margin: 0 8px 16px; font-size: 12px; color: var(--muted); }
.side-progress .bar { margin-top: 6px; }
.side-mod { margin-bottom: 14px; }
.side-mod h4 { margin: 0 8px 6px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.side-link { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--muted); }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.current { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--blue); }
.side-link .ico { width: 16px; height: 16px; }

.lesson-main { padding: 28px clamp(16px, 4vw, 48px) 60px; max-width: 1000px; width: 100%; }
.crumb { font: 500 12px var(--mono); color: var(--blue-hi); letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.lesson-title { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.1; }
.lesson-summary { margin: 8px 0 20px; }

.stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #040b14; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-cover {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background:
    radial-gradient(500px 240px at 50% 40%, rgba(26, 115, 232, 0.16), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(27, 49, 80, 0.35) 38px 39px),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(27, 49, 80, 0.35) 38px 39px);
}
.stage-cover .inner { max-width: 420px; }
.stage-cover .big-ico { width: 44px; height: 44px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.stage-cover h2 { font-size: 22px; }
.stage-cover p { color: var(--muted); margin: 8px 0 16px; font-size: 14px; }
.stage-cover .btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.skeleton { position: absolute; inset: 0; background: linear-gradient(100deg, #07111d 30%, #0f2034 50%, #07111d 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }

.lesson-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 0; }
.lesson-bar .spacer { flex: 1; }
.btn.done { border-color: rgba(127, 214, 166, 0.5); color: var(--green); }

.notes { margin-top: 28px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.notes h2 { font-size: 17px; margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 18px; color: #cfdae6; }
.notes li { margin: 6px 0; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; z-index: 50; }

@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; }
  .plan.featured { order: -1; }
  .player-layout { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed; top: 57px; left: 0; bottom: 0; width: min(320px, 86vw); height: auto; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open { transform: none; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .hero { padding: 44px 0 32px; }
  .module-head { flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 14px 10px; }
  .module-meta { margin-left: 0; width: 100%; }
  .lessons { padding: 0 4px 6px; }
  .lesson-row { grid-template-columns: 22px 1fr auto; gap: 10px; padding: 10px 8px; }
  .lesson-row .s { display: none; }
  .lesson-row .mins { display: none; }
  .who { display: none; }
  .hero-cta .btn { flex: 1 1 auto; }
  .stage.covered { aspect-ratio: auto; min-height: 280px; }
  .stage.covered .stage-cover { position: relative; min-height: 280px; }
}
