/* =========================================
   SafeW 全站共享样式
   ========================================= */

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-main);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
ul, ol { list-style: none; }

/* 设计 Token 与主题变量 */
:root {
  --bg-dark: #17203F;
  --bg-paper: #FCFCFD;
  --text-body: #151823;
  --brand: #1441EB;
  --accent: #6EEDBD;
  --card-border: 1px solid rgba(21, 24, 35, 0.16);
  --card-shadow: none;
  --radius-card: 8px;
  --radius-btn: 6px;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --font-size-base: 16px;
  --line-height-base: 1.65;
}

/* 浅色面（默认） */
.section-light {
  --surface: var(--bg-paper);
  --text-main: var(--text-body);
  --text-sub: var(--text-body);
  --highlight: var(--brand);
  --link: var(--brand);
  --border-subtle: rgba(21, 24, 35, 0.12);
}

/* 深色面 */
.section-dark {
  --surface: var(--bg-dark);
  --text-main: var(--bg-paper);
  --text-sub: rgba(252, 252, 253, 0.8);
  --highlight: var(--accent);
  --link: var(--accent);
  --border-subtle: rgba(252, 252, 253, 0.12);
}

/* 容器与网格 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.download-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: start;
}
@media (min-width: 768px) {
  .download-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
}
.download-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}
.panel-svg-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.panel-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* 排版层级 */
.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--highlight);
  margin-bottom: 0.5em;
}
h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 1em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 0.8em;
  text-wrap: balance;
}
h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}
p { margin-bottom: 1em; color: var(--text-sub); }
.hl { color: var(--highlight); font-weight: 600; }

/* 区块结构 */
.section {
  padding: var(--section-y) 0;
  background-color: var(--surface);
}
.section-header {
  margin-bottom: var(--gap);
  max-width: 720px;
}
.section-header p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-sub);
}

/* 组件：按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 48px;
  padding: 0 1.25em;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background-color: var(--highlight);
  color: var(--surface);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(0.95); }
.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--text-main);
}
.btn-secondary:hover { background: var(--border-subtle); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* 组件：卡片 */
.card {
  background: var(--surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }

/* 组件：表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table th { font-weight: 600; color: var(--text-main); }
.data-table td { color: var(--text-sub); }
.data-table tr:last-child td { border-bottom: none; }

/* 组件：FAQ / Details */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1em 0;
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.5em;
  color: var(--text-main);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  color: var(--highlight);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 0.5em; margin-bottom: 0; }

/* 组件：胶囊标签 */
.capsule-group { display: flex; flex-wrap: wrap; gap: 0.75em; margin: 1em 0; }
.capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.8em;
  background: var(--border-subtle);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}
.capsule svg { width: 16px; height: 16px; stroke: var(--highlight); }

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75em 0;
  transition: background 0.3s;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link { display: flex; align-items: center; gap: 0.6em; font-weight: 700; color: var(--text-main); }
.logo-img { width: 28px; height: 28px; object-fit: contain; }
nav ul { display: flex; gap: 1.5em; }
nav a { font-size: 0.95rem; font-weight: 500; color: var(--text-sub); }
nav a[aria-current="page"] { color: var(--text-main); font-weight: 600; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; }

/* SVG 动效 */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-float { animation: float 4.5s ease-in-out infinite; }
.anim-pulse { animation: pulse-dot 3.2s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 6s ease-in-out infinite alternate; }
.anim-slide { animation: slide-in 5s ease-out infinite alternate; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes slide-in {
  0% { transform: translateX(-10px); opacity: 0.6; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.5; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  nav ul { display: none; }
  .mobile-menu-btn { display: block; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column-reverse !important; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
