:root {
  --bg: #f6f8fb;
  --surface: #fff;
  --text: #1a2332;
  --text-muted: #5c6b7f;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --border: #e5e9f0;
  --warn-bg: #fff7ed;
  --warn-border: #fdba74;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  opacity: 0.9;
}

.shell {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.shell--with-toc {
  max-width: 72rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(11.5rem, 14rem) minmax(0, 1fr);
  gap: 2rem 2.5rem;
}

.toc-sidebar {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.article-main {
  min-width: 0;
  max-width: 44rem;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
}

.site-nav .brand {
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
}

.site-nav .brand:hover {
  opacity: 1;
  color: var(--accent);
}

.site-nav .nav-cta {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.45rem 0.95rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.site-nav .nav-cta:hover {
  opacity: 1;
  filter: brightness(1.06);
}

.site-nav .nav-link {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav .nav-link:hover {
  opacity: 1;
  color: var(--accent);
}

.legal-doc section {
  margin-top: 2rem;
}

.legal-doc section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.legal-doc section h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.legal-doc section p,
.legal-doc section li {
  color: var(--text-muted);
}

.legal-doc section ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

.legal-doc__meta {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal-doc__contact {
  margin: 1rem 0 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-doc__contact p {
  margin: 0 0 0.35rem;
  color: inherit;
}

.legal-doc__contact p:last-child {
  margin-bottom: 0;
}

.legal-doc__contact a {
  word-break: break-all;
}

header.page-head {
  margin-bottom: 1.75rem;
}

.doc-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.breadcrumb {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--text-muted);
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin: 0 0.4rem;
  color: var(--text-muted);
  opacity: 0.55;
  user-select: none;
}

.breadcrumb__item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb__item a:hover {
  color: var(--accent);
  text-decoration: underline;
  opacity: 1;
}

.breadcrumb__item--current span {
  display: inline-block;
  max-width: min(100%, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  color: var(--text);
  font-weight: 500;
}

header.page-head .breadcrumb + .doc-meta {
  margin-top: 0.35rem;
  margin-bottom: 0.85rem;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #0f172a;
}

.lead {
  font-size: 1.08rem;
  color: var(--text-muted);
}

.note-inline {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  font-size: 0.95rem;
}

.note-inline strong {
  color: var(--text);
}

nav.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin: 0;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  line-height: 1.55;
}

nav.toc strong {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

nav.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
}

nav.toc li {
  margin: 0.3rem 0;
}

nav.toc a {
  color: var(--text-muted);
  text-decoration: none;
}

nav.toc a:hover {
  color: var(--accent);
  opacity: 1;
}

article section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 1.25rem;
}

h2 {
  font-size: 1.28rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: #0f172a;
}

h3 {
  font-size: 1.08rem;
  margin: 1.35rem 0 0.5rem;
  color: #172033;
}

p {
  margin: 0 0 0.9rem;
}

ul,
ol {
  margin: 0 0 0.95rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.35rem;
}

.callout-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

.callout-warn strong {
  color: #9a3412;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
}

pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.article-figure {
  margin: 1.4rem 0 1.7rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-figure figcaption {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.empty-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  color: var(--text-muted);
  margin: 0;
}

.article-search {
  margin: 1.5rem 0 0;
}

.article-search__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.article-search__field {
  position: relative;
}

.article-search__input {
  width: 100%;
  margin: 0;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.article-search__input::placeholder {
  color: var(--text-muted);
}

.article-search__input:hover {
  border-color: #cbd5e1;
}

.article-search__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.article-search__status {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-search__empty {
  margin-top: 1rem;
}

.article-list {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
  padding: 0;
  list-style: none;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.article-card h2 {
  border: 0;
  padding: 0;
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
}

.article-card h2 a {
  color: inherit;
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
  opacity: 1;
}

.article-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.article-card .doc-meta {
  margin-bottom: 0.35rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: #0f172a;
  background: #eef3f8;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-top: 0;
  font-size: 1.02rem;
}

.social-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 2.25rem 0 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.social-share strong {
  margin-right: 0.15rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.social-share a {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.social-share a:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

footer.page-foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  right: max(1rem, calc((100vw - 44rem) / 2 - 4rem));
  bottom: 1.25rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: #0f172a;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.back-to-top:hover,
.back-to-top:focus {
  opacity: 1;
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

body:has(.shell--with-toc) .back-to-top {
  right: max(1rem, calc((100vw - 72rem) / 2 + 1rem));
}

body.tv-site:has(.shell--with-toc) .tv-back-to-top {
  right: max(1.25rem, calc((100vw - 72rem) / 2 + 1rem));
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

  nav.toc {
    margin-bottom: 2rem;
  }

  .article-main {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .shell {
    padding-top: 1.25rem;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }

  body:has(.shell--with-toc) .back-to-top {
    right: 1rem;
  }

  body.tv-site:has(.shell--with-toc) .tv-back-to-top {
    right: 1rem;
    bottom: 1rem;
  }

  table {
    min-width: 20rem;
  }
}

/* —— 首页落地页 —— */

.shell--landing {
  max-width: 56rem;
}

.hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  margin-bottom: 1rem;
}

.hero .lead {
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.35rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  opacity: 1;
  filter: brightness(1.05);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: #0f172a;
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.hero-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}

.feature-card h2 {
  border: 0;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.landing-section {
  margin: 3rem 0;
  scroll-margin-top: 1.25rem;
}

.landing-section > h2 {
  text-align: center;
  border: 0;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 1.55rem;
}

.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
  font-size: 0.98rem;
}

.download-zone {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 100%);
  color: #e2e8f0;
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.download-zone > h2 {
  color: #fff;
  border: 0;
  padding: 0;
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 1.45rem;
}

.download-zone .section-intro {
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.download-card:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.download-card strong {
  color: #fff;
  font-size: 1rem;
}

.download-card span {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
}

.download-card .dl-action {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.02em;
}

.download-footnote {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
}

.download-footnote a {
  color: #93c5fd;
}

.about-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.about-block p:last-child {
  margin-bottom: 0;
}

.site-nav .nav-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .feature-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
