:root {
  --color-dark: #19102D;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --divider: rgba(25, 21, 35, 0.12);
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-brand); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .85; }
ul, ol { list-style: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--section-y) 0; border-bottom: 1px solid var(--divider); }
section:last-of-type { border-bottom: none; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: inherit; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: 0.6rem; }
.lead { font-size: 1.1rem; color: var(--color-text); max-width: 65ch; margin-bottom: 1.5rem; }
.hl { color: var(--color-brand); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--color-brand); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600;
  background: var(--color-accent); color: var(--color-dark);
  border: none; cursor: pointer; transition: transform .2s, background .2s;
  border-radius: var(--radius-btn);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.dark-face .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }

.card {
  background: rgba(0,0,0,0.03);
  padding: var(--gap);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.dark-face .card { background: rgba(255,255,255,0.05); }
.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); }

table { width: 100%; min-width: 0; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.6rem; text-align: left; border-bottom: 1px solid var(--divider); }
th { font-weight: 600; }
@media (max-width: 600px) {
    th, td { padding: 0.4rem; font-size: 0.9rem; }
}

details { margin-bottom: 1rem; border-bottom: 1px solid var(--divider); padding-bottom: 1rem; }
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.2rem; }
details[open] summary::after { content: '−'; }
details p { margin-top: 0.5rem; color: var(--color-text); }

header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid var(--divider); padding: 1rem 0; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; color: var(--color-text); text-decoration: none; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 1.5rem; }
nav a { color: var(--color-text); font-weight: 500; }
nav a[aria-current="page"] { color: var(--color-brand); }
footer { background: var(--color-dark); color: var(--color-paper); padding: 3rem 0; }
footer a { color: var(--color-accent); }

.dark-face { background: var(--color-dark); color: var(--color-paper); }
.dark-face .hl { color: var(--color-accent); }
.dark-face .badge { color: var(--color-accent); }
.dark-face .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.dark-face table th, .dark-face table td { border-color: rgba(255,255,255,0.15); color: var(--color-paper); }

.timeline-step { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.step-num { font-size: 2rem; font-weight: 800; color: var(--color-accent); min-width: 2.5rem; line-height: 1; }
.dark-face .step-num { color: #ffffff; }
.feature-list dt { font-weight: 700; margin-bottom: 0.25rem; color: var(--color-brand); }
.feature-list dd { margin-left: 0; margin-bottom: 1rem; }
.tip-box { background: rgba(82, 20, 235, 0.05); padding: 1rem; margin-bottom: 1rem; border-left: 3px solid var(--color-brand); }
.news-card time { font-size: 0.85rem; color: var(--color-text); opacity: 0.7; display: block; margin-bottom: 0.5rem; }

.svg-container { width: 100%; height: auto; max-width: 100%; }
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50%, 100% { stroke-dashoffset: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0% { transform: translateX(20px); opacity: 0; }
  20%, 80% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes gridLight {
  0%, 100% { fill: rgba(214, 110, 237, 0.2); }
  50% { fill: var(--color-accent); }
}

.anim-draw { animation: drawLine 3s ease-in-out infinite; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-float { animation: float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide { animation: slideIn 4s ease-in-out infinite; }
.anim-grid { animation: gridLight 5s ease-in-out infinite; }
.anim-grid:nth-child(2n) { animation-delay: 0.5s; }
.anim-grid:nth-child(3n) { animation-delay: 1s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
