/* SkillQuest integration: scoped to game entry points. */
.cq-game-heading { display: contents; }
.learning-games-page .page-header { margin-bottom: 22px; }
.cq-hub { min-width: 0; }
.cq-hub-intro { max-width: 760px; margin: 0 0 30px; }
.cq-hub-intro h2 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 36px); }
.cq-hub-back { margin: 0 0 18px; font-size: 14px; }
.cq-game-card .course-card__body { gap: 13px; }
.cq-game-card h3, .cq-game-card .course-card__body p { margin: 0; }
.cq-game-card h3 { font-size: 23px; }
.cq-game-card .button, .cq-game-unavailable { margin-top: auto !important; }
.cq-game-card .course-meta { flex-wrap: wrap; }
.cq-hub-note { margin: 22px 0 0; color: var(--csp-muted, var(--muted)); font-size: 14px; }
.cq-hub-category { margin: 36px 0 48px; }
.cq-hub-category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 0 0 13px; margin-bottom: 20px; border-bottom: 2px solid var(--csp-primary, var(--blue)); }
.cq-hub-category-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 30px); }
.cq-hub-category-heading > span { flex-shrink: 0; white-space: nowrap; font-size: 13px; color: var(--csp-muted, var(--muted)); }
.cq-game-card .cq-game-access { font-size: 12px; font-weight: bold; }
.cq-game-card .cq-game-access--available { color: #35611d; }
.cq-game-card .cq-game-access--locked { color: var(--csp-muted, var(--muted)); }
.cq-hub-notice { margin-bottom: 24px; }
.cq-purchase-benefit { margin-top: 24px; padding: 18px; border: 1px solid var(--csp-border, var(--line)); border-top: 3px solid var(--csp-accent, var(--orange)); border-radius: 2px; background: var(--csp-primary-pale, var(--blue-pale)); color: var(--csp-pale-text, var(--ink)); text-align: left; }
.cq-purchase-benefit-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.cq-purchase-benefit-heading h3 { flex: 1; min-width: 0; margin: 0; color: var(--csp-pale-heading, #203348); font-size: 20px; line-height: 1.2; }
.cq-purchase-benefit-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 27px; height: 27px; border: 1px solid var(--csp-border, var(--line)); border-radius: 2px; background: var(--csp-surface, var(--paper)); color: var(--csp-primary-readable, var(--blue-dark)); font-size: 19px; line-height: 1; }
.cq-purchase-benefit p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; }
.cq-purchase-benefit ul { margin: 0 0 14px; padding-left: 19px; list-style: disc; font-size: 14px; line-height: 1.5; }
.cq-purchase-benefit li + li { margin-top: 5px; }
.cq-purchase-benefit .cq-purchase-benefit-note { margin: 0; padding-top: 12px; border-top: 1px solid var(--csp-border, var(--line)); font-size: 12px; line-height: 1.5; }
.cq-course-game-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 24px 0; border-top: 3px solid var(--csp-accent, var(--orange)); }
.cq-course-game-panel h2 { margin: 0 0 8px; font-size: 25px; }
.cq-course-game-panel p { margin: 0; }
.cq-course-game-panel .eyebrow { margin: 0 0 8px; }
.cq-course-game-panel > .button { flex-shrink: 0; }
.main-nav > .nav-learning-games[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 1120px) {
  .main-nav > a.nav-learning-games { display: flex; align-items: center; min-height: 44px; }
}
@media (max-width: 720px) {
  .cq-course-game-panel { flex-direction: column; align-items: stretch; gap: 18px; }
  .cq-course-game-panel > .button { text-align: center; }
  .cq-hub-back a { display: inline-block; padding: 8px 0; }
}

/* The library is a complete component: do not depend on a theme using the same
   flex/grid model for its ordinary course cards. These rules never affect them. */
.cq-hub{width:100%;max-width:none;--sq-card-radius:3px}
.cq-hub[data-sq-theme="2020"]{--sq-card-radius:16px}
.cq-hub[data-sq-theme="2026"]{--sq-card-radius:20px}
.cq-hub[data-sq-theme="x"]{--sq-card-radius:16px}
.cq-hub .cq-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch}
.cq-hub .cq-game-card{display:flex;flex-direction:column;min-width:0;height:100%;overflow:hidden;border:1px solid var(--cq-line,var(--line,#cdd8df));border-radius:var(--sq-card-radius)}
.cq-hub .cq-game-card .course-card__body{display:flex;flex:1;flex-direction:column;align-items:stretch;min-width:0;gap:12px;padding:clamp(18px,2vw,26px)}
.cq-hub .cq-game-card .course-card__body>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
.cq-hub .cq-game-card .course-card__image{position:relative;display:block;width:100%;aspect-ratio:1.6;overflow:hidden;border-radius:0}
.cq-hub .cq-game-card .course-card__image img{display:block;width:100%;height:100%;max-width:100%;object-fit:cover}
.cq-hub .cq-game-card .course-card__body>.button{min-height:44px;width:100%;white-space:normal;text-align:center}
.cq-hub .cq-hub-category-heading h2{min-width:0;overflow-wrap:anywhere}
.cq-course-game-panel>div{min-width:0;overflow-wrap:anywhere}
.cq-course-game-panel>.button{min-height:44px;white-space:normal;text-align:center;max-width:100%}
.cq-purchase-benefit{min-width:0;overflow-wrap:anywhere}
.cq-root:not([data-cq-enhanced])>.cq-loading{display:none}
.cq-root noscript .cq-hub-notice{margin:0;padding:24px;border:1px solid #a6b6c1;background:#f8fafc;color:#172b3b}
.cq-root noscript .cq-hub-notice p{margin:0 0 12px;color:inherit}
.cq-root noscript .cq-hub-notice a{display:inline-flex;align-items:center;min-height:44px;color:#164e71;text-decoration:underline;text-underline-offset:3px}
@media(max-width:1024px){.cq-hub .cq-game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}}
@media(max-width:720px){.cq-hub .cq-game-grid{grid-template-columns:minmax(0,1fr);gap:22px}.cq-hub .cq-hub-category-heading{gap:12px;align-items:center}.cq-hub .cq-hub-category{margin-block:30px 38px}.cq-course-game-panel>.button{width:100%}}
@media(prefers-reduced-motion:reduce){.cq-hub *,.cq-course-game-panel *,.cq-purchase-benefit *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Editorial and mint editions: frame the library with real gutters instead of
   painting an unpadded white slab over the theme's warm/mint page background. */
.skillquest-page > .container > .page-header:is([data-sq-theme="2020"],[data-sq-theme="2026"]) h1 {
  color: var(--cq-page-heading) !important;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) {
  box-sizing: border-box;
  padding: clamp(18px, 3vw, 38px);
  border: 1px solid var(--cq-line);
  border-radius: 22px;
  background: var(--cq-paper);
  color: var(--cq-ink);
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro {
  max-width: none;
  margin: 0 0 clamp(28px, 3vw, 40px);
  padding: clamp(18px, 2.5vw, 32px);
  border: 1px solid var(--cq-line);
  border-radius: 14px;
  background: var(--cq-pale);
  color: var(--cq-pale-text);
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro > * {
  max-width: 72ch;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro h2 {
  margin: 0 0 16px;
  color: var(--cq-pale-heading);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro p {
  color: var(--cq-pale-text);
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro .eyebrow {
  width: fit-content;
  margin: 0 0 16px;
  color: var(--cq-pale-link);
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro > :last-child {
  margin-bottom: 0;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-category {
  margin-block: 0 clamp(32px, 4vw, 48px);
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-category-heading {
  padding-bottom: 16px;
  margin-bottom: 22px;
}
/* Keep the actual player wide on phones: a separate padded heading panel,
   followed by the already padded player, rather than two nested player frames. */
.cq-hub.cq-hub--game:is([data-sq-theme="2020"],[data-sq-theme="2026"]) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-game-heading {
  display: block;
  padding: clamp(20px, 3vw, 36px);
  margin-bottom: 24px;
  border: 1px solid var(--cq-line);
  border-radius: 18px;
  background: var(--cq-pale);
  color: var(--cq-pale-text);
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-game-heading h2 {
  margin: 0;
  color: var(--cq-pale-heading);
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-game-heading .cq-hub-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 16px;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-game-heading .cq-hub-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 4px;
  color: var(--cq-pale-link);
  text-underline-offset: 3px;
}
.cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-game-heading a:focus-visible {
  outline-color: var(--cq-pale-link);
  box-shadow: 0 0 0 2px var(--cq-pale);
}
@media (max-width: 480px) {
  .cq-hub.cq-hub--library:is([data-sq-theme="2020"],[data-sq-theme="2026"]) { padding: 16px; border-radius: 18px; }
  .cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-hub-intro { padding: 18px 16px; }
  .cq-hub:is([data-sq-theme="2020"],[data-sq-theme="2026"]) .cq-game-heading { padding: 20px; margin-bottom: 20px; }
}
