:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030306; color: #ECF0F4;
  --sidebar-width: clamp(17rem, 24vw, 24rem);
  --canvas: #030306;
  --sidebar: #040407;
  --navigator: #06070A;
  --panel: #07080C;
  --line: rgba(255, 255, 255, 0.075);
  --primary: #ECF0F4;
  --muted: #A6AFB8;
  --soft: #747E8A;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { overflow: hidden; background: radial-gradient(circle at 82% 8%, rgba(var(--accent-rgb), .16), transparent 34%), linear-gradient(135deg, #010204 0%, #06040F 52%, #010709 100%); }
.atmosphere { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; contain: strict; }
.aurora { position: absolute; border-radius: 50%; opacity: .34; filter: blur(clamp(5rem, 9vw, 9rem)); will-change: transform, opacity; transition: opacity 1.8s ease; }
.aurora-one { top: -34%; left: -18%; width: max(58vw, 46rem); height: max(58vw, 46rem); background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), .44) 0%, rgba(var(--accent-rgb), .13) 43%, transparent 72%); animation: auroraDriftOne 118s ease-in-out infinite alternate; }
.aurora-two { right: -30%; bottom: -46%; width: max(66vw, 52rem); height: max(66vw, 52rem); opacity: .25; background: radial-gradient(ellipse at 44% 40%, rgba(var(--accent-rgb), .31) 0%, rgba(var(--accent-rgb), .08) 48%, transparent 73%); animation: auroraDriftTwo 147s ease-in-out infinite alternate; }
.aurora-three { top: 16%; left: 38%; width: max(42vw, 34rem); height: max(24vw, 22rem); opacity: .16; background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), .28) 0%, rgba(236, 240, 244, .025) 46%, transparent 74%); transform: rotate(-12deg); animation: auroraDriftThree 173s ease-in-out infinite alternate; }
.atmosphere-specks, .atmosphere-specks::before { position: absolute; inset: -12%; content: ""; opacity: .22; background-image: radial-gradient(circle at 7% 18%, rgba(236,240,244,.62) 0 1px, transparent 1.4px), radial-gradient(circle at 19% 73%, rgba(var(--accent-rgb),.46) 0 .7px, transparent 1.2px), radial-gradient(circle at 34% 37%, rgba(236,240,244,.38) 0 .8px, transparent 1.3px), radial-gradient(circle at 48% 86%, rgba(var(--accent-rgb),.34) 0 1px, transparent 1.5px), radial-gradient(circle at 63% 24%, rgba(236,240,244,.44) 0 .7px, transparent 1.2px), radial-gradient(circle at 78% 67%, rgba(var(--accent-rgb),.40) 0 .8px, transparent 1.3px), radial-gradient(circle at 92% 42%, rgba(236,240,244,.34) 0 1px, transparent 1.5px); background-repeat: no-repeat; will-change: transform, opacity; animation: speckDriftOne 164s linear infinite alternate; }
.atmosphere-specks::before { inset: 0; opacity: .46; transform: scale(.82) rotate(7deg); animation: speckDriftTwo 197s linear infinite alternate; }
body.lesson-active .aurora { opacity: .16; }
body.lesson-active .aurora-two { opacity: .11; }
body.lesson-active .aurora-three { opacity: .07; }
body.lesson-active .atmosphere-specks { opacity: .10; }
@keyframes auroraDriftOne { 0% { transform: translate3d(-3%, -2%, 0) scale(1); opacity: .28; } 48% { transform: translate3d(8%, 5%, 0) scale(1.08); opacity: .38; } 100% { transform: translate3d(3%, 12%, 0) scale(.96); opacity: .31; } }
@keyframes auroraDriftTwo { 0% { transform: translate3d(4%, 6%, 0) scale(.96) rotate(0deg); } 52% { transform: translate3d(-9%, -4%, 0) scale(1.07) rotate(4deg); } 100% { transform: translate3d(-2%, -10%, 0) scale(1.02) rotate(-3deg); } }
@keyframes auroraDriftThree { 0% { transform: translate3d(-5%, 2%, 0) scale(1) rotate(-12deg); } 45% { transform: translate3d(7%, -8%, 0) scale(1.11) rotate(-7deg); } 100% { transform: translate3d(12%, 7%, 0) scale(.94) rotate(-15deg); } }
@keyframes speckDriftOne { from { transform: translate3d(-1.5%, -1%, 0); } to { transform: translate3d(2%, 1.5%, 0); } }
@keyframes speckDriftTwo { from { transform: scale(.82) rotate(7deg) translate3d(1%, -1%, 0); } to { transform: scale(.82) rotate(7deg) translate3d(-1.5%, 2%, 0); } }
button, a { font: inherit; } button { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .65rem .9rem; border-radius: .6rem; color: #081012; background: var(--accent); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.course-shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); height: 100dvh; }
.course-sidebar { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: rgba(4, 4, 7, .86); backdrop-filter: blur(22px); }
.course-brand { padding: clamp(1.2rem, 2vw, 2rem); border-bottom: 1px solid var(--line); transition: padding 180ms ease; }
.course-brand p { display: -webkit-box; margin: .85rem 0 0; overflow: hidden; color: var(--muted); font-family: ui-serif, Georgia, serif; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; transition: opacity 160ms ease, max-height 180ms ease, margin 180ms ease; }
body.lesson-active .course-brand { padding-block: .9rem; }
body.lesson-active .course-brand p { max-height: 0; margin: 0; opacity: 0; }
.welcome-link { display: flex; width: 100%; gap: .85rem; align-items: center; padding: 0; text-align: left; border: 0; background: none; cursor: pointer; }
.brand-eyebrow, .brand-title { display: block; }
.brand-eyebrow, .module-number, .welcome-eyebrow, .lesson-kicker { color: var(--accent); font-size: .7rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.brand-title { margin-top: .18rem; font-family: ui-serif, Georgia, serif; font-size: 1.05rem; font-weight: 650; transition: font-size 180ms ease; }
body.lesson-active .brand-title { font-size: .94rem; }
.module-navigation { flex: 1; overflow-y: auto; padding: 1rem; scrollbar-color: rgba(255,255,255,.18) transparent; }
.module { margin-bottom: .7rem; border: 1px solid rgba(255,255,255,.09); border-radius: 1rem; background: rgba(7,8,12,.62); box-shadow: 0 12px 32px rgba(0,0,0,.10); }
.module.is-active { border-color: rgba(var(--accent-rgb), .34); background: rgba(var(--accent-rgb), .045); box-shadow: 0 12px 34px rgba(0,0,0,.16), 0 0 24px rgba(var(--accent-rgb), .055); }
.module h2 { margin: 0; }
.module-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: .9rem; border: 0; background: none; text-align: left; cursor: pointer; }
.module-title { display: block; margin-top: .2rem; font-size: .88rem; font-weight: 650; }
.module-chevron { width: .55rem; height: .55rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 160ms ease; }
.module-toggle[aria-expanded="false"] .module-chevron { transform: rotate(-45deg); }
.lesson-list[hidden] { display: none; }
.lesson-list { margin: 0; padding: 0 .55rem .55rem; list-style: none; }
.lesson-list li + li { margin-top: .4rem; }
.lesson-link { position: relative; display: flex; width: 100%; gap: .7rem; align-items: center; padding: .75rem; overflow: hidden; border: 1px solid transparent; border-radius: .72rem; background: rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.lesson-link:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: rgba(255,255,255,.06); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.lesson-link.is-active { border-color: color-mix(in srgb, var(--accent) 76%, white 4%); background: color-mix(in srgb, var(--accent) 15%, rgba(255,255,255,.04)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 8px 28px color-mix(in srgb, var(--accent) 13%, transparent); }
.lesson-number { flex: 0 0 auto; color: var(--soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; font-weight: 700; }
.is-active .lesson-number { color: var(--accent); }
.lesson-copy, .lesson-name, .lesson-summary { display: block; min-width: 0; }
.lesson-copy { flex: 1; } .lesson-name { overflow: hidden; font-size: .84rem; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.lesson-summary { margin-top: .2rem; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.active-indicator { width: .4rem; height: .4rem; flex: 0 0 auto; border-radius: 50%; background: transparent; }
.is-active .active-indicator { background: var(--accent); box-shadow: 0 0 .75rem var(--accent); }
.sidebar-footer { display: flex; gap: .45rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); color: var(--soft); font-size: .72rem; }
.course-content { min-width: 0; height: 100dvh; overflow: auto; outline: none; }
.welcome-panel { position: relative; width: min(58rem, calc(100% - 3rem)); min-height: calc(100dvh - 4rem); margin: 2rem auto; padding: clamp(2rem, 6vw, 5.5rem); overflow: hidden; border: 1px solid var(--line); border-radius: 1.5rem; background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018)); box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.welcome-orbit { position: absolute; top: -12rem; right: -10rem; width: 28rem; height: 28rem; border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 50%; box-shadow: 0 0 7rem color-mix(in srgb, var(--accent) 16%, transparent); }
.welcome-panel h1 { position: relative; max-width: 15ch; margin: .7rem 0 1rem; font-family: ui-serif, Georgia, serif; font-size: clamp(2.6rem, 7vw, 6rem); font-weight: 620; letter-spacing: -.045em; line-height: .96; }
.welcome-subtitle { max-width: 38rem; color: rgba(255,255,255,.82); font-family: ui-serif, Georgia, serif; font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.4; }
.welcome-description { max-width: 45rem; margin-top: 2rem; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.course-facts { display: flex; gap: .8rem; margin: 2.25rem 0; }
.course-facts div { min-width: 7rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(255,255,255,.035); }
.course-facts dt { color: var(--soft); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.course-facts dd { margin: .2rem 0 0; color: var(--accent); font-family: ui-serif, Georgia, serif; font-size: 1.5rem; }
.module-overview { margin-top: 2.5rem; }
.module-overview > h2 { margin: 0 0 1rem; font-family: ui-serif, Georgia, serif; font-size: 1.45rem; font-weight: 620; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .75rem; }
.overview-card { min-width: 0; padding: 1rem; border: 1px solid rgba(255,255,255,.085); border-radius: 1rem; background: rgba(7,8,12,.48); box-shadow: 0 14px 34px rgba(0,0,0,.12); }
.overview-card p { margin: 0; color: var(--accent); font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.overview-card h3 { margin: .45rem 0; font-family: ui-serif, Georgia, serif; font-size: 1.05rem; font-weight: 620; }
.overview-summary { margin-bottom: .8rem; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.overview-card > span { color: var(--soft); font-size: .72rem; }
.welcome-prompt, .credit-line { color: var(--soft); font-size: .82rem; } .welcome-prompt { margin-top: 2rem; } .credit-line { margin-top: 2rem; }
.lesson-panel { height: 100%; min-height: 32rem; }
.lesson-panel:not([hidden]) { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lesson-header { display: flex; min-height: 5.6rem; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 3vw, 2.25rem); border-bottom: 1px solid var(--line); background: rgba(9,11,18,.88); }
.lesson-header h1 { margin: .22rem 0 0; font-family: ui-serif, Georgia, serif; font-size: clamp(1.25rem, 2.2vw, 1.9rem); }
.open-pdf { padding: .58rem .8rem; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: .6rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.pdf-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #202124; }
.pdf-frame { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #202124; visibility: hidden; opacity: 0; pointer-events: none; }
.pdf-stage.is-ready .pdf-frame { visibility: visible; opacity: 1; pointer-events: auto; }
.lesson-loading { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; gap: .55rem; align-items: center; justify-content: center; padding: 2rem; color: var(--muted); text-align: center; background: radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), .12), transparent 30%), rgba(7,8,12,.96); opacity: 1; transition: opacity 180ms ease; }
.lesson-loading[hidden] { display: none; }
.lesson-loading strong { color: var(--primary); font-family: ui-serif, Georgia, serif; font-size: 1.2rem; font-weight: 620; }
.loading-ring { width: 2.7rem; height: 2.7rem; margin-bottom: .45rem; border: 2px solid rgba(var(--accent-rgb), .2); border-top-color: var(--accent); border-radius: 50%; box-shadow: 0 0 1.5rem rgba(var(--accent-rgb), .18); animation: lessonLoadingSpin 1.15s linear infinite, lessonLoadingGlow 2.2s ease-in-out infinite; }
.loading-lesson-title { max-width: 30rem; color: var(--accent); font-size: .82rem; }
.loading-open-pdf { margin-top: .6rem; padding: .58rem .9rem; border: 1px solid rgba(var(--accent-rgb), .42); border-radius: .65rem; color: var(--accent); text-decoration: none; }
.loading-open-pdf[hidden] { display: none; }
@keyframes lessonLoadingSpin { to { transform: rotate(360deg); } }
@keyframes lessonLoadingGlow { 50% { box-shadow: 0 0 2.2rem rgba(var(--accent-rgb), .34); } }
.nav-toggle { display: none; } .drawer-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(0,0,0,.55); }
.noscript-message { position: fixed; z-index: 200; right: 1rem; bottom: 1rem; max-width: 28rem; padding: 1rem; border: 1px solid #f0a35c; border-radius: .7rem; background: #20150d; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 82%, white); outline-offset: 3px; }
@media (max-width: 760px) {
  body { overflow: hidden; } .course-shell { display: block; }
  .course-sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(88vw, 22rem); transform: translateX(-105%); transition: transform 200ms ease; box-shadow: 1rem 0 3rem rgba(0,0,0,.45); }
  body.drawer-open .course-sidebar { transform: translateX(0); }
  .nav-toggle { position: fixed; z-index: 25; top: .7rem; left: .7rem; display: flex; gap: .5rem; align-items: center; padding: .62rem .78rem; border: 1px solid var(--line); border-radius: .65rem; background: rgba(14,16,24,.88); backdrop-filter: blur(16px); cursor: pointer; }
  .course-content { width: 100%; } .welcome-panel { width: calc(100% - 1.25rem); min-height: calc(100dvh - 1.25rem); margin: .625rem; padding: 5rem 1.3rem 2rem; }
  .lesson-header { padding: 4.2rem .85rem .8rem; align-items: flex-end; } .open-pdf { font-size: .72rem; }
}
@media (max-width: 600px) and (orientation: portrait) {
  html, body { height: 100%; height: 100dvh; }
  body { padding-top: env(safe-area-inset-top); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); }
  .course-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: min(36vh, 20rem) minmax(0, 1fr); grid-template-rows: min(36dvh, 20rem) minmax(0, 1fr); height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .course-sidebar { position: static; z-index: 1; width: 100%; min-height: 0; transform: none; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 .8rem 2rem rgba(0,0,0,.18); }
  body.drawer-open .course-sidebar { transform: none; }
  .nav-toggle, .drawer-backdrop { display: none !important; }
  .course-brand { flex: 0 0 auto; padding: .7rem .9rem; }
  .course-brand p { display: none; }
  .brand-title { font-size: .95rem; }
  .module-navigation { min-height: 0; padding: .55rem .65rem; overscroll-behavior: contain; }
  .module { margin-bottom: .45rem; border-radius: .8rem; }
  .module-toggle { min-height: 2.75rem; padding: .55rem .7rem; }
  .module-title { margin-top: .1rem; font-size: .8rem; }
  .lesson-list { padding: 0 .4rem .4rem; }
  .lesson-link { min-height: 2.75rem; padding: .62rem; }
  .lesson-summary { display: none; }
  .sidebar-footer { display: none; }
  .course-content { width: 100%; height: auto; min-height: 0; overflow: auto; }
  .lesson-panel { height: 100%; min-height: 0; }
  .lesson-header { min-height: 4.25rem; padding: .65rem .75rem; align-items: center; }
  .lesson-header h1 { font-size: 1.05rem; }
  .lesson-kicker { font-size: .62rem; }
  .open-pdf { padding: .5rem .6rem; }
  .welcome-panel { width: calc(100% - 1rem); min-height: calc(100% - 1rem); margin: .5rem; padding: 1.2rem; border-radius: 1rem; }
  .welcome-panel h1 { margin: .45rem 0 .7rem; font-size: clamp(2rem, 12vw, 3.2rem); }
  .welcome-description { margin-top: 1rem; line-height: 1.5; }
  .course-facts { margin: 1rem 0; }
  .module-overview { margin-top: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .aurora, .atmosphere-specks, .atmosphere-specks::before { animation: none !important; will-change: auto; }
  .loading-ring { animation: none !important; }
}