:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-muted: #eef2ef;
  --ink: #202124;
  --muted: #667085;
  --line: #d9dee3;
  --accent: #b43b35;
  --accent-2: #2f7d62;
  --accent-3: #b7791f;
  --accent-4: #4257a6;
  --shadow: 0 18px 45px rgba(31, 35, 40, 0.09);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(217, 222, 227, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--accent) 0 40%, transparent 40%),
    linear-gradient(225deg, var(--accent-2) 0 48%, transparent 48%),
    linear-gradient(45deg, var(--accent-3), var(--accent-4));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.1;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.topnav a,
.doc-link {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #3b4148;
  font-size: 0.86rem;
  line-height: 1;
  padding: 9px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover,
.doc-link:hover {
  border-color: var(--line);
  background: #f2f4f6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 32px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 32px 24px;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero p {
  max-width: 760px;
  color: #48515c;
  font-size: 1.08rem;
  margin: 18px 0 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #39414a;
  font-size: 0.86rem;
  line-height: 1;
  padding: 8px 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.dot.green {
  background: var(--accent-2);
}

.dot.gold {
  background: var(--accent-3);
}

.asset-panel {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(48px, 1fr));
  gap: 10px;
  padding: 14px;
}

.asset-grid img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  background: #e9ecef;
}

.asset-caption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 12px 14px;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 56px;
}

.sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  max-height: calc(100vh - 88px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(31, 35, 40, 0.06);
}

.sidebar-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-section:last-child {
  border-bottom: 0;
}

.sidebar h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: uppercase;
}

.doc-list {
  display: grid;
  gap: 6px;
}

.doc-link {
  display: block;
  line-height: 1.25;
  padding: 10px 11px;
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  color: #38404a;
  font-size: 0.88rem;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: #e8ebee;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.content {
  min-width: 0;
}

.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.application-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.application-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.application-card span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: #435047;
  font-size: 0.78rem;
  line-height: 1;
  padding: 6px 9px;
}

.application-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.28;
  margin-top: 12px;
}

.application-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
  margin-top: 5px;
}

.article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 35, 40, 0.05);
  margin-bottom: 22px;
  overflow: hidden;
}

.loading-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  margin-bottom: 22px;
  padding: 18px;
}

.error-state {
  border-color: rgba(180, 59, 53, 0.35);
  background: #fff4f2;
  color: #7a2e29;
}

.noscript-warning {
  border-top: 1px solid rgba(180, 59, 53, 0.35);
  background: #fff4f2;
  color: #7a2e29;
  padding: 16px 32px;
}

.article-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8faf8);
  padding: 26px 30px 22px;
}

.article-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.article-header h2 {
  margin: 7px 0 0;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.article-body {
  padding: 24px 30px 34px;
}

.article-body h1 {
  display: none;
}

.article-body h2 {
  margin: 34px 0 12px;
  font-size: 1.42rem;
  line-height: 1.26;
  letter-spacing: 0;
  padding-top: 2px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 24px 0 10px;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.article-body p {
  margin: 12px 0;
}

.article-body ul,
.article-body ol {
  margin: 12px 0 18px;
  padding-left: 1.35rem;
}

.article-body li {
  margin: 6px 0;
}

.article-body code {
  border: 1px solid #d8dde3;
  border-radius: 5px;
  background: #f1f3f5;
  color: #a0342f;
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 0.08em 0.32em;
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f0f3f1;
  color: #2c343c;
  font-size: 0.86rem;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

td.align-right,
th.align-right {
  text-align: right;
}

.article-body blockquote {
  margin: 18px 0;
  border-left: 4px solid var(--accent-2);
  background: #f0f5f2;
  padding: 12px 16px;
  color: #35423b;
}

.footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 42px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

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

  .application-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }

  .hero,
  .layout,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .overview {
    grid-template-columns: 1fr;
  }

  .article-header,
  .article-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .asset-grid {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 6px;
  }
}
