/* Shared viewport boundary for every public page and cabinet. */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
/* Clip does not create a second scrolling container or break sticky headers. */
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}
:where(main, section, article, header, footer, nav, form, fieldset),
.site-header__inner, .header-container, .main-content, .cabinet, .panel,
.card, .grid, .at10-shell, .at10-header, .at10-header-left, .at10-header-right,
.calc-main-grid, .risk-gauss-grid, .journal-grid, .profile-row, .profile-field,
.kalapat-account-panel, .kalapat-account-tools, .kalapat-settings-sync {
  min-width: 0;
  max-width: 100%;
}
:where(img, video, canvas, svg, input, select, textarea, button) { max-width: 100%; }
:where(p, li, a, h1, h2, h3, label), .value, .status, .message {
  overflow-wrap: anywhere;
}
.kalapat-account-tools { flex-wrap: wrap; }
.table-wrap, .table-container, .journal-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 860px) {
  .profile-row, .header-container, .kalapat-account-panel { flex-wrap: wrap; }
  .inline-form > *, .profile-row > * { min-width: 0; }
  .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Prevent automatic input zoom on phones; user pinch-to-zoom remains enabled. */
@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
    font-size: 16px !important;
  }
}
