:root {
  --bg: #f6f8fc;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --surface-dark: #0f1420;
  --fg: #0f172a;
  --fg-2: #475569;
  --fg-3: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --accent: #2554e8;
  --accent-hover: #1d44c7;
  --accent-soft: rgba(37, 84, 232, 0.08);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 24px -12px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.05), 0 20px 44px -20px rgba(37, 84, 232, 0.14);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(960px 480px at 18% -60px, rgba(37, 84, 232, 0.09), transparent 70%),
    radial-gradient(820px 420px at 85% 40px, rgba(56, 189, 248, 0.08), transparent 65%);
  background-repeat: no-repeat;
  color: var(--fg);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, ol, dl, dd, pre {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.14em 0.42em;
  border-radius: 5px;
}

::selection {
  background: rgba(37, 84, 232, 0.16);
}

.container {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

/* ───────── Header ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 248, 252, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand img {
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.brand em {
  font-style: normal;
  font-weight: 400;
  color: var(--fg-3);
  margin-left: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 26px);
  font-size: 14px;
  color: var(--fg-2);
}

.site-nav a {
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--fg);
}

.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.nav-gh:hover {
  border-color: var(--fg-3);
}

/* ───────── Hero ───────── */
.hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 4.5vw, 56px);
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(37, 84, 232, 0.2);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px -3px rgba(37, 84, 232, 0.12);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(36px, 4.8vw, 60px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 20px;
}

.hero-lead {
  color: var(--fg-2);
  font-size: clamp(15.5px, 1.25vw, 17px);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-lead strong {
  color: var(--fg);
  font-weight: 550;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 550;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--fg);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--fg-3);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-metrics dt {
  font-size: 12px;
  color: var(--fg-3);
  margin-bottom: 4px;
}

.hero-metrics dd {
  font-size: 13.5px;
  color: var(--fg-2);
}

.hero-metrics dd strong {
  display: block;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* ───────── Hero Preview Card ───────── */
.preview-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
  font-size: 12.5px;
}

.pane-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--fg);
}

.pane-title img {
  border-radius: 50%;
}

.pane-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.chat-messages {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
}

.msg {
  display: flex;
  flex-direction: column;
}

.msg-author {
  font-size: 11.5px;
  color: var(--fg-3);
  margin-bottom: 4px;
  margin-left: 2px;
}

.msg-in {
  align-items: flex-start;
}

.msg-in .msg-bubble {
  background: #f1f5f9;
  color: var(--fg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.mention {
  color: var(--accent);
  font-weight: 500;
}

.msg-out {
  align-items: flex-end;
}

.msg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.msg-out .msg-bubble {
  background: var(--fg);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.msg-bubble {
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 320px;
}

.msg-sticker img {
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.log-pane {
  background: var(--surface-dark);
  color: #e2e8f0;
}

.pane-bar-dark {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mono-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #94a3b8;
}

.mono-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
}

.event-stream {
  list-style: none;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-x: auto;
}

.event-stream li {
  display: grid;
  grid-template-columns: 28px 126px 1fr;
  gap: 10px;
  white-space: nowrap;
  align-items: baseline;
}

.ev-id {
  color: #64748b;
}

.ev-type {
  font-weight: 500;
}

.ev-u { color: #34d399; }
.ev-m { color: #94a3b8; }
.ev-s { color: #a78bfa; }
.ev-a { color: #60a5fa; }
.ev-t { color: #fbbf24; }

.ev-body {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────── Sections ───────── */
.section {
  padding: clamp(64px, 8vw, 108px) 0;
  border-top: 1px solid var(--line);
}

.section-alt {
  background: linear-gradient(180deg, rgba(238, 242, 249, 0.55) 0%, rgba(246, 248, 252, 0.4) 100%);
}

.section-header {
  max-width: 660px;
  margin-bottom: clamp(36px, 5vw, 52px);
}

.section-kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--fg-2);
  font-size: 16px;
}

/* ───────── Workflow Grid ───────── */
.workflow-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.workflow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.workflow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.step-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

.step-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}

.workflow-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.workflow-card p {
  font-size: 14.5px;
  color: var(--fg-2);
  line-height: 1.65;
}

/* ───────── Why Grid ───────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}

.why-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(37, 84, 232, 0.14);
  margin-bottom: 16px;
}

.why-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.why-card p {
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.7;
}

/* ───────── Features Bento Grid ───────── */
.features-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.feature-item:hover {
  border-color: rgba(37, 84, 232, 0.28);
}

.feature-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  margin-bottom: 10px;
}

.feature-item h3 {
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.feature-item p {
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ───────── Quick Start ───────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.step-header {
  margin-bottom: 10px;
}

.step-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}

.step-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step-card p {
  color: var(--fg-2);
  font-size: 14.5px;
  margin-bottom: 18px;
}

.code-block {
  position: relative;
  margin-top: auto;
  background: var(--surface-dark);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
}

.code-block code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.prompt {
  color: #60a5fa;
  user-select: none;
}

.code-ok {
  color: #34d399;
}

.copy-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.customize-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  font-size: 14.5px;
  color: var(--fg-2);
}

.customize-banner strong {
  color: var(--fg);
  margin-right: 6px;
}

.banner-link {
  font-weight: 550;
  color: var(--accent);
  white-space: nowrap;
}

.banner-link:hover {
  text-decoration: underline;
}

/* ───────── Persona Card ───────── */
.persona-card {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
}

.persona-avatar {
  flex-shrink: 0;
}

.persona-avatar img {
  display: block;
  border-radius: 50%;
  box-shadow: 0 12px 28px -10px rgba(37, 84, 232, 0.35), 0 0 0 1px var(--line);
}

.persona-body h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.persona-body p {
  color: var(--fg-2);
  font-size: 15.5px;
  max-width: 640px;
}

.persona-credit {
  margin-top: 12px;
  font-size: 13px !important;
  color: var(--fg-3) !important;
}

.persona-credit a {
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ───────── Footer ───────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 56px;
  font-size: 13.5px;
  color: var(--fg-3);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--fg-2);
}

.footer-links a:hover {
  color: var(--fg);
}

.hero-grid > *,
.workflow-grid > *,
.why-grid > *,
.features-grid > *,
.steps-grid > * {
  min-width: 0;
}

/* ───────── Responsive ───────── */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .workflow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-grid,
  .features-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .brand-text em {
    display: none;
  }
  .site-nav a:not(.nav-gh):nth-child(1),
  .site-nav a:not(.nav-gh):nth-child(2) {
    display: none;
  }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .workflow-grid,
  .why-grid,
  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .event-stream li {
    grid-template-columns: 26px 112px minmax(0, 1fr);
    font-size: 11px;
  }
  .persona-card {
    flex-direction: column;
    text-align: center;
  }
}
