/* Reflekt phone layout for every page except the homepage (Oct 13 2026).
   Linked with media="(max-width: 640px)" and injected into every page by
   build-tools/inject_mobile.py (run by build_all.sh and deploy-site.sh), so
   desktop never loads or applies it. The homepage has its own block
   (#m-polish in index.html). Fold rows and the footer accordion are built by
   mobile.js; without JS every page still renders in full. */
@media (max-width: 640px) {
  /* Tighter vertical rhythm: 88px of padding per section was most of the scroll */
  section { padding: 46px 18px; }
  .section-title { font-size: 1.7rem; }
  .section-sub { font-size: 0.95rem; }

  /* HERO (city / service / neighborhood / guide pages) */
  .city-hero { padding: 92px 18px 30px; }
  .city-hero .breadcrumb { font-size: 0.74rem; margin-bottom: 12px; }
  .city-hero h1 { font-size: 1.85rem; line-height: 1.12; letter-spacing: -0.5px; margin-bottom: 12px; }
  .city-hero p { font-size: 0.95rem; line-height: 1.55; margin-bottom: 18px; }
  /* Number stays full width (calls book the work); Text + Quote share a row */
  .city-hero .hero-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .city-hero .hero-btns > a:first-child,
  .city-hero .hero-btns > a:nth-child(2):last-child { grid-column: 1 / -1; }
  .city-hero .hero-btns .btn-primary,
  .city-hero .hero-btns .btn-secondary { padding: 14px 8px; font-size: 0.95rem; white-space: nowrap; }
  .hero-note { font-size: 0.82rem; margin-top: 10px; }
  /* Service hubs */
  .svc-hero { padding: 100px 18px 40px; }
  .svc-hero h1 { font-size: 2rem; letter-spacing: -0.5px; margin-bottom: 14px; }
  .svc-hero p { font-size: 0.95rem; margin-bottom: 22px; }

  /* PROOF BAR: two columns instead of six stacked lines */
  .proof-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px 16px; }
  .proof-item { font-size: 0.76rem; gap: 6px; line-height: 1.3; }

  /* ARTICLE BODY */
  .city-body figure { margin-bottom: 20px !important; }
  .city-body h2, .seo-content h2 { font-size: 1.35rem; margin: 28px 0 10px; }
  .city-body p, .seo-content p { font-size: 0.97rem; line-height: 1.65; }
  .offer-band { margin-bottom: 22px; }
  .neighborhood-tags { gap: 7px; }
  .neighborhood-tags span, .neighborhood-tags > a { font-size: 0.78rem; padding: 6px 12px; }

  /* FOLD ROWS: topics after the first open on tap (mobile.js) */
  .mf-hint { margin: 26px 0 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple); }
  .city-body h2.mf-h, .seo-content h2.mf-h {
    position: relative; margin: 0; padding: 15px 34px 15px 0; font-size: 1.06rem; line-height: 1.3;
    border-top: 1px solid rgba(15,37,64,0.12); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .mf-h::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--purple); }
  .mf-h[aria-expanded="true"]::after { content: "\2212"; }
  .mf-b:not([hidden]) { padding: 2px 0 14px; } /* until-found keeps the box, so no padding while closed */
  .mf-end { border-top: 1px solid rgba(15,37,64,0.12); margin: 0 0 26px; }

  /* RELATED CARDS: two compact columns */
  .areas-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px !important; }
  .area-card { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 13px 12px; text-align: left; }
  .area-card .area-icon { grid-row: span 2; margin: 0; font-size: 1.3rem; }
  .area-card h4 { margin: 0; font-size: 0.85rem; line-height: 1.25; }
  .area-card p { margin: 2px 0 0; font-size: 0.72rem; }

  /* SERVICE PHOTO CARDS (about page, hubs) */
  .mosaic { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
  .mosaic .mcard { grid-column: span 1; height: 148px; border-radius: 16px; }
  .mosaic .mcard.feat { grid-column: span 2; height: 180px; }
  .mosaic .mcard-img { transform: none; }
  .mosaic .mcard-veil { background: linear-gradient(180deg, rgba(10,16,28,0.05) 25%, rgba(10,16,28,0.78) 100%); }
  .mosaic .mcard-label { justify-content: flex-end; align-items: flex-start; text-align: left; padding: 12px 13px; gap: 3px; }
  .mosaic .mcard-label h3, .mosaic .mcard.quarter .mcard-label h3 { font-size: 1rem; line-height: 1.2; }
  .mosaic .mcard.feat .mcard-label h3 { font-size: 1.35rem; }
  .mosaic .mcard-label p { display: none; }

  /* STEP CARDS (service hubs): 2 x 2 */
  .steps-title { font-size: 2rem; }
  .steps-sub { margin: 8px 0 22px; letter-spacing: 1px; }
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }

  /* Loose containers between sections (city hubs' offer row) */
  body > .container { padding-left: 16px; padding-right: 16px; }

  /* SERVICE HUBS: side list of services as a 2-column chip grid */
  .svc-side { min-width: 0; }
  .svc-side-list { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .seo-content a.svc-side-link { padding: 12px 0; font-size: 0.86rem; gap: 6px; }
  .svc-side-link .dot { margin-right: 7px; }
  .seo-content .container.svc-detail-wrap { gap: 26px; }

  /* REVIEW CARDS: swipe row instead of a tall stack */
  .reviews-grid, .reviews-grid.big {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 22px -18px 0; padding: 4px 18px 14px; scroll-padding: 0 18px; scrollbar-width: none;
  }
  .reviews-grid::-webkit-scrollbar { display: none; }
  .reviews-grid .review-card, .reviews-grid.big .review-card { flex: 0 0 86%; scroll-snap-align: start; padding: 22px 20px; }
  .reviews-grid.big .review-text { font-size: 0.97rem; line-height: 1.6; }

  /* MEMBERSHIP BLOCK (service hubs): compact rows, Most Popular first */
  .savebig-title { font-size: 2.3rem; }
  .savebig-sub { font-size: 1.1rem; }
  .savebig .plan-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
  .savebig .plan-card { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; padding: 16px 18px; text-align: left; border-radius: 18px; }
  .savebig .plan-card.featured { order: -1; }
  .savebig .plan-badge { position: static; transform: none; grid-column: 1 / -1; justify-self: start; margin: 0 0 8px; padding: 4px 11px; font-size: 0.64rem; }
  .savebig .plan-name { grid-column: 1; margin: 0; font-size: 0.95rem; }
  .savebig .plan-off { grid-column: 2; grid-row: span 2; font-size: 1.8rem; text-align: right; line-height: 1; }
  .savebig .plan-card.featured .plan-off { grid-row: 2 / span 2; }
  .savebig .plan-off-sub { grid-column: 1; margin: 2px 0 0; font-size: 0.64rem; letter-spacing: 0.3px; }
  .savebig .plan-list { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 12px 0 0; }
  .savebig .plan-list li { font-size: 0.79rem; gap: 6px; line-height: 1.3; }
  .savebig .plan-card > p { grid-column: 1 / -1; margin: 10px 0 0 !important; }
  .savebig .plan-card .btn-primary { grid-column: 1 / -1; margin-top: 14px; padding: 13px 20px; }
  .savebig .plan-card:not(.featured) .btn-primary { display: none; }

  /* PLAN CARDS (other pages) */
  .plan-grid { gap: 14px; margin-top: 24px; }
  .plan-card { padding: 24px 20px; }
  .plan-off { font-size: 2.2rem; }
  .plan-off-sub { margin-bottom: 14px; }
  .plan-list { gap: 8px; margin-bottom: 18px; }

  /* FAQ + CLOSER */
  .faq-list { margin-top: 20px; gap: 8px; }
  .faq-q { padding: 15px 16px; font-size: 0.93rem; }
  .cta-band { padding: 46px 20px; }
  .cta-band h2 { font-size: 1.7rem; }
  .cta-band p { margin-bottom: 22px; }
  .cta-band.cta-photo { padding: 52px 20px; }

  /* FOOTER: link groups fold into tap-to-open rows (mobile.js adds .f-acc) */
  footer.f-acc { padding: 36px 18px 24px; }
  footer.f-acc .footer-inner { gap: 0; margin-bottom: 24px; }
  footer.f-acc .footer-brand { margin-bottom: 18px; }
  footer.f-acc .f-col { border-top: 1px solid rgba(255,255,255,0.12); }
  footer.f-acc .f-col:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
  footer.f-acc .f-col h5 { margin: 0; padding: 16px 2px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  footer.f-acc .f-col h5::after { content: "+"; font-size: 1.25rem; font-weight: 400; line-height: 1; color: var(--purple-light); }
  footer.f-acc .f-col.open h5::after { content: "\2212"; }
  footer.f-acc .f-col ul { display: none; grid-template-columns: 1fr 1fr; gap: 0 14px; padding: 0 2px 14px; }
  footer.f-acc .f-col.open ul { display: grid; }
  footer.f-acc .f-col ul li a { display: block; padding: 9px 0; }

  /* MENU: every main page in two columns (mobile.js builds .gm-grid) */
  .glass-nav .gnav-mobile { background: rgba(18,11,40,0.97); }
  .glass-nav .gnav-mobile .gm-grid a { padding: 12px; font-size: 0.95rem; white-space: nowrap; }

  .chat-fab { width: 50px !important; height: 50px !important; font-size: 1.25rem !important; right: 12px !important; }
}
