html, body { max-width: 100%; overflow-x: hidden; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 224px; }
  .app-topbar { padding-inline: 18px; }
  .app-content { padding-inline: 20px; }
  .topbar-scope .status-chip--blocked { display: none; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .app-sidebar { position: fixed; left: 0; top: 0; width: min(300px, 88vw); transform: translateX(-105%); box-shadow: var(--shadow-md); transition: transform .18s ease; }
  .app-sidebar.is-open { transform: translateX(0); }
  .mobile-nav-toggle { display: inline-flex; }
  .command-trigger { min-width: 0; width: 44px; padding: 0; }
  .command-trigger span, .command-trigger kbd { display: none; }
  .profile-menu > summary > span:last-child { display: none; }
  .app-content { padding: 18px 16px 40px; }
  .page-header { display: grid; gap: 12px; }
  .page-header h1 { font-size: 26px; }
  .page-scope { flex-wrap: wrap; }
  .public-header { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .public-header nav { order: 3; width: 100%; overflow-x: auto; }
  .public-header .button--primary { margin-left: auto; }
}
@media (max-width: 520px) {
  .app-topbar { gap: 8px; padding: 8px 12px; }
  .topbar-scope { display: none; }
  .profile-menu { margin-left: auto; }
  .app-content { padding-inline: 12px; }
  .page-header h1 { font-size: 24px; }
  .card { padding: 15px; }
  .metric-grid, .status-strip, .card-grid, .summary-card-grid, .owner-action-grid, .blocker-grid, .tool-groups, .lane-grid, .playbooks, .demo-flow { grid-template-columns: minmax(0, 1fr); }
  .commands, .quick-actions { align-items: stretch; }
  .commands > .button, .quick-actions > .button { flex: 1 1 100%; white-space: normal; }
  .password-field { grid-template-columns: minmax(0, 1fr); }
  .button, button, input[type="submit"], input, select { min-height: 44px; }
  .table-wrap { border: 0; overflow: visible; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; min-width: 0; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .table-wrap tbody { display: grid; gap: 10px; }
  .table-wrap tr { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
  .table-wrap td { display: grid; grid-template-columns: minmax(94px, 36%) minmax(0, 1fr); gap: 10px; max-width: none; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); color: var(--text-muted); font-size: 12px; font-weight: 700; }
  .public-content { width: min(100% - 24px, 1160px); padding-top: 20px; }
  .public-footer { display: grid; padding-inline: 16px; }
}
