: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: 1120px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --txt: var(--color-text);
  --hl: var(--color-brand);
  --link: var(--color-brand);
}

.face-dark {
  background: var(--color-dark);
  --txt: var(--color-paper);
  --hl: var(--color-accent);
  --link: var(--color-accent);
}

/* Fix contrast for specific text elements on dark backgrounds */
.face-dark .container p,
.face-dark .grid-2 p {
  color: #f4f3f7 !important;
  opacity: 1 !important;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  margin: 0;
  background: var(--color-paper);
  color: var(--txt);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0.5em 0 0.25em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 1rem; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hl);
  margin-bottom: 0.5rem;
}

.hl { color: var(--hl); }

/* Layout Sections */
section {
  padding: var(--section-y) 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.face-dark section { border-bottom-color: rgba(255,255,255,0.1); }
section:last-of-type { border-bottom: none; }

.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); }

/* Cards */
.card {
  background: rgba(0,0,0,0.03);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  position: relative;
}
.face-dark .card { background: rgba(255,255,255,0.05); }
.card.feature-card { border-left: 3px solid var(--hl); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  height: 52px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: var(--color-accent);
  color: var(--color-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-secondary {
  background: transparent;
  color: var(--txt);
  border: 1px solid var(--txt);
}
.face-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Header & Footer */
header {
  position: sticky;
  top: 0;
  background: var(--color-paper);
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.face-dark header { background: var(--color-dark); border-color: rgba(255,255,255,0.1); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gap); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: inherit; text-decoration: none; font-weight: 500; }
.nav-links a[aria-current="page"] { color: var(--hl); font-weight: 700; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); padding: var(--gap) 0; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-copy { border-top: 1px solid rgba(0,0,0,0.1); padding: 1.5rem 0; text-align: center; font-size: 0.9rem; opacity: 0.8; }
.face-dark .footer-copy { border-color: rgba(255,255,255,0.1); }

/* Table */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
.face-dark th, .face-dark td { border-color: rgba(255,255,255,0.1); }
th { font-weight: 600; }

/* FAQ */
details { border-bottom: 1px solid rgba(0,0,0,0.1); padding: 1rem 0; }
.face-dark details { border-color: rgba(255,255,255,0.1); }
summary { cursor: pointer; font-weight: 600; list-style: none; padding-right: 1rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 0.2em; font-weight: 400; }
details[open] summary::after { content: "-"; }
details p { margin-top: 0.5rem; margin-bottom: 0; }

/* SVG & Animations */
svg { width: 100%; height: auto; max-width: 100%; overflow: visible; }
.star { animation: twinkle 4s ease-in-out infinite; }
.star:nth-child(odd) { animation-delay: 1.2s; }
.star:nth-child(even) { animation-delay: 2.5s; }
.line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 3s ease forwards; }
.bubble { animation: float 5s ease-in-out infinite; }
.dot { animation: breathe 2s ease-in-out infinite; }
.notify { animation: slide-in 0.8s ease-out forwards; }
.rotate-icon { transform-box: fill-box; transform-origin: center; animation: spin 12s linear infinite; }

@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { 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 slide-in { from { transform: translateX(-12px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
ul.plain-list { padding-left: 1.25rem; margin: 0; }
ul.plain-list li { margin-bottom: 0.5rem; }
.timeline-step { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.step-num { font-size: 1.5rem; font-weight: 800; color: var(--hl); line-height: 1; flex-shrink: 0; width: 2rem; }
.tip-item { padding: 1rem; background: rgba(0,0,0,0.02); margin-bottom: 0.75rem; border-left: 2px solid var(--hl); }
.face-dark .tip-item { background: rgba(255,255,255,0.03); }
.scenario-box { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 768px) { .scenario-box { grid-template-columns: 1fr; } }
