.learn-body {
  background:
    radial-gradient(circle at top left, rgba(241, 196, 95, 0.12), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(217, 35, 50, 0.14), transparent 32%),
    linear-gradient(180deg, #22050a 0%, #340913 50%, #1d0408 100%);
}

/* 2026-04-22 LMS redesign */
.learn-body {
  background:
    radial-gradient(circle at 8% 0%, rgba(241, 196, 95, 0.18), transparent 26%),
    radial-gradient(circle at 92% 8%, rgba(198, 34, 52, 0.24), transparent 30%),
    linear-gradient(180deg, #3a0912 0%, #5a1019 34%, #32070f 100%);
}

.learn-page {
  width: min(1180px, calc(100% - 1rem));
  padding: 0.9rem 0 2rem;
}

.learn-dashboard-page,
.learn-study-page {
  display: grid;
  gap: 1rem;
}

.learn-body.is-preview-mode .learn-poster,
.learn-body.is-preview-mode .learn-hero-study {
  border-color: rgba(241, 196, 95, 0.36);
}

.learn-body.is-preview-mode .player-placeholder {
  border-color: rgba(241, 196, 95, 0.28);
  background:
    linear-gradient(135deg, rgba(241, 196, 95, 0.12), rgba(255, 248, 247, 0.04)),
    rgba(42, 7, 13, 0.86);
}

.learn-body.is-preview-mode .lesson-row-preview-summary {
  display: block;
  margin-top: 0.38rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}

.learn-poster,
.learn-hero-study {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 240, 232, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 222, 166, 0.18), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(154, 17, 31, 0.45), transparent 36%),
    linear-gradient(135deg, rgba(97, 18, 27, 0.96), rgba(56, 10, 17, 0.98));
  box-shadow: 0 28px 80px rgba(29, 3, 8, 0.34);
}

.learn-poster::after,
.learn-hero-study::after {
  content: "";
  position: absolute;
  inset: auto -18% -32% auto;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 222, 166, 0.16);
  box-shadow:
    0 0 0 1.25rem rgba(255, 255, 255, 0.02),
    0 0 0 3rem rgba(255, 255, 255, 0.015);
}

.learn-poster h1,
.learn-hero-study h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(2.35rem, 13vw, 5rem);
  line-height: 0.9;
}

.learn-poster-copy,
.learn-hero-study > div {
  position: relative;
  z-index: 1;
}

.learn-hero-study {
  padding: 1rem 1.1rem;
  min-height: unset;
}

.learn-hero-study > div {
  max-width: 54rem;
}

.learn-hero-study::after {
  inset: auto -10% -38% auto;
  width: 13rem;
  height: 13rem;
  opacity: 0.55;
}

.learn-hero-study h1 {
  font-size: clamp(2.1rem, 7vw, 4rem);
  line-height: 0.92;
  max-width: 9ch;
}

.learn-hero-study .hero-support {
  max-width: 50rem;
  margin-top: 0.35rem;
}

.learn-hero-study .hero-actions {
  margin-top: 0.35rem;
}

.learn-poster-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.poster-stat {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 0.9rem;
  min-height: 5.8rem;
  border: 1px solid rgba(255, 240, 232, 0.14);
  border-radius: 18px;
  background: rgba(255, 250, 247, 0.06);
  backdrop-filter: blur(12px);
}

.learn-poster-stats .poster-stat:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 0.375rem);
}

.poster-stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 240, 232, 0.72);
}

.poster-stat strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 900;
}

.learning-journey-shell-redesigned {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.journey-primary-column {
  display: grid;
  gap: 1rem;
}

.journey-control-panel,
.journey-map-panel,
.study-outline-panel,
.player-panel-study,
.lesson-mode-panel,
.detail-panel {
  border-radius: 28px;
  border: 1px solid rgba(255, 242, 236, 0.14);
  background:
    linear-gradient(180deg, rgba(113, 20, 33, 0.92), rgba(56, 10, 17, 0.98));
  box-shadow: 0 22px 54px rgba(25, 3, 7, 0.24);
}

.journey-control-panel,
.journey-map-panel,
.study-outline-panel,
.player-panel-study,
.lesson-mode-panel,
.detail-panel,
.rail-panel {
  padding: 1rem;
}

.journey-meta-grid {
  gap: 0.7rem;
}

.journey-stat-card,
.analysis-card,
.memory-anchor-card,
.achievement-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 241, 231, 0.12);
  background: rgba(255, 248, 245, 0.06);
}

.journey-map {
  position: relative;
  gap: 0.9rem;
}

.journey-map::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 214, 154, 0.45), rgba(255, 214, 154, 0.06));
}

.journey-module {
  position: relative;
  margin-left: 1.9rem;
  padding: 1rem;
  border-radius: 26px;
  border: 1px solid rgba(255, 240, 232, 0.12);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 214, 154, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(117, 23, 35, 0.88), rgba(60, 11, 18, 0.96));
}

.journey-module::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 1.15rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1c45f, #ffe7b3);
  box-shadow: 0 0 0 0.3rem rgba(255, 220, 166, 0.08);
}

.journey-module.is-locked {
  opacity: 0.86;
}

.journey-module-head {
  margin-bottom: 0.9rem;
}

.journey-module-summary-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.journey-module-progress,
.journey-module-next {
  display: grid;
  gap: 0.2rem;
  padding: 0.78rem 0.84rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 241, 231, 0.11);
  background: rgba(255, 248, 245, 0.045);
}

.journey-module-progress span,
.journey-module-next span {
  color: rgba(255, 241, 236, 0.64);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.journey-module-progress strong,
.journey-module-next strong {
  font-size: 0.92rem;
  line-height: 1.4;
}

.journey-module-head p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 241, 236, 0.76);
}

.journey-module-badges {
  margin-top: 0.6rem;
}

.journey-node-path {
  gap: 0.65rem;
}

.journey-node {
  position: relative;
  align-items: start;
  padding: 0.95rem;
  border-radius: 20px;
  background: rgba(255, 248, 245, 0.055);
}

.journey-node::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.journey-node strong {
  font-size: 0.98rem;
}

.journey-node span {
  font-size: 0.88rem;
  line-height: 1.45;
}

.journey-node small {
  color: rgba(255, 214, 154, 0.92);
}

.journey-node.is-complete {
  background: linear-gradient(135deg, rgba(120, 184, 125, 0.18), rgba(255, 248, 245, 0.04));
}

.journey-node.is-locked {
  opacity: 0.56;
}

.next-lesson-card {
  display: grid;
  gap: 0.9rem;
}

.resume-card,
.advanced-preview-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 241, 231, 0.12);
  background: rgba(255, 248, 245, 0.05);
}

.resume-card h3,
.advanced-preview-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.resume-card p,
.advanced-preview-card p {
  margin: 0;
  color: rgba(255, 241, 236, 0.76);
}

.advanced-preview-list,
.milestone-list {
  display: grid;
  gap: 0.6rem;
}

.advanced-preview-row,
.milestone-row {
  display: grid;
  gap: 0.22rem;
  padding: 0.82rem 0.88rem;
  border-radius: 16px;
  background: rgba(255, 248, 245, 0.05);
  border: 1px solid rgba(255, 241, 231, 0.1);
}

.advanced-preview-row strong,
.milestone-row strong {
  font-size: 0.93rem;
}

.advanced-preview-row span,
.milestone-row span {
  color: rgba(255, 241, 236, 0.72);
  font-size: 0.84rem;
}

.achievement-card {
  padding: 0.85rem;
  box-shadow: none;
}

.achievement-card h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.98rem;
}

.achievement-card p {
  margin: 0;
  color: rgba(255, 241, 236, 0.72);
}

.achievement-chip {
  width: fit-content;
}

.learn-study-shell {
  gap: 1rem;
}

.study-outline-toolbar {
  display: grid;
  gap: 0.75rem;
}

.study-outline-filters {
  display: grid;
  gap: 0.6rem;
}

.module-list-study {
  margin-top: 0.9rem;
}

.module-list-study .module-card {
  padding: 0.9rem;
  border-radius: 20px;
  background: rgba(255, 248, 245, 0.05);
}

.module-list-study .lesson-list {
  display: grid;
  gap: 0.55rem;
}

.lesson-row {
  padding: 0.82rem 0.88rem;
  border-radius: 16px;
}

.learning-stage {
  display: grid;
  gap: 1rem;
}

.player-panel-study .player-shell {
  margin-top: 0.9rem;
}

.player-shell-study {
  border-radius: 24px;
  overflow: hidden;
}

.player-frame,
.player-placeholder {
  min-height: clamp(220px, 52vw, 500px);
  border-radius: 24px;
}

.player-placeholder {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.4rem;
  padding: 1.15rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 222, 166, 0.14), transparent 22%),
    linear-gradient(135deg, rgba(48, 9, 15, 0.9), rgba(69, 13, 21, 0.98));
}

.detail-grid-study {
  display: grid;
  gap: 1rem;
}

.detail-panel-topic-index,
.detail-panel-notes {
  min-width: 0;
}

.chapter-list-rowwise {
  display: grid;
  gap: 0.75rem;
}

.subtopic-row {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 241, 231, 0.12);
  border-radius: 18px;
  background: rgba(255, 248, 245, 0.05);
  text-align: left;
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.subtopic-row:hover,
.subtopic-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 154, 0.4);
  background: rgba(255, 248, 245, 0.08);
}

.subtopic-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.subtopic-row strong {
  font-size: 0.97rem;
  line-height: 1.35;
}

.subtopic-row span {
  color: rgba(255, 241, 236, 0.74);
  font-size: 0.88rem;
  line-height: 1.5;
}

.subtopic-row-time {
  flex: 0 0 auto;
  color: rgba(255, 214, 154, 0.95);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prompt-chip-list {
  margin-bottom: 0.8rem;
}

.doubt-answer-panel {
  margin-top: 1rem;
}

.lesson-actions-study {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.lesson-badges {
  flex-wrap: wrap;
}

.track-toggle-list,
.aspect-filter-list,
.mode-tab-list {
  min-width: 0;
}

.mode-tab-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 860px) {
  .learn-poster {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 24rem);
    align-items: end;
  }

  .learn-poster-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .learn-poster-stats .poster-stat:last-child {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  .learn-hero-study {
    grid-template-columns: minmax(0, 1fr);
  }

  .learning-journey-shell-redesigned {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  }

  .detail-grid-study {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  }

  .detail-panel-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1080px) {
  .learn-page {
    width: min(1240px, calc(100% - 2rem));
  }

  .journey-node-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: grid;
  }

  .study-outline-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .module-list-study {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .player-head-study {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

@media (min-width: 900px) {
  .learn-shell.learn-study-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .study-outline-panel {
    order: -1;
  }

  .module-list-study {
    max-height: 30rem;
    overflow: auto;
    padding-right: 0.25rem;
  }
}

.learn-page {
  width: min(var(--container), calc(100% - 1.2rem));
  margin: 0 auto;
  padding: 1rem 0 2.4rem;
}

.learn-top-nav {
  position: sticky;
  top: 0;
  z-index: 60;
}

.learn-page,
.learn-shell,
.player-head,
.detail-grid,
.surface-panel,
.module-list,
.module-card,
.chapter-card,
.takeaway-list,
.note-resource-list,
.quiz-form,
.achievement-list,
.prompt-chip-list,
.progress-card-grid,
.next-lesson-card {
  min-width: 0;
}

.learn-hero {
  display: grid;
  gap: 0.95rem;
  padding: 0.35rem 0 1rem;
}

.learn-hero h1 {
  margin: 0.15rem 0 0;
  font-family: "Cinzel", serif;
  font-size: clamp(2.2rem, 10vw, 4.8rem);
  line-height: 0.94;
}

.hero-support,
.micro-copy,
.status-line,
.chapter-card p,
.note-card p,
.quiz-card p,
.answer-source p,
.module-summary,
.lesson-meta,
.progress-card-grid span,
.next-lesson-card p,
.answer-copy p,
.player-placeholder p,
.search-field span {
  color: var(--muted);
}

.learn-hero-card,
.curriculum-panel,
.surface-panel {
  border: 1px solid rgba(255, 248, 247, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, rgba(241, 196, 95, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(92, 18, 28, 0.9) 0%, rgba(46, 9, 16, 0.96) 100%);
  box-shadow: var(--shadow);
}

.learn-hero-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 1rem;
}

.learn-hero-card div {
  padding: 0.75rem;
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 16px;
  background: rgba(255, 248, 247, 0.04);
}

.learn-hero-card span,
.progress-label-row span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.learn-hero-card strong,
.progress-label-row strong,
.progress-card-grid strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 800;
}

.learn-hero-card .micro-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.learn-shell {
  display: grid;
  gap: 1rem;
}

.learn-study-shell {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.learn-dashboard-shell {
  display: grid;
  gap: 1rem;
}

.learn-hero-compact {
  padding-bottom: 0.4rem;
}

.learn-hero-compact h1 {
  font-size: clamp(2rem, 8vw, 3.8rem);
}

.learning-journey-shell {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.journey-panel {
  overflow: hidden;
}

.journey-mode-toolbar,
.mode-panel-shell {
  display: grid;
  gap: 0.7rem;
}

.mode-tab-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mode-tab {
  appearance: none;
  min-width: 0;
  border: 1px solid rgba(255, 248, 247, 0.12);
  border-radius: 16px;
  background: rgba(255, 248, 247, 0.05);
  color: var(--text);
  padding: 0.72rem 0.75rem;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mode-tab:hover,
.mode-tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 196, 95, 0.35);
}

.mode-tab.is-active {
  color: #2b070d;
  border-color: rgba(255, 224, 166, 0.8);
  background: linear-gradient(135deg, #f1c45f, #ffdca4);
  box-shadow: 0 14px 34px rgba(241, 196, 95, 0.16);
}

.journey-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.95rem 0;
}

.journey-stat-card {
  min-width: 0;
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 16px;
  background: rgba(255, 248, 247, 0.04);
  padding: 0.75rem;
}

.journey-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.journey-stat-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.05rem;
}

.progress-block-compact {
  margin-bottom: 1rem;
}

.journey-map {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.journey-module {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 0, rgba(241, 196, 95, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(112, 23, 34, 0.78), rgba(50, 9, 17, 0.92));
  padding: 0.9rem;
}

.journey-module-head {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.journey-module-head h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.15rem, 4vw, 1.65rem);
  line-height: 1.05;
}

.journey-module-badges,
.journey-node-path {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.journey-module-lock {
  width: fit-content;
  border: 1px solid rgba(241, 196, 95, 0.25);
  border-radius: 999px;
  background: rgba(241, 196, 95, 0.08);
  color: #ffe7b3;
  padding: 0.32rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.journey-node-path {
  position: relative;
  flex-direction: column;
}

.journey-node {
  appearance: none;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 20px;
  background: rgba(255, 248, 247, 0.055);
  color: var(--text);
  padding: 0.85rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 0.7rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.journey-node:hover,
.journey-node:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(241, 196, 95, 0.34);
  background: rgba(255, 248, 247, 0.08);
}

.journey-node.is-active {
  border-color: rgba(255, 224, 166, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 166, 0.16);
}

.journey-node.is-complete {
  background: linear-gradient(135deg, rgba(98, 213, 141, 0.13), rgba(255, 248, 247, 0.05));
}

.journey-node.is-locked {
  cursor: not-allowed;
  opacity: 0.62;
}

.journey-node-step {
  grid-row: span 3;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #2b070d;
  background: linear-gradient(135deg, #f1c45f, #ffdca4);
  font-size: 0.78rem;
  font-weight: 950;
}

.journey-node strong,
.journey-node span,
.journey-node small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.journey-node strong {
  font-size: 1rem;
  line-height: 1.35;
}

.journey-node span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.journey-node small {
  color: var(--brass);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.journey-node.tone-application .journey-node-step {
  background: linear-gradient(135deg, #ff9f6e, #ffd0a8);
}

.journey-node.tone-analysis .journey-node-step {
  background: linear-gradient(135deg, #f05a68, #ffc0c7);
}

.journey-node.tone-memory .journey-node-step {
  background: linear-gradient(135deg, #c5d86d, #fff0a6);
}

.journey-side-rail {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.rail-panel,
.analysis-summary-card,
.memory-anchor-list {
  min-width: 0;
}

.analysis-summary-card,
.memory-anchor-list {
  display: grid;
  gap: 0.7rem;
}

.analysis-card,
.memory-anchor-card {
  min-width: 0;
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 18px;
  background: rgba(255, 248, 247, 0.045);
  padding: 0.85rem;
}

.analysis-card strong,
.memory-anchor-card strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.analysis-card p,
.memory-anchor-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.curriculum-panel,
.surface-panel {
  padding: 1rem;
}

.curriculum-panel,
.learning-stage {
  min-width: 0;
}

.learning-stage {
  display: grid;
  gap: 1rem;
}

.panel-heading {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
}

.panel-heading-inline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel-heading h2,
.player-placeholder h3,
.answer-head strong {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.35rem, 5vw, 2.1rem);
  line-height: 1.02;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 248, 247, 0.16);
  border-radius: 16px;
  background: rgba(255, 248, 247, 0.05);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.track-switcher {
  display: grid;
  gap: 0.6rem;
  margin: 0.9rem 0 0.8rem;
}

.track-toggle-list,
.aspect-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.track-toggle,
.aspect-chip {
  appearance: none;
  border: 1px solid rgba(255, 248, 247, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 247, 0.05);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.track-toggle.is-active,
.aspect-chip.is-active {
  background: linear-gradient(135deg, rgba(241, 196, 95, 0.16), rgba(217, 35, 50, 0.18));
  border-color: rgba(241, 196, 95, 0.38);
}

.track-toggle.is-locked {
  opacity: 0.72;
}

.track-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.module-list,
.detail-grid,
.note-resource-list,
.prompt-chip-list,
.achievement-list,
.chapter-list,
.quiz-form {
  display: grid;
  gap: 0.8rem;
}

.module-card {
  border: 1px solid rgba(255, 248, 247, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(241, 196, 95, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(88, 16, 28, 0.96) 0%, rgba(31, 7, 12, 0.98) 100%);
  border-color: rgba(241, 196, 95, 0.16);
  overflow: hidden;
}

.module-card.is-locked {
  border-color: rgba(255, 212, 165, 0.18);
}

.module-card-head {
  padding: 1rem 0.95rem 0.95rem;
  border-bottom: 1px solid rgba(255, 248, 247, 0.08);
  background: linear-gradient(135deg, rgba(241, 196, 95, 0.12), rgba(217, 35, 50, 0.06));
}

.module-card-head h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.module-summary {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.lesson-list {
  display: grid;
}

.lesson-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 248, 247, 0.08);
  background: transparent;
  color: var(--text);
  padding: 0.9rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.28rem;
}

.lesson-row[disabled] {
  cursor: not-allowed;
  opacity: 0.56;
}

.lesson-row:last-child {
  border-bottom: 0;
}

.lesson-row:hover,
.lesson-row:focus-visible {
  background: rgba(255, 248, 247, 0.05);
}

.lesson-row.is-active {
  background: linear-gradient(135deg, rgba(241, 196, 95, 0.16), rgba(217, 35, 50, 0.12));
}

.lesson-row.is-complete .lesson-title::after {
  content: "Done";
  margin-left: 0.55rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(98, 213, 141, 0.14);
  color: #c8f6d7;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lesson-row.is-locked .lesson-title::after {
  content: "Locked";
  margin-left: 0.55rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(241, 196, 95, 0.14);
  color: #ffe8b6;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lesson-title {
  font-weight: 800;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lesson-meta {
  font-size: 0.84rem;
}

.lesson-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lesson-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  background: rgba(255, 248, 247, 0.06);
  border: 1px solid rgba(255, 248, 247, 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.player-head {
  display: grid;
  gap: 0.8rem;
}

.lesson-actions,
.notes-actions,
.quiz-actions,
.lesson-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.player-shell {
  margin-top: 0.9rem;
  min-height: 230px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 247, 0.1);
  background: rgba(14, 3, 6, 0.6);
}

.player-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-placeholder {
  min-height: 230px;
  display: grid;
  place-content: center;
  gap: 0.55rem;
  padding: 1.2rem;
  text-align: center;
}

.player-placeholder h3 {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
}

.player-placeholder p {
  max-width: 36rem;
  margin: 0 auto;
}

.player-footer {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.tag,
.prompt-chip,
.achievement-chip,
.source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 248, 247, 0.08);
  border: 1px solid rgba(255, 248, 247, 0.12);
  font-size: 0.8rem;
  font-weight: 800;
}

.tag.is-success,
.achievement-chip.is-unlocked {
  background: rgba(98, 213, 141, 0.12);
  border-color: rgba(98, 213, 141, 0.28);
  color: #d2f9df;
}

.tag.is-warn {
  background: rgba(241, 196, 95, 0.12);
  border-color: rgba(241, 196, 95, 0.3);
  color: var(--brass);
}

.progress-block {
  display: grid;
  gap: 0.38rem;
}

.progress-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.meter {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 248, 247, 0.08);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f1c45f, #ffdca4);
}

.detail-grid {
  margin-top: 1rem;
}

.subtopic-group {
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 18px;
  background: rgba(255, 248, 247, 0.04);
  overflow: hidden;
}

.subtopic-group-toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.95rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.subtopic-group-toggle:hover,
.subtopic-group-toggle:focus-visible {
  background: rgba(255, 248, 247, 0.04);
}

.subtopic-group-icon {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 196, 95, 0.34);
  background: rgba(241, 196, 95, 0.1);
  color: var(--brass);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.subtopic-group-copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.subtopic-group-copy strong,
.subtopic-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.subtopic-group-copy span,
.subtopic-item span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.subtopic-group-children {
  display: grid;
  gap: 0.55rem;
  padding: 0 0.95rem 0.95rem 3rem;
}

.subtopic-item {
  width: 100%;
  border: 1px solid rgba(255, 248, 247, 0.08);
  border-radius: 14px;
  background: rgba(255, 248, 247, 0.03);
  color: var(--text);
  padding: 0.8rem 0.85rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.25rem;
}

.subtopic-item:hover,
.subtopic-item:focus-visible {
  border-color: rgba(241, 196, 95, 0.2);
  background: rgba(241, 196, 95, 0.08);
}

.takeaway-list,
.takeaway-list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.takeaway-list li,
.chapter-card,
.note-card,
.quiz-card,
.achievement-card,
.next-lesson-card {
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 18px;
  background: rgba(255, 248, 247, 0.04);
  padding: 0.9rem;
}

.takeaway-list li {
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}

.takeaway-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--brass);
}

.chapter-card {
  display: grid;
  gap: 0.38rem;
}

.chapter-card button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.chapter-card strong,
.note-card h3,
.quiz-card h3,
.achievement-card h3,
.next-lesson-card h3 {
  display: block;
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.chapter-card time {
  color: var(--brass);
  font-weight: 800;
}

.note-card p,
.quiz-card p,
.achievement-card p,
.next-lesson-card p,
.answer-copy {
  margin: 0.42rem 0 0;
  line-height: 1.6;
}

.quiz-form {
  margin-top: 0.2rem;
}

.quiz-card fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.quiz-card label {
  display: flex;
  align-items: start;
  gap: 0.55rem;
}

.quiz-card input[type="radio"] {
  margin-top: 0.18rem;
}

.quiz-card.is-correct {
  border-color: rgba(98, 213, 141, 0.35);
}

.quiz-card.is-wrong {
  border-color: rgba(255, 139, 122, 0.35);
}

.prompt-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2rem;
}

.prompt-chip {
  border: 0;
  cursor: pointer;
  color: var(--text);
}

.prompt-chip:hover,
.prompt-chip:focus-visible {
  background: rgba(241, 196, 95, 0.18);
}

.empty-chip {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.doubt-answer-panel {
  margin-top: 0.9rem;
  border: 1px solid rgba(255, 248, 247, 0.1);
  border-radius: 18px;
  background: rgba(255, 248, 247, 0.04);
  padding: 1rem;
}

.answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.answer-copy {
  margin-top: 0.75rem;
  white-space: pre-wrap;
}

.quiz-dialog {
  width: min(880px, calc(100% - 1.2rem));
  border: 0;
  padding: 0;
  background: transparent;
}

.quiz-dialog::backdrop {
  background: rgba(11, 2, 4, 0.72);
  backdrop-filter: blur(8px);
}

.quiz-dialog-panel {
  width: 100%;
  max-height: min(86vh, 940px);
  overflow: auto;
}

.quiz-dialog-panel .quiz-form {
  margin-top: 0;
}

.quiz-dialog-panel .quiz-actions {
  justify-content: flex-end;
}

.doubt-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.study-rail,
.progress-card-grid {
  display: grid;
  gap: 0.85rem;
}

.progress-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-card.is-unlocked {
  background: linear-gradient(180deg, rgba(241, 196, 95, 0.14), rgba(255, 248, 247, 0.04));
}

.next-lesson-card {
  display: grid;
  gap: 0.65rem;
}

.next-lesson-card .btn {
  width: 100%;
}

.search-empty,
.empty-card {
  border: 1px dashed rgba(255, 248, 247, 0.16);
  border-radius: 18px;
  padding: 1rem;
  color: var(--muted);
}

.learn-footer {
  padding-top: 2.4rem;
}

@media (min-width: 840px) {
  .learn-page {
    width: min(var(--container), calc(100% - 2rem));
    padding-top: 1.2rem;
  }

  .learn-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    align-items: end;
  }

  .learn-shell {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.42fr);
    align-items: start;
  }

  .learn-study-shell {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.42fr);
  }

  .learn-hero.learn-hero-study {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .learn-hero-study {
    padding: 1.1rem 1.25rem;
  }

  .learn-hero-study > div {
    max-width: 58rem;
  }

  .learn-dashboard-shell {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: start;
  }

  .learning-journey-shell {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  }

  .mode-tab-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .journey-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .journey-node-path {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-panel-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1180px) {
  .learn-shell {
    grid-template-columns: minmax(260px, 0.66fr) minmax(0, 1.36fr) minmax(290px, 0.68fr);
  }

  .learn-study-shell {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.42fr);
  }

  .learn-dashboard-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
  }

  .learning-journey-shell {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.55fr);
  }
}

@media (max-width: 720px) {
  .learn-hero-card {
    grid-template-columns: 1fr;
  }

  .track-toggle-list,
  .aspect-filter-list {
    gap: 0.45rem;
  }

  .lesson-actions,
  .notes-actions,
  .quiz-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .progress-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .learning-journey-shell,
  .journey-panel,
  .journey-side-rail,
  .mode-tab-list,
  .journey-map,
  .journey-module,
  .journey-node,
  .detail-grid,
  .player-shell {
    max-width: 100%;
    overflow-x: hidden;
  }

  .mode-tab {
    padding-inline: 0.52rem;
  }

  .subtopic-group-children {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .subtopic-group-toggle {
    padding: 0.85rem;
  }

  .quiz-dialog {
    width: calc(100% - 0.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 2026-04-22 refinement pass */
.study-outline-toolbar {
  display: grid;
  gap: 0.75rem;
}

.study-outline-filters {
  order: 1;
  display: grid;
  gap: 0.55rem;
}

.search-field-compact {
  order: 2;
}

.track-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.aspect-filter-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.aspect-filter-list .aspect-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.aspect-chip-primary {
  border-color: rgba(255, 225, 164, 0.32);
  background: rgba(255, 225, 164, 0.08);
}

.journey-module-rail {
  padding: 0.8rem 0.85rem;
  gap: 0.7rem;
}

.journey-module-rail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  margin-bottom: 0;
}

.journey-module-rail-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.journey-module-rail-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.journey-module-toggle {
  appearance: none;
  border: 1px solid rgba(255, 248, 247, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 247, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.journey-module-toggle:hover,
.journey-module-toggle:focus-visible {
  border-color: rgba(241, 196, 95, 0.34);
  background: rgba(255, 248, 247, 0.1);
}

.journey-module-rail-meta,
.journey-module-rail-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.journey-module-rail-details .journey-module-progress,
.journey-module-rail-details .journey-module-next {
  flex: 1 1 14rem;
  min-width: 0;
}

.journey-module-lock-status {
  background: rgba(255, 248, 247, 0.06);
}

.journey-module-lock-copy {
  margin: 0;
  color: rgba(255, 241, 236, 0.76);
  font-size: 0.82rem;
  line-height: 1.45;
}

.journey-module.is-collapsed .journey-node-path {
  display: none;
}

.journey-node-path.is-expanded {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.2rem;
  align-items: stretch;
}

.journey-node {
  padding: 0.72rem;
  height: 100%;
  align-self: stretch;
  align-content: start;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.22rem 0.6rem;
}

.journey-node strong {
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.journey-node span {
  font-size: 0.84rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.journey-node small {
  font-size: 0.7rem;
  align-self: end;
  margin-top: auto;
}

.module-list-study {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.75rem;
}

.module-list-study .module-card {
  padding: 0.82rem;
  gap: 0.7rem;
}

.module-card-head {
  gap: 0.3rem;
}

.module-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.module-list-study .lesson-list {
  gap: 0.45rem;
}

.lesson-row {
  display: grid;
  gap: 0.4rem;
  padding: 0.72rem 0.8rem;
}

.lesson-row-main,
.lesson-row-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
}

.lesson-row-main .lesson-title {
  min-width: 0;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.lesson-row-support {
  justify-content: flex-start;
}

.lesson-row-status {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 248, 247, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 247, 0.06);
  color: rgba(255, 241, 236, 0.82);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
}

.lesson-row-status.is-success {
  border-color: rgba(115, 208, 151, 0.28);
  background: rgba(115, 208, 151, 0.12);
  color: #d9ffe7;
}

.lesson-row-status.is-locked {
  border-color: rgba(241, 196, 95, 0.28);
  background: rgba(241, 196, 95, 0.09);
  color: #ffe7b3;
}

.lesson-tag-list-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lesson-tag-list-compact .lesson-tag {
  padding: 0.25rem 0.45rem;
  font-size: 0.68rem;
}

@media (min-width: 900px) {
  .study-outline-toolbar {
    grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.75fr);
    align-items: start;
  }

  .study-outline-filters {
    order: 1;
  }

  .search-field-compact {
    order: 2;
  }
}

@media (min-width: 1100px) {
  .journey-module-rail .journey-node-path.is-expanded {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
  }

  .journey-module-rail .journey-node {
    min-height: 10.5rem;
    transform: none;
  }
}
