/* ==========================================================================
   swiftPDM 官网样式（单文件，无第三方框架）
   --------------------------------------------------------------------------
   视觉：深空底色 + 青色/紫色渐变点缀 + 浅色内容区
   约束：字号只用 12/13/14/15/16/17/18 与 h1/h2；组件只有按钮、表格、
        分隔线列表、问答行；不使用图标字体、不使用图片背景。
   ========================================================================== */

:root {
  /* 文字与背景 */
  --ink: #0b1626;
  --ink-soft: #283749;
  --muted: #566274;
  --line: #e1e8f2;
  --soft: #f3f8ff;

  /* 深色区 */
  --dark: #071a33;
  --dark-2: #0a2547;
  --on-dark: #e9f1fb;
  --on-dark-soft: #c3d3e8;
  --on-dark-muted: #a9bcd6;

  /* 强调色 */
  --cyan: #22d3ee;
  --blue: #2563eb;
  --sky: #60a5fa;
  --accent: #1d4ed8;
  --accent-dark: #1e40af;

  --radius: 6px;
  --max: 1060px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(59, 130, 246, 0.28);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

strong {
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: min(var(--max), 100% - 48px);
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
  text-decoration: none;
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(10, 17, 28, 0.08);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.55);
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  position: relative;
  font-size: 15px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.lang-switch button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.lang-switch button:hover {
  color: var(--ink);
  background: var(--soft);
}

.lang-switch button[aria-pressed="true"] {
  color: var(--accent);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.nav-toggle span[aria-hidden="true"] {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
}

/* ---------- 首屏：深色科技底 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px);
  background: linear-gradient(155deg, #08203f 0%, #0b2f5c 52%, #0e4079 100%);
  color: var(--on-dark);
}

/* 网格 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 50% 0%,
    #000 25%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at 50% 0%,
    #000 25%,
    transparent 78%
  );
  pointer-events: none;
}

/* 光晕 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      620px 320px at 12% -4%,
      rgba(34, 211, 238, 0.18),
      transparent 62%
    ),
    radial-gradient(
      520px 300px at 88% 6%,
      rgba(37, 99, 235, 0.26),
      transparent 62%
    );
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 4.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: #fff;
}

.hero-title .accent {
  color: var(--cyan);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title .accent {
    background: linear-gradient(100deg, #22d3ee 10%, #60a5fa 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero .lead {
  margin-top: 26px;
  max-width: 46em;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.72;
  color: var(--on-dark-soft);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 30px;
  font-size: 14px;
  color: var(--on-dark-muted);
}

.facts li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.facts li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
}

.hero .actions {
  margin-top: 38px;
}

/* ---------- 按钮（只有两种） ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #172554, #1d4ed8);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.36);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
}

/* ---------- 区块 ---------- */

.section {
  padding: clamp(56px, 7.5vw, 96px) 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section--soft {
  background: var(--soft);
}

.section h2 {
  position: relative;
  padding-top: 18px;
  color: #0b3a6d;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  letter-spacing: -0.02em;
}

.section h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section .lead {
  margin-top: 18px;
  max-width: 46em;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-cta {
  margin-top: 36px;
}

.sub-title {
  padding-left: 12px;
  border-left: 3px solid #3b82f6;
  font-size: 1.0625rem;
  color: #0b3a6d;
}

.note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 速览表 ---------- */

.facts-table {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 14px 36px;
  max-width: 840px;
  margin: 44px 0 0;
  padding-left: 20px;
  border-left: 3px solid #93c5fd;
}

.facts-table dt {
  padding-top: 1px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.facts-table dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- 卖点卡片 ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 40px;
  margin-top: 56px;
}

.card {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.card h3 {
  font-size: 1.0625rem;
  color: #0b3a6d;
}

.card p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 要点列表 ---------- */

.ticks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 48px;
  margin-top: 34px;
}

.ticks--two {
  grid-template-columns: 1fr 1fr;
}

.ticks li {
  position: relative;
  padding-left: 22px;
  font-size: 1rem;
  color: var(--ink-soft);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

/* ---------- 下载区 ---------- */

.block {
  margin-top: 56px;
}

.block .note {
  margin-top: 6px;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 15px;
}

th {
  padding: 0 16px 10px 0;
  border-bottom: 1px solid #dbeafe;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: #1e40af;
  white-space: nowrap;
}

td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 架构与版本用等宽字体，像一行技术参数 */
td:nth-child(2),
td:nth-child(3) {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

th:last-child,
td:last-child {
  padding-right: 0;
}

tbody tr:hover td {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.07),
    rgba(37, 99, 235, 0.05)
  );
}

/* 兼容 update_download_links.py 生成的条纹行类名 */
#download tbody tr.table-info,
#download tbody tr.table-success {
  background: transparent;
}

td a {
  font-weight: 500;
}

/* ---------- FAQ ---------- */

.faq-list {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

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

.faq-item h3 {
  position: relative;
  padding-left: 18px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.faq-item h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.faq-item p {
  margin-top: 10px;
  max-width: 62em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 联系方式 ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 72px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  font-size: 15px;
  color: var(--ink-soft);
}

.contact-list strong {
  color: #1e40af;
}

.steps {
  margin-top: 20px;
  padding-left: 20px;
  list-style: decimal;
  font-size: 15px;
  color: var(--ink-soft);
}

.steps > li {
  margin-bottom: 14px;
  padding-left: 4px;
}

.steps > li::marker {
  color: var(--blue);
  font-weight: 600;
}

.steps-sub {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.steps-sub li {
  position: relative;
  padding-left: 14px;
}

.steps-sub li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- 页脚（深色收尾） ---------- */

.site-footer {
  padding: 36px 0 44px;
  border-top: 3px solid #1e40af;
  border-image: linear-gradient(90deg, var(--cyan), var(--blue)) 1;
  background: #06152b;
  color: var(--on-dark-muted);
  font-size: 13px;
}

.site-footer p {
  margin-bottom: 6px;
  text-align: center;
}

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

.site-footer a {
  color: var(--on-dark-soft);
}

.site-footer a:hover {
  color: var(--cyan);
}

.site-footer img {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: -4px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .container {
    width: min(var(--max), 100% - 40px);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 4px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(10, 17, 28, 0.12);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 13px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .lang-switch {
    padding: 16px 0 0;
    margin-top: 4px;
    border-left: 0;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 44px;
  }

  .ticks--two {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

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

  .facts {
    flex-direction: column;
    gap: 8px;
  }

  .facts-table {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 32px;
  }

  .facts-table dt {
    margin-top: 12px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  table {
    font-size: 14px;
  }

  .faq-item {
    padding: 22px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn-primary:hover {
    transform: none;
  }
}
