/* Ask owns its layout; Imagine and the Lab keep their own surfaces. */
.hx-ask-page *, .hx-ask-page *::before, .hx-ask-page *::after { box-sizing: border-box; }
body.hx-ask-page { min-height: 100dvh; background: #09090d; }
.hx-ask-page .hx-shell { max-width: 940px; min-height: 100dvh; padding: 24px 28px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.hx-ask-page .hx-top { gap: 24px; padding-bottom: 22px; }
.hx-ask-page .hx-mark { flex-shrink: 0; width: 44px; height: 44px; box-shadow: none; }
.hx-ask-page .hx-brand h1 { font-size: 25px; }
.hx-ask-page .hx-tools { justify-content: flex-end; }
.hx-ask-page .hx-pill { min-height: 38px; font-size: 12px; background: transparent; }
.hx-ask-page #runtimeState { border: 0; padding-left: 0; }
.hx-ask-page .hx-thread { flex: 1; min-height: 230px; padding: 22px 0 32px; }
.hx-ask-page .reply-actions { display: flex; gap: 8px; }
.hx-ask-page .prompt-chip { min-height: 38px; font-family: inherit; font-weight: 500; font-size: 12px; line-height: 1.4; }
.hx-ask-page [hidden] { display: none !important; }
.hx-ask-page .answer-state { color: #b4afbd; font-size: 12px; }
.hx-ask-page .answer-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #80758b; }
.hx-ask-page .answer-state[data-state="working"]::before { background: #b197ff; animation: helix-breathe 1.4s ease-in-out infinite; }
.hx-ask-page .answer-state[data-state="complete"]::before { background: #3ee0a0; }
.hx-ask-page .answer-state[data-state="error"]::before { background: #ff857b; }
.hx-ask-page .question-preview { margin: 24px 0 18px; padding: 14px 18px; border-left: 2px solid #e34c57; border-radius: 0 12px 12px 0; background: #17151d; white-space: pre-wrap; overflow-wrap: anywhere; color: #d2cdd9; font-size: 14px; max-height: 180px; overflow-y: auto; }
.hx-ask-page .question-preview:empty { display: none; }
.hx-ask-page .reply { overflow-wrap: anywhere; color: #e9e5ee; font-size: 16px; line-height: 1.75; }
.hx-ask-page .reply.empty { max-width: 24ch; margin: 48px auto 24px; text-align: center; font-size: clamp(23px, 4vw, 32px); line-height: 1.35; letter-spacing: -.025em; color: #e6e0ed; }
.hx-ask-page .reply p { margin: 0 0 16px; }
.hx-ask-page .reply h3 { margin: 24px 0 8px; font-size: 18px; }
.hx-ask-page .reply li { margin-bottom: 6px; }
.hx-ask-page .reply pre { padding: 16px; border: 1px solid #302b38; border-radius: 12px; overflow: auto; white-space: pre; background: #121016; }
.hx-ask-page .reply code { font: 13px/1.65 ui-monospace, monospace; background: #211c29; padding: 2px 4px; border-radius: 3px; }
.hx-ask-page .reply pre code { padding: 0; background: none; }
.hx-ask-page .reply a { color: #c5b1ff; text-underline-offset: 3px; }
.hx-ask-page .quality-receipt { padding-top: 14px; border-top: 1px solid var(--hx-line); }
.hx-ask-page .quality-receipt span { color: #b0a8bc; font-size: 9px; }
.hx-ask-page .quality-receipt b { font-weight: 500; line-height: 1.5; }
.hx-ask-page .meta { margin-top: 12px; }
.hx-ask-page .hx-dock { padding: 22px; border: 1px solid #39313f; border-radius: 20px; background: #131017; }
.hx-ask-page .hx-dock .eyebrow { color: #bd9bab; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hx-ask-page .hx-dock-title { font-size: 18px; margin: 4px 0 12px; }
.hx-ask-page textarea { display: block; width: 100%; min-height: 105px; max-height: 320px; resize: vertical; border: 1px solid #423849; border-radius: 12px; background: #09090d; color: #f4f1ea; padding: 14px 16px; font-family: inherit; font-size: 16px; line-height: 1.5; }
.hx-ask-page textarea::placeholder { color: #a29aaa; }
.hx-ask-page .helix-mode-control { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hx-ask-page .helix-mode-option { min-height: 44px; padding: 10px; gap: 8px; min-width: 0; }
.hx-ask-page .helix-mode-option img { width: 26px; height: 26px; flex-basis: 26px; }
.hx-ask-page .helix-mode-option small { color: #b0a8bc; }
.hx-ask-page .helix-mode-option b { font-size: 12px; }
.hx-ask-page .mode-help { color: #b0a8bc; font-size: 12px; min-height: 18px; margin: 10px 0 0; }
.hx-ask-page .actions { justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--hx-line); }
.hx-ask-page .composer-help { margin-right: auto; color: #b0a8bc; font-size: 11px; }
.hx-ask-page .btn { min-height: 44px; }
.hx-ask-page .btn:disabled { cursor: default; }
.hx-ask-page :is(button, a, textarea):focus-visible { outline: 2px solid #c6b0ff; outline-offset: 3px; }
@keyframes helix-breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hx-ask-page .answer-state::before { animation: none; } }
@media (max-width: 620px) {
  .hx-ask-page .hx-shell { padding: 18px 16px max(18px, env(safe-area-inset-bottom)); }
  .hx-ask-page .hx-top { align-items: flex-start; gap: 12px; }
  .hx-ask-page .hx-brand p { display: none; }
  .hx-ask-page .hx-brand { gap: 8px; }
  .hx-ask-page .hx-brand .eyebrow { white-space: nowrap; font-size: 8px; }
  .hx-ask-page .hx-mark { width: 32px; height: 32px; }
  .hx-ask-page .hx-tools { gap: 5px; }
  .hx-ask-page .hx-pill { padding: 7px 10px; }
  .hx-ask-page #runtimeState { flex-basis: 100%; justify-content: flex-end; min-height: 18px; }
  .hx-ask-page .hx-dock { padding: 16px; }
  .hx-ask-page .helix-mode-option { justify-content: center; padding: 10px 4px; }
  .hx-ask-page .helix-mode-option img, .hx-ask-page .helix-mode-option small { display: none; }
  .hx-ask-page .helix-mode-option b { font-size: 10px; }
  .hx-ask-page .helix-mode-label { flex-wrap: wrap; }
  .hx-ask-page .composer-help { flex-basis: 100%; }
  .hx-ask-page .quality-receipt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
