:root {
  --bg: #fafafa;
  --fg: #141414;
  --muted: #6b6b70;
  --faint: #9a9aa0;
  --line: #e7e7e9;
  --card: #ffffff;
  --soft: #f2f2f3;
  --accent: #e5262d;
  --ok: #16a34a;
  --code-bg: #0e0e10;
  --code-fg: #e8e8ea;
  --radius: 14px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.6 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code { font-family: var(--mono); font-size: 0.86em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bar { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 600; letter-spacing: -0.02em; text-decoration: none; font-size: 17px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.live i { background: var(--ok); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* Hero */
.hero { text-align: center; padding-top: 64px; padding-bottom: 48px; }
.mark { width: 56px; height: 56px; display: block; margin: 0 auto 20px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(0,0,0,.18); }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-size: clamp(36px, 6vw, 52px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.lede { max-width: 540px; margin: 16px auto 0; font-size: 18px; line-height: 1.55; color: var(--muted); }
.stats { display: flex; justify-content: center; gap: 12px; margin: 32px auto 0; flex-wrap: wrap; }
.stats div { min-width: 140px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stats b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
  .hero { padding-top: 44px; padding-bottom: 36px; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats div { min-width: 0; padding: 12px 6px; }
  .stats b { font-size: 22px; }
  .stats span { font-size: 12px; }
  .bubble { max-width: 94%; }
}
.notice { margin: 20px 0 0; font-size: 13px; color: var(--faint); }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding-bottom: 56px; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; } .side { position: static !important; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }
.updated { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Conversations */
.feed { display: grid; gap: 16px; }
.convo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; }
.convo.fresh { animation: arrive .6s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(-6px); box-shadow: 0 0 0 2px var(--accent); } to { opacity: 1; transform: none; box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .convo.fresh, .status.live i { animation: none; } }

.convo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--fg); background: var(--soft); border: 1px solid var(--line); }
.who { min-width: 0; line-height: 1.25; }
.who-name { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.verified { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: #15803d; background: #ecfdf3; border: 1px solid #c6efd6; border-radius: 999px; padding: 1px 8px 1px 6px; white-space: nowrap; vertical-align: 1px; }
.verified::before { content: "\2713  "; }
.who-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.when { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

.turn { display: grid; gap: 8px; margin-top: 10px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.in { background: var(--soft); border-top-left-radius: 5px; justify-self: start; }
.bubble.in.hidden-msg { color: var(--faint); font-style: italic; }
.out-row { display: flex; gap: 8px; justify-content: flex-end; align-items: flex-end; }
.bubble.out { background: var(--card); border: 1px solid var(--line); border-top-right-radius: 5px; }
.mini-mark { flex: none; width: 22px; height: 22px; margin-bottom: 2px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.sources { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-right: 30px; }
.chip { font-size: 12px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--bg); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { color: var(--fg); border-color: var(--faint); }

.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 4px 0; }
.empty-title { color: var(--fg); font-weight: 600; }

/* Side panel */
.side { position: sticky; top: 84px; display: grid; gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ids { margin: 0; display: grid; gap: 12px; }
.ids dt { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.ids dd { margin: 0; display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.ids code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.copy { flex: none; font: 500 11.5px var(--sans); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; cursor: pointer; }
.copy:hover { color: var(--fg); border-color: var(--faint); }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }

.steps { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.steps li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
.btn { width: 100%; font: 600 14px var(--sans); color: var(--bg); background: var(--fg); border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.btn:hover { opacity: .88; }
.example { margin-top: 10px; }
.example summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.example pre { margin: 10px 0 0; background: var(--code-bg); color: var(--code-fg); border-radius: 10px; padding: 12px; overflow-x: auto; }
.example pre code { font-size: 11.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.fine { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-links { display: flex; gap: 16px; }
