:root {
  color-scheme: dark;
  --ace-bg: #070b12;
  --ace-surface: #0b111b;
  --ace-surface-2: #0f1724;
  --ace-surface-3: #131d2c;
  --ace-border: rgba(148, 163, 184, .14);
  --ace-border-strong: rgba(148, 163, 184, .24);
  --ace-text: #f4f8fc;
  --ace-muted: #8f9bad;
  --ace-muted-2: #667489;
  --ace-cyan: #00e5ff;
  --ace-cyan-soft: rgba(0, 229, 255, .09);
  --ace-green: #20d3a6;
  --ace-danger: #fb7185;
  --ace-warning: #f7c65b;
  --ace-sidebar: 288px;
  --ace-topbar: 64px;
  --ace-composer-max: 900px;
  --ace-content-max: 900px;
}

* { box-sizing: border-box; }
[hidden], .ace-shell [hidden] { display: none !important; }

html, body { width: 100%; min-height: 100%; }
html { background: var(--ace-bg); }
body {
  margin: 0;
  overflow: hidden;
  background: var(--ace-bg);
  color: var(--ace-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a, label, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; }

.ace-app {
  display: grid;
  grid-template-columns: var(--ace-sidebar) minmax(0, 1fr);
  height: 100svh;
  min-height: 560px;
  background: var(--ace-bg);
}

.ace-sidebar {
  position: relative;
  z-index: 40;
  min-width: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  background: #090e17;
  border-right: 1px solid rgba(148, 163, 184, .10);
  padding: 16px 14px 12px;
  overflow: hidden;
}

.ace-sidebar-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 14px;
}

.ace-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.ace-brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

.ace-brand-copy { display: grid; gap: 1px; min-width: 0; }
.ace-brand-copy strong { font-size: 14px; letter-spacing: -.02em; }
.ace-brand-copy small { color: var(--ace-muted-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.ace-icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.ace-icon-button:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.06); }
.ace-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ace-sidebar-close { display: none; color: var(--ace-muted); }

.ace-new-question {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 2px 0 14px;
  border: 1px solid rgba(0,229,255,.20);
  border-radius: 13px;
  background: rgba(0,229,255,.075);
  color: #dffcff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.ace-new-question:hover { background: rgba(0,229,255,.12); border-color: rgba(0,229,255,.32); }
.ace-new-question svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.ace-sidebar-nav { display: grid; gap: 3px; margin-bottom: 14px; }
.ace-sidebar-nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border-radius: 11px;
  text-decoration: none;
  color: #aeb8c8;
  font-size: 13px;
  font-weight: 650;
}
.ace-sidebar-nav a:hover { background: rgba(255,255,255,.045); color: #edf7ff; }
.ace-sidebar-nav svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ace-sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 11px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 11px;
}
.ace-sidebar-tab {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ace-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.ace-sidebar-tab.is-active {
  background: #151d2a;
  color: #edf7ff;
  box-shadow: 0 1px 4px rgba(0,0,0,.24);
}

.ace-sidebar-panel {
  min-height: 0;
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.20) transparent;
}
.ace-sidebar-panel:not(.is-active) { display: none; }
.ace-sidebar-section-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #dfe8f2;
  font-size: 12px;
  font-weight: 850;
  padding: 1px 4px 5px;
}
.ace-sidebar-copy {
  margin: 0 4px 11px;
  color: var(--ace-muted-2);
  font-size: 11px;
  line-height: 1.5;
}

.ace-text-action {
  border: 0;
  background: transparent;
  color: #728197;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  padding: 5px;
}
.ace-text-action:hover { color: var(--ace-cyan); }

.ace-sidebar-footer {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 5px 1px;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.05);
  color: #647287;
  font-size: 10px;
  font-weight: 700;
}
.ace-private-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ace-green); box-shadow: 0 0 0 3px rgba(32,211,166,.08); }

.ace-library-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; margin: 2px 2px 4px; }
.ace-library-input-wrap {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148,163,184,.14);
  background: #0c131e;
  border-radius: 10px;
  padding: 0 10px;
}
.ace-library-input-wrap:focus-within { border-color: rgba(0,229,255,.38); }
.ace-library-input-wrap svg { width: 14px; height: 14px; fill: none; stroke: #667489; stroke-width: 2; stroke-linecap: round; }
.ace-library-input-wrap input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #edf7ff;
  font-size: 11px;
}
.ace-library-input-wrap input::placeholder { color: #566276; }
.ace-library-button {
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 10px;
  background: #141d2a;
  color: #d9e5f2;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.ace-library-button:hover { border-color: rgba(0,229,255,.25); }

.ace-main {
  min-width: 0;
  min-height: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% -16%, rgba(0,229,255,.055), transparent 34rem),
    var(--ace-bg);
}

.ace-topbar {
  flex: 0 0 var(--ace-topbar);
  height: var(--ace-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 34px);
  border-bottom: 1px solid rgba(148,163,184,.08);
  background: rgba(7,11,18,.88);
  backdrop-filter: blur(18px);
}
.ace-topbar-left, .ace-topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ace-product-name { font-weight: 850; font-size: 14px; letter-spacing: -.02em; }
.ace-product-subtitle { margin-top: 1px; color: #69788d; font-size: 10px; font-weight: 650; }
.ace-menu-button, .ace-mobile-brand { display: none; }
.ace-mobile-brand img { border-radius: 8px; }

.ace-intelligence-badge {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(32,211,166,.14);
  background: rgba(32,211,166,.045);
  color: #a9d8ca;
  font-size: 10px;
  font-weight: 800;
}
.ace-intelligence-badge > span { width: 6px; height: 6px; border-radius: 50%; background: var(--ace-green); box-shadow: 0 0 10px rgba(32,211,166,.5); }
.ace-top-link { color: #8492a7; text-decoration: none; font-size: 12px; font-weight: 750; padding: 7px 8px; border-radius: 9px; }
.ace-top-link:hover { color: #ecf7ff; background: rgba(255,255,255,.04); }
.ace-account-link {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(148,163,184,.14); background: #0f1724; color: #9daabd;
}
.ace-account-link:hover { color: #eaf8ff; border-color: rgba(0,229,255,.25); }
.ace-account-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ace-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.18) transparent;
  padding: 0 20px;
}
.ace-conversation-shell {
  width: min(var(--ace-content-max), 100%);
  margin: 0 auto;
  padding: clamp(34px, 6vh, 70px) 0 36px;
}

.ace-welcome {
  min-height: min(480px, 58vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ace-welcome-mark {
  width: 58px; height: 58px; border-radius: 16px; padding: 3px; margin-bottom: 18px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(148,163,184,.12);
  box-shadow: 0 16px 45px rgba(0,0,0,.26);
}
.ace-welcome-mark img { width: 100%; height: 100%; border-radius: 12px; }
.ace-welcome-kicker {
  margin: 0 0 8px;
  color: #7590a2;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ace-welcome h1 {
  max-width: 740px;
  margin: 0;
  color: #f7fbff;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -.052em;
  font-weight: 800;
}
.ace-welcome-copy {
  max-width: 660px;
  margin: 15px auto 0;
  color: #8795a9;
  font-size: 14px;
  line-height: 1.7;
}
.ace-starter-grid {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 28px;
}
.ace-starter {
  min-height: 76px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 11px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(13,20,31,.72);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ace-starter:hover { transform: translateY(-1px); border-color: rgba(148,163,184,.24); background: #0e1724; }
.ace-starter-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(0,229,255,.055); border: 1px solid rgba(0,229,255,.10);
  color: #9deef8; font-size: 14px; font-weight: 900;
}
.ace-starter-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ace-starter strong { display: block; color: #dce7f2; font-size: 12px; line-height: 1.3; }
.ace-starter small { display: block; color: #647287; font-size: 10px; line-height: 1.4; margin-top: 4px; }

.ace-question-echo {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 13px;
  align-items: start;
  margin: 0 0 28px;
}
.ace-question-avatar {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: #172131; color: #b9c5d5; font-size: 9px; font-weight: 850;
  border: 1px solid rgba(148,163,184,.12);
}
.ace-question-label { color: #6e7d91; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 1px 0 5px; }
.ace-question-echo p { margin: 0; color: #d9e4ef; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }

.ace-thinking {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  margin: 6px 0 24px;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.11);
  background: rgba(11,17,27,.82);
}
.ace-thinking-mark { width: 38px; height: 38px; padding: 2px; border-radius: 11px; background: rgba(0,229,255,.045); }
.ace-thinking-mark img { width: 100%; height: 100%; border-radius: 9px; }
.ace-thinking strong { display: block; font-size: 12px; }
.ace-thinking span { display: block; color: #718096; font-size: 11px; margin-top: 3px; }
.ace-thinking-dots { display: flex; gap: 4px; padding-right: 4px; }
.ace-thinking-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: #5b6a7d;
  animation: ace-dot 1.25s infinite ease-in-out;
}
.ace-thinking-dots i:nth-child(2) { animation-delay: .14s; }
.ace-thinking-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes ace-dot { 0%,60%,100%{opacity:.25;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }

.ace-answer {
  display: none;
  margin: 4px 0 20px;
  padding: 0 0 8px;
}
.ace-answer.show { display: block; }
.ace-answer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.ace-answer-identity { display: flex; align-items: center; gap: 10px; }
.ace-answer-avatar { width: 38px; height: 38px; border-radius: 11px; padding: 2px; border: 1px solid rgba(0,229,255,.12); background: rgba(0,229,255,.035); }
.ace-answer-avatar img { width: 100%; height: 100%; border-radius: 8px; }
.ace-answer-identity strong { display: block; font-size: 13px; }
.ace-answer-identity span { display: block; margin-top: 2px; color: #667489; font-size: 10px; font-weight: 650; }

.ace-answer-meta { display: flex; justify-content: flex-end; gap: 6px; align-items: center; flex-wrap: wrap; }
.ace-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.11);
  background: rgba(148,163,184,.045);
  color: #8796aa;
  font-size: 9px;
  font-weight: 800;
}
.ace-pill-grounded { color: #88c7ba; border-color: rgba(32,211,166,.12); background: rgba(32,211,166,.04); }

.ace-command-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px 48px; }
.ace-command-label { color: #647287; font-size: 9px; font-weight: 800; align-self: center; margin-right: 2px; }
.ace-command {
  padding: 4px 7px; border-radius: 999px; border: 1px solid rgba(0,229,255,.10);
  color: #7ebec8; background: rgba(0,229,255,.035); font-size: 9px; font-weight: 800;
}

.ace-canonical, .ace-warnings {
  margin: 0 0 14px 48px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.10);
  background: rgba(12,18,29,.72);
  padding: 10px 12px;
}
.ace-canonical > span { color: #68778b; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.ace-canonical p { margin: 5px 0 0; color: #b4c0cf; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.ace-warnings { border-color: rgba(247,198,91,.14); background: rgba(247,198,91,.035); }
.ace-warnings strong { display: block; color: #d6b764; font-size: 10px; margin-bottom: 5px; }
.ace-warnings ul { margin: 0; padding-left: 17px; color: #a99b76; font-size: 10px; line-height: 1.55; }

.ace-answer-text {
  margin-left: 48px;
  color: #dbe6f1;
  font-size: 15px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}
.ace-answer-section {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}
.ace-answer-section + .ace-answer-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(148,163,184,.09);
}
.ace-answer-section-label {
  margin: 0 0 10px;
  color: #7c899b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .10em;
}
.ace-answer-final .ace-answer-section-label { color: #7dcad4; }
.ace-answer-section-body > :first-child { margin-top: 0; }
.ace-answer-section-body > :last-child { margin-bottom: 0; }
.ace-answer-text p, .ace-result-answer p, .ace-history-body p { margin: .68em 0; }
.ace-answer-text h3, .ace-answer-text h4,
.ace-result-answer h3, .ace-result-answer h4,
.ace-history-body h3, .ace-history-body h4 {
  color: #f0f7fc;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.ace-answer-text h3 { margin: 1.2em 0 .45em; font-size: 17px; }
.ace-answer-text h4 { margin: 1em 0 .4em; font-size: 14px; }
.ace-answer-text ul, .ace-answer-text ol,
.ace-result-answer ul, .ace-result-answer ol,
.ace-history-body ul, .ace-history-body ol { margin: .7em 0; padding-left: 1.3rem; }
.ace-answer-text li, .ace-result-answer li, .ace-history-body li { margin: .34em 0; }
.ace-answer-text strong, .ace-result-answer strong, .ace-history-body strong { color: #f4f8fc; }
.ace-math-block {
  overflow-x: auto;
  margin: 14px 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.10);
  background: #0a101a;
}
.ace-math-inline { color: #edfaff; }
.ace-math-fallback { overflow: auto; border: 1px solid var(--ace-border); border-radius: 10px; padding: 10px; background: #09111b; color: #d9e5f2; }

.ace-source-cite {
  display: inline-block;
  margin-left: 3px;
  color: #69aab4;
  font-size: .72em;
  font-weight: 850;
  vertical-align: .18em;
}
.ace-sources { margin: 22px 0 0 48px; display: grid; gap: 6px; }
.ace-sources > .ace-label {
  color: #5e6c80;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1px;
}
.ace-source {
  display: block;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.09);
  background: rgba(12,18,29,.56);
}
.ace-source:hover { border-color: rgba(0,229,255,.14); }
.ace-source strong { display: block; color: #9ba9ba; font-size: 10px; }
.ace-source span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 3px;
  color: #5e6b7d;
  font-size: 9px;
  line-height: 1.45;
}

.ace-answer-actions {
  display: flex;
  gap: 7px;
  margin: 22px 0 0 48px;
  padding-top: 14px;
  border-top: 1px solid rgba(148,163,184,.08);
}
.ace-answer-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(148,163,184,.10);
  background: transparent;
  color: #78879b;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.ace-answer-action:hover { color: #dce7f2; background: rgba(255,255,255,.035); }
.ace-answer-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.ace-followups {
  margin: 16px 0 0 48px;
  padding: 15px 0 0;
}
.ace-followups-label { color: #647287; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.ace-followup-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ace-followup-chips button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.11);
  background: rgba(255,255,255,.02);
  color: #8290a2;
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}
.ace-followup-chips button:hover { color: #d8e4ef; border-color: rgba(0,229,255,.18); background: rgba(0,229,255,.035); }
.ace-followup-form {
  height: 42px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0 5px 0 12px;
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 12px;
  background: #0b121d;
}
.ace-followup-form:focus-within { border-color: rgba(0,229,255,.28); }
.ace-followup-form input { min-width: 0; border: 0; outline: 0; background: transparent; color: #e6eef6; font-size: 11px; }
.ace-followup-form input::placeholder { color: #566276; }
.ace-followup-form button {
  width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px;
  background: rgba(0,229,255,.10); color: #a7edf5; cursor: pointer;
}
.ace-followup-form button:hover { background: rgba(0,229,255,.16); }
.ace-followup-form svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ace-status {
  display: none;
  border-radius: 12px;
  padding: 10px 11px;
  font-size: 10px;
  line-height: 1.5;
  margin: 7px 2px;
}
.ace-status.show { display: block; }
.ace-status.info { color: #8dbfc6; background: rgba(0,229,255,.035); border: 1px solid rgba(0,229,255,.10); }
.ace-status.warn { color: #cdb775; background: rgba(247,198,91,.035); border: 1px solid rgba(247,198,91,.12); }
.ace-status.error { color: #dca0aa; background: rgba(251,113,133,.035); border: 1px solid rgba(251,113,133,.12); }
.ace-main-status { margin: 0 0 18px 48px; font-size: 11px; }

.ace-results { display: grid; gap: 5px; margin-top: 8px; }
.ace-history-card, .ace-result {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}
.ace-history-card:hover, .ace-result:hover { background: rgba(255,255,255,.028); border-color: rgba(148,163,184,.06); }
.ace-history-toggle, .ace-result-toggle {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 9px 8px;
}
.ace-history-toggle strong, .ace-result-q {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #aebaca;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
}
.ace-result-meta { color: #526075; margin-top: 4px; font-size: 8px; line-height: 1.4; }
.ace-history-body, .ace-result-answer {
  display: none;
  padding: 8px 9px 11px;
  border-top: 1px solid rgba(148,163,184,.06);
  color: #8e9bad;
  font-size: 9px;
  line-height: 1.55;
}
.ace-history-card.open .ace-history-body, .ace-result.open .ace-result-answer { display: block; }
.ace-empty { color: #5d697b; padding: 10px 6px; font-size: 10px; line-height: 1.5; }

.ace-composer-dock {
  flex: 0 0 auto;
  padding: 8px 20px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, #070b12 72%, rgba(7,11,18,.94) 86%, transparent);
}
.ace-composer-wrap { width: min(var(--ace-composer-max), 100%); margin: 0 auto; }
.ace-composer {
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 18px;
  background: #0d141f;
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ace-composer:focus-within { border-color: rgba(0,229,255,.28); box-shadow: 0 18px 60px rgba(0,0,0,.34), 0 0 0 1px rgba(0,229,255,.035); }
#aceQuestion {
  width: 100%;
  min-height: 58px;
  max-height: 210px;
  resize: none;
  border: 0;
  outline: 0;
  display: block;
  padding: 16px 17px 7px;
  background: transparent;
  color: #edf5fb;
  font-size: 14px;
  line-height: 1.55;
  overflow-y: hidden;
}
#aceQuestion::placeholder { color: #657286; }

.ace-image-preview {
  grid-template-columns: 50px minmax(0,1fr) 32px;
  align-items: center;
  gap: 9px;
  margin: 3px 12px 6px;
  padding: 7px;
  border-radius: 11px;
  border: 1px solid rgba(0,229,255,.10);
  background: rgba(0,229,255,.035);
}
.ace-image-preview:not([hidden]) { display: grid; }
.ace-image-preview img { width: 50px; height: 44px; object-fit: cover; border-radius: 8px; background: #050914; }
.ace-image-info { min-width: 0; }
.ace-image-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b9c7d6; font-size: 10px; }
.ace-image-info span { display: block; color: #657286; font-size: 9px; margin-top: 3px; }
.ace-image-remove {
  width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.035); color: #718095; cursor: pointer;
}
.ace-image-remove:hover { color: #dbe6ef; background: rgba(255,255,255,.06); }
.ace-image-remove svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ace-composer-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 7px 7px 9px;
}
.ace-composer-tools, .ace-send-group { display: flex; align-items: center; gap: 6px; min-width: 0; }

.ace-tool-button, .ace-select-wrap {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  border: 1px solid rgba(148,163,184,.09);
  background: rgba(255,255,255,.018);
  color: #78869a;
}
.ace-tool-button {
  padding: 0 9px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.ace-tool-button:hover { color: #cfdbe7; background: rgba(255,255,255,.035); }
.ace-tool-button svg, .ace-select-wrap svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ace-select-wrap { position: relative; padding-left: 8px; }
.ace-select-wrap select {
  max-width: 150px;
  height: 32px;
  border: 0;
  outline: 0;
  padding: 0 24px 0 0;
  background: transparent;
  color: #7d8b9e;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.ace-select-wrap option { background: #101824; color: #e5eef6; }

.ace-mode-buttons {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(148,163,184,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
}
.ace-mode-buttons button {
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #687589;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.ace-mode-buttons button:hover { color: #aab6c5; }
.ace-mode-buttons button.is-active { background: #172130; color: #cfe3ea; }

.ace-counter { color: #536175; font-size: 9px; white-space: nowrap; }
.ace-send-button {
  min-width: 94px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: #dffbff;
  color: #071116;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .14s ease, opacity .14s ease, background .14s ease;
}
.ace-send-button:hover { transform: translateY(-1px); background: #f3feff; }
.ace-send-button:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.ace-send-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ace-composer-foot {
  min-height: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 4px 0;
  color: #4f5b6c;
  font-size: 8px;
  line-height: 1.4;
}
.ace-privacy { position: relative; text-align: right; }
.ace-privacy summary { cursor: pointer; color: #59677a; font-weight: 700; list-style: none; }
.ace-privacy summary::-webkit-details-marker { display: none; }
.ace-privacy p {
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  width: min(330px, 70vw);
  margin: 0;
  padding: 10px 11px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.12);
  background: #0d1521;
  color: #748196;
  box-shadow: 0 16px 42px rgba(0,0,0,.36);
  font-size: 9px;
  line-height: 1.5;
}

.ace-sidebar-backdrop { display: none; }

@media (max-width: 1080px) {
  :root { --ace-sidebar: 260px; }
  .ace-mode-buttons button { padding: 0 6px; }
  .ace-select-wrap select { max-width: 120px; }
}

@media (max-width: 900px) {
  body { overflow: hidden; }
  .ace-app { grid-template-columns: 1fr; }
  .ace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 310px);
    transform: translateX(-103%);
    transition: transform .2s ease;
    box-shadow: 20px 0 60px rgba(0,0,0,.38);
  }
  .ace-sidebar.is-open { transform: translateX(0); }
  .ace-sidebar-close { display: inline-grid; }
  .ace-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0,0,0,.58);
    backdrop-filter: blur(3px);
  }
  .ace-sidebar-backdrop:not([hidden]) { display: block; }
  .ace-menu-button { display: inline-grid; }
  .ace-mobile-brand { display: inline-flex; }
  .ace-topbar { padding-inline: 12px 16px; }
  .ace-topbar-left { gap: 9px; }
}

@media (max-width: 680px) {
  :root { --ace-topbar: 58px; }
  .ace-product-subtitle, .ace-intelligence-badge, .ace-top-link { display: none; }
  .ace-content { padding: 0 13px; }
  .ace-conversation-shell { padding-top: 28px; }
  .ace-welcome { min-height: 420px; justify-content: flex-start; padding-top: 34px; }
  .ace-welcome h1 { font-size: 36px; }
  .ace-welcome-copy { font-size: 13px; }
  .ace-starter-grid { grid-template-columns: 1fr; margin-top: 23px; }
  .ace-starter { min-height: 66px; }
  .ace-composer-dock { padding: 7px 9px max(8px, env(safe-area-inset-bottom)); }
  .ace-composer { border-radius: 16px; }
  #aceQuestion { font-size: 16px; min-height: 54px; padding: 14px 14px 5px; }
  .ace-composer-toolbar { align-items: flex-end; }
  .ace-composer-tools { flex-wrap: wrap; gap: 4px; }
  .ace-tool-button span { display: none; }
  .ace-tool-button { width: 34px; padding: 0; justify-content: center; }
  .ace-select-wrap select { max-width: 112px; }
  .ace-mode-buttons { order: 3; width: 100%; height: 31px; }
  .ace-mode-buttons button { flex: 1; height: 25px; padding: 0 5px; }
  .ace-counter { display: none; }
  .ace-send-button { min-width: 40px; width: 40px; padding: 0; }
  .ace-send-button span { display: none; }
  .ace-composer-foot { display: block; text-align: center; padding-top: 4px; }
  .ace-privacy { display: none; }
  .ace-question-echo, .ace-thinking { grid-template-columns: 34px minmax(0,1fr); }
  .ace-thinking-dots { display: none; }
  .ace-answer-head { display: block; }
  .ace-answer-meta { justify-content: flex-start; margin: 8px 0 0 46px; }
  .ace-answer-text, .ace-sources, .ace-answer-actions, .ace-followups, .ace-command-row, .ace-canonical, .ace-warnings, .ace-main-status { margin-left: 46px; }
  .ace-answer-text { font-size: 14px; line-height: 1.74; }
  .ace-followup-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .ace-followup-chips::-webkit-scrollbar { display: none; }
  .ace-followup-chips button { flex: 0 0 auto; }
}

@media (max-width: 430px) {
  .ace-welcome-mark { width: 50px; height: 50px; }
  .ace-welcome h1 { font-size: 31px; }
  .ace-welcome-copy { font-size: 12px; }
  .ace-select-wrap { max-width: 126px; }
  .ace-select-wrap select { width: 91px; font-size: 9px; }
  .ace-answer-text, .ace-sources, .ace-answer-actions, .ace-followups, .ace-command-row, .ace-canonical, .ace-warnings, .ace-main-status { margin-left: 0; }
  .ace-answer-meta { margin-left: 0; }
  .ace-answer-head { margin-bottom: 14px; }
  .ace-question-echo { grid-template-columns: 1fr; }
  .ace-question-avatar { display: none; }
  .ace-thinking { grid-template-columns: 40px minmax(0,1fr); }
}
