/* Shared media safeguards do not change the desktop grid or typography. */
img, video, iframe, embed, object { max-width:100%; }
img, video { height:auto; }
.mobile-nav-login, .portal-menu-toggle { display:none; }

@media screen and (max-width:800px) {
  body { font-size:16px; overflow-wrap:anywhere; }
  /* Override small desktop copy, labels and form text on touch screens. */
  body :is(p, label, input, select, textarea, button, .button,
  .primary-nav a, .nav-login, .portal-nav-right a,
  .service-tag, .plan-card li, .plan-price, .contact-note,
  .footer-main a:not(.brand), .footer-main span, .footer-main strong,
  .footer-bottom, .strip-grid strong, .strip-grid small,
  .auth-features>div, .auth-sep, .auth-hint, .sidebar-item,
  .portal-alert, .portal-meta, .portal-message, .empty-state,
  .stat-label, .stat-footer, .platform-progress-label,
  .portal-table th, .portal-table td, .portal-table td select,
  .integration-card strong, .integration-state, .status,
  .performance-toolbar label, .performance-toolbar select,
  .performance-toolbar .performance-help, .report-form input,
  .report-form select, .report-form textarea, .report-notes,
  .report-warning, .report-task-list li, .report-task-list b) {
    font-size:16px;
  }
  a, button, input:not([type=hidden]), select, textarea,
  .button, .portal-nav-right .button, .table-head .button,
  .report-actions button {
    min-width:44px; min-height:44px;
  }
  a { display:inline-flex; align-items:center; }
  input, select, textarea { max-width:100%; min-width:0; }
  .primary-nav { gap:4px; max-height:calc(100dvh - 94px); overflow-y:auto; }
  .primary-nav a { padding:10px 8px; }
  .primary-nav .mobile-nav-login { display:flex; }
  .nav-actions { display:none; }
  .menu-toggle { flex-shrink:0; }
  .nav-wrap { justify-content:space-between; }
  .hero-grid>*, .method-grid>*, .about-grid>*, .contact-grid>*,
  .auth-layout>*, .portal-main>*, .stats-grid>*, .portal-form>* { min-width:0; }
  .hero-content h1 { font-size:clamp(36px,8vw,57px); }
  .eyebrow { max-width:100%; letter-spacing:.1em; }
  .platform-tags { flex-wrap:wrap; }
  .section-heading>p { max-width:100%; }
  .about-symbol { width:100%; min-width:0; aspect-ratio:auto; }
  .button { white-space:normal; }
  .footer-main { gap:20px; }
  .footer-main>div { min-width:0; }
  .portal-nav { height:auto; min-height:75px; flex-wrap:wrap; gap:8px 16px; padding-block:12px; }
  .portal-nav-right { flex-wrap:wrap; gap:8px 16px; }
  .portal-menu-toggle { display:block; justify-self:start; margin:12px 18px; color:var(--ink); border-color:#b6a3cc; }
  .portal-sidebar { display:none; overflow:visible; padding:12px 18px; }
  .portal-sidebar.open { display:flex; flex-direction:column; }
  .sidebar-item { width:100%; white-space:normal; }
  .tile-head, .table-head { flex-wrap:wrap; }
  .legend { white-space:normal; }
  .portal-chart { gap:5px; }
  .portal-chart>div { min-width:0; }
  .chart-labels { flex-wrap:wrap; gap:6px; }
  .portal-table-wrap { max-width:100%; }
  .integration-card { flex-wrap:wrap; }
  .integration-state { white-space:normal; }
  .report-title-row { flex-direction:column; align-items:flex-start; }
  .report-date { text-align:left; white-space:normal; }
  .report-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-kpis strong { white-space:normal; overflow-wrap:anywhere; }
  .report-task-list li, .report-two-cols dl div { flex-wrap:wrap; }
  .report-task-list b { white-space:normal; }
  .report-two-cols table { table-layout:fixed; }
  .report-two-cols th, .report-two-cols td { overflow-wrap:anywhere; }
}
@media screen and (max-width:380px) {
  .stats-grid, .demo-row { grid-template-columns:1fr; }
  .footer-main { grid-template-columns:1fr; }
  .auth-layout { padding-inline:18px; }
  .auth-card { padding:20px; }
  .report-inner, .report-brand { padding:16px; }
  .report-kpis { grid-template-columns:1fr; }
}
