/*
 * Mobile audit remediation — 2026-10-27 / theme v1.2.2.
 * Overrides only: the original site.css, templates, and page content are retained.
 * Scope: genuine public-facing mobile sizing/tap-area issues. WordPress admin bar,
 * screen-reader-only labels, and deliberately hidden skip links are excluded.
 */

@media (max-width: 840px) {
  /* Header: touch controls and the collapsed navigation. */
  .header-actions { flex: 0 0 auto; }
  .header-call-mobile,
  .mobile-menu-button {
    display: grid;
    place-items: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 8px;
  }
  .header-cta { min-height: 48px; padding-block: 11px; font-size: 14px; }
  .primary-nav .menu > li > a,
  .primary-nav .sub-menu a {
    min-height: 46px;
    padding: 11px 12px;
    font-size: 15px;
    white-space: normal;
    line-height: 1.4;
  }
  .primary-nav .sub-menu { min-width: 0; }

  /* Search button is adjacent to the field (not on top of the input's touch area). */
  .header-search { display: flex; align-items: stretch; min-width: 0; }
  .header-search input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    font-size: 16px; /* Prevent iOS Safari automatic zoom on focus. */
    padding: 10px 12px;
    border-radius: 9px 0 0 9px;
  }
  .header-search button {
    position: static;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 8px;
    transform: none;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 9px 9px 0;
    background: #fff;
  }

  /* Reusable calls to action and interactive links. */
  .button-primary, .button-outline {
    min-height: 48px;
    padding-block: 11px;
    font-size: 14px;
  }
  .hero-buttons .button-primary,
  .hero-buttons .button-outline { min-height: 48px; font-size: 14px; }
  .text-link,
  .cla-kb-card .text-link,
  .section-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .cla-kb-more .text-link { min-height: 44px; }
  .service-card .text-link { width: 100%; }
  .service-card h3 { font-size: 15px; line-height: 1.4; }
  .service-card h3 a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 7px 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .service-card p { font-size: 14px; line-height: 1.55; }
  .service-card-body { padding: 12px; }
  .service-grid { gap: 12px; }

  /* Estimate forms in both the sidebar and the Contact page. */
  .estimate-form { gap: 11px; }
  .estimate-form input:not([type="checkbox"]),
  .estimate-form select,
  .estimate-form textarea,
  .contact-form-panel .estimate-form input:not([type="checkbox"]),
  .contact-form-panel .estimate-form select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 13px;
    font-size: 16px;
    line-height: 1.45;
  }
  .estimate-form textarea { min-height: 115px; }
  .estimate-form .button-wide { min-height: 48px; font-size: 15px; padding: 11px 15px; }
  .estimate-form .consent {
    align-items: flex-start;
    gap: 11px;
    min-height: 44px;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.5;
  }
  .estimate-form .consent input[type="checkbox"] {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
  }
  .estimate-widget > p,
  .form-feedback,
  .fineprint { font-size: 13px; line-height: 1.6; }

  /* Readable headings, body copy, metadata and widgets. */
  .utility-bar { font-size: 12px; line-height: 1.4; }
  .eyebrow { font-size: 12px; }
  .byline strong, .byline small { font-size: 13px; }
  .hero-description { font-size: 16px; line-height: 1.65; }
  .hero-points li { font-size: 13px; line-height: 1.5; }
  .section-intro { font-size: 14px; line-height: 1.6; }
  .benefit strong { font-size: 13px; }
  .popular-questions a, .popular-questions .all-link { font-size: 14px; min-height: 44px; align-items: center; }
  .rail-nav-link { min-height: 44px; font-size: 14px; }
  .breadcrumbs { font-size: 13px; line-height: 1.5; }
  .breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; }
  .prose-content { font-size: 16px; line-height: 1.8; }
  .prose-content a { text-underline-offset: 3px; }
  .cla-kb-card p, .cla-kb-service-links { font-size: 14px; line-height: 1.65; }
  .cla-kb-card h3 { font-size: 16px; }
  .right-rail .rail-panel > p,
  .tips-widget p,
  .right-rail .checklist li { font-size: 14px; line-height: 1.6; }
  .right-rail .rail-panel > h3,
  .mini-widget-title { font-size: 15px; }
  .area-pills span, .area-pills-large span { font-size: 13px; line-height: 1.4; }
  .process-step p, .trust-grid p, .article-cta p { font-size: 14px; line-height: 1.6; }
  .faq-item summary { display: flex; align-items: center; min-height: 48px; font-size: 15px; line-height: 1.5; }
  .faq-answer { font-size: 14px; line-height: 1.7; }
  .page-search-form input { min-height: 48px; font-size: 16px; }
  .page-search-form button { min-height: 48px; }

  /* Footer and small linked controls. */
  .footer-about p, .footer-contact { font-size: 14px; line-height: 1.6; }
  .footer-columns h3 { font-size: 15px; }
  .footer-columns li { margin-bottom: 0; }
  .footer-columns li a,
  .footer-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .footer-social a { width: 44px; height: 44px; }
  .footer-bottom { font-size: 12px; line-height: 1.6; }
  .post-card-content p { font-size: 14px; }
  .post-meta { font-size: 12px; }
  .post-card h2 a { display: inline-flex; align-items: center; min-height: 44px; }
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
}

@media (max-width: 690px) {
  /* The 690px breakpoint intentionally hides desktop search. */
  .header-search { display: none; }
  .utility-bar { min-height: 36px; }
  .header-top { min-width: 0; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand-custom .brand-logo { max-width: min(230px, 50vw); height: auto; }
  .header-actions { margin-left: auto; gap: 5px; }
  .hero-buttons { gap: 9px; }
  .right-rail { min-width: 0; }
  .inner-article { padding: 18px; }
  .contact-form-panel { padding: 16px; }
  .footer-columns { gap: 18px; }
}

@media (max-width: 480px) {
  /* Override the theme's old 11px compact-mobile control styles. */
  .header-cta { min-height: 48px; font-size: 14px; padding: 11px 14px; }
  .hero-buttons .button-primary,
  .hero-buttons .button-outline { min-height: 48px; padding: 10px 7px; font-size: 14px; }
  .hero-description { font-size: 15px; }
  .service-card h3 { font-size: 15px; }
  .service-grid { gap: 10px; }
  .service-card-body { padding: 10px; }
  .benefits-grid { column-gap: 10px; }
  .gallery-grid img { height: 145px; }
  .footer-columns { column-gap: 15px; }
  .area-map span { font-size: 11px; }
}

@media (max-width: 360px) {
  /* Narrowest audited viewport (320px): keep the brand and 48px actions on-screen. */
  .header-top { gap: 4px; }
  .header-actions { gap: 4px; }
  .brand-mark { width: 29px; height: 32px; }
  .brand-mark > svg { width: 27px; height: 27px; }
  .brand-lamp { font-size: 11px; right: 2px; bottom: 0; }
  .brand-wordmark strong { font-size: 14px; letter-spacing: -.45px; }
  .brand-wordmark small { font-size: 10px; letter-spacing: .03em; }
  .brand-custom .brand-logo { max-width: 145px; }
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-buttons { grid-template-columns: minmax(0, 1fr); }
}
