/* Keep touch text controls readable without Safari's focus zoom. This must load
   after theme/component styles: their more-specific input selectors set 14px.
   User pinch zoom and larger root text sizes remain available. */
@media (max-width: 820px), (any-pointer: coarse) {
  body input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
  body textarea,
  body select {
    font-size: max(16px, 1rem) !important;
  }
  .header-actions .language-control select {
    width: 58px; min-width: 58px; padding-left: 6px; padding-right: 20px;
    background-position: right 5px center; text-overflow: clip;
  }
}

/* These search fields have one shared outer border and focus ring. */
#main .concern-search input[type="search"],
#main .adviser-search-field input[type="search"] {
  border: 0; background: transparent; box-shadow: none; outline: none;
  font-size: 16px; padding: 13px 10px;
}
#main .concern-search:focus-within,
#main .adviser-search-field:focus-within {
  border-color: #214e43; box-shadow: 0 0 0 2px #214e43;
}
#main .concern-search input:focus-visible,
#main .adviser-search-field input:focus-visible { outline:none!important; }

/* Route changes and focus restoration must not animate through the whole page.
   Explicit in-page product-section links retain their own reduced-motion-aware scroll. */
html { scroll-behavior: auto; overscroll-behavior-y: none; scrollbar-gutter: stable; }
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.modal-overlay, .drawer-overlay { overscroll-behavior: contain; height: var(--visible-height, 100dvh); bottom: auto; }
.modal { overscroll-behavior: contain; max-height: calc(var(--visible-height, 100dvh) - 50px); }
.modal.navigation-dialog, .drawer { height: var(--visible-height, 100dvh); }
.modal.navigation-dialog { max-height: var(--visible-height, 100dvh); }
@media (max-width: 760px) {
  .modal { max-height: calc(var(--visible-height, 100dvh) - 32px); }
  .modal.navigation-dialog { max-height: var(--visible-height, 100dvh); }
}

/* Keep words intact. Responsive layouts provide room instead of hyphenating copy. */
body :is(h1,h2,h3,h4,h5,h6,p,a,span,strong,small,label,button,summary,li,dt,dd) {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}
body .text-link { white-space: normal; max-width: 100%; min-width: 0; }
