:root {
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-body: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --color-body-light: rgba(31, 21, 35, 0.16);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid var(--color-body-light);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-body);
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); border-bottom: 1px solid var(--color-body-light); }
.section:last-of-type { border-bottom: none; }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; display: inline-block;
}
.hl { font-weight: 800; }

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 1.5rem; }
h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 0.75rem; }
p { margin: 0 0 1rem; max-width: 38em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 1.5rem; height: 52px; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: transform 0.2s ease, opacity 0.2s ease; border-radius: var(--radius-btn);
}
.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-dark); }
.btn-secondary { border: 1px solid var(--color-body); color: var(--color-body); background: transparent; }
.dark-surface .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }

.card { border: var(--card-border); padding: 1.5rem; background: var(--color-paper); border-radius: var(--radius-card); }
.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-row { display: flex; gap: var(--gap); align-items: center; }
.flex-row.reverse { flex-direction: row-reverse; }
@media (max-width: 768px) { .flex-row, .flex-row.reverse { flex-direction: column; } }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 0; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-body-light); min-width: 0; overflow-wrap: anywhere; }
th { font-weight: 700; background: rgba(0,0,0,0.02); }

details { border: var(--card-border); padding: 1rem; margin-bottom: 0.75rem; background: var(--color-paper); border-radius: var(--radius-card); }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-left: 1.5rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; position: absolute; left: 0; font-weight: 700; }
details[open] summary::before { content: "-"; }
details p { margin-top: 0.75rem; font-size: 0.95rem; }

.svg-wrap { width: 100%; height: auto; overflow: hidden; }
.svg-wrap svg { width: 100%; height: auto; }

@keyframes draw-path { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes float-svg { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe-svg { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 6s ease-in-out infinite alternate; }
.anim-float { animation: float-svg 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breathe-svg 4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid var(--color-body-light); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-weight: 600; font-size: 0.95rem; padding: 0.5rem 0; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--color-brand); }

footer { background: var(--color-dark); color: var(--color-paper); padding: 3rem 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.footer-links a { display: block; margin-bottom: 0.5rem; opacity: 0.8; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

.dark-surface { background: var(--color-dark); color: var(--color-paper); }
.dark-surface .hl { color: var(--color-accent); }
.dark-surface .eyebrow { color: var(--color-accent); }
.dark-surface a:not(.btn) { color: var(--color-accent); text-decoration: underline; }
.dark-surface .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.dark-surface .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }

.light-card { background: var(--color-paper); color: var(--color-body); border: var(--card-border); }
.light-card .hl { color: var(--color-brand); }
.light-card .eyebrow { color: var(--color-brand); }
.light-card a { color: var(--color-brand); }
