:root {
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(31,21,35,0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-paper);
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-accent); }
b, strong { font-weight: 700; }
p { margin-bottom: var(--gap); max-width: 38em; }
ul, ol { margin-bottom: var(--gap); padding-left: 1.5em; }
li { margin-bottom: calc(var(--gap) / 2); }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--color-text); }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) / 2); }
.subtitle { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px; display: block; }
.surface-light .subtitle { color: var(--color-brand); }
.surface-dark .subtitle { color: var(--color-accent); }
.hl { font-weight: 800; }
.surface-light .hl { color: var(--color-brand); }
.surface-dark .hl { color: var(--color-accent); }

/* Layout */
.container { max-width: var(--content-max); margin: 0 auto; padding: var(--section-y) var(--gap); }
.grid-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 768px) { .grid-hero { grid-template-columns: 1fr; } }

/* Surfaces & Inheritance */
.surface-dark { background: var(--color-dark); color: var(--color-paper); }
.surface-dark h2, .surface-dark h3, .surface-dark p, .surface-dark li, .surface-dark td, .surface-dark th { color: var(--color-paper); }
.surface-dark a { color: var(--color-accent); }
.surface-dark .subtitle { color: var(--color-accent); }
.surface-dark .hl { color: var(--color-accent); }
.surface-dark .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.surface-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.surface-dark .card { background: var(--color-paper); color: var(--color-text); border-color: rgba(31,21,35,0.1); }
.surface-dark .card h2, .surface-dark .card h3, .surface-dark .card p { color: var(--color-text); }
.surface-dark .card a { color: var(--color-brand); }

.surface-light { background: var(--color-paper); color: var(--color-text); }
.surface-light h2, .surface-light h3, .surface-light p, .surface-light li, .surface-light td, .surface-light th { color: var(--color-text); }
.surface-light a { color: var(--color-brand); }
.surface-light .subtitle { color: var(--color-brand); }
.surface-light .hl { color: var(--color-brand); }
.surface-light .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.surface-light .btn-secondary { border-color: var(--color-text); color: var(--color-text); }

/* Buttons */
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; transition: transform .2s ease, opacity .2s ease; white-space: nowrap; }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.btn-secondary:hover { transform: translateY(-2px); background: rgba(31,21,35,0.05); }

/* Cards & Tables */
.card { border: var(--card-border); background: #fff; box-shadow: var(--card-shadow); padding: var(--gap); }
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 12px; border-bottom: var(--card-border); text-align: left; vertical-align: top; }
th { font-weight: 700; width: 35%; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Header & Footer */
header { position: sticky; top: 0; z-index: 100; background: rgba(246,243,247,0.95); backdrop-filter: blur(8px); border-bottom: var(--card-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: var(--color-text); }
.logo img { width: 32px; height: 32px; }
nav { display: flex; gap: 24px; }
nav a { font-weight: 600; color: var(--color-text); }
nav a[aria-current="page"] { color: var(--color-brand); }
footer { background: var(--color-dark); color: var(--color-paper); padding: 48px var(--gap); }
.footer-inner { max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col h4 { color: var(--color-paper); margin-bottom: 16px; font-size: 1rem; }
.footer-col a { color: var(--color-paper); display: block; margin-bottom: 8px; font-size: 0.95rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { max-width: var(--content-max); margin: 32px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.85rem; color: rgba(246,243,247,0.6); }

/* Tabs (CSS-only) */
.tabs-nav { display: flex; border-bottom: var(--card-border); margin-bottom: var(--gap); overflow-x: auto; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab-label { padding: 12px 20px; cursor: pointer; font-weight: 600; border-bottom: 3px solid transparent; transition: color .2s; white-space: nowrap; }
.tab-content { display: none; padding-top: var(--gap); }
#t1:checked ~ .tab-panel #c1, #t2:checked ~ .tab-panel #c2, #t3:checked ~ .tab-panel #c3, #t4:checked ~ .tab-panel #c4 { display: block; }
#t1:checked ~ .tabs-nav label[for="t1"], #t2:checked ~ .tabs-nav label[for="t2"], #t3:checked ~ .tabs-nav label[for="t3"], #t4:checked ~ .tabs-nav label[for="t4"] { border-bottom-color: var(--color-brand); color: var(--color-brand); }

/* FAQ */
details { border: var(--card-border); margin-bottom: 12px; }
summary { padding: 16px; 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; font-weight: 400; }
details[open] summary::after { content: "-"; }
details > div { padding: 0 16px 16px; }

/* News Cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; }
.news-card time { font-size: 0.85rem; color: rgba(31,21,35,0.6); margin-bottom: 8px; }
.surface-dark .news-card time { color: rgba(246,243,247,0.6); }

/* SVG Animations */
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes drawLine { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes floatBubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breatheDots { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes slideIn { 0% { transform: translateX(20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }

.anim-twinkle { animation: twinkle 4s ease-in-out infinite; }
.anim-draw { animation: drawLine 3s ease forwards; }
.anim-float { animation: floatBubble 5s ease-in-out infinite; }
.anim-breathe { animation: breatheDots 2s ease-in-out infinite; }
.anim-slide { animation: slideIn 1.5s ease forwards; }
.star1 { animation-delay: 0s; } .star2 { animation-delay: 1.2s; } .star3 { animation-delay: 2.5s; }
.dot1 { animation-delay: 0s; } .dot2 { animation-delay: 0.4s; } .dot3 { animation-delay: 0.8s; }

.hero-svg { width: 100%; height: auto; }
.hero-svg path, .hero-svg line, .hero-svg circle, .hero-svg rect { transition: transform .3s ease; }
.hero-svg .draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hero-svg .float-el { 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; animation: none !important; }
  .anim-draw { stroke-dashoffset: 0 !important; }
}
