:root {
  --color-dark: #2D1438;
  --color-paper: #F6F3F7;
  --color-body: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #6EEDA8;
  
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 1px solid rgba(31, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-body);
  background-color: var(--color-paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.section--paper {
  background-color: var(--color-paper);
  color: var(--color-body);
}
.divider {
  height: 1px;
  background-color: rgba(31, 21, 35, 0.12);
  margin-block: 0;
}
.section--dark .divider {
  background-color: rgba(246, 243, 247, 0.15);
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
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.3; margin-bottom: 1rem; }
p { margin-bottom: 1.25rem; max-width: 38em; }
.max-w-prose { max-width: 38em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.badge--brand { color: var(--color-brand); }
.badge--accent { color: var(--color-accent); }
.badge::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  background-color: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 52px;
  padding-inline: 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn--secondary {
  background: transparent;
  border: 1px solid var(--color-body);
  color: var(--color-body);
}
.section--dark .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.section--dark .card {
  background: var(--color-dark);
  border-color: rgba(246, 243, 247, 0.2);
}

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex-row { display: flex; gap: var(--gap); align-items: center; }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav { display: flex; gap: 2rem; }
.nav__link { font-weight: 600; font-size: 0.95rem; }
.nav__link:hover { color: var(--color-brand); }
.nav__link[aria-current="page"] { color: var(--color-brand); }
.logo img { height: 32px; width: auto; }

.footer {
  padding-block: 3rem;
  border-top: 1px solid rgba(31, 21, 35, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(31, 21, 35, 0.7);
}
.section--dark .footer { border-top-color: rgba(246, 243, 247, 0.1); color: rgba(246, 243, 247, 0.7); }

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--color-brand);
}
.timeline__item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -2.55rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--color-brand);
  border: 3px solid var(--color-paper);
}
.timeline__time {
  font-weight: 700;
  color: var(--color-brand);
  margin-bottom: 0.5rem;
  display: block;
}

.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(31, 21, 35, 0.12);
}
th { font-weight: 700; color: var(--color-brand); }
.section--dark th { color: var(--color-accent); border-bottom-color: rgba(246, 243, 247, 0.15); }

details {
  margin-bottom: 1rem;
  border: var(--card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
summary {
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 600;
  background: rgba(31, 21, 35, 0.03);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
}
details[open] summary::after { content: "-"; }
details p { padding: 1.25rem; margin: 0; font-size: 0.95rem; line-height: 1.7; }

.news-card time {
  display: block;
  font-size: 0.85rem;
  color: rgba(31, 21, 35, 0.6);
  margin-bottom: 0.75rem;
}
.section--dark .news-card time { color: rgba(246, 243, 247, 0.6); }

.svg-anim { width: 100%; height: auto; }
@keyframes rotateAlign {
  0%, 100% { transform: rotate(0deg) scale(0.95); opacity: 0.8; }
  50% { transform: rotate(180deg) scale(1.05); opacity: 1; }
}
@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes dashMove {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}
.anim-rotate { animation: rotateAlign 8s linear infinite; transform-origin: center; transform-box: fill-box; }
.anim-float { animation: floatGentle 6s ease-in-out infinite; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: dashMove 4s ease-in-out infinite; }

.on-dark .hl { color: var(--color-accent); }
.on-dark .badge--brand { color: var(--color-accent); }
.on-dark .timeline__time { color: var(--color-accent); }
.on-dark .timeline__item::before { background: var(--color-accent); border-color: var(--color-dark); }
.on-dark th { color: var(--color-accent); }

@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;
  }
}

@media (max-width: 768px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .flex-row { flex-direction: column; align-items: flex-start; }
  .nav { gap: 1rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline__item::before { left: -2.1rem; }
}
