/* Keep intrinsic content widths inside the device viewport; tables scroll locally. */
body { min-width: 0; }
.two-column > *, .form-grid > *, .auth-section > *, .page-heading > *, .section-bar > * { min-width: 0; }
.table-panel, .table-wrap { position: relative; min-width: 0; max-width: 100%; }
.page-heading { flex-wrap: wrap; }
.page-heading h1, .page-heading p, .panel p, .alert, .profile strong { overflow-wrap: anywhere; }
input, select, textarea { max-width: 100%; }
.account-actions { flex-wrap: wrap; }
.account-deletion { margin-top: 24px; }
.account-deletion form { max-width: 520px; }
.workspace-top > span { min-width: 0; overflow-wrap: anywhere; }
.workspace-top > a { flex-shrink: 0; }

@media (max-width: 960px) {
    .two-column { grid-template-columns: minmax(0, 1fr); }
    .workspace .workspace-top { height: auto; min-height: 38px; gap: 12px; padding-block: 8px; }
}

@media (max-width: 640px) {
    body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
    input, select, textarea { font-size: 16px; }
    .row { flex-wrap: wrap; }
    .row > label { flex: 1 1 180px; }
    .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
    .account-actions, .account-actions form, .account-actions .button { width: 100%; }
    .search-form { min-width: 0; max-width: 100%; flex-wrap: wrap; }
    .search-form input { flex: 1 1 160px; width: auto; }
    .search-form .button { flex-shrink: 0; }
    .workspace .workspace-footer, .public-footer { padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
}
