:root {
  --color-dark: #13102D;
  --color-paper: #F7F5F3;
  --color-body: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(23, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --header-height: 64px;
}

*, *::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: 1.65;
  color: var(--color-body);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; position: relative; }
.section + .section { border-top: 1px solid rgba(23, 21, 35, 0.1); }
.dark-face { background-color: var(--color-dark); color: var(--color-paper); }
.paper-face { background-color: var(--color-paper); color: var(--color-body); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: var(--gap); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: calc(var(--gap) * 0.75); }
h3 { font-size: 1.25rem; margin-bottom: var(--gap); }
p { margin-bottom: 1rem; max-width: 38em; }
.lead { font-size: 1.125rem; line-height: 1.6; margin-bottom: calc(var(--gap) * 1.5); }
.hl { color: var(--color-brand); }
.dark-face .hl { color: var(--color-accent); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.5rem;
}
.dark-face .badge { color: var(--color-accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; height: 48px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, opacity 0.2s ease;
  border: none; outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(137, 237, 110, 0.6); }
.btn-primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-secondary { background: transparent; border: 1px solid var(--color-body); color: var(--color-body); }
.dark-face .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); background-color: rgba(23, 21, 35, 0.05); }
.dark-face .btn-secondary:hover { background-color: rgba(247, 245, 243, 0.1); }

.card {
  background-color: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: box-shadow 0.3s ease;
}
.dark-face .card { background-color: rgba(247, 245, 243, 0.08); }
.card:hover { box-shadow: 0 14px 32px -12px rgba(23, 21, 35, 0.4); }

.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; flex-wrap: wrap; gap: var(--gap); align-items: center; }

table { width: 100%; border-collapse: collapse; margin: var(--gap) 0; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(23, 21, 35, 0.1); }
th { font-weight: 600; }
.dark-face th, .dark-face td { border-bottom-color: rgba(247, 245, 243, 0.15); }

details { margin-bottom: 1rem; border: 1px solid rgba(23, 21, 35, 0.1); border-radius: 12px; overflow: hidden; }
.dark-face details { border-color: rgba(247, 245, 243, 0.2); }
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; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 16px 16px; line-height: 1.7; }

header {
  position: sticky; top: 0; z-index: 100;
  background-color: var(--color-paper);
  border-bottom: 1px solid rgba(23, 21, 35, 0.1);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: 24px; }
nav a { font-weight: 500; position: relative; }
nav a:hover { color: var(--color-brand); }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 600; }
@media (max-width: 768px) { nav { display: none; } }

footer { padding: var(--section-y) 0; border-top: 1px solid rgba(23, 21, 35, 0.1); margin-top: var(--section-y); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-col h4 { margin-bottom: 12px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { text-decoration: underline; }
.copyright { margin-top: 48px; text-align: center; color: rgba(23, 21, 35, 0.6); font-size: 0.9rem; }

.svg-panel { width: 100%; height: auto; max-width: 100%; }

@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes slide-in {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 2s ease forwards; }
.float-bubble { animation: float-bubble 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.breathe { animation: breathe 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.slide-in { animation: slide-in 0.8s ease-out forwards; animation-delay: 0.5s; }
.orbit { animation: orbit-spin 12s linear infinite; 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; scroll-behavior: auto !important; }
  .draw-line, .float-bubble, .breathe, .slide-in, .orbit { animation: none !important; }
}
