:root {
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(31,21,35,0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.paper-surface { --c-bg: var(--color-paper); --c-fg: var(--color-text); --c-hl: var(--color-brand); --c-border: var(--card-border); }
.dark-surface { --c-bg: var(--color-dark); --c-fg: var(--color-paper); --c-hl: var(--color-accent); --c-border: 1px solid rgba(246,243,247,0.16); }
.card { --c-bg: var(--color-paper); --c-fg: var(--color-text); --c-hl: var(--color-brand); --c-border: var(--card-border); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: var(--font-main); font-size: 16px; line-height: 1.65; color: var(--color-text); background: var(--color-paper); }
body { display: flex; flex-direction: column; min-height: 100vh; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.2; margin-bottom: 0.5em; }
p { max-width: 38em; margin-bottom: 1em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.25rem); line-height: 1.7; margin-bottom: var(--gap); }
.hl { color: var(--c-hl); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.5em; display: inline-block; }
.paper-surface .eyebrow, .paper-surface .hl { color: var(--color-brand); }
.dark-surface .eyebrow, .dark-surface .hl { color: var(--color-accent); }

/* Layout */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* Header / Footer */
header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(31,21,35,0.1); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
nav ul { display: flex; gap: var(--gap); }
nav a { font-weight: 600; padding: 0.5em; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
footer { background: var(--color-dark); color: var(--color-paper); padding: var(--section-y) 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--gap); }
.footer-link { color: var(--color-paper); font-weight: 600; }
.footer-link:hover { color: var(--color-accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.6em; padding: 0.8em 1.6em; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, background-color 0.2s ease; border: none; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-1px); background: #d95aab; }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.dark-surface .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Cards & Panels */
.card { background: var(--c-bg); border: var(--c-border); padding: var(--gap); transition: transform 0.2s ease; }
.card:hover { transform: translateY(-2px); }
.panel { background: var(--c-bg); border: var(--c-border); padding: var(--gap); position: relative; overflow: hidden; }
.dark-surface .panel { background: rgba(246,243,247,0.05); border-color: rgba(246,243,247,0.1); }
.panel svg { width: 100%; height: auto; max-height: 320px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { text-align: left; padding: 0.8em 1em; border-bottom: 1px solid rgba(31,21,35,0.1); }
th { font-weight: 700; }
.dark-surface th, .dark-surface td { border-bottom-color: rgba(246,243,247,0.1); }

/* FAQ */
details { border: var(--c-border); background: var(--c-bg); margin-bottom: 0.5em; }
summary { padding: 1em; 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-weight: 300; font-size: 1.2em; }
details[open] summary::after { content: "-"; }
details[open] summary { border-bottom: 1px solid rgba(31,21,35,0.1); }
.faq-content { padding: 1em; line-height: 1.7; }

/* News */
.news-card { display: flex; flex-direction: column; gap: 0.5em; }
.news-date { font-size: 0.85rem; color: var(--c-hl); font-weight: 600; }
.news-title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.news-excerpt { font-size: 0.95rem; line-height: 1.6; }

/* Steps */
.step-list { counter-reset: step; }
.step-item { position: relative; padding-left: 3em; margin-bottom: 1.5em; }
.step-item::before { counter-increment: step; content: "0" counter(step); position: absolute; left: 0; top: 0; font-weight: 800; font-size: 1.2rem; color: var(--c-hl); }

/* SVG Animations */
@keyframes node-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
.node { animation: node-pulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.node:nth-child(1) { animation-delay: 0s; }
.node:nth-child(2) { animation-delay: 1.2s; }
.node:nth-child(3) { animation-delay: 2.4s; }
.node:nth-child(4) { animation-delay: 0.8s; }
.node:nth-child(5) { animation-delay: 3.1s; }
.node:nth-child(6) { animation-delay: 1.9s; }
.node:nth-child(7) { animation-delay: 2.7s; }
.node:nth-child(8) { animation-delay: 0.4s; }

@keyframes dash-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-draw 4s ease-in-out infinite alternate; }

@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; }
  .node { opacity: 0.6; transform: none; animation: none; }
  .draw-line { animation: none; stroke-dashoffset: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-inner { flex-direction: column; height: auto; padding: 1em 0; }
  nav ul { flex-wrap: wrap; justify-content: center; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
}
