.learning-map-shell {
  container-type: inline-size;
  padding-bottom: 48px;
}

.learning-map {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(220px, .48fr) minmax(360px, .92fr);
  overflow: clip;
  isolation: isolate;
  border: 1px solid rgba(166, 205, 220, .17);
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 80% 120% at 0 0, rgba(50, 135, 173, .15), transparent 70%),
    radial-gradient(ellipse 70% 110% at 100% 100%, rgba(214, 168, 95, .11), transparent 72%),
    linear-gradient(112deg, rgba(7, 22, 31, .97), rgba(7, 14, 20, .98) 58%, rgba(27, 22, 20, .94));
  box-shadow: inset 0 1px rgba(227, 243, 248, .055), 0 24px 64px rgba(0, 0, 0, .22);
}

.learning-map::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 19%, rgba(192, 226, 236, .03) 44%, transparent 67%),
    radial-gradient(circle at 51% 48%, rgba(229, 179, 89, .075), transparent 17%);
  content: "";
}

.learning-map > :not(.ambient-sparks) { position: relative; z-index: 2; }
.learning-map .ambient-sparks { z-index: 1; opacity: .6; }

.learning-map__intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 12px 30px 30px;
}

.learning-map__kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(177, 219, 232, .72);
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.learning-map__intro h2 {
  max-width: 560px;
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.13;
  text-wrap: pretty;
}

.learning-map__intro > p {
  max-width: 540px;
  margin: 0;
  color: var(--text-soft);
  font-size: .88rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.learning-map__prompt {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(166, 205, 220, .11);
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.5;
}

.learning-map__north-star {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
  margin-top: 1px;
  isolation: isolate;
  filter: drop-shadow(0 0 5px rgba(94, 194, 232, .26)) drop-shadow(0 0 7px rgba(230, 176, 81, .12));
  animation: learningNorthStarGlow 4600ms cubic-bezier(.37, 0, .63, 1) infinite;
}

.learning-map__north-star::before,
.learning-map__north-star::after,
.learning-map__north-star i,
.learning-map__north-star i::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.learning-map__north-star::before {
  z-index: -1;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 249, 255, .32) 0 8%, rgba(79, 187, 231, .19) 24%, rgba(223, 166, 69, .09) 46%, transparent 72%);
  filter: blur(2px);
  animation: learningNorthStarAura 4600ms cubic-bezier(.37, 0, .63, 1) infinite;
}

.learning-map__north-star::after {
  z-index: 2;
  top: 1px;
  left: 5px;
  width: 8px;
  height: 16px;
  background: linear-gradient(180deg, rgba(205, 239, 251, .94), #fff 43%, rgba(247, 213, 143, .98) 58%, rgba(218, 155, 57, .72));
  clip-path: polygon(50% 0, 62% 39%, 100% 50%, 62% 61%, 50% 100%, 38% 61%, 0 50%, 38% 39%);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .72));
}

.learning-map__north-star i,
.learning-map__north-star i::before {
  z-index: 1;
  top: 50%;
  left: 50%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, rgba(117, 207, 239, .54) 35%, rgba(255, 250, 224, .95) 50%, rgba(225, 166, 65, .48) 65%, transparent);
  transform: translate(-50%, -50%);
  transform-origin: center;
  animation: learningNorthStarRay 4600ms cubic-bezier(.37, 0, .63, 1) infinite;
}

.learning-map__north-star i { width: 18px; height: 1px; }

.learning-map__north-star i::before {
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent, rgba(117, 207, 239, .58) 34%, rgba(255, 250, 224, .98) 50%, rgba(225, 166, 65, .52) 66%, transparent);
  animation-delay: -430ms;
}

.learning-map__prompt:hover .learning-map__north-star {
  animation-duration: 2600ms;
}

.learning-map__prompt strong { display: block; margin-bottom: 2px; color: var(--text-main); font-weight: 580; }

@keyframes learningNorthStarGlow {
  0%, 100% { opacity: .76; filter: drop-shadow(0 0 4px rgba(94, 194, 232, .24)) drop-shadow(0 0 6px rgba(230, 176, 81, .1)) brightness(.92) saturate(1.04); }
  42% { opacity: 1; filter: drop-shadow(0 0 7px rgba(106, 210, 244, .5)) drop-shadow(0 0 10px rgba(232, 176, 78, .24)) brightness(1.28) saturate(1.2); }
  48% { opacity: .88; filter: drop-shadow(0 0 5px rgba(94, 194, 232, .3)) drop-shadow(0 0 7px rgba(230, 176, 81, .14)) brightness(1.04) saturate(1.08); }
  68% { opacity: .96; filter: drop-shadow(0 0 6px rgba(101, 204, 240, .4)) drop-shadow(0 0 8px rgba(232, 176, 78, .19)) brightness(1.17) saturate(1.14); }
}

@keyframes learningNorthStarAura {
  0%, 100% { opacity: .34; }
  42% { opacity: .82; }
  48% { opacity: .48; }
  68% { opacity: .66; }
}

@keyframes learningNorthStarRay {
  0%, 100% { opacity: .38; }
  42% { opacity: .94; }
  48% { opacity: .55; }
  68% { opacity: .76; }
}

.learning-map__visual {
  --learning-map-orbit-size: 230px;
  --learning-map-caption-lift: 2px;
  position: relative;
  min-height: 342px;
  display: grid;
  place-items: center;
  margin: 0;
  pointer-events: none;
}

.learning-map__visual::before,
.learning-map__visual::after {
  position: absolute;
  left: 50%;
  pointer-events: none;
  content: "";
  transform: translateX(-50%);
}

.learning-map__visual::before {
  width: min(92%, var(--learning-map-orbit-size));
  aspect-ratio: 1;
  border: 1px solid rgba(176, 215, 226, .09);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(222, 174, 88, .13), rgba(65, 150, 183, .055) 44%, transparent 70%),
    repeating-radial-gradient(circle, transparent 0 37px, rgba(172, 211, 223, .04) 38px 39px);
  box-shadow: 0 0 58px rgba(62, 151, 184, .08);
}

.learning-map__visual::after {
  bottom: 53px;
  width: 210px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(217, 169, 86, .2), rgba(63, 147, 182, .075) 50%, transparent 74%);
  filter: blur(10px);
}

.learning-map__visual img {
  position: relative;
  z-index: 1;
  width: min(82%, 205px);
  height: auto;
  display: block;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .38)) drop-shadow(0 0 20px rgba(220, 171, 86, .08));
}

.learning-map__visual-caption {
  position: absolute;
  z-index: 2;
  bottom: calc((100% - var(--learning-map-orbit-size)) / 2 + var(--learning-map-caption-lift));
  left: 50%;
  min-width: 108px;
  padding: 6px 10px;
  border: 1px solid rgba(174, 205, 218, .13);
  border-radius: var(--radius-pill);
  color: rgba(188, 220, 230, .72);
  background: rgba(7, 18, 24, .72);
  font-family: var(--font-mono);
  font-size: .61rem;
  line-height: 1.2;
  letter-spacing: .055em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.learning-map__contents {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 18px 18px 18px 0;
}

.learning-map__contents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 10px 18px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.learning-map__chapters {
  display: grid;
  gap: 10px;
}

.learning-map__group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(166, 205, 220, .13);
  border-radius: var(--radius-sm);
  background: rgba(5, 13, 18, .38);
  box-shadow: inset 0 1px rgba(230, 243, 247, .03);
}

.learning-map__group--available {
  border-color: rgba(127, 198, 222, .2);
  background: radial-gradient(ellipse 90% 150% at 0 0, rgba(58, 151, 188, .1), transparent 72%), rgba(5, 14, 20, .46);
}

.learning-map__group--planned {
  border-color: rgba(205, 167, 104, .14);
  background: radial-gradient(ellipse 90% 150% at 100% 0, rgba(202, 154, 79, .055), transparent 72%), rgba(7, 13, 17, .38);
}

.learning-map__group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 12px 6px;
  border-bottom: 1px solid rgba(166, 205, 220, .1);
  color: rgba(182, 222, 234, .68);
  background: rgba(13, 31, 40, .34);
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.learning-map__group--planned .learning-map__group-label {
  color: rgba(222, 183, 114, .7);
  background: rgba(38, 29, 21, .3);
}

.learning-map__chapter {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 48px;
  align-items: stretch;
  color: var(--text-main);
  text-decoration: none;
}

.learning-map__group .learning-map__chapter + .learning-map__chapter { border-top: 1px solid rgba(166, 205, 220, .11); }

.learning-map__chapter-index {
  padding-top: 16px;
  color: rgba(167, 210, 225, .6);
  font-family: var(--font-mono);
  font-size: .68rem;
  text-align: center;
}

.learning-map__chapter-copy { min-width: 0; padding: 13px 10px 14px 4px; }

.learning-map__chapter h3 { margin: 0; color: var(--text-main); font-size: .88rem; line-height: 1.35; }

.learning-map__chapter p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: .69rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.learning-map__chapter-action {
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(166, 205, 220, .12);
  background: linear-gradient(180deg, rgba(83, 167, 198, .05), rgba(214, 168, 95, .03));
  transition: background 260ms var(--ease-default), box-shadow 280ms var(--ease-default);
}

.learning-map__chapter--active {
  outline: 0;
  background:
    radial-gradient(ellipse 80% 150% at 0 0, rgba(61, 156, 193, .11), transparent 72%),
    rgba(7, 20, 28, .48);
  transition: background-color 260ms var(--ease-default), box-shadow 280ms var(--ease-default);
}

.learning-map__chapter--active::before {
  position: absolute;
  inset: 0 48px 0 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 22%, rgba(205, 232, 240, .07), transparent 76%);
  background-position: 100% 0;
  background-size: 220% 100%;
  opacity: 0;
  content: "";
  transition: opacity 280ms var(--ease-default), background-position 720ms var(--ease-default);
}

.learning-map__chapter--active:hover,
.learning-map__chapter--active:focus-visible {
  background-color: rgba(9, 30, 41, .75);
  box-shadow: inset 0 0 0 1px rgba(126, 199, 224, .2), 0 14px 34px rgba(0, 0, 0, .18);
}

.learning-map__chapter--active:hover::before,
.learning-map__chapter--active:focus-visible::before { opacity: 1; background-position: 0 0; }
.learning-map__chapter--active:focus-visible { outline: 1px solid rgba(137, 208, 232, .44); outline-offset: -2px; }

.learning-map__chapter--active:hover .learning-map__chapter-action,
.learning-map__chapter--active:focus-visible .learning-map__chapter-action {
  background: radial-gradient(circle, rgba(112, 197, 225, .14), transparent 70%), rgba(10, 29, 39, .8);
  box-shadow: inset 1px 0 rgba(148, 211, 231, .1), -9px 0 22px rgba(73, 167, 201, .04);
}

.learning-map__chapter--active:hover .information-alt-cue,
.learning-map__chapter--active:focus-visible .information-alt-cue { color: #d9f3fb; filter: drop-shadow(0 0 7px rgba(126, 204, 229, .38)); }

.learning-map__chapter--future { grid-template-columns: 36px minmax(0, 1fr); }
.learning-map__chapter--future h3 { color: rgba(239, 231, 214, .82); }

@container (max-width: 920px) {
  .learning-map { grid-template-columns: minmax(0, .95fr) minmax(190px, .45fr); }
  .learning-map__intro { padding-right: 24px; }
  .learning-map__visual { min-height: 310px; }
  .learning-map__contents { grid-column: 1 / -1; padding: 0 20px 20px; }
  .learning-map__contents-head { padding-top: 16px; border-top: 1px solid rgba(166, 205, 220, .11); }
  .learning-map__chapters { grid-template-columns: minmax(0, .95fr) minmax(0, 2fr); }
  .learning-map__group--planned { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-map__group--planned .learning-map__group-label { grid-column: 1 / -1; }
  .learning-map__group--planned .learning-map__chapter + .learning-map__chapter { border-top: 0; border-left: 1px solid rgba(166, 205, 220, .11); }
  .learning-map__chapter { grid-template-columns: 32px minmax(0, 1fr); }
  .learning-map__chapter-action { grid-column: 1 / -1; min-height: 38px; border-top: 1px solid rgba(166, 205, 220, .11); border-left: 0; }
}

@container (max-width: 560px) {
  .learning-map-shell { padding-bottom: 36px; }
  .learning-map { grid-template-columns: 1fr; }
  .learning-map__visual { --learning-map-orbit-size: 180px; --learning-map-caption-lift: 5px; min-height: 210px; order: -1; border-bottom: 1px solid rgba(166, 205, 220, .11); }
  .learning-map__visual::before { width: var(--learning-map-orbit-size); }
  .learning-map__visual::after { bottom: 35px; width: 170px; }
  .learning-map__visual img { width: 165px; }
  .learning-map__intro { padding: 22px 18px 20px; }
  .learning-map__intro h2 { font-size: 1.4rem; }
  .learning-map__intro > p { font-size: .84rem; }
  .learning-map__prompt { margin-top: 17px; padding-top: 13px; }
  .learning-map__contents { padding: 0 14px 14px; }
  .learning-map__contents-head { padding-inline: 4px; }
  .learning-map__chapters { grid-template-columns: 1fr; }
  .learning-map__group--planned { display: block; }
  .learning-map__group--planned .learning-map__chapter + .learning-map__chapter { border-top: 1px solid rgba(166, 205, 220, .11); border-left: 0; }
  .learning-map__chapter { grid-template-columns: 34px minmax(0, 1fr) 46px; }
  .learning-map__chapter--future { grid-template-columns: 34px minmax(0, 1fr); }
  .learning-map__chapter-action { grid-column: auto; min-height: 0; border-top: 0; border-left: 1px solid rgba(166, 205, 220, .11); }
}

@media (prefers-reduced-motion: reduce) {
  .learning-map__north-star,
  .learning-map__north-star::before,
  .learning-map__north-star i,
  .learning-map__north-star i::before,
  .learning-map__chapter--active,
  .learning-map__chapter--active::before,
  .learning-map__chapter-action,
  .learning-map__chapter--active .information-alt-cue { animation: none; transition: none; }
}
