/* A scroll-directed editorial sequence. Without JS, the original four-card grid remains. */
body[data-page="home"] .levels-chapter {
  position: relative;
  z-index: 2;
  background: radial-gradient(ellipse 70% 48% at 50% 55%, #eaf2fc 0%, #fff 73%);
}
body[data-page="home"] .levels-chapter.is-enhanced { height: 410svh; margin-top: -50svh; }
body[data-page="home"] .levels-chapter.is-enhanced .levels-stage {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100% - 64px, 1500px);
  height: 100svh;
  min-height: 650px;
  margin: 0 auto;
  padding: calc(var(--hero-header-height) + 26px) 0 28px;
  overflow: hidden;
}
body[data-page="home"] .levels-chapter.is-enhanced .section-head {
  width: min(100%, 1080px);
  margin: 0 auto;
  text-align: center;
}
body[data-page="home"] .levels-chapter.is-enhanced .section-head .eyebrow { margin-bottom: 11px; }
body[data-page="home"] .levels-chapter.is-enhanced .section-head h2 {
  max-width: none;
  margin: 0;
  color: #0c1d39;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.6rem, 5.4vw, 5.7rem);
  line-height: 1;
  letter-spacing: -.048em;
  text-transform: uppercase;
}
body[data-page="home"] .levels-chapter.is-enhanced .section-head > p:last-child {
  max-width: 600px;
  margin: 13px auto 0;
  color: #5d6e84;
  font-size: .95rem;
  line-height: 1.45;
}
body[data-page="home"] .levels-chapter.is-enhanced .level-grid {
  position: relative;
  display: block;
  min-height: 0;
  width: 100%;
  overflow: visible;
  perspective: 1500px;
  perspective-origin: 50% 46%;
}
body[data-page="home"] .levels-chapter.is-enhanced .level-card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(720px, 63vw);
  height: min(49svh, 465px);
  min-height: 305px;
  padding: clamp(24px, 2.6vw, 36px);
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: clamp(20px, 2.8vw, 42px);
  border: 1px solid rgba(114, 147, 187, .32);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(18, 53, 96, .13), 0 2px 10px rgba(18, 53, 96, .06);
  backface-visibility: hidden;
  will-change: transform, opacity;
  animation: none !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}
body[data-page="home"] .levels-chapter.is-enhanced .level-card:hover {
  border-color: #769ccc;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 27px 78px rgba(18, 53, 96, .17);
}
body[data-page="home"] .levels-chapter.is-enhanced .level-card .card-topline { grid-column: 1 / -1; }
body[data-page="home"] .levels-chapter.is-enhanced .level-card-image {
  grid-column: 1;
  grid-row: 2 / 4;
  align-self: center;
  width: 100%;
  max-height: min(30svh, 280px);
  margin: 0;
  border: 0;
  border-radius: 2px;
  object-fit: contain;
  background: #f3f7fc;
}
body[data-page="home"] .levels-chapter.is-enhanced .level-card h3 {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.1vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -.045em;
}
body[data-page="home"] .levels-chapter.is-enhanced .level-card p {
  grid-column: 2;
  grid-row: 3;
  font-size: clamp(.9rem, 1vw, 1.05rem);
  line-height: 1.5;
}
body[data-page="home"] .levels-chapter.is-enhanced .level-card .card-discover {
  grid-column: 1 / -1;
  grid-row: 4;
  margin-top: 13px;
}
body[data-page="home"] .levels-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 55px;
  padding: 0 clamp(4px, 2vw, 32px);
}
body[data-page="home"] .levels-pagination,
body[data-page="home"] .levels-arrows { display: flex; align-items: center; gap: 7px; }
body[data-page="home"] .levels-pagination button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 7px;
  border: 0;
  background: none;
  color: #6b7c92;
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .14em;
  cursor: pointer;
}
body[data-page="home"] .levels-pagination button::after {
  content: "";
  width: 32px;
  height: 1px;
  background: #bbcce1;
  transition: width .2s, background-color .2s;
}
body[data-page="home"] .levels-pagination button:last-child::after { display: none; }
body[data-page="home"] .levels-pagination button[aria-current="true"] { color: #0b2547; }
body[data-page="home"] .levels-pagination button[aria-current="true"]::after { width: 56px; height: 2px; background: #356aa7; }
body[data-page="home"] .levels-arrows button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #b7c9df;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  color: #0c2b50;
  font-size: 1.15rem;
  cursor: pointer;
}
body[data-page="home"] .levels-arrows button:hover:not(:disabled) { background: #0b2547; color: #fff; }
body[data-page="home"] .levels-arrows button:disabled { opacity: .35; cursor: default; }
body[data-page="home"] .levels-count { min-width: 67px; color: #284f7c; text-align: center; font-size: .7rem; font-weight: 750; letter-spacing: .1em; }
body[data-page="home"] .levels-controls button:focus-visible { outline: 2px solid #315f99; outline-offset: 3px; }
body[data-page="home"] .levels-chapter:not(.is-enhanced) .levels-controls { display: none; }

@media (max-width: 820px) {
  body[data-page="home"] .levels-chapter.is-enhanced { height: 395svh; }
  body[data-page="home"] .levels-chapter.is-enhanced .levels-stage { width: min(100% - 34px, 700px); min-height: 0; padding: calc(var(--hero-header-height) + 22px) 0 18px; }
  body[data-page="home"] .levels-chapter.is-enhanced .section-head h2 { font-size: clamp(2.3rem, 7vw, 4rem); }
  body[data-page="home"] .levels-chapter.is-enhanced .section-head > p:last-child { font-size: .82rem; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card { width: min(570px, 82vw); height: min(52svh, 470px); padding: 24px; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card h3 { font-size: clamp(1.7rem, 4.6vw, 2.8rem); }
}
@media (max-width: 600px) {
  body[data-page="home"] .levels-chapter.is-enhanced { height: 400svh; }
  body[data-page="home"] .levels-chapter.is-enhanced .levels-stage { width: calc(100% - 28px); padding: calc(var(--hero-header-height) + 13px) 0 12px; }
  body[data-page="home"] .levels-chapter.is-enhanced .section-head h2 { font-size: clamp(2rem, 8.8vw, 3.1rem); }
  body[data-page="home"] .levels-chapter.is-enhanced .section-head > p:last-child { display: none; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card {
    display: flex;
    flex-direction: column;
    width: min(100%, 430px);
    height: min(50svh, 440px);
    min-height: 365px;
    padding: 19px;
  }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card-image { width: min(76%, 260px); max-height: 20svh; margin: 8px auto 13px; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card h3 { align-self: stretch; margin: 0 0 7px; font-size: clamp(1.65rem, 7vw, 2.35rem); }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card p { font-size: .86rem; line-height: 1.36; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card .card-discover { margin-top: auto; }
  body[data-page="home"] .levels-pagination button { padding-inline: 4px; }
  body[data-page="home"] .levels-pagination button::after { width: 14px; }
  body[data-page="home"] .levels-pagination button[aria-current="true"]::after { width: 21px; }
  body[data-page="home"] .levels-arrows { gap: 2px; }
  body[data-page="home"] .levels-arrows button { width: 36px; height: 36px; }
  body[data-page="home"] .levels-count { display: none; }
}
@media (max-height: 700px) and (min-width: 821px) {
  body[data-page="home"] .levels-chapter.is-enhanced .levels-stage { padding-top: calc(var(--hero-header-height) + 8px); padding-bottom: 12px; }
  body[data-page="home"] .levels-chapter.is-enhanced .section-head h2 { font-size: clamp(2.4rem, 4.5vw, 4rem); }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card { height: min(51svh, 390px); min-height: 285px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .levels-chapter.is-enhanced { height: auto; }
  body[data-page="home"] .levels-chapter.is-enhanced .levels-stage { position: relative; height: auto; display: block; overflow: visible; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-grid { display: grid; }
  body[data-page="home"] .levels-chapter.is-enhanced .level-card { position: relative; top: auto; left: auto; transform: none !important; opacity: 1 !important; width: auto; height: auto; min-height: 0; }
  body[data-page="home"] .levels-controls { display: none; }
}
