@font-face { font-family: "Plex Sans"; src: url(/fonts/ibm-plex-sans.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/ibm-plex-mono.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #1b2333;
  --muted: #5a6478;
  --line: #e3e6ec;
  --subtle: #f6f7f9;
  --code: #eef0f4;
  --red: #b42318;
  --green: #137a4b;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.65 "Plex Sans", -apple-system, system-ui, sans-serif; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: #a3abbb; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid #3b5bdb; outline-offset: 2px; border-radius: 3px; }

/* Top bar */
header.top { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; height: 56px; }
header.top .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
header.top nav { display: flex; gap: 20px; font-size: 14px; }
header.top nav a { text-decoration: none; color: var(--muted); }
header.top nav a:hover { color: var(--ink); }

/* Three columns: sidebar, reading column, on this page */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr) 200px; gap: 48px; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.side, .toc { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; padding: 28px 0; font-size: 14px; }
.side summary { display: none; }
.side p, .toc p { margin: 18px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.side details > p:first-of-type, .toc p { margin-top: 0; }
.side ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.side li, .toc li { margin: 0; }
.side li a, .toc li a { display: block; padding: 3px 10px; margin-left: -10px; border-radius: 6px; text-decoration: none; color: var(--muted); }
.side li a:hover, .toc li a:hover { color: var(--ink); background: var(--subtle); }
.side a[aria-current="page"] { color: var(--ink); background: var(--subtle); font-weight: 600; }
.toc { border-left: 1px solid var(--line); padding-left: 16px; }
.toc:empty { border: 0; }

/* Reading column */
.content { min-width: 0; max-width: 760px; padding: 36px 0 0; }
h1, h2, h3 { line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 44px 0 12px; }
h3 { font-size: 1.05rem; margin: 28px 0 8px; }
h2 code, h3 code { font-size: 0.92em; }
p, ul, ol, dl, table, pre { margin: 0 0 16px; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 6px; }
li > ul, li > ol { margin: 6px 0 0; }
dt { font-weight: 600; }
dd { margin: 0 0 12px; color: var(--muted); }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--code); padding: 0.12em 0.36em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; font-size: 13.5px; overflow-wrap: normal; }
table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; border-bottom-color: #c9ced8; }
td code, th code { white-space: nowrap; }
article > p:first-of-type { font-size: 1.08rem; color: #39425a; }
time { white-space: nowrap; }

footer.bottom { margin: 72px 0 0; padding: 20px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
footer.bottom a { color: var(--muted); }

/* Waitlist form (pricing) */
form.wait { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 8px 0 24px; }
form.wait input[type=email] { flex: 1 1 220px; font: inherit; padding: 9px 12px; border: 1px solid #c9ced8; border-radius: 6px; }
form.wait label { font-size: 15px; }
.btn { font: 600 15px "Plex Sans", system-ui, sans-serif; background: var(--ink); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: #2d3a55; }
.hp { position: absolute; left: -9999px; }

/* The replay on the overview page: a phone and the agent's steps, side by side */
.replay { border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin: 8px 0 24px; background: var(--subtle); }
.replay .wrap { padding: 0; }
.replay .stage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.phone { width: 220px; height: 440px; border-radius: 34px; background: #0f141e; padding: 9px; }
.screen { height: 100%; border-radius: 26px; background: #f2f2f7; overflow: hidden; display: flex; flex-direction: column; }
.urlbar { margin: 30px 10px 0; background: #fff; border-radius: 8px; font-size: 10.5px; color: #3c3c43; text-align: center; padding: 5px; }
.app { padding: 12px; font-size: 11px; flex: 1; overflow: hidden; line-height: 1.4; }
.app b { display: block; font-size: 15px; }
.app .sub { color: #6b7280; margin-bottom: 10px; }
.app .loading { color: #6b7280; }
.app .ev { background: #fff; border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; }
.app .ev small { display: block; color: #6b7280; }
.app .ev a { color: #0a64d8; text-decoration: none; }
.app .after { display: none; }
.replay.fixed .app .before { display: none; }
.replay.fixed .app .after { display: block; }
.log { font: 12.5px/1.55 var(--mono); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-height: 440px; }
.log p { margin: 0 0 10px; }
.log .you { font-family: "Plex Sans", system-ui, sans-serif; font-size: 14px; background: var(--subtle); border-radius: 6px; padding: 6px 10px; display: inline-block; }
.log .tool { color: var(--muted); }
.log .tool b { color: var(--ink); font-weight: 600; }
.log .err { color: var(--red); }
.log .ok { color: var(--green); }
.log .say { font-family: "Plex Sans", system-ui, sans-serif; font-size: 14px; }
.log ins { text-decoration: none; background: #e4f4ea; color: var(--green); display: block; padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.log del { text-decoration: none; background: #fbe7e4; color: var(--red); display: block; padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.replay .js-step { transition: opacity 0.35s ease; }
.replay.playing .js-step { opacity: 0; }
.replay.playing .js-step.on { opacity: 1; }
.caption { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.caption button { font: inherit; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 820px) {
  header.top { padding: 0 16px; }
  header.top nav { gap: 14px; }
  header.top nav a[href^="https"] { display: none; }
  .layout { display: block; padding: 0 16px; }
  .side { position: static; max-height: none; padding: 12px 0 0; border-bottom: 1px solid var(--line); }
  .side summary { display: list-item; cursor: pointer; font-weight: 600; padding: 6px 0 10px; }
  .content { padding-top: 20px; }
  h1 { font-size: 1.7rem; }
  .replay .stage { grid-template-columns: 1fr; justify-items: center; }
  .log { min-height: 0; width: 100%; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .replay .js-step { transition: none; }
}
