@font-face {
  font-family: "HubDisplay";
  src: url("/static/adminhub/fonts/Lora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "HubBody";
  src: url("/static/adminhub/fonts/NotoSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --hub-bg: #f4f7ec;
  --hub-ink: #1d1b2a;
  --hub-ink-soft: #4c4860;
  --hub-accent: #ff6d37;
  --hub-accent-2: #12a784;
  --hub-accent-3: #fbc93d;
  --hub-edge: #171523;
  --hub-card: #ffffff;
  --hub-shadow: 0 20px 45px rgba(16, 10, 48, 0.16);
}

.free-hub-page {
  min-height: calc(100vh - 120px);
  margin-top: 0;
  position: relative;
  padding: calc(108px + 2rem) 1rem 3rem;
  background: radial-gradient(circle at 10% 10%, #f6fcb8 0%, rgba(246, 252, 184, 0) 42%), radial-gradient(circle at 90% 12%, #a7e6ff 0%, rgba(167, 230, 255, 0) 39%), linear-gradient(165deg, #fefeff 0%, #ebf6ef 50%, #f6f2ff 100%);
  font-family: "HubBody", "Segoe UI", sans-serif;
  color: var(--hub-ink);
  overflow-x: hidden;
  overflow-y: visible;
}

.free-hub-backdrop .blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(38px);
  opacity: 0.45;
  z-index: 0;
}

.free-hub-backdrop .blob-a {
  width: 280px;
  height: 280px;
  background: #65e5bf;
  top: 14%;
  left: -60px;
}

.free-hub-backdrop .blob-b {
  width: 300px;
  height: 300px;
  background: #ff9f7a;
  right: -90px;
  bottom: 12%;
}

.free-hub-backdrop .mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
  background-image: linear-gradient(rgba(26, 20, 52, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 20, 52, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 92%);
}

.free-hub-shell {
  max-width: 1260px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.reveal-up {
  opacity: 0;
  transform: translateY(18px);
  animation: lift-in 650ms cubic-bezier(.2, .7, .15, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes lift-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-hero {
  padding: 2rem 2rem 1.5rem;
  border: 2px solid var(--hub-edge);
  border-radius: 24px;
  background: linear-gradient(132deg, #fff8f2 0%, #ffffff 60%, #f0fff9 100%);
  box-shadow: var(--hub-shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .74rem;
  color: #2f2848;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 3px;
  background: var(--hub-accent);
  border-radius: 999px;
}

.hub-hero h1 {
  margin: .8rem 0 .7rem;
  font-family: "HubDisplay", Georgia, serif;
  font-size: clamp(2rem, 4.3vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: .01em;
}

.hero-copy {
  margin: 0;
  max-width: 760px;
  color: var(--hub-ink-soft);
  font-size: 1.02rem;
}

.course-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  overflow: visible;
  padding: 1rem .1rem .6rem;
  margin-top: 1rem;
  margin-bottom: .8rem;
  position: relative;
  align-items: flex-start;
  z-index: 140;
}

.course-tabs::-webkit-scrollbar {
  height: 8px;
}

.course-tabs::-webkit-scrollbar-thumb {
  background: rgba(17, 16, 41, 0.25);
  border-radius: 999px;
}

.course-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  max-width: 210px;
  border: 2px solid var(--hub-edge);
  border-radius: 999px;
  background: white;
  color: var(--hub-ink);
  text-decoration: none;
  white-space: nowrap;
  padding: .58rem .9rem;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 7px 0 #18142e;
  position: relative;
}

.course-chip[hidden] {
  display: none !important;
}

.course-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-chip[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: #171523;
  color: #fff;
  border-radius: 10px;
  padding: .38rem .52rem;
  font-size: .72rem;
  line-height: 1.2;
  max-width: 260px;
  white-space: normal;
  text-align: center;
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.course-chip[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #171523;
  rotate: 45deg;
  z-index: 19;
  pointer-events: none;
}

.more-chip {
  min-width: 56px;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  padding-inline: .72rem;
}

.course-overflow-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: min(360px, calc(100vw - 2rem));
  border: 2px solid var(--hub-edge);
  border-radius: 14px;
  background: #fffef8;
  box-shadow: 0 16px 40px rgba(19, 10, 43, 0.22);
  z-index: 2000;
  padding: .45rem;
}

.course-overflow-menu[hidden] {
  display: none !important;
}

.course-overflow-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: .28rem;
}

.course-overflow-menu .overflow-link {
  display: block;
  text-decoration: none;
  border: 1px solid #d8d6e5;
  border-radius: 10px;
  padding: .52rem .6rem;
  color: var(--hub-ink);
  font-weight: 700;
  background: #fff;
}

.course-overflow-menu .overflow-link:hover {
  background: #f8f5ff;
}

.course-overflow-menu .overflow-link.is-active {
  background: #ffe8d8;
  border-color: #f39b65;
}

.course-chip:hover {
  transform: translateY(-2px);
}

.course-chip.is-active {
  background: linear-gradient(135deg, #ff8152, #ffb74a);
  color: #1f1307;
  box-shadow: 0 10px 0 #1b1025;
}

.chip-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.chip-icon-photo {
  border-radius: 999px;
  object-fit: cover;
}

.learn-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
}

.learn-sidebar {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.learn-sidebar-card,
.learn-stage-card {
  border-radius: 22px;
  border: 2px solid var(--hub-edge);
  background: linear-gradient(160deg, #fff 0%, #fffdf7 100%);
  box-shadow: var(--hub-shadow);
}

.learn-sidebar-card {
  padding: 1rem;
}

.progress-card h2 {
  margin: 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.15;
}

.progress-mini {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  margin-top: .85rem;
  border-radius: 999px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff4d7d, #ffb703, #33d6a6) border-box;
  border: 2px solid transparent;
  padding: .48rem .72rem;
  color: var(--hub-ink);
  font-size: .88rem;
  font-weight: 800;
}

.progress-mini-dot {
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, .16);
}

.progress-mini strong {
  font-size: 1rem;
}

.progress-bar-shell {
  width: 100%;
  height: 10px;
  margin-top: .85rem;
  border-radius: 999px;
  background: #f1eefb;
  overflow: hidden;
  border: 0;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(135deg, #1cd4a5, #fbc93d);
  transition: width .25s ease;
}

.progress-copy {
  margin: .55rem 0 0;
  color: var(--hub-ink-soft);
  font-size: .82rem;
  font-weight: 800;
}

.outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}

.outline-head h2 {
  margin: 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: 1.35rem;
}

.back-link {
  color: #5b21b6;
  text-decoration: none;
  font-weight: 700;
}

.outline-groups {
  display: grid;
  gap: 1rem;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: .1rem;
}

.outline-group {
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff4d7d 0%, #ffb703 42%, #33d6a6 100%) border-box;
  border: 2px solid transparent;
  padding: .95rem;
  box-shadow: 0 8px 0 rgba(31, 41, 55, 0.08), 0 14px 28px rgba(255, 109, 55, 0.1);
}

.outline-group:nth-child(2n) {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #38bdf8 0%, #a78bfa 48%, #facc15 100%) border-box;
}

.outline-group:nth-child(3n) {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #34d399 0%, #60a5fa 48%, #fb7185 100%) border-box;
}

.outline-group-label {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #ff6d37;
}

.outline-group h3 {
  margin: .35rem 0 0;
  font-size: 1.02rem;
  font-family: "HubDisplay", Georgia, serif;
}

.outline-group-copy {
  margin: .45rem 0 0;
  color: var(--hub-ink-soft);
  font-size: .86rem;
}

.outline-step-list {
  list-style: none;
  margin: .85rem 0 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.outline-step {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  border: 2px solid #ddd8eb;
  border-radius: 12px;
  background: #fcfbff;
  padding: .82rem .85rem;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.outline-step::after {
  content: "Open";
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  padding: .2rem .5rem;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.outline-step:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #8b5cf6;
  box-shadow: 0 6px 0 rgba(91, 33, 182, 0.16);
}

.outline-step:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.outline-step-state {
  width: 12px;
  height: 12px;
  margin-top: .22rem;
  border-radius: 999px;
  border: 2px solid var(--hub-edge);
  background: #d1d5db;
}

.outline-step-copy strong {
  display: block;
  font-size: .92rem;
}

.outline-step-copy small {
  display: block;
  margin-top: .18rem;
  color: #6b7280;
}

.outline-step.is-current {
  background: #fff3e4;
  border-color: #ff9f7a;
  box-shadow: 0 6px 0 rgba(255, 109, 55, 0.18);
}

.outline-step.is-current::after {
  content: "Here";
  background: #fed7aa;
  color: #9a3412;
}

.outline-step.is-current .outline-step-state {
  background: #ff6d37;
  box-shadow: 0 0 0 5px rgba(255, 109, 55, .18);
}

.outline-step.is-complete {
  background: #ecfdf5;
  border-color: #6ee7b7;
  box-shadow: 0 6px 0 rgba(16, 185, 129, 0.16);
}

.outline-step.is-complete::after {
  content: "Done";
  background: #d1fae5;
  color: #047857;
}

.outline-step.is-complete .outline-step-state {
  background: #10b981;
}

.outline-step.is-available .outline-step-state {
  background: #fbc93d;
}

.outline-step.is-locked .outline-step-state {
  background: #cbd5e1;
}

.outline-step.is-locked::after {
  content: "Locked";
  background: #f1f5f9;
  color: #64748b;
}

.learn-stage-card {
  padding: 1.1rem;
  background: linear-gradient(160deg, #fff 0%, #f4fff8 60%, #fff7ef 100%);
}

.learn-stage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.learn-stage-topbar h2 {
  margin: .45rem 0 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: clamp(1.7rem, 3.6vw, 2.45rem);
  line-height: 1.1;
}

.learn-stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .42rem .75rem;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.stage-pill.is-current {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.stage-pill.is-done {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.active-step-description {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--hub-ink-soft);
  max-width: 70ch;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.active-step-content {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

.content-block {
  border-radius: 18px;
  border: 2px solid var(--hub-edge);
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 0 #251d43;
}

.content-block-callout {
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
}

.content-block-quiz {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
}

.content-block-video,
.content-block-embed {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.content-block-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.content-block h4 {
  margin: 0;
  font-size: 1.08rem;
  font-family: "HubDisplay", Georgia, serif;
}

.content-block-link {
  text-decoration: none;
  white-space: nowrap;
  border-radius: 12px;
  border: 2px solid var(--hub-edge);
  background: #eef2ff;
  color: #3730a3;
  padding: .55rem .8rem;
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
}

.content-block-body,
.content-block-empty {
  margin: .9rem 0 0;
  color: var(--hub-ink-soft);
  line-height: 1.7;
  white-space: pre-wrap;
}

.content-block-empty-shell {
  box-shadow: none;
}

.content-callout-body {
  margin: .9rem 0 0;
  padding: .9rem 1rem;
  border-left: 5px solid #f97316;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: #7c2d12;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
}

.content-embed-frame {
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 2px solid var(--hub-edge);
  background: #111827;
  aspect-ratio: 16 / 9;
}

.content-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content-image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  margin-top: 1rem;
  border-radius: 14px;
  border: 2px solid var(--hub-edge);
  background: #f8fafc;
}

.content-video-player {
  display: block;
  width: 100%;
  margin-top: 1rem;
  border-radius: 14px;
  border: 2px solid var(--hub-edge);
  background: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.content-quiz-prompt {
  margin-top: 1rem;
  border: 2px solid #c7d2fe;
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
}

.content-quiz-prompt strong {
  display: inline-flex;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  padding: .28rem .65rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.content-quiz-prompt p {
  margin: .85rem 0 0;
  color: var(--hub-ink);
  line-height: 1.65;
  font-weight: 700;
}

.learn-stage-footer {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding: .85rem;
  border: 2px solid var(--hub-edge);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 12px 32px rgba(17, 16, 41, 0.18);
  backdrop-filter: blur(10px);
}

.stage-footer-center {
  text-align: center;
  color: #5b516f;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
}

.stage-footer-label {
  display: block;
  margin-bottom: .18rem;
  font-size: .66rem;
  color: #7c3aed;
}

.stage-footer-actions {
  display: flex;
  gap: .7rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.stage-nav-btn,
.stage-complete-btn {
  border: 2px solid var(--hub-edge);
  border-radius: 12px;
  padding: .9rem 1.18rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.stage-nav-btn:hover:not(:disabled),
.stage-complete-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: saturate(1.06);
}

.stage-nav-btn {
  background: #fff;
  color: var(--hub-ink);
  box-shadow: 0 4px 0 #251d43;
}

.stage-nav-btn-next,
.stage-complete-btn {
  background: linear-gradient(140deg, #1cd4a5, #9df16e);
  color: #122a17;
  box-shadow: 0 4px 0 #0d5227;
}

.stage-complete-btn:not(:disabled) {
  animation: action-glow 1.8s ease-in-out infinite;
}

.stage-nav-btn-next.is-ready:not(:disabled) {
  background: linear-gradient(140deg, #fbc93d, #ffef8a);
  color: #3b2600;
  box-shadow: 0 4px 0 #8a5a00, 0 0 0 6px rgba(251, 201, 61, .16);
  animation: next-nudge 1.5s ease-in-out infinite;
}

@keyframes action-glow {
  0%, 100% {
    box-shadow: 0 4px 0 #0d5227, 0 0 0 rgba(28, 212, 165, 0);
  }
  50% {
    box-shadow: 0 4px 0 #0d5227, 0 0 0 6px rgba(28, 212, 165, .14);
  }
}

@keyframes next-nudge {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

.stage-nav-btn-next {
  min-width: 150px;
}

.stage-complete-btn {
  min-width: 170px;
}

.stage-nav-btn:disabled,
.stage-complete-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

.hub-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
}

.filter-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rail-card {
  border-radius: 26px;
  border: 2px solid var(--hub-edge);
  background: linear-gradient(180deg, #fff 0%, #fef9f0 100%);
  padding: 1rem;
  box-shadow: var(--hub-shadow);
}

.rail-card h2 {
  margin: 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: 1.24rem;
}

.rail-card p {
  margin: .35rem 0 .75rem;
  color: var(--hub-ink-soft);
  font-size: .88rem;
}

.filter-list {
  display: grid;
  gap: .48rem;
}

.filter-item {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  font-weight: 700;
}

.filter-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--hub-accent);
}

.field-label {
  display: block;
  margin: .8rem 0 .35rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

#hub-search,
#hub-sort {
  width: 100%;
  border: 2px solid var(--hub-edge);
  border-radius: 14px;
  padding: .55rem .65rem;
  background: white;
  font-weight: 600;
}

.pathway-stage {
  border-radius: 32px;
  border: 2px solid var(--hub-edge);
  background: linear-gradient(160deg, #fff 0%, #f4fff8 60%, #fff7ef 100%);
  padding: 1rem;
  box-shadow: var(--hub-shadow);
}

.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: .8rem;
}

.stage-head h2 {
  margin: .4rem 0 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
}

.stage-meta {
  margin: 0;
  font-size: .86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #4b415d;
}

.pathway-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.pathway-item {
  position: relative;
}

.pathway-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 34px;
  top: calc(100% - 3px);
  width: 2px;
  height: 22px;
  background: repeating-linear-gradient(to bottom, #2f2848 0 6px, transparent 6px 12px);
}

.step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .9rem;
  align-items: center;
  border: 2px solid var(--hub-edge);
  border-radius: 24px;
  background: white;
  padding: .95rem;
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: "";
  position: absolute;
  inset: auto -12% -50% auto;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle at center, rgba(253, 194, 69, .2) 0%, rgba(253, 194, 69, 0) 72%);
  pointer-events: none;
}

.step-pulse {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--hub-accent-2);
  border: 2px solid var(--hub-edge);
  box-shadow: 0 0 0 0 rgba(18, 167, 132, .55);
  animation: pulse 1.9s infinite;
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 12px rgba(18, 167, 132, 0);
  }
}

.step-icon {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  border: 2px solid var(--hub-edge);
  background: linear-gradient(140deg, #fff3e4, #d7fbe8);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--hub-edge);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-order {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  color: #5b516f;
}

.step-content h3 {
  margin: .34rem 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: 1.24rem;
  line-height: 1.2;
}

.step-description {
  margin: 0;
  color: var(--hub-ink-soft);
}

.step-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .7rem;
}

.step-tags span {
  display: inline-flex;
  align-items: center;
  background: #f2f4ff;
  border: 1px solid #d2d8ef;
  border-radius: 999px;
  padding: .24rem .56rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.step-actions {
  display: grid;
  gap: .45rem;
  position: relative;
  z-index: 2;
}

.btn-open,
.btn-complete,
.modal-content-link {
  border: 2px solid var(--hub-edge);
  border-radius: 12px;
  padding: .5rem .85rem;
  font-weight: 800;
  font-size: .83rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-open {
  background: linear-gradient(140deg, #1cd4a5, #9df16e);
  color: #122a17;
  box-shadow: 0 4px 0 #0d5227;
}

.btn-complete {
  background: #fff;
  color: var(--hub-ink);
  box-shadow: 0 4px 0 #251d43;
}

.btn-open:disabled,
.btn-complete:disabled,
.modal-content-link[aria-disabled="true"] {
  opacity: .44;
  cursor: not-allowed;
  box-shadow: none;
}

.pathway-item.is-locked .step-card {
  filter: grayscale(.2);
  background: linear-gradient(180deg, #f7f7f7 0%, #f2f2f2 100%);
}

.pathway-item.is-locked .step-pulse {
  background: #b0acbf;
  box-shadow: none;
  animation: none;
}

.pathway-item.is-complete .step-card {
  border-color: #089160;
}

.pathway-item.is-complete .btn-complete {
  background: linear-gradient(140deg, #fff8d8, #ffe494);
}

.empty-state {
  border: 2px dashed #3d3654;
  border-radius: 20px;
  padding: 1.2rem;
  text-align: center;
  background: #fffef8;
}

.empty-state h3 {
  margin: 0;
}

.empty-state p {
  margin: .6rem 0 0;
  color: #5d5870;
}

.hub-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 11, 29, 0.63);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 100;
}

.hub-modal[hidden] {
  display: none !important;
}

.modal-panel {
  width: min(680px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #fffcf5;
  border: 2px solid var(--hub-edge);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(8, 6, 22, 0.45);
  padding: 1.1rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: .5rem;
  right: .55rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--hub-edge);
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-panel h3 {
  margin: .45rem 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: 1.55rem;
}

.modal-description {
  margin: 0;
  color: #4d4865;
}

.modal-content-list {
  margin-top: 1rem;
  display: grid;
  gap: .6rem;
}

.modal-content-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  text-decoration: none;
  background: white;
  color: var(--hub-ink);
  box-shadow: 0 5px 0 #2a2343;
}

.modal-content-link small {
  opacity: .62;
  margin-top: .25rem;
  display: block;
}

.modal-content-link strong {
  text-align: right;
  align-self: center;
}

.modal-code-lab {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  background: #ffffff;
  border: 2px solid var(--hub-edge);
  border-radius: 18px;
  box-shadow: 0 5px 0 #2a2343;
}

.code-lab-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem;
  align-items: start;
}

.code-lab-title {
  margin: 0;
  font-weight: 800;
  font-size: 1rem;
  color: var(--hub-ink);
}

.code-lab-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: .3rem .65rem;
  background: #eef2ff;
  color: #3730a3;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.code-lab-allowed {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.code-lab-allowed span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .22rem .55rem;
  background: #f3f4f6;
  color: #374151;
  font-size: .75rem;
  font-weight: 700;
}

.code-lab-editor {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border: 2px solid var(--hub-edge);
  border-radius: 14px;
  padding: .9rem;
  background: #171523;
  color: #f8fafc;
  font-family: Consolas, "Courier New", monospace;
  font-size: .92rem;
  line-height: 1.5;
}

.code-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  justify-content: flex-start;
}

.btn-run-code,
.btn-reset-code,
.btn-expand-code {
  border: 2px solid var(--hub-edge);
  border-radius: 12px;
  padding: .55rem .9rem;
  font-weight: 800;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  flex: 0 0 auto;
}

.btn-run-code {
  background: linear-gradient(140deg, #38bdf8, #7dd3fc);
  color: #082f49;
  box-shadow: 0 4px 0 #0f3b5f;
  position: relative;
  min-width: 118px;
}

.btn-run-code.is-loading {
  color: #082f49;
  cursor: wait;
  filter: saturate(1.08);
}

.btn-run-code.is-loading::after {
  content: "";
  display: inline-block;
  width: .8rem;
  height: .8rem;
  margin-left: .45rem;
  border: 2px solid rgba(8, 47, 73, .28);
  border-top-color: #082f49;
  border-radius: 999px;
  vertical-align: -0.12rem;
  animation: lab-spin .75s linear infinite;
}

.btn-reset-code {
  background: #fff;
  color: var(--hub-ink);
  box-shadow: 0 4px 0 #251d43;
}

.btn-expand-code {
  background: linear-gradient(140deg, #fde68a, #fbbf24);
  color: #78350f;
  box-shadow: 0 4px 0 #92400e;
}

.code-lab-output {
  margin: 0;
  min-height: 100px;
  border: 2px solid #1f2937;
  border-radius: 14px;
  padding: .9rem;
  background: #0f172a;
  color: #e2e8f0;
  font-family: Consolas, "Courier New", monospace;
  font-size: .88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-lab-output.is-loading {
  border-color: #38bdf8;
  box-shadow: inset 0 0 0 999px rgba(56, 189, 248, .06);
}

.code-lab-output.is-error {
  border-color: #991b1b;
  background: #200a0a;
  color: #fecaca;
}

.html-lab-editor {
  min-height: 320px;
}

.turtle-lab-grid {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(320px, 1.05fr);
  gap: .85rem;
  align-items: stretch;
}

.turtle-lab-editor {
  min-height: 360px;
}

.turtle-canvas-shell {
  min-height: 360px;
  border: 2px solid var(--hub-edge);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 0 #2a2343;
}

.turtle-canvas {
  display: block;
  width: 100%;
  height: 320px;
  background: #fffdf7;
}

.html-lab-preview-shell {
  border: 2px solid var(--hub-edge);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.html-lab-preview-shell.is-loading::after {
  content: "Updating preview...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .78);
  color: #082f49;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .82rem;
}

.html-lab-preview-label {
  margin: 0;
  padding: .7rem .9rem;
  border-bottom: 2px solid rgba(23, 21, 35, 0.12);
  background: #f8fafc;
  color: #475569;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.html-lab-preview {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: #fff;
}

@keyframes lab-spin {
  to {
    transform: rotate(360deg);
  }
}

.code-lab-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(10, 8, 24, 0.82);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.code-lab-overlay[hidden] {
  display: none !important;
}

.code-lab-overlay-panel {
  width: min(1180px, 100%);
  height: min(92vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 2px solid var(--hub-edge);
  border-radius: 24px;
  background: #fffdf7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.code-lab-overlay-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 2px solid rgba(23, 21, 35, 0.12);
  background: linear-gradient(132deg, #fff8f2 0%, #ffffff 60%, #f0fff9 100%);
}

.code-lab-overlay-head h3 {
  margin: .45rem 0 0;
  font-family: "HubDisplay", Georgia, serif;
  font-size: 1.65rem;
}

.code-lab-overlay-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--hub-edge);
  background: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

.code-lab-overlay-body {
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  display: flex;
}

.code-lab-overlay .modal-code-lab {
  width: 100%;
  height: auto;
  min-height: 0;
  align-content: start;
}

.code-lab-overlay .code-lab-editor {
  min-height: 420px;
  height: auto;
}

.code-lab-overlay .code-lab-output {
  min-height: 180px;
  max-height: 260px;
  overflow: auto;
}

.code-lab-overlay .html-lab-preview {
  min-height: 420px;
}

.code-lab-overlay .turtle-lab-grid {
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr);
}

.code-lab-overlay .turtle-lab-editor {
  min-height: 520px;
}

.code-lab-overlay .turtle-canvas-shell {
  min-height: 520px;
}

.code-lab-overlay .turtle-canvas {
  height: 480px;
}

.modal-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: end;
}

@media (max-width: 1000px) {
  .learn-layout {
    grid-template-columns: 1fr;
  }

  .outline-groups {
    max-height: none;
  }
}

@media (max-width: 780px) {
  .free-hub-page {
    margin-top: 0;
    padding-top: calc(95px + 1.1rem);
  }

  .learn-stage-topbar,
  .content-block-head,
  .learn-stage-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .learn-stage-footer {
    position: static;
  }

  .stage-nav-btn,
  .stage-complete-btn {
    width: 100%;
  }

  .learn-stage-pills,
  .stage-footer-actions {
    justify-content: flex-start;
  }

  .code-lab-head {
    flex-direction: column;
  }

  .turtle-lab-grid,
  .code-lab-overlay .turtle-lab-grid {
    grid-template-columns: 1fr;
  }

  .turtle-canvas,
  .code-lab-overlay .turtle-canvas {
    height: 300px;
  }

  .content-block-link {
    white-space: normal;
  }

  .code-lab-overlay {
    padding: .6rem;
  }

  .code-lab-overlay-panel {
    height: min(95vh, 100%);
    border-radius: 18px;
  }
  .course-chip[data-tooltip]:hover::after,
  .course-chip[data-tooltip]:hover::before {
    content: none;
  }
}
