:root {
  --ink: #0b0c0e;
  --ink-soft: #3d4148;
  --muted: #6d727b;
  --line: #e7e8eb;
  --line-strong: #d6d8dc;
  --canvas: #fafafb;
  --card: #ffffff;
  --accent: #2f6bff;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-lg: 0 30px 80px -30px rgb(15 18 24 / 24%), 0 8px 24px -12px rgb(15 18 24 / 12%);
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.shell {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

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

.brand img {
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

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

.header-note {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 56px;
  align-items: center;
  padding: 80px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--ink-soft);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 4.8vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 680;
}

.lede {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 560;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-primary:hover {
  background: #26282d;
}

.button-primary:active {
  transform: translateY(1px);
}

.button-primary[aria-disabled="true"] {
  background: #a7abb2;
  cursor: progress;
}

.button-ghost {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--ink);
}

.button-small {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.meta {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.meta .dot-sep {
  margin: 0 8px;
  color: var(--line-strong);
}

.fine-print {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---- App window illustration (decorative) -------------------------------- */

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8% -6% -12% 4%;
  z-index: 0;
  background:
    radial-gradient(46% 40% at 72% 18%, rgb(47 107 255 / 12%), transparent 70%),
    radial-gradient(38% 36% at 12% 88%, rgb(140 90 255 / 10%), transparent 72%);
  filter: blur(6px);
}

.app-window {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #f6f6f7;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9dade;
}

.app-title {
  margin-left: 10px;
  font-size: 12px;
  color: var(--muted);
}

.app-body {
  display: grid;
  grid-template-columns: 58px 1fr;
  min-height: 360px;
}

.app-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-right: 1px solid var(--line);
  background: #fbfbfc;
}

.rail-item {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #e9eaee;
}

.rail-item.is-active {
  background: #d5d7dd;
}

.app-main {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  gap: 12px;
}

.app-heading {
  font-size: 14px;
  font-weight: 600;
}

.expert-row {
  display: flex;
  gap: 6px;
}

.expert-chip {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafafb;
  font-size: 12px;
  color: var(--ink-soft);
}

.expert-chip.is-muted {
  color: var(--muted);
}

.bubble {
  border-radius: 12px;
  padding: 12px 14px;
}

.bubble-user {
  align-self: flex-end;
  max-width: 78%;
  background: #eff1f4;
  font-size: 13px;
  color: var(--ink-soft);
}

.bubble-agent {
  max-width: 88%;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 8px;
}

.bubble-agent.is-short {
  max-width: 60%;
}

.bubble-line {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: #eceef2;
}

.w-90 {
  width: 90%;
}
.w-80 {
  width: 80%;
}
.w-70 {
  width: 70%;
}
.w-60 {
  width: 60%;
}

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfbfc;
}

.composer-line {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e6e8ec;
}

.composer-send {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ink);
}

/* ---- Sections ------------------------------------------------------------ */

.section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 28px;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 640;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin-bottom: 8px;
}

.section-head p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: #f1f2f5;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--ink);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.step-index {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.steps h3 {
  margin: 2px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.steps p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---- Version card -------------------------------------------------------- */

.version-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.version-latest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
}

.version-label {
  font-size: 13px;
  color: var(--muted);
}

.version-number {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.version-facts {
  font-size: 14px;
  color: var(--ink-soft);
}

.checksum-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  background: #fbfbfc;
}

.checksum-label {
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.checksum-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: var(--ink-soft);
}

.copy-button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.copy-button:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}

.copy-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.history {
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line);
}

.history h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.history ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

.history li:first-child {
  border-top: none;
}

.history .h-version {
  min-width: 72px;
  font-weight: 600;
  color: var(--ink);
}

.history .h-meta {
  flex: 1;
  color: var(--muted);
}

.history a {
  color: var(--accent);
}

.version-error {
  margin: 0;
  padding: 16px 28px 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.version-error a {
  color: var(--accent);
}

/* ---- FAQ + footer -------------------------------------------------------- */

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.faq h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.faq p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding: 56px 0 48px;
  }

  .feature-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 32px);
  }

  .site-nav {
    display: none;
  }

  .version-latest {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }

  .checksum-row {
    padding: 12px 22px;
  }

  .history {
    padding: 18px 22px 20px;
  }

  .history li {
    flex-wrap: wrap;
    gap: 8px;
  }

  .app-body {
    grid-template-columns: 44px 1fr;
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
