/* Hyper Endurance Fitness | desktop reading layer
   ====================================================================
   Loaded last on every page so it wins over the page's own styles.

   The pages were tuned on a phone first: leads capped at 52 to 56
   characters and body copy at 15 to 16px. On a laptop that left a
   column around 530px wide in the middle of a 1440px screen, which read
   like the mobile site stretched onto a bigger screen.

   Everything here sits inside min-width media queries, so phones and
   small tablets are untouched. Widths stay within a comfortable reading
   measure (roughly 65 to 75 characters) rather than running edge to
   edge, which would be as hard to read as too narrow.
   ==================================================================== */

@media (min-width: 1024px) {

  /* Lead paragraphs under section headings */
  .p-lead,
  .wrap.center .p-lead {
    font-size: 18.5px;
    line-height: 1.75;
    max-width: 66ch;
  }

  /* Long form body blocks (About, Method, Build Around You) */
  .p-body { max-width: 72ch; }
  .p-body p,
  .p-body li {
    font-size: 17.5px;
    line-height: 1.8;
  }

  /* Home hero: the supporting line carries what you get, so give it room */
  .hx-sub {
    max-width: 50ch;
    font-size: 23px;
  }
  .hero-h1.hx-h1 { font-size: clamp(48px, 4.8vw, 72px); }

  /* Home: App section lead sits in a two column grid, keep it measured */
  .app-stage__head .p-lead { max-width: 46ch; }
  .app-tab__desc p { font-size: 16px; line-height: 1.65; }

  /* Short closing leads read better centred under a centred heading */
  .apply .wrap.center .p-lead { text-align: center; max-width: 52ch; }

  /* Home: the system grid */
  .approach-grid span { font-size: 16px; }

  /* Section hub cards */
  .hub-card p { font-size: 16px; line-height: 1.6; }

  /* The Endurance Method */
  .ps-copy .ps-intro { font-size: 19px; }
  .ps-item p, .ps-body p, .ps-body li { font-size: 16.5px; line-height: 1.75; }
  .n-ans { font-size: 15px !important; }

  /* Build Around You and shared section copy */
  .ww-out-row p, .ww-in-row p { font-size: 16.5px; line-height: 1.7; }
  .c-grid p { font-size: 16px; line-height: 1.7; }

  /* About: founder story, with the photo given real presence */
  .f-wrap { grid-template-columns: 380px 1fr; gap: 64px; }
  .f-wrap > div > p[style] { font-size: 18px !important; }

  /* Testimonials */
  .fb-card p:not(.fb-lead), .fb-card li { font-size: 16px; line-height: 1.75; }

  /* Membership */
  .hef-posters .hp-standfirst { max-width: 62ch; font-size: 18.5px; }
  .hef-posters .hp-mech-sub, .hef-posters .hp-line { font-size: 16px; }
  .bx .bx-row__body p, .bx .bx-row__body li { font-size: 16.5px; line-height: 1.75; }
  .hero .shell > p:not(.eyebrow) { font-size: 18.5px; line-height: 1.75; max-width: 64ch; }
  .closer p:not(.closer-contact) { font-size: 18px; max-width: 60ch; }
  .fx__lede { font-size: 17.5px; max-width: 46ch; }

  /* The Endurance Method discipline lists */
  .ps-copy li { font-size: 16.5px; line-height: 1.7; }
}

/* Large desktops: one more step so the page fills a wide screen with
   confidence instead of floating in the middle of it. */
@media (min-width: 1360px) {
  .p-lead,
  .wrap.center .p-lead { font-size: 19.5px; max-width: 68ch; }
  .p-body { max-width: 74ch; }
  .p-body p, .p-body li { font-size: 18.5px; }
  .hx-sub { font-size: 24px; }
  .f-wrap { grid-template-columns: 420px 1fr; gap: 72px; }
  .apply .wrap.center .p-lead { max-width: 52ch; }
}

/* ==== LAYOUT ENGINEER: BEGIN ==== */
/* LAYOUT ENGINEER additions. Desktop only (min-width rules). Applied by
   team/layout-patch.py; edit here and re-run the patch. */

/* ---------------------------------------------------------------------
   Navigation: the full row from 1024px up (the hamburger now takes over
   at 1023px and below, on every page, both header types: the .nav header
   on Home, About, Method, Build Around You and Testimonials, and the
   .site-header on every other page).

   The row has to fit inside the same 1124px content column as the page
   below it. At the old spacing it ran 49px past that column on every
   screen from 1261px up (Join hung outside the grid line), and from 1024
   to 1140px it would not fit at all. One fluid spacing system now runs
   from 1024px (tight) to 1260px (full) and holds above it, so the row is
   evenly spaced at every width and Join always lands on the column edge.
   Fluid values keep about 20px spare at 1024px, enough for a 17px
   classic scrollbar on Windows.
   --------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .nav .nav-links,
  .site-header .site-nav {
    /* link side padding: 6px at 1024, 11px from 1260 */
    --lx-pad: clamp(6px, calc(6px + (100vw - 1024px) * 0.0212), 11px);
    /* tracking: 0.1em at 1024, 0.14em from 1240 */
    --lx-ls: clamp(0.1em, calc(0.1em + (100vw - 1024px) * 0.002), 0.14em);
  }
  .nav .nav-links a,
  .site-header .site-nav a {
    font-size: clamp(10.5px, calc(10.5px + (100vw - 1024px) * 0.0043), 11px);
    letter-spacing: var(--lx-ls);
    padding-left: var(--lx-pad);
    padding-right: calc(var(--lx-pad) - var(--lx-ls));
  }
  .nav .nav-links a::after,
  .site-header .site-nav a::after {
    left: var(--lx-pad);
    right: calc(var(--lx-pad) - var(--lx-ls));
  }
  .nav .nav-links a.nav-join,
  .site-header .site-nav a.nav-join {
    margin-left: calc(var(--lx-pad) + 2px);
    padding-left: calc(var(--lx-pad) * 1.8);
    padding-right: calc(var(--lx-pad) * 1.8 - var(--lx-ls));
  }
}
/* The brand lockup gives up a little tracking and size below 1140px so the
   row keeps clear air beside it; from 1140px it is exactly as before. */
@media (min-width: 1024px) and (max-width: 1139.98px) {
  .nav .brand .brand-text,
  .site-header .brand .brand-name {
    font-size: clamp(13px, calc(13px + (100vw - 1024px) * 0.0087), 14px);
    letter-spacing: clamp(0.08em, calc(0.08em + (100vw - 1024px) * 0.006), 0.13em);
  }
}

/* ---------------------------------------------------------------------
   Line breaking, every page (mirrors mobile.css below 1024px): balanced
   headings, no single word orphans in text. Longhands only.
   --------------------------------------------------------------------- */
@media (min-width: 1024px) {
  h1, h2, h3, h4, .sec-h2, .hero-h1, .p-h1, .chapter-label { text-wrap-style: balance; }
  body, p, li, dd, blockquote, figcaption, summary { text-wrap-style: pretty; }
  q { text-wrap-style: balance; }
}

/* Home "The system" lead is one short paragraph between a centred heading
   and a centred grid: centred (it was set left in a centred block). */
@media (min-width: 1024px) {
  .approach .wrap.center .p-lead { text-align: center; }
  .approach-close { text-wrap-style: balance; }
}

/* Home section hub: the first column's text edge stepped 44px, 30px, 44px
   down the grid (feature card, card 03, wide card 06). One left inset for
   the whole column; the feature card keeps its wider right side. */
@media (min-width: 1024px) {
  .hub-card--feature, .hub-card--wide { padding-left: 30px; }
}

/* Testimonials: cards in a row share one height and pin the member line
   to the foot (they ended 6 to 66px apart). Opening "Read the full review"
   now grows the row, not one card. */
@media (min-width: 1024px) {
  .fb-grid { align-items: stretch; }
  .fb-card > .fb-tags { margin-bottom: 20px; }
  .fb-card > .fb-who { margin-top: auto; }
}

/* Floating controls: the first screen stays clean (mirrors mobile.css).
   At 1280 x 800 the Hyper Intelligence launcher sat on top of the second
   heading of Build Around You and the intro of The Endurance Method, and
   the English pill on body text of the legal pages. Both wait until the
   page is scrolled 60px and are fully in by 130px. On a page too short to scroll
   130px they are fully in at the bottom of the page. Unsupported browsers:
   no change. Never while the chat is open (html.hi-open). */
@media (min-width: 1024px) {
  @keyframes lx-float-in {
    0%, 46% { opacity: 0; visibility: hidden; }
    100%    { opacity: 1; visibility: visible; }
  }
  @supports (animation-timeline: scroll()) {
    html:not(.hi-open) .hef-lang,
    html:not(.hi-open) #hyper-intelligence {
      animation: lx-float-in linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px min(130px, 100%);
    }
    #hyper-intelligence { position: relative; z-index: 2147483000; }
  }
}

/* Article call to action heading: heading line height, not body (1.7) */
@media (min-width: 1024px) {
  .article-cta h2 { line-height: 1.2; }
}

/* ---------------------------------------------------------------------
   One content column on every page. The header and the .wrap pages use a
   1180px container with 28px sides (content edge 158px in from the left
   at 1440). The .shell pages did not: Membership used 1220/24 (134px) and
   its pricing block 1220/0 (110px, only 30px from the screen edge at
   1280), while Articles and the legal pages used 1120/24 (184px). So the
   logo, the page heading and the pricing emblem sat on three different
   left edges. Every .shell now shares the header's column.
   --------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .shell { max-width: 1180px; padding-left: 28px; padding-right: 28px; }
  .hef-posters { padding-left: 28px; padding-right: 28px; }
  .hef-posters .hp-shell { max-width: 1124px; }
}

/* Articles: no double rule between the head and a first chapter that
   follows it directly (mirrors mobile.css) */
@media (min-width: 1024px) {
  .article-body > .shell > .chapter:first-child { border-top: 0; }
}

/* Left aligned footer (legal pages carry ten links): at 1024 to 1099px the
   row wrapped 9 + 1 with Instagram alone. A slightly tighter gap keeps it
   on one line, with room for a classic scrollbar. */
@media (min-width: 1024px) and (max-width: 1099.98px) {
  .footer-nav { column-gap: 22px; }
}
/* ==== LAYOUT ENGINEER: END ==== */

/* ==== SITE B: BEGIN ==== */
/* QA round 1 fixes (desktop). Applied by team/siteb-patch.py. */
@media (min-width: 1024px) {
  /* Articles (QA M2, M3): reading lines were 93 to 103 characters and three
     articles sat on a 1240px grid 30px off the title. One template: 18px
     text on a 600px measure (about 70 to 74 characters), on the header column. */
  .article-body > .shell { max-width: 1180px; }
  .article-body .chapter-body, .article-body .takeaways { max-width: 600px !important; }
  .article-body .chapter-body p, .article-body .chapter-body li { font-size: 18px; line-height: 1.75; }
  .article-body .chapter-body p.lead { font-size: 21px; line-height: 1.6; max-width: none; }
  .article-body .chapter-body p.pull { font-size: 20px; max-width: none; }
  .article-foot .next-up { max-width: 600px; }

  /* Long measures elsewhere (QA M2): membership small print and FAQ, and
     the centred leads on About and The Endurance Method */
  .hp-terms .bx-row__body p, .faq .answer p { max-width: 38em; }
  .p-lead, .wrap.center .p-lead { max-width: 36em; }

  /* Articles index (QA M4): two columns per card, meta and title on the
     left, summary and link on the right, instead of one narrow column */
  .article-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 56px; align-items: start; }
  .article-card .card-meta, .article-card h2 { grid-column: 1; }
  .article-card p, .article-card .read-on { grid-column: 2; }
  .article-card .card-meta { grid-row: 1; }
  .article-card h2 { grid-row: 2; max-width: none; }
  .article-card p { grid-row: 1 / span 2; align-self: start; margin-top: 0; }
  .article-card .read-on { grid-row: 3; justify-self: start; }

  /* About h1 (QA M5) and founder copy (QA m4): the gold clause is its own
     block so it balances; the founder text starts at the photo's top */
  .p-h1 > span { display: block; }
  .f-wrap { align-items: start; }
}
/* ==== SITE B: END ==== */
