:root {
  color-scheme: light;
  --ink: #13231f;
  --ink-strong: #071512;
  --muted: #64746f;
  --surface: #fbfdfb;
  --surface-raised: #ffffff;
  --surface-cool: #eef7f4;
  --line: #d6e0dc;
  --line-strong: #adc3bb;
  --green: #0f7a5f;
  --green-dark: #075642;
  --blue: #235f9f;
  --gold: #a66f12;
  --red: #b44739;
  --shadow: 0 24px 60px rgba(20, 35, 31, 0.13);
  --shadow-soft: 0 12px 32px rgba(20, 35, 31, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(15, 122, 95, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(35, 95, 159, 0.04) 1px, transparent 1px),
    var(--surface);
  background-size: 48px 48px;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    "Source Han Sans SC",
    sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0;
  overflow-x: hidden;
}

main,
section,
article,
div,
p,
nav,
footer {
  min-width: 0;
}

img {
  max-width: 100%;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.36) 52%, rgba(238, 247, 244, 0.58)),
    linear-gradient(180deg, rgba(15, 122, 95, 0.08), transparent 28rem);
}

a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(214, 224, 220, 0.9);
  background: rgba(251, 253, 251, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 122, 95, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.brand-text {
  display: grid;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-text strong {
  color: var(--ink-strong);
  font-size: 1rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover,
.text-link:hover {
  background: var(--surface-cool);
  color: var(--green-dark);
}

.hero-section {
  padding: 72px clamp(20px, 5vw, 72px) 64px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 820px;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  content: "";
  background: var(--green);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-strong);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 680px;
  font-family:
    "STZhongsong",
    "Microsoft YaHei",
    "PingFang SC",
    serif;
  font-size: 4.2rem;
}

h2 {
  max-width: 860px;
  font-size: 2.35rem;
}

h3 {
  font-size: 1.16rem;
}

.hero-text {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 7px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.primary-action {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 122, 95, 0.24);
}

.primary-action:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-strong);
}

.secondary-action:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 36px 0 0;
}

.hero-metrics div {
  min-width: 0;
  padding: 14px 0;
  border-top: 2px solid var(--line-strong);
}

.hero-metrics dt {
  color: var(--ink-strong);
  font-weight: 900;
}

.hero-metrics dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-band {
  padding: 72px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.feature-band {
  background: rgba(255, 255, 255, 0.54);
}

.download-band {
  scroll-margin-top: 92px;
  background: rgba(238, 247, 244, 0.72);
}

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.download-copy {
  min-width: 0;
}

.download-copy p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.download-button {
  min-width: 190px;
}

.download-status {
  font-size: 0.92rem;
}

.download-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.download-meta div {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(15, 122, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.download-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.download-meta dd {
  margin: 8px 0 0;
  color: var(--ink-strong);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.download-meta .checksum {
  font-family:
    "Cascadia Mono",
    "Consolas",
    monospace;
  font-size: 0.76rem;
  line-height: 1.55;
}

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

.download-notes li {
  min-width: 0;
  padding: 16px 18px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.security-band {
  background: #eef7f4;
}

.section-heading {
  margin-bottom: 30px;
  min-width: 0;
}

.compact-heading {
  max-width: 820px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  position: relative;
  min-width: 0;
  min-height: 218px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 10px 28px rgba(20, 35, 31, 0.06);
}

.feature-card::after {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(19, 35, 31, 0.05);
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 1;
}

.card-ai::after {
  content: "AI";
}

.card-ledger::after {
  content: "账";
}

.card-chart::after {
  content: "图";
}

.card-sync::after {
  content: "备";
}

.feature-card p,
.boundary-list p,
.document-heading p,
.legal-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.feature-mark {
  display: block;
  width: 36px;
  height: 5px;
  margin-bottom: 20px;
  border-radius: 5px;
  background: var(--green);
}

.card-ledger .feature-mark {
  background: var(--blue);
}

.card-chart .feature-mark {
  background: var(--gold);
}

.card-sync .feature-mark {
  background: var(--red);
}

.boundary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.boundary-list div {
  padding: 20px;
  border: 1px solid rgba(15, 122, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.boundary-list strong {
  color: var(--green-dark);
}

.legal-band {
  background: var(--surface);
}

.legal-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 28px;
  align-items: end;
}

.legal-heading p {
  max-width: 430px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.legal-section {
  scroll-margin-top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 16px 34px rgba(20, 35, 31, 0.08);
}

.legal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.legal-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.document-surface {
  min-height: 300px;
  max-height: 580px;
  overflow: auto;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(251, 253, 251, 0.96), rgba(255, 255, 255, 1));
}

.full-document {
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.loading-text,
.error-text {
  margin: 0;
  color: var(--muted);
}

.error-text {
  color: var(--red);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.45em 0 0.62em;
}

.markdown-body h1:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: 1.8rem;
}

.markdown-body h2 {
  font-size: 1.36rem;
}

.markdown-body h3 {
  font-size: 1.12rem;
}

.markdown-body p {
  margin: 0.75em 0;
}

.markdown-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-cool);
}

.markdown-body blockquote {
  margin: 1em 0;
  padding: 8px 14px;
  border-left: 3px solid var(--gold);
  background: #fff8e8;
  color: var(--muted);
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5em;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4em 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1em 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.markdown-body table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--surface-cool);
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.document-page {
  background: var(--surface-cool);
}

.document-main {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 76px;
}

.document-heading {
  margin-bottom: 24px;
}

.document-heading h1 {
  font-size: 2.8rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 1060px) {
  .feature-grid,
  .download-panel,
  .download-notes,
  .boundary-list,
  .legal-grid,
  .legal-heading {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 12px 18px;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
  }

  .hero-section {
    padding-top: 36px;
    padding-right: 18px;
    padding-bottom: 34px;
    padding-left: 18px;
  }

  .section-band {
    padding: 48px 18px;
  }

  h1 {
    font-size: 2.48rem;
  }

  h2 {
    font-size: 1.68rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .download-meta {
    grid-template-columns: 1fr;
  }

  .legal-title-row,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-title-row {
    gap: 12px;
  }

  .document-surface {
    max-height: none;
    overflow: visible;
    padding: 18px;
  }

  .document-main {
    width: min(100% - 36px, 1060px);
    padding: 36px 0 54px;
  }

  .document-heading h1 {
    font-size: 2.12rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .brand {
    gap: 10px;
  }

  .brand-icon-wrap {
    width: 40px;
    height: 40px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .brand-text strong {
    font-size: 0.96rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-links a {
    width: 100%;
    padding-right: 8px;
    padding-left: 8px;
  }

  h1 {
    font-size: 2.18rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .download-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .feature-card,
  .boundary-list div,
  .legal-title-row {
    padding: 18px;
  }

  .site-footer {
    padding: 20px 18px;
  }

  .site-footer div {
    flex-direction: column;
    gap: 8px;
  }
}
