/* =====================================================================
   Xentry app UI — Kraken tokens and components, taken from
   internal-marketing/frontend/src/styles.css. Scoped to .app-ui so the
   marketing shell (style.css) keeps its own look.
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.app-ui {
  --c-bg: #f6f6f8; --c-card: #fff; --c-ink: #101114; --c-mut: #686b82; --c-faint: #7b7e92; --c-faint-soft: #9497a9;
  --c-line: #dedee5; --c-line-strong: #ced0d9; --c-tint: #f6f6f8; --c-tint-strong: #ededf0; --c-sunken: #fcfcfd;
  --c-accent: #7132f5; --c-accent-ink: #5741d8; --c-accent-deep: #5b1ecf;
  --c-accent-soft: rgba(133, 91, 251, .16); --c-accent-softer: rgba(133, 91, 251, .08);
  --c-green: #149e61; --c-green-soft: rgba(20, 158, 97, .16); --c-green-ink: #026b3f;
  --c-red: #e5484d; --c-red-soft: #fdecec;
  --c-sh: rgba(16, 24, 40, .04) 0 1px 4px; --c-sh-lg: rgba(0, 0, 0, .03) 0 4px 24px;
  /* Remap the marketing tokens inside app surfaces, so shared rules read as the product */
  --ink: var(--c-ink); --muted: var(--c-mut); --faint: var(--c-faint); --line: var(--c-line);
  --soft: var(--c-tint-strong); --tint: var(--c-tint); --accent-tint: var(--c-accent-soft);
  --green-bg: var(--c-green-soft); --green-fg: var(--c-green-ink);
  --font-display: var(--font-app);
  font-family: var(--font-app); color: var(--c-ink); font-variant-numeric: tabular-nums;
}
.app-ui .chip { border-radius: 6px; }
.app-ui .chip--accent { background: var(--c-accent-soft); color: var(--c-accent-ink); }

/* ---------- Sidebar ---------- */
.c-sidebar { width: 232px; flex: none; background: #fff; border-right: 1px solid var(--c-line); display: flex; flex-direction: column; padding: 0 12px 14px; }
/* No logo row: the site nav right above already shows the brand */
.c-sidebar { padding-top: 14px; }
.c-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-app); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--c-ink); }
.c-logo__mark { width: 24px; height: 24px; flex: none; display: block; }
.c-sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.c-nav { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--c-mut); font-weight: 500; font-size: 13.5px; }
.c-nav .i { width: 17px; height: 17px; }
.c-nav.is-active { background: var(--c-accent-soft); color: var(--c-accent-ink); font-weight: 600; }
.c-nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-faint); padding: 14px 10px 6px; }
.c-recent { padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--c-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-recent.is-on { background: var(--c-tint); color: var(--c-ink); }
.c-user { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--c-line); margin: 0 -12px -14px; padding: 12px 20px; }
.c-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.c-user__txt { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; }
.c-user__txt em { font-style: normal; color: var(--c-faint); font-size: 12px; }

/* ---------- Main + topbar ---------- */
.c-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--c-bg); }
.c-topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--c-line); font-size: 13px; color: var(--c-mut); }
.c-crumb { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.c-crumb span:first-child { color: var(--c-ink); font-weight: 500; }
.c-faint { color: var(--c-faint); }
.c-src { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--c-line); border-radius: 8px; font-size: 12px; color: var(--c-mut); }
.c-src .i { width: 14px; height: 14px; }
.c-body { flex: 1; padding: clamp(20px, 3vw, 32px) clamp(20px, 5vw, 64px); display: flex; flex-direction: column; gap: 18px; }
.c-asked { align-self: flex-end; max-width: 80%; background: var(--c-accent); color: #fff; padding: 11px 16px; border-radius: 16px 16px 4px 16px; font-size: clamp(14px, 1.3vw, 16px); font-weight: 500; }

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

.c-tb-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--c-line);
  background: #fff; font-family: var(--font-app); font-size: 12.5px; font-weight: 500; color: var(--c-ink); white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, transform var(--dur-press) var(--ease-out);
}
.c-tb-btn:hover { border-color: var(--c-line-strong); background: var(--c-sunken); }
.c-tb-btn .i { width: 14px; height: 14px; color: var(--c-mut); }

.c-tb-btn[aria-expanded="true"] { border-color: var(--c-line-strong); background: var(--c-tint); }

.c-tb-btn:active, .c-actions button:active, .c-suggest button:not([disabled]):active { transform: scale(0.97); }

/* ---------- Insight card: four zones (InsightCard.tsx / TrustFooter.tsx) ---------- */
.c-card {
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: 12px; box-shadow: var(--c-sh);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.c-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.c-card__title { margin: 0; font-size: 15.5px; font-weight: 650; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.c-card__def { font-size: 12.5px; color: var(--c-mut); }
.c-card__mark { min-height: 150px; display: flex; flex-direction: column; justify-content: center; transition: opacity 150ms ease; }
.c-card[data-refreshing] .c-card__mark { opacity: .6; }
.c-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 10px; border-top: 1px solid var(--c-line); font-size: 11.5px; color: var(--c-faint); }
.c-prov { font-size: 11px; color: var(--c-faint); }
.c-fresh { display: inline-flex; align-items: center; gap: 4px; color: var(--c-faint); }

.c-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.c-actions button, .c-actions a {
  display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--c-line); border-radius: 8px;
  padding: 3px 9px; font-family: var(--font-app); font-size: 11.5px; color: var(--c-mut);
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform var(--dur-press) var(--ease-out);
}
.c-actions button:hover, .c-actions a:hover { color: var(--c-ink); border-color: var(--c-faint); }
.c-actions button[aria-expanded="true"] { color: var(--c-accent-ink); border-color: var(--c-accent); background: var(--c-accent-softer); }
.c-actions .i { width: 12px; height: 12px; }
.c-actions button[disabled] { opacity: .5; cursor: default; }
.c-card--hero .c-card__mark { min-height: 0; padding: 6px 0 4px; }
.c-card .rows { margin-top: 0; }
.c-grid > .c-card { container: card / inline-size; }

/* The card is the container, not the viewport: a narrow card wraps its head and
   drops the date column from source rows instead of squeezing them. */
@container card (max-width: 380px) {
  .c-card__head { flex-wrap: wrap; row-gap: 8px; }
  .c-card__title { flex: 1 1 100%; white-space: normal; }

  .c-card .rows { font-size: 12px; }
  .c-card .rows__head, .c-card .row { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, .9fr); gap: 8px; padding: 8px 10px; }
  .c-card .rows__head > :nth-child(2), .c-card .row > :nth-child(2) { display: none; }
  .c-card .rows__foot { padding: 8px 10px; }
}

.c-stat { font-size: clamp(28px, 16cqi, 44px); font-weight: 700; color: var(--c-accent); line-height: 1.05; letter-spacing: -0.02em; }
.c-stat-label { margin-top: 6px; color: var(--c-mut); text-transform: uppercase; font-size: 11.5px; letter-spacing: .06em; font-weight: 500; }
.c-stat-sub { margin-top: 10px; }
.c-plain { margin: 12px 0 0; font-size: 13px; color: var(--c-mut); line-height: 1.55; }

/* ---------- Viz ---------- */
.c-bars { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; }
.c-bars__row { display: grid; grid-template-columns: minmax(70px, 96px) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.c-bars__row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-bars__track { height: 14px; background: color-mix(in srgb, var(--c-accent) 6%, transparent); border-radius: 4px; overflow: hidden; }
.c-bars__fill { display: block; height: 100%; border-radius: 4px; background: var(--c-accent); }
.c-bars__row > span:last-child { font-weight: 600; text-align: right; }
.c-line svg { display: block; width: 100%; height: 120px; overflow: visible; }
.c-line__grid { stroke: color-mix(in srgb, var(--c-accent) 10%, var(--c-line)); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-line__area { fill: color-mix(in srgb, var(--c-accent) 10%, transparent); }
.c-line__path { fill: none; stroke: var(--c-accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.c-line__x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--c-faint); }
.c-line__legend { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 8px; color: var(--c-mut); }
.c-line__legend b { color: var(--c-ink); }
.c-cols { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 8px; }
.c-cols__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--c-faint); }
.c-cols__bar { width: 100%; max-width: 30px; border-radius: 4px 4px 2px 2px; background: var(--c-accent); }
.c-cols__col:nth-child(n+6) .c-cols__bar { background: var(--c-green); }
.c-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.c-table th { text-align: left; font-weight: 500; color: var(--c-mut); padding: 6px 8px; background: var(--c-tint); }
.c-table th:first-child { border-radius: 6px 0 0 6px; }
.c-table th:last-child { border-radius: 0 6px 6px 0; }
.c-table td { padding: 7px 8px; border-bottom: 1px solid var(--c-line); }
.c-table tr:last-child td { border-bottom: none; }
.c-table .ta-r { text-align: right; }

/* ---------- Composer ---------- */
.c-composer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; padding: 8px 8px 8px 16px; box-shadow: var(--c-sh); }

.c-send { width: 34px; height: 34px; flex: none; border-radius: 50%; border: none; background: var(--c-accent); color: #fff; display: grid; place-items: center; transition: background-color 150ms ease, transform var(--dur-press) var(--ease-out); }
.c-send:hover { background: var(--c-accent-ink); }
.c-send:active { transform: scale(0.94); }
.c-send[disabled] { background: var(--c-line-strong); cursor: default; }
.c-send[disabled]:active { transform: none; }

/* =====================================================================
   Hero tour: one app window, three views (Ask, Dashboard, Automate).
   The window keeps one height, so switching views never moves the page.
   ===================================================================== */
.hero__app { height: clamp(600px, calc(100vh - 120px), 760px); }
.hero__app .c-main { position: relative; min-height: 0; }
.hero__app .hv { flex: 1; min-height: 0; overflow: hidden; }

.hero__app .hv--ask .c-thread { flex: 1; min-height: 0; max-height: none; }
button.c-nav { border: none; background: none; width: 100%; text-align: left; font-family: inherit; transition: background-color 150ms ease, color 150ms ease; }
button.c-nav:not(.is-active):hover { background: var(--c-tint); color: var(--c-ink); }

.hv-tabs { display: none; gap: 2px; padding: 3px; border-radius: 10px; background: var(--c-tint-strong); }
.hv-tabs button { border: none; background: none; padding: 5px 10px; border-radius: 7px; font-family: var(--font-app); font-size: 12.5px; font-weight: 500; color: var(--c-mut); }
.hv-tabs button.is-on { background: #fff; color: var(--c-ink); box-shadow: var(--c-sh); }

.hv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.hv-head > div { display: flex; flex-direction: column; min-width: 0; }
.hv-head b { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.hv-head em { font-style: normal; font-size: 12.5px; color: var(--c-mut); }

/* Dashboard view: cards land one by one; the bottom fades so a tall board never looks cut */
.hv--dash { -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent); mask-image: linear-gradient(180deg, #000 85%, transparent); }
.hv-grid .c-card { padding: 14px 16px; gap: 8px; }
.hv-grid .c-card__mark { min-height: 0; }
.hv-grid .c-card.is-new { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-softer); }
.hv-grid .c-card { transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out), border-color 400ms ease, box-shadow 400ms ease; }
.hv-grid .c-card.is-entering { opacity: 0; transform: translateY(14px) scale(.97); transition: none; }
.hv-grid .c-line svg { height: 96px; }

/* Automate view: six steps that light up in order */
.hv--auto { --amber: #b45309; --amber-soft: rgba(217, 119, 6, .14); }
.hv-flow { list-style: none; margin: auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; counter-reset: step; }
.hv-flow .flow-node { min-height: 72px; }
.hv-flow .flow-node.is-pending { opacity: .55; }
.hv-flow .flow-node--human { flex-wrap: wrap; }
.hv-log { margin: 0; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--c-line); font-size: 13px; color: var(--c-mut); }
.hv-log[data-state="running"] .flow__dot { background: var(--c-accent); }
.hv-log[data-state="waiting"] .flow__dot { background: #d97706; }
.hv-log[data-state="done"] .flow__dot { background: var(--c-green); }

/* The tour cursor reuses the Dashboard demo cursor, a size up, with a softer caption */
.hero__app .demo-cursor svg { width: 28px; height: 28px; margin: -4px 0 0 -6px; }
.hero__app .demo-cursor__tip {
  left: 26px; top: 28px; padding: 7px 12px; border-radius: 10px;
  background: rgba(40, 38, 54, 0.78); color: #f3f1fb; font-size: 13px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -12px rgba(16, 24, 60, 0.4);
}

/* Floating Request a demo: hidden until the pointer is over the window, then rises in */
.hv-cta {
  position: absolute; left: 50%; bottom: 22px; z-index: 26;
  padding: 13px 20px 13px 22px; border-radius: 999px; font-size: 16px; gap: 10px;
  box-shadow: 0 16px 36px -14px rgba(87, 40, 216, .65), 0 2px 6px rgba(16, 24, 60, .12);
  opacity: 0; pointer-events: none; transform: translate(-50%, 14px) scale(.96);
  transition: opacity 220ms var(--ease-out), transform 320ms var(--ease-out), background-color 150ms ease;
}
.hv-cta .i { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
.hv-cta:hover .i { transform: translateX(3px); }
.hv-cta:active { transform: translate(-50%, 0) scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .hero__app:hover .hv-cta { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
  /* Space kept clear for the button at all times, so nothing shifts when it appears */
  .hero__app .hv { padding-bottom: 84px; }
}
.hv-cta:focus-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .hv-cta, .hv-cta .i { transition: opacity 150ms ease; }
}
.hv-replay { font-size: 13px; white-space: nowrap; }
.hero__app .is-demo-press { transform: scale(.97); }

@media (max-width: 960px) {
  .hv-tabs { display: inline-flex; }
  .hero__app .c-crumb { display: none; }
  .hero__app .c-topbar { justify-content: space-between; }
}
@media (max-width: 760px) {
  .hv-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero__app { height: 600px; }
  .hero__app .c-topbar { padding: 0 12px; gap: 8px; }
  .hv-tabs button { padding: 5px 8px; }
  .hv-replay span { display: none; }
  .hv-flow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hv-flow .flow-node { min-height: 0; padding: 9px 12px; }
  .hv-flow .flow-node__icon { width: 28px; height: 28px; }
  .hv-head .c-tb-btn { padding: 6px 9px; }
}

/* =====================================================================
   Insight grid and guide cursor (used by the hero tour)
   ===================================================================== */

.c-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-content: start; }
/* Cards reflow by the board's own width, not the viewport:
   under 860px every card becomes a half (a clean 2×2, no orphan gaps); under 480px everything stacks. */
.c-grid { container: board / inline-size; }
.c-grid > .c-card { grid-column: span var(--span, 6); transition: opacity var(--dur-pop) var(--ease-out), transform var(--dur-pop) var(--ease-out), border-color 150ms ease, box-shadow 150ms ease; }

.c-grid > .c-card.is-entering { opacity: 0; transform: scale(0.96); transition: none; }

@container board (max-width: 860px) {
  .c-grid > .c-card:not([data-span="12"]) { grid-column: span 6; }
}
@container board (max-width: 480px) {
  .c-grid > .c-card[data-span] { grid-column: span 12; }
}
/* Guide cursor glides between targets (ease-in-out, it's on-screen movement) */
.demo-cursor {
  position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; opacity: 0;
  transition: transform 700ms var(--ease-in-out), opacity 200ms ease;
}
.demo-cursor.is-on { opacity: 1; }
.demo-cursor.is-instant { transition: opacity 200ms ease; }
.demo-cursor svg {
  display: block; width: 22px; height: 22px; margin: -3px 0 0 -5px; transform-origin: 5px 3px;
  fill: #16161a; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}
.demo-cursor::after {
  content: ''; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-accent); opacity: 0; transform: scale(.5);
}
.demo-cursor svg { position: relative; z-index: 2; transition: transform 160ms var(--ease-out); }

.demo-cursor.is-press svg { animation: demo-tap 260ms var(--ease-out); }

/* Guide caption that travels with the cursor */
.demo-cursor__tip {
  position: absolute; left: 20px; top: 22px; z-index: 3; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; background: #16161a; color: #fff;
  font-family: var(--font-app); font-size: 12.5px; font-weight: 500; line-height: 1.3;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35);
}
/* `left` snaps (no transition) when the caption shifts off an edge; only opacity/blur animate */
.demo-cursor__tip, .demo-cursor__tip.fx { transition: opacity 160ms var(--ease-out), filter 160ms var(--ease-out); }
.demo-cursor__tip.is-empty { display: none; }

.demo-cursor.is-press::after { animation: demo-ripple 450ms var(--ease-out); }
@keyframes demo-tap { 40% { transform: scale(.85); } }
@keyframes demo-ripple { from { opacity: .28; transform: scale(.5); } to { opacity: 0; transform: scale(1.4); } }
.dash .is-demo-press { transform: scale(.97); }

.demo-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; background: none; padding: 0; font: inherit; font-weight: 500;
  color: var(--accent); cursor: pointer; transition: transform var(--dur-press) var(--ease-out);
}
.demo-toggle:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .demo-toggle:hover { text-decoration: underline; text-underline-offset: 3px; } }

.spin { animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Side by side, the Ask panel spans the viewer's full height. contain: size stops its log from
   growing the viewer, so a long thread scrolls inside the panel instead. */

.c-suggest { display: flex; flex-direction: column; gap: 6px; }

.c-suggest button { text-align: left; border: 1px solid var(--c-line); background: #fff; border-radius: 10px; padding: 9px 12px; font-family: var(--font-app); font-size: 13px; color: var(--c-ink); transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform var(--dur-press) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .c-suggest button:hover:not([disabled]):not([aria-disabled="true"]) { border-color: var(--c-accent); background: var(--c-accent-softer); color: var(--c-accent-ink); }
}
.c-suggest button[disabled], .c-suggest button[aria-disabled="true"] { opacity: .55; cursor: default; }
.c-suggest button[aria-disabled="true"]:active { transform: none; }

/* Hero chat: scrolling thread, suggestion chips, clickable recents, live composer */
.c-thread { position: relative; display: flex; flex-direction: column; gap: 18px; max-height: min(540px, 72vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: -4px; padding: 4px; }
.c-thread .c-msg-ai__body { background: #fff; border: 1px solid var(--c-line); }
.c-suggest--chips { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.c-suggest--chips button { border-radius: 99px; padding: 7px 13px; font-size: 12.5px; font-weight: 500; color: var(--c-mut); box-shadow: var(--c-sh); }
.c-suggest--chips + .c-composer { margin-top: -6px; }
.c-thinking { align-items: center; font-size: 13px; color: var(--c-mut); transition-delay: 120ms; }
.c-thinking__dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.c-thinking__dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: c-think 900ms ease-in-out infinite; }
.c-thinking__dots i:nth-child(2) { animation-delay: 150ms; }
.c-thinking__dots i:nth-child(3) { animation-delay: 300ms; }
@keyframes c-think { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
button.c-recent { border: none; background: none; width: 100%; text-align: left; font-family: var(--font-app); transition: background-color 150ms ease, color 150ms ease, transform var(--dur-press) var(--ease-out); }
button.c-recent.is-on { background: var(--c-tint); }
button.c-recent:active:not([aria-disabled="true"]) { transform: scale(0.97); }
.c-recent[aria-disabled="true"] { cursor: default; }
.c-composer__input { flex: 1; min-width: 0; border: none; outline: none; background: none; padding: 6px 0; font-family: var(--font-app); font-size: 14px; color: var(--c-ink); }
.c-composer__input::placeholder { color: var(--c-faint-soft); }
.c-composer { transition: border-color 150ms ease, box-shadow 150ms ease; }
.c-composer:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-softer), var(--c-sh); }
.c-send[aria-disabled="true"] { background: var(--c-line-strong); cursor: default; }
.c-send[aria-disabled="true"]:active { transform: none; }
@media (hover: hover) and (pointer: fine) {
  button.c-recent:not(.is-on):not([aria-disabled="true"]):hover { background: var(--c-tint); color: var(--c-ink); }
}
@media (prefers-reduced-motion: reduce) {
  button.c-recent:active:not([aria-disabled="true"]) { transform: none; }
  .c-thinking { transition-delay: 0ms; }
  .c-thinking__dots i { animation: none; }
}

.c-msg-ai { display: flex; gap: 10px; align-items: flex-start; }
.c-msg-ai__avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--c-accent); color: #fff; display: grid; place-items: center; }
.c-msg-ai__avatar .i { width: 13px; height: 13px; }
.c-msg-ai__body { background: var(--c-bg); border-radius: 4px 16px 16px 16px; padding: 10px 13px; font-size: 13px; line-height: 1.55; min-width: 0; }
.c-msg-ai__body p { margin: 0; }

/* =====================================================================
   Workflow steps (the hero's Automate view)
   ===================================================================== */
a.c-nav { text-decoration: none; }

.au-state { display: inline-flex; align-items: center; gap: 5px; color: var(--c-ink); }
.au-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); transition: background-color 200ms ease; }
.au-state.is-active i { background: var(--c-green); }
.au-state .i { width: 12px; height: 12px; color: var(--c-faint); }

/* Run log pill */

.flow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-faint-soft); flex: none; transition: background-color 200ms ease; }

.flow-node {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: var(--c-sh);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform var(--dur-press) var(--ease-out);
}
button.flow-node { font-family: var(--font-app); color: inherit; text-align: left; }
button.flow-node:active { transform: scale(0.98); }
.flow-node--trigger { border-radius: 26px 12px 12px 26px; }
.flow-node__icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--c-tint-strong); color: var(--c-ink); }
.flow-node--trigger .flow-node__icon { border-radius: 50%; background: color-mix(in srgb, var(--brand, #5741d8) 12%, #fff); color: var(--brand, #5741d8); }
.flow-node--ai .flow-node__icon { background: var(--c-accent-soft); color: var(--c-accent-ink); }
.flow-node--human .flow-node__icon { background: var(--amber-soft); color: var(--amber); }
.flow-node__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.flow-node__txt b { font-size: 13px; font-weight: 600; }
.flow-node__txt em { font-style: normal; font-size: 12px; color: var(--c-mut); }
.flow-tag { font-style: normal; margin-left: 4px; padding: 1px 5px; border-radius: 4px; background: var(--c-accent-soft); color: var(--c-accent-ink); font-size: 10px; font-weight: 600; vertical-align: 1px; }
.flow-node__badge {
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-green); color: #fff; box-shadow: 0 0 0 2px #fff;
  opacity: 0; transform: scale(.9); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.flow-node__badge .i { width: 12px; height: 12px; stroke-width: 3; }
.flow-node::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 4px var(--c-accent-soft); opacity: 0; pointer-events: none; }
.flow-node.is-running { border-color: var(--c-accent); }
.flow-node.is-running::after { animation: flow-pulse 1s var(--ease-in-out) infinite; }
.flow-node.is-done { border-color: rgba(20, 158, 97, .45); }
.flow-node.is-done .flow-node__badge { opacity: 1; transform: none; }
.flow-node.is-waiting { border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
@keyframes flow-pulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.flow-approve {
  margin-left: auto; flex: none; border: none; padding: 6px 10px; border-radius: 8px; background: var(--c-ink); color: #fff;
  font-size: 12px; font-weight: 600; transition: transform var(--dur-press) var(--ease-out);
}
.flow-approve[hidden] { display: none; }
.flow-approve:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  .flow-node.is-running::after { animation: none; opacity: 1; }

  .flow-node__badge { transform: none; }

  button.flow-node:active, .flow-approve:active { transform: none !important; }
}

/* =====================================================================
   Motion helpers: crossfades, scroll reveals
   ===================================================================== */
.fx { transition: opacity 160ms var(--ease-out), filter 160ms var(--ease-out), transform 200ms var(--ease-out); }
.fx.fx-in { opacity: 0; filter: blur(2px); transform: translateY(var(--fx-y, 0px)); transition: none; }
.faq__a.fx.fx-in { --fx-y: -4px; filter: none; }

.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 50ms);
}

/* Ask section result card: the computed figure leads, the breakdown backs it, the AI's sentence explains it */

@keyframes shake { 20% { transform: translateX(-4px); } 50% { transform: translateX(3px); } 80% { transform: translateX(-2px); } }

/* ---------- Request a demo: decorative device mock ---------- */
.app-ui.modal__device { display: flex; background: var(--c-bg); }
.app-ui .md-side { width: 118px; flex: none; background: #fff; border-right: 1px solid var(--c-line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.app-ui .md-side .c-logo { font-size: 14px; margin: 0 0 12px 6px; }
.app-ui .md-side .c-logo__mark { width: 18px; height: 18px; }
.app-ui .md-side .c-nav { padding: 7px 8px; font-size: 11.5px; gap: 8px; }
.app-ui .md-side .c-nav .i { width: 13px; height: 13px; }
.app-ui .md-main { flex: 1; min-width: 0; padding: 14px; }
.app-ui .md-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.app-ui .md-card em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--c-ink); }
.app-ui .md-card b { font-size: 22px; font-weight: 700; color: var(--c-accent); letter-spacing: -0.02em; }
.app-ui .md-card .chip { font-size: 10px; padding: 2px 6px; }
.app-ui .md-def { font-size: 10px; color: var(--c-mut); }
.app-ui .md-bars { align-self: stretch; height: 96px; margin-top: 8px; display: flex; align-items: flex-end; gap: 10px; }
.app-ui .md-bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--c-accent), var(--c-accent-soft)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; }
  .js .reveal.is-in { transition: opacity 300ms ease; transition-delay: 0ms; }
  .modal, .c-grid > .c-card.is-entering, .fx.fx-in { transform: none; }
  .fx.fx-in { filter: none; }
  .nav--sticky, .nav--sticky.is-visible { transform: none; transition: opacity 200ms ease; }
  .nav--sticky { opacity: 0; pointer-events: none; }
  .nav--sticky.is-visible { opacity: 1; pointer-events: auto; }
  .btn:active, .c-tb-btn:active, .c-send:active, .c-actions button:active, .c-suggest button:active { transform: none; }
  .spin { animation: none; }
}

/* =====================================================================
   Responsive (app surfaces)
   ===================================================================== */
@media (max-width: 1080px) {
  .app-ui .md-side { display: none; }
}
@media (max-width: 960px) {
  .c-sidebar { display: none; }

  .dash { margin: 0; }
}
@media (max-width: 640px) {
  .c-src { display: none; }
  .c-body { padding: 16px; }
  .c-asked { max-width: 100%; }
}
