:root {
  --purple-deep: #210033;
  --purple: #4b0875;
  --yellow: #ffe600;
  --paper: #fffdf7;
  --mist: #f7f2ff;
  --ink: #1c1324;
  --muted: #675b70;
  --line: rgba(33, 0, 51, 0.14);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body.learning-site {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    500 16px/1.55 Manrope,
    ui-sans-serif,
    system-ui,
    sans-serif;
}
body.learning-site a {
  color: inherit;
}
body.learning-site button,
body.learning-site input,
body.learning-site textarea {
  font: inherit;
}
body.learning-site button {
  cursor: pointer;
}
body.learning-site :focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.learn-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.learn-shell {
  max-width: 1440px;
  margin: auto;
  padding: clamp(1rem, 2.5vw, 2.5rem);
}
.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.1rem;
}
.learn-header__identity {
  display: grid;
}
.learn-eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--purple);
}
.learn-header__identity a {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
}
.learn-header__progress {
  display: grid;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 800;
}
.learn-header__saved {
  font-weight: 500;
  color: var(--muted);
}
.learn-draft-banner {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--purple);
  background: var(--mist);
  font-size: 0.9rem;
}
.learn-intro {
  max-width: 820px;
  padding: clamp(1.3rem, 3vw, 2.5rem) 0 0.5rem;
}
.learn-intro h1,
.learn-lesson-heading h1 {
  margin: 0.15rem 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.learn-intro p,
.learn-lesson-heading p {
  max-width: 65ch;
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}
.learn-resume {
  display: inline-flex;
  margin-bottom: 0.7rem;
  color: var(--purple) !important;
  font-weight: 800;
}
.learn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: start;
}
.learn-main {
  min-width: 0;
}
.learn-lesson-heading {
  padding: clamp(1.3rem, 3vw, 2.3rem) 0 0.4rem;
}
.learn-lesson-heading--hub {
  padding: 0 0 0.4rem;
}
.learn-lesson-heading h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0.1rem 0;
  letter-spacing: -0.03em;
}
.learn-stages {
  position: sticky;
  top: 1rem;
  z-index: 5;
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 0.2rem;
  margin: 1rem 0 1.4rem;
  padding: 0.3rem;
  border: 1px solid rgba(33, 0, 51, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 7px 28px rgba(33, 0, 51, 0.09);
  backdrop-filter: blur(16px);
}
.learn-stages a {
  min-width: 78px;
  padding: 0.56rem 0.9rem;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.91rem;
  font-weight: 800;
  color: var(--muted) !important;
}
.learn-stages a[aria-current="page"] {
  background: var(--purple-deep);
  color: white !important;
}
.learn-stage {
  max-width: 910px;
}
.learn-ready .learn-stage[hidden] {
  display: none;
}
.learn-video {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #17131c;
  box-shadow: 0 18px 48px rgba(33, 0, 51, 0.15);
}
.learn-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.learn-video__pending {
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  color: white;
  padding: 1rem;
}
.learn-video__pending span {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
}
.learn-video__pending p {
  color: #dbd4e3;
  max-width: 40ch;
}
.learn-notes {
  max-width: 70ch;
  color: var(--muted);
  margin: 1.3rem 0;
}
.learn-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--purple-deep) !important;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.91rem;
}
.learn-button:hover {
  background: var(--mist);
}
.learn-button--primary {
  background: var(--yellow);
  border-color: var(--yellow);
}
.learn-button--primary:hover {
  background: #fff083;
}
.learn-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.learn-section-head {
  margin: 0 0 1.5rem;
}
.learn-section-head h2 {
  margin: 0.1rem 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}
.learn-section-head p {
  margin: 0.25rem 0;
  color: var(--muted);
}
.learn-question {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.learn-question + .learn-question {
  margin-top: 2.5rem;
}
.learn-ready .learn-question[hidden] {
  display: none;
}
.learn-question legend {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  margin-bottom: 1.2rem;
}
.learn-question__count {
  font-size: 0.8rem;
  color: var(--purple);
  font-weight: 800;
}
.learn-question__prompt {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.3;
}
.learn-question__code {
  overflow-x: auto;
  margin: 0 0 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #20232a;
  color: #f0f0f0;
}
.learn-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 52px;
  margin: 0.5rem 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
}
.learn-option:has(input:checked) {
  border-color: var(--purple);
  background: var(--mist);
}
.learn-option input {
  accent-color: var(--purple);
  width: 18px;
  height: 18px;
  flex: none;
}
.learn-option.is-correct {
  border-color: #26734d;
}
.learn-option.is-incorrect {
  border-color: #aa3a37;
}
.learn-question__feedback,
.learn-diagnostic {
  min-height: 1.5em;
  margin: 1rem 0;
  font-weight: 700;
}
.learn-question__feedback[data-result="correct"],
.learn-diagnostic[data-result="correct"] {
  color: #205d3e;
}
.learn-question__feedback[data-result="incorrect"],
.learn-diagnostic[data-result="incorrect"] {
  color: #8e2826;
}
.learn-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.learn-hint,
.learn-transcript {
  margin: 1rem 0;
  color: var(--muted);
}
.learn-transcript p {
  white-space: pre-line;
}
.learn-hint summary,
.learn-transcript summary {
  cursor: pointer;
  color: var(--purple);
  font-weight: 800;
}
.learn-quiz-done {
  padding: 1.4rem;
  border-radius: 16px;
  background: var(--mist);
}
.learn-quiz-done h3 {
  margin: 0;
}
.learn-editor-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 800;
}
.learn-editor,
textarea[data-code-fallback] {
  min-height: 240px;
  width: 100%;
  border: 1px solid #3b3d46;
  border-radius: 14px;
  overflow: hidden;
  background: #282c34;
  color: #e6e9ef;
  font:
    14px/1.55 "JetBrains Mono",
    ui-monospace,
    monospace;
}
textarea[data-code-fallback] {
  padding: 1rem;
  resize: vertical;
}
.learn-editor {
  display: none;
}
.learn-editor.is-active {
  display: block;
}
.learn-editor.is-active + textarea {
  display: none;
}
.learn-editor .cm-editor {
  height: 100%;
  min-height: 240px;
}
.learn-editor .cm-scroller {
  min-height: 240px;
}
.learn-output {
  margin-top: 1.3rem;
  border-radius: 13px;
  background: #20232a;
  color: #f0f0f0;
  overflow: hidden;
}
.learn-output h3 {
  margin: 0;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #444;
  font-size: 0.84rem;
}
.learn-output pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 70px;
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  font:
    14px/1.5 "JetBrains Mono",
    ui-monospace,
    monospace;
}
.learn-runtime-note {
  font-size: 0.8rem;
  color: var(--muted);
}
.learn-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.learn-prev-next a {
  color: var(--purple) !important;
  font-weight: 800;
  text-decoration: none;
}
.learn-rail {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
.learn-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.learn-rail h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.learn-rail ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.learn-rail li .learn-rail__item {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.7rem 0.4rem;
  border-radius: 11px;
  text-decoration: none;
}
.learn-rail li a:hover,
.learn-rail li a[aria-current="page"] {
  background: var(--mist);
}
.learn-rail__number {
  display: grid;
  place-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: #ece6f2;
  color: var(--purple);
  font-weight: 800;
  font-size: 0.78rem;
}
.learn-rail li a[aria-current="page"] .learn-rail__number {
  background: var(--purple);
  color: white;
}
.learn-rail strong {
  display: block;
  font-size: 0.84rem;
}
.learn-rail small {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.4;
  margin-top: 0.15rem;
}
.learn-rail__state {
  font-size: 0.8rem;
  color: #205d3e;
  font-weight: 800;
}
.learn-rail__item--pending .learn-rail__state {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}
.learn-rail__item--pending {
  color: var(--muted);
}
.learn-curriculum-overview {
  max-width: 940px;
  margin: 1.5rem 0 2rem;
}
.learn-curriculum-overview ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.learn-curriculum-overview li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.learn-curriculum-overview__number {
  display: grid;
  place-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--mist);
  color: var(--purple);
  font-weight: 800;
  font-size: 0.8rem;
}
.learn-curriculum-overview h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}
.learn-curriculum-overview h3 a {
  color: var(--purple) !important;
  text-decoration-thickness: 0.1em;
}
.learn-curriculum-overview p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.learn-curriculum-overview__status {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .learn-curriculum-overview li {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }
  .learn-curriculum-overview__status {
    grid-column: 2;
  }
}
.learn-rail__overview {
  display: inline-block;
  margin: 1rem 0.4rem;
  color: var(--purple) !important;
  font-weight: 800;
  font-size: 0.84rem;
}
.learn-reset {
  display: block;
  margin: 0 0.4rem 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-size: 0.8rem;
}
.learn-curriculum-toggle,
.learn-rail__close {
  display: none;
}
.learn-afterword {
  max-width: 65ch;
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1rem;
}
.learn-afterword h2 {
  font-size: 1.2rem;
}
.learn-afterword p {
  color: var(--muted);
}
@media (max-width: 850px) {
  .learn-layout {
    display: block;
  }
  .learn-rail {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    max-height: min(75vh, 650px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    padding: 1.2rem;
    background: white;
    box-shadow: 0 -14px 45px rgba(33, 0, 51, 0.2);
    transform: translateY(110%);
    transition: transform 0.22s ease;
  }
  .learn-rail.is-open {
    transform: translateY(0);
  }
  .learn-rail__close {
    display: block;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
  }
  .learn-curriculum-toggle {
    display: flex;
    position: fixed;
    z-index: 15;
    right: 1rem;
    bottom: 1rem;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--purple-deep);
    color: white;
    box-shadow: 0 9px 30px rgba(33, 0, 51, 0.25);
    font-weight: 800;
  }
  .learn-header__saved {
    display: none;
  }
  .learn-rail small {
    font-size: 0.8rem;
  }
}
@media (max-width: 520px) {
  .learn-shell {
    padding: 1rem;
  }
  .learn-header__identity a {
    font-size: 0.85rem;
  }
  .learn-header__progress {
    font-size: 0.74rem;
  }
  .learn-stages {
    top: 0.4rem;
  }
  .learn-stages a {
    min-width: 70px;
    padding: 0.55rem 0.7rem;
  }
  .learn-intro {
    padding-top: 1.2rem;
  }
  .learn-video {
    border-radius: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .learn-rail {
    transition: none;
  }
}
@media (min-width: 851px) {
  .learn-rail.is-collapsed {
    display: none;
  }
  .learn-layout:has(.learn-rail.is-collapsed) {
    grid-template-columns: 1fr;
  }
}
.learn-main {
  view-transition-name: lesson-content;
}
.learn-video-status:empty {
  display: none;
}
.learn-video-status {
  color: #8e2826;
  font-weight: 700;
}
.learn-curriculum-toggle {
  display: flex;
  position: fixed;
  z-index: 15;
  right: 1rem;
  bottom: 1rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--purple-deep);
  color: white;
  box-shadow: 0 9px 30px rgba(33, 0, 51, 0.25);
  font-weight: 800;
}
@media (max-width: 850px) {
  .learn-rail {
    position: static;
    transform: none;
    max-height: none;
    box-shadow: none;
    border-radius: 12px;
    margin-top: 2rem;
  }
  .learn-ready .learn-rail {
    position: fixed;
    transform: translateY(110%);
    margin-top: 0;
  }
  .learn-ready .learn-rail.is-open {
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(lesson-content) {
    animation: learn-fade-out 0.19s ease both;
  }
  ::view-transition-new(lesson-content) {
    animation: learn-fade-in 0.21s ease both;
  }
}
@keyframes learn-fade-out {
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}
@keyframes learn-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.learn-curriculum-toggle {
  display: none;
}
.learn-ready .learn-curriculum-toggle {
  display: flex;
}
.learning-site [hidden] {
  display: none !important;
}
