:root {
  --bg: #f7f3ea;
  --ink: #1f2328;
  --muted: #6f6a60;
  --panel: #fffaf1;
  --panel-strong: #fffdf7;
  --line: #ded6c8;
  --accent: #5b6ee1;
  --accent-2: #2f9e8f;
  --warn: #b7791f;
  --danger: #b84a4a;
  --shadow: 0 18px 45px rgba(62, 52, 32, 0.09);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(31, 35, 40, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 35, 40, 0.026) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(247, 243, 234, 0.92);
  border-bottom: 1px solid rgba(222, 214, 200, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 760;
}

.brand span {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.section-band {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 0;
}

.hero {
  min-height: min(820px, calc(88svh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  align-items: center;
  gap: clamp(34px, 6vw, 76px);
  padding-top: clamp(28px, 5vw, 58px);
  padding-bottom: clamp(34px, 5vw, 56px);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

h1,
h2 {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
}

h1 {
  max-width: 780px;
  font-size: clamp(2.7rem, 5.4vw, 5.4rem);
  font-weight: 720;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 710;
}

h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.32rem);
}

.hero-lede {
  max-width: 620px;
  margin: 26px 0 0;
  font-size: clamp(1.2rem, 2.1vw, 1.78rem);
  line-height: 1.45;
}

.hero-support,
.hero-note,
.noscript-note,
.section-heading p,
.surface-card p,
.loop-track p,
.skill-list span,
.install-note,
.faq-list p {
  color: var(--muted);
}

.hero-support {
  max-width: 650px;
  margin: 18px 0 0;
  font-size: 1.02rem;
}

.hero-note,
.noscript-note,
.install-note {
  max-width: 650px;
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.noscript-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
}

.micro-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.micro-flow span {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
}

.micro-flow span::after {
  content: " →";
  color: var(--accent);
}

.micro-flow span:last-child::after {
  content: "";
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 720;
}

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

.button.secondary {
  background: rgba(255, 250, 241, 0.7);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.hero-visual {
  position: relative;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(255, 253, 247, 0.84)),
    repeating-linear-gradient(0deg, transparent 0, transparent 34px, rgba(91, 110, 225, 0.07) 35px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.flow-art {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
}

.ledger-card {
  position: absolute;
  display: grid;
  gap: 4px;
  width: min(270px, 45%);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 14px 34px rgba(31, 35, 40, 0.08);
}

.ledger-card strong {
  font-size: 0.96rem;
}

.ledger-card small,
.ledger-id {
  color: var(--muted);
  font-size: 0.78rem;
}

.card-a {
  top: 28px;
  left: 26px;
}

.card-b {
  right: 26px;
  bottom: 32px;
}

.section-heading {
  max-width: 790px;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section-heading p {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.section-note {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.three-grid,
.four-grid,
.compare-grid {
  display: grid;
  gap: 16px;
}

.three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface-card,
.demo-panel,
.skill-group,
.install-shell,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.78);
  box-shadow: 0 10px 28px rgba(62, 52, 32, 0.06);
}

.surface-card {
  min-height: 190px;
  padding: 22px;
}

.card-index,
.panel-label {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.surface-card h3 {
  margin-top: 28px;
}

.surface-card p {
  margin: 12px 0 0;
}

.clean-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.clean-list li + li {
  margin-top: 8px;
}

.loop-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 250, 241, 0.72);
}

.loop-track article {
  min-height: 210px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.loop-track article:last-child {
  border-right: 0;
}

.loop-track span {
  color: var(--accent-2);
  font-weight: 800;
}

.loop-track h3 {
  margin-top: 42px;
}

.loop-track p {
  margin: 12px 0 0;
}

.demo-shell,
.install-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.demo-tabs,
.install-tabs {
  display: grid;
  gap: 8px;
}

.demo-tab,
.install-tab {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: var(--muted);
  text-align: left;
  font: inherit;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.68);
  cursor: pointer;
}

.demo-tab.is-active,
.install-tab.is-active {
  color: var(--ink);
  border-color: rgba(91, 110, 225, 0.56);
  background: rgba(255, 253, 247, 0.95);
}

.demo-panel {
  min-height: 470px;
  padding: 26px;
  display: grid;
  gap: 22px;
}

.safe-demo-badge {
  width: fit-content;
  padding: 4px 9px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(47, 158, 143, 0.35);
  border-radius: 999px;
  background: rgba(47, 158, 143, 0.08);
}

.demo-panel p,
.demo-panel ul {
  margin: 8px 0 0;
}

.demo-panel ul {
  padding-left: 19px;
}

.demo-disclaimer {
  margin-top: 18px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.96rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
}

.demo-disclaimer strong {
  color: var(--ink);
}

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

.skill-group {
  padding: 22px;
}

.skill-group h3 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.skill-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.skill-list article {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(222, 214, 200, 0.72);
}

.skill-list article:last-child {
  border-bottom: 0;
}

.compare-grid {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}

blockquote {
  margin: 16px 0 0;
  font-size: clamp(1.12rem, 2vw, 1.8rem);
  line-height: 1.45;
}

.quality-chain {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.quality-chain span {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  font-weight: 760;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.install-shell {
  padding: 18px;
}

.install-note {
  max-width: 760px;
  margin-top: 14px;
}

.code-panel {
  min-height: 260px;
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: #fffdf7;
  border-radius: 8px;
  background: #252525;
  font-size: 0.96rem;
  line-height: 1.65;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 18px 20px;
}

.faq-list summary {
  font-weight: 760;
  cursor: pointer;
}

.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer span {
  color: var(--ink);
  font-weight: 780;
  margin-right: auto;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero,
  .demo-shell,
  .install-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual,
  .flow-art {
    min-height: 420px;
  }

  .three-grid,
  .four-grid,
  .loop-track,
  .skill-groups,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .loop-track article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loop-track article:last-child {
    border-bottom: 0;
  }

  .quality-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .section-band {
    width: min(100% - 28px, 1180px);
    padding: 28px 0;
  }

  h1 {
    font-size: clamp(1.95rem, 8.4vw, 2.35rem);
    line-height: 1.08;
  }

  .hero {
    gap: 12px;
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .hero-lede {
    margin-top: 14px;
    font-size: 1rem;
    line-height: 1.42;
  }

  .hero-support {
    display: none;
  }

  .hero-note {
    margin-top: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .noscript-note {
    margin-top: 8px;
    padding: 9px 11px;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 12px;
    gap: 8px;
  }

  .micro-flow {
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 12px;
    padding-bottom: 2px;
    overflow-x: auto;
  }

  .micro-flow span {
    flex: 0 0 auto;
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  .button {
    min-height: 42px;
  }

  .hero-visual,
  .flow-art {
    min-height: 240px;
    height: 240px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button.primary {
    grid-column: 1 / -1;
  }

  .ledger-card {
    width: calc(100% - 42px);
    padding: 10px 12px;
  }

  .card-a,
  .card-b {
    left: 21px;
    right: auto;
  }

  .card-b {
    bottom: 18px;
  }

  .skill-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .quality-chain {
    grid-template-columns: 1fr;
  }
}
