/* ==========================================================================
   Zenalix Comprehensive Multi-Device Responsive System
   Supports: Mobile (320px–600px), Tablet (601px–1000px), Laptop (1001px–1600px),
   and Large Desktop / 4K TV screens (1601px–3840px+)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base Fluid Resets & Safe Viewport Bounds
   -------------------------------------------------------------------------- */
main, section, .scene-sticky {
  min-width: 0;
  max-width: 100%;
}
.chapter-label {
  line-height: 1.5;
}
.chapter-label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.voice-bottom, .closing-actions, .footer-info, .footer-bottom {
  flex-wrap: wrap;
}
.audio-button, .quiet-button, .early-link, .reference-button, .sign-in, .large-cta {
  min-height: 44px;
  touch-action: manipulation;
}
.closing-actions a {
  max-width: 100%;
  text-align: center;
}
.scene-sticky {
  max-height: none;
}
.story-ready .scene-sticky {
  overflow: visible;
}
.story-ready .scene-hold {
  overflow: hidden;
}
.reference-copy h1 em {
  max-width: 100%;
}
.reference-stage {
  overflow: hidden !important;
}
.board-workspace {
  display: contents;
}
.brand-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: clamp(130px, 11vw, 175px);
  height: auto;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
}
.mobile-only-logo {
  display: none;
}

@media (min-width: 769px) {
  .reference-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center top !important;
  }
  .brand-logo {
    display: block !important;
    opacity: 0 !important;
    width: clamp(140px, 11.5vw, 190px);
    height: 50px;
  }
  .mobile-only-logo {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   2. Reference-Led Path Selection (JEE & NEET)
   -------------------------------------------------------------------------- */
.path-selector, .story-ready .path-selector {
  --path-blue: #0752ff;
  display: flex;
  flex-direction: column;
  position: relative;
  height: auto !important;
  min-height: max(860px, 100svh);
  max-height: none;
  padding: 65px 7.7% 48px;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 38%, #f8fcff 0%, #e4f0ff 39%, #c9dfff 76%, #eef6ff 100%);
}
.path-selector::before, .path-selector::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 130%;
  height: 65%;
  border: 2px solid #ffffff4d;
  border-radius: 50%;
  transform: rotate(-17deg);
  pointer-events: none;
}
.path-selector::before {
  left: -35%;
  top: -44%;
  background: #ffffff1f;
}
.path-selector::after {
  right: -55%;
  bottom: -35%;
  background: #ffffff30;
}
.path-selector .goals-intro {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}
.path-selector .goals-intro .overline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  letter-spacing: 3px;
  color: #748fbc;
  line-height: 1.6;
}
.path-selector .goals-intro .overline::before, .path-selector .goals-intro .overline::after {
  content: '';
  width: 40px;
  height: 1px;
  background: #6794ff;
}
.path-selector .goals-intro h2 {
  font: 550 clamp(40px, 4.3vw, 72px)/1.05 var(--body);
  color: #050d39;
  letter-spacing: -2.8px;
  margin: 24px 0 15px;
}
.path-selector .goals-intro h2 em {
  font: italic 400 clamp(46px, 4.9vw, 82px)/1 Georgia, serif;
  letter-spacing: -2.4px;
  color: var(--path-blue);
}
.path-selector .goals-intro > p:last-child {
  max-width: none;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.45;
  color: #5e7aa8;
}
.path-selector .goal-pathways {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, 13.5vw) minmax(0, 1fr);
  gap: 0;
  margin-top: 30px;
  align-items: center;
  z-index: 3;
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}
.path-selector .goal-path {
  min-width: 0;
  padding: 28px 28px 30px;
  border: 2px solid #ffffffe8;
  border-radius: 38px;
  background: linear-gradient(145deg, #ffffff61, #bfd9ff40 55%, #ffffff75);
  box-shadow: inset 0 0 20px #ffffff80, 0 0 25px #fff7, 0 15px 50px #709be51f;
  backdrop-filter: blur(12px);
}
.path-heading {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 56px;
  gap: 18px;
  align-items: center;
  min-width: 0;
}
.path-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1.5px solid white;
  border-radius: 23px;
  background: linear-gradient(135deg, #fff, #e7f2ff);
  box-shadow: 0 5px 20px #fff8;
  color: var(--path-blue);
}
.path-icon svg {
  width: 49px;
  height: 49px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.path-selector .goal-path h3 {
  font: 600 clamp(40px, 3.9vw, 66px)/1.05 var(--body);
  letter-spacing: -2px;
  color: var(--path-blue);
  margin: 0 0 5px;
}
.path-selector .goal-name {
  font-size: clamp(14px, 1.16vw, 19px);
  line-height: 1.4;
  max-width: none;
  min-height: 0;
  color: #4c70aa;
}
.goal-name strong {
  color: #0050ff;
  font-weight: 600;
}
.path-arrow {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--path-blue);
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 -2px 7px #6f9df044;
  transition: background .2s, color .2s;
}
.path-arrow:hover {
  background: #0752ff;
  color: white;
}
.path-selector .goal-path ul {
  list-style: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  color: #355f9f;
}
.path-selector .goal-path .path-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 20px 0 16px;
  padding: 16px 0;
  border-top: 1px solid #ffffffb3;
  border-bottom: 1px solid #ffffffb3;
}
.path-subjects li {
  padding: 6px 18px;
  border: 1.5px solid #ffffffe8;
  border-radius: 50px;
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(135deg, #ffffff99, #eaf3ff40);
  box-shadow: inset 1px 1px 5px #fffc;
}
.path-selector .goal-path .path-outcomes {
  display: grid;
  gap: 8px;
  font-size: clamp(15px, 1.16vw, 19px);
  line-height: 1.5;
}
.path-outcomes li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.path-outcomes li::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: #0552ff;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  line-height: 1;
  margin-top: 3px;
}
.path-selector .goal-or {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  justify-self: center;
  align-self: center;
  border: 2px solid white;
  border-radius: 50%;
  background: #f3f9ffae;
  color: var(--path-blue);
  font: italic 40px Georgia;
  box-shadow: inset 0 0 14px white, 0 0 20px #fffa;
  isolation: isolate;
}
.path-selector .goal-or::before, .path-selector .goal-or::after {
  content: '';
  position: absolute;
  left: 50%;
  height: 65px;
  width: 1px;
  background: #91b6ff;
  z-index: -1;
}
.path-selector .goal-or::before {
  bottom: calc(100% + 2px);
}
.path-selector .goal-or::after {
  top: calc(100% + 2px);
}
.path-benefit {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 2px solid #ffffffdf;
  border-radius: 90px;
  background: linear-gradient(130deg, #ffffff94, #e4f0ff55);
  box-shadow: inset 0 0 16px #fffc, 0 0 20px #ffffffad;
  font-size: 16px;
  line-height: 1.35;
  color: #102855;
}
.path-benefit svg {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  fill: none;
  stroke: #0752ff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.benefit-concepts { left: 5.5%; top: 17%; transform: rotate(-18deg); }
.benefit-practice { right: 5%; top: 17%; transform: rotate(19deg); }
.benefit-progress { left: 5.5%; bottom: 14%; transform: rotate(18deg); }
.benefit-potential { right: 5%; bottom: 14%; transform: rotate(-18deg); }

.path-orbits {
  position: absolute;
  inset: 20% 2% 17%;
  z-index: -1;
  pointer-events: none;
}
.path-orbits span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36%;
  border: 2px solid #ffffffc9;
  border-radius: 50%;
}
.path-orbits span:first-child { left: 0; transform: rotate(-14deg); }
.path-orbits span:last-child { right: 0; transform: rotate(14deg); }

.path-footnote {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: auto;
  padding-top: 150px;
  color: #7893bb;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 3px;
  text-align: center;
}
.path-footnote::before, .path-footnote::after {
  content: '';
  width: 140px;
  max-width: 16vw;
  height: 1px;
  background: #76a0ff;
}

/* --------------------------------------------------------------------------
   3. Large Displays, Ultra-Wide & 4K TV Screens (min-width: 1601px)
   -------------------------------------------------------------------------- */
@media (min-width: 1601px) {
  .reference-copy {
    max-width: 1100px;
    left: 50%;
    transform: translateX(-50%);
  }
  .reference-header {
    max-width: 1600px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 10%);
  }
  .voice-stage:has(.voice-photo) .voice-copy,
  .voice-stage:has(.voice-photo) .voice-conversation {
    max-width: 800px;
  }
  .question-narrative,
  .memory-narrative,
  .mastery-heading,
  .board-copy,
  .lab-copy,
  .titration-copy,
  .planner-intro {
    max-width: 850px;
  }
  .mastery-journey,
  .week-flow,
  .closing footer {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
  .large-cta {
    font-size: 18px;
    padding: 22px 36px;
  }
}

@media (min-width: 2200px) {
  body {
    font-size: 19px;
  }
  .reference-header nav {
    font-size: 20px;
  }
  .reference-copy h1 {
    font-size: 88px;
  }
  .reference-copy h1 em {
    font-size: 96px;
  }
  .reference-copy > p {
    font-size: 28px;
  }
  .path-selector .goals-intro h2 {
    font-size: 78px;
  }
  .path-selector .goals-intro h2 em {
    font-size: 88px;
  }
  .path-selector .goal-path h3 {
    font-size: 72px;
  }
  .path-selector .goal-name {
    font-size: 22px;
  }
  .path-subjects li {
    font-size: 18px;
    padding: 8px 24px;
  }
  .path-outcomes {
    font-size: 21px;
  }
  .path-benefit {
    font-size: 19px;
    padding: 22px 30px;
  }
  .path-benefit svg {
    width: 44px;
    height: 44px;
  }
  .voice-stage:has(.voice-photo) .voice-copy h2 {
    font-size: 84px;
  }
  .voice-stage:has(.voice-photo) .voice-line {
    font-size: 44px;
  }
  .mastery-heading h2,
  .board-copy h2,
  .lab-copy h2,
  .titration-copy h2,
  .planner-intro h2,
  .closing h2 {
    font-size: 76px;
  }
}

/* --------------------------------------------------------------------------
   4. Laptops & Shorter Desktop Displays (min-width: 1001px)
   -------------------------------------------------------------------------- */
@media (min-width: 1001px) and (max-height: 780px) {
  .path-selector, .story-ready .path-selector {
    min-height: 850px;
    padding-top: 45px;
  }
  .story-ready .voice-stage { min-height: 780px; }
  .story-ready .memory-stage { min-height: 780px; }
  .story-ready .lab-stage { min-height: 820px; }
  .story-ready .titration-stage { min-height: 780px; }
  .story-ready .planner-stage { min-height: 1000px; }
  .story-ready .mastery-stage { min-height: 930px; }
  .story-ready .board-stage { min-height: 830px; }
}

@media (min-width: 1001px) and (max-width: 1300px) {
  .path-selector {
    padding-left: 5%;
    padding-right: 5%;
  }
  .path-selector .goal-pathways {
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  }
  .path-selector .goal-path {
    padding: 24px 22px;
  }
  .path-heading {
    grid-template-columns: 60px minmax(0, 1fr) 46px;
    gap: 12px;
  }
  .path-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }
  .path-icon svg {
    width: 38px;
    height: 38px;
  }
  .path-arrow {
    width: 46px;
    height: 46px;
    font-size: 28px;
  }
  .path-subjects li {
    font-size: 14px;
    padding: 5px 13px;
  }
  .path-benefit {
    font-size: 14px;
    padding: 15px 18px;
    gap: 12px;
  }
  .benefit-concepts, .benefit-practice {
    top: 15%;
  }
  .mastery-heading {
    gap: 25px;
  }
  .mastery-heading h2 {
    font-size: 48px;
  }
  .mastery-heading p {
    font-size: 15px;
    max-width: 300px;
  }
  .planner-intro > p {
    max-width: 280px;
    font-size: 14px;
  }
  .study-block h3 {
    font-size: 17px;
  }
  .study-block p {
    font-size: 12px;
  }
}

/* --------------------------------------------------------------------------
   5. Tablet Displays (max-width: 1000px)
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  h2 {
    font-size: clamp(34px, 5.4vw, 52px);
    letter-spacing: -1.8px;
  }
  h2 em {
    letter-spacing: -1.5px;
  }
  .story-ready .scene-sticky:not(.reference-stage):not(.question-stage):not(.memory-stage):not(.closing-stage) {
    height: auto;
    min-height: 100svh;
  }
  .chapter-label {
    top: 26px;
    left: 6%;
    right: 6%;
    gap: 18px;
    font-size: 11px;
    letter-spacing: 1px;
  }
  .chapter-label > span:first-child {
    max-width: 48%;
  }
  .chapter-label > span:last-child {
    max-width: 48%;
    text-align: right;
  }

  /* Goals Pathway Reflow */
  .path-selector, .story-ready .path-selector {
    padding: 65px 6% 40px;
    min-height: max(1150px, 100svh) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 18px 12px;
  }
  .path-selector .goals-intro,
  .path-selector .goal-pathways,
  .path-footnote {
    grid-column: 1 / -1;
  }
  .goals-intro { order: 0; }
  .benefit-concepts { order: 1; }
  .benefit-practice { order: 2; }
  .goal-pathways { order: 3; }
  .benefit-progress { order: 4; }
  .benefit-potential { order: 5; }
  .path-footnote { order: 6; }

  .path-selector .goals-intro h2 {
    font-size: clamp(38px, 6.2vw, 58px);
    letter-spacing: -1.8px;
    margin-top: 24px;
  }
  .path-selector .goals-intro h2 br {
    display: block;
  }
  .path-selector .goals-intro h2 em {
    font-size: clamp(48px, 7vw, 66px);
    margin: 0;
  }
  .path-selector .goals-intro > p:last-child {
    font-size: 18px;
    margin-top: 18px;
  }
  .path-selector .goals-intro .overline {
    font-size: 11px;
    letter-spacing: 2px;
    gap: 12px;
  }
  .path-selector .goal-pathways {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 610px);
    margin: 30px auto 0;
    gap: 22px;
  }
  .path-selector .goal-path {
    padding: 25px 28px;
    border-radius: 30px;
  }
  .path-selector .goal-path h3 {
    font-size: 53px;
  }
  .path-selector .goal-name {
    font-size: 17px;
  }
  .path-heading {
    grid-template-columns: 70px minmax(0, 1fr) 52px;
    gap: 18px;
  }
  .path-icon {
    width: 70px;
    height: 70px;
  }
  .path-arrow {
    width: 52px;
    height: 52px;
  }
  .path-selector .goal-or {
    width: 54px;
    height: 54px;
    font-size: 30px;
  }
  .path-selector .goal-or::before, .path-selector .goal-or::after {
    height: 1px;
    width: 70px;
    top: 50%;
    bottom: auto;
  }
  .path-selector .goal-or::before {
    left: auto;
    right: calc(100% + 15px);
  }
  .path-selector .goal-or::after {
    left: calc(100% + 15px);
  }
  .path-selector .goal-path .path-subjects {
    gap: 10px;
    padding: 14px 0;
    margin: 18px 0;
  }
  .path-subjects li {
    font-size: 15px;
    padding: 5px 17px;
  }
  .path-selector .goal-path .path-outcomes {
    font-size: 16px;
    gap: 9px;
  }
  .path-benefit {
    position: relative;
    inset: auto !important;
    transform: none !important;
    width: fit-content;
    font-size: 14px;
    gap: 10px;
    padding: 10px 16px;
    box-shadow: inset 0 0 10px #fffc;
    min-width: 0;
    justify-self: center;
  }
  .path-benefit svg {
    width: 29px;
    height: 29px;
  }
  .path-benefit br {
    display: none;
  }
  .path-benefit span {
    max-width: none;
  }
  .path-footnote {
    margin: 0;
    padding-top: 22px;
    gap: 14px;
    font-size: 11px;
    letter-spacing: 2px;
  }
  .path-orbits {
    inset: 20% -30% 10%;
  }
  .path-orbits span {
    width: 75%;
  }

  /* Voice Stage */
  .voice-stage {
    display: flex;
    flex-direction: column;
    padding: 110px 6% 40px;
    gap: 40px;
    isolation: isolate;
  }
  .voice-stage:has(.voice-photo) .voice-copy {
    position: relative;
    inset: auto;
    padding: 0;
    width: 100%;
    max-width: 670px;
    text-align: left;
  }
  .voice-stage:has(.voice-photo) .voice-copy h2 {
    font-size: clamp(38px, 5.9vw, 60px);
    line-height: 1.12;
    letter-spacing: -2px;
  }
  .voice-copy > p {
    font-size: 16px;
    margin-top: 22px;
    max-width: 590px;
    line-height: 1.75;
  }
  .voice-copy > p br {
    display: none;
  }
  .voice-stage:has(.voice-photo) .voice-conversation {
    position: relative;
    inset: auto;
    min-height: 155px;
    height: auto;
    width: 100%;
    margin: 0;
    text-align: left;
  }
  .voice-stage:has(.voice-photo) .voice-line {
    font-size: clamp(24px, 3.5vw, 34px);
    line-height: 1.5;
  }
  .voice-bottom {
    position: relative;
    inset: auto;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 25px;
  }
  .voice-bottom p, .audio-button {
    font-size: 14px;
  }
  .languages {
    font-size: 14px;
    line-height: 1.9;
  }
  .audio-button {
    margin: 0;
  }
  .voice-canvas {
    top: 39%;
    height: 36%;
    z-index: 0;
    pointer-events: none;
  }
  .voice-photo {
    opacity: .76;
    object-position: 76% center;
  }
  .voice-photo-wash {
    background: linear-gradient(100deg, #1641cfee, #1641cf99), linear-gradient(0deg, #1641cf, #1641cf00);
  }
  .audio-status {
    position: relative;
    inset: auto;
    font-size: 12px;
    text-align: left;
    min-height: 18px;
    margin-top: -28px;
    z-index: 4;
  }

  /* Question Stage */
  .question-stage, .story-ready .question-stage {
    min-height: max(820px, 100svh);
    height: auto;
    background: #deedfc;
  }
  .question-visual {
    inset: 95px 0 auto;
    height: min(58vw, 420px);
  }
  .question-photo {
    object-fit: cover;
    object-position: center top;
  }
  .question-narrative {
    left: 6%;
    top: calc(min(58vw, 420px) + 130px);
    width: 88%;
  }
  .question-beat h2 {
    font-size: clamp(34px, 4.5vw, 46px);
    letter-spacing: -1.5px;
  }
  .question-beat .overline {
    font-size: 11px;
  }
  .question-beat > p:last-child {
    font-size: 16px;
    max-width: 540px;
    line-height: 1.6;
  }
  .question-listening {
    font-size: 13px;
    left: 6%;
    bottom: 35px;
  }

  /* Mastery Stage */
  .mastery-stage {
    padding: 110px 6% 35px;
    display: flex;
    flex-direction: column;
    gap: 35px;
  }
  .mastery-heading {
    padding: 0;
    display: block;
  }
  .mastery-heading h2 {
    font-size: clamp(38px, 5.6vw, 56px);
  }
  .mastery-heading p {
    font-size: 16px;
    max-width: 650px;
    line-height: 1.75;
    margin-top: 25px;
  }
  .mastery-journey {
    position: relative;
    inset: auto;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 35px;
    padding: 10px 0 25px;
  }
  .journey-line {
    display: none;
  }
  .level {
    transform: none;
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 6px 14px;
    align-self: start;
  }
  .level-number {
    font-size: 42px;
    grid-row: 1 / 4;
    letter-spacing: -2px;
  }
  .level-dot {
    display: none;
  }
  .level .overline {
    font-size: 10px;
    grid-column: 2;
    letter-spacing: .6px;
  }
  .level h3 {
    font-size: 20px;
    grid-column: 2;
    line-height: 1.3;
    margin: 0;
  }
  .level p {
    font-size: 15px;
    grid-column: 2;
    line-height: 1.65;
    margin: 0;
  }
  .level p br {
    display: none;
  }
  .mastery-bottom {
    position: relative;
    inset: auto;
    margin-top: auto;
    display: block;
    padding-top: 20px;
  }
  .mastery-bottom span {
    font-size: 10px;
  }
  .mastery-bottom p {
    font-size: 14px;
    margin-top: 8px;
  }

  /* Interactive Board */
  .board-stage {
    padding: 110px 6% 85px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .board-copy {
    position: relative;
    inset: auto;
    display: block;
  }
  .board-copy h2 {
    font-size: clamp(38px, 5.4vw, 54px);
  }
  .board-copy h2 br {
    display: none;
  }
  .board-copy > p {
    font-size: 16px;
    max-width: 650px;
    line-height: 1.75;
    margin-top: 22px;
  }
  .board-copy .board-detail {
    font-size: 15px;
    margin-top: 18px;
  }
  .board-workspace {
    display: block;
    position: relative;
    width: 100%;
    max-width: 624px;
    align-self: center;
  }
  .circle-diagram {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 800 / 680;
    margin: 0;
    max-height: none;
  }
  .draw-surface {
    inset: 0;
  }
  .board-invitation {
    position: relative;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    font-size: 12px;
  }
  .board-invitation small {
    font-size: 11px;
  }
  .board-caption {
    left: 6%;
    right: 6%;
    bottom: 30px;
    font-size: 10px;
  }

  /* Physics Lab */
  .lab-stage {
    min-height: 1000px !important;
    display: flex;
    flex-direction: column;
    padding: 110px 6% 35px;
    gap: 24px;
  }
  .lab-copy {
    padding: 0;
    position: relative;
    inset: auto;
  }
  .lab-copy h2 {
    font-size: clamp(38px, 5.5vw, 56px);
  }
  .lab-copy > .overline {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .lab-copy p:last-child {
    position: relative;
    inset: auto;
    font-size: 16px;
    max-width: none;
    line-height: 1.75;
    margin-top: 24px;
  }
  .lab-stage canvas {
    position: relative;
    inset: auto;
    height: 340px;
    width: 100%;
    margin-top: 40px;
  }
  .lab-measure {
    top: auto;
    bottom: 37%;
    z-index: 3;
  }
  .measure-inlet { left: 10%; }
  .measure-throat { left: 64%; }
  .lab-measure > span { font-size: 10px; }
  .lab-measure strong { font-size: 25px; }
  .lab-measure small { font-size: 12px; }
  .lab-bottom {
    position: relative;
    inset: auto;
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
  }
  .lab-caption { font-size: 10px; }
  .lab-bottom p { font-size: 17px; max-width: 420px; }
  .lab-bottom p > span { font-size: 14px; line-height: 1.65; }
  .lab-equation { font-size: 25px; margin: 0; }
  .lab-equation small { font-size: 10px; line-height: 1.6; }
  .lab-scope { display: none; }

  /* Chemistry Titration */
  .titration-stage {
    padding: 110px 6% 50px;
    min-height: 950px !important;
    display: flex;
    flex-direction: column;
  }
  .titration-copy {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 650px;
  }
  .titration-copy h2 {
    font-size: clamp(38px, 5.4vw, 56px);
  }
  .titration-copy .overline {
    font-size: 11px;
    margin-bottom: 22px;
  }
  .titration-copy > p:last-child {
    font-size: 16px;
    line-height: 1.75;
    max-width: 520px;
    margin-top: 25px;
  }
  .titration-photo {
    width: 155%;
    left: -55%;
    object-position: 75% center;
  }
  .titration-wash {
    background: linear-gradient(180deg, #eff7ff 0%, #eff7fff5 35%, #eff7ff22 70%, #eff7ffe8 100%);
  }
  .titration-caption {
    position: relative;
    inset: auto;
    margin-top: auto;
    padding-top: 320px;
    display: block;
  }
  .titration-caption > p { font-size: 25px; max-width: none; }
  .titration-caption > span { font-size: 10px; display: block; margin-top: 18px; }

  /* Study Planner */
  .planner-stage {
    padding: 110px 6% 35px;
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  .planner-intro {
    padding: 0;
    display: block;
  }
  .planner-intro h2 {
    font-size: clamp(38px, 5.3vw, 54px);
  }
  .planner-intro > p {
    position: relative;
    inset: auto;
    font-size: 16px;
    line-height: 1.75;
    margin-top: 25px;
    max-width: 670px;
  }
  .planner-intro > p br { display: none; }
  .planner-story {
    margin: 0;
    max-width: none;
    gap: 12px;
    align-items: start;
  }
  .planner-story > p {
    font-size: 16px;
    line-height: 1.65;
  }
  .quote-mark { font-size: 35px; }
  .planner-story > span:last-child { display: none; }
  .week-flow {
    position: relative;
    inset: auto;
    display: block;
  }
  .week-day {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr);
    border-top: 1px solid #cad8f0;
  }
  .day-name {
    display: block;
    font-size: 12px;
    padding: 22px 0;
  }
  .day-name b { display: none; }
  .study-block {
    height: auto;
    min-height: 90px;
    border-left: 0;
    padding: 15px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 5px 18px;
    align-content: center;
  }
  .study-block > span {
    font-size: 11px;
    grid-column: 1;
    letter-spacing: .5px;
  }
  .study-block h3 {
    font-size: 18px;
    grid-column: 1;
    line-height: 1.35;
    letter-spacing: -.4px;
    margin: 0;
  }
  .study-block h3 br { display: none; }
  .study-block p {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
  }
  .day-off h3 { font-size: 20px; }
  .planner-foot {
    position: relative;
    inset: auto;
    display: block;
    margin-top: auto;
    padding-top: 20px;
  }
  .planner-foot > span { font-size: 11px; }
  .planner-foot p { font-size: 14px; line-height: 1.65; margin-top: 8px; }
  .planner-photo-caption {
    font-size: clamp(30px, 5vw, 44px);
    max-width: 75%;
    bottom: 16%;
  }

  /* Closing Stage */
  .story-ready .closing-stage {
    height: auto;
    min-height: 100svh;
    padding: 30px 6%;
    display: flex;
    flex-direction: column;
  }
  .closing-top { font-size: 10px; gap: 20px; }
  .closing-prelude { font-size: 16px; line-height: 1.75; margin-top: 65px; }
  .closing h2, .closing h2 em {
    font-size: clamp(38px, 5.6vw, 58px);
    letter-spacing: -2px;
    line-height: 1.15;
  }
  .closing-actions { gap: 22px; margin-top: 32px; }
  .large-cta { font-size: 15px; gap: 20px; padding: 16px 25px; white-space: normal; }
  .early-link { font-size: 15px; }
  .closing-note { font-size: 13px; margin-top: 22px; }
  .closing footer { margin-top: auto; padding-top: 70px; }
  .footer-info { gap: 20px; }
  .footer-info > a:not(.wordmark) { font-size: 14px; }
  .footer-bottom { font-size: 11px; gap: 12px; line-height: 1.7; }
  .footer-info > span { display: none; }
}

/* Mid Tablet & Tablet Landscape (761px to 1000px) */
@media (min-width: 761px) and (max-width: 1000px) {
  .reference-stage, .story-ready .reference-stage {
    height: max(900px, 100svh);
    min-height: 900px;
    background: linear-gradient(150deg, #c1dcfa, #edf4fc 55%, #c7ddf8);
  }
  .reference-background {
    inset: auto 0 0;
    height: auto;
    object-fit: contain;
    object-position: center bottom;
  }
  .reference-header {
    top: 28px;
    left: 6%;
    right: 6%;
    display: flex;
    justify-content: space-between;
  }
  .reference-header .brand-logo { display: inline-flex !important; width: 130px; }
  .reference-header nav { gap: 22px; font-size: 15px; }
  .reference-actions .reference-button { font-size: 14px; padding: 12px 20px; }
  .reference-eyebrow { left: 10%; right: 10%; top: 13%; font-size: 11px; }
  .reference-copy { top: 20%; left: 8%; width: 84%; }
  .reference-copy h1 { font-size: 55px; }
  .reference-copy h1 em { font-size: 59px; letter-spacing: -2px; }
  .reference-copy > p { font-size: 20px; }
  .reference-scroll { bottom: 0; height: 48px; }
}

/* --------------------------------------------------------------------------
   6. Mobile & Small Screen Refinements (max-width: 768px & max-width: 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Fix 1: Hero Section in Mobile View
     Background fills the full screen gracefully with integrated contrast wash,
     eliminating the disjointed bottom squish. */
  .reference-opening,
  .reference-stage,
  .story-ready .reference-stage {
    height: max(720px, 100svh);
    min-height: max(720px, 100svh);
    background: #d9e8fb;
    position: relative;
  }
  .reference-background {
    position: absolute;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 55% 65% !important;
    opacity: 0.95;
  }
  .reference-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(224, 238, 255, 0.92) 0%, rgba(224, 238, 255, 0.65) 42%, rgba(224, 238, 255, 0.18) 75%, transparent 100%);
    z-index: 2;
    pointer-events: none;
  }
  .reference-header {
    top: 18px !important;
    left: 5% !important;
    right: 5% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    z-index: 8;
  }
  .reference-header .brand-logo {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    opacity: 1 !important;
    width: clamp(120px, 34vw, 145px) !important;
    height: auto !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    background: transparent !important;
    mix-blend-mode: normal !important;
    flex-shrink: 0 !important;
  }
  .reference-header .mobile-only-logo {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    background: transparent !important;
    mix-blend-mode: normal !important;
    object-fit: contain !important;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.6)) !important;
  }
  .reference-header nav {
    display: none !important;
  }
  .reference-actions {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .reference-actions .sign-in {
    font-size: 13px !important;
    color: #17387a !important;
    padding: 6px 0 !important;
    font-weight: 550;
  }
  .reference-actions .reference-button {
    padding: 9px 18px !important;
    font-size: 13px !important;
    gap: 8px !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 14px rgba(0, 76, 255, 0.25) !important;
  }
  .reference-actions .reference-button span {
    font-size: 18px !important;
  }
  .reference-eyebrow {
    top: 16% !important;
    left: 5% !important;
    right: 5% !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.6px !important;
    color: #2b498f !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 4;
  }
  .reference-eyebrow::before, .reference-eyebrow::after {
    content: '';
    width: 22px !important;
    height: 1px !important;
    background: #0754ff !important;
  }
  .reference-copy {
    top: 22% !important;
    left: 5% !important;
    right: 5% !important;
    width: 90% !important;
    margin: 0 auto !important;
    text-align: center !important;
    z-index: 4;
  }
  .reference-copy h1 {
    font: 600 clamp(32px, 8.4vw, 46px)/1.08 var(--body) !important;
    letter-spacing: -1.8px !important;
    color: #07092c !important;
    margin: 0 !important;
  }
  .reference-copy h1 em {
    font: italic 400 clamp(36px, 9.4vw, 52px)/1.12 Georgia, serif !important;
    letter-spacing: -1.5px !important;
    color: #004cff !important;
    display: block !important;
    margin-top: 4px !important;
  }
  .reference-copy > p {
    font-size: clamp(14px, 3.8vw, 17px) !important;
    line-height: 1.45 !important;
    color: #3b5382 !important;
    margin-top: 14px !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .reference-copy > .reference-button {
    margin-top: 22px !important;
    padding: 13px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    box-shadow: 0 6px 20px rgba(0, 76, 255, 0.3) !important;
  }
  .reference-scroll {
    bottom: 18px !important;
    height: 40px !important;
    width: 200px !important;
  }

  /* Fix 2: Memory Chapter ("Oh. Now I see it.") Triangle and Math Clarity
     Proper vertical zoning separates text narrative, trigonometry SVG diagram, and equation card. */
  .memory-stage,
  .story-ready .memory-stage {
    min-height: max(880px, 100svh) !important;
    position: relative;
    background: #edf6ff;
  }
  .memory-landscape {
    width: 140% !important;
    left: -20% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 68% center !important;
    opacity: 0.9;
  }
  .memory-wash {
    background: linear-gradient(180deg, #edf7ff 0%, #edf7ffeb 30%, #edf7ff35 58%, #edf7ffbb 88%, #edf7ff 100%) !important;
  }
  .memory-narrative {
    left: 6% !important;
    top: 85px !important;
    width: 88% !important;
    z-index: 4 !important;
    pointer-events: none;
  }
  .memory-beat h2 {
    font-size: clamp(30px, 7.8vw, 44px) !important;
    line-height: 1.12 !important;
    letter-spacing: -1.5px !important;
  }
  .memory-beat .overline {
    font-size: 10px !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 12px !important;
    color: #4a6fa2 !important;
  }
  .memory-beat > p:last-child {
    font-size: 14px !important;
    line-height: 1.55 !important;
    margin-top: 12px !important;
    max-width: 320px !important;
    color: #435e82 !important;
  }

  /* Right Triangle SVG Scaling & Visual Clarity */
  .landscape-math {
    position: absolute !important;
    left: -4% !important;
    top: 40% !important;
    width: 108% !important;
    height: 42% !important;
    object-fit: contain !important;
    z-index: 3 !important;
    pointer-events: none;
  }
  .math-path {
    stroke: #1852ea !important;
    stroke-width: 4px !important;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 10px rgba(24, 82, 234, 0.45)) !important;
  }
  .triangle-area {
    fill: url(#math-fill) !important;
    opacity: 0.9 !important;
  }
  .math-labels {
    font: italic 32px Georgia, serif !important;
    font-weight: 700 !important;
    fill: #0634a3 !important;
    filter: drop-shadow(0 2px 5px rgba(255, 255, 255, 1)) drop-shadow(0 0 3px #fff) !important;
  }
  .math-labels .small-math {
    font: bold 14px var(--body) !important;
    letter-spacing: 2px !important;
    fill: #0634a3 !important;
  }
  .math-labels circle {
    r: 9px !important;
    fill: #1852ea !important;
    stroke: #ffffff !important;
    stroke-width: 4px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)) !important;
  }
  .math-angle {
    stroke: #1852ea !important;
    stroke-width: 2.8px !important;
    filter: drop-shadow(0 1px 3px #fff) !important;
  }

  /* Bottom Equation Card in Frosted Pill */
  .memory-equation {
    left: 5% !important;
    right: 5% !important;
    bottom: 35px !important;
    z-index: 5 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    padding: 12px 18px !important;
    border-radius: 20px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 8px 24px rgba(12, 45, 105, 0.1) !important;
    width: auto !important;
    max-width: 370px !important;
    margin: 0 auto !important;
    text-align: center !important;
  }
  .memory-equation > span {
    font-size: 9px !important;
    letter-spacing: 1.2px !important;
    color: #55729e !important;
    font-weight: 600 !important;
    display: block !important;
  }
  .memory-equation > p {
    font: italic clamp(18px, 4.8vw, 24px) Georgia, serif !important;
    color: #123e98 !important;
    margin-top: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  .memory-equation .fraction {
    font-size: 18px !important;
    min-width: 28px !important;
  }
  .memory-equation b {
    margin-left: 8px !important;
    font-size: clamp(17px, 4.5vw, 22px) !important;
    color: #0752ff !important;
    font-weight: 600 !important;
  }
  .memory-equation small {
    display: none !important;
  }
  .scene-progress {
    bottom: 18px !important;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  /* Goals Chapter on Mobile */
  .path-selector, .story-ready .path-selector {
    padding: 48px 5% 35px;
    min-height: 0 !important;
  }
  .path-selector .goals-intro .overline {
    font-size: 10px;
    letter-spacing: 1.6px;
    gap: 9px;
  }
  .path-selector .goals-intro .overline::before, .path-selector .goals-intro .overline::after {
    width: 20px;
  }
  .path-selector .goals-intro h2 {
    font-size: clamp(32px, 8.5vw, 44px);
    letter-spacing: -1.5px;
  }
  .path-selector .goals-intro h2 em {
    font-size: clamp(40px, 10.5vw, 56px);
    letter-spacing: -1.7px;
  }
  .path-selector .goals-intro > p:last-child {
    font-size: 15px;
  }
  .path-selector .goals-intro > p:last-child br {
    display: none;
  }
  .path-benefit {
    font-size: 12px;
    padding: 9px 11px;
    gap: 8px;
    width: 100%;
    justify-content: center;
  }
  .path-benefit svg {
    width: 25px;
    height: 25px;
  }
  .path-benefit span {
    max-width: 95px;
  }
  .path-benefit br {
    display: block;
  }
  .path-selector .goal-pathways {
    margin-top: 10px;
    gap: 18px;
  }
  .path-selector .goal-path {
    padding: 22px 18px;
    border-radius: 27px;
  }
  .path-heading {
    grid-template-columns: 52px minmax(0, 1fr) 42px;
    gap: 11px;
  }
  .path-icon {
    width: 52px;
    height: 58px;
    border-radius: 16px;
  }
  .path-icon svg {
    width: 35px;
    height: 35px;
  }
  .path-arrow {
    width: 42px;
    height: 42px;
    font-size: 27px;
  }
  .path-selector .goal-path h3 {
    font-size: 44px;
  }
  .path-selector .goal-name {
    font-size: 14px;
    line-height: 1.4;
  }
  .path-selector .goal-path .path-subjects {
    gap: 8px;
  }
  .path-subjects li {
    font-size: 13px;
    padding: 5px 12px;
  }
  .path-selector .goal-path .path-outcomes {
    font-size: 14px;
    gap: 10px;
  }
  .path-outcomes li {
    gap: 9px;
    grid-template-columns: 20px 1fr;
  }
  .path-outcomes li::before {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
  .path-footnote {
    font-size: 10px;
    letter-spacing: 1.7px;
    gap: 10px;
    padding-top: 20px;
  }

  /* Voice Stage on Mobile */
  .voice-stage {
    gap: 28px;
    padding: 95px 5% 35px;
  }
  .voice-stage:has(.voice-photo) .voice-copy h2 {
    font-size: clamp(32px, 9.2vw, 46px);
  }
  .voice-stage:has(.voice-photo) .voice-conversation {
    min-height: 175px;
  }
  .voice-bottom {
    display: block;
  }
  .audio-button {
    margin-top: 20px;
  }
  .voice-copy > p {
    font-size: 15px;
  }
  .audio-status {
    margin-top: 0;
  }
  .chapter-label {
    font-size: 10px;
    letter-spacing: .8px;
  }

  /* Question Stage on Mobile */
  .question-visual {
    height: 66.6667vw;
  }
  .question-narrative {
    top: calc(66.6667vw + 135px);
  }
  .question-stage, .story-ready .question-stage {
    min-height: max(850px, 100svh);
  }
  .question-beat h2 {
    font-size: clamp(30px, 8.5vw, 40px);
  }
  .question-beat > p:last-child {
    font-size: 15px;
  }
  .question-listening {
    bottom: 35px;
    max-width: 88%;
  }

  /* Mastery Journey on Mobile */
  .mastery-journey {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 10px;
  }
  .level h3 {
    font-size: 18px;
  }
  .level p {
    font-size: 14px;
  }

  /* Lab & Physics on Mobile */
  .lab-stage {
    min-height: 1120px !important;
  }
  .lab-stage canvas {
    height: 310px;
    margin-top: 75px;
  }
  .lab-measure {
    bottom: 39%;
  }
  .measure-throat {
    left: 61%;
  }
  .lab-bottom {
    display: block;
  }
  .lab-equation {
    margin-top: 20px;
  }
  .lab-bottom p {
    max-width: none;
  }
  .lab-copy h2 {
    font-size: clamp(34px, 9.5vw, 46px);
  }

  /* Study Blocks & Planner on Mobile */
  .study-block {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 16px 10px;
  }
  .study-block p {
    grid-column: 1;
    grid-row: auto;
    font-size: 13px;
  }
  .study-block h3 {
    font-size: 17px;
  }
  .week-day {
    grid-template-columns: 48px 1fr;
  }
  .day-name {
    font-size: 11px;
  }

  /* Closing Section on Mobile */
  .closing-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-info {
    justify-content: space-between;
  }
  .footer-bottom {
    display: block;
  }
  .footer-bottom > span {
    display: block;
    text-align: left !important;
    margin-top: 7px;
  }
}

/* Compact Mobile (phones under 380px, e.g. iPhone SE, Folded screens) */
@media (max-width: 380px) {
  .reference-copy h1 {
    font-size: 26px !important;
    letter-spacing: -1px !important;
  }
  .reference-copy h1 em {
    font-size: 30px !important;
  }
  .reference-actions .reference-button {
    padding: 7px 12px !important;
    font-size: 12px !important;
  }
  .path-selector .goal-path {
    padding: 18px 14px;
  }
  .path-selector .goal-path h3 {
    font-size: 36px;
  }
  .path-icon {
    width: 44px;
    height: 48px;
  }
  .path-heading {
    grid-template-columns: 44px 1fr 38px;
    gap: 8px;
  }
  .path-arrow {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

/* --------------------------------------------------------------------------
   7. Reduced Motion Fallback
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .path-selector {
    height: auto !important;
  }
  .goals-chapter {
    height: auto;
    min-height: 0;
  }
  .question-stage {
    height: auto !important;
    min-height: 0 !important;
    padding: 95px 6% 45px;
  }
  .question-visual {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 3 / 2;
    margin: 0 -6.8% 35px;
  }
  .question-narrative {
    position: relative;
    inset: auto;
    width: 100%;
  }
  .question-beat {
    position: relative;
    inset: auto;
    margin-bottom: 32px;
  }
  .question-listening {
    position: relative;
    inset: auto;
  }
  .memory-bridge {
    display: none !important;
  }
  .voice-conversation {
    height: auto !important;
    min-height: 0 !important;
    display: grid;
    gap: 22px;
  }
  .voice-line {
    position: relative !important;
    inset: auto;
    opacity: 1 !important;
    transform: none !important;
  }
  .memory-stage {
    height: auto !important;
    min-height: 0 !important;
    padding: 110px 6% 60px;
  }
  .memory-narrative {
    position: relative;
    inset: auto;
    width: 100%;
  }
  .memory-beat {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    transform: none !important;
    margin-bottom: 50px;
  }
  .landscape-math {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1440 / 900;
  }
  .memory-equation {
    position: relative;
    inset: auto;
    margin-top: 25px;
  }
}
