/* ============================================================================
   _band-mobile.css — THE PHONE BAND
   ----------------------------------------------------------------------------
   Lane: fluid:mobile.  Owns: this file only.
   Widths this lane is accountable for: 640 · 480 · 430 · 390 · 375.
   All five sit inside Salient's phone tier (<= 690), so one media block covers
   them; a second, narrower block carries the two rules whose own arithmetic
   puts their edge at 480.

   LOAD ORDER: this file must be linked LAST, after css/reduced-motion.css, so
   it outranks every section sheet. It is a REPAIR layer, not a system layer —
   the system is review/fluid/grid-fluid.css and nothing here restates it.

   WHAT THIS FILE MAY NOT DO
   - It may not touch any width >= 1000. Every rule is inside a max-width query
     whose edge is 768 or below, so the 1280 and 1440 artboards cannot move.
     Verified: the fidelity harness is unchanged at both artboards (band-mobile.md
     §6).
   - It may not invent a number. Every value below is either a token, a value
     inherited from the element that already owned it, or an accessibility
     minimum with a citation.

   HOW THE WIDTHS WERE MEASURED
   Headless Chrome refuses a window narrower than 500px, which is why
   FLUID-SYSTEM.md §8.1 records 375/390/430/480 as "computed, not measured" and
   asks for a real-device pass. This lane closed that gap without a device:
   review/fluid/cdp_mobile.py drives Chrome over the DevTools Protocol and sets
   the viewport with Emulation.setDeviceMetricsOverride, which has no floor.
   Every number in the comments below is a real browser layout at that width.
   ========================================================================== */


/* ==========================================================================
   1. 14-amenities — THE BLANK BAND
   --------------------------------------------------------------------------
   SYMPTOM: at every width <= 768 the section paints as an empty 900px cream
   band. Nothing in it renders — not the photograph, not the headline, not the
   spec pill. Measured section height 900, measured CONTENT height 0.

   ROOT CAUSE, measured: 14-amenities.css:183 sets `.mk-amenities{height:900px}`
   and :220 hangs the slider stack off it with `height:100%`:
       .mk-amenities > .nectar-carousel,
       .mk-amenities .nectar-flickity.nectar-simple-slider { height: 100%; }
   Its own comment says "the height chain has to reach the cells or the cold
   render collapses". At 768 the section releases the fixed height on purpose
   (14-amenities.css:701-705, so the headline can reflow past 900):
       @media (max-width: 768px) { .mk-amenities { height: auto; min-height: 900px } }
   A percentage height against an `auto` containing block has no base, so the
   whole chain resolves to zero and the collapse the :220 comment warns about
   is exactly what happens. Bisected: 999/1024/1280 -> 900. 768/691/690/640 -> 0.

   FIX: `min-height: inherit`. It carries the section's OWN min-height down the
   chain, so this file states no height of its own — change the 900 in
   14-amenities.css and this follows it. `min-height` also leaves the release
   intact: the band can still grow past 900 when the headline reflows, which is
   the thing the section's 768 rule was written to allow.

   Scoped to 768 — the defect's own edge — not to 690, so the tablet lane does
   not inherit a hole. If review/fluid/band-xs.md ships the same rule the two
   are identical and idempotent; see BAND-REQUESTS.md B4.
   ========================================================================== */

@media (max-width: 768px) {
  .mk-page .mk-amenities > .nectar-carousel,
  .mk-page .mk-amenities .nectar-flickity.nectar-simple-slider,
  .mk-page .mk-amenities .nectar-flickity .flickity-viewport,
  .mk-page .mk-amenities .nectar-flickity .flickity-slider,
  .mk-page .mk-amenities .nectar-flickity .flickity-slider > .cell {
    min-height: inherit;
  }
}


/* ==========================================================================
   2. THE PHONE TIER — Salient's own <= 690 edge
   ========================================================================== */

@media (max-width: 690px) {

  /* ------------------------------------------------------------------------
     2.1  THE HEADER CTA
     ------------------------------------------------------------------------
     FLUID-SYSTEM.md §5.2: Salient never hides the header CTA when the menu
     collapses — it is laid out at every width on both demos that have one
     (architect 187.91 -> 154.23, resort 160.52 -> 160.28). V1 nests it as the
     fifth <li> of .mk-nav__list, so the 1050 collapse takes it to 0 x 0.
     Measured here at 640 / 480 / 430 / 390 / 375: 0 x 0 at all five.

     The real fix is structural (move the CTA out of <nav>, FLUID-SYSTEM §5.2)
     and it belongs to whoever owns index.html — filed as BAND-REQUESTS.md B1.
     Until that lands, this restores the CTA from CSS alone, and it RETIRES
     ITSELF the moment the markup is fixed: every rule is gated on
     `.mk-nav:has(.myk-btn--nav-cta)`, which stops matching as soon as the CTA
     is no longer inside the nav. No rule here can fight the structural fix.

     WHY 480 AND NOT 375 — the arithmetic, all four numbers measured with the
     CTA forced visible:
         wordmark (intrinsic, not the flex:1 stretch) 101.6
         CTA (pin released, phone type step 15px)     162.5
         search                                        54
         hamburger                                     60
         three 12px gaps (--mk-space-12)               36
         -------------------------------------------------
         required                                     414.1
     Content box below 1000 is 0.88 x vw (FLUID-SYSTEM §2), so the header holds
     all four items above vw = 414.1 / 0.88 = 470.6.
         640 -> content 563.2, fits with 149.1 to spare   SHOWN
         480 -> content 422.4, fits with   8.3 to spare   SHOWN
         430 -> content 378.4, short by  35.7             not shown
         390 -> content 343.2, short by  70.9             not shown
         375 -> content 330.0, short by  84.1             not shown
     Below 480 the CTA can only be shown by removing the header search control
     (the off-canvas menu carries no search field, so that deletes the
     affordance) or by shrinking the wordmark. Both are decisions above this
     lane — BAND-REQUESTS.md B2 carries the numbers and the two options. At
     those three widths the CTA stays reachable as the last item of the
     off-canvas menu (index.html:4629), which is one tap, not zero.
     ---------------------------------------------------------------------- */

  /* Release the Figma-1280 width pin (myk-btn.css:491, `width: 169px`). Those
     five pins exist to zero sub-pixel drift against the 1280 artboard and have
     no authority at a tier with no artboard; at the 15px phone type step the
     button's own content width is 162.5. The pin is (2 ids, 3 classes, 2 types);
     the `.mk-page ` prefix makes this (2, 4, 2), so it wins on SPECIFICITY and
     not on source order — the band sheet is then correct at either of the two
     cascade positions the other lanes have asked for (BAND-REQUESTS REQ-md-02
     vs REQ-XL-1). Measured both ways: identical at all five widths. Without the
     prefix the pin survives at the early position and the CTA renders 169 wide,
     which still fits but leaves 1.8px of slack at 480 instead of 8.3. */
  .mk-page #header-outer #top .mk-nav__list > li > a.myk-btn.myk-btn--nav-cta,
  /* ...and the same release for the POST-STRUCTURAL-FIX selector. Added by the
     single-owner pass 2026-08-17 when the CTA moved out of <nav> into
     .mk-header__actions and myk-btn.css re-pointed the 169px pin with it. The
     rule above is kept so this file still retires cleanly either way. */
  .mk-page #header-outer #top .mk-header__actions > .menu-item > a.myk-btn.myk-btn--nav-cta {
    width: auto;
  }

  /* ------------------------------------------------------------------------
     2.1b  BELOW 480 THE HEADER CTA DOES NOT FIT — REQ-mobile-02, now ENFORCED.
     ------------------------------------------------------------------------
     Until the structural fix landed this was enforced by omission: the CTA was
     0 x 0 at every width <= 1050 and this file only restored it at 480-690. The
     structural fix makes it visible at EVERY width, so the <=479 case now needs
     saying out loud instead of being inherited.

     THE ARITHMETIC IS UNCHANGED AND IT IS DECISIVE (all four measured):
       wordmark 101.6 + CTA 162.5 + search 54 + hamburger 60 + 3 gaps 36 = 414.1
       content below 1000 = 0.88 * vw, so all four fit only above vw 470.6.
       640 -> 563.2 (+149.1)   480 -> 422.4 (+8.3)   430 -> 378.4 (-35.7)
       390 -> 343.2 (-70.9)    375 -> 330.0 (-84.1)
     MEASURED WITH THE CTA FORCED VISIBLE AT 375: #logo lands at x = -19.52,
     i.e. the wordmark's first glyphs are pushed off the left edge of the page.
     A clipped wordmark is a worse failure than a CTA that costs one tap, and
     "no clipped text" is a correctness gate where "CTA in the header" is a
     feature one.

     SO AT <= 479 THE CTA FALLS BACK to the last item of the off-canvas menu
     (index.html, #slide-out-widget-area) — one tap, not zero. It is NOT
     restyled into a look-alike of myk-btn--outline; duplicating a component's
     paint in a band sheet is the drift the zero-slop rule exists to stop.

     THIS IS A FOUNDER DECISION AND IT IS STILL OPEN. Two costed options, both
     above this pass, both recorded in build/FLUID-APPLIED.md:
       (A) drop the header search control at <=479 (frees 66px; reaches 430 but
           still not 390/375, and the off-canvas menu carries no search field);
       (B) ship a shorter CTA label at the phone tier — the only option that
           also scales to V2, whose Spanish label is longer and does not fit
           even at 480.
     ---------------------------------------------------------------------- */
}

@media (max-width: 479px) {
  /* The WRAPPER, not the item inside it. Hiding only the .menu-item leaves
     .mk-header__actions in the header row as a zero-width flex item, and the
     row's own 12px gap still counts it: MEASURED at 375, #logo came back
     180 wide instead of the 192 it has with no CTA in the row at all. Hiding
     the wrapper removes the flex item and the gap with it. */
  .mk-page #header-outer #top .mk-header__actions { display: none; }
}

@media (min-width: 480px) and (max-width: 690px) {
  /* Un-hide the nav shell ONLY while it still contains the CTA.
     CONVENTIONS §8.6 — say which rule forced the override. This one is
     Salient's own, and it is `!important`:
         responsive.q-7f4f1bd5af.css
         @media only screen and (min-width:1px) and (max-width:999px) {
           #header-outer #top nav, .slider-nav span span { display: none !important }
         }
     Confirmed by walking document.styleSheets against this element in the
     running page — it is the only display rule that beats grid-fluid.css's own
     `.mk-nav{display:none}` at 1050. Matching it takes the two ids and the
     `!important`; `:has()` then adds the self-retiring gate on top. */
  #header-outer #top nav.mk-nav:has(.myk-btn--nav-cta) {
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;               /* must not eat the wordmark's flex:1 space */
  }
  /* Second rule from the same Salient sheet and the same media band, and it
     only ever applied because the nav was hidden:
         #header-outer #top nav > ul { padding: 15px 0 25px }
     Un-hiding the nav made it 15 + 44 + 25 = 84 tall inside a 40px header row.
     site.css:150 already zeroes this at desktop specificity; it has to be
     zeroed again here because responsive.css re-states it below 1000. */
  #header-outer #top nav.mk-nav:has(.myk-btn--nav-cta) > ul.mk-nav__list {
    padding: 0;
  }

  /* ...and show nothing in it but the CTA. The four text links stay in the
     off-canvas menu, which is Salient's behaviour and V1's own stated intent
     (grid.css:199-201, "keeping logo · CTA · search · hamburger"). */
  #header-outer #top nav.mk-nav:has(.myk-btn--nav-cta)
    .mk-nav__list > li:not(:has(.myk-btn--nav-cta)) {
    display: none;
  }
}

@media (max-width: 690px) {

  /* ------------------------------------------------------------------------
     2.2  TOUCH TARGETS — WCAG 2.5.5 (AAA) / Apple HIG, 44 x 44
     ------------------------------------------------------------------------
     grid-fluid.css §8.2 already lifts .myk-btn, .myk-btn--icon, .mk-nav__list a
     and the hamburger to 44 at <= 999, and that holds (measured: search 54 x 44,
     hamburger 60 x 44). It does not reach the controls below, every one of
     which was measured failing at 375:

        21-logos-footer  24 x <a> in the four link columns   330 x 24
        21-logos-footer  .mk-footer__social                   18 x 18
        18-cta-expand    a.link_text (x2)                    174 x 24, 194 x 24
        14-amenities     a.column-link                       310 x 40
        16-amenities-52  a.mk-amenities52__cta               207 x 40
        00-hero          a.nectar-next-section               17.4 x 39.5

     `min-height` + centring rather than padding: padding would move the ink,
     min-height grows the hit box around ink that stays where the design put it.
     ---------------------------------------------------------------------- */

  .mk-page .mk-footer__col > a,
  .mk-page a.column-link,
  .mk-page .mk-amenities52__cta,
  .mk-page a.nectar-next-section {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* 18/19's two buttons are Salient `.nectar-cta` composites: the PILL is the
     div, the interactive element is the <a> inside it, and the <a> is 24 tall
     inside a 40 pill. Growing the anchor alone would push it out of its own
     pill, so the pill and the two spans inside it move together — the hit box
     then matches the thing a finger is aiming at, which is the point of 2.5.5.
     Costs 4px of pill height at the phone tier and nothing above 690. */
  .mk-page .mk-ctacard__btn,
  .mk-page .mk-ctacard__btn .link_wrap,
  .mk-page .mk-ctacard__btn a.link_text {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* The three social glyphs are 18 x 18 of ink. Give the anchor a 44 box and
     centre the glyph in it; the glyph itself does not change size. */
  .mk-page .mk-footer__social {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* The hero's next-section chevron is 17.4 wide — the arrow glyph. Widen the
     hit box without moving the arrow: it is already centred in the band. */
  .mk-page a.nectar-next-section {
    min-width: 44px;
    justify-content: center;
  }


  /* ------------------------------------------------------------------------
     2.3  17-amenities-54 — THE CLIPPED PROVINCE LABEL
     ------------------------------------------------------------------------
     SYMPTOM: "GUANACASTE PROVINCE / COSTA RICA" is cut off by the right edge
     of the map plate. Measured ink overflow: 0 at 640, 0 at 480, 18 at 430,
     38 at 390, 46 at 375.

     ROOT CAUSE, and it is Salient's own: responsive.q-7f4f1bd5af.css ships
         @media (max-width: 690px) { .nectar-google-map { max-height: 270px } }
     (425px in the 691-999 band). The section's annotation plane is deliberately
     sized to the COVER-RENDERED raster box so its percentage anchors stay
     registered to the map (17-amenities-54.css:386-394, aspect 1280/891). Once
     the plate is capped at 270 tall that box is 387.88 wide at EVERY width
     <= 690, and the label's authored anchor — left 62.421875% of the plane,
     box 195px — lands its box right edge at
         50vw + (0.62421875 x 387.88 - 387.88/2) + 195  =  50vw + 243.19
     which clears the viewport only above vw 502. The ink inside the box is
     ~175px centred, so the visible text clears above vw ~460.

     WHY IT CANNOT BE FIXED BY SCALING: the label's ink CENTRE sits at ~88% of
     a 375px viewport. No font-size and no plate height moves that centre —
     both operate on the plane, and the plane is already exactly the raster.
     Reducing the label type to 6px would still not fit it. The anchor has to
     move, or the label has to go.

     FIX: move the anchor, keep the content, and move it ONLY as far as it has
     to. The box is re-hung from the plane's right edge as the LATER of two
     offsets, so the rule is a strict no-op wherever the authored anchor still
     fits:

       arm 1  calc(100% - 62.421875% - 195px)
              the authored anchor, restated as a right offset. Both numbers are
              17-amenities-54.css:459-460 verbatim (`left: 62.421875%`,
              `width: 195px`). IF THOSE TWO CHANGE, CHANGE THESE TWO WITH THEM.
       arm 2  calc((100% - 100vw) / 2 + var(--mk-page-x) ... )
              never past the viewport. `(100% - 100vw) / 2` IS the plane's
              overhang — the plane is centred, so half its excess over the
              viewport hangs off each side. Introduces no number: 100% is the
              plane, 100vw is the viewport, and the seam is --mk-space-4, the
              card-seam token GRID.md §5.3.4 already fixes at every width.

     `max()` picks whichever pushes the box further from the right edge, which
     is arm 1 until the box would leave the viewport and arm 2 after. Measured
     travel: 0 at 640 (untouched), 7 at 480, 32 at 430, 47 at 390, 60 at 375.

     text-align stays CENTER so the two lines keep the authored setting. At the
     three widths where it moves, the label shifts against a plate that is
     already showing only 30% of the map — flagged in band-mobile.md §5 as the
     one place this lane moves authored geometry.
     ---------------------------------------------------------------------- */

  .mk-page .mk-map54__label--province {
    left: auto;
    right: max(calc(100% - 62.421875% - 195px),
               calc((100% - 100vw) / 2 + var(--mk-space-4)));
  }
}


/* ==========================================================================
   3. WHAT THIS FILE DELIBERATELY DOES NOT DO
   --------------------------------------------------------------------------
   Recorded so the next reader does not assume they were missed.

   a) 19-cta-contract measures 0 x 0 at every width <= 999. That is CORRECT and
      authored: 19-cta-contract.css:47 hides it below 999 because its <picture>
      resolves to the same asset as 18-cta-expand and the scrub that made the
      two different is disabled there. Not a defect; do not "fix" it.

   b) 07-building's carousel is Salient Flickity markup, so grid-fluid.css §7.3
      `.mk-gallery` never matches anything in V1 — it is dead code here. The
      live rule is 07-building.css:470-476, `width: 85vw` at <= 689, measured
      544 at 640 and 318.75 at 375, one card plus a peek, aspect held at
      410/600 (466.4 tall at 375). The system asks for `min(410px, 78vw)`,
      which would hold the authored 410 card at 640 instead of inflating it to
      544. Both are marked INFERRED by their own authors and they disagree only
      above vw 526. Not a break — filed as BAND-REQUESTS.md B3 for one owner to
      reconcile, not overridden from here.

   c) 06-ecology-c's `.row_col_wrap_12.col.span_12` overhangs both edges by
      exactly 1% of the viewport (3.75px at 375, 6.39 at 640). That is Salient's
      own 12-column negative margin on `.span_12`; the section's own content is
      correctly inset at 6vw and nothing visible is lost, because
      grid-fluid.css §1 puts `overflow-x: clip` on .mk-page. Cosmetic, clipped,
      and touching Salient's grid to chase it would risk every other row.

   d) `#logo` is 101.6 x 24 of ink in a 40px header row and so fails the 44px
      minimum. Growing it grows the header row, which moves the top of the hero
      and every section under it. Reported in band-mobile.md §4, not fixed here.

   e) The four link columns in 21-logos-footer and the 5-track footer grid
      already collapse to one column at the phone tier — grid-fluid.css §7.2 and
      the section's own rules. Measured single-column at all five widths. The
      partner-logo strip beside them is a Flickity marquee whose cells extend
      past the viewport by design; its .flickity-viewport clips them and the
      page does not scroll horizontally (measured docOverflow 0 at all five).
   ========================================================================== */
