:root {
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;
  --color-text-on-dark: #DBD4ED;

  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --lh-body: 1.75;
  --lh-heading: 1.25;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--color-body);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.5em; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }
h1, h2, h3, h4 { font-weight: 600; line-height: var(--lh-heading); letter-spacing: 0; color: inherit; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: calc(var(--gap) * 0.6); }
h3 { font-size: 1.25rem; margin-bottom: 0.6em; }
p { margin-bottom: 1em; max-width: 38em; }
.hl { color: var(--color-brand); }
.dark-bg { background: var(--color-dark); color: var(--color-text-on-dark); }
.dark-bg .hl { color: var(--color-accent); }
.dark-bg a { color: var(--color-accent); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.8em; }
.dark-bg .badge { color: var(--color-accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0 1.5em; height: 52px;
  background: var(--color-accent); color: var(--color-dark);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: none; cursor: pointer;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); background: #d95a75; }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-outline {
  background: transparent; border: 1px solid var(--color-body); color: var(--color-body);
}
.dark-bg .btn-outline { border-color: var(--color-text-on-dark); color: var(--color-text-on-dark); }
.btn-outline:hover { background: rgba(0,0,0,0.05); }
.dark-bg .btn-outline:hover { background: rgba(255,255,255,0.1); }

.card {
  border: var(--card-border); padding: 1.5em;
  background: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}
.dark-bg .card { background: var(--color-dark); border-color: rgba(219, 212, 237, 0.15); }

table { width: 100%; border-collapse: collapse; margin: 1em 0; }
th, td { padding: 0.8em 1em; border: var(--card-border); text-align: left; }
th { font-weight: 600; background: rgba(0,0,0,0.03); }
.dark-bg th { background: rgba(255,255,255,0.05); }

details { border: var(--card-border); padding: 1em; margin-bottom: 0.5em; background: var(--color-paper); border-radius: var(--radius-card); }
.dark-bg details { background: var(--color-dark); border-color: rgba(219, 212, 237, 0.15); }
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.2em; font-weight: 400; }
details[open] summary::after { content: "-"; }
details p { margin-top: 0.8em; margin-bottom: 0; }

.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; gap: var(--gap); align-items: center; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .flex-row { flex-direction: column !important; }
}

.site-header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(0,0,0,0.05); padding: 1em 0; }
.dark-bg .site-header { background: var(--color-dark); border-bottom-color: rgba(219, 212, 237, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: inherit; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.logo span { font-weight: 700; font-size: 1.1rem; }
nav { display: flex; gap: 1.5em; align-items: center; }
nav a { text-decoration: none; font-weight: 500; color: inherit; }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.dark-bg nav a[aria-current="page"] { color: var(--color-accent); }

.site-footer { padding-block: 3em; background: var(--color-dark); color: var(--color-text-on-dark); border-top: 1px solid rgba(219, 212, 237, 0.1); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1em; }
.footer-links a { color: var(--color-text-on-dark); text-decoration: none; margin-left: 1.5em; }

.hero-svg { width: 100%; height: auto; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes drawLine { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.svg-star { animation: twinkle 4s ease-in-out infinite; }
.svg-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 6s linear infinite; }
.svg-float { animation: float 5s ease-in-out infinite; }
.svg-breathe { animation: breathe 4s ease-in-out infinite; }
.svg-group { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
