:root {
  --c-dark: #141838;
  --c-paper: #FCFCFD;
  --c-text: #151723;
  --c-brand: #142CEB;
  --c-accent: #6EAFED;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.surface-dark {
  --bg: var(--c-dark);
  --fg: var(--c-paper);
  --accent: var(--c-accent);
  --link: var(--c-accent);
  --border: rgba(255, 255, 255, 0.12);
}

.surface-light {
  --bg: var(--c-paper);
  --fg: var(--c-text);
  --accent: var(--c-brand);
  --link: var(--c-brand);
  --border: rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: var(--bg);
}

/* Typography */
h1, h2, h3, h4 {
  text-wrap: balance;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.surface-light .eyebrow { color: var(--c-brand); }
.surface-dark .eyebrow { color: var(--c-accent); }

.hl {
  font-weight: 700;
}

.surface-light .hl { color: var(--c-brand); }
.surface-dark .hl { color: var(--c-accent); }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  height: 48px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(110, 175, 237, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
}

.btn-secondary:hover {
  background: rgba(128, 128, 128, 0.08);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* Layout Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Cards */
.card {
  background: rgba(128, 128, 128, 0.06);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}

.surface-light .card { background: #F4F5F7; }
.surface-dark .card { background: #1A1F3D; }

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
  table-layout: fixed;
}

.data-table th, .data-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.data-table th {
  font-weight: 600;
  width: 40%;
  color: var(--fg);
}

.data-table td {
  color: var(--fg);
}

/* FAQ */
.faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-left: 2rem;
  color: var(--fg);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  position: absolute;
  left: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.faq-item[open] summary::before { content: "-"; }

.faq-item p {
  padding: 0 1rem 1rem;
  margin: 0;
  color: var(--fg);
  opacity: 0.9;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

.surface-dark .site-header {
  background: rgba(20, 24, 56, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--fg);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--link);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--link);
  transition: width 0.2s ease;
}

.nav-links a:hover::after { width: 100%; }

/* Footer */
.site-footer {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(128, 128, 128, 0.8);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--fg);
  text-decoration: none;
}

.footer-links a:hover { color: var(--link); }

/* SVG & Animation System */
.svg-container {
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
}

svg {
  width: 100%;
  height: auto;
  display: block;
}

.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 6s ease-in-out infinite alternate;
}

@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.anim-float {
  animation: float-move 8s ease-in-out infinite alternate;
}

@keyframes float-move {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.anim-pulse {
  animation: pulse-opacity 4s ease-in-out infinite alternate;
}

@keyframes pulse-opacity {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.anim-slide {
  animation: slide-panel 10s ease-out infinite alternate;
}

@keyframes slide-panel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-18px); }
}

.anim-rotate {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 12s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
