/* hz-mobile-p1.css (2026-11-10) - Phase 1 mobile fixes. Loaded ONLY when tevosMobileP1On() (includes/mobile-p1-flag.php); link media (max-width:1000px) since 2026-11-10 (tablets),
   Rules 1-3 and 7 apply up to 1000px, rules 4-6 up to 640px; desktop (over 1000px) is untouched.
   Scope: form controls, tap targets, text floor, hero clearance. Colours/tokens: none introduced (no colour is set here).
   !important is used in ONE rule (marked) to override inline style="" attributes. */
@media (max-width: 1000px) {

  /* 1. Form controls: 16px stops iOS zoom-on-focus; 44px tall touch target */
  html[data-rd] body :is(input, select, textarea):not([type=checkbox], [type=radio], [type=range], [type=hidden], [type=file], [type=submit], [type=button], [type=reset], [type=color], [type=image]) {
    font-size: 16px;
    min-block-size: 44px;
  }
  html[data-rd] body .bd-filters button {
    min-block-size: 44px;
  }

  /* 2. Tap targets */
  /* 2a. in-sentence links: padding lifts the link box to 24px or more; the negative margin cancels it for inline-block links (no effect on inline ones) */
  html[data-rd] body :is(.tvx-lead, .tvx-section p, .tmt-prose, .tmt-hero > p, .sal-bc, .hz-leadin, .offer-faq p, .bd-methodology, .cty-author, .hzx-live__meta, .jb-sub, .bd-empty p) a:not([class*="cta"], .cty-back, .rd-copy-link) {
    padding-block: 5px;
    margin-block: -5px;
  }
  /* 2a2. the two /offer links on the bands page sit alone in their paragraphs, so a full 44px box is safe there */
  html[data-rd] body .rd-copy-link {
    padding-block: 13px;
    margin-block: -13px;
  }
  /* 2b. jobs list: title link spans a 44px box; negative margin cancels the layout growth */
  html[data-rd] body .jb-card-title a {
    display: block;
    box-sizing: border-box;
    min-block-size: 44px;
    padding-block: 13px;
    margin-block: -13px;
  }
  html[data-rd] body .jb-signup-nudge a {
    min-block-size: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
  }
  /* 2c. salary index: list links become 44px rows with 8px between them */
  html[data-rd] body .tvx-section > ul[style*="line-height:2"] > li > a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-block-size: 44px;
  }
  html[data-rd] body .tvx-section > ul[style*="line-height:2"] > li + li {
    margin-block-start: 8px;
  }
  /* 2d. breadcrumb on the job page */
  html[data-rd] body .jbp-crumb a {
    display: inline-flex;
    align-items: center;
    min-inline-size: 44px;
    min-block-size: 44px;
    box-sizing: border-box;
    padding-inline: 8px;
    margin-inline: -8px;
  }
  /* 2e. city hub */
  html[data-rd] body .cty-back {
    min-block-size: 44px;
    align-items: center;
  }
  html[data-rd] body .cty-list-item,
  html[data-rd] body .cty-cta {
    min-block-size: 44px;
    box-sizing: border-box;
  }
  html[data-rd] body .cty-list { row-gap: 8px; }
  html[data-rd] body .cty-cta-row { gap: 8px; }

  /* 3. Text floor: 12px minimum, 13px for sentence-like copy */
  html[data-rd] body :is(
    .sc-label, .sc-time, .dc-name, .txt-l, .jp-co, .jp-loc, .hzx-live__ax span,
    .jb-tag, .jbp-crumb, .jbp-crumb a,
    .offer-form-title, .offer-field label, .offer-field label small,
    .bd-filters button, .bd-section-count, .bd-cell-eyebrow span, .bd-pill, .bd-cell-eyebrow strong,
    .bd-cell-band span, .bd-cell-band strong, .bd-cell-meta, .bd-cell-meta strong, .tvx-fresh,
    .cty-back, .cty-stat-lbl, .cty-list-item span,
    .tmt-pipe-title, .tmt-compare-card h4, .tmt-spec dt,
    .tpr-cand-price .lbl, .tpr-tier-name, .tpr-tier-price .per, .tpr-explain-mono
  ) {
    font-size: 12px;
  }
  html[data-rd] body :is(.offer-credit, .offer-credit strong, .bd-methodology, .bd-methodology a, .tpr-cand-note, .cty-cta) {
    font-size: 13px;
  }
  /* two spots carry font-size in an inline style="" attribute (shared footer brand strip, bands subtitle and freshness stamp): the only !important in this file */
  html[data-rd] body .tmt-hero > p[style*="font-size:11px"],
  html[data-rd] body .lp-foot-brand > div[style*="font-size"],
  html[data-rd] body .tvx-section > p[style*="font-size:.68rem"],
  html[data-rd] body .tvx-fresh[style*="font-size:.68rem"] {
    font-size: 12px !important;
  }

  /* rules 1-3 above apply to phones and tablets (the stylesheet link is media=(max-width:1000px)); rules 4-6 below are phone-only */
}

@media (max-width: 640px) {
  /* 4. Hero clearance: pages that reserve 124px (!important in tevos-horizon-site.css) under the decorative scene keep the scene visible,
        but the topbar gap shrinks by 76px so content starts at about 32svh instead of 42svh and the primary action lands in the first screen.
        Done on .topbar margin (no !important needed). */
  html[data-rd] body:has(> :is(main.jobs-main, main.jbp, main.cp-wrap, main.gx-wrap, main.hz-nf)) .topbar {
    margin-bottom: max(0px, calc(var(--hz-clear) - 136px));
  }

  /* 5. Sticky header: hz-soft fades .topbar to transparent so page text showed through it. Phones get the sky token at 94% plus blur (tokens only, both themes: --hz-sky-a is themed). */
  html[data-rd] body .topbar,
  html[data-rd][data-ink] body .topbar {
    background: color-mix(in srgb, var(--hz-sky-a) 94%, transparent);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
  }

  /* 6. Home hero whitespace (default home only, not the hv2 preview): same 76px topbar-gap cut as rule 4, and 64px instead of 104px above the H1. */
  html[data-rd] body:has(> main:not(.hv2) > .hero) .topbar {
    margin-bottom: max(0px, calc(var(--hz-clear) - 136px));
  }
  html[data-rd] body main:not(.hv2) > .hero {
    padding-top: 64px;
  }
}


/* 7. Tablets only (641-1000): the shared footer link columns get the 44px rows phones already get from another sheet. */
@media (min-width: 641px) and (max-width: 1000px) {
  html[data-rd] body .lp-foot-col a {
    display: flex;
    align-items: center;
    min-block-size: 44px;
  }
}
