/* Lamy AI — shared stylesheet (home + legal pages) */

:root {
  color-scheme: dark;
  --bg: #07070d;
  --bg-2: #0c0c16;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eeeef5;
  --muted: #a3a3b8;
  --faint: #6f6f87;
  --accent: #a855f7;
  --accent-2: #6366f1;
  --accent-soft: rgba(168, 85, 247, 0.14);
  --grad: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  --radius: 18px;
  --max: 1160px;
  --gutter: 24px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 78% -120px, rgba(99, 102, 241, 0.22), transparent 70%),
    radial-gradient(900px 520px at 8% 0, rgba(168, 85, 247, 0.16), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

p { margin: 0 0 1em; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 7, 13, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px var(--border-strong), 0 4px 18px rgba(99, 102, 241, 0.35); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.94rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav .btn { margin-left: 4px; }

.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 0.9rem; color: var(--muted); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { color: var(--text); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 8px; display: grid; background: rgba(16, 16, 28, 0.96); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.menu-panel a { padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 0.95rem; }
.menu-panel a:hover { background: var(--surface-2); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-sm { padding: 9px 15px; font-size: 0.88rem; border-radius: 10px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px rgba(168, 85, 247, 0.32); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(168, 85, 247, 0.45); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.26); }

/* ---------- Shared section scaffolding ---------- */

section { padding: 104px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018) 18%, rgba(255, 255, 255, 0.018) 82%, transparent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #c4a5fb;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--grad); border-radius: 2px; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin: 14px 0 16px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Cards ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }
.card h3 { font-size: 1.14rem; margin: 18px 0 10px; }
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.card li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.95rem; }
.card li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 2px; background: var(--accent); border-radius: 2px; }
.card li strong { color: var(--text); font-weight: 600; }

.ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  color: #e9dcff;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.18);
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Hero ---------- */

.hero { padding: 84px 0 72px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.35rem, 5.2vw, 3.9rem); font-weight: 700; letter-spacing: -0.035em; margin: 20px 0 22px; }
.hero .lead { font-size: 1.17rem; color: var(--muted); max-width: 590px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--faint); font-size: 0.9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .i { width: 17px; height: 17px; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 0.85rem; color: var(--muted);
}
.pill b { white-space: nowrap; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: #d8bcff; font-weight: 600; font-size: 0.76rem; letter-spacing: 0.02em; }

.phones { position: relative; height: 600px; }
.phones::before {
  content: ""; position: absolute; inset: 12% 6% 6% 10%;
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.45), rgba(99, 102, 241, 0.22) 55%, transparent 75%);
  filter: blur(30px);
}
.phone {
  position: absolute; width: 268px;
  padding: 9px; border-radius: 44px;
  background: linear-gradient(160deg, #2a2a3a, #101018 40%, #1d1d2b);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.phone img { border-radius: 36px; width: 100%; height: auto; aspect-ratio: 1170 / 2532; object-fit: cover; }
.phone-back { right: 18px; top: 0; transform: rotate(5deg); opacity: 0.92; }
.phone-front { left: 6%; top: 46px; transform: rotate(-4deg); z-index: 2; }

/* ---------- Formats strip ---------- */

.strip { padding: 0 0 24px; }
.strip-inner { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding-top: 26px; padding-bottom: 26px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.strip-label { color: var(--faint); font-size: 0.86rem; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.86rem; }

/* ---------- Problem / why ---------- */

.why { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.why h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-top: 14px; }
.why-text p { color: var(--muted); font-size: 1.08rem; }
.why-text p strong { color: var(--text); font-weight: 600; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.compare .card { padding: 22px; }
.compare h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin-bottom: 12px; font-weight: 600; }
.compare .card.good { border-color: rgba(168, 85, 247, 0.38); background: linear-gradient(160deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.04)); }
.compare .card.good h4 { color: #d8bcff; }
.compare ul { margin-top: 0; }
.compare .card:not(.good) li::before { background: var(--faint); }

/* ---------- Showcase (screenshot + text) ---------- */

.showcase { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; margin-top: 72px; }
.showcase .phone { position: relative; margin: 0 auto; transform: none; width: 280px; }
.showcase h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 14px 0 16px; }
.showcase p { color: var(--muted); font-size: 1.05rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.stat { padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 0.88rem; }

/* ---------- AI agents ---------- */

.agent-card .tag { position: absolute; top: 24px; right: 24px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: #d8bcff; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); }

/* ---------- How it works ---------- */

.flow { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.flow li { position: relative; padding: 22px 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); counter-increment: step; }
.flow li::before {
  content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 0.85rem; margin-bottom: 14px;
}
.flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 36px; right: -15px; width: 16px; height: 2px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.8), rgba(99, 102, 241, 0.3));
}
.flow b { display: block; font-size: 1rem; margin-bottom: 6px; }
.flow span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; display: block; }

.principle { display: flex; gap: 18px; }
.principle .ico { flex: none; }
.principle h3 { margin: 2px 0 8px; }

/* ---------- Audiences ---------- */

.audience h3 { margin-top: 18px; }

/* ---------- Company ---------- */

.company { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.company-text h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin: 14px 0 20px; }
.company-text p { color: var(--muted); font-size: 1.06rem; }
.company-text p strong { color: var(--text); font-weight: 600; }
.facts { padding: 8px 26px; }
.facts dl { margin: 0; }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--faint); font-size: 0.9rem; }
.facts dd { margin: 0; font-weight: 500; font-size: 0.97rem; }
.facts a { text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: rgba(168, 85, 247, 0.6); text-underline-offset: 3px; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative; overflow: hidden; text-align: center;
  padding: 64px 32px; border-radius: 28px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background:
    radial-gradient(600px 260px at 50% 0, rgba(168, 85, 247, 0.28), transparent 70%),
    linear-gradient(160deg, rgba(99, 102, 241, 0.12), rgba(7, 7, 13, 0.4));
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 14px; }
.cta-band p { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto 30px; }
.cta-band .hero-cta { justify-content: center; margin: 0; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer p { color: var(--faint); font-size: 0.92rem; max-width: 320px; margin-top: 14px; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 14px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer ul a { color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.footer ul a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.86rem; }

/* ---------- Legal pages ---------- */

.doc-head { padding-top: 72px; padding-bottom: 40px; }
.doc-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); margin: 14px 0 14px; letter-spacing: -0.03em; }
.doc-head p { color: var(--muted); margin: 0; }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 40px; }
.toc { position: sticky; top: 96px; }
.toc h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 12px; font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 0.88rem; line-height: 1.4; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }

.legal { max-width: 760px; }
.legal .intro { padding: 26px 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 12px; }
.legal .intro h2 { font-size: 1.3rem; margin-bottom: 10px; }
.legal .intro p { color: var(--muted); margin: 0; }
.legal .section { padding: 36px 0 8px; border-bottom: 1px solid var(--border); }
.legal .section:last-of-type { border-bottom: 0; }
.legal h2 { font-size: 1.45rem; margin-bottom: 16px; }
.legal h3 { font-size: 1.06rem; margin: 24px 0 10px; color: var(--text); }
.legal p, .legal li { color: var(--muted); font-size: 0.99rem; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 7px; }
.legal li::marker { color: var(--accent); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: #d8bcff; text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: rgba(168, 85, 247, 0.55); text-underline-offset: 3px; }
.legal a:hover { text-decoration-color: #d8bcff; }
.legal .highlight-box, .legal .important-box, .legal .contact-box { padding: 18px 22px; border-radius: 14px; margin: 18px 0; color: var(--muted); }
.legal .highlight-box { border: 1px solid rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.08); }
.legal .important-box { border: 1px solid rgba(251, 191, 36, 0.32); background: rgba(251, 191, 36, 0.06); }
.legal .contact-box { border: 1px solid var(--border-strong); background: var(--surface); margin-top: 36px; padding: 26px 28px; }
.legal .contact-box h3 { margin-top: 0; font-size: 1.2rem; }
.legal .contact-box p { margin: 0 0 6px; }

/* ---------- Stats band ---------- */

.stats { padding: 8px 0 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats-grid div { padding: 26px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.stats-grid b { display: block; font-size: clamp(2.1rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-grid span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.94rem; line-height: 1.45; }

/* ---------- "Wait, it can do that?" ---------- */

.wow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.wow-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: transform 0.25s, border-color 0.25s, background 0.25s; }
.wow-card:hover { transform: translateY(-3px); border-color: rgba(168, 85, 247, 0.4); background: linear-gradient(160deg, rgba(168, 85, 247, 0.09), rgba(99, 102, 241, 0.03)); }
.wow-card .ico { width: 40px; height: 40px; border-radius: 11px; margin-bottom: 18px; }
.wow-card .ico .i { width: 20px; height: 20px; }
.wow-card p { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--muted); }
.wow-card p b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* ---------- Agent demo (illustration) ---------- */
/* Every panel is written in its final state. The JS adds .play to run the sequence;
   without JS, or with reduced motion, visitors simply see the finished result. */

.demo-section { padding-top: 40px; }
.demo { position: relative; isolation: isolate; max-width: 1120px; margin: 0 auto; }
.demo::before {
  content: ""; position: absolute; z-index: -1; left: 6%; right: 6%; top: 14%; bottom: 6%;
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.4), rgba(99, 102, 241, 0.16) 60%, transparent);
  filter: blur(48px); pointer-events: none;
}

.demo-tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.demo-tabs button {
  position: relative; overflow: hidden;
  font: inherit; font-size: 0.93rem; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: 999px;
  color: #ddd3f5;
  /* gradient border on unselected tabs, so they read as clickable buttons */
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.demo-tabs button:hover { color: #fff; background: linear-gradient(#17152b, #17152b) padding-box, var(--grad) border-box; box-shadow: 0 6px 20px rgba(168, 85, 247, 0.22); }
.demo-tabs button[aria-selected="true"] { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3); }
.tab-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(255, 255, 255, 0.75); border-radius: 3px; }
.t-short { display: none; }

.demo-window {
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(20, 20, 34, 0.94), rgba(12, 12, 22, 0.94));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.1);
}
.demo-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 18px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.demo-bar .dots { display: flex; gap: 6px; }
.demo-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.demo-file { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.replay {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 0.82rem; font-weight: 500; cursor: pointer;
  color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px;
}
.replay:hover { color: var(--text); border-color: var(--border-strong); }
.replay .i { width: 15px; height: 15px; }

.demo-panel { display: grid; grid-template-columns: 0.86fr 1.14fr; min-height: 430px; }
.demo-panel[hidden] { display: none; }

.demo-chat { padding: 28px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.bubble { align-self: flex-end; max-width: 94%; min-height: 1.5em; padding: 12px 15px; border-radius: 16px 16px 4px 16px; background: var(--grad); color: #fff; font-size: 0.94rem; line-height: 1.5; box-shadow: 0 8px 22px rgba(99, 102, 241, 0.25); }
.bubble.typing::after, .ai-out.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: currentColor; animation: caret 0.9s steps(1) infinite; }
.agent-label { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #c4a5fb; }
.agent-label .i { width: 16px; height: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.91rem; color: var(--muted); line-height: 1.45; }
.steps li::before { content: ""; flex: none; box-sizing: border-box; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: rgba(74, 222, 128, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%234ade80' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.demo-result { margin-top: auto; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.07); color: #bbf7d0; font-size: 0.88rem; font-weight: 500; }
.demo-result.pending { border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.08); color: #e9d5ff; }

.demo-art { padding: 28px; display: flex; flex-direction: column; justify-content: center; }

/* spreadsheet */
.sheet { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); transition: background 0.5s, color 0.3s; }
.sheet th:last-child, .sheet td:last-child { border-right: 0; }
.sheet tr:last-child td { border-bottom: 0; }
.sheet th { background: rgba(255, 255, 255, 0.05); color: var(--muted); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.sheet td.num { text-align: right; }
.sheet .col-new { color: #e9d5ff; font-weight: 600; background: rgba(168, 85, 247, 0.1); }
.sheet th.col-new { color: #d8bcff; }
.sheet tr.row-hl td { background: rgba(250, 204, 21, 0.1); }
.sheet tr.row-hl td.col-new { background: rgba(250, 204, 21, 0.16); color: #fde68a; }
.sheet td.flash { animation: cellFlash 0.7s ease; }

/* document */
.docpage { background: #f7f7fb; color: #23232f; border-radius: 12px; padding: 24px 26px; font-size: 0.94rem; line-height: 1.65; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.docpage h5 { margin: 0 0 10px; font-size: 1.04rem; color: #111; letter-spacing: -0.01em; }
.docpage p { margin: 0 0 10px; color: #3a3a48; }
.docpage p:last-child { margin: 0; }
.docpage del { color: #c2410c; background: rgba(239, 68, 68, 0.1); text-decoration: line-through; transition: color 0.4s, background 0.4s; }
.docpage ins { color: #15803d; background: rgba(34, 197, 94, 0.12); text-decoration: underline; text-decoration-style: solid; text-underline-offset: 3px; }
.docpage .settled del { display: none; }
.docpage .settled ins { color: inherit; background: none; text-decoration: none; }
.docpage .reverted ins { display: none; }
.docpage .reverted del { color: inherit; background: none; text-decoration: none; }
.rev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; transition: opacity 0.4s; }
.rev-actions span { color: var(--muted); font-size: 0.86rem; margin-right: auto; }
.mini-btn { font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
.mini-btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.mini-btn:hover { filter: brightness(1.12); }

/* slides */
.deck { display: grid; gap: 12px; }
.slide-stage { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4); }
/* dissolve: the incoming slide fades in on top while the outgoing one stays opaque underneath */
.slide-stage .slide { position: absolute; inset: 0; opacity: 0; z-index: 1; transition: opacity 0s linear 0.45s; }
.slide-stage .slide.is-current { opacity: 1; z-index: 2; transition: opacity 0.45s ease; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; padding: 0; cursor: pointer; border-radius: 7px; overflow: hidden; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; outline-offset: 2px; }
.thumb .slide { position: absolute; inset: 0; transition: opacity 0.35s; }
.thumb.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25); }

.slide { display: flex; flex-direction: column; padding: 7cqw 8cqw; background: #fff; color: #1b1b2b; text-align: left; font-family: var(--font); line-height: 1.3; }
.slide .k { font-size: 2cqw; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #7c3aed; margin-bottom: 2.4cqw; }
.slide h6 { margin: 0 0 3cqw; font-size: 5.4cqw; font-weight: 700; letter-spacing: -0.02em; color: #15152a; line-height: 1.12; }
.slide p { margin: 0; font-size: 2.5cqw; color: #4b4b5c; }
.slide .i { width: 4cqw; height: 4cqw; stroke-width: 2; }
.s-cover { justify-content: flex-end; background: linear-gradient(135deg, #6d28d9, #4f46e5 60%, #312e81); color: #fff; }
.s-cover .k { color: #e9d5ff; }
.s-cover h6 { color: #fff; font-size: 7.4cqw; max-width: 80%; }
.s-cover p { color: #e0e7ff; font-size: 2.9cqw; }
.s-cover .orb { position: absolute; right: -8cqw; top: -10cqw; width: 46cqw; height: 46cqw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.45), rgba(168, 85, 247, 0.15) 60%, transparent 70%); }
.s-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.6cqw; }
.s-list li { display: flex; gap: 2.4cqw; align-items: center; font-size: 2.7cqw; color: #2a2a3c; }
.s-list li b { flex: none; width: 1cqw; height: 4.4cqw; border-radius: 1cqw; background: linear-gradient(#a855f7, #6366f1); }
.s-cards .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6cqw; margin-top: auto; }
.s-cards .c { padding: 3cqw; border-radius: 2cqw; background: #f3f0ff; color: #2a2a3c; font-size: 2.3cqw; line-height: 1.35; }
.s-cards .c .i { color: #7c3aed; margin-bottom: 1.6cqw; display: block; }
.s-cards .c strong { display: block; font-size: 2.6cqw; margin-bottom: 0.8cqw; }
.s-time .line { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: auto; padding-top: 5cqw; }
.s-time .line::before { content: ""; position: absolute; left: 2cqw; right: 2cqw; top: 1.9cqw; height: 0.6cqw; border-radius: 1cqw; background: linear-gradient(90deg, #a855f7, #6366f1); }
.s-time .m { position: relative; font-size: 2.3cqw; color: #4b4b5c; }
.s-time .m::before { content: ""; position: absolute; left: 0; top: -4.4cqw; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: #fff; border: 0.8cqw solid #7c3aed; box-sizing: border-box; }
.s-time .m strong { display: block; font-size: 2.7cqw; color: #15152a; }
.s-goals .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; margin-top: auto; }
.s-goals .n { font-size: 8.6cqw; font-weight: 700; letter-spacing: -0.04em; line-height: 1; background: linear-gradient(135deg, #a855f7, #6366f1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.s-goals .row p { margin-top: 1.4cqw; font-size: 2.4cqw; }

/* notebook */
.notepage { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-strong); border-radius: 12px; padding: 24px 26px; font-size: 0.94rem; line-height: 1.6; }
.notepage h5 { margin: 0 0 10px; font-size: 1.05rem; letter-spacing: -0.01em; }
.notepage p { color: var(--muted); margin: 0 0 12px; }
.ai-menu { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.ai-menu span { font-size: 0.78rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--faint); }
.ai-menu span.on { color: #fff; border-color: transparent; background: var(--grad); }
.ai-out { border-left: 2px solid var(--accent); padding: 4px 0 4px 14px; color: #e9d5ff; white-space: pre-line; min-height: 7.4em; }
.note-actions { display: flex; gap: 8px; margin-top: 16px; transition: opacity 0.4s; }

.demo-note { text-align: center; color: var(--faint); font-size: 0.84rem; margin: 16px 0 0; }

/* sequence states (JS only) */
.play .steps li { opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; }
.play .steps li.shown { opacity: 1; transform: none; }
.play .steps li.pending::before { background: none; border: 2px solid rgba(168, 85, 247, 0.25); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.play .demo-result { opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s; }
.play .demo-result.shown { opacity: 1; transform: none; }
.play .sheet tr.row-hl:not(.on) td { background: transparent; }
.play .sheet tr.row-hl:not(.on) td.col-new { background: rgba(168, 85, 247, 0.1); color: #e9d5ff; }
.play .sheet td.col-new:not(.on), .play .sheet tr.row-hl td.col-new:not(.on) { color: transparent; }
.play #doc-par:not(.marks-on) del { color: inherit; background: none; text-decoration: none; }
.play #doc-par:not(.marks-on) ins { display: none; }
.play .rev-actions:not(.shown) { opacity: 0; pointer-events: none; }
.play .slide-stage.empty .slide { opacity: 0; }
.play .thumb:not(.built) .slide { opacity: 0; }
.play .note-actions:not(.shown) { opacity: 0; pointer-events: none; }

@keyframes cellFlash { from { background: rgba(168, 85, 247, 0.6); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes caret { 50% { opacity: 0; } }

/* AI Slides block (always visible, larger stage) */
.slides-demo { margin-top: 72px; }
.slides-head { text-align: center; max-width: 680px; margin: 0 auto 22px; }
.slides-head h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 10px; }
.slides-head p { margin: 0; color: var(--muted); font-size: 1.04rem; }
.demo-panel.wide-art { grid-template-columns: 0.72fr 1.28fr; min-height: 470px; }

/* ---------- AI that sees ---------- */
/* Same principle as the demo: final state by default, .vplay runs the sequence. */

.vision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vcard { display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); }
.vcard-head { display: flex; gap: 14px; align-items: flex-start; }
.vcard-head h3 { font-size: 1.15rem; margin: 2px 0 4px; }
.vcard-head p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.vreplay { margin-left: auto; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: none; color: var(--muted); cursor: pointer; }
.vreplay:hover { color: var(--text); border-color: var(--border-strong); }
.vreplay .i { width: 15px; height: 15px; }
.vstage { flex: 1; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; align-items: center; min-height: 250px; padding: 20px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); }
.vision-note { text-align: center; color: var(--faint); font-size: 0.84rem; margin: 18px 0 0; }

/* the "photo" being scanned */
.photo { position: relative; container-type: inline-size; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 5px solid #f5f3ee; transform: rotate(-2.5deg); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5); }
.photo.print { transform: rotate(2.5deg); }
.photo svg { display: block; width: 100%; height: 100%; }
.vf {
  position: absolute; inset: 9px; pointer-events: none; --c: rgba(168, 85, 247, 0.95);
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 16px no-repeat;
}
.scan { position: absolute; left: 0; right: 0; top: -35%; height: 35%; opacity: 0; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.4) 85%, rgba(216, 188, 255, 0.95)); }
.vplay.scanning .scan { opacity: 1; animation: scan 1.3s ease-in-out infinite; }

.paper { background: #f6f3ea repeating-linear-gradient(transparent 0 22px, rgba(80, 110, 200, 0.18) 22px 23px); }
.hand { padding: 16px 18px; font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; color: #25307a; line-height: 1.2; }
.hand small { display: block; font-size: 1.15rem; opacity: 0.8; }
.hand small { font-size: clamp(0.9rem, 8cqw, 1.2rem); }
.hand .eq { font-size: clamp(1.4rem, 15cqw, 2.3rem); margin-top: 12px; font-weight: 600; white-space: nowrap; }

.photo.print { aspect-ratio: auto; background: #f2efe8; padding: 10px 10px 18px; }
.ptable { width: 100%; border-collapse: collapse; font-family: "Courier New", Courier, monospace; font-size: 5.4cqw; color: #2a2a2a; }
.ptable th, .ptable td { border: 1px solid #a19c90; padding: 0.9cqw 1.6cqw; text-align: left; font-weight: 400; white-space: nowrap; }
.ptable th { font-weight: 700; }

/* outputs */
.msteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.msteps li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.msteps li span { color: var(--muted); font-size: 0.84rem; line-height: 1.35; }
.msteps li b { font-family: "Cambria Math", "STIX Two Math", Georgia, serif; font-size: 1.08rem; font-weight: 600; white-space: nowrap; }
.msteps li.final { border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.msteps li.final b { color: #bbf7d0; }

.ncard { display: grid; gap: 10px; }
.ndetect { font-size: 0.82rem; color: #d8bcff; }
.nkcal b { font-size: 2.3rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.nkcal span { color: var(--muted); margin-left: 6px; }
.bar { display: grid; grid-template-columns: 56px 1fr 42px; gap: 10px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.bar em { display: block; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: 8px; background: var(--grad); transition: width 0.9s ease; }
.bar b { color: var(--text); text-align: right; font-weight: 600; }
.nlog { font-size: 0.8rem; color: #bbf7d0; }

.vstage.qa { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; }
.qa .bubble { align-self: flex-end; }
.vcheck { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.vcheck::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; background: rgba(74, 222, 128, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%234ade80' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.answer { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.92rem; color: var(--muted); line-height: 1.5; }
.answer strong { color: var(--text); }
.passage { margin: 0; padding: 12px 14px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: rgba(168, 85, 247, 0.06); font-size: 0.86rem; color: var(--muted); line-height: 1.55; }
.passage mark { background: rgba(250, 204, 21, 0.22); color: #fde68a; padding: 0 2px; border-radius: 3px; }
.passage cite { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-style: normal; font-size: 0.78rem; color: #c4a5fb; }
.passage cite .i { width: 14px; height: 14px; }

.xcap { font-size: 0.8rem; color: #bbf7d0; margin-top: 8px; }
.xtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.84rem; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.xtable th, .xtable td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.xtable th { background: rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.xtable td.num, .xtable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.xtable tr:last-child td { border-bottom: 0; }

/* sequence states (JS only) */
[data-step] { transition: opacity 0.4s ease, transform 0.4s ease; }
.vplay [data-step]:not(.on) { opacity: 0; transform: translateY(6px); }
.vplay tr[data-step]:not(.on) { transform: none; }
.vplay .bar:not(.on) i { width: 0; }

@keyframes scan { to { top: 100%; } }

@media (max-width: 900px) {
  .vision-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .vcard { padding: 20px; }
  .vstage { grid-template-columns: 1fr; padding: 16px; }
  .vstage .photo { width: 100%; max-width: 260px; margin: 6px auto 4px; }
}

/* ---------- Document AI Search ---------- */

.rag-body { padding: 24px; }
.rag-query { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.04); font-size: 1.02rem; min-height: 50px; }
.rag-query .i { color: #c4a5fb; }
.rq-text.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: currentColor; animation: caret 0.9s steps(1) infinite; }
.rag-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; margin-top: 20px; align-items: start; }
.library { position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); }
.f { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 3px; background: rgba(255, 255, 255, 0.1); transition: opacity 0.5s, box-shadow 0.5s; }
.f::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; border-radius: 0 0 3px 3px; background: var(--fc); }
.f.pdf { --fc: rgba(239, 68, 68, 0.75); }
.f.doc { --fc: rgba(59, 130, 246, 0.8); }
.rag.filtered .library .f:not(.hit) { opacity: 0.16; }
.rag.filtered .library .f.hit { box-shadow: 0 0 0 2px #facc15, 0 0 16px rgba(250, 204, 21, 0.55); }
.rag.filtered .library .f.hit::before { content: attr(data-n); position: absolute; z-index: 1; top: -8px; right: -8px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: #facc15; color: #1a1a1a; font-size: 9px; font-weight: 700; font-style: normal; }
.rag.sweeping .library::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.4), transparent); animation: sweep 1.2s ease-in-out; }
.lib-cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 0.8rem; color: var(--faint); }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend .f { width: 10px; margin-left: 6px; }
.rag-status { margin-top: 14px; }
.passages { display: grid; gap: 10px; }
.psg { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.psg-top { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #d8bcff; font-weight: 500; }
.psg-top .num { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: #facc15; color: #1a1a1a; font-weight: 700; font-size: 0.72rem; }
.psg-top .score { margin-left: auto; flex: none; width: 56px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.psg-top .score i { display: block; height: 100%; width: var(--s); background: var(--grad); }
.psg small { display: block; margin: 3px 0 0 28px; color: var(--faint); font-size: 0.74rem; }
.psg p { margin: 6px 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.psg mark { background: rgba(250, 204, 21, 0.2); color: #fde68a; padding: 0 2px; border-radius: 3px; }
.rag-answer { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(168, 85, 247, 0.4); background: linear-gradient(160deg, rgba(168, 85, 247, 0.12), rgba(99, 102, 241, 0.04)); font-size: 0.95rem; color: var(--muted); line-height: 1.55; }
.rag-answer strong { color: var(--text); }
.rag-answer sup { margin-left: 2px; padding: 0 4px; border-radius: 4px; background: #facc15; color: #1a1a1a; font-size: 0.66rem; font-weight: 700; }

/* scanner card */
.photo.letter { background: #f7f5ef; }
.ltext { padding: 7cqw 8cqw; font-family: Georgia, "Times New Roman", serif; color: #2a2a2a; font-size: 6cqw; line-height: 1.45; }
.ltext b { display: block; font-weight: 400; margin-bottom: 2.5cqw; }
.ocr { display: grid; gap: 10px; }
.ocr-out { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.88rem; line-height: 1.55; color: var(--text); }
.ocr-out p { margin: 0 0 6px; }
.ocr-out p:last-child { margin: 0; }

@keyframes sweep { to { left: 100%; } }

@media (max-width: 900px) {
  .rag-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rag-body { padding: 16px; }
  .rag-query { font-size: 0.92rem; }
  .library { gap: 4px; padding: 10px; }
}

/* ---------- Tool suite ---------- */

.suite { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.suite-card { grid-column: span 2; padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.suite-card.wide { grid-column: span 3; }
.suite-card.ai { border-color: rgba(168, 85, 247, 0.4); background: linear-gradient(160deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.03)); }
.suite-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.suite-head h3 { font-size: 1.15rem; margin: 0; }
.suite-head .count { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: #d8bcff; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); white-space: nowrap; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.tools li { font-size: 0.93rem; color: var(--muted); line-height: 1.45; }
.tools li b { display: block; color: var(--text); font-weight: 600; font-size: 0.97rem; }
.suite-foot { margin-top: 26px; text-align: center; color: var(--faint); font-size: 0.92rem; }

@media (max-width: 1080px) {
  .wow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .suite-card, .suite-card.wide { grid-column: span 3; }
}

@media (max-width: 900px) {
  .demo-panel { grid-template-columns: 1fr; min-height: 0; }
  .demo-panel.wide-art { grid-template-columns: 1fr; min-height: 0; }
  .slides-demo { margin-top: 56px; }
  .demo-chat { border-right: 0; border-bottom: 1px solid var(--border); }
  .suite-card, .suite-card.wide { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .wow-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 10px; }
  .stats-grid div { padding: 18px 16px; }
  .demo-chat, .demo-art { padding: 18px; }
  .t-long { display: none; }
  .t-short { display: inline; }
  .demo-tabs { gap: 5px; }
  .demo-tabs button { padding: 9px 14px; font-size: 0.88rem; }
  .thumbs { gap: 5px; }
  .replay span { display: none; }
  .sheet { font-size: 0.8rem; }
  .sheet th, .sheet td { padding: 8px 7px; }
  .docpage, .notepage { padding: 18px; }
  .suite-card { padding: 22px; }
}

@media (max-width: 360px) {
  .demo-tabs button { padding: 8px 11px; font-size: 0.84rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-out.typing::after { animation: none; }
}

/* ---------- Reveal on scroll (only when JS is on) ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li::after { display: none; }
  .flow li:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  section { padding: 76px 0; }
  .nav-links, .nav .btn { display: none; }
  .menu { display: block; }
  .hero { padding: 56px 0 48px; }
  .hero-grid, .why, .showcase, .company { grid-template-columns: 1fr; gap: 44px; }
  .phones { height: 520px; max-width: 460px; margin: 0 auto; width: 100%; }
  .phone { width: 230px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .showcase .phone { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .grid-4, .compare, .stat-row, .flow { grid-template-columns: 1fr; }
  .phones { height: 440px; }
  .phone { width: 190px; padding: 7px; border-radius: 34px; }
  .phone img { border-radius: 28px; }
  .phone-front { left: 0; top: 40px; }
  .phone-back { right: 26px; }
  .card { padding: 22px; }
  .facts { padding: 4px 18px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .cta-band { padding: 48px 20px; border-radius: 22px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .pill-text { display: none; }
  .pill { padding-right: 8px; }
}
