/* Ask VOG — full page (ask-vog.php, .av-*) and the site-wide widget (.avw-*).
   Palette: the site's navy gradient (#0A0B3C → #0214CF) with the cyan accent. */
:root{--av-navy:#0214cf;--av-navy-deep:#0a0b3c;--av-cyan:#78f4f0;--av-ink:#17233a;--av-muted:#5b6b8a;--av-soft:#eef2ff;--av-line:#d6def5}

/* ---------- Page shell: fills the viewport under the navbar ---------- */
body:has(#askvog-app) .fixed-action-btn{display:none} /* the back-to-top button sat on the footnote */
.av-page{display:flex;flex-direction:column;min-height:calc(100dvh - 72px);background:#fff}
.av-app{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
.av-bar{flex:0 0 auto;padding:.6rem 1.25rem;border-bottom:1px solid var(--av-line);background:#fff}
.av-bar-inner{display:flex;align-items:center;gap:.75rem;max-width:1100px;margin:0 auto}
.av-glyph{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;color:#fff;font-size:1rem;background:linear-gradient(135deg,var(--av-navy-deep),var(--av-navy))}
.av-glyph--big{width:60px;height:60px;font-size:1.7rem;box-shadow:0 14px 30px rgba(2,20,207,.28)}
.av-bar-name{font-weight:800;color:var(--av-ink);font-size:.95rem;line-height:1.2}
.av-bar-sub{color:var(--av-muted);font-size:.75rem}
.av-new{margin-left:auto;display:inline-flex;align-items:center;gap:.4rem;background:var(--av-soft);border:1.5px solid var(--av-line);color:var(--av-navy);font-weight:700;font-size:.85rem;padding:.45rem 1.1rem;border-radius:50rem;cursor:pointer}
.av-new:hover{background:#e3e9ff}
.av-log{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
.av-thread{max-width:760px;margin:0 auto;padding:1.5rem 1.25rem 1rem;display:flex;flex-direction:column;gap:1.1rem}
.av-welcome{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.1rem;text-align:center;padding:2rem 1.25rem 1rem;max-width:760px;margin:0 auto}
.av-welcome h1{font-size:clamp(1.4rem,3.5vw,1.9rem);margin:0;color:var(--av-ink)}
.av-eyebrow{margin:0 0 -.5rem;color:var(--av-navy);font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.av-lede{color:var(--av-muted);font-size:.95rem;line-height:1.7;max-width:34rem;margin:0}
.av-source{color:var(--av-muted);font-size:.8rem;line-height:1.6;max-width:34rem;margin:-.5rem 0 0;opacity:.9}
.av-cards{display:flex;flex-wrap:wrap;justify-content:center;gap:.85rem;margin-top:.25rem}
.av-card{width:220px;text-align:left;background:var(--av-soft);border:1.5px solid var(--av-line);border-radius:1rem;padding:1rem 1.15rem;cursor:pointer;transition:border-color .2s,transform .2s}
.av-card:hover{border-color:var(--av-navy);transform:translateY(-2px)}
.av-card b{display:block;color:var(--av-navy);font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-bottom:.35rem}
.av-card span{color:var(--av-ink);font-size:.88rem;line-height:1.5}

/* ---------- Messages ---------- */
.av-msg--user{align-self:flex-end;max-width:82%;background:var(--av-navy);color:#fff;font-size:.95rem;line-height:1.65;padding:.8rem 1.25rem;border-radius:1.25rem 1.25rem .4rem 1.25rem;white-space:pre-wrap;overflow-wrap:break-word}
.av-msg--bot{display:flex;gap:.75rem;max-width:92%}
.av-msg--bot .av-glyph{width:30px;height:30px;font-size:.85rem;margin-top:.15rem}
.av-msg-body{color:var(--av-ink);font-size:.95rem;line-height:1.75;min-width:0;overflow-wrap:break-word}
.av-msg-body p{margin:0 0 .6rem}.av-msg-body p:last-child{margin:0}
.av-msg-body a{color:var(--av-navy);font-weight:600}
.av-msg--error .av-msg-body{color:#8a3a12}
.av-typing{display:flex;gap:.75rem;align-items:center}
.av-dots{display:flex;gap:5px;padding:.4rem 0}
.av-dots span{width:8px;height:8px;border-radius:50%;background:var(--av-navy);animation:av-blink 1.2s infinite}
.av-dots span:nth-child(2){animation-delay:.2s}.av-dots span:nth-child(3){animation-delay:.4s}
@keyframes av-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
@media (prefers-reduced-motion:reduce){.av-dots span{animation:none}}

/* ---------- Hand-off buttons under a reply ---------- */
.av-handoffs{display:flex;flex-wrap:wrap;gap:.5rem;margin-left:calc(30px + .75rem)}
.av-handoff{display:inline-flex;align-items:center;gap:.5rem;background:#fff;border:1.5px solid var(--av-navy);color:var(--av-navy);font-weight:700;font-size:.85rem;text-decoration:none;padding:.5rem 1.1rem;border-radius:50rem;transition:background .2s,color .2s}
.av-handoff:hover{background:var(--av-navy);color:#fff}
.av-handoff--emergency{border-color:#b42318;color:#b42318}
.av-handoff--emergency:hover{background:#b42318;color:#fff}

/* ---------- Composer ---------- */
.av-composer{flex:0 0 auto;background:#fff;padding:.5rem 0 .8rem;border-top:1px solid var(--av-line)}
.av-composer-inner{max-width:760px;margin:0 auto;padding:0 1.25rem}
.av-form{display:flex;align-items:flex-end;gap:.6rem;background:var(--av-soft);border:1.5px solid var(--av-line);border-radius:1.6rem;padding:.45rem .45rem .45rem 1.3rem}
.av-form:focus-within{border-color:var(--av-navy)}
.av-input{flex:1;border:0;background:transparent;resize:none;font-size:16px;line-height:1.5;color:var(--av-ink);padding:.55rem 0;max-height:112px;min-width:0;font-family:inherit}
.av-input:focus{outline:none}
.av-send{flex:0 0 auto;width:44px;height:44px;border-radius:50%;border:0;background:var(--av-navy);color:#fff;font-size:1rem;display:flex;align-items:center;justify-content:center;cursor:pointer}
.av-send:disabled{opacity:.45;cursor:default}
.av-note{text-align:center;color:#6b7a99;font-size:.72rem;line-height:1.5;margin:.55rem 0 0}

@media (max-width:575.98px){
  .av-page{min-height:calc(100dvh - 60px)}
  .av-bar{padding:.55rem .9rem}.av-bar-sub{display:none}
  .av-thread{padding:1rem .9rem .75rem}.av-composer-inner{padding:0 .9rem}
  .av-cards{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;width:100%}
  .av-card{width:auto;padding:.7rem .8rem;border-radius:.85rem}.av-card b{font-size:.66rem}.av-card span{font-size:.8rem;line-height:1.4;display:block}
  .av-welcome{gap:.85rem;padding:1.25rem .9rem .5rem}.av-glyph--big,.av-source{display:none}
  .av-msg--user{max-width:88%}
}

/* ---------- Site-wide widget: launcher + panel ---------- */
.avw-launcher{position:fixed;left:1rem;bottom:1rem;z-index:1070;display:inline-flex;align-items:center;gap:.5rem;padding:.7rem 1.1rem;border:0;border-radius:50rem;background:linear-gradient(135deg,var(--av-navy-deep),var(--av-navy));color:#fff;font-weight:700;font-size:.9rem;box-shadow:0 10px 24px rgba(2,20,207,.35);cursor:pointer;font-family:inherit}
.avw-launcher i{font-size:1.1rem}
.avw-launcher:hover{filter:brightness(1.08)}
.avw-launcher[hidden]{display:none}
.avw{position:fixed;left:1rem;bottom:1rem;z-index:1075;display:flex;flex-direction:column;width:min(24rem,calc(100vw - 2rem));height:min(34rem,calc(100vh - 2rem));max-height:100dvh;background:#fff;border:1px solid var(--av-line);border-radius:1.25rem;box-shadow:0 1.25rem 3rem rgba(10,11,60,.3);overflow:hidden;opacity:0;transform:translateY(1rem) scale(.98);transition:opacity .2s,transform .2s;font-family:inherit}
.avw.is-in{opacity:1;transform:none}
@media (max-width:575.98px){.avw{left:0;right:0;bottom:0;top:0;width:auto;height:100dvh;border-radius:0;border:0}}
.avw__head{display:flex;align-items:flex-start;gap:.75rem;padding:.9rem 1rem;background:linear-gradient(135deg,var(--av-navy-deep),var(--av-navy));color:#fff;flex:0 0 auto}
.avw__head h2{margin:0;color:#fff;font-size:.95rem;font-weight:700;line-height:1.3}
.avw__head p{margin:.15rem 0 0;color:#fff;font-size:.75rem;line-height:1.4;opacity:.85}
.avw__head a{color:var(--av-cyan);font-size:.75rem;text-decoration:underline}
.avw__close{margin-left:auto;flex:0 0 auto;width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:999px;background:rgba(255,255,255,.16);color:#fff;font-size:1.1rem;cursor:pointer}
.avw__note{margin:0;padding:.55rem 1rem;background:var(--av-soft);border-bottom:1px solid var(--av-line);font-size:.72rem;line-height:1.5;color:#3a4a70;flex:0 0 auto}
@media (max-height:640px){.avw__note{display:none}}
.avw__log{flex:1 1 auto;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.7rem;background:#fafbff}
.avw__msg{max-width:88%;padding:.65rem .85rem;border-radius:1rem;font-size:.875rem;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.avw__msg--bot{align-self:flex-start;background:#fff;border:1px solid var(--av-line);color:var(--av-ink);border-bottom-left-radius:.35rem}
.avw__msg--user{align-self:flex-end;background:var(--av-navy);color:#fff;border-bottom-right-radius:.35rem}
.avw__msg a{color:var(--av-navy);text-decoration:underline}.avw__msg--user a{color:#fff}
.avw__msg--error{align-self:stretch;max-width:100%;background:#fdf2f2;border:1px solid #f3c9c9;color:#8a1c1c}
.avw__handoffs{display:flex;flex-wrap:wrap;gap:.4rem;align-self:flex-start}
.avw__handoffs .av-handoff{font-size:.78rem;padding:.4rem .85rem}
.avw__typing{align-self:flex-start;display:inline-flex;gap:.25rem;padding:.75rem .9rem;background:#fff;border:1px solid var(--av-line);border-radius:1rem;border-bottom-left-radius:.35rem}
.avw__typing span{width:.4rem;height:.4rem;border-radius:999px;background:#9aa8d8;animation:av-blink 1.2s infinite}
.avw__typing span:nth-child(2){animation-delay:.18s}.avw__typing span:nth-child(3){animation-delay:.36s}
.avw__suggest{display:flex;flex-wrap:wrap;gap:.4rem;padding:0 1rem .75rem;background:#fafbff}
.avw__suggest button{padding:.45rem .8rem;border:1px solid var(--av-line);border-radius:999px;background:#fff;color:var(--av-navy);font-family:inherit;font-size:.78rem;cursor:pointer}
.avw__suggest button:hover{background:var(--av-navy);color:#fff}
.avw__form{display:flex;gap:.5rem;padding:.75rem;border-top:1px solid var(--av-line);background:#fff;flex:0 0 auto}
.avw__input{flex:1 1 auto;min-height:44px;max-height:7rem;padding:.6rem .85rem;border:1px solid var(--av-line);border-radius:1rem;font-family:inherit;font-size:16px;line-height:1.45;resize:none;color:var(--av-ink)}
.avw__input:focus-visible{outline:2px solid var(--av-navy);outline-offset:1px}
.avw__send{flex:0 0 auto;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:999px;background:var(--av-navy);color:#fff;font-size:1.05rem;cursor:pointer}
.avw__send:disabled{opacity:.45;cursor:not-allowed}
@media print{.avw,.avw-launcher{display:none}}
