/* Final responsive layer, shared by every public page. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
fieldset { min-inline-size: 0; }
main :is(h1,h2,h3,p,li), .breadcrumb, .footer-email { overflow-wrap: anywhere; }
.small-line { flex-shrink: 0; }
.service-grid > *, .request-layout > *, .calculator-wrap > *,
.foundation > *, .faq-section > *, .contacts-grid > *,
.comparison-grid > *, .dimension-fields > *, .geography-grid > * { min-width: 0; }
.material-title { flex-wrap: wrap; }
.material-title > * { min-width: 0; }
.material-price { margin-left: auto; max-width: 100%; }
.button, .text-link, .card-details { max-width: 100%; }
.button > span[aria-hidden] { flex-shrink: 0; }
.service-photo figcaption { right: 16px; }
.photo-label { max-width: 100%; overflow-wrap: anywhere; }
.article-section table { table-layout: fixed; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .calculator-wrap, .foundation, .faq-section, .contacts-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .calculator-intro { padding-top: 0; }
  .calc-intro-note { display: none; }
  .foundation-copy > p { max-width: none; }
  .section-heading { flex-wrap: wrap; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-action { min-width: 0; }
}

@media (max-width: 650px) {
  html { scroll-padding-top: 88px; }
  .container { width: calc(100% - 32px); }
  .site-header { height: 72px; }
  .site-header .header-inner { width: calc(100% - 24px); column-gap: 8px; }
  .site-header .brand { min-width: 0; gap: 6px; font-size: 18px; }
  .site-header .brand-logo { width: 36px; height: 36px; }
  .site-header .brand-copy { min-width: 0; }
  .site-header .brand-copy > small { font-size: 9px; }
  .site-header .header-actions { gap: 6px; }
  .site-header .header-phone, .site-header .header-max, .site-header .menu-toggle {
    display: flex; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px;
  }
  .site-header .header-cta { display: none; }
  .site-header:has(.menu-toggle[aria-expanded="true"]) { z-index: 70; }
  .mobile-nav {
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  body:has(.menu-toggle[aria-expanded="true"]) .mobile-bottom,
  body:has(input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus) .mobile-bottom { display: none; }
  .hero { width: calc(100% - 24px); margin: 12px auto 0; height: auto; min-height: 0; }
  .hero-image { height: clamp(170px, 47vw, 240px); }
  .hero-content { min-width: 0; padding: 24px 20px; }
  .hero h1 { font-size: clamp(26px, 7.5vw, 40px); line-height: 1.16; letter-spacing: -.9px; }
  .hero-photo-caption { top: 12px; right: 12px; bottom: auto; max-width: calc(100% - 24px); }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .hero-actions .button { width: 100%; font-size: 15px; justify-content: space-between; }
  .hero-secondary { justify-content: center; font-size: 14px; }
  .hero-audiences { margin-top: 14px; padding-top: 14px; font-size: 11px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .section h2, .calculator-intro h2, .contacts-section h2,
  .page-cta h2 { font-size: clamp(27px, 7.6vw, 34px); line-height: 1.2; letter-spacing: -.7px; }
  .service-heading h1, .journal-intro h1, .journal-article-head h1,
  .rental-heading h1 { font-size: clamp(28px, 7.8vw, 38px); line-height: 1.2; letter-spacing: -.8px; }
  .service-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 11px; }
  .service-strip > span { min-width: 0; overflow-wrap: anywhere; }
  .service-card { padding: 20px 20px 0; }
  .service-photo { margin: -20px -20px 20px; }
  .service-photo img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .service-card h3, .seo-directory-card h3, .related-card h3 { font-size: 23px; }
  .service-card-actions > .button, .card-actions > .button { width: 100%; justify-content: space-between; min-height: 52px; }
  .card-actions { width: 100%; gap: 4px; }
  .card-details { width: 100%; }
  .repair-note { padding: 20px; }
  .repair-note .card-actions { margin-left: 0; }
  .repair-note a { white-space: normal; margin-left: 0; }
  .request-card, .calculator-panel { padding: 22px 18px; }
  .request-card h3, .calc-lead-form > h3 { font-size: 23px; line-height: 1.3; }
  .request-card input:not([type="checkbox"]):not([type="radio"]),
  .request-card select, .request-card textarea,
  .calc-lead-form > input, .calc-lead-form > select,
  .card-request-form input:not([type="checkbox"]), .card-request-form select,
  .card-request-form textarea { font-size: 16px; }
  .request-card .client-radios { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .request-card .client-radios span { min-height: 46px; justify-content: flex-start; font-size: 14px; padding: 11px 14px; }
  .request-card .consent-label > input, .calc-lead-form .consent-label > input { padding: 0; min-height: 20px; }
  .request-actions .button, .calc-lead-form > .button { white-space: normal; text-align: center; }
  .material-card { padding: 23px 20px; }
  .material-title { flex-direction: column; gap: 13px; }
  .material-price { margin-left: 0; text-align: left; }
  .material-title h3 { font-size: 25px; }
  .surface-options { grid-template-columns: minmax(0, 1fr); }
  .surface-choice { min-height: 66px; padding: 14px; }
  .surface-choice strong { font-size: 15px; }
  .surface-choice small { font-size: 13px; }
  .calc-topline { flex-wrap: wrap; }
  .calc-status { display: none; }
  .dimension-header { flex-wrap: wrap; gap: 4px 12px; }
  .dimension-header button { padding-left: 0; font-size: 13px; }
  .dimension-fields { grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); gap: 8px; }
  .input-shell input { padding-inline: 10px; }
  .input-shell > span { padding-right: 10px; }
  .result-meta { flex-wrap: wrap; }
  .result-total { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .result-total output { width: 100%; text-align: left; font-size: clamp(29px, 8vw, 38px); }
  .calc-lead-form { padding: 20px 14px; }
  .work-photo img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .work-copy, .seo-directory-card, .related-card { padding: 22px 20px; }
  .service-actions { align-items: stretch; flex-direction: column; }
  .service-actions .button { width: 100%; }
  .service-actions .text-link { justify-content: center; }
  .service-hero-media img { height: auto; max-height: 380px; aspect-ratio: 4 / 3; object-fit: cover; }
  .service-aside-card { padding: 24px 20px; max-width: 100%; }
  .article-section table { font-size: 12px; }
  .article-section th, .article-section td { padding: 10px 6px; }
  .geography-copy { padding: 24px 20px; }
  .map-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-toolbar button { padding-inline: 6px; }
  .map-toolbar > a { grid-column: 1 / -1; }
  .region-map iframe { height: 320px; }
  .contact-email > a { font-size: 23px; overflow-wrap: anywhere; }
  .contact-phone { font-size: clamp(25px, 7vw, 31px); }
  .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .mobile-bottom { gap: 8px; padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .mobile-bottom > a:first-child { flex: 0 0 34%; }
  .mobile-bottom > a, .mobile-bottom > button[data-service-request] { min-width: 0; min-height: 48px; font-size: 13px; padding: 12px 8px; }
  .card-request-dialog {
    width: calc(100% - 16px); max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px); border-radius: 12px;
  }
  .card-request-head { padding: 17px 18px; gap: 10px; }
  .card-request-head > div { min-width: 0; }
  .card-request-head h2 { font-size: 23px; overflow-wrap: anywhere; }
  .card-request-form { padding: 18px; }
  .card-request-head { position: static; }
  .work-gallery-header { flex-wrap: wrap; gap: 8px; }
  .work-gallery-header h2 { flex: 1 1 120px; min-width: 0; }
  .work-gallery-stage { min-height: 120px; }
}

@media (max-width: 380px) {
  .site-header .brand { font-size: 15px; gap: 5px; }
  .site-header .brand-logo { width: 32px; height: 32px; }
  .site-header .header-actions { gap: 4px; }
  .site-header .brand-copy > small { font-size: 8px; }
  .hero-content { padding-inline: 18px; }
  .steps-grid { grid-template-columns: minmax(0, 1fr); }
  .messenger-contact .messenger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-request-form > label > span { display: block; margin-left: 0; }
}
