:root {
  color-scheme: dark;
  --bg: #07101f;
  --nav: #020b1d;
  --panel: rgba(10, 22, 42, 0.86);
  --panel-solid: #0c1830;
  --panel-soft: #11294d;
  --blue: #087ee8;
  --blue-bright: #24a1ff;
  --blue-soft: rgba(8, 126, 232, 0.18);
  --ink: #f4f8ff;
  --muted: #9fb0c6;
  --faint: #647892;
  --line: rgba(172, 196, 228, 0.18);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(8, 126, 232, 0.2), transparent 310px),
    radial-gradient(circle at 50% 0, rgba(36, 161, 255, 0.18), transparent 420px),
    linear-gradient(180deg, #081426, #2D3047 72%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

button,
textarea,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  animation: page-enter 520ms ease both;
}

#agent-component-root {
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 7px min(5.2vw, 68px);
  background: rgba(2, 11, 29, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: white;
  text-decoration: none;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-blue {
  color: var(--blue-bright);
}

.brand-agent {
  margin-left: 12px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.lang-button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.lang-button:hover,
.lang-button.is-active {
  background: white;
  color: #07101f;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
  gap: 18px;
  width: min(940px, calc(100% - 28px));
  min-height: calc(100vh - 250px);
  margin: 0 auto;
  padding: 34px 0 24px;
  transition: padding 260ms ease;
}

.chat-shell.is-initial {
  grid-template-rows: auto auto;
  align-content: center;
  gap: 36px;
  padding-bottom: 13vh;
}

.chat-shell.is-initial .chat-log,
.chat-shell.is-initial .conversation-actions {
  display: none;
}

.beta-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  width: 92px;
  height: 92px;
  pointer-events: none;
  overflow: hidden;
  color: #07101f;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: lowercase;
}

.beta-ribbon::before {
  content: "";
  position: absolute;
  top: 16px;
  right: -31px;
  width: 122px;
  height: 28px;
  background: #ffc247;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  transform: rotate(45deg);
}

.beta-ribbon::after {
  content: "beta";
  position: absolute;
  top: 17px;
  right: 8px;
  transform: rotate(45deg);
  transform-origin: center;
}

.app-shell .beta-ribbon {
  position: absolute;
}

.welcome {
  text-align: center;
  animation: welcome-enter 520ms ease 90ms both;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    max-height 220ms ease,
    margin 220ms ease;
  padding: 35px 0;
}

.chat-shell.has-chat .welcome {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  visibility: hidden;
  transform: translateY(-8px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-bright);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: white !important;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.welcome h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
}

.message {
  display: flex;
  max-width: min(780px, 92%);
  animation: bubble-in 280ms ease both;
}

.message-user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message-agent {
  align-self: flex-start;
}

.bubble {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.message-user .bubble {
  background: linear-gradient(145deg, var(--blue), #0764bd);
  color: white;
}

.message-agent .bubble {
  background: var(--panel);
  color: #e5eefc;
  backdrop-filter: blur(16px);
}

.message-bare .bubble {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.message-title {
  margin-bottom: 10px;
  color: white;
  font-weight: 850;
}

.answer {
  line-height: 1.65;
}

.answer p {
  margin: 0 0 12px;
}

.answer p:last-child {
  margin-bottom: 0;
}

.answer strong {
  color: white;
  font-weight: 850;
}

.login-required {
  display: grid;
  gap: 14px;
  width: min(460px, calc(100vw - 74px));
  line-height: 1.5;
}

.login-required p {
  margin: 0;
}

.login-required-action {
  justify-self: start;
}

.token-purchase {
  display: grid;
  gap: 16px;
  width: min(520px, calc(100vw - 74px));
}

.token-purchase-card {
  border: 1px solid rgba(172, 196, 228, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 0, rgba(36, 161, 255, 0.2), transparent 36%),
    radial-gradient(circle at 50% 0, rgba(36, 161, 255, 0.12), transparent 58%),
    linear-gradient(145deg, rgba(16, 35, 66, 0.96), rgba(7, 16, 31, 0.98)),
    var(--panel-solid);
  box-shadow: 0 24px 78px rgba(0, 0, 0, 0.34);
  padding: 24px 34px 28px;
}

.token-purchase-header {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 24px;
}

.token-purchase-spark {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 28%, rgba(155, 200, 255, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(80, 122, 212, 0.44), rgba(23, 49, 96, 0.86));
  border: 1px solid rgba(36, 161, 255, 0.76);
  box-shadow:
    inset 0 -18px 34px rgba(0, 0, 0, 0.18),
    0 0 22px rgba(36, 161, 255, 0.18);
}

.token-purchase .message-title {
  margin: 2px 0 0;
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.15;
}

.token-purchase-note {
  max-width: 380px;
  margin: 0;
  color: rgba(214, 226, 244, 0.78);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.55;
}

.token-purchase-row {
  display: grid;
  gap: 24px;
}

.token-pack-select-shell {
  position: relative;
  width: 100%;
  height: 50px;
  display: grid;
  grid-template-columns: 46px 1fr 42px;
  align-items: center;
  border: 1px solid rgba(36, 161, 255, 0.88);
  border-radius: 8px;
  background: rgba(8, 18, 37, 0.56);
  color: rgba(213, 226, 244, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(36, 161, 255, 0.12),
    0 0 18px rgba(36, 161, 255, 0.08);
}

.token-pack-select-shell > i {
  justify-self: center;
  color: #cfe6ff;
  font-size: 1.08rem;
}

.token-pack-select-shell::after {
  content: "\f078";
  justify-self: center;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-size: 0.9rem;
  font-weight: 900;
  pointer-events: none;
}

.token-pack-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  outline: none;
  padding: 0;
}

.token-pack-select option {
  background: #ffffff;
  color: #101827;
  font-weight: 700;
}

.token-pack-select:focus {
  box-shadow: none;
}

.token-pack-select-shell:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(36, 161, 255, 0.36),
    0 0 0 3px rgba(8, 126, 232, 0.18);
}

.token-pack-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.token-buy-button {
  min-width: 0;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(172, 196, 228, 0.24);
  border-radius: 8px;
  background: rgba(232, 240, 255, 0.07);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 900;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.token-buy-button i {
  color: #cfe6ff;
  font-size: 1.36rem;
  filter: drop-shadow(0 0 10px rgba(73, 166, 255, 0.24));
}

.token-buy-button:hover {
  background: rgba(36, 161, 255, 0.14);
  border-color: rgba(36, 161, 255, 0.72);
  box-shadow: 0 0 22px rgba(36, 161, 255, 0.12);
  color: white;
  transform: translateY(-1px);
}

.token-buy-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.token-purchase-secure {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: rgba(159, 176, 198, 0.78) !important;
  font-size: 0.84rem !important;
  font-weight: 650;
}

.token-purchase-secure::before {
  content: "\f023";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-weight: 900;
  color: rgba(159, 176, 198, 0.78);
}

.database-stats {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 5vw, 54px);
  margin-top: 22px;
  padding: 24px 0 2px;
  border-top: 1px solid rgba(172, 196, 228, 0.18);
  animation: composer-enter 520ms ease 180ms both;
}

.database-stats[hidden] {
  display: none !important;
}

.database-stats.is-visible {
  animation: database-stats-rise 360ms ease both;
}

.database-stat {
  min-width: 0;
  padding: 0;
  text-align: center;
}

.database-stat strong,
.database-stat-value {
  display: block;
  color: var(--blue-bright);
  font-size: clamp(1.38rem, 2.7vw, 1.86rem);
  font-weight: 650;
  line-height: 1.05;
}

.database-stat span:not(.database-stat-value) {
  display: block;
  margin-top: 10px;
  color: rgba(190, 205, 226, 0.8);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.manual-query-offer {
  display: grid;
  gap: 14px;
  width: min(520px, calc(100vw - 74px));
}

.manual-query-card {
  overflow: visible;
  border: 1px solid rgba(172, 196, 228, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(36, 161, 255, 0.12), transparent 58%),
    linear-gradient(145deg, rgba(16, 35, 66, 0.96), rgba(7, 16, 31, 0.98)),
    var(--panel-solid);
  box-shadow: 0 24px 78px rgba(0, 0, 0, 0.34);
  padding: 24px 64px 28px;
}

.manual-query-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 18px;
}

.manual-query-spark {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 28%, rgba(155, 200, 255, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(80, 122, 212, 0.44), rgba(23, 49, 96, 0.86));
  border: 1px solid rgba(124, 167, 236, 0.18);
  box-shadow: inset 0 -18px 34px rgba(0, 0, 0, 0.18);
}

.manual-query-star {
  position: absolute;
  width: auto;
  height: auto;
  color: #cfe6ff;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(73, 166, 255, 0.72));
}

.manual-query-star::before {
  content: "✦";
}

.manual-query-star-main {
  left: 20px;
  top: 18px;
  font-size: 2rem;
}

.manual-query-star-small {
  right: 17px;
  top: 15px;
  opacity: 0.9;
  font-size: 1rem;
}

.manual-query-offer .message-title {
  margin: 2px 0 0;
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.15;
}

.manual-query-offer p {
  margin: 0;
  color: rgba(214, 226, 244, 0.78);
  font-size: 0.94rem;
  line-height: 1.45;
}

.manual-query-body {
  display: grid;
  gap: 18px;
}

.manual-query-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(172, 196, 228, 0.19);
  border-radius: 8px;
  background: rgba(232, 240, 255, 0.07);
}

.manual-query-method {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-right: 1px solid rgba(172, 196, 228, 0.12);
  background: transparent;
  color: rgba(213, 226, 244, 0.82);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 900;
  padding: 0 12px;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.manual-query-method:last-child {
  border-right: 0;
}

.manual-query-method:focus {
  outline: none;
}

.manual-query-method:focus-visible {
  background: rgba(36, 161, 255, 0.12);
  box-shadow: inset 0 0 0 2px rgba(36, 161, 255, 0.48);
}

.manual-query-method i {
  color: rgba(212, 229, 250, 0.82);
  font-size: 1.25rem;
}

.manual-query-method:hover,
.manual-query-method.is-selected {
  color: white;
}

.manual-query-method.is-selected {
  background: rgba(36, 161, 255, 0.15);
  box-shadow:
    inset 0 0 0 1px rgba(36, 161, 255, 0.96),
    0 0 22px rgba(36, 161, 255, 0.14);
}

.manual-query-method.is-selected i {
  color: #cfe6ff;
}

.manual-query-offer label {
  display: grid;
  gap: 10px;
  min-width: 0;
  color: rgba(190, 205, 226, 0.92);
  font-size: 0.82rem;
  font-weight: 760;
}

.manual-query-checkout-row {
  display: grid;
  gap: 20px;
}

.manual-query-checkout-row label {
  display: grid;
  gap: 10px;
}

.manual-query-checkout-row label span {
  min-width: 0;
}

.manual-query-email-shell {
  width: 100%;
  height: 44px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  border: 1px solid rgba(172, 196, 228, 0.2);
  border-radius: 8px;
  background: rgba(8, 18, 37, 0.62);
  color: rgba(190, 205, 226, 0.74);
}

.manual-query-email-shell i {
  justify-self: center;
  font-size: 1rem;
}

.manual-query-email {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  padding: 0 14px 0 0;
  font: inherit;
}

.manual-query-email::placeholder {
  color: rgba(159, 176, 198, 0.56);
}

.manual-query-buy-button {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #2c98ff, #1478ec);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  padding: 0 16px;
  box-shadow: 0 12px 24px rgba(8, 126, 232, 0.22);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.manual-query-buy-button:hover {
  background: linear-gradient(180deg, #46a7ff, #1d82f3);
  box-shadow: 0 16px 30px rgba(8, 126, 232, 0.28);
  transform: translateY(-1px);
}

.manual-query-buy-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.manual-query-lock {
  position: relative;
  width: 16px;
  height: 13px;
  border-radius: 3px;
  background: currentColor;
}

.manual-query-lock::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -9px;
  width: 10px;
  height: 12px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.manual-query-secure {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(159, 176, 198, 0.78) !important;
  font-size: 0.84rem !important;
  font-weight: 650;
}

.manual-query-secure::before {
  content: "\f023";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-weight: 900;
  color: rgba(159, 176, 198, 0.78);
}

.answer em {
  color: var(--muted);
}

.answer table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: transparent;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.answer th,
.answer td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(172, 196, 228, 0.12);
  text-align: left;
  vertical-align: middle;
  line-height: 1.28;
}

.answer th {
  background:
    linear-gradient(180deg, rgba(36, 161, 255, 0.2), rgba(8, 126, 232, 0.12)),
    rgba(8, 126, 232, 0.26);
  color: white;
  font-weight: 850;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.answer td {
  color: rgba(244, 248, 255, 0.9);
  font-weight: 560;
}

.answer tbody tr:nth-child(even) {
  background: rgba(244, 248, 255, 0.025);
}

.answer tbody tr:hover {
  background: rgba(36, 161, 255, 0.055);
}

.answer th:first-child,
.answer td:first-child {
  padding-left: 14px;
}

.answer th:last-child,
.answer td:last-child {
  padding-right: 14px;
}

.answer tr:last-child td {
  border-bottom: 0;
}

.table-scroll {
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid rgba(172, 196, 228, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 32, 58, 0.62), rgba(4, 11, 23, 0.54)),
    rgba(3, 8, 18, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 34px rgba(0, 0, 0, 0.18);
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  animation: dot-pulse 920ms ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 130ms;
}

.typing-dots span:nth-child(3) {
  animation-delay: 260ms;
}

.conversation-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  animation: actions-in 240ms ease both;
}

.conversation-actions[hidden] {
  display: none;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.action-primary {
  border: 0;
  background: var(--blue);
  color: white;
  box-shadow: 0 14px 30px rgba(8, 126, 232, 0.24);
}

.action-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.action-button:hover {
  transform: translateY(-1px);
}

.payment-return {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  width: min(720px, calc(100% - 32px));
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  padding: 56px 0 72px;
  text-align: center;
}

.payment-status-mark {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.1rem;
  font-weight: 950;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.payment-status-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
}

.payment-return-success .payment-status-mark {
  border-color: rgba(42, 201, 122, 0.54);
  background: rgba(42, 201, 122, 0.18);
  color: #6ff0a8;
}

.payment-return-cancel .payment-status-mark {
  border-color: rgba(255, 194, 87, 0.54);
  background: rgba(255, 194, 87, 0.14);
  color: #ffd287;
}

.payment-return-error .payment-status-mark {
  border-color: rgba(255, 104, 104, 0.58);
  background: rgba(255, 104, 104, 0.14);
  color: #ff8f8f;
}

.payment-return-pending .payment-status-mark {
  border-color: rgba(36, 161, 255, 0.58);
  background: rgba(36, 161, 255, 0.14);
  color: #8ed0ff;
}

.payment-return-pending .payment-status-mark svg {
  animation: payment-spin 900ms linear infinite;
  transform-origin: 50% 50%;
}

.payment-return-message {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.62;
}

.payment-return-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-decoration: none;
}

.composer {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  animation: composer-enter 520ms ease 120ms both;
}

.query-builder {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.query-builder[hidden] {
  display: none;
}

.guided-scope {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  padding: 6px;
  backdrop-filter: blur(14px);
}

.guided-scope[hidden] {
  display: none;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scope-field {
  position: relative;
  display: grid;
  min-width: 0;
}

.scope-field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  pointer-events: none;
  color: rgba(159, 176, 198, 0.78);
  transform: translateY(-70%) rotate(45deg);
}

.scope-field-wide {
  grid-column: 1 / -1;
}

.scope-search {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(172, 196, 228, 0.18);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 248, 255, 0.74);
  padding: 0 36px 0 16px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  appearance: none;
  text-overflow: ellipsis;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.scope-search::placeholder {
  color: rgba(159, 176, 198, 0.46);
  opacity: 1;
}

.scope-search::-webkit-search-cancel-button,
.scope-search::-webkit-search-decoration,
.scope-search::-webkit-search-results-button,
.scope-search::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.scope-field.has-selection .scope-search {
  color: white;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(172, 196, 228, 0.24);
}

.scope-search:focus {
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(36, 161, 255, 0.48);
  box-shadow: 0 0 0 3px rgba(36, 161, 255, 0.12);
}

.scope-options {
  display: grid;
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 8;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: #121b2b;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  scrollbar-color: rgba(244, 248, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.scope-options[hidden],
.target-options[hidden] {
  display: none;
}

.scope-trigger {
  cursor: pointer;
  text-align: left;
}

.scope-option,
.target-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(244, 248, 255, 0.78);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.scope-option:hover,
.target-option:hover {
  background: rgba(36, 161, 255, 0.14);
  color: white;
}

.scope-option input,
.target-option input {
  flex: 0 0 auto;
  accent-color: var(--blue-bright);
}

.scope-option span,
.target-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-options {
  display: grid;
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 8;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: #121b2b;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.scope-empty {
  margin: 0;
  color: var(--faint);
  font-size: 0.8rem;
}

.free-query-warning {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 9px;
  border: 1px solid rgba(255, 194, 87, 0.26);
  border-radius: 8px;
  background: rgba(255, 194, 87, 0.08);
  color: rgba(255, 218, 151, 0.92);
  padding: 9px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
}

.free-query-warning.is-error {
  color: rgba(255, 218, 151, 0.92);
}

.notice-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(255, 194, 87, 0.18);
  color: #ffd996;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.free-query-warning[hidden] {
  display: none;
}

.model-menu {
  position: relative;
  z-index: 60;
}

.model-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(244, 248, 255, 0.68);
  cursor: pointer;
  padding: 0 9px 0 12px;
  font-size: 0.76rem;
  font-weight: 500;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.model-menu-button:hover,
.model-menu-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.model-menu-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.8;
}

.model-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(172, 196, 228, 0.12);
  border-radius: 14px;
  background: #202024;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  z-index: 70;
}

.model-menu-option {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: start;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f1f3f7;
  cursor: pointer;
  padding: 10px 11px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
}

.model-option-check {
  color: var(--blue-bright);
  font-size: 0.9rem;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(1px);
}

.model-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.model-option-name {
  line-height: 1.1;
}

.model-option-limit {
  color: rgba(244, 248, 255, 0.58);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.25;
}

.model-menu-option.is-selected {
  background: #101011;
}

.model-menu-option:hover {
  background: rgba(255, 255, 255, 0.045);
}

.model-menu-option.is-selected:hover {
  background: #101011;
}

.model-menu-option.is-selected .model-option-check {
  opacity: 1;
}

.model-menu-option.is-selected .model-option-name {
  color: var(--blue-bright);
}

.model-menu-option:hover .model-option-limit {
  color: rgba(244, 248, 255, 0.76);
}

.chat-shell.has-chat .composer {
  position: sticky;
  bottom: 18px;
}

.chat-shell.has-chat .composer.composer-compact {
  width: min(760px, calc(100vw - 52px));
}

.composer[hidden] {
  display: none;
}

.composer-box {
  position: relative;
  z-index: 20;
  display: grid;
  align-items: end;
  padding: 8px;
  border: 1px solid rgba(172, 196, 228, 0.26);
  border-radius: 8px;
  background: rgba(5, 14, 29, 0.88);
  backdrop-filter: blur(18px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.composer-box:focus-within {
  border-color: rgba(36, 161, 255, 0.78);
  box-shadow:
    var(--shadow),
    0 0 0 4px rgba(8, 126, 232, 0.18);
  transform: translateY(-1px);
}

textarea {
  width: 100%;
  min-height: 62px;
  max-height: 180px;
  resize: none;
  padding: 16px 190px 16px 16px;
  border: 0;
  border-radius: 6px;
  outline: none;
  background: transparent;
  color: var(--ink);
  line-height: 1.45;
}

textarea::placeholder {
  color: var(--faint);
}

.composer-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.send-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(8, 126, 232, 0.3);
  transition:
    background 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.send-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.send-button:hover {
  background: var(--blue-bright);
  transform: translateY(-1px);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.status {
  min-height: 20px;
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.status-error {
  color: rgba(255, 188, 112, 0.86);
}

.example-prompts-shell {
  position: relative;
  width: min(620px, 100%);
  margin: 28px auto 0;
}

.example-prompts {
  display: grid;
  justify-items: stretch;
  gap: 7px;
  width: 100%;
  max-height: min(150px, 20vh);
  padding: 2px 30px 2px 2px;
  overflow-y: auto;
  scrollbar-width: none;
}

.example-prompts::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.example-prompts::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  -webkit-appearance: none;
}

.example-prompts::-webkit-scrollbar-button:single-button,
.example-prompts::-webkit-scrollbar-button:start,
.example-prompts::-webkit-scrollbar-button:end,
.example-prompts::-webkit-scrollbar-button:vertical:start:decrement,
.example-prompts::-webkit-scrollbar-button:vertical:end:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  -webkit-appearance: none;
}

.example-prompts::-webkit-scrollbar-track {
  background: transparent;
}

.example-prompts::-webkit-scrollbar-thumb {
  background: rgba(244, 248, 255, 0.18);
  border-radius: 999px;
}

.example-prompts::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 248, 255, 0.28);
}

.example-scrollbar {
  position: absolute;
  top: 2px;
  right: 8px;
  width: 5px;
  height: calc(100% - 4px);
  pointer-events: none;
}

.example-scrollbar[hidden] {
  display: none;
}

.example-scrollbar span {
  display: block;
  width: 5px;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(244, 248, 255, 0.24);
}

.example-chip {
  border: 0;
  background: transparent;
  color: rgba(244, 248, 255, 0.58);
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 450;
  line-height: 1.35;
  text-align: left;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.example-chip:hover {
  color: var(--blue-bright);
  transform: translateX(3px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes welcome-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes composer-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes database-stats-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes actions-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes payment-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dot-pulse {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-inline: 14px;
  }

  .brand {
    font-size: 1.65rem;
  }

  .brand-agent {
    display: none;
  }

  .chat-shell {
    width: min(100% - 18px, 940px);
  }

  .message {
    max-width: 96%;
  }

  .conversation-actions {
    display: grid;
  }

  .scope-grid {
    grid-template-columns: 1fr;
  }

  .database-stats {
    flex-wrap: wrap;
    gap: 22px 28px;
  }

  .manual-query-offer {
    width: min(100%, calc(100vw - 48px));
  }

  .manual-query-card {
    padding: 22px 18px 24px;
  }

  .manual-query-head {
    gap: 14px;
  }

  .manual-query-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-query-checkout-row {
    grid-template-columns: 1fr;
  }

  .manual-query-email-shell,
  .manual-query-buy-button {
    grid-column: 1;
  }

  .manual-query-buy-button {
    justify-self: stretch;
    width: 100%;
  }

  .target-options {
    grid-template-columns: 1fr;
  }

  .token-purchase {
    width: min(100%, calc(100vw - 48px));
  }

  .token-purchase-card {
    padding: 22px 18px 24px;
  }

  .token-pack-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .token-buy-button {
    min-width: 0;
  }

  textarea {
    padding-right: 140px;
  }

  .model-menu-button {
    max-width: 88px;
  }
}
