/* OrionOS cross-product reflow, focus, and touch contract v20260912-accessibility-2 */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  overflow-wrap: break-word;
}
#app,
#app.app-shell,
#app :where(.shell-grid,.topbar,.sidebar,main,.main,.content,.workspace) {
  min-inline-size: 0;
  max-inline-size: 100%;
}
#app :where(img,video,canvas,iframe) { max-inline-size: 100%; }
#app :where(.main,.card,.panel,.module-card,.notice,.timeline-item,.table-wrap,.row-actions,.form-grid) { min-width: 0; }
#app :where(p,li,dd,dt,.help,.small,.muted,figcaption) { max-width: 78ch; line-height: 1.5; }
#app :where(h1,h2,h3,h4,h5,h6,strong,.nav-label,.pill,.status-pill) { text-wrap: balance; }
#app :where(button,a,input,select,textarea,summary,[role="button"],[role="tab"]):focus-visible {
  outline: 3px solid #71d7ff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(3,23,45,.88) !important;
}
#app :where(button,.btn,a.btn,[role="button"],[role="tab"],summary) { touch-action: manipulation; }
#app :where(input,select,textarea) { max-width: 100%; font-size: max(16px, 1em); }
#app :where(.table-wrap,.table-scroll) {
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
#app :where(.pill,.status-pill,.badge,.chip) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* Operational evidence and assistant status text must remain readable at desktop zoom. */
#app .brokerlock-shell :where(small,.small,.help,[class^="brokerlock-"],[class*=" brokerlock-"]),
#app .main[data-view="hey_orion"] :where(small,.small,.help,.eyebrow),
#app :where(.hey-orion-transport-product-mark,.hey-orion-command-lockup) :where(small,.orion-call-mode) {
  font-size: max(12px, .75rem) !important;
  line-height: 1.4;
}

@media (pointer: coarse) {
  #app :where(button,.btn,a.btn,.nav-button,[role="button"],[role="tab"],summary,input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),select,textarea) {
    min-width: 44px;
    min-height: 44px;
  }
  #app :where(input[type="checkbox"],input[type="radio"]) { width: 24px; height: 24px; }
}

@media (max-width: 640px) {
  #app :where(.help,.small,.muted,figcaption) { font-size: max(12px, .78rem) !important; }
  #app :where(.row-actions,.actions-row,.split-actions,.panel-head,.workspace-head) { min-width: 0; flex-wrap: wrap; }
  #app :where(.row-actions,.actions-row) > :where(button,.btn,a.btn) { flex: 1 1 150px; white-space: normal; }
  #app :where(dialog,.modal,.modal-card) { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
}

@media (forced-colors: active) {
  #app :where(button,.btn,a.btn,input,select,textarea,.card,.panel,.pill,.status-pill) { border: 1px solid CanvasText; }
  #app :where(button,a,input,select,textarea,summary,[role="button"]):focus-visible { outline-color: Highlight !important; box-shadow: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #app *, #app *::before, #app *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  #app.app-shell :is(.ovx-mic,.orion-hey-mic,.opc-fab,.orion-hey-text,.hey-orion-final-button,.hey-orion-preview-button,.orion-calling-hub-hey-face,.orion-transport-hey-face,.hey-orion-transport-product-mark,.hey-orion-command-lockup),
  #app.app-shell .hey-orion-dock > button,
  #app.app-shell [data-action="hey-orion-voice"] {
    animation: none !important;
    transition: none !important;
  }
  #app.app-shell :is(.ovx-mic,.orion-hey-mic,.opc-fab,.orion-hey-text,.hey-orion-final-button,.hey-orion-preview-button,.orion-calling-hub-hey-face,.orion-transport-hey-face,.hey-orion-transport-product-mark,.hey-orion-command-lockup):is(:hover,:active),
  #app.app-shell .hey-orion-dock > button:is(:hover,:active),
  #app.app-shell [data-action="hey-orion-voice"]:is(:hover,:active) {
    transform: none !important;
  }
}
