/* ZARYA V29.08 RC2 — production hardening. Minimal, scoped corrections; loaded last on every page.
   Each block names the defect it closes (see RC2 defect register). No design tokens are changed. */

/* RC2-01 · Home chapter 1 headline (Your Opportunity) overflowed the viewport from 600px to 1023px.
   Cause: .fit .ln is nowrap from 600px up, but the authored line is about 20em wide while its fit factor assumes 15.6em,
   so it ran past the column (and the screen). Below 1024px it now wraps onto two lines exactly as it already does below 600px. */
@media (min-width: 600px) and (max-width: 1023px) {
  html body #econ-h.fit .ln { white-space: normal !important; }
}

/* RC2-02 · How It Works stage content collapsed to 0px height at 899px and below (phones and tablets).
   Cause: a legacy rule (html body #howItWorksStory .integrated-frame{height:auto!important}) outranked the
   measured --hw-h height, so the iframe parent had no height. The measured height now wins for block stages only;
   the intro and closing states keep their own auto height. */
@media (max-width: 899px) {
  html body #howItWorksStory.state-block .integrated-frame { height: var(--hw-h, 1320px) !important; }
}

/* RC2-03 · Reduced motion: dark CTAs and assumption cards still lifted on hover under prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  html body :is(a.btn, button.navbtn.primary, a[class*="cta"], button[class*="cta"], a[class*="primary"], button[class*="primary"], .zarya-dark-cta, .zj-btn.primary):is(:hover, :active, :focus-visible):not(#rc2),
  html body #z-oe .oe7-assumption:is(:hover, :focus-within, [open]):not(#rc2) {
    transform: none !important;
    filter: none !important;
  }
  html body :is(a.btn, button.navbtn.primary, a[class*="cta"], button[class*="cta"], a[class*="primary"], button[class*="primary"], .zarya-dark-cta, .zj-btn.primary):not(#rc2) {
    transition: none !important;
    will-change: auto !important;
  }
}

/* RC2-04 · Chapter progress "of 05" label: contrast 3.92:1 on the warm chip failed WCAG AA (4.5:1). 5.03:1 now. */
html body .zj-progress .zj-po,
html body .progress .zj-po { color: #5a687a !important; }

/* RC2-05 · Home "Explore Owner Earnings" lifted but showed no hover shadow (every other dark CTA does).
   Cause: a legacy rule whose selector list contains an ID (button#explore…) outranks the shared hover shadow. */
@media (hover: hover) and (pointer: fine) {
  html body a.btn.zarya-dark-cta:hover:not(:disabled):not([aria-disabled="true"]):not(#rc2) {
    box-shadow: 0 13px 25px rgba(6, 20, 35, .19), 0 4px 8px rgba(6, 20, 35, .07) !important;
  }
}

/* RC2-06 · "← Previous" broke onto two lines beside the progress label on narrow phones (About, Trust & Security).
   The label is allowed to shrink instead of the button. */
@media (max-width: 640px) {
  html body .zj-actions .zj-btn { white-space: nowrap !important; flex-shrink: 0 !important; }
  html body .zj-actions .zj-progress { flex-shrink: 1 !important; min-width: 0 !important; }
}

/* RC2-07 · How It Works chapter tabs overlapped each other from 801px to 1279px (tablets, small laptops).
   Cause: the nine tabs sit in a nine-column grid whose columns (87–137px) are narrower than the 164px minimum width each tab carries,
   so neighbouring labels printed over one another. This range now uses the same horizontally scrolling strip as phones (600–800px). */
@media (min-width: 801px) and (max-width: 1279px) {
  html body #howItWorksStory .journey { display: flex !important; overflow-x: auto !important; scrollbar-width: none; -ms-overflow-style: none; }
  html body #howItWorksStory .journey::-webkit-scrollbar { display: none; }
  html body #howItWorksStory .journey button { flex: 0 0 164px !important; min-width: 164px !important; }
}
