:root {
  --course-handoff-forest: #173f2c;
  --course-handoff-cream: #fffdf8;
  --course-handoff-coral: #c95f49;
  --course-handoff-gold: #d6a23f;
  --course-handoff-ink: #20362b;
  --course-handoff-muted: #5d695f;
}

body.has-completed-course-handoff {
  overflow: hidden;
}

.curriculum-rooted-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100svh - 28px);
  display: none;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.35fr);
  overflow: hidden;
  border: 1px solid #d0d4c7;
  border-radius: 7px;
  padding: 0;
  background: var(--course-handoff-cream);
  color: var(--course-handoff-ink);
  box-shadow: 0 28px 90px rgba(12, 30, 20, 0.42);
}

.curriculum-rooted-dialog[open] {
  display: grid;
}

.curriculum-rooted-dialog::backdrop {
  background: rgba(15, 34, 23, 0.76);
  backdrop-filter: blur(5px);
}

.curriculum-rooted-art {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  background: #708f55;
}

.curriculum-rooted-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 48, 31, 0.18);
  pointer-events: none;
}

.curriculum-rooted-art > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.curriculum-rooted-complete {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2c365;
  border-radius: 5px;
  padding: 8px 11px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--course-handoff-forest);
  box-shadow: 0 7px 20px rgba(27, 58, 38, 0.2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.curriculum-rooted-complete i {
  color: var(--course-handoff-gold);
  font-size: 17px;
}

.curriculum-rooted-sparkle {
  position: absolute;
  z-index: 2;
  color: #ffe99c;
  filter: drop-shadow(0 0 8px rgba(255, 220, 102, 0.95));
  animation: curriculum-rooted-glimmer 2.8s ease-in-out infinite;
}

.curriculum-rooted-sparkle.is-one {
  top: 26%;
  left: 67%;
  font-size: 19px;
}

.curriculum-rooted-sparkle.is-two {
  top: 54%;
  left: 30%;
  font-size: 13px;
  animation-delay: 0.8s;
}

.curriculum-rooted-sparkle.is-three {
  top: 67%;
  left: 78%;
  font-size: 16px;
  animation-delay: 1.5s;
}

@keyframes curriculum-rooted-glimmer {
  0%, 100% { opacity: 0.38; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1.08); }
}

.curriculum-rooted-content {
  position: relative;
  align-self: center;
  padding: 40px 34px 34px;
}

.curriculum-rooted-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #c6cec1;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: var(--course-handoff-forest);
  font-size: 19px;
  cursor: pointer;
}

.curriculum-rooted-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--course-handoff-coral);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.curriculum-rooted-content h2,
.curriculum-rooted-content h3 {
  font-family: Georgia, serif;
}

.curriculum-rooted-content h2 {
  margin: 5px 44px 10px 0;
  color: var(--course-handoff-forest);
  font-size: clamp(32px, 4vw, 43px);
  line-height: 1.05;
}

.curriculum-rooted-summary {
  margin: 0 0 22px;
  color: var(--course-handoff-muted);
  font-size: 16px;
  line-height: 1.5;
}

.curriculum-rooted-active {
  display: grid;
  gap: 14px;
  border: 1px solid #d5a72c;
  border-radius: 7px;
  padding: 12px;
  background: var(--course-handoff-forest);
  color: #fffdf8;
  box-shadow: 0 10px 26px rgba(106, 76, 7, 0.18), 0 0 28px rgba(214, 162, 63, 0.18);
}

.curriculum-rooted-active > img {
  width: 100%;
  height: 132px;
  display: block;
  border-radius: 5px;
  object-fit: cover;
}

.curriculum-rooted-active > div > span:first-child {
  display: block;
  color: #f4c95e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.curriculum-rooted-active h3 {
  margin: 5px 0 3px;
  color: #fffdf8;
  font-size: 30px;
}

.curriculum-rooted-active p {
  margin: 0;
  color: #dce7df;
  font-size: 13px;
}

.curriculum-rooted-active progress {
  width: 100%;
  height: 8px;
  display: block;
  margin-top: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--course-handoff-gold);
}

.curriculum-rooted-active progress::-webkit-progress-bar {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}

.curriculum-rooted-active progress::-webkit-progress-value {
  border-radius: 4px;
  background: var(--course-handoff-gold);
  box-shadow: 0 0 10px rgba(255, 216, 107, 0.8);
}

.curriculum-rooted-active progress::-moz-progress-bar {
  border-radius: 4px;
  background: var(--course-handoff-gold);
}

.curriculum-rooted-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.curriculum-rooted-action {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #b8c2b5;
  border-radius: 5px;
  padding: 10px 15px;
  background: #fffdf8;
  color: var(--course-handoff-forest);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.curriculum-rooted-action.is-primary {
  min-height: 50px;
  border-color: var(--course-handoff-coral);
  background: var(--course-handoff-coral);
  color: #fff;
  box-shadow: 0 0 22px rgba(201, 95, 73, 0.22);
}

@media (max-width: 760px) {
  .curriculum-rooted-dialog,
  .curriculum-rooted-dialog[open] {
    width: min(430px, calc(100vw - 18px));
    max-height: calc(100svh - 18px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .curriculum-rooted-art {
    min-height: 190px;
    max-height: 190px;
  }

  .curriculum-rooted-complete {
    top: 13px;
    left: 13px;
  }

  .curriculum-rooted-content {
    padding: 27px 18px 19px;
    text-align: center;
  }

  .curriculum-rooted-content h2 {
    margin: 6px 28px 8px;
    font-size: 30px;
  }

  .curriculum-rooted-summary {
    margin-bottom: 16px;
    font-size: 14px;
  }

  .curriculum-rooted-close {
    top: 9px;
    right: 9px;
    width: 34px;
    height: 34px;
  }

  .curriculum-rooted-active {
    text-align: left;
  }

  .curriculum-rooted-active > img {
    height: 112px;
  }

  .curriculum-rooted-active h3 {
    font-size: 25px;
  }

  .curriculum-rooted-actions {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .curriculum-rooted-sparkle {
    animation: none;
  }
}
