/* Shared mobile fixes. Load after each page's existing styles. */
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
.hero-logo, .site-logo, .footer-mark, .thankyou-logo { object-fit: contain; }
.portrait, .provider-photo, .family-photo { object-fit: cover; }
input, select, textarea { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
.mobile-table-scroll { max-width: 100%; overflow-x: auto; }
.mobile-table-scroll:focus-visible { outline: 3px solid #087969; outline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #087969; outline-offset: 3px;
}

@media (max-width: 1100px) {
  /* Keep the seventh navigation item and longer labels inside the header. */
  .nav { height: auto; min-height: 60px; flex-wrap: wrap; gap: 4px;
    white-space: normal; padding: 10px 12px; }
  .nav a { display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 8px 10px; line-height: 1.3; text-align: center; }
  .hero:has(.nav) { height: auto; min-height: 365px; overflow: visible; padding-bottom: 24px; }
  .hero:has(.nav) .hero-inner { padding-top: 8px; }
  .footer-main { gap: 28px; }
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-row { padding-inline: 32px; gap: 28px; }
  .resource-layout { gap: 28px; }
}

@media (max-width: 900px) {
  .container, .wrap { width: min(1100px, calc(100% - 36px)); max-width: calc(100% - 36px); }
  .care-row, .more-grid, .contact-grid, .access-grid, .provider-grid,
  .community-grid, .explain-grid, .comparison-grid, .notice-box,
  .hero-grid, .split, .essential-plan-wrap, .no-insurance-path-inner {
    grid-template-columns: minmax(0, 1fr); gap: 24px;
  }
  .care-row > *, .contact-grid > *, .access-grid > *, .provider-grid > *,
  .community-grid > *, .benefit-grid > *, .pricing-grid > *, .resource-grid > *,
  .plan-grid > *, .form-row > *, .next-grid > *, .footer-main > *,
  .founding-top > *, .founding-grid > *, .hero-grid > * { min-width: 0; }
  .care-row { padding: 28px; }
  .more-image { min-height: 240px; }
  .more-copy { padding: 28px; }
  .contact-card, .form-card, .employer-form-card { padding: 24px; }
  .founding-top, .founding-grid { grid-template-columns: minmax(0, 1fr); }
  .found-plan + .found-plan, .plan + .plan {
    border-left: 0; border-top: 2px solid #16c9ad; padding-top: 24px;
  }
  .next-grid, .next-steps, .steps-grid, .grid-3, .trust-row, .card-grid,
  .testimonial-grid { grid-template-columns: minmax(0, 1fr); }
  .plans, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 28px; }
  .hero-bullets { grid-template-columns: minmax(0, 1fr); }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px 0; text-align: center; }
  .footer-brand, .footer-contact { text-align: center; }
  .footer-brand-row { justify-content: center; flex-direction: column; gap: 12px; }
  .footer-contact-line, .social-links { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 700px) {
  body { line-height: 1.6; }
  .container, .wrap { width: calc(100% - 32px); max-width: calc(100% - 32px); }
  /* The header remains in normal flow; no mobile menu script is needed. */
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px; width: calc(100% - 24px); margin: auto; padding: 10px 0;
    font-size: 12px; }
  .nav a { min-width: 0; padding: 8px 4px; border: 0; font-size: 12px; }
  .hero:has(.nav) { min-height: 0; padding-bottom: 24px; }
  .hero:has(.nav) .hero-logo { width: 96px; height: 96px; }
  .hero:has(.nav) .hero-brand .anchor-name { font-size: 32px; line-height: 1.15; }
  .hero:has(.nav) .hero-brand .anchor-sub { font-size: 17px; line-height: 1.4; }
  .hero:has(.nav) .hero-tagline { font-size: 18px; line-height: 1.5;
    letter-spacing: .5px; margin: 10px 0 18px; }
  .hero-actions, .cta-actions, .ready-actions, .landing-actions,
  .return-actions, .btn-row, .resource-cta .wrap {
    flex-wrap: wrap; gap: 12px;
  }
  .hero-actions, .cta-actions, .ready-actions, .landing-actions,
  .return-actions { display: flex; flex-direction: column; align-items: center; }
  .btn, .btn.small, .hero-actions .btn, .benefit-cta .btn,
  .submit-btn, button[type="submit"] {
    min-width: 0; max-width: 100%; width: auto; height: auto;
    min-height: 46px; padding: 12px 18px; line-height: 1.4;
    font-size: 14px; white-space: normal; text-align: center;
    overflow-wrap: anywhere;
  }
  .hero-actions .btn, .cta-actions .btn, .ready-actions .btn,
  .landing-actions .btn, .return-actions .btn { width: min(100%, 340px); }
  main p, main li, .intro p, .about-intro p, .intro-copy p,
  .care-row p, .care-row li, .more-copy p, .family p, .relationship p,
  .employer-intro p, .access-copy p, .benefit-card p, .contact-card p,
  .next-card p, .included-item p, .begin p, .ready p, .step p,
  .faq-answer, .section-lede, .plan-card li, .new-plan li, .found-plan li {
    font-size: 16px; line-height: 1.7;
  }
  h1, h2, h3, p, li, .footer-brand-copy, .footer-contact-line,
  .referral-link-input { overflow-wrap: anywhere; }
  h1, .intro h1, .contact-intro h1, .employer-intro h1 {
    font-size: clamp(28px, 7.5vw, 36px); line-height: 1.2;
  }
  h2, .section-title, .care-row h2, .family h2, .more-copy h2,
  .relationship h2, .ready h2, .cta h2, .big-quote {
    font-size: clamp(23px, 6.2vw, 30px); line-height: 1.3;
  }
  .intro .sub, .care-row .tag, .family .tag, .more-copy .tag { font-size: 18px; line-height: 1.5; }
  .plan-grid, .benefit-grid, .pricing-grid, .included-grid, .care-grid,
  .mini-plans, .new-plans, .resource-grid, .patient-review-grid,
  .plans, .stats-grid, .prepare-list, .form-row, .essential-fee-row {
    grid-template-columns: minmax(0, 1fr); gap: 18px;
  }
  .benefits { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .benefit { width: 100%; max-width: 100%; }
  .care-card, .care-card:nth-child(n) { grid-column: auto; transform: none; }
  .found-plan, .plan { padding: 24px 20px; }
  .care-row, .family { padding: 28px 20px; }
  .family { display: block; }
  .more-copy, .notice-box, .contact-card, .form-card,
  .employer-form-card, .thankyou-card, .prepare-box { padding: 24px 20px; }
  .simple-banner { height: auto; min-height: 72px; padding: 18px 16px; }
  .simple-banner h2, .simple-banner p { margin: 0; line-height: 1.4; }
  .step { grid-template-columns: 52px minmax(0, 1fr); padding: 18px 16px; gap: 12px; }
  .num { font-size: 34px; }
  .step h3 { font-size: 18px; line-height: 1.4; }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 22px 18px; }
  .resource-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 28px 0; }
  .resource-aside { position: static; grid-row: 1; }
  .resource-table-wrap, .mobile-table-scroll { width: 100%; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select, textarea, .referral-link-input {
    width: 100%; min-width: 0; min-height: 46px; font-size: 16px;
    line-height: 1.5; padding: 12px;
  }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
  label { font-size: 15px; line-height: 1.5; }
  .form-disclaimer, .form-disclaimer p { font-size: 12px !important; line-height: 1.6 !important; }
  .form-subtitle, .form-disclaimer, .pricing-disclaimer, .price-note,
  .resource-byline { font-size: 14px; line-height: 1.6; }
  .source-chip-row { flex-wrap: wrap; }
  .referral-link-wrap { flex-direction: column; align-items: stretch; }
  .source-chip { min-height: 44px; padding: 10px; }
  .footer-nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .footer-nav-links a, .footer-legal-links a, .footer-links a,
  .footer-contact-line a { display: inline-flex; justify-content: center;
    align-items: center; min-height: 44px; font-size: 13px; line-height: 1.5; }
  .footer-legal-links, .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
  .footer-brand-copy { font-size: 14px; line-height: 1.6; }
  .footer-brand-name { font-size: 16px; line-height: 1.4; }
  .footer-heading { font-size: 13px; }
  .legal, .copyright, .disclaimer { font-size: 12px; line-height: 1.6; }
  .social-links a { width: 44px !important; height: 44px !important; min-width: 44px; }
  .portrait, .provider-photo { max-width: 100%; }
  .family-photo { width: 100%; max-width: 480px; height: auto; }
  .contact-strip { flex-wrap: wrap; gap: 12px; }
  .site-header-inner { flex-wrap: wrap; gap: 12px; }
  .site-logo { max-width: 100%; }
  /* Legal pages use a single card instead of the marketing-page shell. */
  body[data-page="legal"] .container { width: calc(100% - 24px); max-width: calc(100% - 24px);
    margin: 20px auto; padding: 24px 18px; }
  body[data-page="legal"] p, body[data-page="legal"] li { font-size: 16px; line-height: 1.8; }
  body[data-page="legal"] .notice { padding: 16px; margin: 22px 0; }
  body[data-page="legal"] .footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  body[data-page="legal"] .footer a { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 8px; }
}

@media (max-width: 380px) {
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container, .wrap { width: calc(100% - 28px); max-width: calc(100% - 28px); }
  .step { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .resource-card, .patient-review, .contact-card, .form-card, .plan-card { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
