/* Shared web UI layout; PDF rendering and scanner behaviour are separate. */
html { -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body { overflow-wrap: anywhere; }
main, .page, .card, form, .stat, .rv > *, .gallery > *, .shots > * { min-width: 0; }
.page.page-wide { max-width: 1180px; }
img, svg.chart { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }
input, select, textarea { font: inherit; }
input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea {
  min-height: 44px; font-size: 16px; padding: 10px 12px;
}
button, .button { min-height: 44px; font-size: 16px; white-space: normal; text-align: center; touch-action: manipulation; }
pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid #2454ff; outline-offset: 3px;
}
.table-scroll, .tbl-wrap, .scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll table, .tbl-wrap table { min-width: 480px; }
.rv { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.shots figure { min-width: 0; flex-basis: min(100%, 360px); }
.client-page h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.25; }
.client-page .card { min-width: 0; }
.client-page button .en, .client-page .button .en { color: inherit; }
@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.55; }
  .page { padding: 16px 12px 28px; }
  .site-header { gap: 4px; margin-bottom: 16px; }
  .brand { font-size: 1.1rem; }
  .brand-sub { flex-basis: 100%; font-size: 14px; }
  .scanner-ui .card { padding: 16px; }
  .scanner-ui .card .card { padding: 12px; }
  h1 { font-size: 1.5rem; line-height: 1.25; }
  h2 { font-size: 1.2rem; line-height: 1.35; }
  .hint, .site-footer, .meta, figcaption { font-size: 14px; }
  .table-scroll::before, .tbl-wrap::before {
    content: "Таблица прокручивается вбок →"; display: block;
    color: #555; font-size: 14px; margin-bottom: 8px;
  }
  .scan-form { flex-direction: column; }
  .scan-form input[type=text], .scan-form input[type=email] { flex: 0 0 auto; }
  input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea,
  button, .button { min-height: 44px; font-size: 16px; }
  input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea { min-width: 0; padding: 10px 12px; }
  .scan-form button, .scan-form input, .another .button { width: 100%; }
  .findings { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .findings dt { white-space: normal; }
  .findings dd { margin-bottom: 14px; }
  .card > .button { display: block; width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px; }
  form.pay { grid-template-columns: minmax(0, 1fr); }
  form.pay input, form.pay select, form.pay button { width: 100%; }
  form.v { align-items: stretch; }
  form.v input:not([type=hidden]), form.v select { flex: 1 1 100%; width: 100%; min-width: 0 !important; }
  form.v button { flex: 1 1 7rem; }
  .tabs, .periods { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .tabs a, .periods a { display: inline-flex; align-items: center; min-height: 44px; margin: 0; }
  .client-page main { padding: 12px; }
  .client-page .card { padding: 16px; }
  .client-page input[type=text], .client-page button { width: 100%; }
  .client-page button { margin-right: 0; padding: 12px; }
  .client-page .kv, .client-page .kv tbody, .client-page .kv tr,
  .client-page .kv th, .client-page .kv td { display: block; width: 100%; }
  .client-page .kv th { border-bottom: 0; padding-bottom: 2px; }
  .client-page .kv td { padding-top: 2px; padding-bottom: 12px; }
  .checks-table, .checks-table tbody { display: block; width: 100%; }
  .checks-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .checks-table tr { display: block; }
  .checks-table td { display: grid; grid-template-columns: minmax(0, 1fr); padding: 6px 0; border: 0; }
  .checks-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: #555; font-size: 14px; }
  .checks-table td.hide-m { display: grid; }
  .checks-table .fingerprint-row { border-bottom: 1px solid #d9dde3; margin-bottom: 16px; padding-bottom: 12px; }
  .checks-table .fp { display: block; overflow-wrap: anywhere; }
  .login-page { margin: 0 !important; padding: 24px 16px !important; }
  .login-page button, .login-page input { width: 100%; }
  .login-page button { line-height: 1.4; }
}

/* Shared language controls; keep the same layout in English and Russian. */
.public-languages{display:flex;gap:.5rem;flex-wrap:wrap;}
.public-languages a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;}
.scan-form .offer-choice{grid-column:1/-1;display:flex;align-items:flex-start;gap:.6rem;line-height:1.45;font-size:.94rem;}
.scan-form .offer-choice input[type=checkbox]{flex:0 0 18px;width:18px;min-width:18px;height:18px;margin:.2rem 0 0;padding:0;}
.scan-form .offer-choice span{min-width:0;overflow-wrap:anywhere;}
