/* QA layer · desktop symmetry/alignment (≥1025px) fixes from the 2026-10 QA round — owned by the QA-desktop pass */
@media (min-width: 1025px) {

  /* =====================================================================
     1 · SECTION HEADS — one rhythm per page
     ===================================================================== */

  /* 1a · Split heads: the title column was the NARROW one (1fr vs 1.4fr) and the h2 was capped at
     18ch, so long titles wrapped to 5–6 lines (process, method, research). Give the title the wider
     column and a longer measure; the lead keeps a comfortable ~470px. */
  .section-head { grid-template-columns: 1.25fr 1fr; }
  .section-head:not([style*="center"]):not([style*="block"]) > div > h2,
  .section-head:not([style*="center"]):not([style*="block"]) > h2 { max-width: 24ch; }

  /* 1b · Lone-title heads (no lead): a 2-col grid with one child left a void column.
     On split-head pages the title spans both columns instead. */
  .section-head:has(> :only-child) > :only-child { grid-column: 1 / -1; }

  /* 1c · Centered heads whose inline style was re-serialised by JS ("text-align: center;")
     no longer matched nye-v5's unspaced selector → the lead sat flush-right under a centered h2. */
  .section-head[style*="text-align: center"] .lead,
  .section-head[style*="display: block"] .lead,
  .section-head[style*="text-align:center"] .lead,
  .section-head[style*="display:block"] .lead { margin-inline: auto; }

  /* 1d · Pages whose heads are centered (home, method, elevators) had 1–6 stray split heads.
     Centre every section head on those pages so the page reads as one system. */
  body:has(.hero-money) .section-head,
  body:has(.m-hero) .section-head,
  body:has(.elv-hero-warm) .section-head {
    display: block !important;
    text-align: center !important;
  }
  body:has(.hero-money) .section-head > div,
  body:has(.m-hero) .section-head > div,
  body:has(.elv-hero-warm) .section-head > div { max-width: none; }
  body:has(.hero-money) .section-head h2,
  body:has(.m-hero) .section-head h2,
  body:has(.elv-hero-warm) .section-head h2 { margin-inline: auto; }
  /* heads that were split (no inline centering) get a slightly longer centered measure than 18ch */
  body:has(.hero-money) .section-head:not([style*="center"]) h2,
  body:has(.m-hero) .section-head:not([style*="center"]) h2,
  body:has(.elv-hero-warm) .section-head:not([style*="center"]) h2 { max-width: 22ch; }
  body:has(.hero-money) .section-head .lead,
  body:has(.m-hero) .section-head .lead,
  body:has(.elv-hero-warm) .section-head .lead { margin-inline: auto; max-width: 620px; margin-top: 18px; }
  body:has(.hero-money) .section-head .eyebrow,
  body:has(.m-hero) .section-head .eyebrow,
  body:has(.elv-hero-warm) .section-head .eyebrow { justify-content: center; }

  /* 1e · testimonials / about: block heads with text-align:center but a left-anchored h2
     (max-width without auto margins) → the h2 floated mid-right while the lead was centered. */
  .section-head.testim-head h2,
  .section-head.testim-head .lead,
  .section-head.team-intro h2,
  .section-head.team-intro .lead { margin-inline: auto; }
  .section-head.team-intro { display: block; }
  .section-head.team-intro > div { max-width: none; }
  .section-head.team-intro .eyebrow { justify-content: center; }

  /* 1f · Orphan last words on titles (articles offers, process longform h3, card titles). */
  h1, h2, h3 { text-wrap: balance; }

  /* =====================================================================
     2 · CONTAINER EDGES — one pair of edges per page
     ===================================================================== */

  /* 2a · Home welcome split used an inline 1040px container → text edge 70px inside the logo edge. */
  #welcome > .container { max-width: var(--he-max) !important; }

  /* 2b · Home hero glass card hugged the viewport (left ≈ 2.5%) instead of the content edge. */
  .hero-money-card { left: max(2.5%, calc((100% - var(--he-max)) / 2 + 36px)); }

  /* 2c · Process hero: the photo touched the left edge but the copy card was inset 36px from the right. */
  .pp-hero-copy { margin-inline-start: 0 !important; }

  /* 2d · Reading sections with ad-hoc inline widths (820 / 860 / 880 on training-bg, training-nobg,
     living-new-way) → one reading measure, same as the FAQ lists. */
  section > .container[style*="max-width:820px"],
  section > .container[style*="max-width:860px"],
  section > .container[style*="max-width:880px"],
  section > .container[style*="max-width: 820px"],
  section > .container[style*="max-width: 860px"],
  section > .container[style*="max-width: 880px"] { max-width: 880px !important; }

  /* 2e · FAQ lists were 820 / 860 / 880 wide depending on the page. */
  .faq, .faq-list, .home-faq { max-width: 880px !important; margin-inline: auto; }

  /* 2f · Card rows that stopped short of the container (sessions audience, together fit panel,
     workshops stage cards) while every other row on the page spans edge to edge. */
  .audience, .tg-fit { max-width: none !important; }
  .container > div[style*="max-width:1040px"] { max-width: none !important; }

  /* 2g · Quote bands: sessions' was 860px wide while the photo band above it and the quote bands
     on method/research span the container. Equal insets for photo and quote bands. */
  .quote-band { max-width: none !important; }

  /* 2h · Consult card (articles, podcast, cards): a .container with max-width 1180 → its visible
     border sat 36px OUTSIDE the content edges; home's twin was 1020. One width = content width. */
  .art-consult-in, .home-consult.art-consult-in { max-width: calc(var(--he-max) - 72px) !important; }

  /* 2i · Article page: hero title (820) / body (720) / question card (760) had three right edges. */
  .article-hero-in, .article-question-wrap { max-width: 720px !important; }

  /* =====================================================================
     3 · GRIDS — no orphans, equal heights, one radius per row
     ===================================================================== */

  /* 3a · Podcast "selected products": nye-v5 turned the grid into a flex scroller with fixed 330px
     cards → right-aligned with 74px of dead space on the left, and card heights followed each
     image's natural ratio (one card ~220px shorter). */
  html.v5 .pod-prod-grid, .pod-prod-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }
  .pod-prod-grid .pod-prod-card { flex: none !important; width: auto !important; height: 100%; display: flex; flex-direction: column; }
  .pod-prod-grid .pod-prod-img { aspect-ratio: 4 / 5 !important; height: auto !important; overflow: hidden; }
  .pod-prod-grid .pod-prod-img img { width: 100%; height: 100%; object-fit: cover; }
  .pod-prod-grid .pod-prod-body { flex: 1; }

  /* 3b · 5 cards in a 3-col grid (living-new-way "what you gain") left a hole bottom-left.
     Last row becomes two half-width cards, flush with both edges. */
  .cards-3:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cards-3:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
  .cards-3:has(> :nth-child(5):last-child) > :nth-child(n + 4) { grid-column: span 3; }

  /* 3c · Sessions grid: the first <details> is open by default (747px) beside a collapsed 299px card,
     leaving a ~440px hole. Let the open first card span two rows; the 7th card then pairs with the 6th
     instead of sitting alone, centered. */
  .sessions-grid > details.session-card[open]:first-child { grid-row: span 2; }
  .sessions-grid:has(> details.session-card[open]:first-child) > .session-card:last-child:nth-child(odd) {
    grid-column: auto !important; max-width: none !important; justify-self: stretch !important;
  }

  /* 3d · Testimonials tall WhatsApp gallery: a 5-column grid holding 4 shots → empty left column. */
  .tg-tall:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 880px;
    margin-inline: auto;
  }

  /* =====================================================================
     4 · PAIRED ELEMENTS / BUTTONS
     ===================================================================== */

  /* 4a · Founder signature badge overhung the container edge by 16px (training, about, together, elevators). */
  .founder-signature { right: 0; width: max-content; max-width: none; }

  /* 4b · Cards page: the "communication deck" buy button sat flush-right while its twin
     ("listening deck") is centered — the form is a sibling of the centered <p>, not inside it. */
  form:has(> #comm-buy) { text-align: center; }
}

/* lead · 2026-10-13: the elevators title wrapped to 7 lines at 1920 — cap the display size on wide screens */
@media (min-width: 1500px) { .elv-hero-warm .h1 { font-size: clamp(30px, 2.2vw, 40px) !important; } .elv-hero-warm .hero-split { gap: 56px; } }
