/* Responsive usability; loaded after the existing design. */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.nav-toggle { display:none; }
input[type="text"], input[type="tel"], textarea { font-size:16px; }
.contact-form input[type="text"], .contact-form input[type="tel"],
.chat-form input[type="text"], .chat-form input[type="tel"], .chat-form textarea { font-size:16px; }
.chat-form .consent { display:flex; align-items:flex-start; gap:10px; font-weight:400; line-height:1.5; }
.consent { cursor:pointer; min-height:44px; align-items:center; }
.chat-form .consent input { margin-top:3px; }
.quiz-close, .icon-button, .compare-toggle { min-width:44px; min-height:44px; }
.chat-dialog, .quiz-dialog {
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - 24px);
  overflow-y:auto; overscroll-behavior:contain;
}
.chat-dialog .quiz-close, .quiz-dialog .quiz-close {
  position:sticky; display:block; top:8px; right:auto; z-index:2;
  margin:8px 8px -52px auto; border-radius:50%; background:#f5f5f7;
  color:#1d1d1f; box-shadow:0 1px 6px #00000012;
}
.chat-form, .quiz-form { padding-top:60px; }
body:has(dialog[open]) { overflow:hidden; }
.legal-document h1, .legal-document h2 { overflow-wrap:anywhere; }
.case-viewport { touch-action:pan-y pinch-zoom; }
.chat-launcher { bottom:max(14px,env(safe-area-inset-bottom)); right:max(14px,env(safe-area-inset-right)); min-height:44px; }
@media (max-width:900px) {
  .site-header { gap:12px; }
  .site-header .brand { margin-right:auto; }
  .site-header .button-small { order:2; min-height:44px; width:auto; flex-shrink:0; }
  .nav-toggle {
    display:inline-flex; align-items:center; justify-content:center; order:3;
    width:44px; height:44px; flex-shrink:0; padding:0;
    border:1px solid #d2d2d7; border-radius:50%; background:transparent;
    color:#1d1d1f; font:inherit; font-size:21px; cursor:pointer;
  }
  .nav-toggle:focus-visible { outline:2px solid #42643e; outline-offset:3px; }
  .site-header nav {
    position:absolute; top:100%; left:0; right:0; display:none;
    padding:12px 24px 20px; background:#fff; border-bottom:1px solid #d2d2d7;
    box-shadow:0 16px 24px #0000000a; gap:2px;
    max-height:calc(100dvh - 80px); overflow-y:auto;
  }
  .site-header nav.is-open { display:grid; }
  .site-header nav a { display:flex; align-items:center; min-height:48px; font-size:16px; }
  .text-link, .doctor-profile { display:inline-flex; align-items:center; min-height:44px; }
  .messenger { min-height:44px; }
  .chat-form h2, .quiz-form h2 { font-size:clamp(25px,5vw,32px); overflow-wrap:anywhere; }
}
@media (max-width:560px) {
  .site-header { padding-inline:14px; gap:8px; }
  .site-header .button-small { display:inline-flex; padding-inline:14px; }
  .site-header .brand { font-size:14px; letter-spacing:.1em; }
  .hero { min-height:0; }
  .hero h1 { overflow-wrap:normal; }
  .section { padding-block:56px; }
  .hero-principles { font-size:12px; }
  .hero-visual figcaption, .medical-note, .case-disclaimer,
  .section-dark .medical-note, .case-card .review-caption { font-size:12px; }
  .contact h2 { font-size:clamp(36px,10vw,47px); }
  .contact-layout, .doctor-layout, .split-layout { min-width:0; }
  .contact-form { padding:26px 18px; }
  .contact-form .consent, .chat-form .consent, .legal-links, .form-note { font-size:13px; }
  .chat-dialog, .quiz-dialog { width:calc(100% - 20px); max-width:600px; border-radius:20px; }
  .chat-form, .quiz-form { padding:60px 20px 28px; }
  .quiz-step legend { font-size:18px; }
  .quiz-step label { min-height:48px; }
  .quiz-messengers .messenger { width:100%; justify-content:center; font-size:13px; }
  .site-footer { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
  .chat-launcher { min-height:44px; font-size:12px; }
  .legal-document h1 { font-size:clamp(30px,8vw,42px); }
}
@media (max-height:500px) and (max-width:950px) {
  .site-header { position:relative; }
  .chat-dialog, .quiz-dialog { max-height:calc(100dvh - 12px); }
}
