/* 15 November evening: HOME PHONE ONLY. Load after prompt11-design.css.
   The hook annotates existing nodes; this stylesheet changes no desktop rule,
   copy, font family, palette, logo, portrait, film or native checkbox geometry. */
@media (max-width: 767.98px) {
  /* Restore one gutter, including the header and both existing footer wraps.
     Width includes padding; it must not be calc(100% - 48px) plus padding. */
  body.film-phone-tidy[data-film-phone-page="/"] .wrap {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    padding-inline: 24px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .site-header .nav-links {
    padding-inline: 24px !important;
  }

  /* Every regular home section has the same outer rhythm, including hero.
     The closing-region rules below replace only their grouped inner edges. */
  body.film-phone-tidy[data-film-phone-page="/"] main > section {
    padding: 56px 0 !important;
    margin-block: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] main :is(h1, h2, h3) {
    margin-bottom: 24px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] main :is(h1, h2, h3) + p {
    margin-top: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] main .section-head {
    margin-bottom: 24px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] main .section-head > :last-child {
    margin-bottom: 0 !important;
  }

  /* Cover the small 760px-to-767.98px gap between earlier mobile breakpoints.
     Only home layouts stack; no desktop templates or media dimensions change. */
  body.film-phone-tidy[data-film-phone-page="/"] [data-home-story="hero"] > .hero-grid,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-guide > .wrap.split,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-problem-lines,
  body.film-phone-tidy[data-film-phone-page="/"] main .polish-balanced-grid,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-plan-steps,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-stories-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] [data-home-story="hero"] > .hero-grid,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-guide > .wrap.split {
    gap: 24px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .prompt11-hero .prompt11-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .prompt11-hero .prompt11-hero-actions > .btn {
    width: 100%;
    white-space: normal !important;
  }

  /* Compact cards retain their existing badges, all three stages and links.
     Badge/title share the first row in their original reading order. */
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-cards {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    padding-top: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-cards::before,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card::before,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card::after {
    content: none !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 24px;
    align-items: start;
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    padding: 20px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card > .legacy-home-stage-number {
    position: static;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    transform: none;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card > .path-top {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card .path-top h3 {
    margin: 0 !important;
  }

  /* Heading-to-text remains 24px (the card row gap); body items are 16px. */
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card > .path-body {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    padding: 0 !important;
    gap: 16px;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card .path-body > p,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card .legacy-home-card-actions {
    margin: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card .legacy-home-card-actions {
    gap: 16px !important;
    align-items: stretch;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-home-journey-card .legacy-home-card-actions > .btn {
    align-self: stretch;
    max-width: 100%;
    margin: 0 !important;
    white-space: normal;
  }

  /* Five existing sections, four closing offers, one uninterrupted pale band.
     Outcomes remains between Academy and consultation. No wrapper is required.
     Only the first/last outer edges are 56px; every inner edge is 24px. */
  body.film-phone-tidy[data-film-phone-page="/"] [data-film-phone-region="closing"] {
    padding: 24px 0 !important;
    margin-block: 0 !important;
    background: #E5F0F7 !important;
    border: 0 !important;
    border-top: 1px solid #4A95B8 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] [data-film-phone-region="closing"][data-film-phone-edge~="start"] {
    padding-top: 56px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] [data-film-phone-region="closing"][data-film-phone-edge~="end"] {
    padding-bottom: 56px !important;
    border-bottom: 1px solid #4A95B8 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] [data-film-phone-part="academy"] .lead {
    margin: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .prompt11-outcomes-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .prompt11-outcomes-grid > .prompt11-outcome {
    padding: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .prompt11-outcomes-grid > .prompt11-outcome-with {
    padding: 24px 0 0 !important;
    border-left: 0 !important;
    border-top: 1px solid #4A95B8 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-letter-band .legacy-letter-band-wrap,
  body.film-phone-tidy[data-film-phone-page="/"] .legacy-letter-band .legacy-letter-band-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-letter-band .legacy-letter-band-copy strong {
    margin-bottom: 24px;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .legacy-letter-band .legacy-letter-band-form .btn {
    width: 100%;
    white-space: normal;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .market-report-footer-strip-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .market-report-footer-text {
    flex: auto;
  }

  /* Remove the existing 3px footer rule at the Letter/report join, not the
     report strip itself. The ordinary footer still has its own 56px rhythm. */
  body.film-phone-tidy[data-film-phone-page="/"] .site-footer {
    padding: 0 0 56px !important;
    border-top: 0 !important;
  }

  body.film-phone-tidy[data-film-phone-page="/"] .site-footer > .wrap {
    padding-top: 56px !important;
  }

  /* Preserve prompt11's selective 15px reading floor and eyebrow exception.
     No font-size declaration is needed here and larger reading type stays. */
  body.film-phone-tidy[data-film-phone-page="/"] :is(a[href], button, summary):not([hidden]) {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
  }

  body.film-phone-tidy[data-film-phone-page="/"] a[href]:not([hidden]) {
    display: inline-flex !important;
    align-items: center;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
