/* V20 performance tuning: preserve layout while reducing off-screen/mobile paint work. */
@supports (content-visibility: auto) {
  #about, #preview, #challenge, #read, #reflection, #future-challenge,
  #pathways, #web-services, #session-progress, #faq, #author, .closing-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 760px;
  }
}

@media (max-width: 900px) {
  .site-header,
  .floating-note,
  .hero-story-chip,
  .quote-band,
  .closing-card,
  .story-card,
  .principle-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .ambient-one,
  .ambient-two,
  .visual-glow,
  .book-shadow,
  .hero-portrait-stage::before {
    filter: none !important;
  }
  .hero-story-chip,
  .floating-note {
    box-shadow: 0 8px 20px rgba(0,0,0,.2) !important;
  }
}




/* V20 smooth rendering: avoid expensive paints on touch devices while preserving artwork. */
@media (hover: none) and (max-width: 900px) {
  .reader-native-card, .quiz-card, .closing-card, .story-card, .principle-card {
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
  }
  .reader-pdf-frame { contain: content; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* V21: hide the legacy quiz answer-review panel even if an older cached fragment exists. */
#quiz-answer-review, .quiz-answer-review, [data-quiz-answer-review] { display: none !important; }

/* Keep PDF opening responsive on mobile; native viewer is prepared off-screen after unlock. */
.reader-pdf-frame { backface-visibility: hidden; }
@media (max-width: 700px) {
  .reader-native-card { content-visibility: visible; }
}


/* V22: permanently remove the old end-of-quiz answer review, including cached fragments. */
#quiz-answer-review, .quiz-answer-review, [data-quiz-answer-review],
.quiz-answer-review-list, .quiz-review-item { display: none !important; }
