/* Ask Nexrena widget. Brand tokens only: void, obsidian, gold hairline/CTA, cream. No glass, glow, or gradients.
   Uses the site's CSS vars when present, with fallbacks so it also works standalone. */
.anx { --anx-void: var(--void, #08090b); --anx-obs: var(--obsidian, #0c0f12); --anx-gold: var(--gold, #c9a96e);
  --anx-cream: var(--cream, #f5f0e8); --anx-rule: var(--rule-d, #2a2f38); --anx-mute: var(--night-2, #c9c4ba);
  --anx-serif: var(--serif, "Cormorant Garamond", Georgia, serif); --anx-body: var(--body, "DM Sans", "Helvetica Neue", Arial, sans-serif);
  --anx-mono: var(--mono, "DM Mono", ui-monospace, Menlo, monospace);
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 9000;
  font-family: var(--anx-body); color: var(--anx-cream); view-transition-name: ask-nexrena; }
.anx *, .anx *::before, .anx *::after { box-sizing: border-box; }
.anx-launch { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border: 0; border-radius: 0;
  background: var(--anx-gold); color: var(--anx-void); font: 500 13px/1 var(--anx-mono); letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; box-shadow: 4px 4px 0 var(--anx-void); transition: transform .18s ease, box-shadow .18s ease; }
.anx-launch:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--anx-void); }
.anx-launch:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--anx-void); }
.anx-launch svg { width: 16px; height: 16px; }
.anx[data-open="true"] .anx-launch { display: none; }
.anx-panel { position: absolute; right: 0; bottom: 0; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100svh - 96px));
  display: none; flex-direction: column; background: var(--anx-obs); border: 1px solid var(--anx-gold); border-radius: 0;
  box-shadow: 6px 6px 0 var(--anx-void); transform-origin: 100% 100%; }
.anx[data-open="true"] .anx-panel { display: flex; animation: anx-in .22s cubic-bezier(.2,.7,.2,1) both; }
/* restored open state on a new page: no pop-in, it should look like it never left */
.anx[data-restore] .anx-panel { animation: none !important; }
@keyframes anx-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.anx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--anx-rule); background: var(--anx-void); }
.anx-title { margin: 0; font: 500 26px/1 var(--anx-serif); letter-spacing: -.01em; color: var(--anx-cream); }
.anx-sub { margin: 6px 0 0; font: 400 11px/1.4 var(--anx-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--anx-mute); }
.anx-x { flex: none; width: 36px; height: 36px; border: 1px solid var(--anx-rule); border-radius: 0; background: transparent; color: var(--anx-cream); font: 400 20px/1 var(--anx-body); cursor: pointer; }
.anx-x:hover { border-color: var(--anx-gold); color: var(--anx-gold); }
.anx-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: var(--anx-rule) transparent; }
.anx-msg { max-width: 88%; padding: 10px 12px; font: 400 15px/1.5 var(--anx-body); border-radius: 0; word-wrap: break-word; }
.anx-msg p { margin: 0 0 8px; } .anx-msg p:last-child { margin: 0; }
.anx-msg ul { margin: 0 0 8px; padding-left: 18px; }
.anx-msg a { color: var(--anx-gold); text-decoration: underline; text-underline-offset: 3px; }
.anx-msg strong { font-weight: 600; color: var(--anx-cream); }
.anx-bot { align-self: flex-start; background: var(--anx-void); border: 1px solid var(--anx-rule); border-left: 2px solid var(--anx-gold); }
.anx-me { align-self: flex-end; background: var(--anx-cream); color: var(--anx-void); }
.anx-src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.anx-src a { font: 400 11px/1 var(--anx-mono); letter-spacing: .04em; color: var(--anx-mute); text-decoration: none; border: 1px solid var(--anx-rule); padding: 5px 7px; }
.anx-src a:hover { color: var(--anx-gold); border-color: var(--anx-gold); }
.anx-typing { font: 400 12px/1 var(--anx-mono); color: var(--anx-mute); letter-spacing: .08em; }
.anx-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.anx-chips[hidden] { display: none; }
.anx-chip { border: 1px solid var(--anx-rule); background: transparent; color: var(--anx-cream); padding: 8px 10px; border-radius: 0; font: 400 13px/1.2 var(--anx-body); cursor: pointer; text-align: left; }
.anx-chip:hover { border-color: var(--anx-gold); color: var(--anx-gold); }
.anx-form { display: flex; gap: 0; border-top: 1px solid var(--anx-rule); background: var(--anx-void); }
.anx-in { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--anx-cream); font: 400 16px/1 var(--anx-body); }
.anx-in::placeholder { color: var(--anx-mute); opacity: .8; }
.anx-send { flex: none; width: 52px; height: 52px; border: 0; border-radius: 0; background: var(--anx-gold); color: var(--anx-void); cursor: pointer; display: grid; place-items: center; }
.anx-send:disabled { opacity: .5; cursor: default; }
.anx-send svg { width: 18px; height: 18px; }
.anx-foot { margin: 0; padding: 8px 16px 10px; font: 400 10.5px/1.4 var(--anx-mono); letter-spacing: .04em; color: var(--anx-mute); background: var(--anx-void); }
.anx-foot a { color: var(--anx-mute); }
.anx-lead { align-self: stretch; border: 1px solid var(--anx-gold); padding: 12px; background: var(--anx-void); display: grid; gap: 8px; }
.anx-lead h3 { margin: 0; font: 500 20px/1.1 var(--anx-serif); color: var(--anx-cream); }
.anx-lead p { margin: 0; font: 400 13px/1.45 var(--anx-body); color: var(--anx-mute); }
.anx-lead label { display: grid; gap: 4px; font: 400 11px/1 var(--anx-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--anx-mute); }
.anx-lead input { height: 40px; padding: 0 10px; border: 1px solid var(--anx-rule); border-radius: 0; background: var(--anx-obs); color: var(--anx-cream); font: 400 16px/1 var(--anx-body); }
.anx-lead .anx-row { display: flex; gap: 8px; }
.anx-lead .anx-go { height: 44px; border: 0; border-radius: 0; background: var(--anx-gold); color: var(--anx-void); font: 500 12px/1 var(--anx-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.anx-lead .anx-skip { background: transparent; border: 1px solid var(--anx-rule); color: var(--anx-cream); }
.anx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.anx :focus-visible { outline: 2px solid var(--anx-gold); outline-offset: 2px; }
.anx-in:focus-visible { outline-offset: -2px; }
.anx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) {
  .anx { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .anx-launch { height: 44px; padding: 0 14px; }
  .anx[data-open="true"] { left: 0; right: 0; bottom: 0; }
  .anx-panel { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: min(86svh, 680px); border-width: 1px 0 0; box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) {
  .anx-launch, .anx[data-open="true"] .anx-panel { transition: none; animation: none; }
  .anx-launch:hover, .anx-launch:active { transform: none; }
}
@media print { .anx { display: none; } }
