/* quantum.css · partea 4/4 */
.lesson-page-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: clamp(3.4rem, 6vw, 7rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.052em;
}

.lesson-page-hero > div > p:last-child {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--j-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.lesson-page-hero aside {
  padding: 24px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(23, 75, 60, 0.15);
  border-radius: 22px;
  background: rgba(255, 253, 245, 0.85);
  box-shadow: 0 14px 32px rgba(33, 77, 59, 0.08);
}

.lesson-page-hero aside > span {
  color: #19796a;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.lesson-page-hero aside strong {
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: 1.6rem;
}

.lesson-page-hero aside a {
  margin-top: 13px;
  color: #19796a;
  font-size: 0.72rem;
  font-weight: 800;
}

.mini-lesson-trail {
  width: min(100% - 80px, 850px);
  margin: 0 auto 54px;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  border: 1px solid rgba(23, 75, 60, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 245, 0.91);
  box-shadow: 0 13px 30px rgba(33, 77, 59, 0.09);
}

.mini-lesson-trail a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 2px solid #d4dbcf;
  border-radius: 50%;
  color: #607169;
  background: #edf0e8;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.65rem;
  font-weight: 900;
}

.mini-lesson-trail a.done { border-color: #7ebc3c; background: var(--j-lime); color: var(--j-forest-deep); }

.mini-lesson-trail a.available { border-color: var(--j-sun); background: #fff5c9; }

.mini-lesson-trail a.current { border-color: var(--j-coral); background: var(--j-coral); color: white; transform: scale(1.1); }

.mini-lesson-trail a.locked { opacity: 0.48; cursor: not-allowed; }

.lesson-page-content,
.lesson-locked-panel {
  width: min(100% - 80px, 1120px);
  margin: 0 auto 100px;
}

.lesson-plan-note {
  padding: 22px 25px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 25px;
  align-items: center;
  border: 1px solid rgba(23, 75, 60, 0.14);
  border-radius: 18px;
  background: #e5f3df;
}

.lesson-plan-note span {
  color: #19796a;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.lesson-plan-note p {
  margin: 0;
  color: var(--j-muted);
  line-height: 1.55;
}

.lesson-content-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.lesson-content-grid article {
  min-height: 210px;
  padding: 27px;
  border: 1px solid rgba(23, 75, 60, 0.14);
  border-radius: 22px;
  background: var(--j-paper);
  box-shadow: 0 12px 28px rgba(33, 77, 59, 0.07);
}

.lesson-content-grid article > span {
  color: var(--j-coral);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.67rem;
  font-weight: 900;
}

.lesson-content-grid h2 {
  margin: 24px 0 8px;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}

.lesson-content-grid p {
  margin: 0;
  color: var(--j-muted);
  line-height: 1.55;
}

.lesson-complete-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
}

.button-disabled,
.button-complete {
  color: #5e6d66;
  border-color: rgba(23, 75, 60, 0.14);
  background: #e8ece3;
  cursor: not-allowed;
}

.button-complete {
  color: var(--j-forest-deep);
  border-color: #7ebc3c;
  background: #dff2bb;
}

.lesson-locked-panel {
  padding: 70px 35px;
  text-align: center;
  border: 1px solid rgba(23, 75, 60, 0.15);
  border-radius: 28px;
  background: var(--j-paper);
}

.lesson-locked-panel > span {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--j-forest-deep);
  background: var(--j-sun);
  font-size: 2rem;
}

.lesson-locked-panel h2 {
  margin: 22px 0 9px;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
}

.lesson-locked-panel p {
  margin: 0 auto 25px;
  color: var(--j-muted);
}

@media (max-width: 980px) {
  .trail-map-two {
    height: auto;
  }

  .trail-map-two .trail-stop-1,
  .trail-map-two .trail-stop-2 {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
  }

  .chapter-selector-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-map-heading,
  .lesson-page-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .lesson-page-hero aside {
    max-width: 480px;
  }

  .mini-lesson-trail {
    border-radius: 25px;
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 700px) {
  .home-tools,
  .chapter-selector-list,
  .lesson-content-grid {
    grid-template-columns: 1fr;
  }

  .chapter-map-section {
    padding: 72px 16px;
  }

  .chapter-map-heading,
  .lesson-page-hero,
  .lesson-page-content,
  .lesson-locked-panel {
    width: 100%;
  }

  .active-chapter-header {
    padding: 26px 21px;
    grid-template-columns: 1fr;
  }

  .chapter-score {
    text-align: left;
  }

  .chapter-map-legend {
    padding: 16px 21px;
    gap: 14px;
  }

  .chapter-status {
    margin-inline: 21px;
  }

  .chapter-trail {
    margin-inline: 15px;
  }

  .chapter-trail-line {
    display: none;
  }

  .chapter-trail::before {
    content: "";
    position: absolute;
    left: 43px;
    top: 45px;
    bottom: 55px;
    border-left: 4px dashed #619565;
  }

  .chapter-lesson-node {
    left: 0 !important;
    transform: none;
  }

  .node-card-right .lesson-node-card,
  .node-card-left .lesson-node-card {
    left: 101px;
    right: auto;
    width: calc(100vw - 175px);
    text-align: left;
  }

  .chapter-finish-flag {
    left: 12px;
  }

  .lesson-page-hero {
    padding: 58px 0;
  }

  .lesson-page-hero h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .mini-lesson-trail {
    width: calc(100% - 32px);
    padding: 14px;
  }

  .lesson-page-content,
  .lesson-locked-panel {
    width: calc(100% - 32px);
  }

  .lesson-plan-note {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 440px) {
  .chapter-selector-list button {
    grid-template-columns: 36px 1fr;
  }

  .chapter-selector-list button small {
    display: none;
  }

  .lesson-bubble {
    width: 74px;
    height: 74px;
  }

  .chapter-lesson-node {
    width: 74px;
    height: 74px;
  }

  .chapter-trail::before {
    left: 36px;
  }

  .node-card-right .lesson-node-card,
  .node-card-left .lesson-node-card {
    left: 85px;
    width: calc(100vw - 145px);
  }

  .lesson-node-card strong {
    font-size: 1rem;
  }

  .lesson-node-card em {
    display: none;
  }

  .mini-lesson-trail a {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-lesson-node.current .lesson-bubble {
    animation: none;
  }
}
