/* Mobile visual quality control: 2026-11-06.
   Loaded after existing page styles. Keep desktop layout and original photography.
   Avoid overlays, giant sticky sales bars and distorted pillar images. */

@media (max-width: 720px) {
  /* The persistent offer blocked paragraphs, links and headings in user recordings.
     Booking remains available in the page's ordinary calls to action. */
  html body .bp-sticky,
  html body .bp-sticky.show { display: none !important; }

  /* The assistant may be reached without sitting on top of the reading column. */
  html body .orb-wrap,
  html body.bp-open .orb-wrap {
    width: 44px !important; height: 44px !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }
  html body .orb-wrap .orb { inset: 0 !important; }
  html body .asst {
    bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    max-height: min(75dvh, 620px) !important;
  }
  html body .to-top,
  html body .to-top-link.floating {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  /* Long photo heroes: do not let an image push useful content far below the fold. */
  body[data-hero-page="services"] header#services-main.hero,
  body[data-hero-page="about"] .page-hero,
  body[data-hero-page="resources"] .resources-hero-image,
  body[data-hero-page="faq"] .faq-hero,
  html body .guides-hero {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding-top: clamp(56px, 10svh, 90px) !important;
    padding-bottom: clamp(50px, 9svh, 82px) !important;
  }
  body[data-hero-page="services"] header#services-main.hero,
  body[data-hero-page="about"] .page-hero,
  body[data-hero-page="resources"] .resources-hero-image,
  body[data-hero-page="faq"] .faq-hero {
    isolation: isolate;
  }
  /* Darken the photograph, but preserve visible subjects and natural color. */
  body[data-hero-page="services"] header#services-main.hero::after,
  body[data-hero-page="about"] .page-hero::after,
  body[data-hero-page="resources"] .resources-hero-image::after,
  body[data-hero-page="faq"] .faq-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,rgba(9,8,7,.42),rgba(9,8,7,.66) 46%,rgba(9,8,7,.72));
    z-index: 0;
    pointer-events: none;
  }
  body[data-hero-page="services"] header#services-main.hero > *,
  body[data-hero-page="about"] .page-hero > *,
  body[data-hero-page="resources"] .resources-hero-image > *,
  body[data-hero-page="faq"] .faq-hero > * {
    position: relative;
    z-index: 1;
  }
  body[data-hero-page="services"] header#services-main.hero :is(h1,p),
  body[data-hero-page="about"] .page-hero :is(h1,p),
  body[data-hero-page="resources"] .resources-hero-image :is(h1,h2,p),
  body[data-hero-page="faq"] .faq-hero :is(h1,p) {
    color: #f5f0e8 !important;
    text-shadow: 0 1px 7px rgba(0,0,0,.65);
    overflow-wrap: anywhere;
  }
  body[data-hero-page="services"] header#services-main.hero p,
  body[data-hero-page="about"] .page-hero p,
  body[data-hero-page="resources"] .resources-hero-image p,
  body[data-hero-page="faq"] .faq-hero p {
    max-width: 35ch !important;
    font-size: clamp(1.05rem, 4.7vw, 1.25rem) !important;
    line-height: 1.48 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body[data-hero-page="services"] header#services-main.hero h1,
  body[data-hero-page="about"] .page-hero h1,
  body[data-hero-page="resources"] .resources-hero-image h1,
  body[data-hero-page="faq"] .faq-hero h1 {
    font-size: clamp(2.05rem, 8vw, 3rem) !important;
    line-height: 1.1 !important;
    max-width: 18ch !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html body .guides-hero-media img,
  html body .guides-hero-media video { object-fit: cover !important; object-position: center !important; }

  /* Legible articles and sections without huge gaps or collisions. */
  html body :is(.article,.legal-body,.guide-article,.resource-content,.resources-content) {
    overflow-wrap: break-word;
  }
  html body :is(.article,.legal-body,.guide-article,.resource-content,.resources-content) p {
    line-height: 1.56;
  }
  html body .guides-grid img,
  html body .guide-card img,
  html body .resource-card img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }
}
@media (max-width:560px) {
  /* Seven Life Manual photographs must have the same frame and no cropping of captions. */
  body[data-hero-page="life-manual"] .pillars-grid {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    gap: 18px;
  }
  body[data-hero-page="life-manual"] .pillar {
    aspect-ratio: 4 / 5 !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body[data-hero-page="life-manual"] .pillar-img {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    opacity: 1 !important;
  }
  body[data-hero-page="life-manual"] .pillar-shade {
    pointer-events: none;
    background: linear-gradient(180deg,transparent 16%,rgba(10,8,6,.38) 52%,rgba(10,8,6,.92) 100%) !important;
  }
  body[data-hero-page="life-manual"] .pillar-label {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  body[data-hero-page="life-manual"] .pillar-detail {
    max-height: min(45vh, 340px);
    overflow-y: auto;
  }
}
@media (prefers-reduced-motion:reduce) {
  html body .pillar-img { transition:none !important; transform:none !important; }
}


/* Sample pages are document screenshots: never crop a page to fit a thumbnail. */
body[data-hero-page="services"] .product .strip .thumb {
  min-width: 0;
  overflow: visible;
}
body[data-hero-page="services"] .product .strip .thumb :is(picture,img) {
  max-width: 100%;
}
body[data-hero-page="services"] .product .strip .thumb img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center top !important;
}
body[data-hero-page="resources"] .handoff-illustration,
body[data-hero-page="resources"] .handoff-illustration img {
  border-radius: 0 !important;
  box-shadow: none !important;
}
@media(max-width:720px) {
  body[data-hero-page="services"] .product .strip {
    scroll-padding-inline: 16px;
    -webkit-overflow-scrolling: touch;
  }
  body[data-hero-page="services"] .product .strip .thumb {
    flex-shrink: 0;
  }
  body[data-hero-page="resources"] .handoff-illustration {
    width: min(100%, 320px);
    max-width: 100%;
    margin-inline: auto;
  }
  html body .guides-grid :is(.guide-card,.guide-tile) img {
    width: 100%;
    height: auto !important;
    aspect-ratio: 3/2;
    object-fit: cover;
  }
}

/* Mobile image and pillar text QC, 2026-11-07.
   Limit these changes to the Life Manual. Do not change reading modes or products. */
@media (max-width: 720px) {
  body[data-hero-page="life-manual"] .pillars-grid .pillar {
    isolation: isolate;
  }
  /* Images are editorial backgrounds; copy always needs its own strong contrast. */
  body[data-hero-page="life-manual"] .pillars-grid .pillar::after {
    background: linear-gradient(180deg, rgba(8,7,6,.10) 0%, rgba(8,7,6,.18) 38%, rgba(8,7,6,.84) 78%, rgba(8,7,6,.98) 100%);
    pointer-events: none;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-shade {
    background: linear-gradient(180deg,transparent 28%,rgba(8,7,6,.23) 49%,rgba(8,7,6,.92) 85%,#080706 100%) !important;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-label {
    padding: 24px 22px 26px;
    max-width: 100%;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-name {
    color: #fff9ee !important;
    font-size: clamp(1.65rem, 7vw, 2rem);
    line-height: 1.18;
    text-shadow: 0 2px 10px rgba(0,0,0,.7);
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-num,
  body[data-hero-page="life-manual"] .pillars-grid .pillar-hint {
    color: #ead09a !important;
    opacity: 1 !important;
    line-height: 1.45;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-detail li {
    color: #f5eee2 !important;
    font-size: clamp(1rem,4.2vw,1.08rem);
    line-height: 1.5;
    padding-block: 6px;
    text-shadow: 0 1px 5px #000;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-detail li::before {
    background: #e5c471;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar.open::after {
    opacity: 1;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar.open .pillar-detail {
    max-height: min(43dvh, 330px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-plus {
    width: 44px;
    height: 44px;
    top: 14px;
    right: 14px;
    background: rgba(16,12,7,.86);
    border: 1px solid #c9a65d;
    color: #f5d58f;
  }
  body[data-hero-page="life-manual"] .pillars-grid .pillar-vital .pillar-img {
    object-position: center 42% !important;
  }
}
