/* =========================================================
   LEARNING SYSTEMS QUEST
   Resource Lab Flagship Pattern
   Page-specific styles only
   ========================================================= */

.learning-systems-quest-page {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: var(--lrl-ink, #080b12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.learning-systems-quest-page *,
.learning-systems-quest-page *::before,
.learning-systems-quest-page *::after {
  box-sizing: border-box;
}

.learning-systems-quest-page::before {
  content: "";
  position: absolute;
  top: 88px;
  right: -240px;
  width: 640px;
  height: 640px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), transparent 62%);
  pointer-events: none;
}

.learning-systems-quest-page::after {
  content: "";
  position: absolute;
  top: 520px;
  left: -280px;
  width: 620px;
  height: 620px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12), transparent 64%);
  pointer-events: none;
}

.lsq-hero-section,
.lsq-opening-section,
.lsq-game-section,
.lsq-teaches-section,
.lsq-design-section,
.lsq-build-section,
.lsq-starter-section,
.lsq-related-section,
.lsq-closing-section {
  position: relative;
  z-index: 1;
}

.lsq-hero-section {
  padding: clamp(72px, 8vw, 120px) 24px 56px;
}

.lsq-hero-inner,
.lsq-section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.lsq-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(36px, 6vw, 78px);
  align-items: center;
}

.lsq-hero-copy {
  max-width: 720px;
}

.lsq-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 22px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1),
    rgba(124, 58, 237, 0.1),
    rgba(20, 184, 166, 0.1)
  );
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.1);
}

.lsq-hero-copy h1 {
  margin: 0 0 28px;
  color: #080b12;
  font-size: clamp(56px, 7.4vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.lsq-hero-copy h1 span {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 48%, #14b8a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lsq-hero-text {
  max-width: 680px;
  margin: 0;
  color: #596173;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.7;
}

.lsq-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.lsq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 23px;
  border-radius: 999px;
  border: 0;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    opacity 0.22s ease;
}

.lsq-button:hover {
  transform: translateY(-2px);
}

.lsq-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.lsq-button-primary,
.lsq-button-primary:visited,
.lsq-button-primary:active {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #14b8a6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.22);
}

.lsq-button-secondary,
.lsq-button-secondary:visited,
.lsq-button-secondary:active {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.lsq-button-secondary:hover {
  border-color: rgba(124, 58, 237, 0.2) !important;
  color: #6d28d9 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

/* Hero visual */

.lsq-hero-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.lsq-visual-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.85;
  pointer-events: none;
}

.lsq-visual-orb-one {
  width: 280px;
  height: 280px;
  top: 32px;
  right: 20px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24), transparent 68%);
}

.lsq-visual-orb-two {
  width: 300px;
  height: 300px;
  bottom: 20px;
  left: 12px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2), transparent 68%);
}

.lsq-system-map-card {
  position: relative;
  width: min(430px, 100%);
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 34px;
  background:
    radial-gradient(circle at 85% 10%, rgba(124, 58, 237, 0.1), transparent 32%),
    radial-gradient(circle at 10% 95%, rgba(20, 184, 166, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.86);
  box-shadow:
    0 34px 80px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
}

.lsq-map-header {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.lsq-map-header span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
}

.lsq-map-node {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.lsq-map-node-main {
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.1), transparent 34%),
    #ffffff;
}

.lsq-map-node strong {
  display: block;
  margin: 0 0 6px;
  color: #080b12;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lsq-map-node small {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

.lsq-map-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.lsq-map-score {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.lsq-map-score span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lsq-map-score strong {
  font-size: 34px;
  letter-spacing: -0.06em;
}

/* Text sections */

.lsq-opening-section,
.lsq-teaches-section,
.lsq-build-section {
  padding: 64px 24px;
}

.lsq-content-narrow {
  width: min(860px, 100%);
  margin: 0 auto;
}

.lsq-content-narrow h2,
.lsq-section-header h2,
.lsq-game-header h2,
.lsq-closing-card h2 {
  margin: 0 0 24px;
  color: #080b12;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.lsq-content-narrow p,
.lsq-section-header p,
.lsq-game-header p,
.lsq-closing-card p {
  margin: 0 0 24px;
  color: #596173;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.78;
}

.lsq-content-narrow p:last-child,
.lsq-section-header p:last-child,
.lsq-game-header p:last-child,
.lsq-closing-card p:last-child {
  margin-bottom: 0;
}

.lsq-opening-lede {
  color: #080b12 !important;
  font-size: clamp(25px, 3.2vw, 38px) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.045em;
  font-weight: 850;
}

.lsq-content-narrow blockquote {
  margin: 30px 0;
  padding: 34px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 10%, rgba(124, 58, 237, 0.11), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(20, 184, 166, 0.05));
  color: #080b12;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 900;
}

/* Game */

.lsq-game-section {
  padding: 56px 24px 72px;
}

.lsq-game-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 42px;
  background:
    radial-gradient(circle at 92% 8%, rgba(37, 99, 235, 0.13), transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(20, 184, 166, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.055), rgba(124, 58, 237, 0.055), rgba(20, 184, 166, 0.055));
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.08);
}

.lsq-game-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  margin-bottom: 34px;
}

.lsq-game-header h2 {
  max-width: 820px;
}

.lsq-game-header p {
  max-width: 760px;
}

.lsq-stage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 15px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}

.lsq-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.lsq-meter-card {
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.045);
}

.lsq-meter-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 12px;
}

.lsq-meter-label span {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
}

.lsq-meter-label strong {
  color: #080b12;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.lsq-meter-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.lsq-meter-fill {
  width: 50%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #14b8a6 100%);
  transition: width 0.55s ease;
}

.lsq-play-area {
  display: grid;
  gap: 18px;
}

.lsq-scenario-card,
.lsq-feedback,
.lsq-result-panel {
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 32px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.055);
}

.lsq-scenario-card {
  background:
    radial-gradient(circle at 94% 10%, rgba(37, 99, 235, 0.08), transparent 32%),
    #ffffff;
}

.lsq-scenario-label,
.lsq-feedback-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lsq-scenario-card h3,
.lsq-feedback h3,
.lsq-result-panel h3 {
  margin: 0 0 14px;
  color: #080b12;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.lsq-scenario-card p,
.lsq-feedback p,
.lsq-result-panel p {
  margin: 0 0 24px;
  color: #596173;
  font-size: 18px;
  line-height: 1.72;
}

.lsq-scenario-card p:last-child,
.lsq-feedback p:last-child,
.lsq-result-panel p:last-child {
  margin-bottom: 0;
}

.lsq-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.lsq-choice-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 26px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.045);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease,
    background 0.22s ease;
}

.lsq-choice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.22);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.085);
}

.lsq-choice-card.is-muted {
  opacity: 0.43;
}

.lsq-choice-card.is-selected {
  opacity: 1;
  border-color: rgba(124, 58, 237, 0.36);
  background:
    radial-gradient(circle at 92% 12%, rgba(124, 58, 237, 0.1), transparent 30%),
    #ffffff;
  box-shadow: 0 22px 58px rgba(124, 58, 237, 0.14);
}

.lsq-choice-card span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.11),
    rgba(124, 58, 237, 0.11),
    rgba(20, 184, 166, 0.11)
  );
  color: #5b21b6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lsq-choice-card h4 {
  margin: 0 0 12px;
  color: #080b12;
  font-size: 22px;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.lsq-choice-card p {
  margin: 0;
  color: #596173;
  font-size: 15px;
  line-height: 1.62;
}

.lsq-feedback {
  background:
    radial-gradient(circle at 92% 12%, rgba(20, 184, 166, 0.1), transparent 30%),
    #ffffff;
}

.lsq-result-panel {
  display: none;
  margin-top: 28px;
  background:
    radial-gradient(circle at 92% 12%, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at 8% 88%, rgba(20, 184, 166, 0.12), transparent 32%),
    #ffffff;
}

.lsq-result-panel.is-visible {
  display: block;
}

.lsq-result-panel h2 {
  margin: 0 0 18px;
  color: #080b12;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.lsq-result-grid {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin: 28px 0;
}

.lsq-result-score {
  display: grid;
  place-items: center;
  min-height: 178px;
  border: 3px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #14b8a6 100%) border-box;
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.18);
  text-align: center;
}

.lsq-result-score strong {
  display: block;
  color: #080b12;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.065em;
}

.lsq-result-score span {
  display: block;
  margin-top: 8px;
  color: #5b21b6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lsq-result-copy {
  padding: 28px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 28px;
  background: #f8fafc;
}

/* Design / related sections */

.lsq-design-section,
.lsq-starter-section,
.lsq-related-section {
  padding: 72px 24px;
}

.lsq-section-header {
  max-width: 820px;
  margin-bottom: 34px;
}

.lsq-design-grid,
.lsq-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lsq-related-grid {
  grid-template-columns: repeat(3, 1fr);
}

.lsq-design-card,
.lsq-related-card,
.lsq-code-card {
  padding: 26px;
  border: 1px solid rgba(15, 23, 42, 0.065);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.045);
}

.lsq-design-card span,
.lsq-related-card span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.11),
    rgba(124, 58, 237, 0.11),
    rgba(20, 184, 166, 0.11)
  );
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lsq-design-card h3,
.lsq-related-card h3 {
  margin: 0 0 12px;
  color: #080b12;
  font-size: 25px;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.lsq-design-card p,
.lsq-related-card p {
  margin: 0;
  color: #596173;
  font-size: 16px;
  line-height: 1.62;
}

.lsq-related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.lsq-related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.085);
}

.lsq-related-card strong {
  margin-top: 24px;
  color: #6d28d9;
  font-size: 15px;
  font-weight: 900;
}

.lsq-related-card strong::after {
  content: " →";
}

.lsq-code-card {
  overflow: hidden;
  background: #0f172a;
}

.lsq-code-card pre {
  margin: 0;
  overflow-x: auto;
}

.lsq-code-card code {
  color: #e5eefc;
  font-size: 14px;
  line-height: 1.72;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Closing */

.lsq-closing-section {
  padding: 72px 24px clamp(88px, 10vw, 132px);
}

.lsq-closing-card {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 42px;
  background:
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.13), transparent 32%),
    radial-gradient(circle at 10% 90%, rgba(20, 184, 166, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.06), rgba(20, 184, 166, 0.06));
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.075);
}

.lsq-closing-card h2 {
  max-width: 840px;
}

.lsq-closing-card p {
  max-width: 820px;
}

/* Responsive */

@media (max-width: 1080px) {
  .lsq-hero-inner {
    grid-template-columns: 1fr;
  }

  .lsq-hero-visual {
    min-height: auto;
    justify-content: start;
  }

  .lsq-system-map-card {
    max-width: 520px;
  }

  .lsq-dashboard,
  .lsq-design-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lsq-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .lsq-hero-section {
    padding-top: 60px;
  }

  .lsq-hero-copy h1 {
    font-size: clamp(48px, 14vw, 72px);
    letter-spacing: -0.065em;
  }

  .lsq-game-header,
  .lsq-dashboard,
  .lsq-choice-grid,
  .lsq-result-grid,
  .lsq-design-grid {
    grid-template-columns: 1fr;
  }

  .lsq-stage-pill {
    width: fit-content;
  }

  .lsq-result-score {
    width: 160px;
    min-height: 160px;
  }

  .lsq-map-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .lsq-hero-section,
  .lsq-opening-section,
  .lsq-game-section,
  .lsq-teaches-section,
  .lsq-design-section,
  .lsq-build-section,
  .lsq-starter-section,
  .lsq-related-section,
  .lsq-closing-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .lsq-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lsq-button {
    width: 100%;
  }

  .lsq-game-shell {
    padding: 22px;
    border-radius: 32px;
  }

  .lsq-scenario-card,
  .lsq-feedback,
  .lsq-result-panel,
  .lsq-choice-card,
  .lsq-design-card,
  .lsq-related-card,
  .lsq-code-card {
    padding: 22px;
    border-radius: 24px;
  }

  .lsq-content-narrow blockquote {
    padding: 24px;
    border-radius: 24px;
  }

  .lsq-closing-card {
    padding: 26px;
    border-radius: 32px;
  }

  .lsq-content-narrow h2,
  .lsq-section-header h2,
  .lsq-game-header h2,
  .lsq-closing-card h2 {
    font-size: 36px;
  }

  .lsq-scenario-card h3,
  .lsq-feedback h3,
  .lsq-result-panel h3 {
    font-size: 31px;
  }
}
