/* ============================================================
   Bellingham Floor Pros — mobile readability layer
   ------------------------------------------------------------
   Injected on every page by scripts/site-layer.mjs (step 10).
   Purpose: the site's core audience is 50+ homeowners reading on
   a phone. This layer overrides the per-page inline CSS on small
   screens only (<= 768px CSS px) so that:
     - nothing on the page is smaller than 15px, body copy is 18px
     - grey-on-cream text is dark enough to read in daylight
     - the header stops eating a quarter of the screen
     - every button, chip, link and form field is a real thumb target
     - decorative motion (ticker, slide-in) gets out of the way
   Desktop is untouched. Edit here, never in the page files.
   ============================================================ */

/* Phones that have "Request Desktop Site" switched on render at ~980px and
   would miss a plain max-width query, so touch devices are covered up to
   1024px too (that also picks up iPads). Mouse-driven screens above 768px
   are untouched. */
@media (max-width: 768px), ((pointer: coarse) and (max-width: 1024px)) {

  :root {
    /* lighter gold for text sitting on dark backgrounds (the brand
       gold #8B5A2B is only ~3.4:1 on #1A1A1A) */
    --gold-on-dark: #D8A86A;
    /* darker grey for secondary copy on cream/white (#6B7280 was ~4.3:1) */
    --gray: #454A54;
    --gray-light: #5B6170;
  }

  html { -webkit-text-size-adjust: 100%; }

  /* ---------- base type ---------- */
  html body {
    font-size: 20px !important;
    line-height: 1.6;
    padding-bottom: 100px; /* room for the bigger sticky call bar */
  }
  body p, body li, body dd, body td, body th, body figcaption, body summary {
    font-size: 1rem;
  }
  body .content p, body .content li,
  body .svc p, body .step p, body .value-col p, body .blog-card p,
  body .post-card p, body .card-link p, body .section-sub,
  body .faq-a, body .faq-a p, body .pricing-scope, body .testi-small p,
  body .magnet-content > p, body .footer-brand p, body .g-pdf p,
  body .offer-copy p, body .answer-block, body .hero p, body .page-hero p,
  body .form-reassure .section-sub, body .reassure-item p, body .grw-label {
    font-size: 20px !important;
    line-height: 1.6 !important;
  }
  body .content p, body .content li { line-height: 1.65 !important; margin-bottom: 22px; }
  body .content ul, body .content ol { padding-left: 1.3em; }
  body .content li { margin-bottom: 10px; }
  body .content p a:not(.btn):not(.btn-outline):not(.read-more), body .content li a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

  /* small grey copy becomes dark enough to read in daylight */
  body .svc p, body .step p, body .blog-card p, body .post-card p, body .card-link p,
  body .section-sub, body .faq-a, body .pricing-scope, body .grw-label,
  body .content blockquote { color: #2F333B !important; }
  body .section-dark .section-sub, body .form-section .section-sub,
  body .form-reassure .section-sub { color: #E4DED4 !important; }
  body .value-col p { color: #E0E0E0 !important; }
  body .magnet-content > p { color: #ECE6DC !important; }
  body .footer-brand p, body .footer-col ul a, body .footer-contact-line { color: #DCD6CC !important; }

  /* headings: slightly smaller than desktop clamps so they wrap less,
     but never cramped */
  body h2, body .section-title { line-height: 1.12 !important; }
  body .section-title { font-size: 2.35rem !important; }
  body .content h2 { font-size: 1.95rem !important; line-height: 1.18 !important; margin-top: 44px !important; }
  body .content h3 { font-size: 1.5rem !important; line-height: 1.3 !important; }
  body .svc h3 { font-size: 1.85rem !important; }
  body .blog-card h3, body .post-card h3 { font-size: 1.5rem !important; line-height: 1.25 !important; }
  body .faq-q { font-size: 1.4rem !important; line-height: 1.3 !important; padding: 22px 0 !important; gap: 16px !important; }
  body .faq-q::after { font-size: 2rem !important; }
  body .faq-a.open { max-height: none !important; padding: 0 0 26px 0 !important; }
  body .testi-feature blockquote { font-size: 1.45rem !important; line-height: 1.3 !important; }
  body .pricing-name { font-size: 1.45rem !important; line-height: 1.15 !important; }
  body .pricing-range { font-size: 1.45rem !important; }
  body .hood-row-name { font-size: 1.45rem !important; line-height: 1.15 !important; }
  body .footer-contact-line strong { font-size: 1.7rem !important; }

  /* ---------- the tiny mono labels ---------- */
  /* Every uppercase mono "eyebrow"/meta/badge was 10–12px with wide
     tracking. Floor them at 15px and pull the tracking in. */
  body .eyebrow, body .hero-meta, body .hero-meta span, body .hero-estimators > span,
  body .breadcrumb, body .breadcrumb a, body .svc-badge, body .value-tag, body .ba-tag,
  body .ba-meta-loc, body .step-time, body .blog-meta, body .area-tag, body .coord,
  body .hood-map-label .coord, body .testi-platform, body .footer-badges-title,
  body .footer-col h5, body .logo-sub, body .footer-brand .footer-logo .logo-sub,
  body .hood-row-idx, body .hood-row-arrow, body .pricing-idx, body .hero-secondary,
  body .magnet-privacy, body .offer-fineprint, body .popular-badge,
  body .testi-small-foot span, body .post-card .post-byline, body .post-byline,
  body .crew-photo figcaption, body figcaption, body .footer-legal,
  body .content h2::before, body .review-bar-title, body .form-proof-strip,
  body .magnet-book-meta, body .read-more, body .hood-row-name em, body .ticker-item {
    font-size: 16px !important;
    letter-spacing: .05em !important;
    line-height: 1.4 !important;
  }
  body .breadcrumb { white-space: normal; line-height: 1.6 !important; }
  body .hero-meta { padding: 10px 14px !important; gap: 8px; flex-wrap: wrap; }
  body .hero-meta .dim { opacity: .7; }
  body .logo-name { font-size: 1.3rem !important; }
  body .logo-sub { font-size: 15px !important; }
  body .testi-author-info strong, body .testi-small-foot strong { font-size: 1rem !important; }
  body .testi-author-info span { font-size: 16px !important; }
  body .footer-legal { line-height: 1.7 !important; }
  body .footer-legal a { margin-left: 0 !important; margin-right: 14px; display: inline-block; padding: 4px 0; }

  /* gold text on dark backgrounds gets the lighter gold */
  body .hero h1 .swash, body .hero h1 span, body .logo-name em,
  body .section-dark .eyebrow, body .form-section .eyebrow, body .form-reassure .eyebrow,
  body .section-dark .section-title em, body .form-reassure h2 em, body .magnet-content h3 em,
  body .hero-secondary svg, body .footer-col h5, body .footer-contact-gold, body .footer-link,
  body .testi-feature blockquote em, body .page-hero .eyebrow, body .page-hero h1 em,
  body .offer-copy h3 em, body .hero-stat-card .num, body .value-col .eyebrow,
  body .footer-brand .footer-logo em, body .hero-phone:hover {
    color: var(--gold-on-dark) !important;
  }
  body .hero-phone { color: #fff !important; font-size: 1.3rem !important; font-weight: 700 !important; }

  /* hero: darker scrim so white text always clears the photo */
  body .hero-bg::after {
    background: linear-gradient(to bottom, rgba(0,0,0,.62) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.9) 100%) !important;
  }
  body .hero { min-height: 0 !important; padding: 56px 20px 72px !important; }
  body .hero h1 { font-size: 2.9rem !important; line-height: 1.05 !important; margin-bottom: 20px !important; }
  body .hero p { color: #F3F1EC !important; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
  body .hero-ticker { display: none !important; } /* moving 11px text; gone on phones */
  body .page-hero h1 { font-size: 2.4rem !important; line-height: 1.12 !important; }
  body .page-hero p { color: #EDE9E2 !important; }

  /* ---------- header ---------- */
  /* The sticky header (logo + chip row) was ~215px tall on a phone,
     a quarter of the screen. On phones it scrolls with the page; the
     bottom call bar is the persistent action. */
  body nav { position: static !important; padding: 12px 0 !important; }
  body nav .container { row-gap: 10px !important; }
  body nav .nav-links { gap: 10px !important; padding: 4px 2px 8px !important; }
  body nav .nav-links a:not(.nav-cta):not(.nav-phone):not(.nav-blog),
  body nav .nav-links a.nav-blog {
    font-size: 18px !important;
    padding: 12px 20px !important;
    min-height: 50px !important;
    display: inline-flex !important;
    align-items: center;
    color: #F3F1EC !important;
    border-color: rgba(255,255,255,.3) !important;
  }
  body .nav-cta { font-size: 18px !important; padding: 13px 22px !important; min-height: 50px; display: inline-flex; align-items: center; }
  body .scroll-progress { height: 4px; }
  body .hood-map { position: relative !important; top: auto !important; }

  /* ---------- buttons & thumb targets ---------- */
  body .btn, body .btn-outline, body .form-expand-btn, body button[type="submit"],
  body .pricing-cta, body .reassure-phone, body .magnet-form button, body .g-pdf a.btn {
    font-size: 20px !important;
    min-height: 60px;
    padding: 17px 26px !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }
  body .btn-outline { border-width: 2px !important; border-color: rgba(255,255,255,.75) !important; }
  body .pricing-cta { width: auto; min-height: 48px; font-family: var(--f-sans) !important; font-weight: 600; }
  body .svc-arrow { width: 44px !important; height: 44px !important; }
  body .svc-arrow svg { width: 18px !important; height: 18px !important; }
  body .hood-row { padding: 20px 0 !important; min-height: 60px; }
  body .footer-col ul { gap: 4px !important; }
  body .footer-col ul a, body .footer-legal a { font-size: 18px !important; display: inline-block; padding: 8px 0; }
  body .footer-contact-line { font-size: 18px !important; }
  body .areas-wrap a, body .area-tag { padding: 10px 14px !important; }
  body .blog-card, body .post-card { padding: 26px 0 !important; }
  body .read-more { padding: 8px 0; display: inline-block; font-size: 18px !important; letter-spacing: 0 !important; }

  /* sticky bottom call bar */
  body .sticky-cta { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)) !important; }
  body .sticky-cta a { font-size: 19px !important; padding: 16px 14px !important; min-height: 60px; border-radius: 10px !important; }
  body .sticky-cta svg { width: 22px !important; height: 22px !important; }

  /* ---------- forms ---------- */
  /* 2026-09-08: :not(.quote-form label) so the cream-background contact form keeps dark labels.
     The light colour below is for the dark homepage form only. */
  body .form-group label, body label {
    font-family: var(--f-sans) !important;
    font-size: 18px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-weight: 600 !important;
    color: #F1EDE6 !important;
    margin-bottom: 8px !important;
  }
  body .form-group input, body .form-group select, body .form-group textarea,
  body input, body select, body textarea, body .magnet-form input[type="email"] {
    font-size: 20px !important;
    padding: 16px 16px !important;
    min-height: 60px;
    line-height: 1.3;
  }
  body .form-group textarea { min-height: 130px !important; }
  body .form-group { margin-bottom: 22px !important; }
  body .form-card { padding: 28px 20px !important; }
  body .form-section { padding: 64px 20px !important; }
  body .form-proof-strip { line-height: 1.5; padding: 12px 14px !important; }

  /* ---------- spacing: less dead scroll, comfortable margins ---------- */
  body .section { padding: 56px 20px !important; }
  body .offer-section { padding: 56px 20px !important; }
  body .section-sub { margin-bottom: 32px !important; }
  body .content { padding-left: 20px; padding-right: 20px; }
  body .svc { padding: 28px 22px 24px !important; }
  body .testi-feature { padding: 30px 22px !important; }
  body .testi-small { padding: 22px 20px !important; }
  body .pricing-row { padding: 22px 20px !important; gap: 8px !important; }
  body .step { gap: 12px !important; }
  body .step-dot { width: 72px !important; height: 72px !important; font-size: 1.8rem !important; }

  /* pop-ups and motion that get in the way of reading */
  body .guide-slidein { display: none !important; }
  body .hero-meta .dot { animation: none !important; }
  body .fade-in, body [class*="reveal"] { opacity: 1 !important; transform: none !important; transition: none !important; } /* fade-on-scroll leaves blank gaps for slow scrollers */

  /* image captions & badges */
  body .footer-badges-grid img { height: 48px !important; }
  body .review-platform, body .review-platform img { height: 48px !important; }

  /* tools pages (calculators) share the same needs */
  body .tool input, body .tool select, body .tool button, body .calc input, body .calc select, body .calc button { font-size: 20px !important; min-height: 60px; }
  body .tool label, body .calc label { font-size: 18px !important; text-transform: none !important; letter-spacing: 0 !important; }
  /* ---------- global floor ---------- */
  /* Anything not named above still can't drop under 16px. */
  body small, body sup, body sub, body time, body .meta, body .caption, body .fineprint, body .small { font-size: 16px !important; }
  body table { font-size: 18px !important; }
  body th, body td { padding: 12px 10px !important; }

  /* ---------- leftovers found by the font-size audit ---------- */
  body .answer-block { font-size: 17px !important; opacity: .92 !important; color: #E6E2DA !important; line-height: 1.6 !important; }
  body .hero-estimators a { font-size: 17px !important; padding: 13px 18px !important; min-height: 50px; display: inline-flex !important; align-items: center; color: var(--gold-on-dark) !important; border-color: rgba(216,168,106,.55) !important; }
  body .hero-estimators > span { color: #E6E2DA !important; }
  body .hero-secondary { color: #E6E2DA !important; }
  body .card-link .price { font-size: 18px !important; letter-spacing: 0 !important; }
  body .footer-col h4, body .footer-guides h5, body .footer-col h5 { font-size: 17px !important; letter-spacing: .04em !important; }
  body footer li, body .footer-col li, body .footer-bottom span, body .footer-bottom, body .footer-review a,
  body footer a, body footer p { font-size: 18px !important; line-height: 1.6 !important; }
  body .footer-review a, body footer li a { display: inline-block; padding: 6px 0; }
  body .blog-filter-btn { font-size: 18px !important; padding: 12px 18px !important; min-height: 50px; }
  body details.faq-item summary { font-size: 1.3rem !important; line-height: 1.35 !important; padding: 18px 0 !important; }
  body details.faq-item > div { font-size: 19px !important; line-height: 1.65 !important; color: #2F333B !important; padding-bottom: 18px; }
  body .testi-small .stars { font-size: 17px !important; }
  body .nav-phone { font-size: 18px !important; white-space: nowrap; }
  body p > a:only-child { font-size: 18px !important; padding: 8px 0; display: inline-block; }
  body .hood-map svg text { display: none; }
  body .ba-meta { flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; display: flex; }
  body .testi-small-foot { flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; }
  body .step p { max-width: none !important; }
  body .value-tag, body .step-time { color: var(--gold-on-dark) !important; }
  body .section:not(.section-dark) .step-time, body .steps .step-time { color: var(--gold-dark) !important; }
  body .blog-filter-btn { color: #F3F1EC !important; border-color: rgba(255,255,255,.35) !important; } /* 9px map labels nobody can read; the list beside it carries the names */
}

/* Footer "Guides & services" block is injected by site-layer with no
   styling and rendered browser-default blue on the dark footer, at every
   width. Style it like the other footer columns. */
.footer-guides h5 { font-family: var(--f-mono, monospace); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #D8A86A; margin: 28px 0 14px; }
.footer-guides ul { list-style: none; padding: 0; margin: 0; font-size: 1em !important; line-height: 1.7 !important; }
.footer-guides li { margin: 0 0 6px; }
.footer-guides a { color: #DCD6CC; text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-guides a:hover { color: #fff; }

/* very small phones: keep the h1 from wrapping into 4 lines */
@media (max-width: 380px) {
  body .hero h1 { font-size: 2.5rem !important; }
  body .section-title { font-size: 2.1rem !important; }
}
.nav-toggle{display:none}

/* ============================================================
   Mobile menu (2026-09-08 site review WEB-03). The chip row that
   scrolled sideways is replaced by a Menu button and a stacked
   panel. Service-first order. Desktop untouched.
   ============================================================ */
@media (max-width: 768px), ((pointer: coarse) and (max-width: 1024px)) {
  html body nav { position: relative !important; padding: 10px 0 !important; z-index: 120; }
  html body nav .container { flex-wrap: nowrap !important; row-gap: 0 !important; gap: 12px; align-items: center; }
  html body nav .logo { min-width: 0; flex: 1 1 auto; }
  html body nav .nav-toggle {
    display: inline-flex !important; align-items: center; gap: 8px; flex: 0 0 auto;
    min-height: 46px; min-width: 46px; padding: 8px 12px; margin: 0;
    background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 8px;
    color: #fff; font: inherit; font-size: 15px !important; font-weight: 600; letter-spacing: .03em; cursor: pointer;
  }
  html body nav .nav-toggle:focus-visible { outline: 2px solid var(--gold-on-dark, #D8A86A); outline-offset: 2px; }
  html body nav .nav-toggle-bars { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 18px; height: 14px; }
  html body nav .nav-toggle-bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
  html body nav.menu-open .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  html body nav.menu-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
  html body nav.menu-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  html body nav .nav-links {
    display: none !important; position: absolute; left: 0; right: 0; top: 100%;
    width: auto !important; order: 0 !important; flex-direction: column; align-items: stretch;
    gap: 0 !important; padding: 6px 20px 20px !important; overflow-x: visible !important;
    background: #111; border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 40px rgba(0,0,0,.45); max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); overflow-y: auto;
  }
  html body nav.menu-open .nav-links { display: flex !important; }
  html body nav .nav-links a:not(.nav-cta):not(.nav-phone):not(.nav-blog),
  html body nav .nav-links a.nav-blog.nav-blog {
    display: block !important; flex: none; width: 100%; font-size: 18px !important; font-weight: 400 !important; padding: 15px 4px !important;
    border: 0 !important; border-bottom: 1px solid rgba(255,255,255,.12) !important; border-radius: 0 !important; min-height: 0 !important; color: #F3F4F6 !important;
  }
  /* service-first order in the panel */
  html body nav .nav-links a[href="/services"] { order: 1; }
  html body nav .nav-links a[href="/neighborhoods"] { order: 2; }
  html body nav .nav-links a[href="/about"] { order: 3; }
  html body nav .nav-links a[href="/tools"] { order: 4; }
  html body nav .nav-links a[href="/guides"] { order: 5; }
  html body nav .nav-links a[href="/blog"] { order: 6; }
  html body nav .nav-links a[href="/#faq"], html body nav .nav-links a[href="#faq"] { order: 7; }
  html body nav .nav-links a.nav-phone { display: flex !important; order: 8; justify-content: center; margin-top: 16px; padding: 14px !important; border: 1px solid rgba(255,255,255,.3); border-radius: 100px; font-size: 17px !important; }
  html body nav .nav-links a.nav-cta { display: flex !important; order: 9; justify-content: center; margin-top: 10px; width: 100%; }
  html.menu-lock { overflow: hidden; }
  /* WEB-13: FAQ triggers are buttons now */
  html body button.faq-q { width: 100%; background: none; border: 0; text-align: left; margin: 0; -webkit-appearance: none; appearance: none; }
}
/* button reset must apply on desktop too */
button.faq-q { width: 100%; background: none; border: 0; text-align: left; margin: 0; -webkit-appearance: none; appearance: none; }
button.faq-q:focus-visible { outline: 2px solid var(--gold-dark, #6B4220); outline-offset: 4px; border-radius: 4px; }
.result-note { font-size: .72rem; opacity: .65; margin: 8px 0 0; line-height: 1.45; }

/* Contact-page quote form sits on a cream card, so it needs dark labels and help text at every
   width (the mobile layer above lightens labels for the dark homepage form). 2026-09-08. */
.quote-form label, html body .quote-form label, html body .quote-form .form-group label {
  color: #1A1410 !important; font-weight: 700 !important;
}
.quote-form .form-expand-btn, html body .quote-form .form-expand-btn { color: #6B4220 !important; }
.quote-form input::placeholder, .quote-form textarea::placeholder { color: #6B7280; }
