/* /ask, the site chat (SPEC site-chat-2026-11-07 §1, DESIGN Build notes). Loaded on /ask only, after styles.css,
   whose tokens it uses in both themes. One reading column for the conversation and, from 1001 px, a side column
   «How this chat works»; below that the side column is a <details> under the box. Nothing is fixed on the screen:
   no pinned composer, no launcher, no overlay. The thread is one surface with hairlines between turns (UI-S2), and
   the filled accent is on Send only (UI-C3). */

:root{
  --ask-danger:#9E2F1D;
  --ask-field:color-mix(in srgb,var(--fg) 3%,var(--bg));
}
@media (prefers-color-scheme:dark){:root:not([data-theme]){--ask-danger:#FF8F7A}}
:root[data-theme="dark"]{--ask-danger:#FF8F7A}

.ask-page{display:grid;gap:48px;padding:24px 0 72px}
@media (min-width:1001px){
  .ask-page{grid-template-columns:minmax(0,1fr) 300px;column-gap:64px;align-items:start}
}
.ask-main{max-width:720px;min-width:0}
.ask-main h1{font-size:var(--fs-40);line-height:var(--lh-40);letter-spacing:-.02em;margin:16px 0 14px}
.ask-main .lede{max-width:none}

/* Paused or unavailable: one plain line above the questions, which are then links (DESIGN Q6.11). */
.ask-note{margin-top:24px;padding:12px 16px;border:1px solid var(--rule);border-radius:10px;background:var(--band);font-size:var(--fs-16);line-height:var(--lh-16)}
.ask-note[hidden]{display:none}

/* Suggested questions: links without JavaScript or while paused, buttons while the chat is open. One look for both. */
.ask-suggest{margin-top:32px}
.ask-suggest[hidden]{display:none}
.ask-suggest-label{font-size:var(--fs-14);line-height:var(--lh-14);font-weight:600;color:var(--fg-muted);margin-bottom:8px}
.ask-suggest ul{list-style:none;display:grid;gap:8px}
/* /ask#add-ons (the add-ons.dev link): the add-ons question first. ask.js moves it first in the DOM, for Tab and
   screen readers; this rule keeps it first without JavaScript. */
.ask-page:target .ask-suggest-addons{order:-1}

/* ask.js can run after the first paint: it draws a saved conversation (and hides the questions above it), and on
   /ask#add-ons it reorders the questions, while :target itself matches only after the first paint. Until ask.js marks
   the page drawn, the questions and what sits below the thread are laid out but not painted, so they appear in their
   final place instead of jumping (CLS 0.135 with seven saved turns, VERIFY-ASK Д1). Below 1001 px the side column
   sits below too. Should ask.js never run, the 1 s step shows them anyway; it is a visibility switch, not motion, so
   !important keeps it under the reduced-motion rule of styles.css, which sets animation:none!important on everything. */
@media (scripting:enabled){
  .ask-page:not(.is-drawn) :is(.ask-suggest,.ask-thread ~ *){visibility:hidden;animation:ask-show 0s 1s forwards!important}
}
@media (scripting:enabled) and (max-width:1000px){
  .ask-page:not(.is-drawn) .ask-side{visibility:hidden;animation:ask-show 0s 1s forwards!important}
}
@keyframes ask-show{to{visibility:visible}}
.ask-suggest a,.ask-suggest button{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:10px 14px;border:1px solid var(--fg-muted);border-radius:10px;background:transparent;color:var(--fg);font:600 var(--fs-16)/var(--lh-16) Manrope,system-ui,sans-serif;text-align:left;cursor:pointer}
.ask-suggest a:hover,.ask-suggest button:hover{text-decoration:none;background:color-mix(in srgb,var(--fg) 6%,transparent)}
.ask-host{font-weight:400;color:var(--fg-muted)}
.ask-suggest .ic{flex-shrink:0}

/* The thread: one surface, a hairline above each turn, no bubbles and no card per message (UI-X8). */
.ask-thread{margin-top:32px}
.ask-thread:empty{margin:0}
.ask-turn{padding:24px 0;border-top:1px solid var(--rule)}
.ask-turn:last-child{border-bottom:1px solid var(--rule)}
.ask-turn h2{font:600 var(--fs-18)/var(--lh-18) Manrope,system-ui,sans-serif;letter-spacing:0;overflow-wrap:anywhere;white-space:pre-wrap;text-wrap:pretty}
.ask-turn h2:focus{outline:none}
.ask-turn h2:focus-visible{outline:3px solid var(--cta);outline-offset:4px}
.ask-answer{margin-top:12px;display:grid;gap:12px}
.ask-label{font-size:var(--fs-14);line-height:var(--lh-14);font-weight:600;color:var(--fg-muted)}
.ask-text{display:grid;gap:12px}
.ask-text p{overflow-wrap:anywhere;white-space:pre-line}
.ask-sources{display:grid;gap:4px}
.ask-sources ul{list-style:none;display:grid;gap:4px}
.ask-sources a{display:inline-flex;align-items:center;gap:6px;min-height:24px;color:var(--cta);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.ask-sources a .ask-host{text-decoration:none}
/* «Pass to the Vinsetra team» under an answer the site does not cover: the same ghost button as the hand-off below. */
.ask-pass-row{margin-top:4px}
@media (prefers-reduced-motion:no-preference){.ask-answer{animation:ask-in .2s ease-out}}
@keyframes ask-in{from{opacity:0}to{opacity:1}}
/* While an answer is awaited (ask.js waitMark): the AI icon, still, and a thin track whose segment slides across,
   one motion and nothing else (UI-M3: it explains that work goes on; UX-S4: progress past 1 s). The row has the
   answer label's height and offset (20 px, 12 px above), so the answer takes its place without moving anything.
   Muted ink, no accent: the accent stays on Send and the links (UI-C3). Under reduced motion the track is not drawn
   and the icon stays; the status line under the thread says "Looking through the site's pages…" either way. */
.ask-wait{display:flex;align-items:center;gap:8px;height:20px;margin-top:12px;color:var(--fg-muted)}
.ask-wait .ic{flex-shrink:0}
.ask-wait-bar{position:relative;overflow:hidden;width:min(240px,100%);height:3px;border-radius:2px;background:var(--rule)}
.ask-wait-bar::before{content:"";position:absolute;top:0;bottom:0;left:0;width:40%;border-radius:inherit;background:currentColor;transform:translateX(-100%);animation:ask-wait 1.4s cubic-bezier(.4,0,.2,1) infinite}
@keyframes ask-wait{to{transform:translateX(250%)}}
@media (prefers-reduced-motion:reduce){.ask-wait-bar{display:none}}
@media (forced-colors:active){.ask-wait-bar{forced-color-adjust:none;background:GrayText}.ask-wait-bar::before{background:CanvasText}}

/* States: a separate status line (role=status) under the last question, and Undo beside it, outside the live region. */
.ask-statusrow{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:16px}
.ask-statusrow:has(.ask-status:empty):has(.ask-undo[hidden]){margin:0}
.ask-status{font-size:var(--fs-16);line-height:var(--lh-16);color:var(--fg-muted)}
.ask-status:empty{display:none}
.ask-status:focus{outline:none}
.ask-status:focus-visible{outline:3px solid var(--cta);outline-offset:4px}
.ask-status.is-error{position:relative;padding:10px 14px 10px 40px;border:2px solid var(--ask-danger);border-radius:10px;color:var(--fg)}
.ask-status.is-error::before{content:"";position:absolute;left:14px;top:14px;width:16px;height:16px;background:var(--ask-danger);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm-.95 3.5h1.9l-.3 5.2h-1.3l-.3-5.2ZM8 10.7a1.05 1.05 0 1 1 0 2.1 1.05 1.05 0 0 1 0-2.1Z'/%3E%3C/svg%3E") center/16px 16px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm-.95 3.5h1.9l-.3 5.2h-1.3l-.3-5.2ZM8 10.7a1.05 1.05 0 1 1 0 2.1 1.05 1.05 0 0 1 0-2.1Z'/%3E%3C/svg%3E") center/16px 16px no-repeat}
.ask-undo{min-height:32px;padding:4px 12px;border:1px solid var(--fg-muted);border-radius:8px;background:transparent;color:var(--fg);font:600 var(--fs-14)/var(--lh-14) Manrope,system-ui,sans-serif;cursor:pointer}
.ask-undo[hidden]{display:none}

/* After the thread: the turn-limit line, the hand-off and Start over. Ghost buttons; the filled accent stays on Send. */
.ask-after{display:grid;gap:12px;margin-top:16px}
.ask-after[hidden],.ask-limit[hidden],.ask-nostore[hidden]{display:none}
.ask-limit,.ask-nostore{font-size:var(--fs-16);line-height:var(--lh-16)}
.ask-limit:focus{outline:none}
.ask-limit:focus-visible{outline:3px solid var(--cta);outline-offset:4px}
.ask-actions{display:flex;flex-wrap:wrap;gap:12px}
.btn.ask-ghost{background:transparent;color:var(--fg);border-color:var(--fg-muted);cursor:pointer;font-family:inherit}
.btn.ask-ghost:hover{background:color-mix(in srgb,var(--fg) 6%,transparent);filter:none}
.btn.ask-ghost[hidden]{display:none}

/* The box. Hidden without JavaScript (the questions above are links then) and while the chat is paused. */
.ask-form{display:grid;gap:8px;margin-top:32px}
.ask-form[hidden]{display:none}
@media (scripting:none){.ask-form{display:none}}
.ask-form label{font-size:var(--fs-14);line-height:var(--lh-14);font-weight:600}
.ask-form textarea{width:100%;min-height:96px;padding:12px 14px;font:inherit;font-size:var(--fs-16);line-height:var(--lh-16);color:var(--fg);background:var(--ask-field);border:1px solid var(--fg-muted);border-radius:10px;resize:vertical}
.ask-form textarea:focus-visible{outline:3px solid var(--cta);outline-offset:2px;border-color:var(--cta)}
.ask-form textarea[aria-invalid="true"]{border:2px solid var(--ask-danger)}
/* Always rendered (no display:none when empty): it is a polite live region, and a region that appears with its
   text is not reliably spoken. Empty, it adds only the grid gap. */
.ask-error{color:var(--ask-danger);font-weight:600;font-size:var(--fs-14);line-height:var(--lh-14)}
.ask-formrow{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:4px}
.ask-send{cursor:pointer;font-family:inherit}
.ask-send[aria-disabled="true"]{opacity:.6;cursor:progress;transform:none;filter:none}
.ask-count{margin-left:auto;font-size:var(--fs-14);line-height:var(--lh-14);color:var(--fg-muted);font-variant-numeric:tabular-nums}
.ask-count:empty{display:none}
.ask-consent{font-size:var(--fs-14);line-height:var(--lh-14);color:var(--fg-muted)}
.ask-consent a,.ask-alt a,.ask-nojs a,.ask-how a{color:var(--cta);text-decoration:underline;text-underline-offset:3px}
.ask-nojs{margin-top:32px;padding:12px 16px;border:1px solid var(--rule);border-radius:10px;background:var(--band)}
.ask-alt{margin-top:24px;font-size:var(--fs-16);line-height:var(--lh-16)}

/* «How this chat works»: a side column from 1001 px, a <details> under the box below that (closed by ask.js there). */
.ask-how{border-top:1px solid var(--rule);padding-top:16px}
.ask-how summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;list-style:none;cursor:pointer;font:500 var(--fs-24)/var(--lh-24) Newsreader,"Newsreader fallback",serif;letter-spacing:-.015em}
.ask-how summary::-webkit-details-marker{display:none}
.ask-how summary .ic{transition:transform .15s ease}
.ask-how[open] summary .ic{transform:rotate(180deg)}
.ask-how-body{display:grid;gap:12px;padding-top:8px;font-size:var(--fs-14);line-height:var(--lh-14);color:var(--fg)}
.ask-how-body h2{margin-top:8px;font:600 var(--fs-16)/var(--lh-16) Manrope,system-ui,sans-serif;letter-spacing:0}
.ask-how-body ul{list-style:disc;padding-left:20px;display:grid;gap:6px}
@media (prefers-reduced-motion:reduce){.ask-how summary .ic{transition:none}}

/* The header item of the page you are on. The header markup is the same on every page, so ask.js sets aria-current. */
.nav > a[aria-current="page"],.menu a[aria-current="page"]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px}

@media (max-width:640px){
  .ask-main h1{font-size:var(--fs-32);line-height:var(--lh-32)}
  .ask-page{gap:40px;padding-bottom:56px}
}
@media (forced-colors:active){
  .ask-status.is-error::before{background:CanvasText;forced-color-adjust:none}
}
