/*
 * Ask ROSH / X-026.1 — scoped contrast and mobile usability repair.
 * Corrects the collision between light storefront tokens and the retained
 * dark Investigation workbench. No API, source or commerce behavior changes.
 */
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence {
  --ask-ink:#142f40;
  --ask-ink-muted:#4d6675;
  --ask-user:#204e68;
  --ask-user-text:#ffffff;
  --ask-assistant:#eaf2f6;
  --ask-assistant-text:#17394c;
}
/* Semantic contrast: light conversation, deliberate dark customer messages. */
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation {
  background:#ffffff!important;
  color:var(--ask-ink)!important;
  border-color:#dce5e9!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-header,
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat,
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose {
  background:#ffffff!important;
  color:var(--ask-ink)!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-identity strong {
  color:#173649!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-identity small {
  color:#4d697a!important;
  line-height:1.4!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item {
  max-width:min(88%,710px)!important;
  min-width:0;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item .ri-chat-bubble {
  background:var(--ask-assistant)!important;
  color:var(--ask-assistant-text)!important;
  border:1px solid #d5e3ec!important;
  box-shadow:none!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item.is-user .ri-chat-bubble {
  background:var(--ask-user)!important;
  color:var(--ask-user-text)!important;
  border-color:var(--ask-user)!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item .ri-chat-bubble :is(p,span,strong,em,li) {
  color:inherit!important;
  opacity:1!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item .ri-chat-bubble p {
  font-size:clamp(14px,1.2vw,16px)!important;
  line-height:1.65!important;
  overflow-wrap:anywhere;
  -webkit-text-fill-color:currentColor;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item .ri-chat-bubble a {
  color:#165e85!important;
  text-decoration:underline;
  text-underline-offset:2px;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item.is-user .ri-chat-bubble a {
  color:#def4ff!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-speaker,
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item>small {
  color:#476475!important;
}
/* Workbench is dark by intention; never inherit general body heading ink. */
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace {
  background:#0c2332!important;
  border-color:#345366!important;
  color:#eaf5fa!important;
  max-width:100%;
  min-width:0;
  overflow-wrap:anywhere;
  scroll-margin-top:90px;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace :is(h2,h3,h4,strong),
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace .x025-workspace-head h2 {
  color:#f5fbff!important;
  -webkit-text-fill-color:currentColor;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace :is(p,li,small,label) {
  color:#c5dce9!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace .x025-overline,
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace :is(.x025-subhead,.x025-detail>h3) {
  color:#a7cee1!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace .x025-tool-row button {
  min-height:44px!important;
  color:#dceef7!important;
  border-color:#456476!important;
  background:#163344!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace .x025-tool-row button[aria-pressed="true"] {
  background:#294f65!important;
  color:#ffffff!important;
  border-color:#81b5cd!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace :is(.x025-close,.x025-product-actions button,.x025-followups button) {
  color:#f0f8fc!important;
  min-height:44px;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace a {
  color:#bce4f9!important;
  text-decoration-thickness:1px;
  overflow-wrap:anywhere;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace :is(button,select,input) {
  max-width:100%;
}
/* Clean, visible input; one focused boundary instead of nested Safari rings. */
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose-field {
  border:1px solid #bdcfd9!important;
  background:#f5f9fb!important;
  box-shadow:none!important;
  border-radius:14px!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose-field:focus-within {
  border-color:#26779b!important;
  box-shadow:0 0 0 2px rgba(38,119,155,.16)!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose-field textarea {
  background:transparent!important;
  color:#15394c!important;
  -webkit-text-fill-color:#15394c;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  font-size:16px!important; /* Prevent iOS input focus zoom. */
  line-height:1.45!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose-field textarea::placeholder {
  color:#5a7687!important;
  -webkit-text-fill-color:#5a7687;
  opacity:1!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence #ri-submit {
  background:#225b79!important;
  color:#ffffff!important;
  border:0!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence :is(#ri-clear,#ri-evidence-toggle) {
  min-height:44px!important;
  font-size:12px!important;
  font-weight:680!important;
  background:#edf3f6!important;
  color:#193749!important;
  border:1px solid #cfdee7!important;
  border-radius:11px!important;
  white-space:nowrap!important;
}
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence :is(#ri-clear,#ri-evidence-toggle):focus-visible,
html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace :is(button,input,select,a):focus-visible {
  outline:2px solid #59a8cd!important;
  outline-offset:3px!important;
}
@media (max-width:540px) {
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-shell {
    width:calc(100% - 24px)!important;
    padding-bottom:28px!important;
    min-width:0;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-header {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    justify-content:stretch!important;
    align-items:center!important;
    gap:10px!important;
    padding:13px 14px!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-identity {
    min-width:0!important;
    max-width:100%!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-identity>span:last-child {
    min-width:0!important;
    flex:1;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-conversation-identity small {
    display:-webkit-box!important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-header-actions {
    display:flex!important;
    justify-content:flex-end!important;
    width:100%!important;
    gap:8px!important;
    min-width:0!important;
    flex-wrap:wrap!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-header-actions>button {
    flex:0 1 auto;
    max-width:100%;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat {
    padding:16px 14px!important;
    max-height:min(52dvh,450px)!important;
    min-height:175px!important;
    overscroll-behavior:contain;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-item {
    max-width:94%!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-bubble {
    padding:13px 14px!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-chat-bubble p {
    font-size:15px!important;
    line-height:1.6!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose {
    padding:12px!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .ri-compose-field {
    min-width:0!important;
    padding:5px!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence #ri-submit {
    flex:0 0 46px!important;
    width:46px!important;
    min-width:46px!important;
    height:46px!important;
    min-height:46px!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace {
    padding:18px 15px!important;
    margin-top:12px!important;
    border-radius:16px!important;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace-head {
    flex-wrap:wrap;
    align-items:flex-start;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace-head h2 {
    font-size:clamp(28px,8vw,34px)!important;
    margin-top:7px;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-tool-row {
    display:flex;
    gap:7px;
    overflow-x:auto;
    padding:3px 0;
    scrollbar-width:thin;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-tool-row button {
    flex:0 0 auto;
    white-space:nowrap;
    font-size:12px;
    padding:9px 12px;
  }
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-detail {
    padding-top:15px;
  }
}
@media(prefers-reduced-motion:reduce) {
  html[data-rosh-theme] body.rosh-intelligence-page main#rosh-intelligence .x025-workspace {
    scroll-behavior:auto!important;
  }
}