:root {
  --c-dark: #140E25;
  --c-paper: #F7F5F3;
  --c-text: #191523;
  --c-brand: #5214EB;
  --c-accent: #C8ED6E;
  --r-card: 8px;
  --r-btn: 6px;
  --card-bd: 1px solid rgba(25, 21, 35, 0.16);
  --card-sh: none;
  --sec-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --max-w: 1120px;
  --lh-body: 1.55;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 16px; line-height: var(--lh-body); color: var(--c-text); background: var(--c-paper); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.surface-paper { --bg: var(--c-paper); --text: var(--c-text); --hl: var(--c-brand); --icon: var(--c-brand); }
.surface-dark { --bg: var(--c-dark); --text: var(--c-paper); --hl: var(--c-accent); --icon: var(--c-accent); }
.surface-card-light { --bg: #ffffff; --text: var(--c-text); --hl: var(--c-brand); --icon: var(--c-brand); }

section { background: var(--bg); color: var(--text); padding: var(--sec-y) 0; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: var(--gap); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.25; margin-bottom: calc(var(--gap) * 2); }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin-bottom: var(--gap); }
.micro-label { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; color: var(--icon); margin-bottom: 0.5em; }
.hl { color: var(--hl); }
p { margin-bottom: 1em; max-width: 38em; }
strong { font-weight: 700; }

.btn { display: inline-flex; align-items: center; gap: 0.5em; height: 48px; padding: 0 1.5em; border-radius: var(--r-btn); font-weight: 600; cursor: pointer; transition: transform 0.2s, background-color 0.2s; border: none; font-size: 1rem; }
.btn-primary { background: var(--c-accent); color: var(--c-dark); }
.btn-secondary { background: transparent; border: 1px solid currentColor; color: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }

.card { background: var(--bg); border: var(--card-bd); border-radius: var(--r-card); padding: var(--gap); box-shadow: var(--card-sh); }
.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%; border-collapse: collapse; margin-bottom: var(--gap); min-width: 0; }
th, td { padding: 0.75em 1em; text-align: left; border-bottom: var(--card-bd); min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
th { font-weight: 700; }

details { border: var(--card-bd); border-radius: var(--r-card); margin-bottom: var(--gap); overflow: hidden; }
summary { padding: 1em; 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.2em; }
details[open] summary::after { content: "-"; }
details p { padding: 0 1em 1em; margin: 0; }

header { position: sticky; top: 0; z-index: 100; background: var(--c-paper); border-bottom: var(--card-bd); padding: 1em 0; }
header .container { display: flex; justify-content: space-between; align-items: center; }
nav a { margin-left: 1.5em; font-weight: 500; }
nav a[aria-current="page"] { color: var(--c-brand); font-weight: 700; }
footer { background: var(--c-dark); color: var(--c-paper); padding: var(--sec-y) 0; text-align: center; }
footer a { color: var(--c-accent); }

svg { width: 100%; height: auto; max-width: 100%; }
.flow-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 4s ease-in-out infinite; }
@keyframes flowDash { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

.float-bubble { animation: floatBubble 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes floatBubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.input-dots circle { animation: breathe 2s ease-in-out infinite; opacity: 0.3; }
.input-dots circle:nth-child(2) { animation-delay: 0.3s; }
.input-dots circle:nth-child(3) { animation-delay: 0.6s; }
@keyframes breathe { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

.slide-panel { animation: slidePanel 8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes slidePanel { 0% { transform: translateX(0); } 100% { transform: translateX(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
