/* Keep the approved palette; improve touch, alignment and reading space only. */
html { scroll-padding-top: 1rem; }
header, .portal-header-actions { align-items: center; }
.portal-header-actions { display:flex; flex-wrap:wrap; gap:.65rem; justify-content:flex-end; min-width:0; }
main, .workflow-hub, .workflow-stage, .workflow-card, .dispatch-ticket { min-width:0; }
.workflow-stage > .workflow-card { scroll-margin-top:1rem; }
button, select, input, textarea { max-width:100%; box-sizing:border-box; }
button, .quiet, summary { touch-action:manipulation; }
:focus-visible { outline:2px solid #c59a58; outline-offset:3px; }
@media (max-width:640px) {
  body { overflow-wrap:anywhere; }
  main { padding-inline:12px !important; }
  header { gap:.6rem; padding-inline:12px !important; flex-wrap:wrap; }
  .portal-header-actions { gap:.5rem; }
  .portal-header-actions a, .portal-header-actions button { min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
  .hero, section.card, .workflow-hub { padding:18px !important; }
  .workflow-stage > section.card, form .card { padding:12px !important; }
  form .grid, .dispatch-action-grid { grid-template-columns:minmax(0,1fr) !important; gap:12px; }
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { font-size:16px !important; min-height:44px; width:100%; }
  .workflow-picker, .workflow-form-picker { font-size:16px !important; }
  form button { min-height:44px; white-space:normal; }
  .dispatch-actions select { margin-bottom:10px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .workflow-card, .portal-brand { animation:none !important; transition:none !important; }
}

/* Honor state set by install, push, workflow and form controllers on every breakpoint. */
[hidden] { display:none !important; }
