:root {
  --color-bg-dark: #141838;
  --color-bg-paper: #F7F5F3;
  --color-text-main: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;
  --color-text-on-dark: var(--color-bg-paper);
  --color-text-on-paper: var(--color-text-main);
  --color-accent-on-dark: var(--color-accent);
  --color-brand-on-dark: var(--color-accent);

  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --line-sep: 1px solid rgba(0, 0, 0, 0.08);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg-paper);
  color: var(--color-text-on-paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Layout & Containers */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-block: var(--section-y); position: relative; }
.section--dark { background: var(--color-bg-dark); color: var(--color-text-on-dark); }
.section--paper { background: var(--color-bg-paper); color: var(--color-text-on-paper); }
.section + .section { border-top: var(--line-sep); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* Typography */
h1, h2, h3, h4 { margin: 0 0 calc(var(--gap) * 0.75) 0; font-weight: 500; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 var(--gap) 0; max-width: 38em; }
ul, ol { padding-left: 1.25em; margin: 0 0 var(--gap) 0; }
li { margin-bottom: 0.5em; max-width: 38em; }

/* Badges & Highlights */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: var(--color-brand);
}
.section--dark .badge { color: var(--color-accent-on-dark); }
.hl { color: var(--color-brand); }
.section--dark .hl { color: var(--color-accent-on-dark); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-bg-dark); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: transparent; border: 1px solid var(--color-text-main); color: var(--color-text-main); }
.btn-secondary:hover { background: rgba(0,0,0,0.04); }
.section--dark .btn-secondary { border-color: var(--color-text-on-dark); color: var(--color-text-on-dark); }
.section--dark .btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* Cards & Panels */
.card {
  background: rgba(0, 0, 0, 0.03);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
}
.panel-dark {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  padding: var(--gap);
  overflow: hidden;
}
.panel-paper {
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-card);
  padding: var(--gap);
}

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: var(--gap); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.08); }
th { font-weight: 600; }
td:first-child { font-weight: 500; }

/* FAQ */
details {
  margin-bottom: var(--gap);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-card);
  padding: 1rem;
  background: rgba(255,255,255,0.5);
}
.summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
details[open] .summary::after { content: "−"; }
details p { margin: 0.75rem 0 0 0; }

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 243, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.section--dark + .header { background: rgba(20, 24, 56, 0.9); color: var(--color-text-on-dark); }
.header.scrolled { border-bottom-color: rgba(0,0,0,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { text-decoration: none; color: inherit; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { opacity: 0.7; }
.nav-links [aria-current="page"] { font-weight: 700; opacity: 0.6; }
@media (max-width: 768px) { .nav-links { display: none; } }

/* Footer */
.footer { background: var(--color-bg-dark); color: var(--color-text-on-dark); padding: 3rem 0; margin-top: var(--section-y); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-col h4 { color: var(--color-accent-on-dark); margin-bottom: 0.75rem; }
.footer-col a { display: block; color: var(--color-text-on-dark); text-decoration: none; margin-bottom: 0.5rem; opacity: 0.8; }
.footer-col a:hover { opacity: 1; }
.copyright { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* SVG Graphic Base */
.svg-graphic { width: 100%; height: auto; max-width: 100%; display: block; }
.svg-graphic circle, .svg-graphic path, .svg-graphic rect, .svg-graphic line { transform-box: fill-box; transform-origin: center; }

/* SVG Animations */
@keyframes orbit-breathe {
  0%, 100% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes orbit-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.1); opacity: 0.8; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes slide-up {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.svg-orbit-1 { animation: orbit-breathe 6s ease-in-out infinite; }
.svg-orbit-2 { animation: orbit-pulse 8s ease-in-out infinite; }
.svg-float { animation: float 4.5s ease-in-out infinite; }
.svg-float-delay { animation: float 4.5s ease-in-out infinite 1.5s; }
.svg-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 2.5s ease forwards; }
.svg-slide { animation: slide-up 1.8s ease forwards; }
.svg-dot { animation: pulse-dot 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .svg-orbit-1, .svg-orbit-2, .svg-float, .svg-float-delay, .svg-draw, .svg-slide, .svg-dot {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .svg-draw { stroke-dashoffset: 0; }
}

/* Utilities */
.mt-sm { margin-top: var(--gap); }
.mb-md { margin-bottom: calc(var(--gap) * 2); }
.text-muted { opacity: 0.8; }
.wide-max { max-width: 100%; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2.4rem; }
}
