:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --ink: #17191c;
  --muted: #606975;
  --line: #d7dce2;
  --blue: #2563eb;
  --green: #059669;
  --panel: #ffffff;
  --dark: #17191c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 6vw;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 800; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: var(--dark);
  border-radius: 8px;
  font-size: 13px;
}
.site-nav { display: flex; gap: 22px; align-items: center; color: var(--muted); font-size: 14px; }
.nav-cta { color: white; background: var(--blue); padding: 9px 14px; border-radius: 8px; }
.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1.1fr);
  gap: 56px;
  align-items: center;
  padding: 56px 6vw 72px;
  background: #f8fafc;
}
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--blue); font-size: 12px; font-weight: 800; }
h1 { margin: 0; font-size: 72px; line-height: 1; letter-spacing: 0; }
h2 { margin: 0; font-size: 38px; line-height: 1.12; letter-spacing: 0; }
h3 { margin: 0 0 10px; font-size: 19px; }
p { color: var(--muted); line-height: 1.8; }
.hero-lead { font-size: 19px; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
}
.button.primary { background: var(--blue); color: white; border-color: var(--blue); }
.button.secondary { background: white; color: var(--blue); }
.button.ghost { background: transparent; }
.button.github { background: #24292f; color: white; border-color: #24292f; width: 100%; }
.button.repo { gap: 8px; }
.button.github-repo { background: #24292f; color: white; border-color: #24292f; }
.button.gitee-repo { background: #c71d23; color: white; border-color: #c71d23; }
.client-version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 8px;
  background: rgba(37,99,235,.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.download-meta { margin: 10px 0 4px; color: var(--blue); font-weight: 800; }
.download-file { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.hero-stats div { padding-top: 14px; border-top: 1px solid var(--line); }
.hero-stats dt { font-weight: 800; }
.hero-stats dd { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.product-preview {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #c5d2e6;
  box-shadow: 0 28px 80px rgba(17,24,39,.18);
  background: white;
}
.preview-toolbar { height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.preview-toolbar span { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.preview-toolbar span:nth-child(2) { background: #f59e0b; }
.preview-toolbar span:nth-child(3) { background: #22c55e; }
.preview-toolbar strong { margin-left: 12px; font-size: 13px; color: var(--muted); }
.preview-grid { display: grid; grid-template-columns: 170px 1fr; min-height: 440px; }
.preview-grid aside { display: flex; flex-direction: column; gap: 10px; padding: 20px; color: #9fb0c8; background: #152238; }
.preview-grid aside b { color: white; margin-bottom: 12px; }
.preview-grid aside span { padding: 9px 10px; border-radius: 6px; }
.preview-grid aside .active { color: white; background: rgba(59,130,246,.28); }
.preview-grid section { padding: 20px; background: #f8fafc; }
.preview-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.preview-tabs span { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.preview-table { display: grid; grid-template-columns: 1.4fr 1fr .7fr .7fr; border: 1px solid var(--line); background: white; }
.preview-table div { padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-table div:nth-child(-n+4) { font-weight: 800; background: #f3f7fc; }
.preview-terminal { margin-top: 18px; background: #101827; color: white; border-radius: 8px; padding: 18px; }
.preview-terminal span { display: block; color: #93c5fd; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; margin-bottom: 8px; }
.section { padding: 76px 6vw; }
.section-head { max-width: 830px; margin-bottom: 34px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-grid article, .download-list article, .auth-form, .topic-list, .faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.architecture-map { display: grid; gap: 12px; }
.architecture-map span { padding: 18px 20px; color: white; background: var(--dark); border-radius: 8px; font-weight: 700; }
.architecture-map span:nth-child(even) { background: var(--blue); }
.screenshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
figure { margin: 0; }
figcaption { margin-top: 10px; color: var(--muted); font-weight: 700; }
.shot { height: 220px; border-radius: 8px; border: 1px solid var(--line); background: white; }
.faq details { margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 800; }
.page-hero { padding: 82px 6vw 36px; background: #eef3f8; }
.page-hero h1 { font-size: 54px; }
.download-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.auth-page { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; min-height: calc(100vh - 68px); padding: 64px 6vw; }
.auth-copy h1 { font-size: 58px; }
.auth-copy li { margin: 10px 0; color: var(--muted); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.auth-form input { height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; }
.form-message { min-height: 24px; margin: 0; font-size: 14px; }
.community-shell { padding-top: 30px; }
.community-page {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.community-sidebar { display: grid; gap: 16px; }
.community-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.community-panel h2 { font-size: 20px; margin-bottom: 14px; }
.community-panel.compact p { margin-bottom: 0; }
.category-link {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.category-link span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.category-link.active, .category-link:hover { background: #f3f7fc; border-color: var(--line); }
.community-main { display: grid; gap: 16px; }
.community-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.community-search input, .topic-form input, .topic-form select, .topic-form textarea, .reply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  background: white;
}
.community-search input, .topic-form input, .topic-form select { height: 42px; }
.topic-form textarea, .reply-form textarea { min-height: 140px; padding-top: 12px; resize: vertical; }
.new-topic-panel, .topic-detail-card, .reply-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.panel-head, .topic-list-head, .reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2, .topic-list-head h2, .reply-head h2, .reply-form h2 { font-size: 22px; }
.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.topic-form, .reply-form { display: grid; gap: 14px; margin-top: 16px; }
.topic-form label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topic-list { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.topic-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 74px;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.topic-row:last-child { border-bottom: 0; }
.topic-status span, .topic-detail-meta span, .reply-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.topic-title { display: inline-block; font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.topic-body p {
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; }
.topic-counts { display: grid; grid-template-columns: 1fr; justify-items: end; align-content: start; color: var(--muted); font-size: 12px; }
.topic-counts strong { color: var(--ink); font-size: 18px; }
.empty-state {
  padding: 34px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}
.topic-detail-page { display: grid; gap: 18px; max-width: 980px; margin: 0 auto; }
.topic-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.topic-content {
  color: #1f2937;
  line-height: 1.9;
  white-space: pre-wrap;
}
.reply-section { display: grid; gap: 16px; }
.reply-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.reply-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--blue);
  font-weight: 900;
}
.reply-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.reply-row p { margin: 0; white-space: pre-wrap; color: #1f2937; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 36px 6vw; border-top: 1px solid var(--line); background: white; }
.footer-links { display: flex; gap: 18px; color: var(--muted); }

/* Home */
.home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 116px);
  overflow: hidden;
  padding: 64px 6vw;
  background: #17191c;
  border-bottom: 1px solid #2d3136;
}
.home-hero .hero-copy { width: min(1120px, 100%); text-align: center; }
.home-hero .eyebrow { color: #60a5fa; }
.home-hero h1 { color: white; font-size: clamp(68px, 8vw, 116px); }
.hero-slogan {
  margin: 18px auto 0;
  max-width: 980px;
  color: white;
  font-size: 30px;
  line-height: 1.38;
  font-weight: 760;
}
.home-hero .hero-lead { max-width: 840px; margin-left: auto; margin-right: auto; color: #b9c0c9; font-size: 17px; }
.home-hero .hero-actions { justify-content: center; }
.home-hero .button.secondary { border-color: white; }
.home-hero .button.ghost { color: white; border-color: rgba(255,255,255,.38); }
.home-hero .client-version-pill {
  color: #dbeafe;
  border-color: rgba(147,197,253,.34);
  background: rgba(37,99,235,.18);
}
.home-hero .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 960px; margin-left: auto; margin-right: auto; text-align: left; }
.home-hero .hero-stats div { border-top-color: rgba(255,255,255,.22); }
.home-hero .hero-stats dt { color: white; }
.home-hero .hero-stats dd { color: #9ea7b3; }

.value-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 6vw;
  background: #e9edf1;
  border-bottom: 1px solid var(--line);
}
.value-strip > div { min-width: 0; padding: 28px 26px; border-right: 1px solid var(--line); }
.value-strip > div:first-child { padding-left: 0; }
.value-strip > div:last-child { padding-right: 0; border-right: 0; }
.value-strip span { color: var(--blue); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; font-weight: 800; }
.value-strip > div:nth-child(even) span { color: var(--green); }
.value-strip strong { display: block; margin-top: 8px; font-size: 17px; }
.value-strip p { margin: 6px 0 0; font-size: 13px; line-height: 1.65; }

.section-head.wide { max-width: 980px; }
.workflow-section { background: white; }
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.workflow-grid li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  min-height: 156px;
  padding: 28px 32px 28px 0;
  border-bottom: 1px solid var(--line);
}
.workflow-grid li:nth-child(odd) { border-right: 1px solid var(--line); }
.workflow-grid li:nth-child(even) { padding-left: 32px; }
.step-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 32px;
  color: white;
  background: var(--dark);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}
.workflow-grid strong { font-size: 20px; }
.workflow-grid p { margin: 8px 0 0; }

.capabilities-section { background: #f3f5f7; }
.capability-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.capability-card {
  grid-column: span 4;
  min-height: 250px;
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.capability-card.featured {
  grid-column: span 8;
  grid-row: span 2;
  min-height: 516px;
  color: white;
  background: #17191c;
  border-color: #17191c;
}
.capability-kicker {
  display: block;
  margin-bottom: 28px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.capability-card.featured .capability-kicker { color: #7dd3fc; }
.capability-card h3 { font-size: 23px; }
.capability-card p { margin-bottom: 0; }
.capability-card.featured h3 { max-width: 620px; font-size: 38px; }
.capability-card.featured p { max-width: 720px; color: #cbd5e1; font-size: 17px; }
.capability-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.capability-card li { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); color: #e2e8f0; }
.capability-card code { color: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.capability-card.upcoming { border-style: dashed; background: #ecf8f3; border-color: #9ccfbc; }
.capability-card.upcoming .capability-kicker { color: #047857; }

.architecture-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
  gap: 64px;
  align-items: center;
  color: white;
  background: #202326;
}
.architecture-section h2 { color: white; }
.architecture-section p { color: #b8c4d6; }
.architecture-notes { margin-top: 30px; border-top: 1px solid rgba(255,255,255,.16); }
.architecture-notes p { margin: 0; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.architecture-notes strong { color: white; }
.architecture-flow { display: grid; grid-template-columns: 1fr; gap: 12px; }
.flow-source, .flow-output { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.flow-source span, .flow-output span, .flow-output strong {
  display: grid;
  place-items: center;
  min-height: 70px;
  padding: 14px;
  color: #dbeafe;
  background: #2a2e32;
  border: 1px solid #41464c;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
}
.flow-core {
  display: grid;
  gap: 8px;
  min-height: 160px;
  place-content: center;
  padding: 28px;
  background: var(--blue);
  border-radius: 8px;
  text-align: center;
}
.flow-core small { color: #dbeafe; text-transform: uppercase; }
.flow-core strong { font-size: 28px; }
.flow-core span { color: white; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.flow-output strong { color: white; background: #157347; border-color: #239b61; }

.product-section { background: white; }
.product-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-shot { overflow: hidden; margin: 0; background: white; border: 1px solid #cbd5e1; border-radius: 8px; }
.product-shot-wide { grid-column: 1 / -1; }
.product-shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; background: #0f172a; }
.product-shot-wide img { aspect-ratio: 2.25 / 1; }
.product-shot figcaption { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; margin: 0; padding: 20px 22px; }
.product-shot figcaption strong { color: var(--ink); }
.product-shot figcaption span { color: var(--muted); font-weight: 500; line-height: 1.65; }

.proof-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(480px, 1.2fr); gap: 60px; align-items: center; background: #edf3f0; }
.proof-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.proof-points span { padding: 20px 18px 20px 0; border-bottom: 1px solid var(--line); font-weight: 750; }
.proof-points span:nth-child(odd) { border-right: 1px solid var(--line); }
.proof-points span:nth-child(even) { padding-left: 18px; }

.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 64px 6vw;
  color: white;
  background: #124f3c;
}
.home-cta h2 { color: white; }
.home-cta p { max-width: 760px; color: #cbd5e1; }
.home-cta .hero-actions { flex: 0 0 auto; margin-top: 0; }
.home-cta .button.secondary { border-color: white; }

@media (max-width: 980px) {
  .site-header { height: auto; min-height: 68px; align-items: flex-start; flex-direction: column; padding: 16px 5vw; gap: 12px; }
  .site-nav { flex-wrap: wrap; gap: 12px; }
  .hero, .split, .auth-page { grid-template-columns: 1fr; }
  .community-page { grid-template-columns: 1fr; }
  .community-search { grid-template-columns: 1fr; }
  .topic-row { grid-template-columns: 1fr; }
  .topic-counts { justify-items: start; grid-template-columns: repeat(4, auto); gap: 6px; }
  h1 { font-size: 52px; }
  h2 { font-size: 30px; }
  .product-preview { min-width: 0; }
  .feature-grid, .screenshot-grid, .download-list { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .home-hero { min-height: auto; padding-top: 58px; padding-bottom: 58px; }
  .home-hero .hero-copy { width: 100%; }
  .home-hero .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .value-strip { grid-template-columns: repeat(2, 1fr); }
  .value-strip > div { padding-left: 20px; border-bottom: 1px solid var(--line); }
  .value-strip > div:nth-child(2) { border-right: 0; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid li, .workflow-grid li:nth-child(even) { padding-left: 0; border-right: 0; }
  .capability-card, .capability-card.featured { grid-column: 1 / -1; grid-row: auto; min-height: auto; }
  .architecture-section, .proof-section { grid-template-columns: 1fr; }
  .product-gallery { grid-template-columns: 1fr; }
  .product-shot-wide { grid-column: auto; }
  .product-shot-wide img { aspect-ratio: 16 / 9; }
  .home-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .site-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: 0 0 auto; }
  .home-hero { padding-top: 42px; padding-bottom: 42px; }
  .home-hero h1 { font-size: 52px; }
  .hero-slogan { font-size: 22px; }
  .home-hero .hero-stats { display: none; }
  .value-strip, .capability-card ul, .flow-source, .flow-output, .proof-points { grid-template-columns: 1fr; }
  .value-strip > div { padding: 22px 0; border-right: 0; }
  .workflow-grid li { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .step-index { width: 40px; }
  .capability-card { padding: 22px; }
  .capability-card.featured h3 { font-size: 30px; }
  .product-shot figcaption { grid-template-columns: 1fr; gap: 8px; }
  .proof-points span, .proof-points span:nth-child(even) { padding: 16px 0; border-right: 0; }
  .home-cta .hero-actions { width: 100%; }
  .home-cta .button { width: 100%; }
}
