/* 3 Nov (Shali): phone pass. Loaded last; rules are phone-only unless a fix says otherwise.
   1. Horizon for Men / Women: one card per row in the Children card's pattern (copy on the left, figure on the right),
      so the titles line up and the copy no longer runs over the figures. */
@media (max-width: 600px) {
  #quiet-story.da.da-direct .qx { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'facts' 'male' 'female' 'junior' 'offer'; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) { height: auto; min-height: 176px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-fig { position: absolute !important; inset: 0 0 0 auto !important; width: 44% !important; height: 100% !important; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-fig img { width: 100% !important; height: 100% !important; object-fit: contain; object-position: 50% 0 !important; transform: scale(1.3) !important; transform-origin: 50% 0 !important; }
  #quiet-story.da.da-direct .qx-male::after { inset: 0; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ece4d6 0%, #ece4d6 40%, rgba(236, 228, 214, .75) 57%, rgba(236, 228, 214, 0) 76%); }
  #quiet-story.da.da-direct .qx-female::after { inset: 0; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e8decd 0%, #e8decd 40%, rgba(232, 222, 205, .75) 57%, rgba(232, 222, 205, 0) 76%); }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-copy { position: relative; z-index: 2; width: 62%; min-height: 0; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-copy h3 { white-space: normal; font-size: 26px; line-height: 1.1; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-copy p { font-size: 15px; line-height: 1.5; }
}
@media (max-width: 389px) {
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) { padding: 16px 18px; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-copy h3 { font-size: 23px; }
  #quiet-story.da.da-direct .qx-path:not(.qx-junior) .qx-copy p { font-size: 14px; }
}

/* 2. (removed 3 Nov: the Beyond the Horizon add-on cards no longer link anywhere, at Shali's request) */

/* 3. Horizon figures: the captions under "About 2 hours", "9 body systems" and "1 physician review" were 11 px on phones. */
@media (max-width: 600px) {
  #quiet-story.da .qx-fact dd { font-size: 13px; line-height: 1.4; }
  #quiet-story.da .qx-fact dt { min-height: 2.2em; } /* two lines of room for every figure, so the captions start level */
}

/* 4. Programmes cards on phones: the icon sits beside the title instead of above it, the description runs full width
      below, so each card is about a quarter shorter with the same content and styling. */
@media (max-width: 759px) {
  #programs .pg-card { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 12px; align-items: center; padding: 22px 22px 24px; }
  #programs .pg-card .pg-ic.sl { grid-column: 1; grid-row: 1; font-size: 36px; }
  #programs .pg-card .pg-t { grid-column: 2; grid-row: 1; margin: 0 !important; padding-top: 0; }
  #programs .pg-card .pg-d { grid-column: 1 / -1; grid-row: 2; margin: 0 !important; }
}

/* 5. Header "Register your interest": 13 px on phones from 360 px wide (it was 11 px), 12 px from 340 px; the narrowest
      phones keep the old size, as there is no room beside the logo. In the scrolled pill below 390 px the existing 12 px
      stays. /diagnostics/ picks this up through site-header-shared.css (regenerated from the homepage's styles). */
@media (min-width: 360px) and (max-width: 479px) { .masthead .hdr .hdr-cta { font-size: 13px !important; } }
@media (min-width: 340px) and (max-width: 359px) { .masthead .hdr .hdr-cta { font-size: 12px !important; } }
