/* "Ask VeriLots": the public site's help chat (chat.js). Light only; graphite and olive like the header. */
#ask-verilots {
  --av-ink: #16191B; --av-text: #3B444B; --av-muted: #6A7680; --av-line: rgba(16, 19, 21, 0.08);
  --av-graphite: #303941; --av-olive: #6DAB21; --av-olive-deep: #4E8A12; --av-olive-tint: rgba(109, 171, 33, 0.10);
  --av-fill: #F4F5F6; --av-ease: cubic-bezier(.22, 1, .36, 1); --av-pop: cubic-bezier(.34, 1.36, .64, 1);
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif; color: var(--av-text);
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
}
#ask-verilots *, #ask-verilots *::before, #ask-verilots *::after { box-sizing: border-box; }
#ask-verilots .av-ico { display: inline-flex; width: 20px; height: 20px; }
#ask-verilots .av-ico svg { width: 100%; height: 100%; }

/* launcher: a graphite soft square with the logo's olive pip */
.av-launcher { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 18px 0 15px;
  border: 0; border-radius: 14px; background: var(--av-graphite); color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 1px 2px rgba(16, 19, 21, .12), 0 10px 28px rgba(16, 19, 21, .18);
  transition: transform .35s var(--av-pop), box-shadow .35s var(--av-ease), background .2s; }
.av-launcher:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 19, 21, .12), 0 14px 34px rgba(16, 19, 21, .22); }
.av-launcher:focus-visible { outline: 2px solid var(--av-olive); outline-offset: 3px; }
.av-pip { position: absolute; top: 9px; left: 29px; width: 7px; height: 7px; border-radius: 2px; background: #9BC53D; }
#ask-verilots.is-open .av-launcher { transform: scale(.94); opacity: 0; pointer-events: none; }

/* panel: flows out of the launcher's corner, like the header menus */
.av-panel { position: absolute; right: 0; bottom: 0; width: 392px; max-width: calc(100vw - 48px); height: min(620px, calc(100dvh - 48px)); display: flex; flex-direction: column;
  background: #FFFFFF; border-radius: 20px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(16, 19, 21, .08), 0 24px 60px rgba(16, 19, 21, .20);
  transform-origin: 100% 100%; opacity: 0; transform: translateY(10px) scale(.96); pointer-events: none; visibility: hidden;
  transition: opacity .22s var(--av-ease), transform .42s var(--av-pop), width .45s var(--av-ease), visibility 0s linear .42s; }
/* wider while an answer with a table or chart is on screen, growing to the left from its corner */
#ask-verilots.is-wide .av-panel { width: 496px; }
#ask-verilots.is-open .av-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity .22s var(--av-ease), transform .42s var(--av-pop), width .45s var(--av-ease), visibility 0s; }

.av-head { display: flex; align-items: center; gap: 2px; padding: 14px 10px 14px 20px; background: var(--av-graphite); color: #FFFFFF; }
.av-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.av-title-name { font-size: 15px; font-weight: 700; letter-spacing: -.005em; position: relative; padding-left: 13px; }
.av-title-name::before { content: ''; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: #9BC53D; }
.av-title-sub { font-size: 12px; color: #A8B2B8; margin-top: 1px; padding-left: 13px; }
.av-head-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px;
  background: transparent; color: #C9D0D3; cursor: pointer; transition: background .2s, color .2s; }
.av-head-btn:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.av-head-btn[hidden] { display: none; }
.av-head-btn .av-ico { width: 18px; height: 18px; }

.av-log { position: relative; flex: 1; overflow-y: auto; padding: 18px 20px 8px; scroll-behavior: smooth; overscroll-behavior: contain; }
.av-log > * { animation: av-in .38s var(--av-ease) both; }
.av-log > .av-bot { animation-delay: .07s; }
@keyframes av-in { from { opacity: 0; transform: translateY(6px); } }

.av-you { display: flex; justify-content: flex-end; margin: 6px 0 12px; }
.av-you p { margin: 0; max-width: 85%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--av-fill);
  color: var(--av-ink); font-size: 14px; line-height: 1.45; }
.av-bot { margin: 0 0 14px; padding-left: 14px; position: relative; }
.av-bot::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 2px; background: var(--av-olive); }
.av-text { font-size: 14px; line-height: 1.55; color: var(--av-text); }
.av-text p { margin: 0 0 8px; }
.av-text ul, .av-text ol { margin: 0 0 8px; padding-left: 18px; list-style: disc; }
.av-text ol { list-style: decimal; }
.av-text li { margin: 2px 0; }
.av-text li::marker { color: var(--av-muted); }
.av-text > :last-child { margin-bottom: 0; }

/* tables and charts under an answer */
.av-figure { margin: 12px 0 2px; }
.av-figure figcaption { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--av-muted); }
.av-example { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; color: #8A5A00; white-space: nowrap; }
.av-example::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; border-radius: 1.5px; background: #C98500; }
.av-table-wrap { overflow-x: auto; border-radius: 10px; background: var(--av-fill); }
.av-table-wrap:focus-visible { outline: 2px solid var(--av-olive); outline-offset: 2px; }
.av-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.av-table th, .av-table td { padding: 8px 10px; text-align: left; vertical-align: top; }
.av-table thead th { font-size: 12px; font-weight: 600; color: var(--av-muted); white-space: nowrap; }
.av-table tbody th { font-weight: 600; color: var(--av-ink); min-width: 92px; }
.av-table tbody td { color: var(--av-text); }
.av-table tbody tr + tr > * { border-top: 1px solid rgba(16, 19, 21, .06); }
.av-figure-note { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: var(--av-muted); }
.av-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 4px 2px 0; }
.av-bar { flex: 1; min-width: 0; height: 100%; display: grid; grid-template-rows: auto 1fr auto 14px; justify-items: center; gap: 4px; }
.av-bar-value { font-family: Roboto, 'IBM Plex Sans', sans-serif; font-size: 12px; font-weight: 600; color: var(--av-ink); font-variant-numeric: tabular-nums; }
.av-bar-track { width: 100%; max-width: 40px; display: flex; align-items: flex-end; }
.av-bar-fill { display: block; width: 100%; height: 0; border-radius: 6px 6px 2px 2px; background: var(--av-olive); transition: height .7s var(--av-ease); }
.av-bars.is-shown .av-bar-fill { height: var(--h); }
.av-bar:nth-child(2) .av-bar-fill { transition-delay: .05s; } .av-bar:nth-child(3) .av-bar-fill { transition-delay: .1s; }
.av-bar:nth-child(4) .av-bar-fill { transition-delay: .15s; } .av-bar:nth-child(5) .av-bar-fill { transition-delay: .2s; }
.av-bar.is-marked .av-bar-fill { background: #1F6E86; }
.av-bar-label { font-size: 12px; color: var(--av-muted); }
.av-bar-mark { font-size: 11px; font-weight: 600; color: #1F6E86; white-space: nowrap; }
.av-more { margin-top: 8px; font-size: 13px; }
.av-more summary { cursor: pointer; color: var(--av-olive-deep); font-weight: 600; list-style: none; }
.av-more summary::-webkit-details-marker { display: none; }
.av-more summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--av-ease); }
.av-more[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.av-more .av-text { margin-top: 6px; font-size: 13px; color: var(--av-muted); }

.av-parts-title { margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--av-muted); }
.av-parts { display: flex; flex-direction: column; gap: 2px; }
.av-parts button, .av-suggest button { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 8px 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 9px; cursor: pointer;
  font-size: 13.5px; line-height: 1.35; color: var(--av-ink); transition: background .2s; }
.av-parts button::after, .av-suggest button::after { content: '→'; color: var(--av-olive-deep); transition: transform .3s var(--av-ease); }
.av-parts button:hover, .av-suggest button:hover { background: var(--av-fill); }
.av-parts button:hover::after, .av-suggest button:hover::after { transform: translateX(3px); }
.av-parts button:focus-visible, .av-suggest button:focus-visible { outline: 2px solid var(--av-olive); outline-offset: -2px; }
.av-part { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--av-line); }
.av-part-q { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--av-ink); }

.av-link { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--av-olive-deep); text-decoration: none; }
.av-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.av-next { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; margin-top: 12px; padding: 11px 14px; border-radius: 12px;
  background: var(--av-olive-tint); color: var(--av-ink); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .2s; }
.av-next::after { content: '→'; grid-column: 2; grid-row: 1 / span 2; color: var(--av-olive-deep); transition: transform .3s var(--av-ease); }
.av-next:hover { background: rgba(109, 171, 33, .17); }
.av-next:hover::after { transform: translateX(3px); }
.av-next-sub { grid-column: 1; font-size: 12px; font-weight: 400; color: var(--av-muted); }

.av-suggest { margin: 4px 0 14px; }
.av-suggest ul { list-style: none; margin: 0; padding: 0; }
.av-suggest-title { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--av-muted); }

.av-thinking { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--av-muted); }
.av-thinking span { display: inline-flex; gap: 4px; }
.av-thinking i { width: 5px; height: 5px; border-radius: 2px; background: var(--av-olive); animation: av-dot 1.1s var(--av-ease) infinite; }
.av-thinking i:nth-child(2) { animation-delay: .15s; }
.av-thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes av-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.av-team { margin-top: 10px; }
.av-team-btn { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--av-olive-deep); }
.av-team-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.av-team-btn:disabled { color: var(--av-muted); cursor: default; text-decoration: none; }
.av-team-done { margin: 0; font-size: 13px; color: var(--av-muted); }

.av-all .av-search { width: 100%; margin-bottom: 12px; }
.av-empty { font-size: 13px; color: var(--av-muted); }

.av-foot { padding: 10px 14px 12px; border-top: 1px solid var(--av-line); }
.av-form { display: flex; gap: 8px; }
.av-input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 0; border-radius: 11px; background: var(--av-fill); color: var(--av-ink);
  font: inherit; font-size: 14px; outline: none; transition: box-shadow .2s; }
.av-input:focus { box-shadow: 0 0 0 2px rgba(109, 171, 33, .45); }
.av-input::placeholder { color: #8C979F; }
.av-send { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px;
  background: var(--av-olive); color: #16191B; cursor: pointer; transition: background .2s, transform .3s var(--av-pop); }
.av-send:hover { background: #7DBB2E; transform: translateX(1px); }
.av-foot-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 0 2px; }
.av-foot-link { all: unset; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--av-olive-deep); }
.av-foot-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.av-foot-note { font-size: 12px; color: var(--av-muted); }

/* phones: an icon-only launcher; the panel opens as a sheet over most of the screen */
@media (max-width: 639.98px) {
  #ask-verilots { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .av-launcher { width: 50px; height: 50px; padding: 0; justify-content: center; }
  .av-launcher-label { display: none; }
  .av-pip { top: 13px; left: 30px; }
  /* a sheet over the lower part of the screen, so the page stays in view above it (it shrinks with the on-screen
     keyboard, as dvh does) */
  .av-panel { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; height: min(540px, 70dvh); border-radius: 18px;
    transform-origin: 50% 100%; transform: translateY(24px); }
  .av-input { font-size: 16px; }
}
/* reopened on a new page: shown in place, without the opening animation */
#ask-verilots.av-instant .av-panel, #ask-verilots.av-instant .av-launcher, #ask-verilots.av-instant .av-log > * { transition: none !important; animation: none !important; }
@media (max-width: 639.98px) { #ask-verilots .av-panel, #ask-verilots.is-wide .av-panel { width: auto; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .av-bar-fill { height: var(--h) !important; } }
@media (prefers-reduced-motion: reduce) {
  #ask-verilots *, #ask-verilots *::before, #ask-verilots *::after { transition: none !important; animation: none !important; }
}
@media print { #ask-verilots { display: none; } }
