
/* === FOUNDING ALPHA U4 — UX HARDENING === */
html,body{max-width:100%;overflow-x:hidden}
.topbar{min-width:0}
.topbar-left,.topbar-actions{min-width:0}
.topbar-actions{flex-wrap:nowrap}
.page-heading{min-width:92px}
.search-trigger{width:clamp(150px,18vw,230px)}
#yrPlatformBar{pointer-events:auto}

/* The shared business/product switcher is intentionally bottom-right in U4
   so it can never cover native product controls. */
@media(max-width:1180px){
  .topbar{padding-left:18px;padding-right:18px}
  .search-trigger{width:150px}
  .search-trigger kbd{display:none}
  .save-state b{display:none}
}
@media(max-width:980px){
  .search-trigger{width:42px;display:grid;grid-template-columns:1fr;padding:0}
  .search-trigger b,.search-trigger kbd{display:none}
  .search-trigger>span{margin:auto}
  .theme-toggle .theme-label{display:none}
  .theme-toggle{width:42px;justify-content:center;padding:0}
  .quick-add b{display:none}
  .quick-add{width:42px;padding:0!important}
}
@media(max-width:760px){
  :root{--topbar:68px}
  .topbar{height:68px;padding:0 10px;gap:8px}
  .topbar-actions{gap:6px}
  .page-heading span{font-size:.52rem}
  .page-heading h2{font-size:1rem}
  .save-state{display:none}
  .notification-button{width:36px;height:36px}
  .top-profile .avatar{width:36px;height:36px}
  .view-stack{padding-left:12px!important;padding-right:12px!important}
  .view{padding-left:0!important;padding-right:0!important}
}
@media(max-width:520px){
  .page-heading{min-width:0}
  .page-heading span{display:none}
  .theme-toggle{display:none!important}
  .search-trigger{width:36px;height:36px}
  .quick-add{width:36px;height:36px!important}
}
