:root {
  --color-dark: #271231;
  --color-paper: #F5F0E5;
  --color-text: #1F1523;
  --color-brand: #9B12D8;
  --color-accent: #ED6EC0;
  --border-color: rgba(31, 21, 35, 0.16);
  --radius-card: 0;
  --radius-btn: 0;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-base: 1.55;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--lh-base);
  font-size: 1rem;
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Typography */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: var(--gap);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: var(--gap);
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: calc(var(--gap) / 2);
}

p {
  margin-bottom: var(--gap);
  max-width: 38em;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: calc(var(--gap) / 2);
}

.hl {
  color: var(--color-brand);
}

/* Layout & Sections */
section {
  padding-block: var(--section-y);
  position: relative;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin-top: var(--section-y);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.flex-row {
  display: flex;
  align-items: center;
  gap: var(--gap);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: calc(var(--gap) / 2);
}

nav a {
  padding: 8px 12px;
  font-weight: 500;
  border-radius: var(--radius-btn);
  transition: color 0.2s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--color-brand);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* Cards & Tables */
.card {
  background: var(--color-paper);
  border: 1px solid var(--border-color);
  padding: var(--gap);
  border-radius: var(--radius-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--gap);
  font-size: 0.95rem;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

th {
  font-weight: 700;
}

td:first-child {
  font-weight: 600;
}

/* FAQ */
details {
  border: 1px solid var(--border-color);
  margin-bottom: var(--gap);
  border-radius: var(--radius-card);
}

summary {
  padding: var(--gap);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-card);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
}

details[open] summary::after {
  content: "-";
}

details > div {
  padding: 0 var(--gap) var(--gap);
}

/* SVG Base */
svg {
  width: 100%;
  height: auto;
  overflow: hidden;
}

/* SVG Animations */
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: dashToZero 3s ease forwards;
}

.anim-float {
  animation: floatY 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.anim-breathe {
  animation: breathe 4s ease-in-out infinite;
}

.anim-slide {
  animation: slideIn 5s ease forwards;
}

@keyframes dashToZero {
  to { stroke-dashoffset: 0; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Dark Surface Overrides */
.dark-surface {
  background: var(--color-dark);
  color: var(--color-paper);
}

.dark-surface .eyebrow {
  color: var(--color-accent);
}

.dark-surface .hl {
  color: var(--color-accent);
}

.dark-surface .btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}

.dark-surface .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

.dark-surface table th,
.dark-surface table td {
  border-color: rgba(245, 240, 229, 0.16);
  color: var(--color-paper);
}

.dark-surface details {
  border-color: rgba(245, 240, 229, 0.16);
}

.dark-surface summary {
  color: var(--color-paper);
}

.light-inside-dark {
  background: var(--color-paper);
  color: var(--color-text);
  padding: var(--gap);
  border-radius: var(--radius-card);
}

.light-inside-dark .eyebrow {
  color: var(--color-brand);
}

.light-inside-dark .hl {
  color: var(--color-brand);
}

.light-inside-dark table th,
.light-inside-dark table td {
  border-color: var(--border-color);
  color: var(--color-text);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-draw, .anim-float, .anim-breathe, .anim-slide {
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .flex-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .feature-row.reverse .feature-text {
    order: 2;
  }
  .feature-row.reverse .feature-svg {
    order: 1;
  }
}

/* 兜底：裁掉横向溢出 */
#platforms {
  overflow-x: clip;
}
