/* ================= 基础重置与变量 ================= */
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.25;
}
p {
  margin-bottom: 1em;
  max-width: min(38em, 100%);
}
time {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  opacity: 0.7;
}

/* ================= 布局与工具类 ================= */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-block: var(--section-y);
}
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-text-on-dark);
}
.bg-dark .hl {
  color: var(--color-accent);
}
.bg-dark .badge {
  color: var(--color-accent);
}
.bg-dark .badge-line {
  background-color: var(--color-accent);
}
.bg-dark .card-surface {
  background-color: var(--color-paper);
  color: var(--color-text);
  border-color: rgba(25, 21, 35, 0.12);
}
.bg-dark .card-surface .hl {
  color: var(--color-brand);
}
.bg-dark .card-surface .badge {
  color: var(--color-brand);
}
.bg-dark .card-surface .badge-line {
  background-color: var(--color-brand);
}
.bg-paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}
.bg-paper .hl {
  color: var(--color-brand);
}
.bg-paper .badge {
  color: var(--color-brand);
}
.bg-paper .badge-line {
  background-color: var(--color-brand);
}
.card-surface {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75em;
}
.badge-line {
  width: 18px;
  height: 2px;
  border-radius: 1px;
}
.hl {
  color: var(--color-brand);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--gap);
}
.flex-row {
  display: flex;
  gap: var(--gap);
  align-items: center;
}
.flex-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
@media (min-width: 768px) {
  .checker-layout {
    display: flex;
    align-items: stretch;
  }
  .checker-layout > * {
    flex: 1;
    min-width: 0;
  }
  .checker-layout:nth-of-type(even) {
    flex-direction: row-reverse;
  }
}
@media (max-width: 767px) {
  .checker-layout {
    flex-direction: column;
  }
}

/* ================= 组件：按钮 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-primary:hover {
  background-color: #b8dc5e;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.bg-dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}
.bg-dark .btn-secondary:hover {
  background-color: rgba(245, 240, 229, 0.1);
}

/* ================= 组件：页头/页脚 ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 240, 229, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
  padding: 12px 0;
}
.bg-dark .site-header {
  background-color: rgba(20, 14, 37, 0.92);
  border-bottom-color: rgba(245, 240, 229, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}
.site-logo img {
  height: 28px;
  width: auto;
  display: block;
}
.main-nav ul {
  display: flex;
  gap: 24px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
}
.main-nav a:hover,
.main-nav [aria-current="page"] {
  color: var(--color-brand);
}
.bg-dark .main-nav a:hover,
.bg-dark .main-nav [aria-current="page"] {
  color: var(--color-accent);
}
.site-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(25, 21, 35, 0.12);
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  opacity: 0.8;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  opacity: 0.8;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--color-brand);
}
.bg-dark .footer-col a:hover {
  color: var(--color-accent);
}
.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(25, 21, 35, 0.12);
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

/* ================= 组件：表格 ================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(25, 21, 35, 0.12);
}
.data-table th {
  font-weight: 600;
  width: 40%;
}
.data-table tr:last-child td {
  border-bottom: none;
}

/* ================= 组件：FAQ ================= */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 32px;
  transition: background-color 0.2s;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::before {
  content: "+";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  opacity: 0.6;
}
.faq-item[open] summary::before {
  content: "-";
}
.faq-item summary:hover {
  background-color: rgba(25, 21, 35, 0.03);
}
.bg-dark .faq-item summary:hover {
  background-color: rgba(245, 240, 229, 0.05);
}
.faq-content {
  padding: 0 20px 16px 32px;
  line-height: 1.7;
}

/* ================= SVG 动效系统 ================= */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
}
.svg-panel svg {
  width: 100%;
  height: auto;
  display: block;
}
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 5s ease-in-out infinite alternate;
}
@keyframes drawLine {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
.anim-rotate {
  animation: shapeSpin 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes shapeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.anim-float {
  animation: gentleFloat 6s ease-in-out infinite alternate;
}
@keyframes gentleFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
.anim-pulse {
  animation: pulseOpacity 4s ease-in-out infinite alternate;
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
