/* Homepage only. Keep every layout change below the desktop breakpoint. */
@media (max-width: 768px) {
  body:has(.safe-hero) {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  .safe-hero {
    min-height: 0;
    padding: 98px 20px 30px;
  }
  .safe-hero-copy { max-width: 540px; }
  .safe-hero h1 { font-size: clamp(1.9rem, 7.5vw, 2.6rem); line-height: 1.12; }
  body:has(.safe-hero) .safe-hero .safe-kicker {
    padding: 7px 10px;
    font-size: .65rem;
    letter-spacing: .04em;
  }
  .safe-hero-lede { margin-top: 14px; font-size: .95rem; line-height: 1.55; }
  .safe-actions { margin: 20px 0 0; gap: 10px; }
  .safe-actions .safe-btn { min-height: 48px; padding: 12px 16px; font-size: .9rem; }
  .safe-actions .safe-btn-secondary { display: none; }
  .safe-reassurance { display: none; }
  .safe-hero::after {
    background: linear-gradient(90deg, rgba(9, 24, 58, .86), rgba(9, 24, 58, .45));
  }

  .safe-home-assurance { padding: 22px 18px; }
  .safe-home-assurance-inner { gap: 18px; }
  .safe-home-assurance-message { text-align: left; }
  .safe-home-assurance-message h2 { font-size: 1.3rem; }
  .safe-home-assurance-message > p:last-child { display: none; }
  .safe-home-assurance-facts { grid-template-columns: .8fr .8fr 1.4fr; gap: 0; }
  .safe-home-assurance-facts > div { padding: 0 8px; gap: 5px; }
  .safe-home-assurance-facts dd { font-size: 1.5rem; }
  .safe-home-assurance-facts dt { font-size: .68rem; line-height: 1.35; }
  .safe-home-assurance-facts .safe-home-assurance-region {
    grid-column: auto;
    border-top: 0;
    border-left: 1px solid #e8cbd5;
    padding: 0 8px;
  }
  .safe-home-assurance-region dd { font-size: .8rem; line-height: 1.4; }
  .safe-home-assurance-region dd br { display: initial; }

  .safe-section, .safe-away, .safe-update,
  body:has(.safe-hero) .reviews-section,
  body:has(.safe-hero) .office-section,
  body:has(.safe-hero) .safe-contact { padding: 28px 18px; }
  .safe-kicker { margin-bottom: 8px; font-size: .68rem; }
  .safe-section-heading { margin-bottom: 18px; }
  .safe-section-heading h2, .safe-model h2, .safe-away h2,
  .safe-update h2, .safe-locations .safe-section-heading h2,
  body:has(.safe-hero) .reviews-header h2 { font-size: 1.45rem; line-height: 1.2; }
  .safe-section-heading p:not(.safe-kicker), .safe-model-copy p,
  .safe-away p, .safe-story p, .safe-update p {
    font-size: .9rem;
    line-height: 1.55;
  }

  .safe-path-grid { gap: 12px; }
  .safe-path-card {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: auto;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(18, 48, 68, .05);
  }
  .safe-path-card img { height: 100%; min-height: 140px; }
  .safe-path-card div { min-width: 0; padding: 14px 12px; gap: 8px; }
  .safe-path-card p { font-size: .65rem; line-height: 1.3; }
  .safe-path-card h3 { font-size: .95rem; line-height: 1.35; }
  .safe-path-card div > span { display: none; }
  .safe-path-card strong { min-height: 44px; padding: 10px 12px; font-size: .76rem; line-height: 1.25; }
  .safe-path-card:hover { transform: none; }

  .safe-model { gap: 18px; }
  .safe-model-statement { display: none; }
  .safe-care-map.safe-care-orbit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
    padding: 16px;
    border-radius: 18px;
    box-shadow: none;
  }
  .safe-care-orbit .care-orbit-title,
  .safe-care-orbit .orbit-caption,
  .safe-care-orbit::after,
  .safe-care-orbit .orbit-center::before,
  .safe-care-orbit .orbit-center::after,
  .safe-care-orbit .orbit-manager::after,
  .safe-care-orbit .orbit-health::before { display: none; }
  .safe-care-orbit .orbit-center {
    grid-area: 1 / 1 / 2 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 0;
    padding: 12px;
  }
  .safe-care-orbit .orbit-center img { width: 28px; height: 28px; margin: 0; }
  .safe-care-orbit .orbit-center strong { font-size: .9rem; }
  .safe-care-orbit .orbit-center span { flex-basis: 100%; font-size: .75rem; line-height: 1.45; }
  .safe-care-orbit .orbit-card {
    grid-area: auto;
    align-self: stretch;
    padding: 10px 8px;
    gap: 6px;
    border-radius: 12px;
    box-shadow: none;
  }
  .safe-care-orbit .orbit-card strong { font-size: .78rem; line-height: 1.3; }
  .safe-care-orbit .orbit-card p { font-size: .72rem; line-height: 1.4; }
  .safe-care-orbit .orbit-avatar { width: 34px; height: 34px; }

  .safe-away { gap: 18px; }
  .safe-away-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .safe-away-grid article { min-height: 0; padding: 12px; }
  .safe-away-grid h3 { font-size: .85rem; line-height: 1.4; }
  .safe-away-grid p { font-size: .8rem; line-height: 1.45; }
  .safe-away .safe-btn { width: 100%; padding: 12px; font-size: .85rem; line-height: 1.35; }

  /* Care details become disclosures only after the mobile script has added controls. */
  .safe-story { padding: 22px 18px; gap: 16px; border-bottom: 1px solid #e6edf2; }
  .safe-story > img { height: 160px; min-height: 0; border-radius: 16px; }
  .safe-story h2 { font-size: 1.15rem; line-height: 1.35; }
  .safe-story.mobile-care-disclosure > img { display: none; }
  .mobile-care-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #b9144b;
    font: inherit;
    font-size: .85rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
  }
  .mobile-care-toggle::after { content: '+'; font-size: 1.4rem; line-height: 1; }
  .mobile-care-toggle[aria-expanded='true']::after { content: '\2212'; }
  .mobile-care-panel[hidden] { display: none; }
  .mobile-care-panel .safe-btn { min-height: 44px; padding: 12px 18px; font-size: .85rem; line-height: 1.35; }
  .safe-chronic .condition-links { flex-wrap: wrap; margin-top: 16px; }

  .safe-update { gap: 16px; }
  .update-phone { border-width: 1px; border-color: #d5e0e9; border-radius: 16px; padding: 12px; box-shadow: none; }
  .update-header { padding: 12px; gap: 8px; font-size: .85rem; }
  .update-header small { font-size: .68rem; }
  .update-row { padding: 10px 0; margin: 0; border: 0; border-bottom: 1px solid #e6edf2; border-radius: 0; background: transparent; }
  .update-row:last-child { padding-bottom: 0; border-bottom: 0; }
  .update-row strong { margin: 0; font-size: .8rem; }
  .update-row p { font-size: .85rem; }

  .care-locations-layout { gap: 16px; }
  .safe-locations .safe-section-heading > p:nth-last-child(2),
  .safe-locations .care-locations-hint,
  .care-location-art, .care-location-legend, .care-location-pin-icon { display: none; }
  .care-location-map { border-radius: 0; overflow: visible; }
  .care-location-markers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .care-location-map .care-location-pin {
    position: static;
    transform: none;
    flex-direction: row;
    min-width: 0;
    min-height: 44px;
  }
  .care-location-pin span { width: 100%; min-height: 44px; justify-content: space-between; padding: 10px; font-size: .8rem; white-space: normal; box-shadow: none; }

  body:has(.safe-hero) .reviews-header { gap: 12px; margin-bottom: 16px; }
  body:has(.safe-hero) .review-card { padding: 18px; box-shadow: none; }
  body:has(.safe-hero) .review-card .quote { font-size: .9rem; line-height: 1.6; }
  body:has(.safe-hero) .safe-contact .cta-container { gap: 16px; }
  body:has(.safe-hero) .safe-contact .cta-form-wrapper { padding: 18px 14px; }
  body:has(.safe-hero) .safe-contact .form-row { grid-template-columns: 1fr; gap: 12px; }
  body:has(.safe-hero) .safe-contact { scroll-margin-top: 76px; }
  body:has(.safe-hero) .office-container { grid-template-columns: 1fr; gap: 16px; }
  body:has(.safe-hero) .office-title { margin: 0 0 12px; font-size: 1.4rem; }
  body:has(.safe-hero) .office-address p { margin: 0; font-size: .85rem; line-height: 1.5; }
  body:has(.safe-hero) .office-photos { gap: 8px; margin-top: 14px; }
  body:has(.safe-hero) .office-photos img { width: calc((100% - 16px) / 3); min-width: 0; max-width: none; height: 70px; }
  body:has(.safe-hero) .office-map iframe { height: 180px; min-height: 0; }
  body:has(.safe-hero) .floating-buttons { display: none; }
  body:has(.safe-hero) .home-mobile-actions {
    width: 100%;
    min-height: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .home-mobile-actions a { min-height: 46px; font-size: .8rem; border-radius: 10px; }
  .home-mobile-actions a:nth-child(2) { background: #147d41; }
  body:has(.safe-hero) .modern-footer { padding: 26px 18px 16px; }
  body:has(.safe-hero) .footer-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  body:has(.safe-hero) .footer-col { min-width: 0; }
  body:has(.safe-hero) .footer-col h4 { margin-top: 0; }
  body:has(.safe-hero) .footer-logo img { max-width: 160px; margin-bottom: 0; }
  body:has(.safe-hero) .footer-col:first-child,
  body:has(.safe-hero) .footer-col:last-child { grid-column: 1 / -1; }
  body:has(.safe-hero) .footer-col p { font-size: .8rem; }
  body:has(.safe-hero) .footer-col ul a { display: inline-flex; align-items: center; min-height: 44px; }
  body:has(.safe-hero) .footer-col ul li { margin: 0; }
}

@media (max-width: 359px) {
  .safe-path-card { grid-template-columns: 64px minmax(0, 1fr); }
  .safe-away-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .safe-path-card, .safe-btn { transition: none; }
  .safe-btn:hover { transform: none; }
}
