/* Shared control geometry for the homepage, workspace, and learning pages. */
:is(button, .primary-button, .control-button, .inline-pill) { touch-action: manipulation; }
:is(.primary-button, .control-button, .card-save, .sort-trigger, .text-button, .portfolio__reset, .exchange__scenario-reset) { white-space: nowrap; flex-shrink: 0; }
.icon-button { flex-shrink: 0; }
.card-actions > :is(button, a) { flex: 1; min-width: 0; min-height: 46px; padding: 10px 15px; border-radius: 999px; font-size: 16px; }
.investment-collection[data-view=list] .card-actions > :is(button, a) { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.dialog-actions :is(.control-button, .icon-button) { min-height: 44px; height: 44px; }
.inline-pill__outline rect { rx: var(--pill-outline-radius); ry: var(--pill-outline-radius); }
.portfolio__remove { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }
.login-drawer__submit .hero__button-arrows { flex-shrink: 0; }

@media (max-width: 1024px) {
  .icon-button,
  .view-controls .icon-button,
  .mobile-menu,
  .dialog-close,
  .detail-copy { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; }
  .detail-copy span { display: none; }
  .detail-save,
  .folder-link,
  .document-view,
  .sort-trigger,
  .article-toolbar .control-button { min-height: 44px; }
  .learn-workspace .control-button,
  .control-button.browse-topics { min-height: 44px; }
  .learn-search button { flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .multi-search button { min-height: 44px; min-width: 44px; }
  .view-controls { gap: 4px; }
  .login-drawer__close { width: 44px; height: 44px; }
  .portfolio__reset,
  .exchange__scenario-reset { min-height: 44px; }
  .logout .inline-pill__content,
  .logout .inline-pill__fill { min-height: 44px; font-size: 12px; padding: 10px 13px; }
}

@media (max-width: 560px) {
  .header-account .welcome { display: none; }
  .header-account { flex-wrap: nowrap; }
  .header-brand { min-width: 0; }
  .inventory-status-toggle button { flex: 1 1 0; min-width: 0; padding-inline: 4px; gap: 4px; font-size: 12px; white-space: nowrap; }
  .inventory-status-toggle button span { min-width: 20px; padding-inline: 4px; font-size: 10px; }
  .results-toolbar { flex-wrap: wrap; }
  .filter-dialog-footer { display: flex; flex-wrap: wrap; gap: 10px; }
  .filter-dialog-footer .text-button { min-height: 44px; padding: 10px 0; }
  .filter-dialog-footer .primary-button { flex: 1 1 100%; width: 100%; min-width: 0; order: -1; }
  .filter-dialog-footer .text-button { margin-inline: auto; }
  .card-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px; }
  .card-actions > :is(button, a) { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; gap: 8px; font-size: 14px; white-space: nowrap; }
  .investment-collection[data-view=list] .card-actions > :is(button, a) { max-width: none; min-height: 48px; }
}

@media (max-width: 480px) {
  .dialog-header .dialog-kicker { display: none; }
  .dialog-header .dialog-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .dialog-header .detail-save { flex: 1 1 auto; font-size: 12px; }
}
