/* Analytics uses the shared product layout; these styles are for its sample conversation, chapters and install tabs.
   Everything reads complete without motion: the conversation only plays under prefers-reduced-motion: no-preference. */
.an-page [data-tone="info"] { --tone: var(--globe-city); }
.an-page [data-tone="agent"] { --tone: var(--accent); }
.an-page [data-tone="warn"] { --tone: var(--agent); }
.an-page [data-tone="ok"] { --tone: var(--human); }
.an-page [data-tone="bad"] { --tone: var(--blown); }
.an-page [data-tone="muted"] { --tone: var(--bot); }
.an .win-bar { flex-wrap: wrap; height: auto; min-height: 44px; padding-block: 10px; }
.an .win-bar code { font-size: 0.75rem; }
.an-sub { font-size: 1.125rem; line-height: 1.6; color: var(--muted); max-width: 34rem; }
.an-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 0.8125rem/1.4 var(--sans); color: var(--accent); }
.an-eyebrow span { font: 500 0.75rem/1 var(--mono); padding: 4px 7px; border: 1px solid currentColor; border-radius: var(--r-pill); }

/* Hero: the overview screenshot under the copy. */
.an-hero .product-shot { max-width: 1080px; }

/* Protocols and runtimes */
.an-protocols { display: grid; justify-items: center; gap: 18px; padding-block: 8px 24px; text-align: center; }
.an-protocols ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 840px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.an-protocols li { display: grid; gap: 4px; padding: 20px 16px; }
.an-protocols li + li { border-left: 1px solid var(--line); }
.an-protocols b { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.03em; }
.an-protocols li span { font-size: 0.8125rem; color: var(--muted); }
.an-protocols p { margin: 0; font: 400 0.8125rem/1.6 var(--mono); color: var(--muted); }
.an-protocols p span { color: var(--accent); }

/* The sample conversation */
.an-demo .product-section-head { margin-inline: auto; text-align: center; }
.an-demo .product-section-head .an-sub { margin-inline: auto; }
.an-convo { position: relative; margin: 0 auto; max-width: 760px; text-align: left; }
.an-timeline { list-style: none; margin: 0; padding: 12px 0; }
.an-timeline li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 0 20px; }
.an-at, .an-ms span, .an-convo-foot span { white-space: nowrap; }
.an-at { padding-top: 12px; font: 400 0.75rem/1.5 var(--mono); color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.an-step { position: relative; min-width: 0; padding: 10px 0 14px 20px; border-left: 2px solid var(--line); }
.an-step::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--tone, var(--line-strong)); }
.an-timeline li:last-child .an-step { border-left-color: transparent; }
.an-timeline li[data-tone="ok"] .an-step::before { background: var(--tone); }
.an-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 0.875rem; }
.an-head code { font-size: 0.8rem; }
.an-head small { color: var(--muted); font-size: 0.8125rem; }
.an-dir { font: 500 0.6875rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.an-state { margin-left: auto; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--tone) 40%, var(--line)); background: color-mix(in srgb, var(--tone) 9%, transparent); color: var(--tone); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.an-msg { margin: 8px 0 0; padding: 8px 12px; max-width: 30rem; border: 1px solid var(--line); border-radius: 4px var(--r-md) var(--r-md) var(--r-md); background: var(--paper); font-size: 0.875rem; }
.an-ms { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font: 400 0.75rem/1 var(--mono); color: var(--muted); }
.an-bar { position: relative; width: 140px; height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.an-bar::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: inherit; background: var(--tone); }
.an-money { display: inline-block; margin: 8px 0 0; padding: 4px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--human) 10%, transparent); color: var(--human); font-size: 0.8125rem; font-weight: 600; }
.an-convo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--paper); font: 400 0.8125rem/1.4 var(--mono); color: var(--muted); }
.an-stamp { font-size: 0.9375rem; color: var(--human); transform: rotate(-4deg); }
.an-demo-note { margin: 16px auto 0; text-align: center; font-size: 0.8125rem; color: var(--muted); }

/* Chapters: a question, what answers it, and the screen. */
.an-stage { align-items: center; }
.an-text, .an-visual { min-width: 0; }
.an-chapter.flip .an-visual { order: -1; }
.an-chapter .product-shot { margin: 0; }
.an-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 4px; }
.an-points li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-weight: 500; }
.an-points li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.an-answer { display: flex; gap: 10px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.an-answer span { color: var(--accent); font-weight: 700; }

.an-outcomes { list-style: none; margin: 0; padding: 18px 20px; display: grid; gap: 14px; }
.an-outcomes li { display: grid; grid-template-columns: 128px minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 0.8125rem; color: var(--muted); }
.an-outcomes i { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.an-outcomes i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: inherit; background: var(--tone); }
.an-outcomes em { font-style: normal; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.an-subbar { border-top: 1px solid var(--line); }
.an-callers { list-style: none; margin: 0; padding: 6px 0; }
.an-callers li { display: grid; grid-template-columns: minmax(0, 1fr) auto 56px; gap: 12px; align-items: center; padding: 12px 20px; }
.an-callers li + li { border-top: 1px solid var(--line); }
.an-callers code { justify-self: start; font-size: 0.8rem; overflow-wrap: anywhere; }
.an-callers em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.an-proof { font-size: 0.75rem; font-weight: 600; padding: 3px 8px; border-radius: var(--r-pill); border: 1px dashed var(--line-strong); color: var(--muted); }
.an-proof[data-proof="strong"] { border: 1px solid color-mix(in srgb, var(--human) 40%, var(--line)); color: var(--human); background: color-mix(in srgb, var(--human) 8%, transparent); }

/* The six screens */
.an-screens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.an-screens li { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.an-screens .an-eyebrow { margin: 0; }
.an-screens h3 { font-size: 1.375rem; line-height: 1.2; margin: 0; }
.an-screens p { margin: 0; color: var(--muted); }

/* Install */
.an-setup-steps { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 4px; }
.an-setup-steps li { display: flex; align-items: center; gap: 14px; padding: 8px 0; font-weight: 500; }
.an-setup-steps p { margin: 0; min-width: 0; }
.an-setup-steps code { overflow-wrap: anywhere; }
.an-setup-steps span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--accent); font: 500 0.8125rem/1 var(--mono); }
.an-install { text-align: left; }
.an-tabs { display: flex; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: var(--paper); }
.an-tabs button { min-height: 44px; padding: 8px 16px; font: 500 0.875rem/1 var(--sans); color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer; transition: color .15s, background-color .15s; }
.an-tabs button:hover { color: var(--ink); }
.an-tabs button[aria-selected="true"] { color: var(--ink); background: var(--hover); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.an-tabs button:focus-visible, .an-code pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.an-pane { padding: 16px; }
.an-pane-note { margin: 0 0 12px; font-size: 0.875rem; color: var(--muted); }
.an-code { position: relative; }
/* site.css draws the code block and its labelled header (data-lang); the copy button sits in that header. */
.an-code pre { margin: 0; max-height: 360px; overflow: auto; }
.an-code code { display: block; font: 400 0.75rem/1.65 var(--mono); color: var(--ink); white-space: pre; }
.an-copy { position: absolute; top: 4px; right: 6px; z-index: 1; min-height: 24px; padding: 4px 10px; font: 500 0.75rem var(--sans); color: var(--muted); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; }
.an-copy:hover { color: var(--ink); background: var(--hover); }
.an-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.an-install-foot { margin: 14px 0 0; font-size: 0.875rem; color: var(--muted); }

/* One 12 s loop; each step arrives at its own moment (0.4 s, then every 1.1 s), and all leave together. */
@keyframes an-s0 { 0%, 3% { opacity: 0; transform: translateY(6px); } 6%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes an-s1 { 0%, 12% { opacity: 0; transform: translateY(6px); } 15%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes an-s2 { 0%, 21% { opacity: 0; transform: translateY(6px); } 24%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes an-s3 { 0%, 30% { opacity: 0; transform: translateY(6px); } 33%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes an-s4 { 0%, 40% { opacity: 0; transform: translateY(6px); } 43%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes an-s5 { 0%, 49% { opacity: 0; transform: translateY(6px); } 52%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes an-stamp { 0%, 57% { opacity: 0; transform: rotate(-7deg) scale(1.6); } 61% { opacity: 1; transform: rotate(-4deg) scale(.96); } 63%, 88% { opacity: 1; transform: rotate(-4deg) scale(1); } 94%, 100% { opacity: 0; } }
@keyframes an-grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: no-preference) {
  .an-timeline li { animation: 12s linear infinite an-s0; }
  .an-timeline li:nth-child(2) { animation-name: an-s1; }
  .an-timeline li:nth-child(3) { animation-name: an-s2; }
  .an-timeline li:nth-child(4) { animation-name: an-s3; }
  .an-timeline li:nth-child(5) { animation-name: an-s4; }
  .an-timeline li:nth-child(6) { animation-name: an-s5; }
  .an-stamp { animation: 12s linear infinite an-stamp; }
  .an-convo:hover .an-timeline li, .an-convo:hover .an-stamp, .an-convo:focus-within .an-timeline li, .an-convo:focus-within .an-stamp { animation-play-state: paused; }
  .an-outcomes i::after { transform-origin: left; animation: an-grow 1.2s cubic-bezier(.2, .7, .2, 1) both; }
}

@media (max-width: 900px) {
  .an-screens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-stage { gap: 32px; }
  .an-chapter.flip .an-visual { order: 0; }
}
@media (max-width: 640px) {
  .an-protocols ul, .an-screens { grid-template-columns: 1fr; }
  .an-protocols li + li { border-left: 0; border-top: 1px solid var(--line); }
  .an-timeline li { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .an-at { padding: 10px 0 0 22px; text-align: left; }
  .an-step { padding-top: 4px; }
  .an-step::before { top: -14px; }
  .an-state { margin-left: 0; }
  .an-outcomes li { grid-template-columns: 1fr 40px; row-gap: 6px; }
  .an-outcomes i { grid-row: 2; grid-column: 1 / -1; }
  .an-callers li { grid-template-columns: minmax(0, 1fr) auto; }
  .an-callers em { grid-column: 2; grid-row: 1; }
  .an-callers .an-proof { grid-column: 1; justify-self: start; }
}
