/* OUTCOME STATES (assignment 3, PR 4, 2026-11-11). Loaded after the demo page's inline styles.
   Errors are red in every mode (DESIGN.md: --danger / --coral; amber is for Pro and Founding only, and the old error
   box was amber). Overlays use channel tokens. Every control is 44px. */
.qf-tooltip.error-state{letter-spacing:normal;font-weight:400;color:var(--white);background:rgba(var(--danger-rgb),.08);border:1px solid rgba(var(--danger-rgb),.35)}
.qf-tooltip.error-state .qf-tip-icon{color:var(--danger)}
.qf-tooltip.error-state .qf-tip-title{display:block;font-weight:700;color:var(--white);line-height:1.4}
.qf-tooltip.error-state .qf-tip-body{display:block;margin-top:2px;color:var(--gray);line-height:1.45}
.qf-tooltip.error-state .qf-tip-retry{min-height:44px;padding:0 14px;color:var(--white);border:1px solid rgba(var(--fg-rgb),.25);border-radius:var(--r-sm,8px);font-size:var(--fs-xs,12px)}
.qf-tooltip.error-state .qf-tip-retry:hover{background:rgba(var(--fg-rgb),.06)}
.qf-tooltip.error-state br{display:none}

/* needs_detail: the missing detail, asked for in place. */
.qf-tip-detail{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin-top:10px}
.qf-tip-detail-label{flex:1 0 100%;font-size:var(--fs-xs,12px);font-weight:600;color:var(--gray)}
.qf-tip-detail input{flex:1 1 160px;min-width:0;min-height:44px;padding:0 12px;font-size:16px;color:var(--white);background:var(--dark);
  border:1.5px solid rgba(var(--fg-rgb),.14);border-radius:var(--r-sm,8px);outline:none}
.qf-tip-detail input:focus{border-color:var(--teal)}
.qf-tooltip.error-state .qf-tip-primary{flex:0 0 auto; /* --red is each mode's action colour (themes.css) */ margin-top:0;background:var(--red);border-color:var(--red);color:#fff;font-weight:700}

/* A streamed draft that failed its final check: removed, and the card says a better one is being written. */
.response-box.is-replacing .response-text{color:var(--gray);font-style:italic;font-size:var(--fs-base,14px)}
.response-box.is-replacing .response-text::before{content:"";display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:50%;
  background:var(--teal);vertical-align:middle;animation:osPulse 1.2s ease-in-out infinite}
@keyframes osPulse{0%,100%{opacity:.35}50%{opacity:1}}
@media (prefers-reduced-motion: reduce){.response-box.is-replacing .response-text::before{animation:none}}

/* Contrast (PR 4): measured on the result screen after the X-Ray moved into the reply card (lighter surface).
   - The chip row's coloured chip text fell to 3.6-3.9:1 on that surface; the text is now the theme's text colour and the
     chip keeps its colour in its tint and edge.
   - The response note's text was a hard-coded #6B8FAE in every theme (3.16:1 on Classic light); it now uses the theme's
     secondary text token. */
#step2 #tagSummary .tag-chip{color:var(--white)!important}
.response-note{color:var(--gray)}

