:root {
  color-scheme: light dark;
  --ink: #142033;
  --muted: #607087;
  --soft: #f4f7fb;
  --line: #d9e1ea;
  --panel: #ffffff;
  --page: #f4f7fb;
  --panel-2: #eef3f8;
  --header-bg: rgba(244, 247, 251, 0.88);
  --header-line: rgba(217, 225, 234, 0.82);
  --nav-ink: #405067;
  --nav-hover: #e9eef6;
  --hero-bg:
    radial-gradient(circle at 16% 18%, rgba(56, 161, 111, 0.18), transparent 30%),
    radial-gradient(circle at 82% 28%, rgba(79, 183, 196, 0.2), transparent 28%),
    linear-gradient(150deg, #ffffff 0%, #f4f7fb 48%, #e8eef6 100%);
  --tech-hero-bg:
    radial-gradient(circle at 16% 18%, rgba(47, 111, 237, 0.18), transparent 30%),
    radial-gradient(circle at 82% 28%, rgba(107, 92, 255, 0.15), transparent 28%),
    linear-gradient(150deg, #ffffff 0%, #f4f7fb 48%, #e8eef6 100%);
  --lead: #405067;
  --code-bg: #eef3f8;
  --dark: #0f1724;
  --dark-2: #172233;
  --blue: #2f6fed;
  --green: #38a16f;
  --orange: #f29a45;
  --cyan: #4fb7c4;
  --violet: #6b5cff;
  --shadow: 0 24px 70px rgba(16, 30, 54, 0.16);
  /* —— 语义别名（为将来换主色留口）—— */
  --accent: var(--blue);
  --success: var(--green);
  --warn: var(--orange);
  --green-dark: #1d6e58;
  /* —— 圆角令牌（统一当前 8/12/14/18 混用）—— */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  /* —— 间距令牌 —— */
  --space-card: 24px;
  /* —— 平台渐变对 —— */
  --platform-win: linear-gradient(135deg, #244b8f, #2f6fed);
  --platform-mac: linear-gradient(135deg, #1d6e58, #38a16f);
  --platform-linux: linear-gradient(135deg, #b45f21, #f29a45);
  --platform-android: linear-gradient(135deg, #2d2d5e, #5b5baa);
  /* —— 赞助品牌粉 —— */
  --sponsor-1: #ff6a9a;
  --sponsor-2: #c44cd6;
  /* —— 深色色带亮色文字 —— */
  --dark-accent-green: #86d7c0;
  --dark-accent-cyan: #90e1cb;
  --dark-accent-violet: #a8b4ff;
  --dark-accent-blue: #b8c8ff;
  /* —— 质粒图谱特征色（与 index.html 轮播一致）—— */
  --feature-1: #ffc344;
  --feature-2: #f06767;
  --feature-3: #3f62eb;
  --feature-4: #fce102;
  --feature-5: #5ed938;
  --feature-6: #8fdbe9;
  --feature-7: #fd7aff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body.preview-open {
  overflow: hidden;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.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(--header-line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: transparent;
  border: 0;
  font-weight: 800;
  box-shadow: none;
  overflow: hidden;
}

.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nav-ink);
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.24fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 56px 5vw 46px;
  overflow: hidden;
  background: var(--hero-bg);
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
}

.lead {
  max-width: 620px;
  color: var(--lead);
  font-size: 20px;
}

.hero-slogan {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--dark), #25334a);
  box-shadow: 0 16px 36px rgba(15, 23, 36, 0.2);
}

.button.secondary {
  border-color: var(--line);
  background: var(--panel);
}

.button:hover {
  transform: translateY(-1px);
}

.button-icon {
  margin-right: 8px;
  font-size: 16px;
}

.dropdown {
  position: relative;
}

.dropdown-arrow {
  margin-left: 6px;
  font-size: 12px;
  transition: transform 160ms ease;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(16, 30, 54, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 20;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: background 120ms ease;
}

.dropdown-menu a:hover {
  background: var(--nav-hover);
}

.dropdown-menu a svg,
.nav-dropdown-menu a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dropdown-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.gitee-icon-inline {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-fa-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--green);
  font-size: 16px;
}

.dropdown-menu button.local-dl-trigger,
.nav-dropdown-menu button.local-dl-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 161, 111, 0.12), rgba(79, 183, 196, 0.08));
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.dropdown-menu button.local-dl-trigger:hover,
.nav-dropdown-menu button.local-dl-trigger:hover,
.dropdown-menu button.local-dl-trigger:focus-visible,
.nav-dropdown-menu button.local-dl-trigger:focus-visible {
  border-color: rgba(56, 161, 111, 0.34);
  background: linear-gradient(135deg, rgba(56, 161, 111, 0.18), rgba(79, 183, 196, 0.12));
  outline: none;
  transform: translateY(-1px);
}

body.local-dl-open .dropdown:hover .dropdown-menu,
body.local-dl-open .nav-dropdown-wrapper:hover .nav-dropdown-menu,
body.local-dl-open .dropdown.open .dropdown-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.local-dl-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(7, 12, 20, 0.78);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.local-dl-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.local-dl-panel {
  width: min(560px, 100%);
  max-height: calc(100vh - 72px);
  overflow: auto;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.local-dl-header {
  margin-bottom: 16px;
}

.local-dl-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.local-dl-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dl-step {
  transition: opacity 200ms ease;
}

.dl-platform-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-platform-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.dl-platform-card:hover,
.dl-platform-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(16, 30, 54, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.dl-platform-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid rgba(56, 161, 111, 0.26);
  border-radius: 12px;
  background: rgba(56, 161, 111, 0.1);
  color: var(--green);
  font-size: 24px;
}

.dl-platform-name {
  flex: 1;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
}

.dl-platform-arrow {
  color: var(--muted);
  font-size: 14px;
  transition: transform 140ms ease;
}

.dl-platform-card:hover .dl-platform-arrow {
  transform: translateX(3px);
}

.dl-back-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dl-back-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.dl-back-btn:hover,
.dl-back-btn:focus-visible {
  border-color: var(--green);
  background: rgba(56, 161, 111, 0.08);
  outline: none;
}

.dl-platform-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
}

.dl-platform-info i {
  color: var(--green);
  font-size: 20px;
}

.dl-sources-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dl-file-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dl-file-section:hover {
  border-color: rgba(56, 161, 111, 0.42);
  box-shadow: 0 10px 26px rgba(16, 30, 54, 0.09);
  transform: translateY(-1px);
}

.dl-file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px 16px 13px;
}

.dl-file-name {
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.dl-file-size {
  flex-shrink: 0;
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

.dl-source-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.dl-source-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
  position: relative;
}

.dl-source-btn:hover,
.dl-source-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.dl-source-btn.direct:hover,
.dl-source-btn.direct:focus-visible {
  border-color: var(--green);
  background: rgba(56, 161, 111, 0.08);
}

.dl-source-btn.gitee:hover,
.dl-source-btn.gitee:focus-visible {
  border-color: #c71d23;
  background: rgba(199, 29, 35, 0.06);
}

.dl-source-btn.github:hover,
.dl-source-btn.github:focus-visible {
  border-color: #24292e;
  background: rgba(36, 41, 46, 0.06);
}

.dl-source-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffc107;
  color: #333;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}

/* Spark Store iframe embed */
.dl-spark-section .dl-file-header {
  padding-bottom: 12px;
}

.dl-spark-iframe-wrapper {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}

.dl-spark-iframe-wrapper iframe {
  max-width: 100%;
  border: 1px solid var(--border-color, rgba(0,0,0,0.1));
  border-radius: 8px;
}

.local-dl-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.local-dl-close:hover,
.local-dl-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

body.local-dl-open {
  overflow: hidden;
}

/* macOS unsigned app warning */
.dl-mac-warning {
  margin-top: 4px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.06);
  overflow: hidden;
}

.dl-mac-warning-title {
  padding: 12px 14px 6px;
  font-size: 14px;
  font-weight: 700;
  color: #ffc107;
}

.dl-mac-warning-body {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dl-mac-warning-body p {
  margin: 0 0 8px;
}

.dl-mac-warning-body ol {
  margin: 6px 0 8px;
  padding-left: 20px;
}

.dl-mac-warning-body li {
  margin-bottom: 5px;
}

.dl-mac-warning-body code {
  display: inline-block;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--panel);
  font-size: 12px;
  word-break: break-all;
}

.dl-mac-warning-body strong {
  color: var(--ink);
}

/* macOS one-line Terminal install (primary, quarantine-free) */
.dl-arch-group {
  margin-bottom: 20px;
}

.dl-arch-group:last-child {
  margin-bottom: 0;
}

.dl-arch-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 5px 13px 5px 11px;
  border-radius: 999px;
  background: rgba(56, 161, 111, 0.1);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dl-arch-title i {
  font-size: 11px;
}

.dl-mac-install {
  border: 1px solid rgba(56, 161, 111, 0.35);
  border-radius: 10px;
  background: rgba(56, 161, 111, 0.06);
  padding: 14px 14px 12px;
  margin-bottom: 12px;
}

.dl-mac-install-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.dl-mac-install-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dl-mac-install-desc strong {
  color: var(--ink);
}

.dl-mac-cmd {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.dl-mac-cmd code {
  display: block;
  padding: 12px 14px;
  border-radius: 7px;
  background: #161e2e;
  color: #e8edf5;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-height: 340px;
}

.dl-mac-install-tools {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dl-mac-install-tools strong {
  color: var(--ink);
}

.dl-mac-copy-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border: 1px solid rgba(56, 161, 111, 0.5);
  border-radius: 7px;
  background: rgba(56, 161, 111, 0.12);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.dl-mac-copy-btn:hover,
.dl-mac-copy-btn:focus-visible {
  background: rgba(56, 161, 111, 0.22);
  border-color: var(--green);
  outline: none;
}

.dl-mac-copy-btn.copied {
  background: rgba(56, 161, 111, 0.25);
  color: var(--green-dark);
}

.dl-mac-install-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* Collapsed manual download fallback */
.dl-mac-manual {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  overflow: hidden;
}

.dl-mac-manual summary {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  background: var(--soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  transition: background 160ms ease;
}

.dl-mac-manual summary::-webkit-details-marker {
  display: none;
}

.dl-mac-manual[open] summary {
  border-bottom: 1px solid var(--line);
}

.dl-mac-manual summary:hover {
  background: #e9eef6;
}

.dl-mac-manual-body {
  padding: 12px 14px 14px;
}

.dl-mac-manual-body > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dl-mac-manual-body .dl-file-section {
  margin-bottom: 10px;
}

.dl-mac-manual-body .dl-mac-warning {
  margin-top: 6px;
}

.nav-dropdown-wrapper {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(16, 30, 54, 0.16);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 20;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: background 120ms ease;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--nav-hover);
}

.nav-download {
  color: var(--blue) !important;
  font-weight: 700;
}

.nav-download-trigger {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav-download-trigger:hover,
.nav-download-trigger:focus-visible {
  background: var(--nav-hover);
  outline: none;
}

.lang-switcher {
  position: relative;
  margin-left: 4px;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--nav-ink);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease;
}

.lang-switcher-icon {
  font-size: 15px;
  line-height: 1;
}

.lang-switcher-btn:hover {
  background: var(--nav-hover);
}

.lang-switcher-arrow {
  font-size: 10px;
  transition: transform 160ms ease;
}

.lang-switcher:hover .lang-switcher-arrow,
.lang-switcher.open .lang-switcher-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(16, 30, 54, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 20;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease;
}

.lang-dropdown button:hover {
  background: var(--nav-hover);
}

.lang-dropdown button.active {
  color: var(--blue);
}

.lang-dropdown button.active::before {
  content: "✓";
  font-size: 12px;
}

.lang-dropdown button:not(.active)::before {
  content: "";
  width: 12px;
}

.hero-stats {
  display: grid;
  gap: 14px;
  margin: 0;
}

.hero-stats div {
  padding-left: 16px;
  border-left: 3px solid var(--green);
}

.hero-stats dt {
  font-weight: 800;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.hero-shot {
  position: relative;
  border: 1px solid rgba(152, 166, 185, 0.45);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #eef4fa);
  box-shadow: var(--shadow);
  overflow: visible;
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
}

.preview-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  overflow: hidden;
}

.preview-trigger::after {
  content: var(--preview-hint, "点击预览");
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 36, 0.76);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.preview-trigger:hover::after,
.preview-trigger:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.preview-trigger:hover img,
.preview-trigger:focus-visible img {
  transform: scale(1.025);
}

.preview-trigger:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.42);
  outline-offset: 3px;
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  transition: opacity 180ms ease, transform 220ms ease;
}

.hero-shot img.is-changing {
  opacity: 0.28;
}

.hero-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 36, 0.58);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
}

.hero-carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, width 140ms ease;
}

.hero-carousel-dots button:hover,
.hero-carousel-dots button:focus-visible {
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.hero-carousel-dots button.active {
  width: 18px;
  background: #fff;
}

.section {
  padding: 84px 5vw;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.feature-band {
  color: #fff;
  background:
    radial-gradient(circle at 12% 12%, rgba(79, 183, 196, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(47, 111, 237, 0.18), transparent 38%),
    var(--dark);
}

.feature-band .eyebrow {
  color: #86d7c0;
}

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

.feature {
  min-height: 260px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feature p {
  margin-bottom: 0;
  color: #bdc9d8;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 34px;
  border-radius: 10px;
  background: rgba(144, 225, 203, 0.12);
  color: #90e1cb;
  font-size: 18px;
  font-weight: 800;
}

.why-section {
  background: var(--panel);
}

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

.why-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.why-card > i {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 18px;
}

.why-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: 36px;
  align-items: center;
  background: var(--panel);
}

.split p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.mode-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode-preview .preview-trigger,
.gallery figure {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(16, 30, 54, 0.1);
  overflow: hidden;
}

.mode-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gallery-section {
  background: var(--panel-2);
}

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

.gallery figure {
  margin: 0;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 46px rgba(16, 30, 54, 0.15);
}

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gallery figcaption {
  padding: 12px 14px 14px;
  color: var(--ink);
  font-weight: 800;
}

.platform-section {
  background: var(--panel);
}

.platforms {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.platforms span {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(16, 30, 54, 0.12);
}

.platform-icon {
  font-size: 48px;
  margin-bottom: 4px;
}

.platforms span:nth-child(2) {
  background: linear-gradient(135deg, #244b8f, var(--blue));
}

.platforms span:nth-child(3) {
  background: linear-gradient(135deg, #1d6e58, var(--green));
}

.platforms span:nth-child(4) {
  background: linear-gradient(135deg, #b45f21, var(--orange));
}

.platforms span:nth-child(5) {
  background: linear-gradient(135deg, #2d2d5e, #5b5baa);
}

.platform-icon-svg {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}

.platform-coming small {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-top: -4px;
}

.feedback-section {
  background: var(--panel-2);
}

.feedback-desc {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 28px;
}

.feedback-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 680px;
}

.feedback-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(16, 30, 54, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feedback-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(16, 30, 54, 0.12);
}

.feedback-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.feedback-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.feedback-card span {
  color: var(--muted);
  font-size: 13px;
}

.sponsor-section {
  background: var(--panel);
}

.sponsor-desc {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 28px;
}

.sponsor-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 680px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(232, 98, 156, 0.1), rgba(196, 76, 214, 0.07));
  box-shadow: 0 8px 24px rgba(16, 30, 54, 0.06);
  text-decoration: none;
  color: var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(232, 98, 156, 0.2);
}

.sponsor-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6a9a, #c44cd6);
  color: #fff;
}

.sponsor-icon svg {
  width: 24px;
  height: 24px;
}

.sponsor-body strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.sponsor-body span {
  color: var(--muted);
  font-size: 13px;
}

.sponsor-cta {
  margin-left: auto;
  font-weight: 700;
  font-size: 14px;
  color: #c44c8a;
  white-space: nowrap;
}

.nav-sponsor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e85a8c !important;
  font-weight: 700;
}

.nav-sponsor:hover {
  color: #c44c8a !important;
}

.license-sponsor {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff6a9a, #c44cd6);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.license-sponsor:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(232, 98, 156, 0.35);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.platform-note {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
}

.license-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(320px, 1fr);
  gap: 36px;
  align-items: start;
  color: #fff;
  background: var(--dark);
}

.license-section .eyebrow {
  color: #90e1cb;
}

.notice {
  padding: 28px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.notice p {
  margin-bottom: 12px;
  color: #e3e9f2;
  font-size: 18px;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 5vw;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(7, 12, 20, 0.84);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-panel {
  width: min(1180px, 100%);
  max-height: calc(100vh - 86px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: #101827;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.lightbox-panel img {
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: #0b111d;
}

.lightbox-panel figcaption {
  padding: 12px 16px 14px;
  color: #f4f7fb;
  font-weight: 800;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.tech-hero {
  background: var(--tech-hero-bg);
}

.hero-card-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.card-float {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(16, 30, 54, 0.08);
  transition: transform 180ms ease;
}

.card-float:hover {
  transform: translateX(6px);
}

.card-label {
  font-weight: 800;
  font-size: 15px;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
}

.card-detail {
  color: var(--muted);
  font-size: 13px;
}

.card-float-1 { transform: rotate(-1deg); }
.card-float-2 { transform: rotate(0.5deg); }
.card-float-3 { transform: rotate(-0.3deg); }
.card-float-4 { transform: rotate(0.8deg); }

.card-float-1:hover { transform: rotate(-1deg) translateX(6px); }
.card-float-2:hover { transform: rotate(0.5deg) translateX(6px); }
.card-float-3:hover { transform: rotate(-0.3deg) translateX(6px); }
.card-float-4:hover { transform: rotate(0.8deg) translateX(6px); }

.tech-overview {
  background: var(--panel);
}

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

.overview-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
}

.overview-card .icon {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 800;
}

.overview-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.schema-band {
  color: #d6dee8;
  background:
    radial-gradient(circle at 88% 0%, rgba(47, 111, 237, 0.12), transparent 42%),
    linear-gradient(160deg, #1b2638 0%, #131c2c 100%);
}

.schema-band .eyebrow {
  color: #8fa6c6;
}

.schema-band h2 {
  color: #e6ecf4;
}

.schema-band .schema-body p,
.schema-band .schema-body li {
  color: #b4c0d0;
}

.schema-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schema-item {
  border: 1px solid rgba(143, 166, 198, 0.16);
  border-radius: 8px;
  background: rgba(143, 166, 198, 0.05);
  overflow: hidden;
}

.schema-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  list-style: none;
  transition: background 160ms ease;
}

.schema-item summary::-webkit-details-marker {
  display: none;
}

.schema-item summary::before {
  content: "▸";
  font-size: 14px;
  color: #7faedc;
  transition: transform 160ms ease;
}

.schema-item[open] summary::before {
  transform: rotate(90deg);
}

.schema-item summary:hover {
  background: rgba(143, 166, 198, 0.08);
}

.schema-item summary strong {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-weight: 700;
  color: #e6ecf4;
}

.schema-item summary span {
  color: #94a4ba;
  font-size: 13px;
}

.schema-body {
  padding: 0 20px 20px;
}

.schema-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.schema-body thead th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(143, 166, 198, 0.22);
  color: #aebdd2;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schema-body tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(143, 166, 198, 0.1);
  color: #c8d2e0;
}

.schema-body tbody tr:last-child td {
  border-bottom: none;
}

.schema-body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(214, 173, 110, 0.14);
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 12px;
  color: #e0bd86;
}

.schema-note {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-left: 3px solid #4f7bb8;
  border-radius: 0 6px 6px 0;
  background: rgba(79, 123, 184, 0.14);
  color: #b4c0d0;
  font-size: 13px;
  line-height: 1.6;
}

.schema-note code {
  background: rgba(214, 173, 110, 0.14);
  color: #e0bd86;
}

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

.encoding-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.encoding-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.encoding-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.workflow-band {
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(56, 161, 111, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(79, 183, 196, 0.15), transparent 40%),
    var(--dark);
}

.workflow-band .eyebrow {
  color: #86d7c0;
}

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

.workflow-step {
  display: flex;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.step-num {
  flex-shrink: 0;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: var(--dark);
  background: #86d7c0;
  font-weight: 800;
  font-size: 18px;
}

.workflow-step h3 {
  margin-bottom: 8px;
  color: #e3e9f2;
  font-size: 18px;
}

.workflow-step p {
  margin-bottom: 0;
  color: #8b9ab5;
  font-size: 14px;
  line-height: 1.6;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #eef3f8;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.9em;
}

.source-section {
  background: var(--panel);
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.source-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.source-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  background: var(--soft);
  list-style: none;
  transition: background 160ms ease;
}

.source-item summary::-webkit-details-marker {
  display: none;
}

.source-item summary::before {
  content: "▸";
  font-size: 14px;
  color: var(--blue);
  transition: transform 160ms ease;
}

.source-item[open] summary::before {
  transform: rotate(90deg);
}

.source-item summary:hover {
  background: #e9eef6;
}

.source-item summary strong {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-weight: 700;
}

.source-item summary span {
  color: var(--muted);
  font-size: 13px;
}

.code-block {
  margin: 0;
  padding: 20px 22px;
  max-height: 600px;
  overflow: auto;
  background: #1a2336;
  color: #c8d2e0;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
  border: 1px solid rgba(143, 166, 198, 0.14);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.code-block code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

@media (max-width: 1020px) {
  .hero,
  .split,
  .license-section {
    grid-template-columns: 1fr;
  }

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

  .hero-shot {
    transform: none;
  }

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

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

  .workflow-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 16px;
  }

  .nav-toggle {
    display: grid;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 14px 34px rgba(16, 30, 54, 0.12);
  }

  .site-header.nav-open .nav {
    display: grid;
    gap: 4px;
  }

  .nav a {
    padding: 10px 12px;
  }

  .nav-dropdown-wrapper {
    display: flex;
    flex-direction: column;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    opacity: 1;
    visibility: visible;
    background: none;
  }

  .nav-dropdown-wrapper:hover .nav-dropdown-menu {
    transform: none;
  }

  .dropdown {
    position: relative;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 4px 0 0;
    margin: 0;
    background: none;
  }

  .dropdown:hover .dropdown-menu {
    transform: none;
  }

  .lang-switcher {
    display: flex;
    flex-direction: column;
  }

  .lang-switcher-btn {
    display: none;
  }

  .lang-dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    background: none;
    padding: 0 0 0 16px;
  }

  .lang-dropdown button {
    padding: 8px 12px;
  }

  .hero,
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    gap: 28px;
    padding-top: 18px;
    padding-bottom: 36px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-shot,
  .hero-card-stack {
    order: -1;
  }

  .hero-shot img {
    aspect-ratio: 16 / 11;
  }

  h1 {
    font-size: clamp(40px, 14vw, 64px);
  }

  h2 {
    font-size: clamp(26px, 9vw, 36px);
  }

  .lead {
    font-size: 17px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin: 24px 0;
  }

  .button {
    width: 100%;
  }

  .hero-stats div {
    padding-left: 12px;
  }

  .mode-preview,
  .feature-grid,
  .gallery,
  .platforms,
  .overview-grid,
  .encoding-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    min-height: auto;
  }

  .platforms span {
    min-height: 84px;
  }

  .feedback-links {
    grid-template-columns: 1fr;
  }

  .schema-body {
    overflow-x: auto;
  }

  .schema-body table {
    min-width: 620px;
  }

  .schema-item summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .schema-item summary::before {
    display: none;
  }

  .workflow-step {
    flex-direction: column;
  }

.lightbox {
    padding: 16px;
  }

  .lightbox-panel {
    max-height: calc(100vh - 72px);
  }

  .lightbox-panel img {
    max-height: calc(100vh - 126px);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e3e9f2;
    --muted: #8b9ab5;
    --soft: #172233;
    --line: #2a3a52;
    --panel: #0f1724;
    --page: #0b111d;
    --panel-2: #131d2e;
    --header-bg: rgba(11, 17, 29, 0.88);
    --header-line: rgba(42, 58, 82, 0.82);
    --nav-ink: #8b9ab5;
    --nav-hover: #1e2d44;
    --hero-bg:
      radial-gradient(circle at 16% 18%, rgba(56, 161, 111, 0.12), transparent 30%),
      radial-gradient(circle at 82% 28%, rgba(79, 183, 196, 0.14), transparent 28%),
      linear-gradient(150deg, #0b111d 0%, #0f1724 48%, #131d2e 100%);
    --tech-hero-bg:
      radial-gradient(circle at 16% 18%, rgba(47, 111, 237, 0.12), transparent 30%),
      radial-gradient(circle at 82% 28%, rgba(107, 92, 255, 0.10), transparent 28%),
      linear-gradient(150deg, #0b111d 0%, #0f1724 48%, #131d2e 100%);
    --lead: #a0b4cc;
    --code-bg: #1a2a40;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    --green-dark: #2f855a;
    --sponsor-1: #ff8ab5;
    --sponsor-2: #d76be8;
  }

  .hero-shot {
    border-color: rgba(80, 100, 130, 0.35);
  }

}

@media (max-width: 460px) {
  .site-header {
    padding: 14px 16px;
  }

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

  .section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-mark img {
    width: 36px;
    height: 36px;
  }

  .hero-shot,
  .mode-preview .preview-trigger,
  .gallery figure {
    border-radius: 8px;
  }

  .feature,
  .why-card,
  .overview-card,
  .encoding-card,
  .workflow-step,
  .notice {
    padding: 20px;
  }

  .local-dl-modal {
    padding: 16px;
  }

  .local-dl-panel {
    padding: 22px 18px 18px;
  }

  .local-dl-external {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 24px 16px;
  }
}

/* ============================================================
   技术文档布局：左侧目录 + 右侧正文（说明书风格）
   ============================================================ */

.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 5vw 64px;
  align-items: start;
}

/* —— 左侧目录 —— */
.doc-toc {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 4px 20px 4px 0;
  border-right: 1px solid var(--line);
  font-size: 14px;
}

.doc-toc-home {
  display: block;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--ink);
}

.doc-toc-home:hover {
  background: var(--nav-hover);
}

.doc-toc-group {
  margin: 16px 12px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-toc a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--lead);
  line-height: 1.45;
  transition: background 140ms ease, color 140ms ease;
}

.doc-toc a:hover {
  background: var(--nav-hover);
  color: var(--ink);
}

.doc-toc a.current {
  background: rgba(47, 111, 237, 0.1);
  color: var(--blue);
  font-weight: 700;
}

/* —— 右侧正文 —— */
.doc-content {
  padding: 4px 0 0 40px;
  min-width: 0;
}

.doc-breadcrumb {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}

.doc-breadcrumb a {
  color: var(--muted);
}

.doc-breadcrumb a:hover {
  color: var(--blue);
}

.doc-head {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.doc-head .lead {
  max-width: 680px;
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--lead);
}

.doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-tag {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--lead);
  font-size: 12px;
  font-weight: 600;
}

/* —— Hub 目录条目 —— */
.doc-entry {
  display: block;
  padding: 14px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.doc-entry:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(16, 30, 54, 0.08);
  transform: translateY(-1px);
}

.doc-entry strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.doc-entry span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* —— 正文区段落（替代原 .section 大间距）—— */
.doc-content .doc-section {
  margin: 0 0 40px;
}

.doc-content .doc-section:last-child {
  margin-bottom: 0;
}

.doc-content .doc-section > .section-heading {
  margin-bottom: 16px;
}

/* 正文区限宽，保证可读 */
.doc-prose {
  max-width: 760px;
}

/* —— 正文浅色表格与提示（非 schema-band 区域）—— */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}

.doc-table thead th {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--lead);
  vertical-align: top;
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--code-bg);
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 12px;
  color: var(--blue);
}

.doc-note {
  margin: 14px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  background: var(--panel-2);
  color: var(--lead);
  font-size: 13px;
  line-height: 1.6;
}

.doc-note code {
  background: var(--code-bg);
}

.doc-prose p,
.doc-prose ul {
  color: var(--lead);
  line-height: 1.75;
}

.doc-prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--code-bg);
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.92em;
  color: var(--blue);
}

/* 正文里的 schema-band（深色数据区）保留，作为深色卡片 */
.doc-content .schema-band {
  border-radius: var(--radius-md);
  margin: 0 0 32px;
  padding: 32px;
}

.doc-content .schema-band .section-heading {
  margin-bottom: 18px;
}

/* schema-band 内的 code / code-block 覆盖正文浅色样式（提升特异度） */
.doc-content .schema-band .schema-body code,
.doc-content .schema-band .schema-note code {
  background: rgba(214, 173, 110, 0.14);
  color: #e0bd86;
}

.doc-content .schema-band .code-block {
  background: #1a2336;
  color: #c8d2e0;
  border: 1px solid rgba(143, 166, 198, 0.14);
  border-left: 1px solid rgba(143, 166, 198, 0.14);
  border-radius: 8px;
}

.doc-content .schema-band .code-block code {
  background: none;
  color: inherit;
}

/* —— 移动端：目录收成抽屉 —— */
.doc-toc-toggle {
  display: none;
}

@media (max-width: 1020px) {
  .doc-layout {
    grid-template-columns: 1fr;
    padding: 20px 5vw 48px;
    gap: 0;
  }

  .doc-toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }

  .doc-toc-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .doc-toc-toggle::after {
    content: "▾";
    margin-left: auto;
    transition: transform 160ms ease;
  }

  .doc-toc.open .doc-toc-toggle::after {
    transform: rotate(180deg);
  }

  /* 默认折叠目录项；.open 时展开 */
  .doc-toc .doc-toc-home,
  .doc-toc .doc-toc-group,
  .doc-toc a:not(.doc-toc-toggle) {
    display: none;
  }

  .doc-toc.open .doc-toc-home,
  .doc-toc.open .doc-toc-group,
  .doc-toc.open a:not(.doc-toc-toggle) {
    display: block;
  }

  .doc-content {
    padding: 24px 0 0;
  }

  .doc-content .schema-band {
    padding: 24px 20px;
  }
}

@media (max-width: 460px) {
  .doc-content .schema-band {
    padding: 20px 16px;
  }

  .doc-head h1 {
    font-size: clamp(24px, 8vw, 32px);
  }
}

