/* Page 17-37 readability and device compatibility.
   Page 1-16 remain untouched. The deck continues to use the authored
   1600x900 Reveal canvas and scales as one desktop composition on phones. */

.reveal .slides > section:nth-of-type(n+17) {
  --post16-copy: 14px;
  --post16-support: 12px;
  --post16-control: 13px;
}

.reveal .slides > section:nth-of-type(n+17) p,
.reveal .slides > section:nth-of-type(n+17) li,
.reveal .slides > section:nth-of-type(n+17) blockquote {
  font-size: var(--post16-copy) !important;
  line-height: 1.42 !important;
}

.reveal .slides > section:nth-of-type(n+17) small,
.reveal .slides > section:nth-of-type(n+17) .cn,
.reveal .slides > section:nth-of-type(n+17) footer span,
.reveal .slides > section:nth-of-type(n+17) button small,
.reveal .slides > section:nth-of-type(n+17) label > span {
  font-size: var(--post16-support) !important;
  line-height: 1.3 !important;
}

.reveal .slides > section:nth-of-type(n+17) input,
.reveal .slides > section:nth-of-type(n+17) textarea,
.reveal .slides > section:nth-of-type(n+17) select,
.reveal .slides > section:nth-of-type(n+17) button {
  font-size: var(--post16-control) !important;
}

.reveal .slides > section:nth-of-type(n+17) textarea,
.reveal .slides > section:nth-of-type(n+17) input {
  line-height: 1.4 !important;
}

/* Dense NOVA side copy needs a smaller increase than the main task copy so
   it remains fully visible while matching the readability of Pages 4-16. */
.reveal .slides > section:nth-of-type(n+17) [class*="nova"] p,
.reveal .slides > section:nth-of-type(n+17) [class*="Nova"] p {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

/* Page 34-37 use compact output builders; raise their actual writing and
   support text without changing their carefully budgeted module heights. */
#page34Mission03StoryFrame :is(textarea, input),
#page35Mission03LocalLens :is(textarea, input),
#page36Mission03WorldVoice :is(textarea, input),
#page37Mission03Report :is(textarea, input) {
  font-size: 12.5px !important;
}
#page34Mission03StoryFrame :is(.p34-step-head small, .p34-story-item small),
#page35Mission03LocalLens :is(.p35-step-head small, .p35-card-flow span),
#page36Mission03WorldVoice :is(.p36-support-title small, .p36-builder-head small, .p36-story-head small),
#page37Mission03Report :is(.p37-section-head small, .p37-cards small, .p37-checks small) {
  font-size: 11.5px !important;
}

/* There is no Page 38. On the real final slide, fill the authored progress
   rail completely rather than leaving a misleading inactive tail. */
.reveal:has(#page37Mission03Report.present) .progress span {
  width: 100% !important;
}

/* Post-16 phone compatibility: visual layers never own the swipe surface;
   controls remain tappable and Reveal keeps horizontal swipe navigation. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .reveal .slides > section:nth-of-type(n+17) {
    touch-action: pan-y !important;
  }

  .reveal .slides > section:nth-of-type(n+17)::before,
  .reveal .slides > section:nth-of-type(n+17)::after,
  .reveal .slides > section:nth-of-type(n+17) [aria-hidden="true"],
  .reveal .slides > section:nth-of-type(n+17) [class*="-fx"],
  .reveal .slides > section:nth-of-type(n+17) [class*="particles"] {
    pointer-events: none !important;
  }

  .reveal .slides > section:nth-of-type(n+17) button,
  .reveal .slides > section:nth-of-type(n+17) input,
  .reveal .slides > section:nth-of-type(n+17) textarea,
  .reveal .slides > section:nth-of-type(n+17) select,
  .reveal .slides > section:nth-of-type(n+17) [role="button"] {
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  .reveal .slides > section:nth-of-type(n+17) textarea {
    touch-action: pan-y !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:has(.reveal .slides > section:nth-of-type(n+17).present) .course-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
