.compare .ask-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0;
  color: #4d5967;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.compare .ask-nav-button:hover,
.compare .ask-nav-button[aria-expanded="true"] { color: var(--accent); }
.ask-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  mask: var(--ask-icon) center / contain no-repeat;
}
.compare .ask-empty-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.compare .ask-empty-actions .button { min-height: 40px; }
.compare .empty:has(.ask-empty-actions) { text-align: left; }
#detail .mz-ask-model { min-height: 42px; gap: 8px; }
#detail .mz-ask-model .mz-icon { width: 16px; height: 16px; }

.ask-scrim {
  position: fixed;
  z-index: 60;
  inset: 58px 0 0;
  background: #17223066;
}
.ask-panel {
  position: fixed;
  z-index: 61;
  top: 58px;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(416px, 100vw);
  border-left: 1px solid #dce2e9;
  background: #fff;
  color: #202124;
  box-shadow: -14px 0 40px #1c2c3c14;
}
.ask-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 15px 20px 14px 22px;
  border-bottom: 1px solid #e7e9ed;
}
.ask-panel-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ask-panel-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid #d5e6fa;
  border-radius: 6px;
  background: #f1f7ff;
  color: #006bd6;
}
.ask-panel-title strong { display: block; font-size: 15px; line-height: 1.3; }
.ask-icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 4px;
  color: #6e7884;
}
.ask-icon-button:hover { background: #f1f4f7; color: #263442; }
.ask-icon-button:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.ask-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 26px 24px 20px; }
.ask-scroll.is-empty { display: flex; align-items: center; }
.ask-scroll.is-empty #ask-intro { width: 100%; margin-block: auto; }
.ask-intro h2 { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.35; }
.ask-intro p { margin-top: 10px; color: #737b85; font-size: 13px; line-height: 1.6; }
.ask-prompts { display: grid; margin-top: 31px; border-top: 1px solid #eceef1; }
.ask-prompt {
  width: 100%;
  min-height: 53px;
  padding: 13px 3px;
  border-bottom: 1px solid #eceef1;
  color: #3b4149;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}
.ask-prompt:hover { color: #006bd6; background: #fafbfc; }
.ask-prompt:focus-visible { outline: 2px solid #0071e3; outline-offset: -2px; }
.ask-transcript { display: grid; gap: 25px; }
.ask-message { min-width: 0; font-size: 14px; line-height: 1.65; }
.ask-message-user { justify-self: end; max-width: 90%; padding: 10px 13px; border-radius: 8px; background: #f3f4f6; color: #30343a; overflow-wrap: anywhere; }
.ask-message-assistant { width: 100%; overflow-wrap: anywhere; }
.ask-message-assistant.is-pending { color: #788491; white-space: pre-wrap; }
.ask-message-assistant p { margin: 0 0 10px; color: #444b54; }
.ask-message-assistant h3 { margin: 15px 0 8px; font-size: 15px; line-height: 1.45; }
.ask-message-assistant ul,
.ask-message-assistant ol { margin: 0 0 12px; padding-left: 20px; color: #444b54; }
.ask-message-assistant li { margin: 5px 0; }
.ask-message-assistant a { color: #006bd6; text-decoration: underline; text-underline-offset: 3px; }
.ask-message-assistant code { padding: 1px 4px; border-radius: 3px; background: #f3f4f6; font-size: 12px; }
.ask-table-wrap { max-width: 100%; margin: 9px 0 14px; overflow-x: auto; }
.ask-table-wrap table { width: 100%; border-collapse: collapse; color: #444b54; font-size: 12px; line-height: 1.5; }
.ask-table-wrap th,
.ask-table-wrap td { padding: 8px 6px; border-bottom: 1px solid #e6ebf0; text-align: left; vertical-align: top; }
.ask-table-wrap th { color: #303942; font-weight: 600; }
.ask-message-assistant.is-error p { color: #8a4343; }
.ask-message-assistant.is-error button { min-height: 34px; padding: 5px 10px; border: 1px solid #d8e3ef; border-radius: 5px; color: #006bd6; font-size: 12px; }
.ask-message-assistant.is-error button:hover { background: #f1f7ff; }
.ask-citations { display: flex; flex-wrap: wrap; gap: 8px 11px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e6ebf0; font-size: 12px; line-height: 1.5; }
.ask-citations span { width: 100%; color: #7a8592; }
.ask-citations a { max-width: 100%; overflow-wrap: anywhere; }
.ask-citations.is-collapsible { display: block; }
.ask-citations summary { width: fit-content; color: #006bd6; cursor: pointer; }
.ask-citation-links { display: flex; flex-wrap: wrap; gap: 8px 11px; margin-top: 10px; }
.ask-result-list { margin-top: 16px; border-top: 1px solid #e6ebf0; }
.ask-result {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid #e6ebf0;
}
.ask-result:hover strong { color: #006bd6; }
.ask-result img { width: 56px; height: 42px; flex: none; object-fit: cover; border-radius: 3px; }
.ask-result-copy { min-width: 0; flex: 1; }
.ask-result-copy strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ask-result-copy small { display: block; color: #7a8592; font-size: 11px; line-height: 1.5; }
.ask-result-meta { flex: none; color: #65717f; font-size: 11px; white-space: nowrap; }
.ask-result-meta b { display: block; color: #364150; font-size: 13px; font-weight: 600; text-align: right; }
.ask-result-meta span { display: block; text-align: right; }
.ask-source { display: flex; flex-wrap: wrap; gap: 10px 15px; margin-top: 16px; font-size: 12px; }
.ask-source a { color: #006bd6; text-decoration: underline; text-underline-offset: 3px; }
.ask-source a:hover { color: #004b9a; }
.ask-message-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.ask-message-actions button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #d8e3ef;
  border-radius: 5px;
  color: #006bd6;
  font-size: 12px;
}
.ask-message-actions button:hover { background: #f1f7ff; }
.ask-composer { display: flex; align-items: flex-end; gap: 10px; margin: 0 16px 12px; padding: 6px; border: 1px solid #cfd9e5; border-radius: 8px; background: #fff; }
.ask-composer:focus-within { border-color: #006bd6; box-shadow: 0 0 0 2px #006bd619; }
.ask-composer textarea { display: block; min-width: 0; flex: 1; min-height: 38px; max-height: 144px; resize: none; padding: 8px 6px 7px 8px; border: 0; outline: 0; background: transparent; color: #202124; font-family: inherit; font-size: 14px; line-height: 1.55; }
.ask-composer textarea::placeholder { color: #8a95a1; }
.ask-send { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 7px; background: #006bd6; color: #fff; }
.ask-send:hover { background: #005bb8; }
.ask-composer .ask-send:disabled,
.ask-composer .ask-send:disabled:hover { background: #cbd6e3; cursor: default; }
.ask-send .ask-icon { width: 17px; height: 17px; }
.ask-more-count { margin-top: 11px; color: #7e8996; font-size: 12px; }

.ask-request-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(850px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  background: #fff;
  color: #202124;
  box-shadow: 0 24px 72px #18263738;
}
.ask-request-dialog::backdrop { background: #1722308a; }
.ask-request-shell { display: flex; flex-direction: column; max-height: inherit; }
.ask-request-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px 18px; border-bottom: 1px solid #e7e9ed; }
.ask-request-head h2 { font-size: 22px; }
.ask-request-body { overflow-y: auto; padding: 24px 26px; }
.ask-request-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; border: 1px solid #e1e5eb; border-radius: 6px; background: #f5f7f9; }
.ask-request-switch label { position: relative; display: grid; place-items: center; min-height: 38px; padding: 7px; border-radius: 4px; cursor: pointer; color: #66717e; font-size: 13px; text-align: center; }
.ask-request-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ask-request-switch label:has(input:checked) { background: #fff; color: #006bd6; box-shadow: 0 1px 4px #1d2a3b15; font-weight: 600; }
.ask-request-switch label:has(input:focus-visible) { outline: 2px solid #006bd6; outline-offset: 2px; }
.ask-request-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ask-request-fields label { display: grid; gap: 7px; min-width: 0; color: #394451; font-size: 13px; font-weight: 600; }
.ask-request-fields label.wide { grid-column: 1 / -1; }
.ask-request-fields input,
.ask-request-fields select,
.ask-request-fields textarea { width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px; border: 1px solid #dce3eb; border-radius: 5px; background: #fff; color: #202124; font-size: 13px; font-weight: 400; }
.ask-request-fields input[type="file"] { padding: 8px; }
.ask-request-fields textarea { min-height: 84px; resize: vertical; font-family: inherit; }
.ask-request-fields input:focus,
.ask-request-fields select:focus,
.ask-request-fields textarea:focus { outline: 2px solid #006bd6; outline-offset: 1px; }
.ask-request-footer { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 15px 26px; border-top: 1px solid #e7e9ed; background: #fafbfc; }
.ask-request-footer > div { display: flex; gap: 10px; }
.ask-request-footer button { min-height: 40px; padding: 8px 16px; border-radius: 5px; font-size: 13px; }
.ask-request-cancel { border: 1px solid #d9dfe6; background: #fff; }
.ask-request-submit { background: #006bd6; color: #fff; }
.ask-request-submit:hover { background: #005bb8; }
.ask-preview-result { padding: 14px 2px 6px; }
.ask-preview-result .ask-icon { width: 28px; height: 28px; color: #006bd6; }
.ask-preview-result h3 { margin: 15px 0 8px; font-size: 21px; }
.ask-preview-result p { color: #61707f; font-size: 13px; line-height: 1.7; }
.ask-preview-summary { margin: 22px 0; border-top: 1px solid #e6ebf0; }
.ask-preview-summary > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid #e6ebf0; font-size: 13px; }
.ask-preview-summary dt { color: #788491; }
.ask-preview-summary dd { margin: 0; overflow-wrap: anywhere; }
.ask-preview-stages { display: flex; flex-wrap: wrap; gap: 7px; }
.ask-preview-stages span { padding: 5px 9px; border: 1px solid #e0e6ed; border-radius: 4px; color: #647180; font-size: 11px; }

@media (min-width: 1440px) {
  .compare.ask-ai-open main { max-width: none; margin-left: 0; margin-right: 416px; padding-left: max(40px, calc((100vw - 1328px) / 2)); }
  .compare.ask-ai-open .catalog-layout .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The panel takes room from the right only: the catalog keeps its sidebar
     and gap, and the detail page keeps the left edge it has when centered
     ((100vw - 1200px) / 2, i.e. 64px inside main's padding). */
  .compare.ask-ai-open #detail { margin-left: 64px; margin-right: 0; }
  .compare.ask-ai-open .reference-card-body h3 { font-size: 18px; }
  .ask-scrim { display: none; }
}
@media (max-width: 1439px) {
  body.ask-ai-open { overflow: hidden; }
}
@media (max-width: 760px) {
  .compare .header nav { align-items: center; justify-content: space-between; }
  .compare .ask-nav-button { min-height: 40px; }
  .ask-scrim { inset: 0; }
  .ask-panel { top: 0; width: 100vw; border-left: 0; box-shadow: none; }
  .ask-panel-head { min-height: 66px; padding: 12px 17px; }
  .ask-scroll { padding: 22px 18px 14px; }
  .ask-composer { margin-inline: 12px; margin-bottom: max(12px, env(safe-area-inset-bottom)); }
  .ask-request-dialog { width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .ask-request-shell { height: 100%; max-height: none; }
  .ask-request-head { padding: 16px 18px; }
  .ask-request-body { padding: 20px 18px; flex: 1; }
  .ask-request-fields { grid-template-columns: 1fr; }
  .ask-request-footer { padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
  .ask-request-footer > div { width: 100%; }
  .ask-request-footer button { flex: 1; }
}
