:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #050506;
  --surface-rgb: 5, 5, 6;
  --surface-strong: #0a0b0d;
  --surface-subtle: #020203;
  --ink: #f7fbff;
  --muted: #9aa4b2;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #ffffff;
  --accent-strong: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --accent-ink: #ffffff;
  --green: var(--accent);
  --blue: #8db7ff;
  --orange: #f5ba73;
  --red: #ff7f9c;
  --yellow: #ffe58a;
  --brand-bg: rgba(255, 255, 255, 0.08);
  --brand-ink: #ffffff;
  --sidebar-bg: rgba(0, 0, 0, 0.86);
  --hover-bg: rgba(255, 255, 255, 0.06);
  --pill-bg: rgba(255, 255, 255, 0.07);
  --tag-bg: rgba(255, 255, 255, 0.075);
  --tag-ink: #d8e6ff;
  --track: rgba(255, 255, 255, 0.08);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 24px 80px rgba(0, 0, 0, 0.72);
  --shadow-hover: 0 0 28px rgba(158, 192, 255, 0.18), 0 28px 90px rgba(0, 0, 0, 0.84);
  --ring: rgba(255, 255, 255, 0.26);
  --glow: 0 0 22px rgba(255, 255, 255, 0.2), 0 0 48px rgba(116, 166, 255, 0.12);
  --blue-glow: 0 0 28px rgba(107, 164, 255, 0.24), 0 0 72px rgba(107, 164, 255, 0.14);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 310px),
    linear-gradient(90deg, rgba(141, 183, 255, 0.085), transparent 18%, transparent 82%, rgba(141, 183, 255, 0.05)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 94px);
  content: "";
}

a {
  color: var(--blue);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

@keyframes progress-flow {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 220% 50%;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

.lesson-carousel {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.lesson-carousel:hover .lesson-pick {
  opacity: 0.42;
  transform: scale(0.965);
}

.lesson-pick {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  overflow: hidden;
  text-decoration: none;
  transform-origin: center left;
  transition:
    opacity 150ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.lesson-pick:hover,
.lesson-pick.active {
  z-index: 2;
  opacity: 1 !important;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  box-shadow: var(--glow);
  text-decoration: none;
  transform: scale(1.07) translateX(3px) !important;
}

.lesson-pick.active {
  border-color: rgba(255, 255, 255, 0.58);
}

.pick-stage {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.pick-title {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.15;
}

.pick-progress {
  position: absolute;
  left: 54px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.pick-progress::after {
  display: block;
  width: var(--pick-progress);
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  content: "";
}

.lesson-pick.done .pick-stage {
  border-color: rgba(72, 255, 164, 0.74);
  color: #72ffb4;
  box-shadow: 0 0 18px rgba(72, 255, 164, 0.22);
}

.lesson-pick.done .pick-progress::after {
  background: #72ffb4;
  box-shadow: 0 0 14px rgba(72, 255, 164, 0.72), 0 0 34px rgba(72, 255, 164, 0.2);
}

.text-button,
.small-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.text-button:hover,
.small-button:hover {
  border-color: var(--accent);
  background: var(--hover-bg);
  text-decoration: none;
  transform: translateY(-1px);
}

.primary-button {
  gap: 8px;
  padding: 10px 14px;
  border-color: rgba(255, 255, 255, 0.7);
  background: #ffffff;
  color: #000000;
  box-shadow: var(--glow);
}

.primary-button:hover {
  border-color: #ffffff;
  background: #f8fbff;
  color: #000000;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.28), 0 0 80px rgba(141, 183, 255, 0.18);
  text-decoration: none;
}

.full-width {
  width: 100%;
}

.main {
  min-width: 0;
  padding: 24px clamp(18px, 4vw, 52px) 72px;
  animation: page-in 260ms ease both;
}

.page {
  max-width: 900px;
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(141, 183, 255, 0.45);
}

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

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 2.5vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.14);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 9px;
  font-size: 1rem;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 20px 0 24px;
}

.search {
  flex: 1 1 260px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  outline: none;
}

.search:focus,
.select:focus,
.note-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.chip:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.chip.active {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
  box-shadow: var(--glow);
}

.course-timeline {
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.course-timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.course-timeline-header .eyebrow {
  margin-bottom: 0;
}

.course-timeline-header span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}

.timeline-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
}

.timeline-atom {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  overflow: hidden;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.timeline-atom::before {
  position: absolute;
  inset: auto 10px 6px 46px;
  height: 2px;
  border-radius: 999px;
  background: var(--line-strong);
  content: "";
}

.timeline-atom span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pill-bg);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline-atom strong {
  min-width: 0;
  padding-bottom: 8px;
  font-size: 0.82rem;
  line-height: 1.2;
}

.timeline-atom:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--glow);
  text-decoration: none;
}

.timeline-atom.done::before {
  background: var(--accent);
}

.timeline-atom.active {
  border-color: rgba(255, 255, 255, 0.72);
  background: #ffffff;
  color: #000000;
  box-shadow: var(--glow);
}

.timeline-atom.active span {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.page-atomic-timeline {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 0 22px;
  padding: 12px 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72);
}

.atomic-track {
  position: relative;
  height: 44px;
}

.atomic-track::before,
.atomic-track::after {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 2px;
  border-radius: 999px;
  content: "";
}

.atomic-track::before {
  background: rgba(255, 255, 255, 0.13);
}

.atomic-track::after {
  right: auto;
  width: var(--lesson-progress);
  background: linear-gradient(90deg, #ffffff, var(--blue));
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.32), 0 0 52px rgba(141, 183, 255, 0.18);
  transition: width 120ms linear;
}

.lesson-atom-marker {
  position: absolute;
  left: var(--pos);
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  transform: translateX(-50%);
}

.lesson-atom-marker:first-child {
  transform: translateX(0);
}

.lesson-atom-marker:last-child {
  transform: translateX(-100%);
}

.lesson-atom-marker::before {
  width: 10px;
  height: 10px;
  margin-bottom: 5px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 0 4px #000000;
  content: "";
}

.lesson-atom-marker span {
  display: block;
  max-width: 54px;
  overflow: hidden;
  color: inherit;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-atom-marker.quiz::before {
  border-radius: 3px;
}

.lesson-atom-marker.project::before {
  width: 12px;
  height: 12px;
}

.lesson-atom-marker:hover,
.lesson-atom-marker.active {
  color: var(--ink);
}

.lesson-atom-marker:hover::before,
.lesson-atom-marker.active::before {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.46), 0 0 34px rgba(141, 183, 255, 0.24);
}

.timeline-atom.active::before {
  background: currentColor;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card,
.module-card,
.tool-card,
.project-card,
.path-card,
.term-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.module-card:hover,
.tool-card:hover,
.project-card:hover,
.path-card:hover,
.term-card:hover,
.roadmap-row:hover,
.panel:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.stat-card {
  padding: 15px;
}

.stat-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}

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

.roadmap {
  display: grid;
  gap: 10px;
}

.roadmap-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 160px;
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
}

.stage-pill {
  display: grid;
  place-items: center;
  min-height: 64px;
  border-radius: var(--radius);
  background: var(--pill-bg);
  color: var(--ink);
  font-weight: 800;
}

.roadmap-content {
  min-width: 0;
}

.roadmap-content h3 {
  margin-bottom: 5px;
}

.roadmap-content p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.48;
}

.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-ink);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag.green {
  background: var(--accent-soft);
  color: var(--ink);
}

.tag.blue {
  background: rgba(47, 104, 216, 0.12);
  color: var(--blue);
}

.tag.orange {
  background: rgba(194, 100, 26, 0.12);
  color: var(--orange);
}

.tag.red {
  background: rgba(180, 35, 74, 0.12);
  color: var(--red);
}

.row-actions {
  display: grid;
  align-content: center;
  gap: 8px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.module-card,
.tool-card,
.project-card,
.path-card,
.term-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 16px;
}

.module-card p,
.tool-card p,
.project-card p,
.path-card p,
.term-card p {
  color: var(--muted);
  line-height: 1.5;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
}

.action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.lesson-page .page-heading {
  margin-bottom: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.lesson-page .page-heading h1 {
  max-width: 720px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.lesson-page .page-heading .lede {
  max-width: 720px;
  font-size: 0.95rem;
}

.lesson-rail {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(var(--surface-rgb), 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.lesson-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.lesson-step:hover {
  background: var(--hover-bg);
  color: var(--ink);
  transform: translateY(-1px);
}

.lesson-step.active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--brand-ink);
}

.lesson-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.lesson-step.active span {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

.lesson-step strong {
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.15;
}

.lesson-document {
  display: grid;
  gap: 0;
}

.lesson-document .panel {
  padding: 28px 0;
  margin-bottom: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scroll-margin-top: 92px;
}

.lesson-document .panel:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.lesson-section > p:not(.eyebrow):not(.lede),
.concept-lesson p {
  color: var(--muted);
  line-height: 1.62;
}

.lesson-flow {
  display: grid;
  gap: 22px;
}

.flow-block,
.bridge-line {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.flow-block h3 {
  margin-bottom: 8px;
}

.flow-block p,
.bridge-line p {
  color: var(--muted);
  line-height: 1.65;
}

.flow-block code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.term-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.term-chip {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.term-chip:hover,
.term-token:hover,
.concept-lesson h3[data-term]:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.term-token {
  display: inline;
  color: var(--ink);
  border-bottom: 1px dotted rgba(255, 255, 255, 0.38);
  cursor: context-menu;
}

.concept-lesson h3[data-term] {
  cursor: context-menu;
}

.term-popover {
  position: fixed;
  z-index: 20;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.94);
  color: var(--ink);
  box-shadow: var(--glow), 0 30px 80px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
}

.term-popover[hidden] {
  display: none;
}

.term-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.term-popover-head .eyebrow {
  margin-bottom: 0;
}

.term-popover h3 {
  margin: 10px 0 7px;
}

.term-popover p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.term-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.lesson-concepts {
  display: grid;
  gap: 8px;
}

.lesson-examples {
  display: grid;
  gap: 20px;
}

.example-block {
  padding: 0 0 20px 16px;
  border-left: 1px solid var(--line);
}

.example-block.open {
  border-left-color: rgba(255, 255, 255, 0.56);
}

.example-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.example-head p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.ghost-button {
  min-height: 34px;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}

.code-panel {
  margin: 14px 0 0;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #020203;
  box-shadow: 0 0 28px rgba(141, 183, 255, 0.1);
  overflow: auto;
}

.code-panel code {
  display: block;
  min-width: max-content;
  color: #edf5ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre;
}

.concept-lesson {
  padding: 0 0 20px 16px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.concept-lesson h3 {
  margin-bottom: 12px;
}

.concept-lesson p:last-child {
  margin-bottom: 0;
}

.lesson-quiz {
  margin: 6px 0 26px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left-color: rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.032);
  box-shadow: 0 0 24px rgba(141, 183, 255, 0.1);
}

.project-idea {
  border-bottom: 0 !important;
  background: transparent;
  box-shadow: none;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.plain-list,
.check-list,
.resource-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.plain-list li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.52);
  content: "";
}

.concept-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.concept-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.concept-list li > div {
  display: grid;
  gap: 4px;
}

.concept-list strong {
  color: var(--ink);
}

.concept-list span {
  color: var(--muted);
  line-height: 1.48;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.45;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #ffffff;
}

.compact-check {
  margin-top: 7px;
  font-size: 0.88rem;
}

.quiz-list {
  display: grid;
  gap: 14px;
}

.quiz-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.quiz-card h3 {
  margin-bottom: 0;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.answer-guide {
  margin: 0;
  padding: 12px;
  border-left: 4px solid #ffffff;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
  line-height: 1.5;
  box-shadow: var(--glow);
}

.note-field {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #000000;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

.note-field.large {
  min-height: 210px;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.sticky-side {
  position: sticky;
  top: 22px;
}

.side-index {
  display: grid;
  gap: 8px;
}

.side-index a {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.side-index a:hover {
  background: var(--hover-bg);
  text-decoration: none;
}

.resource-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font-weight: 700;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.resource-list a:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
  transform: translateX(2px);
  box-shadow: var(--glow);
  text-decoration: none;
}

.resource-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-align: center;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.timeline strong {
  color: var(--ink);
}

.timeline span {
  color: var(--muted);
  line-height: 1.5;
}

.footer-note {
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.lesson-bottom {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0 0;
}

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

@media (max-width: 1100px) {
  .stats-grid,
  .grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .action-panel {
    grid-template-columns: 1fr;
  }

  .lesson-rail {
    top: 0;
  }

  .quick-actions {
    justify-content: flex-start;
  }

  .sticky-side {
    position: static;
  }
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .lesson-carousel {
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    overflow-x: auto;
    margin: 0;
    padding-bottom: 10px;
  }

  .lesson-carousel:hover .lesson-pick,
  .lesson-pick:hover,
  .lesson-pick.active {
    transform: none !important;
  }

  .main {
    padding: 22px 14px 44px;
  }

  .page-heading {
    display: block;
  }

  .stats-grid,
  .grid-list,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .course-timeline {
    padding: 12px;
  }

  .page-atomic-timeline {
    margin-inline: -4px;
    padding: 14px 16px 18px;
  }

  .lesson-atom-marker span {
    font-size: 0.6rem;
  }

  .course-timeline-header {
    display: block;
  }

  .course-timeline-header span {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .lesson-rail {
    grid-auto-columns: minmax(118px, 1fr);
    margin-inline: -4px;
    border-radius: 0;
  }

  .lesson-document .panel {
    scroll-margin-top: 78px;
  }

  .example-head {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    justify-self: start;
  }

  .roadmap-row {
    grid-template-columns: 1fr;
  }

  .stage-pill {
    min-height: 40px;
    justify-content: start;
    padding: 0 12px;
  }

  .row-actions {
    align-content: start;
  }

  h1 {
    font-size: 2rem;
  }
}

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