:root {
  --bg: #f7f7f4;
  --paper: #ffffff;
  --ink: #1e2422;
  --muted: #66706b;
  --line: #dfe3dc;
  --accent: #176b5c;
  --accent-2: #b3542f;
  --soft: #e9f0ec;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.88);
  backdrop-filter: blur(16px);
}

.brand,
.top-nav,
.hero-actions,
.client-grid article,
.metric-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
}

.top-nav {
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 72px 5vw 96px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-text {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 700;
}

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

.button.ghost {
  background: transparent;
}

.signal-panel {
  position: relative;
  min-height: 440px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 107, 92, 0.12), transparent 44%),
    var(--paper);
  overflow: hidden;
}

.orbit {
  position: relative;
  height: 250px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(30, 36, 34, 0.06) 24px);
}

.orbit::before {
  content: "";
  position: absolute;
  inset: 38px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.orbit::after {
  content: "低延迟 / 高可用 / 可持续";
  position: absolute;
  left: 22px;
  bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.orbit span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}

.orbit span:nth-child(1) {
  left: 34%;
  top: 22%;
}

.orbit span:nth-child(2) {
  right: 24%;
  top: 44%;
  background: var(--accent-2);
}

.orbit span:nth-child(3) {
  left: 48%;
  bottom: 26%;
  background: var(--ink);
}

.metric-row {
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.metric-row span {
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 72px 5vw;
}

.toc {
  position: sticky;
  top: 104px;
  align-self: start;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.toc p {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.toc a {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.content {
  display: grid;
  gap: 80px;
}

.section-heading {
  margin-bottom: 26px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.principles,
.glossary,
.client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.principles article,
.glossary article,
.recommend,
.client-grid article,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.principles article {
  min-height: 245px;
  padding: 24px;
}

.principles article:first-child {
  grid-row: span 2;
}

.num,
.tag {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.principles p,
.recommend p,
.glossary p,
.faq-list p {
  margin: 0;
  color: var(--muted);
}

.recommend-list {
  display: grid;
  gap: 14px;
}

.recommend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  padding: 24px;
}

.tag {
  margin: 0 0 8px;
}

.recommend ul {
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.recommend li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.glossary article {
  padding: 24px;
}

.client-grid article {
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 18px 20px;
}

.client-grid span {
  color: var(--muted);
  text-align: right;
}

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

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

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

.faq-list p {
  margin-top: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 5vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.home-kb,
.kb-hero,
.kb-layout,
.article-shell,
.article-pager {
  max-width: 1220px;
  margin: 0 auto;
  padding: 72px 5vw;
}

.home-kb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.home-kb p {
  max-width: 720px;
  color: var(--muted);
}

.kb-hero {
  padding-bottom: 36px;
}

.kb-hero h1 {
  max-width: 940px;
}

.kb-hero > p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.tool-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.filter-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.search-row {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 18px;
}

.search-row input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.kb-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding-top: 24px;
}

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

.kb-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 235px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.kb-card h3,
.kb-card p {
  margin: 0;
}

.kb-card p:not(.tag) {
  color: var(--muted);
}

.kb-card a:hover {
  color: var(--accent);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip-row span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.article-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 780px);
  gap: 64px;
  align-items: start;
}

.article-side {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.article-side p {
  margin: 16px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.article-side a {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.back-link {
  color: var(--accent);
  font-weight: 800;
}

.article-main {
  min-width: 0;
}

.article-main h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.article-lead {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 52px;
}

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

.article-main h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 36px);
}

.article-main p {
  color: var(--muted);
  font-size: 17px;
}

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

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

.note-box {
  padding: 28px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  background: var(--soft);
}

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

.related-grid a {
  display: grid;
  gap: 8px;
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.related-grid span {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.article-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 0;
}

.article-pager a {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-weight: 800;
}

.reading-mode .site-header,
.reading-mode .article-side,
.reading-mode .article-pager,
.reading-mode .site-footer {
  display: none;
}

.reading-mode {
  background: var(--paper);
}

.reading-mode .article-shell {
  display: block;
  max-width: 860px;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-block: 18px;
  }

  .top-nav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .layout,
  .recommend,
  .site-footer,
  .home-kb,
  .kb-layout,
  .article-shell,
  .article-pager {
    grid-template-columns: 1fr;
  }

  .home-kb,
  .article-pager {
    display: grid;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .signal-panel {
    min-height: auto;
  }

  .toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc p {
    grid-column: 1 / -1;
  }

  .principles,
  .glossary,
  .client-grid {
    grid-template-columns: 1fr;
  }

  .principles article:first-child {
    grid-row: auto;
  }

  .client-grid article {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-grid span {
    text-align: left;
  }

  .site-footer {
    display: grid;
  }

  .kb-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-side {
    position: static;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-inline: 20px;
  }

  .layout,
  .kb-hero,
  .kb-layout,
  .article-shell,
  .article-pager,
  .home-kb {
    padding: 48px 20px;
  }

  h1 {
    font-size: 42px;
  }

  .button {
    width: 100%;
  }

  .search-row,
  .article-actions {
    display: grid;
  }
}
