/* ─── Harness demo: SELF-CONTAINED ──────────────────────────────────────
   Block 1: Valantor design system invariants (variables, base, nav,
   footer, hero-eyebrow, buttons, fade-in, section labels) — embedded so
   this page renders even when ../assets/css/styles.css can't be reached
   (e.g. from a single-file preview context).
   Block 2: Demo widget styles (dropzone, chat, extraction, report).
   ────────────────────────────────────────────────────────────────────── */

/* ── BLOCK 1 ─ Valantor invariants (mirrors staging/assets/css/styles.css) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0A0A0F;
  --ink-mid: #1C1C28;
  --ink-soft: #3D3D52;
  --ghost: #7B7B96;
  --surface: #F5F4F1;
  --surface-2: #EBEBEA;
  --white: #FAFAF8;
  --accent: #1A3FDB;
  --accent-2: #0E2AA0;
  --border: rgba(10,10,15,0.1);
  --border-strong: rgba(10,10,15,0.18);
  --font: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.1; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 0; text-decoration: none; flex-shrink: 0; }
.logo-text-wrap { display: flex; flex-direction: column; line-height: 1; }
.logo-wordmark {
  font-family: var(--font); font-size: 15px; font-weight: 700;
  color: #fff; letter-spacing: 2.4px; text-transform: uppercase;
}
.logo-tagline {
  font-size: 8px; font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px; text-transform: uppercase; margin-top: 3px;
}
.nav-links {
  display: flex; align-items: center; gap: 18px;
  list-style: none; flex-wrap: nowrap;
}
.nav-links a {
  font-size: 13px; font-weight: 400;
  color: rgba(255,255,255,0.55);
  text-decoration: none; transition: color 0.2s;
  letter-spacing: 0.2px; white-space: nowrap;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--accent) !important; color: #fff !important;
  padding: 9px 18px; border-radius: 6px;
  font-weight: 500 !important; font-size: 13px !important;
  transition: all 0.2s !important; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-2) !important; transform: translateY(-1px); }
.nav-toggle {
  display: none;
  background: transparent; border: 0; padding: 8px;
  cursor: pointer; flex-direction: column; gap: 4px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: #fff; display: block;
  border-radius: 2px;
}

/* Hero eyebrow (reused on the demo hero) */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(100,140,255,0.8); margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 14px 28px; border-radius: 7px;
  font-size: 15px; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 7px;
  letter-spacing: -0.1px;
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(26,63,219,.35);
}
.btn-ghost-light {
  color: rgba(255,255,255,0.6);
  font-size: 15px; font-weight: 400;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  transition: all 0.2s;
}
.btn-ghost-light:hover { color: #fff; border-color: rgba(255,255,255,0.45); }

/* Section helpers */
.section-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--accent);
  font-weight: 700; margin-bottom: 14px;
}
.section-h2 {
  font-size: 48px; font-weight: 800; letter-spacing: -1.6px;
  color: var(--ink); margin-bottom: 18px; line-height: 1.06;
}
.section-sub {
  font-size: 18px; color: var(--ink-soft);
  line-height: 1.6; font-weight: 300; max-width: 720px;
}

/* Fade-in — visible by default, animates if observer triggers */
.fade-in { opacity: 1; transform: none; transition: opacity 0.5s, transform 0.5s; }
.fade-in.pre { opacity: 0; transform: translateY(22px); }
.fade-in.visible { opacity: 1; transform: none; }

/* Footer */
footer {
  background: #07070f;
  padding: 56px 60px;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
}
.footer-brand-desc {
  font-size: 14px; color: rgba(255,255,255,0.32);
  line-height: 1.65; max-width: 280px;
  font-weight: 300; margin-top: 14px;
}
.footer-col-title {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: 2px; font-weight: 700;
  color: rgba(255,255,255,0.22); margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px; color: rgba(255,255,255,0.48);
  text-decoration: none; transition: color 0.2s; font-weight: 300;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  background: #07070f;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 16px 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom-text {
  font-size: 12px; color: rgba(255,255,255,0.18); font-weight: 400;
}
.footer-bottom-text a {
  color: rgba(255,255,255,0.18); text-decoration: none;
}
.footer-bottom-text a:hover { color: rgba(255,255,255,0.45); }

/* Mobile nav fallback for nav-toggle (mirrors staging) */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(10,10,15,0.98); padding: 18px 28px;
    flex-direction: column; align-items: flex-start; gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: none;
  }
  .nav-links.open { display: flex; }
  footer { grid-template-columns: 1fr; gap: 28px; padding: 40px 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; padding: 16px 28px; }
}

/* ── BLOCK 2 ─ Demo widget styles ─────────────────────────────────── */

/* ── Hero (compact dark hero specific to the demo) ───────────────── */
.demo-hero {
  background: var(--ink);
  color: #fff;
  padding: 80px 60px 88px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* Single-column variant — used when the dropzone is the next thing on the page,
   not a sibling live-card. Keeps the hero tight and points the eye downward. */
.demo-hero--solo {
  display: block;
  padding: 72px 60px 64px;
}
.demo-hero--solo .demo-hero-content { max-width: 720px; }
.demo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.demo-hero > * { position: relative; z-index: 2; }
.demo-hero h1 {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -2px;
  margin: 18px 0 22px;
}
.demo-hero h1 .accent { color: rgba(100,150,255,0.92); display: block; }
.demo-hero p.lede {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 0;
}

/* live preview card on the right of the hero */
.hero-live-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.hero-live-card-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.hero-live-card-head .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #5BFF9F; box-shadow: 0 0 0 0 rgba(91,255,159,0.6);
  animation: pulse-live 1.8s ease-in-out infinite;
}
@keyframes pulse-live { 0%,100%{box-shadow:0 0 0 0 rgba(91,255,159,0.55)} 50%{box-shadow:0 0 0 8px rgba(91,255,159,0)} }

.hero-live-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 6px;
  font-size: 12.5px;
}
.hero-live-row.empty { color: rgba(255,255,255,0.32); font-style: italic; justify-items: center; }
.hero-live-row .name { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-live-row .size { color: rgba(255,255,255,0.38); font-variant-numeric: tabular-nums; font-size: 11.5px; }

/* ── Step section frame ──────────────────────────────────────────── */
.step-section { padding: 80px 60px; background: var(--white); }
.step-section.dark { background: var(--ink); color: #fff; }
.step-section + .step-section { padding-top: 0; }

/* ── Wizard: progress bar + one pane at a time + step navigation ── */
.step-pane { display: none; }
.step-pane.step-active { display: block; }
.step-section.step-pane.step-active { padding-top: 28px; padding-bottom: 56px; }

/* Full-width bar that sits statically above the active pane (scrolls with the
   page — not pinned). Adopts the active pane's theme (light, or dark on Interact)
   so it merges into the step instead of forming a stripe between backgrounds. */
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 40px 28px 28px; background: var(--white); border-bottom: 1px solid var(--border); transition: background 0.2s; }
.stepper.on-dark { background: var(--ink); border-bottom-color: rgba(255,255,255,0.08); }
.stepper-list { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 10px 14px; box-shadow: 0 1px 4px rgba(10,10,15,0.05); }
.stepper-item { display: inline-flex; align-items: center; gap: 10px; background: transparent; border: 0; border-radius: 999px; padding: 9px 18px; font-family: var(--font); cursor: pointer; color: var(--ink-soft); transition: background 0.18s; }
.stepper-item:hover:not(.locked):not(.active) { background: rgba(10,10,15,0.04); }
.stepper-item.active { background: var(--accent); }
.stepper-item.locked { cursor: not-allowed; opacity: 0.45; }
.stepper-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: rgba(10,10,15,0.06); color: var(--ink-soft); border: 1px solid var(--border); transition: all 0.18s; }
.stepper-item.active .stepper-dot { background: #fff; color: var(--accent); border-color: #fff; }
.stepper-item.done .stepper-dot { background: rgba(26,63,219,0.14); color: var(--accent); border-color: rgba(26,63,219,0.35); }
.stepper-label { font-size: 14px; font-weight: 700; letter-spacing: 0.2px; }
.stepper-item.active .stepper-label { color: #fff; }
.stepper-bar { width: 28px; height: 2px; background: var(--border); margin: 0 2px; flex-shrink: 0; }
.stepper-arrow {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--white); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.stepper-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: rgba(26,63,219,0.06); }
.stepper-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

/* Dark variant — used on the Interact step so the bar merges with the dark pane. */
.stepper.on-dark .stepper-list { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); box-shadow: none; }
.stepper.on-dark .stepper-item { color: rgba(255,255,255,0.6); }
.stepper.on-dark .stepper-item:hover:not(.locked):not(.active) { background: rgba(255,255,255,0.06); }
.stepper.on-dark .stepper-dot { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.18); }
.stepper.on-dark .stepper-item.active { background: var(--accent); }
.stepper.on-dark .stepper-item.active .stepper-dot { background: #fff; color: var(--accent); border-color: #fff; }
.stepper.on-dark .stepper-item.active .stepper-label { color: #fff; }
.stepper.on-dark .stepper-item.done .stepper-dot { background: rgba(100,140,255,0.2); color: rgba(160,190,255,0.95); border-color: rgba(100,140,255,0.4); }
.stepper.on-dark .stepper-bar { background: rgba(255,255,255,0.16); }
.stepper.on-dark .stepper-arrow { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #fff; }
.stepper.on-dark .stepper-arrow:hover:not(:disabled) { border-color: rgba(160,190,255,0.9); color: rgba(160,190,255,0.95); background: rgba(100,140,255,0.12); }

.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.step-nav-spacer { flex: 1; }
.step-continue { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 12px 22px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.18s; }
.step-continue:hover:not(:disabled) { opacity: 0.92; }
.step-continue:disabled { opacity: 0.4; cursor: not-allowed; }
.step-back { background: transparent; border: 1px solid var(--border); color: var(--ink); border-radius: 10px; padding: 11px 18px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.18s; }
.step-back:hover { border-color: var(--accent); color: var(--accent); }
.step-section.dark .step-back { border-color: rgba(255,255,255,0.22); color: #fff; }
.step-section.dark .step-back:hover { border-color: rgba(160,190,255,0.9); color: rgba(160,190,255,0.95); }

.step-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 28px; flex-wrap: wrap;
}
.step-num {
  font-size: 10px; font-weight: 700; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.step-section.dark .step-num { color: rgba(100,140,255,0.9); }
.step-title {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
  line-height: 1.1; max-width: 720px;
}
.step-section.dark .step-title { color: #fff; }
.step-sub {
  font-size: 14.5px; color: var(--ink-soft); font-weight: 300;
  line-height: 1.6; max-width: 460px; text-align: right;
}
.step-section.dark .step-sub { color: rgba(255,255,255,0.5); }

.widget-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--accent);
  background: rgba(26,63,219,0.07);
  border: 1px solid rgba(26,63,219,0.18);
  padding: 5px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.step-section.dark .widget-tag {
  color: rgba(160,190,255,0.95);
  background: rgba(100,140,255,0.12);
  border-color: rgba(100,140,255,0.28);
}
.widget-tag code {
  font-family: 'SFMono-Regular', ui-monospace, monospace;
  font-size: 10.5px; font-weight: 600;
  color: var(--ink);
  background: rgba(10,10,15,0.06);
  padding: 1px 6px; border-radius: 4px;
}
.step-section.dark .widget-tag code {
  color: #fff;
  background: rgba(255,255,255,0.10);
}

/* ── Two-column step split: live UI on one side, explanation on the other ── */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.split-interactive, .split-explain { min-width: 0; }
.split-explain .widget-tag { margin-bottom: 14px; }
.split-explain .step-title { max-width: none; }
.split-explain .explain-body { margin-top: 18px; }
.explain-body p {
  font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); font-weight: 400; margin: 0 0 16px;
}
.explain-steps, .explain-points {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 11px;
}
.explain-steps li, .explain-points li {
  font-size: 13.5px; line-height: 1.55; color: var(--ink-soft);
  padding-left: 28px; position: relative;
}
.explain-steps li strong, .explain-points li strong { color: var(--ink); font-weight: 700; }
.explain-steps { counter-reset: estep; }
.explain-steps li { counter-increment: estep; }
.explain-steps li::before {
  content: counter(estep);
  position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(26,63,219,0.10); color: var(--accent);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.explain-points li::before {
  content: ""; position: absolute; left: 5px; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.explain-links { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.explain-links li { font-size: 13.5px; }
.explain-links a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(26,63,219,0.25); transition: border-color 0.15s; }
.explain-links a:hover { border-color: var(--accent); }
/* Placeholder three.js motif under the explanation text (left column). */
.step-anim { width: 100%; height: 200px; margin-top: 28px; pointer-events: none; }
/* Inside a half-width column, stack the inner widgets vertically */
.split-interactive .extract-body { grid-template-columns: 1fr; min-height: 0; }
.split-interactive .extract-body .doc-preview { border-right: 0; border-bottom: 1px solid var(--border); min-height: 280px; }

/* ── Step 1 — Upload widget ──────────────────────────────────────── */
.upload-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dropzone {
  border: 2px dashed rgba(26,63,219,0.32);
  border-radius: 12px;
  background: rgba(26,63,219,0.03);
  min-height: 280px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 32px;
  cursor: pointer; transition: all 0.18s;
  position: relative;
}
.dropzone:hover, .dropzone.active {
  border-color: var(--accent);
  background: rgba(26,63,219,0.07);
  transform: translateY(-1px);
}
.dropzone.full { border-color: rgba(10,10,15,0.18); background: rgba(10,10,15,0.03); cursor: not-allowed; }
.dropzone.full:hover { transform: none; }
.dropzone-icon {
  width: 48px; height: 48px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,63,219,0.10);
  border-radius: 12px;
  color: var(--accent);
}
.dropzone-icon svg { width: 24px; height: 24px; }
.dropzone-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px; letter-spacing: -0.2px;
}
.dropzone-sub {
  font-size: 13px; color: var(--ink-soft); font-weight: 300;
  line-height: 1.5; max-width: 320px;
}
.dropzone .formats {
  position: absolute; bottom: 14px; left: 0; right: 0;
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ghost); font-weight: 600;
}
.dropzone input[type=file] { display: none; }

/* ── Upload stage states: animation placeholder + compact add button ── */
.upload-stage { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.upload-add-btn {
  width: 100%; background: var(--white); border: 1px dashed rgba(26,63,219,0.4);
  border-radius: 12px; padding: 14px; font-family: var(--font); font-size: 14px;
  font-weight: 600; color: var(--accent); cursor: pointer; transition: all 0.18s;
}
.upload-add-btn:hover:not(:disabled) { background: rgba(26,63,219,0.06); border-color: var(--accent); }
.upload-add-btn:disabled { color: var(--ghost); border-color: var(--border); cursor: not-allowed; }

/* Placeholder process animation (swapped in while files are in flight) */
.upload-anim {
  min-height: 280px; border-radius: 12px;
  background: rgba(26,63,219,0.03); border: 1px solid rgba(26,63,219,0.14);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px; gap: 12px; position: relative;
}
.upload-anim .ua-orb {
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(26,63,219,0.55), rgba(26,63,219,0.12) 70%);
  animation: ua-pulse 1.5s ease-in-out infinite;
}
.upload-anim .ua-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.upload-anim .ua-bar { width: 70%; max-width: 280px; height: 4px; border-radius: 999px; background: rgba(26,63,219,0.12); overflow: hidden; }
.upload-anim .ua-bar > span { display: block; width: 40%; height: 100%; border-radius: 999px; background: var(--accent); animation: ua-slide 1.4s ease-in-out infinite; }
.upload-anim .ua-stages { font-size: 11px; letter-spacing: 0.6px; color: var(--ink-soft); font-weight: 500; }
.upload-anim .ua-tag { position: absolute; bottom: 10px; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ghost); }
@keyframes ua-pulse { 0%, 100% { transform: scale(0.85); opacity: 0.7; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes ua-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* ── Minimal document groups: Uploading / Done ── */
.doc-groups { display: flex; flex-direction: column; gap: 16px; }
/* Stack of sequential ingest-time notices (log, explainer, demo-limit,
   conversion). Kept close together via `gap`; the stack as a whole keeps a
   normal gap from the doc gallery above, but only while something in it is
   actually visible (`.has-content`), so an all-hidden stack adds no gap. */
.ingest-notices { display: flex; flex-direction: column; gap: 6px; margin-top: 0; }
.ingest-notices.has-content { margin-top: 14px; }
.upload-notice {
  padding: 14px 16px;
  background: rgba(26,63,219,0.06); border: 1px solid rgba(26,63,219,0.2);
  border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--ink-soft);
}
.upload-notice strong { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.upload-notice a.upload-notice-btn {
  display: inline-block; margin-top: 10px;
  background: var(--accent); color: #fff; border-radius: 6px;
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  text-decoration: none; transition: opacity 0.15s;
}
.upload-notice a.upload-notice-btn:hover { opacity: 0.85; }
.doc-group { display: flex; flex-direction: column; gap: 8px; }
.doc-group-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft);
}
.doc-group-count { font-size: 10px; font-weight: 700; letter-spacing: 0; color: var(--ghost); background: rgba(10,10,15,0.06); border-radius: 999px; padding: 1px 7px; }
.file-row.failed { border-color: rgba(192,57,43,0.4); }
.doc-actions { display: flex; align-items: center; gap: 6px; }
.doc-remove {
  background: transparent; border: 0; color: var(--ghost);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.doc-remove:hover { color: #B82A3E; background: rgba(184,42,62,0.08); }
.doc-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(26,63,219,0.2); border-top-color: var(--accent);
  animation: doc-spin 0.7s linear infinite;
}
@keyframes doc-spin { to { transform: rotate(360deg); } }

/* ── Document gallery: thumbnail tiles (uploaded + pre-loaded) ── */
.doc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.doc-tile {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 10px;
}
.doc-tile.indexed { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.doc-tile.indexed:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(10,10,15,0.10); }
.doc-tile.indexed:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-thumb {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden;
  background: rgba(26,63,219,0.05); display: flex; align-items: center; justify-content: center;
}
.doc-tile.busy .doc-thumb { background: rgba(26,63,219,0.04); }
.doc-tile.failed .doc-thumb { background: rgba(192,57,43,0.06); }
.doc-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Once a real page thumbnail is laid in, drop the ext placeholder behind it. */
.doc-thumb-img ~ .doc-thumb-ph { display: none; }
.doc-thumb-ph { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--accent); opacity: 0.85; }
.doc-tile-name {
  font-size: 12px; font-weight: 500; color: var(--ink); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.doc-tile-remove {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(10,10,15,0.55); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center; z-index: 2;
}
.doc-tile:hover .doc-tile-remove { display: flex; }
.doc-tile-remove:hover { background: #B82A3E; }
/* progress wheel (in-flight tiles) */
.doc-wheel { width: 48px; height: 48px; transform: rotate(-90deg); }
.doc-wheel .dw-track { fill: none; stroke: rgba(26,63,219,0.16); stroke-width: 3.5; }
.doc-wheel .dw-fill { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
.doc-wheel-pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums;
}
.doc-tile-badge.failed {
  position: absolute; top: 8px; z-index: 1; font-size: 9px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: #fff; background: #C0392B; padding: 2px 7px; border-radius: 999px;
}

/* Subtle heavy-usage notice (shown only after >20s of in-flight ingest) */
.demo-load-notice {
  display: none; align-items: center; gap: 9px;
  font-size: 12px; line-height: 1.45; font-weight: 400; color: var(--ink-soft);
  background: rgba(26,63,219,0.04); border: 1px solid rgba(26,63,219,0.10);
  border-radius: 10px; padding: 10px 12px;
}
.demo-load-notice.show { display: flex; }
.demo-load-notice .dln-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; animation: dln-pulse 1.4s ease-in-out infinite;
}
.demo-load-notice a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.demo-load-notice a:hover { opacity: 0.85; }
@keyframes dln-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ── Ingest log ──
   Fixed height + subtle background from the moment it appears, so it reads as
   a reserved log window rather than a text block that grows/shifts layout as
   lines accumulate (sized for the 8-line cap in appendLogLine). */
.ingest-log {
  display: none;
  height: 168px; box-sizing: border-box; overflow: hidden; position: relative;
  background: rgba(26,63,219,0.03); border: 1px solid rgba(26,63,219,0.08);
  border-radius: 10px; padding: 8px 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
}
.ingest-log.show { display: block; }
.ingest-log-inner {
  display: flex; flex-direction: column; justify-content: flex-end; height: 100%;
  padding: 0 2px 2px;
}
.ingest-log-line {
  font-size: 11px; line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
  color: var(--ink-soft);
}
.ingest-log-line .ilg-ts  { color: rgba(120,130,160,0.55); margin-right: 6px; }
.ingest-log-line .ilg-name { font-weight: 600; color: var(--ink); margin-right: 4px; }
.ingest-log-line .ilg-msg  { }

/* ── "Add files" modal ── */
.upload-modal-overlay {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(10,10,15,0.5); backdrop-filter: blur(2px);
}
.upload-modal-overlay.open { display: flex; }
.upload-modal {
  position: relative; width: 100%; max-width: 460px;
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: 0 20px 60px rgba(10,10,15,0.25);
}
.upload-modal-head { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.upload-modal-close {
  position: absolute; top: 14px; right: 16px; background: transparent; border: 0;
  font-size: 22px; line-height: 1; color: var(--ghost); cursor: pointer;
}
.upload-modal-close:hover { color: var(--ink); }

/* file list */
.file-list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.file-list-title {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-soft);
}
.file-list-counter { font-size: 11px; color: var(--ghost); font-weight: 500; }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
}
.file-row .ext {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,63,219,0.10); color: var(--accent);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px;
}
.file-row .info { min-width: 0; }
.file-row .name {
  font-size: 13px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-row .meta {
  font-size: 11px; color: var(--ghost); font-weight: 400;
  margin-top: 2px; display: flex; gap: 8px;
}
.file-row .meta .stage { color: var(--accent); font-weight: 600; }
.file-row .meta .stage.done { color: #1A8F4A; }
.file-row .progress {
  width: 84px; height: 5px; background: rgba(10,10,15,0.06);
  border-radius: 999px; overflow: hidden; margin-top: 5px;
}
.file-row .progress > span {
  display: block; height: 100%; background: var(--accent);
  width: 0%; transition: width 0.32s ease;
}
.file-row .progress > span.done { background: #1A8F4A; }
/* Live-sandbox states: processing pulses, failed is red (label also changes, non-color cue). */
.file-row .meta .stage.failed { color: #C0392B; }
.file-row .progress > span.failed { background: #C0392B; }
.file-row .meta .stage:not(.done):not(.failed) { animation: sbx-pulse 1.3s ease-in-out infinite; }
@keyframes sbx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.file-row .remove {
  background: transparent; border: 0; color: var(--ghost);
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.file-row .remove:hover { color: var(--ink); }
.file-empty {
  font-size: 13px; color: var(--ghost); font-weight: 300;
  font-style: italic; padding: 18px 4px;
}

.widget-foot {
  margin-top: 14px;
  font-size: 11px; color: var(--ghost); font-weight: 500;
  letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 8px;
}
.widget-foot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.step-section.dark .widget-foot { color: rgba(255,255,255,0.42); }
.step-section.dark .widget-foot::before { background: rgba(100,150,255,0.9); }

/* ── Step 2 — Grounded chat ──────────────────────────────────────── */
/* One simple full-width chat. The source reference is a panel that slides in from the right
   ONLY when a citation is engaged (not a permanent split); a subtle connector line links the
   in-text citation to it. */
.chat-stage {
  position: relative;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  overflow: hidden;
  margin-top: 32px;
}
.chat-main {
  display: flex; flex-direction: column;
  min-height: 460px; max-height: 560px; min-width: 0;
  /* When the reference panel opens, the conversation reflows into the left area so chips stay
     visible and the connector line has room. */
  margin-right: 0;
  transition: margin-right 0.32s cubic-bezier(0.4,0,0.2,1);
}
.chat-stage.ref-open .chat-main { margin-right: calc(min(420px, 64%) + 18px); }
.chat-stream { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; min-width: 0; }
/* Slide-in source reference panel. */
.chat-ref-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 64%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-radius: 0 16px 16px 0;
  box-shadow: -20px 0 44px rgba(0,0,0,0.34);
  transform: translateX(103%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  z-index: 3; display: flex; flex-direction: column; padding: 12px 14px;
}
.chat-stage.ref-open .chat-ref-panel { transform: translateX(0); }
.chat-ref-close { align-self: flex-end; background: transparent; border: 0; color: var(--ghost); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.chat-ref-close:hover { color: var(--ink); }
.chat-ref-body { flex: 1; overflow-y: auto; }
/* Subtle leader line from the in-text citation to the reference panel. */
.chat-connector { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.chat-connector line { stroke: rgba(255,221,0,0.55); stroke-width: 1.5; stroke-dasharray: 4 4; }
.cite-chip.active { box-shadow: 0 0 0 2px rgba(255,221,0,0.85); }
/* ───── Claude-style empty state: real input floats centre, small chat⇄docs motif + prompts ───── */
.chat-empty-anim { display: none; }
.chat-stage.is-empty { display: flex; align-items: center; justify-content: center; min-height: 520px; }
.chat-stage.is-empty .chat-main {
  min-height: 0; max-height: none; width: 100%;
  align-items: center; justify-content: center;
  margin-right: 0;
}
.chat-stage.is-empty .chat-stream { display: none; }
/* Small motif above the box: documents feeding a chat bubble, with pulses flowing in. */
.chat-stage.is-empty .chat-empty-anim { display: block; order: 1; margin: 0 0 22px; }
.chat-empty-anim .cea-svg { width: 210px; height: auto; display: block; }
.cea-link { stroke: rgba(255,255,255,0.16); stroke-width: 1.2; }
.cea-doc rect { fill: rgba(255,255,255,0.04); stroke: rgba(255,255,255,0.5); stroke-width: 1.2; }
.cea-doc line { stroke: rgba(255,255,255,0.34); stroke-width: 1.4; stroke-linecap: round; }
.cea-json rect { fill: rgba(255,255,255,0.04); stroke: rgba(255,255,255,0.5); stroke-width: 1.2; }
.cea-json text { fill: rgba(255,255,255,0.7); font-family: monospace; font-size: 13px; font-weight: 600; }
.cea-table rect { fill: rgba(255,255,255,0.04); stroke: rgba(255,255,255,0.5); stroke-width: 1.2; }
.cea-table .cea-table-hdr { fill: rgba(255,255,255,0.22); stroke: none; }
.cea-table line { stroke: rgba(255,255,255,0.34); stroke-width: 1; stroke-linecap: round; }
.cea-chat rect { fill: rgba(100,140,255,0.14); stroke: rgba(120,150,255,0.85); stroke-width: 1.4; }
.cea-chat-tail { fill: rgba(100,140,255,0.14); stroke: rgba(120,150,255,0.85); stroke-width: 1.4; stroke-linejoin: round; }
.cea-bubdot { fill: rgba(190,210,255,0.95); }
/* Pulses of light travelling each connector from a document into the chat bubble. A short bright
   dash (round caps + glow) slides along the line via stroke-dashoffset; the three converge at the
   bubble together, then pause and repeat. */
.cea-flow {
  fill: none; stroke: rgba(180,205,255,0.98); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 15 999; filter: drop-shadow(0 0 3px rgba(120,150,255,0.9));
}
.cea-flow.f1 { animation: cea-f1 2.4s ease-in-out infinite; }
.cea-flow.f2 { animation: cea-f2 2.4s ease-in-out infinite; }
.cea-flow.f3 { animation: cea-f3 2.4s ease-in-out infinite; }
/* doc end (offset 15 = hidden before start) → chat end (offset −L = past the end), then hold. */
@keyframes cea-f1 { 0% { stroke-dashoffset: 15; } 60%, 100% { stroke-dashoffset: -80; } }
@keyframes cea-f2 { 0% { stroke-dashoffset: 15; } 60%, 100% { stroke-dashoffset: -38; } }
@keyframes cea-f3 { 0% { stroke-dashoffset: 15; } 60%, 100% { stroke-dashoffset: -80; } }
@media (prefers-reduced-motion: reduce) { .cea-flow { animation: none; stroke-dashoffset: 15; } }
/* The actual input box, floating in the centre. Opaque so the background motif never shows
   through and distracts. */
.chat-stage.is-empty .chat-input {
  order: 2; width: min(560px, 100%); margin-top: 0; padding-top: 0;
  border-top: 0;
  background: #15161d;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px; padding: 8px 8px 8px 6px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.34);
}
.chat-stage.is-empty .chat-input input { background: transparent; border: 0; }
.chat-stage.is-empty .chat-input input:focus { border: 0; }
/* Suggested prompts, centred and stacked beneath the box. */
.chat-stage.is-empty .chat-suggest {
  order: 3; flex-direction: column; align-items: center;
  flex-wrap: nowrap; gap: 8px; margin-top: 18px; width: min(560px, 100%);
}
/* Opaque pills so the orbiting documents behind them stay out of sight. */
.chat-stage.is-empty .chat-suggest .prompt-pill { width: 100%; text-align: center; background: #15161d; }
.chat-stage.is-empty .chat-suggest .prompt-pill:hover { background: #1c2030; }
.chat-empty { text-align: center; padding: 44px 16px 16px; }
.chat-empty-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.chat-empty-sub { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.55; max-width: 460px; margin: 0 auto; }
.chat-msg { margin-bottom: 18px; max-width: 92%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.chat-msg.user {
  margin-left: auto; background: rgba(26,63,219,0.30);
  border: 1px solid rgba(100,140,255,0.35);
  padding: 10px 14px; border-radius: 10px 10px 2px 10px;
  font-size: 14px; color: #fff;
}
.chat-msg.assistant {
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,0.88);
}
.chat-msg.assistant .label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: rgba(200,225,255,0.98);
  margin-bottom: 8px;
}
.cite {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: rgba(100,140,255,0.16);
  border: 1px solid rgba(100,140,255,0.32);
  color: rgba(190,215,255,0.98);
  font-size: 11px; font-weight: 600;
  padding: 1px 7px 2px; border-radius: 6px;
  margin: 0 1px;
  cursor: pointer; transition: all 0.18s;
  font-variant-numeric: tabular-nums;
}
.cite:hover {
  background: rgba(100,140,255,0.28);
  border-color: rgba(160,190,255,0.55);
  color: #fff;
}
.cite .pg { opacity: 0.7; font-weight: 500; }
/* Live-sandbox chat: source pills row under an answer + thinking placeholder. */
.chat-sources { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-thinking { opacity: 0.6; font-style: italic; }
.cursor {
  display: inline-block; width: 7px; height: 14px;
  background: rgba(100,150,255,0.9); margin-left: 2px;
  vertical-align: -2px; animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.chat-input-hint {
  font-size: 11px; font-weight: 500; letter-spacing: 0.2px;
  color: rgba(255,255,255,0.42); line-height: 1.5;
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 7px;
}
.chat-new-wrap {
  display: none; justify-content: center;
  padding: 20px 0 8px;
}
.chat-new-wrap.visible {
  display: flex;
}
.chat-new-btn {
  background: none; border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px; padding: 10px 22px;
  font-family: var(--font); font-size: 13px;
  color: rgba(0,0,0,0.4); cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.chat-new-btn:hover { border-color: rgba(0,0,0,0.3); color: rgba(0,0,0,0.7); background: rgba(0,0,0,0.03); }
.chat-input {
  display: flex; gap: 10px; margin-top: 10px;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06);
}
.chat-input input {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 11px 14px;
  font-family: var(--font); font-size: 14px; color: #fff;
  outline: none; transition: border 0.18s;
}
.chat-input input:focus { border-color: rgba(100,150,255,0.7); }
.chat-input input::placeholder { color: rgba(255,255,255,0.32); }
.chat-input button {
  background: var(--accent); color: #fff; border: 0;
  border-radius: 8px; padding: 0 18px; font-family: var(--font);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.18s;
}
.chat-input button:hover { background: var(--accent-2); }
.chat-input button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Suggested prompts, shown as a wrap-row above the input until the conversation starts. */
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chat-suggest.hidden { display: none; }
/* Refined-highlighting: clickable in-text citation chips + source viewer (in the dark chat column). */
.cite-chip {
  display: inline; padding: 1px 7px; margin: 0 2px; vertical-align: 1px;
  font-family: var(--font); font-size: 11px; font-weight: 600; line-height: 1.3;
  color: #fff; background: var(--accent); border: 0; border-radius: 6px; cursor: pointer;
  white-space: nowrap; transition: opacity 0.15s;
}
.cite-chip::before { content: "\1F4C4\00a0"; opacity: 0.85; } /* 📄 + nbsp */
.cite-chip:hover { opacity: 0.82; }
/* Markdown rendered inside grounded answers. */
.chat-msg p { margin: 0 0 8px; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul, .chat-msg ol { margin: 4px 0 8px; padding-left: 20px; }
.chat-msg li { margin-bottom: 3px; }
.chat-msg code { background: rgba(255,255,255,0.1); border-radius: 4px; padding: 1px 5px; font-size: 0.9em; font-family: 'SFMono-Regular', ui-monospace, monospace; }
.chat-msg pre { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 8px 0; }
.chat-msg pre code { background: none; padding: 0; }
.chat-msg h1, .chat-msg h2, .chat-msg h3 { font-size: 14px; font-weight: 700; margin: 12px 0 6px; }
.chat-msg a { color: rgba(120,160,255,0.95); text-decoration: underline; }
.chat-msg blockquote { border-left: 3px solid rgba(255,255,255,0.18); margin: 8px 0; padding: 2px 0 2px 12px; color: rgba(255,255,255,0.7); }
.chat-msg hr { border: 0; border-top: 1px solid rgba(255,255,255,0.12); margin: 12px 0; }
/* Tables — the headline reason for a real markdown renderer. */
.chat-msg table { border-collapse: collapse; max-width: 100%; margin: 10px 0; font-size: 12.5px; display: block; overflow-x: auto; }
.chat-msg th, .chat-msg td { border: 1px solid rgba(255,255,255,0.14); padding: 7px 10px; text-align: left; vertical-align: top; }
.chat-msg th { background: rgba(255,255,255,0.06); font-weight: 700; white-space: nowrap; }
.chat-msg td { min-width: 80px; }
.chat-viewer-head { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ghost); margin-bottom: 10px; word-break: break-all; }
.chat-viewer-empty { font-size: 12px; color: var(--ghost); font-style: italic; line-height: 1.5; }
.cv-claim { font-size: 12px; line-height: 1.5; color: var(--ink); background: rgba(26,63,219,0.06); border-left: 3px solid var(--accent); border-radius: 4px; padding: 7px 10px; margin-bottom: 10px; }
.cv-claim::before { content: "Highlighting: "; font-weight: 700; color: var(--accent); }
.cv-page { position: relative; margin-bottom: 12px; }
.cv-page:last-child { margin-bottom: 0; }
.cv-img { width: 100%; display: block; border: 1px solid var(--border); border-radius: 6px; }
.cv-box { position: absolute; background: rgba(255,221,0,0.42); border-radius: 2px; pointer-events: none; mix-blend-mode: multiply; }
.cv-pageno { font-size: 10px; color: var(--ghost); margin-top: 4px; font-variant-numeric: tabular-nums; }
.prompt-pill {
  text-align: left; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; padding: 8px 14px;
  color: rgba(255,255,255,0.82); font-size: 12.5px;
  font-family: var(--font); cursor: pointer;
  transition: all 0.18s; line-height: 1.3;
}
.prompt-pill:hover {
  background: rgba(100,140,255,0.12);
  border-color: rgba(100,140,255,0.5);
  color: #fff;
}
.prompt-pill:disabled { opacity: 0.4; cursor: not-allowed; }
.prompt-empty {
  font-size: 12px; color: rgba(255,255,255,0.35);
  font-style: italic; padding: 8px 0;
}

/* ── Step 3 — Extraction workbench ───────────────────────────────── */
.extract-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}
.extract-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  padding: 0 8px;
}
.extract-tab {
  background: transparent; border: 0;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--ink-soft); padding: 14px 18px;
  cursor: pointer; position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s;
}
.extract-tab:hover { color: var(--ink); }
.extract-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.extract-tab .schema {
  font-size: 10px; font-weight: 500; color: var(--ghost);
  letter-spacing: 0.4px; margin-left: 6px;
}
.extract-tab.active .schema { color: rgba(26,63,219,0.6); }
.extract-tab-empty {
  padding: 14px 18px; font-size: 12.5px; color: var(--ghost);
  font-style: italic;
}

.extract-body {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 460px;
}
.doc-preview {
  background: linear-gradient(180deg, #f8f7f3 0%, #ebebea 100%);
  border-right: 1px solid var(--border);
  padding: 28px;
  display: flex; flex-direction: column;
}
.doc-preview-head {
  font-size: 11px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--ghost);
  margin-bottom: 12px;
}
.doc-sheet {
  flex: 1; background: #fff;
  border: 1px solid rgba(10,10,15,0.08);
  border-radius: 6px; padding: 26px 30px;
  font-family: 'Georgia', 'Times', serif;
  color: var(--ink); position: relative;
  box-shadow: 0 12px 30px rgba(10,10,15,0.06);
  /* Cap the preview height so a long, multi-page PDF scrolls inside the pane
     instead of stretching the workbench to an arbitrary length. */
  max-height: 60vh;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.doc-sheet-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--ghost); font-style: italic; font-family: var(--font);
}
.doc-sheet .doc-h { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.doc-sheet .doc-p { font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); font-weight: 400; }
.doc-sheet .doc-line {
  display: block; height: 8px; background: rgba(10,10,15,0.06);
  border-radius: 2px; margin: 2px 0;
}
.doc-sheet .doc-line.s { width: 70%; }
.doc-sheet .doc-line.m { width: 88%; }
.doc-sheet .doc-line.l { width: 96%; }
.doc-sheet .doc-line.hi { background: rgba(26,63,219,0.18); }
.doc-sheet .doc-pageno {
  position: absolute; bottom: 10px; right: 16px;
  font-family: var(--font); font-size: 10px;
  color: var(--ghost); font-weight: 500;
}

.fields-pane { padding: 24px 28px; display: flex; flex-direction: column; }
.fields-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.fields-head .h {
  font-size: 11px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--ink-soft);
}
.fields-head .meta { font-size: 11px; color: var(--ghost); }
.fields-head .meta strong { color: var(--ink); font-weight: 600; }
.field-list { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.field-row {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 9px; padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  transition: border 0.18s;
}
.field-row.approved { border-color: rgba(26,143,74,0.4); background: rgba(26,143,74,0.04); }
.field-row.rejected { border-color: rgba(200,40,60,0.35); background: rgba(200,40,60,0.04); opacity: 0.75; }
.field-row .k {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--ghost); margin-bottom: 4px;
}
.field-row .v {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.field-row .src {
  font-size: 11px; color: var(--accent); font-weight: 500;
  margin-top: 4px; display: inline-flex; align-items: baseline; gap: 4px;
}
.field-actions { display: flex; gap: 6px; align-self: center; }
.fa-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
  color: var(--ink-soft);
}
.fa-btn:hover { background: var(--surface-2); color: var(--ink); }
.fa-btn.on-approve { background: #1A8F4A; border-color: #1A8F4A; color: #fff; }
.fa-btn.on-reject { background: #B82A3E; border-color: #B82A3E; color: #fff; }
.fa-btn svg { width: 14px; height: 14px; }

.audit {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 11px; color: var(--ink-soft);
  font-family: 'SFMono-Regular', ui-monospace, monospace;
  line-height: 1.6;
  max-height: 90px; overflow-y: auto;
}
.audit-h {
  font-family: var(--font); font-size: 10px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ghost); margin-bottom: 6px;
}
.audit-entry { display: flex; gap: 8px; }
.audit-entry .t { color: var(--ghost); flex-shrink: 0; }
.audit-empty { color: var(--ghost); font-style: italic; font-family: var(--font); }

/* ── Step 4 — Smart report ───────────────────────────────────────── */
.report-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* Editor + side cards on top; the answers matrix spans full width below (like extract). */
.report-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.report-doc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px 40px;
  font-family: 'Georgia', serif;
  color: var(--ink);
  min-height: 460px;
  box-shadow: 0 18px 40px rgba(10,10,15,0.06);
  position: relative;
}
.report-doc-header {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font); font-size: 10px; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--ghost); font-weight: 600;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
  margin-bottom: 22px;
}
.report-doc h1 {
  font-family: var(--font); font-size: 26px; font-weight: 800;
  letter-spacing: -0.7px; line-height: 1.15; margin-bottom: 12px;
  color: var(--ink);
}
.report-doc .meta-line {
  font-family: var(--font); font-size: 11px; color: var(--ghost);
  margin-bottom: 22px; font-weight: 500; letter-spacing: 0.3px;
}
.report-doc h2 {
  font-family: var(--font); font-size: 12px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--accent); margin: 22px 0 10px;
}
.report-doc p {
  font-size: 14px; line-height: 1.7; color: var(--ink);
  font-weight: 400; margin-bottom: 12px;
}
.report-doc p .cite-light {
  background: rgba(26,63,219,0.08);
  border: 1px solid rgba(26,63,219,0.22);
  color: var(--accent);
  font-family: var(--font); font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 5px;
  margin: 0 1px; vertical-align: 2px;
  font-variant-numeric: tabular-nums;
}
.report-doc .empty-state {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 360px;
  color: var(--ghost); font-family: var(--font);
  font-size: 14px; font-style: italic;
}

.report-side { display: flex; flex-direction: column; gap: 18px; }
.report-side-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.report-side-card .h {
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.report-side-card ul { list-style: none; padding: 0; margin: 0; }
.report-side-card li {
  font-size: 12.5px; color: var(--ink); font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  display: flex; justify-content: space-between; gap: 8px;
}
.report-side-card li:last-child { border-bottom: 0; }
.report-side-card li .ct {
  color: var(--ghost); font-weight: 500; font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.report-empty-side { font-size: 12px; color: var(--ghost); font-style: italic; }
#report-editor { min-width: 0; }
#report-editor .schema-builder { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; }
/* Answers matrix: same bordered, rounded, horizontally-scrolling container + title as the extract results table. */
.report-results { display: flex; flex-direction: column; gap: 14px; }
.report-results .rt-title { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ghost); margin: 0 0 -4px; }
.report-results .rt-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.report-synth-bar { margin-top: 2px; }
.rt-src { display: block; font-size: 10px; font-weight: 400; color: var(--ghost); margin-top: 3px; font-variant-numeric: tabular-nums; }
.report-export {
  background: var(--ink); color: #fff;
  border: 0; border-radius: 8px;
  padding: 14px 20px; font-family: var(--font);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.18s;
}
.report-export:hover { background: var(--accent); transform: translateY(-1px); }
.report-export:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.report-export-note {
  font-size: 10px; color: var(--ghost); font-weight: 500;
  text-align: center; letter-spacing: 0.4px;
}

/* ── Closer band ─────────────────────────────────────────────────── */
.closer {
  background: var(--ink); color: #fff;
  padding: 72px 60px;
  text-align: center;
}
.closer h2 {
  font-size: 36px; font-weight: 800; letter-spacing: -1.2px;
  line-height: 1.12; max-width: 760px; margin: 0 auto 18px;
  color: #fff;
}
.closer h2 .accent { color: rgba(100,150,255,0.92); }
.closer p {
  font-size: 16px; color: rgba(255,255,255,0.55);
  font-weight: 300; max-width: 580px;
  margin: 0 auto 30px; line-height: 1.6;
}
.closer .actions { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.closer .btn-white {
  background: #fff; color: var(--ink);
  padding: 13px 24px; border-radius: 7px;
  font-weight: 500; font-size: 14px;
  text-decoration: none; transition: all 0.18s;
}
.closer .btn-white:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(255,255,255,0.12); }

/* ── Trust strip (proof points band between hero and Step 1) ─────── */
.trust-strip {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0 60px 28px;
}
.trust-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.trust-cell {
  padding: 18px 22px;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 4px;
}
.trust-cell:last-child { border-right: 0; }
.trust-cell strong {
  font-size: 18px; font-weight: 800; color: #fff;
  letter-spacing: -0.4px; font-variant-numeric: tabular-nums;
}
.trust-cell span {
  font-size: 11px; color: rgba(255,255,255,0.42);
  font-weight: 500; letter-spacing: 0.3px;
}

/* ── Example exchange (initial Step 2 placeholder) ───────────────── */
.chat-example-flag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font);
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(160,190,255,0.95);
  background: rgba(100,140,255,0.12);
  border: 1px solid rgba(100,140,255,0.28);
  padding: 5px 10px; border-radius: 999px;
  margin-bottom: 16px;
}
.chat-example-flag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(160,190,255,0.95);
}
.chat-example-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  font-size: 12px; color: rgba(255,255,255,0.45);
  line-height: 1.55; font-weight: 300;
}
.chat-example-foot em { color: rgba(255,255,255,0.78); font-style: normal; font-weight: 600; }

/* ── Example eyebrow (light sections: Steps 1, 3, 4) ──────────────── */
.example-flag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font);
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--accent);
  background: rgba(26,63,219,0.06);
  border: 1px solid rgba(26,63,219,0.22);
  padding: 5px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.example-flag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.example-foot {
  margin-top: 8px;
  font-size: 11.5px; color: var(--ghost);
  font-weight: 300; font-style: italic; line-height: 1.5;
  padding-left: 2px;
}

/* Step 1 example queue rows — muted version of .file-row, no remove button */
.file-row.example {
  background: rgba(26,63,219,0.03);
  border-color: rgba(26,63,219,0.18);
}
.file-row .example-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(26,63,219,0.10);
  border: 1px solid rgba(26,63,219,0.22);
  padding: 3px 8px; border-radius: 999px;
  align-self: center;
}
.file-row .example-actions {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
}
.file-row .view-pdf {
  font-size: 11px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  padding: 4px 9px; border-radius: 6px;
  border: 1px solid rgba(26,63,219,0.28);
  background: var(--white);
  transition: all 0.18s;
  white-space: nowrap;
}
.file-row .view-pdf:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* Citation pills that link to a PDF — same shape as .cite/.cite-light
   but with explicit anchor styling. */
a.cite, a.cite-link, a.cite-light { text-decoration: none; }
a.cite-link:focus-visible { outline: 2px solid rgba(160,190,255,0.7); outline-offset: 2px; }

/* Source list link on the report side panel */
.src-link { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
.src-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Toast (transient notices) ─────────────────────────────────────── */
.toast-host {
  position: fixed;
  right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200;
  pointer-events: none;
  max-width: 360px;
}
.toast {
  background: var(--ink); color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px; line-height: 1.5;
  font-weight: 400;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast strong {
  display: block; font-weight: 700; font-size: 11px;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: rgba(160,190,255,0.95);
  margin-bottom: 4px;
}
.toast-action {
  display: inline-block; margin-top: 10px;
  background: rgba(26,63,219,0.85); color: #fff;
  border: none; border-radius: 6px; padding: 6px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background 0.15s;
}
.toast-action:hover { background: rgba(26,63,219,1); color: #fff; }
.toast-dismiss {
  float: right; margin-left: 12px; background: none; border: none;
  color: rgba(255,255,255,0.4); font-size: 16px; cursor: pointer; padding: 0; line-height: 1;
}
.toast-dismiss:hover { color: rgba(255,255,255,0.8); }

/* ── Field-state caption next to approved/rejected (a11y, non-color) */
.field-state {
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  margin-top: 4px; display: inline-block;
}
.field-state.approved { background: rgba(26,143,74,0.12); color: #1A8F4A; }
.field-state.rejected { background: rgba(200,40,60,0.12); color: #B82A3E; }

/* ── Live-sandbox: extraction schema designer + results (Step 3) ──── */
.schema-builder { margin-bottom: 16px; }
.schema-builder-head { font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 16px; }
.schema-section { margin-bottom: 18px; }
.schema-section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ghost); margin-bottom: 9px;
}
.schema-count {
  font-size: 10px; font-weight: 700; letter-spacing: 0; color: var(--accent);
  background: rgba(26,63,219,0.08); border-radius: 999px; padding: 1px 7px;
}
.schema-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.schema-empty { font-size: 12px; color: var(--ghost); font-style: italic; }
.schema-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.schema-table thead th { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ghost); padding: 0 10px 6px 0; border-bottom: 1px solid var(--border); text-align: left; }
.st-row td { padding: 5px 10px 5px 0; border-bottom: 1px solid rgba(0,0,0,0.05); vertical-align: middle; }
.st-row:last-child td { border-bottom: 0; }
.st-name { font-weight: 600; color: var(--ink); white-space: nowrap; }
.st-type-pill { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent); background: rgba(26,63,219,0.08); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.st-desc { color: var(--ghost); max-width: 200px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; width: 99%; scrollbar-width: none; }
.st-desc::-webkit-scrollbar { display: none; }
.st-nodesc { color: var(--border); }
.st-rm { text-align: right; width: 20px; }
.sc-remove { background: transparent; border: 0; color: var(--ghost); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.sc-remove:hover { color: #B82A3E; }
.schema-add-trigger { padding: 4px 0; }
.schema-limit-notice { font-family: var(--font); font-size: 12px; color: var(--ink-faint, #999); font-style: italic; }
.upload-limit-hint { font-family: var(--font); font-size: 11px; color: var(--ink-faint, #aaa); margin-top: 6px; }
.schema-add-trigger .exf-open { background: none; border: none; padding: 0; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; opacity: 0.85; transition: opacity 0.15s; }
.schema-add-trigger .exf-open:hover { opacity: 1; }
.schema-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.schema-add-header { flex: 0 0 100%; display: flex; flex-direction: column; gap: 2px; margin-bottom: 2px; }
.schema-add-title { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink); }
.schema-add-subtitle { font-family: var(--font); font-size: 11px; color: var(--ink-faint, #999); }
.schema-add input, .schema-add select { font-family: var(--font); font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--ink); }
.schema-add .exf-name { flex: 1 1 150px; min-width: 0; }
.schema-add-break { flex: 0 0 100%; height: 0; }
.schema-add .exf-desc { flex: 1 1 200px; min-width: 0; }
.schema-add .exf-name:focus, .schema-add .exf-type:focus, .schema-add .exf-desc:focus { outline: none; border-color: var(--accent); }
.schema-add .exf-type { flex: 0 0 auto; cursor: pointer; }
.schema-add .exf-add { flex: 0 0 auto; background: rgba(26,63,219,0.08); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 18px; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; transition: background 0.18s, color 0.18s; }
.schema-add .exf-add:hover { background: var(--accent); color: #fff; }
.schema-run-row { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border); }
.run-extract { width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 12px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.18s; }
.run-extract:hover:not(:disabled) { opacity: 0.9; }
.run-extract:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Chat-driven extraction (Step 2) ── */
.extract-chat-shell, .extract-schema-shell {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.extract-schema-shell .run-extract { margin-top: 4px; }
.ex-skip { align-self: center; background: transparent; border: 0; color: var(--ghost); font-family: var(--font); font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 2px 6px; transition: color 0.18s; }
.ex-skip:hover { color: var(--accent); }
.extract-chat { display: flex; flex-direction: column; gap: 14px; min-height: 320px; max-height: 560px; overflow-y: auto; }
.ex-empty { color: var(--ink-soft); font-size: 13px; padding: 36px 16px; text-align: center; }
.ex-msg { max-width: 100%; }
.ex-user { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 12px 12px 3px 12px; padding: 8px 13px; font-size: 13px; max-width: 85%; line-height: 1.45; }
.ex-assistant { align-self: flex-start; width: 100%; }
.ex-assistant-text { font-size: 13px; color: var(--ink); line-height: 1.55; margin-bottom: 8px; }
.ex-schema { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.ex-schema.readonly { opacity: 0.55; }
.ex-schema-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ghost); margin-bottom: 10px; }
.ex-schema-fields { margin-bottom: 12px; }
.ex-thinking { display: flex; gap: 5px; padding: 6px 2px; }
.ex-thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: ex-blink 1s infinite; }
.ex-thinking span:nth-child(2) { animation-delay: 0.2s; }
.ex-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ex-blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.extract-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.extract-suggest .prompt-pill { background: var(--white); border: 1px solid var(--border); color: var(--ink-soft); }
.extract-suggest .prompt-pill:hover { background: rgba(26,63,219,0.06); border-color: var(--accent); color: var(--accent); }
.extract-input { display: flex; gap: 8px; }
.extract-input input { flex: 1; min-width: 0; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; font-family: var(--font); font-size: 14px; color: var(--ink); }
.extract-input input:focus { border-color: var(--accent); outline: none; }
.extract-input input::placeholder { color: var(--ghost); }
.extract-input input:disabled { opacity: 0.6; }
.extract-input button { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.extract-input button:hover { opacity: 0.92; }
.extract-input button:disabled { opacity: 0.45; cursor: not-allowed; }
/* Results span the full step width (below the two-column area); collapse when empty. */
#extract > .extract-results { padding: 0; margin-top: 32px; }
#extract > .extract-results:empty { margin-top: 0; }
.schema-hint { font-size: 11.5px; color: var(--ghost); font-style: italic; margin-top: 8px; text-align: center; }
.extract-results { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.fx-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--white); }
.fx-row.approved { border-color: rgba(26,143,74,0.4); }
.fx-row.rejected { border-color: rgba(200,40,60,0.35); opacity: 0.7; }
.fx-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fx-name { font-size: 13px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.fx-type { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent); background: rgba(26,63,219,0.08); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.fx-value { font-size: 14px; color: var(--ink); margin-top: 6px; line-height: 1.5; }
.fx-value.fx-notfound { color: var(--ghost); font-style: italic; }
.fx-sources { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.fx-actions { margin-top: 10px; display: flex; gap: 8px; }
.fx-actions button { font-family: var(--font); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); background: var(--white); color: var(--ink-soft); }
.fx-actions .fx-approve:hover { background: #1A8F4A; border-color: #1A8F4A; color: #fff; }
.fx-actions .fx-reject:hover { background: #B82A3E; border-color: #B82A3E; color: #fff; }
.doc-sheet .doc-img, .doc-sheet .doc-embed { width: 100%; display: block; border-radius: 8px; }
.doc-sheet .doc-embed { height: 460px; }
.doc-sheet .doc-page { margin-bottom: 10px; box-shadow: 0 1px 5px rgba(10,10,15,0.12); border: 1px solid var(--border); }
.doc-sheet .doc-page:last-child { margin-bottom: 0; }
.doc-sheet .doc-text { font-family: 'SFMono-Regular', ui-monospace, monospace; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); margin: 0; }
.doc-sheet-meta { padding: 8px; }
.doc-sheet-name { font-weight: 700; color: var(--ink); font-size: 14px; margin-bottom: 8px; }
.doc-sheet-note { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }

/* ── Live-sandbox: pre-loaded demo sets (Step 1 alternative to uploading) ── */
.demo-sets-wrap { margin-bottom: 22px; }
.demo-sets-head { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 12px; }
.demo-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.demo-set-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; font-family: var(--font);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.demo-set-card:hover:not(.disabled) { border-color: var(--accent); transform: translateY(-1px); }
.demo-set-card .ds-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.demo-set-card .ds-desc { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.demo-set-card .ds-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.3px; color: var(--accent); margin-top: 2px; }
.demo-set-card.disabled { cursor: not-allowed; opacity: 0.62; }
.demo-set-card.disabled:hover { border-color: var(--border); transform: none; }
.demo-set-card.disabled .ds-tag { color: var(--ghost); }
/* Active source card (Upload-your-own or a set) */
.demo-set-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: rgba(26,63,219,0.04); }
.demo-set-card.active .ds-tag { color: var(--accent); }
.demo-set-card.source-upload .ds-label::before { content: "↥ "; }
.demo-set-card.source-examples .ds-label::before { content: "▦ "; }
/* The pre-loaded sets, revealed as a labeled inset panel under "Explore
   examples" so they read as a subset of that choice, not siblings of it. */
.demo-examples {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 16px;
}
.demo-examples-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--ghost); margin-bottom: 12px;
}
.demo-examples-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px;
}
.demo-examples .demo-set-card { background: var(--white); }
/* When a pre-loaded set is active, hide the dropzone and let the file list span full width */
/* In examples mode there's nothing to upload — hide the stage, keep the doc groups. */
.upload-shell.no-upload #upload-stage { display: none; }

/* ── Live-sandbox: extraction results table (one row per document) ── */
.extract-results { padding: 0 28px 26px; }
.extract-results-empty { font-size: 12px; color: var(--ghost); font-style: italic; padding: 6px 0 18px; }
.extract-results .rt-title { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ghost); margin: 4px 0 10px; }
.extract-results .rt-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.extract-results .rt-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.results-table { border-collapse: collapse; font-size: 12.5px; table-layout: fixed; min-width: 100%; }
.results-table th, .results-table td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
/* Readable, fixed column widths — values wrap inside the column; the table scrolls
   horizontally when there are many fields rather than crushing each column. */
.results-table th { width: 220px; min-width: 220px; }
.results-table th.rt-doc { width: 190px; min-width: 190px; }
.results-table thead th { background: var(--white); font-weight: 700; color: var(--ink); white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.results-table th .rt-type { display: block; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); }
/* The Document column stays visible while scrolling sideways. */
.results-table .rt-doc { position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 600; color: var(--ink); }
.results-table thead th.rt-doc { z-index: 3; background: var(--white); }
.results-table tbody tr:hover .rt-doc { background: #f3f5fb; }
/* Clamp tall cells (long text / long lists) so a big value scrolls inside its cell
   instead of ballooning the whole row. */
.results-table .rt-cell { max-height: 150px; overflow: auto; white-space: pre-wrap; word-break: break-word; line-height: 1.45; color: var(--ink); }
.results-table .rt-doc .rt-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-height: none; }
.results-table .rt-doc .rt-doc-open { cursor: pointer; }
.results-table .rt-doc .rt-doc-open:hover { color: var(--accent); text-decoration: underline; }
.results-table .rt-empty { color: var(--ghost); font-style: italic; font-size: 11px; }
.results-table .rt-doc-open .rt-empty { cursor: pointer; }
.results-table .rt-doc-open:hover .rt-empty { color: var(--accent); }
.results-table .rt-list { margin: 0; padding-left: 16px; }
.results-table .rt-list li { margin-bottom: 3px; }
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table tbody tr:hover { background: rgba(26,63,219,0.03); }
/* Clickable value cells (interactive extract table) → highlight source on click. */
.results-table .rt-cell-src { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; transition: background 0.15s, box-shadow 0.15s; }
.results-table .rt-cell-src:hover { background: rgba(26,63,219,0.08); }
.results-table .rt-cell-src.active { background: rgba(26,63,219,0.14); box-shadow: inset 0 0 0 1px rgba(26,63,219,0.45); }

/* ── Extract workbench: source viewer (left) + results table (right) ── */
.ex-workbench { position: relative; display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 16px; align-items: start; }
/* Red dotted connector: active cell → its highlighted spot on the page. */
.ex-connector { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.ex-connector line { stroke: #D1342B; stroke-width: 1.6; stroke-dasharray: 2 4; stroke-linecap: round; }
.ex-connector circle { fill: #D1342B; }
.ex-viewer {
  position: relative; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  max-height: 640px; overflow: auto;
}
.ex-viewer .cv-hint { font-size: 12px; color: var(--ink-soft); font-style: italic; line-height: 1.5; margin-bottom: 10px; }
/* Expand button — sticks to the bottom-right of the viewer's visible scroll area */
.ev-expand { position: sticky; top: 8px; margin-left: auto; z-index: 10; background: rgba(255,255,255,0.92); border: 1px solid var(--border); border-radius: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-soft); transition: color 0.15s, border-color 0.15s, background 0.15s; backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(0,0,0,0.10); padding: 0; }
.ev-expand svg { width: 18px; height: 18px; display: block; }
.ev-expand:hover { color: var(--ink); border-color: var(--ink-soft); background: var(--white); }
/* Expanded-view modal */
.ev-expanded-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1200; display: none; align-items: center; justify-content: center; }
.ev-expanded-overlay.open { display: flex; }
.ev-expanded-modal { background: var(--white); border-radius: 16px; width: min(92vw, 860px); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.28); position: relative; }
.ev-expanded-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ghost); cursor: pointer; z-index: 1; padding: 0 4px; }
.ev-expanded-close:hover { color: var(--ink); }
.ev-expanded-content { flex: 1; overflow: auto; padding: 20px 24px 24px; position: relative; }
.ev-expanded-doc .chat-viewer-head { font-size: 11px; }
.ev-expanded-doc .cv-claim { font-size: 13px; padding: 9px 13px; margin-bottom: 14px; }
.ev-expanded-doc .cv-img { border-radius: 8px; }
.ev-expanded-connector { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ev-expanded-connector line { stroke: #e03; stroke-width: 1.5; stroke-dasharray: 5 3; fill: none; }
.ev-expanded-connector circle { fill: #e03; }
.ex-table { min-width: 0; }
.ex-table .rt-scroll { max-height: 640px; overflow: auto; }
@media (max-width: 860px) {
  .ex-workbench { grid-template-columns: 1fr; }
  .ex-viewer { position: static; max-height: 460px; }
  .ex-connector { display: none; }
}

/* "Chat with your extraction" CTA below the results — advances to the Interact step. */
.ex-chat-cta {
  display: block; margin: 18px auto 2px; padding: 13px 26px;
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.ex-chat-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,63,219,0.28); opacity: 0.96; }
.ex-chat-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Demo-loaded CTA — appears under the example grid once a set is selected */
.demo-loaded-cta { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.dlc-check { font-size: 15px; color: #2a9d5c; flex-shrink: 0; }
.dlc-msg { font-size: 13px; color: var(--ink-soft); flex: 1; }
.dlc-msg strong { color: var(--ink); font-weight: 600; }
.dlc-btn { flex-shrink: 0; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.15s, transform 0.15s; }
.dlc-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Auto-extraction status line (replaces the old run/skip buttons). */
.ex-auto-status { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
.ex-auto-status.busy { color: var(--accent); font-weight: 600; }
.ex-auto-dot { width: 13px; height: 13px; flex-shrink: 0; border-radius: 50%; border: 2px solid rgba(26,63,219,0.25); border-top-color: var(--accent); animation: doc-spin 0.7s linear infinite; }

/* ── Live-sandbox: "View" button on a file row + document viewer lightbox ── */
.file-row .file-view {
  margin-left: auto; align-self: center; flex-shrink: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 12px; font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--accent); cursor: pointer; transition: all 0.16s;
}
.file-row .file-view:hover { border-color: var(--accent); background: rgba(26,63,219,0.06); }
.doc-viewer-overlay { position: fixed; inset: 0; background: rgba(8,8,14,0.62); display: none; align-items: center; justify-content: center; z-index: 300; padding: 24px; }
.doc-viewer-overlay.open { display: flex; }
.doc-viewer { background: var(--surface); border-radius: 14px; width: min(840px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.doc-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.doc-viewer-head .dv-title { flex: 1 1 auto; min-width: 0; font-weight: 700; color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-viewer-head .dv-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.doc-viewer-head .dv-prev, .doc-viewer-head .dv-next {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  width: 28px; height: 28px; font-size: 16px; line-height: 1; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.doc-viewer-head .dv-prev:hover:not(:disabled), .doc-viewer-head .dv-next:hover:not(:disabled) {
  border-color: var(--accent); color: var(--accent); background: rgba(26,63,219,0.06);
}
.doc-viewer-head .dv-prev:disabled, .doc-viewer-head .dv-next:disabled { opacity: 0.35; cursor: not-allowed; }
.doc-viewer-head .dv-count { font-size: 12px; font-weight: 600; color: var(--ink-soft); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.doc-viewer-head .dv-download { background: none; border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px; font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; flex-shrink: 0; transition: background 0.15s, color 0.15s; }
.doc-viewer-head .dv-download:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.doc-viewer-head .dv-close { background: transparent; border: 0; font-size: 24px; line-height: 1; color: var(--ghost); cursor: pointer; padding: 0 4px; flex-shrink: 0; }
.doc-viewer-head .dv-close:hover { color: var(--ink); }
.doc-viewer-body { padding: 16px 18px; overflow: auto; }
.doc-viewer-body .doc-img { width: 100%; display: block; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; }
.doc-viewer-body .doc-embed { width: 100%; height: 70vh; border: 0; }
.doc-viewer-body .doc-text { white-space: pre-wrap; word-break: break-word; font-family: 'SFMono-Regular', ui-monospace, monospace; font-size: 12px; line-height: 1.55; color: var(--ink-soft); }
.doc-viewer-body .doc-sheet-empty { color: var(--ghost); font-style: italic; }

/* ── Disabled-state hint banner (when no files yet) ───────────────── */
.gate {
  background: rgba(26,63,219,0.06);
  border: 1px dashed rgba(26,63,219,0.32);
  border-radius: 12px; padding: 18px 22px;
  font-size: 13.5px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 14px;
  line-height: 1.5;
}
.step-section.dark .gate {
  background: rgba(100,140,255,0.08);
  border-color: rgba(100,140,255,0.32);
  color: rgba(255,255,255,0.75);
}
.gate .arrow { font-size: 18px; color: var(--accent); flex-shrink: 0; }
.step-section.dark .gate .arrow { color: rgba(160,190,255,0.95); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .demo-hero { grid-template-columns: 1fr; padding: 56px 28px 64px; gap: 36px; }
  .demo-hero--solo { padding: 48px 28px 56px; }
  .demo-hero h1 { font-size: 38px; letter-spacing: -1.4px; }
  .trust-strip { padding: 0 28px 24px; }
  .trust-strip-inner { grid-template-columns: 1fr 1fr; }
  .trust-cell { border-right: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
  .trust-cell:nth-child(2n) { border-right: 0; }
  .trust-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .toast-host { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  .step-section { padding: 56px 28px; }
  .step-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .step-title { font-size: 24px; }
  .step-sub { text-align: left; max-width: 100%; }
  .split-grid { grid-template-columns: 1fr; gap: 28px; }
  .upload-shell, .extract-body {
    grid-template-columns: 1fr;
  }
  .extract-body .doc-preview { border-right: 0; border-bottom: 1px solid var(--border); }
  /* On narrow screens the reference panel covers the chat (no push) and the connector is hidden. */
  .chat-ref-panel { width: 100%; border-radius: 16px; border-left: 0; }
  .chat-stage.ref-open .chat-main { margin-right: 0; }
  .chat-connector { display: none; }
  .closer { padding: 56px 28px; }
  .closer h2 { font-size: 26px; letter-spacing: -0.7px; }
}

/* ── Interact step · source chips ────────────────────────────── */
.chat-sources {
  margin-top: 6px;
  padding: 12px 14px 10px;
  background: var(--surface, #f5f5f7);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 12px;
}
.chat-sources-label {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint, #999);
  margin-bottom: 8px;
}
.chat-sources-items { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-src-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--white, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.14s, border-color 0.14s;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
}
.chat-src-chip:hover { background: rgba(100,140,255,0.07); border-color: rgba(100,140,255,0.35); }
.chat-src-chip span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.csrc-icon { flex-shrink: 0; opacity: 0.55; }
.chat-src-chip:hover .csrc-icon { opacity: 0.85; }
.chat-src-chip--table { color: var(--accent); }
.chat-src-chip--table .csrc-icon { opacity: 0.7; }
.chat-cta {
  margin: 24px 0 8px;
  padding: 28px 28px 24px;
  background: linear-gradient(145deg, rgba(100,140,255,0.15) 0%, rgba(100,140,255,0.06) 100%);
  border: 1px solid rgba(100,140,255,0.35);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.chat-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100,140,255,0.6), transparent);
  pointer-events: none;
}
.chat-cta-body { position: relative; }
.chat-cta-eyebrow {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(120,160,255,0.9);
  margin-bottom: 10px;
}
.chat-cta-title {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -0.3px;
}
.chat-cta-sub {
  font-family: var(--font);
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  margin: 0 0 18px;
  line-height: 1.6;
  max-width: 540px;
}
.chat-cta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}
.chat-cta-pill {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(100,140,255,0.18);
  border: 1px solid rgba(100,140,255,0.3);
  color: rgba(140,180,255,0.95);
  letter-spacing: 0.1px;
}
.chat-cta-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.chat-cta-btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.1px;
}
.chat-cta-btn:hover { background: #2850f0; transform: translateY(-1px); }
.chat-cta-link {
  font-family: var(--font);
  font-size: 13px;
  color: rgba(140,180,255,0.8);
  text-decoration: none;
  transition: color 0.15s;
}
.chat-cta-link:hover { color: rgba(160,200,255,1); text-decoration: underline; }
.chat-no-extract-note {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface, #f5f5f7);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 10px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--ink-faint, #999);
  line-height: 1.5;
}
.chat-no-extract-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.chat-no-extract-link:hover { text-decoration: underline; }
