/* ─────────────────────────────────────────────────────────────────
   about.css — stylesheet for /about
   Layered on top of Bootstrap 5. Uses tenant CSS variables
   (--accent, --surface, --text, --muted, --border, --code-bg, etc.)
   defined in base.html so the entire stack auto-themes.
   ───────────────────────────────────────────────────────────────── */

/* ── Bootstrap button variants ──────────────────────────────────── */
.btn-accent {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  font-weight: 600;
}
.btn-accent:hover,
.btn-accent:focus {
  background: var(--accent-alt, var(--accent));
  color: var(--bg);
  filter: brightness(1.05);
}
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 600;
}
.btn-outline-accent:hover,
.btn-outline-accent:focus {
  background: var(--accent-dim-light, var(--accent-dim));
  color: var(--accent);
}
.btn-link.ae-cta-link {
  color: var(--muted);
  text-decoration: underline;
  font-weight: 500;
}
.btn-link.ae-cta-link:hover { color: var(--accent); }

/* ── Wrappers ──────────────────────────────────────────────────── */
.about-page {
  color: var(--text);
}
/* .about-page .container {
  max-width: 1180px;
} */

/* ── Eyebrow ───────────────────────────────────────────────────── */
.ae-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.7rem 0;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.ae-hero {
  padding: 3rem 0 2.5rem;
  background: linear-gradient(
    180deg,
    var(--accent-dim-light, var(--accent-dim)) 0%,
    transparent 100%);
  border-bottom: 1px solid var(--border);
}
.ae-hero-headline {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.18;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
}
.ae-hero-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 1.4rem 0;
  max-width: 56ch;
}
.ae-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.ae-hero-foot {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.6rem 0 0 0;
}
/* Signed-out landing: sign-in is THE action on the page. */
.ae-signin-cta {
  padding: 0.8rem 1.9rem;
  font-weight: 600;
  font-size: 1.15rem;
}
.ae-signin-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.3rem 0 0 0;
}

.ae-hero-figure {
  display: block;
}
.ae-hero-figure img,
.ae-hero-figure video {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ae-hero-figure a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.32);
}
.ae-hero-figure video { display: block; aspect-ratio: 16 / 9; background: #1c2124; }
.ae-hero-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.5;
}

/* ── Stat strip ────────────────────────────────────────────────── */
.ae-strip {
  padding: 1.4rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ae-stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.ae-stat-lab {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* ── Sections ──────────────────────────────────────────────────── */
.ae-section {
  padding: 3rem 0;
}
.ae-section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ae-section-h {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.7rem 0;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.ae-section-lede {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 1rem 0;
  max-width: 78ch;
}

/* ── Compare grid ──────────────────────────────────────────────── */
.ae-compare {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  background: var(--bg);
}
.ae-compare-them {
  opacity: 0.92;
}
.ae-compare-us {
  border-color: var(--accent);
  background: var(--accent-dim-light, var(--accent-dim));
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.ae-compare-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.ae-compare-us .ae-compare-tag {
  color: var(--accent);
}
.ae-compare ul {
  margin: 0;
  padding-left: 1.1rem;
}
.ae-compare li {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.ae-compare-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

/* ── How-it-works flow ─────────────────────────────────────────── */
.ae-flow-row { margin-top: 1rem; }
.ae-flow-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  height: 100%;
}
.ae-section-alt .ae-flow-step { background: var(--surface); }
.ae-flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-mono, monospace);
  margin-bottom: 0.6rem;
}
.ae-flow-step h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem 0;
}
.ae-flow-step p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ── Capability cards (Bootstrap card variant) ─────────────────── */
.ae-cap.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ae-section-alt .ae-cap.card { background: var(--surface-hover, var(--bg)); }
.ae-cap.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}
.ae-cap .card-img-top {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.ae-cap .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.4rem 0;
}
.ae-cap .card-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

/* ── Use-case tiles ────────────────────────────────────────────── */
.ae-usecase {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  height: 100%;
}
.ae-section-alt .ae-usecase { background: var(--surface-hover, var(--bg)); }
.ae-usecase h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.4rem 0;
}
.ae-usecase p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 0.6rem 0;
}
/* What a real user asked, then what came back (collapsed). */
.ae-usecase { display: flex; flex-direction: column; }
.ae-asked {
  margin: 0 0 0.7rem 0;
  padding: 0;
  border: 0;
}
.ae-usecase .ae-asked p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}
.ae-usecase .ae-asked p.ae-asked-then {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.ae-asked-then span {
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  vertical-align: 0.08em;
}

/* ── Bold pitch cards ──────────────────────────────────────────── */
.ae-card-bold {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  height: 100%;
}
.ae-section-alt .ae-card-bold { background: var(--surface-hover, var(--bg)); }
.ae-card-bold h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}
.ae-card-bold p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* ── Customization knobs ───────────────────────────────────────── */
.ae-knob {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 0.95rem;
  height: 100%;
}
.ae-knob h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.3rem 0;
}
.ae-knob p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

/* ── Trust panels ──────────────────────────────────────────────── */
.ae-trust {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  height: 100%;
}
.ae-trust h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}
.ae-trust p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* ── CTA band ──────────────────────────────────────────────────── */
.ae-section-cta {
  padding: 3.5rem 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--accent-dim-light, var(--accent-dim)) 100%);
  border-top: 1px solid var(--border);
}
.ae-cta-h { margin-bottom: 0.8rem; }
.ae-cta-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1rem;
}

/* ── Responsive hero stacking ──────────────────────────────────── */
@media (max-width: 991px) {
  .ae-hero-figure { margin-top: 1.5rem; }
}

/* ── Example deployments, beside "Make it yours" ──────────────── */
.ae-tenants {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.ae-tenant { margin: 0; }
.ae-tenant img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  transition: transform 0.15s ease;
}
.ae-tenant a:hover img,
.ae-tenant a:focus-visible img { transform: translateY(-2px); }
.ae-tenant figcaption {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}
.ae-tenant figcaption strong { color: var(--text); margin-right: 0.25rem; }


/* ── Live embeds: the map and the report ───────────────────────── */
.ae-embed {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ae-embed-head h5 { margin: 0 0 0.25rem; }
.ae-embed-head p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.ae-report {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #1c2124;
}
.ae-embed-note { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.ae-embed-fallback { padding: 1rem; color: var(--muted); }

/* The map, dressed like the geeViz DATA Viewer: dark title bars, light
   panel bodies, teal layer dots, opacity sliders per layer. */
.ae-gv {
  position: relative;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #1c2124;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}
.ae-gv-map { position: absolute; inset: 0; }
.ae-gv-panel {
  position: absolute;
  z-index: 1001;   /* above Leaflet's panes (400-1000) when it is the fallback */
  background: #f4f4f4;
  color: #222;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
  overflow: hidden;
  font-size: 12px;
}
.ae-gv-layers { top: 10px; left: 10px; width: 236px; }
.ae-gv-legend { bottom: 26px; right: 10px; width: 216px; }
.ae-gv-title {
  padding: 6px 10px;
  background: #2d2a28;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.ae-gv-logo { font-weight: 700; color: #4fd1c5; }
.ae-gv-sub {
  padding: 5px 10px;
  background: #3a3633;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ae-gv-layer {
  display: grid;
  grid-template-columns: auto 1fr 70px;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-top: 1px solid #ddd;
  cursor: pointer;
}
.ae-gv-layer input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.ae-gv-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #138a7e;
  background: transparent;
}
.ae-gv-layer input[type="checkbox"]:checked + .ae-gv-dot { background: #138a7e; }
.ae-gv-layer input[type="checkbox"]:focus-visible + .ae-gv-dot { outline: 2px solid #4fd1c5; outline-offset: 2px; }
.ae-gv-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-gv-layer input[type="range"] { width: 70px; accent-color: #138a7e; }
.ae-gv-query { padding: 6px 10px; line-height: 1.45; min-height: 2.2em; }
.ae-gv-verdict { font-weight: 700; color: #0f6f66; }
.ae-gv-verdict.is-lost { color: #b3261e; }
.ae-gv-key {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-top: 1px solid #ddd;
}
.ae-gv-key span { width: 14px; height: 10px; border: 1px solid #555; display: inline-block; }
.ae-gv-key em { margin-left: auto; font-style: normal; color: #555; font-variant-numeric: tabular-nums; }

/* More examples */
.ae-ex-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2.2rem 0 0.9rem;
}
.ae-ex-head h3 { margin: 0; font-size: 1.25rem; }
.ae-ex-all { white-space: nowrap; }
.ae-ex-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.ae-ex {
  display: flex; flex-direction: column;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ae-ex:hover, .ae-ex:focus-visible { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.ae-ex img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.ae-ex-kind {
  padding: 0.6rem 0.8rem 0;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.ae-ex-title { padding: 0.15rem 0.8rem 0.75rem; font-size: 0.92rem; line-height: 1.35; }

/* Same question, different answer: one row per difference */
.ae-vs { margin-top: 1.2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.ae-vs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.5rem minmax(0, 1fr);
  align-items: stretch;
}
.ae-vs-them, .ae-vs-us {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  line-height: 1.4;
}
.ae-vs-them { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.ae-vs-us { background: var(--surface); color: var(--text); border: 1px solid var(--accent); font-weight: 500; }
.ae-vs-them i { color: #c46a5f; }
.ae-vs-us i { color: var(--accent); }
.ae-vs-arrow { display: flex; align-items: center; justify-content: center; color: var(--accent); }
.ae-vs-head .ae-vs-them, .ae-vs-head .ae-vs-us {
  background: none; border: none; padding: 0 1rem 0.2rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.ae-vs-head .ae-vs-us { color: var(--accent); }

/* How we work, inside Make it yours */
.ae-howwork { margin-top: 2.2rem; }
.ae-howwork h3 { font-size: 1.25rem; margin: 0 0 0.25rem; }

@media (max-width: 991px) {
  .ae-ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .ae-gv, .ae-report { height: 440px; min-height: 440px; }
  /* A phone has no room for both panels at full size: drop the
     per-layer sliders and the legend rows, keep toggles and queries. */
  .ae-gv-layers { width: 172px; }
  .ae-gv-layer { grid-template-columns: auto 1fr; }
  .ae-gv-layer input[type="range"],
  .ae-gv-key,
  .ae-gv-legend-title { display: none; }
  .ae-gv-legend { width: 168px; bottom: 26px; }
  .ae-gv-title { font-size: 13px; }
  .ae-ex-grid { grid-template-columns: 1fr; }
  .ae-vs-row { grid-template-columns: 1fr; }
  .ae-vs-arrow { transform: rotate(90deg); padding: 0.15rem 0; }
  .ae-vs-head { display: none; }
}

/* Who it's for: bring your own data */
.ae-byod {
  display: flex; gap: 0.8rem; align-items: flex-start;
  margin: 1.2rem 0 0.4rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  line-height: 1.55;
  max-width: 900px;
}
.ae-byod > i { color: var(--accent); margin-top: 0.3rem; }
.ae-usecase-data {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--accent);
}
.ae-usecase-data.ae-inline { margin: 0; font-size: 0.85em; white-space: nowrap; }

/* Closing sign-in, under the trust cards */
.ae-closing-cta {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  margin-top: 2.5rem;
  text-align: center;
}
.ae-closing-cta .ae-signin-note { margin: 0; }

/* Who it's for: the button that opens a real session */
.ae-answer-btn {
  align-self: flex-start;
  margin-top: 0.2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.ae-answer-btn:hover { background: var(--accent-dim, var(--surface)); }
.ae-answer-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The conversation dialog */
.ae-convo-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.ae-convo-dialog[open] { display: flex; flex-direction: column; }
.ae-convo-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.ae-convo-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.25rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ae-convo-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.ae-convo-close {
  border: 0; background: transparent; color: var(--muted);
  font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 0.2rem;
}
.ae-convo-close:hover { color: var(--text); }
.ae-convo-close:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.ae-convo-body { overflow-y: auto; padding: 1rem 1.25rem 1.5rem; }
.ae-convo-lede {
  margin: 0 0 1rem; padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 0.9rem; line-height: 1.55;
}
.ae-convo-meta, .ae-convo-loading { font-size: 0.8rem; color: var(--muted); margin: 0 0 1rem; }

.ae-msg { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 1.1rem; }
.ae-msg-user { align-items: flex-end; }
.ae-bubble {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px 12px 2px 12px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.9rem; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.ae-attach {
  display: block; margin-top: 0.4rem;
  font-size: 0.78rem; font-weight: 600; opacity: 0.85;
}

/* Tool calls: one collapsed group per run, each call expandable */
.ae-tools {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.82rem;
}
.ae-tools > summary {
  cursor: pointer; padding: 0.45rem 0.75rem;
  color: var(--muted); font-weight: 600;
}
.ae-tools > summary i { color: var(--accent); margin-right: 0.3rem; }
.ae-tools[open] > summary { border-bottom: 1px solid var(--border); }
.ae-tool { padding: 0.35rem 0.75rem; border-top: 1px solid var(--border); }
.ae-tools > .ae-tool:first-of-type { border-top: 0; }
.ae-tool > summary { cursor: pointer; list-style: none; }
.ae-tool > summary::-webkit-details-marker { display: none; }
.ae-tool-name { font-family: var(--font-mono, monospace); font-weight: 600; color: var(--text); }
.ae-tool-status {
  display: inline-block; margin-left: 0.5rem; padding: 0 0.45rem;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ae-tool-status.ae-ok { background: rgba(46, 160, 67, 0.18); color: #3fb950; }
.ae-tool-status.ae-fail { background: rgba(218, 54, 51, 0.18); color: #f85149; }
.ae-tool-status.ae-pending { background: var(--bg); color: var(--muted); }
.ae-tool-args {
  display: block; margin-top: 0.15rem;
  color: var(--muted); font-family: var(--font-mono, monospace); font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.ae-tool-label { margin: 0.5rem 0 0.2rem; font-size: 0.7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ae-tool-code, .ae-tool-out {
  margin: 0.4rem 0 0.2rem; padding: 0.55rem 0.7rem;
  max-height: 340px; overflow: auto;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg);
  font-family: var(--font-mono, monospace); font-size: 0.74rem; line-height: 1.45;
  white-space: pre;
}
.ae-tool-err { color: #f85149; white-space: pre-wrap; }

/* The agent's answer, rendered by the chat's own markdown renderer */
.ae-md { font-size: 0.9rem; line-height: 1.6; overflow-wrap: anywhere; }
.ae-md h1, .ae-md h2, .ae-md h3, .ae-md h4 { color: var(--accent); margin: 0.9rem 0 0.35rem; line-height: 1.3; }
.ae-md h1 { font-size: 1.2rem; } .ae-md h2 { font-size: 1.08rem; }
.ae-md h3 { font-size: 1rem; } .ae-md h4 { font-size: 0.93rem; }
.ae-md ul, .ae-md ol { margin: 0.3rem 0 0.5rem; padding-left: 1.3rem; }
.ae-md li { margin: 0.15rem 0; }
.ae-md code { font-family: var(--font-mono, monospace); font-size: 0.82em; padding: 0.05rem 0.3rem; border-radius: 4px; background: var(--surface); }
.ae-md pre { margin: 0.5rem 0; padding: 0.6rem 0.75rem; max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.ae-md pre code { padding: 0; background: none; font-size: 0.76rem; }
.ae-md .table-wrap { overflow-x: auto; margin: 0.5rem 0; }
.ae-md table { border-collapse: collapse; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.ae-md th, .ae-md td { padding: 0.3rem 0.6rem; border: 1px solid var(--border); }
.ae-md th { background: var(--surface); }
.ae-md .katex-display { overflow-x: auto; overflow-y: hidden; }
.ae-md hr { border: 0; border-top: 1px solid var(--border); margin: 0.8rem 0; }

/* Artifacts */
.ae-art { margin: 0.2rem 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.ae-art img { display: block; width: 100%; height: auto; }
.ae-art iframe { display: block; width: 100%; height: 440px; border: 0; background: #fff; }
.ae-art-report iframe { height: 620px; }
.ae-art figcaption {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline;
  padding: 0.45rem 0.75rem; border-top: 1px solid var(--border);
  font-size: 0.78rem;
}
.ae-art-name { font-family: var(--font-mono, monospace); color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.ae-art-name i { color: var(--accent); margin-right: 0.25rem; }
.ae-art-note { color: var(--muted); }
.ae-art-map figcaption { background: var(--accent-dim, var(--surface)); }
.ae-art figcaption a { margin-left: auto; color: var(--accent); }
.ae-art-file {
  display: inline-flex; align-items: center; gap: 0.45rem; align-self: flex-start;
  padding: 0.45rem 0.8rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 0.82rem; text-decoration: none;
}
.ae-art-file i { color: #f85149; }
.ae-art-file:hover { border-color: var(--accent); }

@media (max-width: 575.98px) {
  .ae-convo-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; border-radius: 0; }
  .ae-bubble { max-width: 92%; }
  .ae-art iframe { height: 340px; }
  .ae-art-report iframe { height: 480px; }
}
