:root {
  --color-dark: #1B1231;
  --color-paper: #DBD4ED;
  --color-paper-alt: #E8E4F0;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --font-body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--color-text); background: var(--color-paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--section-y) 0; }
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.bg-paper-alt { background: var(--color-paper-alt); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; color: var(--color-brand); }
.bg-dark .badge { color: var(--color-accent); }
.hl { color: var(--color-brand); }
.bg-dark .hl { color: var(--color-accent); }

h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: var(--gap); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 500; line-height: 1.25; margin-bottom: var(--gap); text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.3; margin-bottom: var(--gap); }
p { margin-bottom: var(--gap); max-width: 38em; }

.header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid transparent; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.bg-dark .header { background: var(--color-dark); }
.header.scrolled { border-bottom-color: rgba(25,21,35,0.1); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: var(--gap); align-items: center; }
nav a { font-weight: 500; font-size: 0.95rem; padding: 0.25rem 0; position: relative; }
nav a:hover { color: var(--color-brand); }
.bg-dark nav a { color: var(--color-paper); }
.bg-dark nav a:hover { color: var(--color-accent); }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 600; }
.bg-dark nav a[aria-current="page"] { color: var(--color-accent); }
.nav-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.25rem; height: 40px; border-radius: var(--radius-btn); font-weight: 600; font-size: 0.9rem; background: var(--color-accent); color: var(--color-dark); transition: transform 0.2s ease, filter 0.2s ease; }
.nav-btn:hover { transform: translateY(-1px); filter: brightness(0.95); }
@media (max-width: 768px) { nav { display: none; } .mobile-menu-btn { display: block; } }

.hero-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
@media (max-width: 768px) { .hero-layout { grid-template-columns: 1fr; } }
.hero-facts { display: flex; gap: var(--gap); flex-wrap: wrap; margin-top: var(--gap); font-size: 0.9rem; opacity: 0.85; }
.fact-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; background: rgba(255,255,255,0.1); border-radius: 99px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 1.5rem; height: 52px; border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; text-decoration: none; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(153,119,238,0.3); }
.btn-secondary { background: transparent; color: var(--color-text); border: 2px solid var(--color-text); }
.bg-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); background: rgba(25,21,35,0.05); }
.bg-dark .btn-secondary:hover { background: rgba(219,212,237,0.1); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

.card { background: var(--color-paper); border: var(--card-border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); padding: var(--gap); position: relative; }
.bg-dark .card { background: #2A1F4D; border-color: var(--color-paper); box-shadow: 4px 4px 0 var(--color-paper); }
.card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.card-icon { width: 24px; height: 24px; stroke-width: 1.8; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .grid-3 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); min-width: 320px; }
th, td { padding: 0.75rem var(--gap); text-align: left; border-bottom: 1px solid rgba(25,21,35,0.1); }
.bg-dark th, .bg-dark td { border-color: rgba(219,212,237,0.2); }
td:first-child { font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

details { border: var(--card-border); border-radius: var(--radius-card); padding: var(--gap); margin-bottom: var(--gap); background: var(--color-paper); }
.bg-dark details { background: #2A1F4D; border-color: var(--color-paper); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
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 { margin-top: var(--gap); line-height: 1.7; }

svg { width: 100%; height: auto; max-width: 100%; display: block; }
svg g, svg circle, svg rect, svg path { transform-box: fill-box; transform-origin: center; }

/* SVG Animations */
@keyframes nodeLight {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.grid-node { animation: nodeLight 8s infinite ease-in-out; }
.flow-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 4s linear infinite; }
.float-panel { animation: floatY 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; animation: none !important; }
}

.footer { padding: var(--section-y) 0; border-top: 1px solid rgba(25,21,35,0.1); margin-top: var(--section-y); }
.bg-dark .footer { border-top-color: rgba(219,212,237,0.15); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.footer-col h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; opacity: 0.8; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.9rem; opacity: 0.85; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--gap); font-size: 0.85rem; opacity: 0.7; }
@media (max-width: 768px) { .footer-bottom { flex-direction: column; align-items: flex-start; } }
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #dbd4ed !important;
    -webkit-text-fill-color: #dbd4ed !important;
  }
}
