:root {
  --aa-navy: #0b1220;
  --aa-navy-soft: #151e2e;
  --aa-ivory: #f5f2eb;
  --aa-paper: #fffdf8;
  --aa-gold: #b99a62;
  --aa-gold-dark: #8e7245;
  --aa-ink: #141923;
  --aa-muted: #6f7480;
  --aa-line: #ded8ca;
}

#ask-axiom-root,
#ask-axiom-root * { box-sizing: border-box; }

#ask-axiom-root {
  position: relative;
  z-index: 2147483000;
  color: var(--aa-ink);
  font-family: Geist, "IBM Plex Sans", system-ui, sans-serif;
}

html.ask-axiom-open { overflow: hidden !important; }

.aa-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483002;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 7px 18px 7px 8px;
  border: 1px solid rgba(185,154,98,.42);
  border-radius: 4px;
  color: #fff;
  background: var(--aa-navy);
  box-shadow: 0 15px 38px rgba(11,18,32,.2);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease, opacity 140ms ease;
}

.aa-launcher::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 1px;
  pointer-events: none;
}

.aa-launcher:hover { transform: translateY(-2px); border-color: var(--aa-gold); box-shadow: 0 20px 44px rgba(11,18,32,.27); }
.aa-launcher.is-dragging { cursor: grabbing; transform: none; opacity: 1; }
.aa-launcher.is-page-scrolling:not(:hover):not(:focus-visible) { opacity: .32; }
.aa-launcher:focus-visible, .aa-panel button:focus-visible, .aa-panel textarea:focus-visible, .aa-panel a:focus-visible { outline: 2px solid var(--aa-gold); outline-offset: 3px; }
.aa-launcher.is-hidden { opacity: 0; pointer-events: none; transform: translateY(6px); }

.aa-launcher-mark,
.aa-brand-mark,
.aa-lock {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.aa-launcher-mark { width: 42px; height: 42px; border-right: 1px solid rgba(185,154,98,.26); padding-right: 8px; }
.aa-launcher-mark img { display: block; width: 34px; height: 34px; object-fit: contain; }
.aa-launcher-label { display: grid; min-width: 82px; text-align: left; line-height: 1; }
.aa-launcher-label small { margin-bottom: 5px; color: var(--aa-gold); font-family: "IBM Plex Mono", monospace; font-size: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .19em; }
.aa-launcher-label b { color: #fff; font-family: "Cormorant Garamond", Georgia, serif; font-size: 18px; font-weight: 600; letter-spacing: .01em; }

.aa-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  visibility: hidden;
  opacity: 0;
  background: rgba(9,15,27,.48);
  backdrop-filter: blur(2px);
  transition: opacity 180ms ease, visibility 180ms ease;
}
.aa-backdrop.is-open { visibility: visible; opacity: 1; }

.aa-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483003;
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto;
  width: min(458px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #cfc6b5;
  border-radius: 6px;
  color: var(--aa-ink);
  background: var(--aa-ivory);
  box-shadow: -24px 28px 74px rgba(7,12,22,.3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(100% + 34px));
  transition: transform 250ms cubic-bezier(.16,1,.3,1), opacity 170ms ease, visibility 170ms ease;
}
.aa-panel, .aa-header, .aa-scroll, .aa-messages, .aa-message, .aa-composer, .aa-composer textarea { min-width: 0; }
.aa-panel.is-open { opacity: 1; visibility: visible; transform: translateX(0); }

.aa-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 82px;
  padding: 14px 15px 13px 18px;
  color: #fff;
  background: var(--aa-navy);
}
.aa-header::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 2px; background: var(--aa-gold); }
.aa-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.aa-brand-mark { width: 43px; height: 43px; border: 1px solid rgba(185,154,98,.4); background: rgba(255,255,255,.025); }
.aa-brand-mark img { width: 35px; height: 35px; object-fit: contain; }
.aa-brand p, .aa-brand h2 { margin: 0; }
.aa-brand p { color: var(--aa-gold); font-family: "IBM Plex Mono", monospace; font-size: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; }
.aa-brand h2 { margin-top: 4px; color: #fff; font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 600; line-height: .95; }
.aa-header-actions { display: flex; flex: 0 1 auto; align-items: center; gap: 7px; min-width: 0; }
.aa-access-pill { padding: 6px 8px; border: 1px solid rgba(255,255,255,.11); border-radius: 2px; color: #b9bdc5; font-family: "IBM Plex Mono", monospace; font-size: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .11em; white-space: nowrap; }
.aa-access-pill[hidden] { display: none !important; }
.aa-access-pill.is-unlocked { border-color: rgba(185,154,98,.38); color: #d5bd91; }
.aa-access-pill.is-locked { border-color: rgba(185,154,98,.3); color: #c9b184; }
.aa-icon-button { width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 2px; color: #b7bdc7; background: transparent; font-size: 21px; line-height: 1; cursor: pointer; }
.aa-icon-button:hover { border-color: rgba(185,154,98,.55); color: #fff; }

.aa-context-strip { display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 8px 18px; border-bottom: 1px solid var(--aa-line); color: #777b84; background: #eee9df; font-family: "IBM Plex Mono", monospace; font-size: 8px; letter-spacing: .03em; }
.aa-live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--aa-gold); box-shadow: 0 0 0 3px rgba(185,154,98,.12); }
.aa-allowance { margin-left: auto; color: #4e535d; text-align: right; }

.aa-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 25px 20px 28px; scrollbar-color: #c9c1b2 transparent; scrollbar-width: thin; }
.aa-welcome { position: relative; padding: 3px 2px 21px 16px; border-left: 2px solid var(--aa-gold); }
.aa-eyebrow { margin: 0 0 7px; color: var(--aa-gold-dark); font-family: "IBM Plex Mono", monospace; font-size: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .17em; }
.aa-welcome h3 { margin: 0; color: var(--aa-navy); font-family: "Cormorant Garamond", Georgia, serif; font-size: 28px; font-weight: 600; line-height: 1.04; }
.aa-welcome > p:last-child { max-width: 370px; margin: 9px 0 0; color: #626772; font-size: 11px; line-height: 1.55; }
.aa-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 13px 0 22px; }
.aa-suggestion { position: relative; min-height: 58px; padding: 11px 12px 11px 22px; border: 1px solid var(--aa-line); border-radius: 2px; color: #343945; background: rgba(255,253,248,.65); font: inherit; font-size: 10px; line-height: 1.38; text-align: left; cursor: pointer; }
.aa-suggestion::before { content: "+"; position: absolute; top: 11px; left: 9px; color: var(--aa-gold-dark); font-family: "IBM Plex Mono", monospace; }
.aa-suggestion:hover { border-color: var(--aa-gold); color: var(--aa-navy); background: var(--aa-paper); }

.aa-messages { display: grid; gap: 13px; }
.aa-message { max-width: 91%; padding: 12px 14px; border-radius: 2px; font-size: 11px; line-height: 1.55; }
.aa-message p { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.aa-message-user { justify-self: end; color: #fff; background: var(--aa-navy-soft); border-bottom: 2px solid var(--aa-gold); }
.aa-message-assistant { justify-self: start; width: 100%; max-width: 100%; padding: 16px 16px 15px 18px; border: 1px solid var(--aa-line); border-left: 3px solid var(--aa-gold); background: var(--aa-paper); box-shadow: 0 8px 20px rgba(24,27,34,.045); }
.aa-answer-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--aa-gold-dark); font-family: "IBM Plex Mono", monospace; font-size: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; }
.aa-status-warning { color: #9b5c3e; }
.aa-message-assistant h4 { margin: 0 0 7px; color: var(--aa-navy); font-family: "Cormorant Garamond", Georgia, serif; font-size: 19px; font-weight: 600; line-height: 1.15; }
.aa-answer { color: #363b46; font-size: 11px; }
.aa-definition { display: grid; gap: 4px; margin-top: 12px; padding: 10px 11px; border: 1px solid #e4ded2; color: #656a74; background: #f2eee6; font-size: 9px; }
.aa-definition b { color: var(--aa-gold-dark); font-family: "IBM Plex Mono", monospace; font-size: 7px; text-transform: uppercase; letter-spacing: .12em; }
.aa-warning { margin-top: 9px !important; padding: 8px 9px; border-left: 2px solid #a56b46; color: #815036; background: #f7eee7; font-size: 9px; }
.aa-answer-usage { margin-top: 9px !important; color: #8b8e96; font-family: "IBM Plex Mono", monospace; font-size: 7px; text-align: right; }

.aa-evidence { margin-top: 11px; border-top: 1px solid var(--aa-line); }
.aa-evidence summary { padding: 10px 0 2px; color: #555b65; font-family: "IBM Plex Mono", monospace; font-size: 8px; cursor: pointer; }
.aa-evidence-scroll { margin-top: 8px; overflow-x: auto; }
.aa-evidence table { width: 100%; min-width: 360px; border-collapse: collapse; font-family: "IBM Plex Mono", monospace; font-size: 7px; }
.aa-evidence th, .aa-evidence td { padding: 6px; border-bottom: 1px solid #e6e0d5; color: #555a64; text-align: left; vertical-align: top; }
.aa-evidence th { color: #8e7245; text-transform: uppercase; letter-spacing: .06em; }
.aa-sequence-list { display: grid; gap: 8px; margin-top: 9px; }
.aa-sequence-card { overflow: hidden; border: 1px solid #e0d8c9; border-radius: 2px; background: #fbf8f1; }
.aa-sequence-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 10px; border-bottom: 1px solid #e5ded2; background: #f1ece2; }
.aa-sequence-header > div:first-child { display: grid; gap: 2px; min-width: 0; }
.aa-sequence-header strong { color: var(--aa-navy); font-family: "Cormorant Garamond", Georgia, serif; font-size: 14px; line-height: 1.1; }
.aa-sequence-pa { color: var(--aa-gold-dark); font-family: "IBM Plex Mono", monospace; font-size: 7px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.aa-sequence-result { display: grid; gap: 2px; flex: 0 0 auto; text-align: right; }
.aa-sequence-result b { color: #303641; font-size: 9px; }
.aa-sequence-result span { color: #787c84; font-family: "IBM Plex Mono", monospace; font-size: 7px; }
.aa-pitch-list { display: grid; gap: 0; margin: 0; padding: 5px 10px 6px 31px; }
.aa-pitch-list li { padding: 5px 0 5px 3px; border-bottom: 1px solid #ebe5db; color: #50555f; font-family: "IBM Plex Mono", monospace; font-size: 7px; line-height: 1.45; }
.aa-pitch-list li:last-child { border-bottom: 0; }
.aa-pitch-list li::marker { color: var(--aa-gold-dark); font-weight: 700; }
.aa-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 11px; }
.aa-sources > span:first-child { color: #8a8d94; font-family: "IBM Plex Mono", monospace; font-size: 7px; text-transform: uppercase; letter-spacing: .1em; }
.aa-source-chip { padding: 4px 6px; border: 1px solid #d9cfbd; border-radius: 2px; color: #715b37; background: #f8f3e8; font-size: 7px; text-decoration: none; }
a.aa-source-chip:hover { border-color: var(--aa-gold); color: #3f321f; }

.aa-thinking { display: flex; align-items: center; gap: 5px; margin: 14px 0 0; color: #777b84; font-family: "IBM Plex Mono", monospace; font-size: 8px; }
.aa-thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--aa-gold); animation: aa-bounce 900ms infinite ease-in-out; }
.aa-thinking span:nth-child(2) { animation-delay: 120ms; }
.aa-thinking span:nth-child(3) { animation-delay: 240ms; }
.aa-thinking em { margin-left: 4px; font-style: normal; }
.aa-thinking.is-hidden { display: none; }
@keyframes aa-bounce { 0%,70%,100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-4px); opacity: 1; } }

.aa-composer-wrap { padding: 13px 15px 10px; border-top: 1px solid #d6cfc1; background: #eee9df; }
.aa-composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid #cbc2b2; border-radius: 3px; background: var(--aa-paper); transition: border-color 150ms ease, box-shadow 150ms ease; }
.aa-composer:focus-within { border-color: var(--aa-gold); box-shadow: 0 0 0 3px rgba(185,154,98,.11); }
.aa-composer textarea { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 0 7px; resize: none; overflow-y: auto; border: 0; outline: 0; color: var(--aa-ink); background: transparent; font: inherit; font-size: 11px; line-height: 1.45; }
.aa-composer textarea::placeholder { color: #92949a; }
.aa-send { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 2px; color: #fff; background: var(--aa-navy); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.aa-send:hover { background: #1b2639; }
.aa-send i { color: var(--aa-gold); font-size: 15px; font-style: normal; }
.aa-composer.is-loading { opacity: .58; pointer-events: none; }
.aa-disclaimer { margin: 7px 2px 0; color: #8b8c91; font-family: "IBM Plex Mono", monospace; font-size: 7px; line-height: 1.35; text-align: center; }

.aa-gate { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 22px; background: rgba(245,242,235,.91); backdrop-filter: blur(5px); }
.aa-gate.is-hidden { display: none; }
.aa-gate-card { width: 100%; padding: 30px 25px 22px; border: 1px solid #cfc5b2; border-top: 3px solid var(--aa-gold); border-radius: 3px; background: var(--aa-paper); box-shadow: 0 25px 62px rgba(11,18,32,.17); text-align: center; }
.aa-lock { width: 50px; height: 50px; margin: 0 auto 14px; border: 1px solid #d8c9ad; background: var(--aa-navy); }
.aa-lock img { width: 40px; height: 40px; object-fit: contain; }
.aa-gate-card h3 { margin: 0; color: var(--aa-navy); font-family: "Cormorant Garamond", Georgia, serif; font-size: 29px; font-weight: 600; line-height: 1.05; }
.aa-gate-copy { margin: 12px auto 20px; max-width: 330px; color: #666b74; font-size: 11px; line-height: 1.55; }
.aa-primary-cta, .aa-secondary-cta, .aa-gate-back { width: 100%; min-height: 44px; border-radius: 2px; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
.aa-primary-cta { border: 0; color: #fff; background: var(--aa-navy); }
.aa-primary-cta:hover { background: #1b2639; }
.aa-secondary-cta { margin-top: 7px; border: 1px solid #cfc6b6; color: var(--aa-navy); background: transparent; }
.aa-secondary-cta:hover { border-color: var(--aa-gold); }
.aa-gate-back { min-height: 32px; margin-top: 7px; border: 0; color: #83868d; background: transparent; font-size: 9px; }
.aa-gate-back:hover { color: var(--aa-navy); }
.aa-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 680px) {
  .aa-launcher { right: 14px; bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px)); min-width: 52px; min-height: 52px; padding: 5px; border-radius: 3px; }
  .aa-launcher-mark { width: 40px; height: 40px; padding: 0; border: 0; }
  .aa-launcher-mark img { width: 36px; height: 36px; }
  .aa-launcher-label { display: none; }
  .aa-panel { top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: min(89dvh,820px); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 5px 5px 0 0; transform: translateY(105%); }
  .aa-panel.is-open { transform: translateY(0); }
  .aa-suggestions { grid-template-columns: 1fr; }
  .aa-suggestion { min-height: 48px; }
  .aa-scroll { padding: 22px 15px 20px; }
  .aa-gate { padding: 14px; }
  .aa-gate-card { padding: 25px 18px 18px; }
  .aa-header { gap: 8px; padding-right: 10px; padding-left: 12px; }
  .aa-brand { gap: 8px; }
  .aa-access-pill { display: none; }
  .aa-message-user { max-width: 88%; }
  .aa-context-strip { font-size: 10px; }
  .aa-eyebrow { font-size: 10px; }
  .aa-welcome h3 { font-size: 30px; }
  .aa-welcome > p:last-child { font-size: 14px; }
  .aa-suggestion { font-size: 14px; line-height: 1.45; }
  .aa-message { font-size: 15px; line-height: 1.55; }
  .aa-answer-meta { font-size: 10px; }
  .aa-message-assistant h4 { font-size: 22px; }
  .aa-answer { font-size: 15px; }
  .aa-definition { font-size: 13px; line-height: 1.5; }
  .aa-definition b { font-size: 10px; }
  .aa-warning { font-size: 13px; }
  .aa-answer-usage { font-size: 10px; }
  .aa-evidence summary { font-size: 12px; }
  .aa-evidence table { font-size: 12px; }
  .aa-sequence-header strong { font-size: 18px; }
  .aa-sequence-pa { font-size: 10px; }
  .aa-sequence-result b { font-size: 13px; }
  .aa-sequence-result span { font-size: 10px; }
  .aa-pitch-list li { font-size: 12px; }
  .aa-sources > span:first-child { font-size: 10px; }
  .aa-source-chip { font-size: 11px; }
  .aa-thinking { font-size: 11px; }
  .aa-composer textarea { font-size: 16px; }
  .aa-send { font-size: 14px; }
  .aa-disclaimer { font-size: 10px; }
  .aa-gate-copy { font-size: 14px; }
  .aa-primary-cta, .aa-secondary-cta, .aa-gate-back { font-size: 14px; }
}

@media (max-width: 380px) {
  .aa-access-pill { display: none; }
  .aa-context-strip { font-size: 10px; }
  .aa-allowance { max-width: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .aa-panel, .aa-launcher, .aa-backdrop { transition: none !important; }
  .aa-thinking span { animation: none; }
}
