:root {
  --bg: #050814;
  --bg-2: #0a1020;
  --ink: #eef7ff;
  --muted: #9bb0c9;
  --accent: #00f0ff;
  --accent-2: #c084ff;
  --accent-3: #ffb25a;
  --accent-dim: rgba(0, 240, 255, 0.16);
  --violet-dim: rgba(192, 132, 255, 0.16);
  --card: rgba(12, 18, 36, 0.72);
  --line: rgba(0, 240, 255, 0.18);
  --err: #ff7a86;
  --warn-bg: rgba(42, 29, 12, 0.9);
  --warn-ink: #f5c56b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --glass: rgba(10, 16, 32, 0.55);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --glow: 0 0 24px rgba(0, 240, 255, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
}
.fx-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(0, 240, 255, 0.14), transparent 60%),
    radial-gradient(800px 480px at 100% 0, rgba(192, 132, 255, 0.16), transparent 55%),
    radial-gradient(700px 400px at 50% 120%, rgba(255, 178, 90, 0.06), transparent 55%),
    var(--bg);
}
.fx-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 78%);
  animation: grid-drift 32s linear infinite;
}
.fx-scan {
  position: absolute;
  left: 0; right: 0; height: 28%;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.05), transparent);
  animation: scan 9s ease-in-out infinite;
}
@keyframes grid-drift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}
@keyframes scan {
  0%, 100% { top: -20%; }
  50% { top: 80%; }
}
a { color: var(--accent); }
a:hover { color: #9ffffa; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 20; color: var(--ink); }
.banner {
  position: relative;
  z-index: 3;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 0.86rem;
  padding: 9px 16px;
  text-align: center;
  border-bottom: 1px solid #3d3114;
  backdrop-filter: blur(12px);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 20, 0.62);
  backdrop-filter: blur(16px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 8;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 760;
  letter-spacing: -0.05em;
  font-size: 1.22rem;
}
.brand svg { display: block; filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.55)); }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
#site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
#site-nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; }
#site-nav a[aria-current="page"], #site-nav a:hover { color: var(--ink); text-shadow: var(--glow); }
main, footer, header, .banner { position: relative; z-index: 1; }
main { flex: 1; width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 80px; }
.page-home main { padding-top: 10px; width: min(1180px, calc(100% - 28px)); }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 10px;
  text-align: center;
  text-shadow: var(--glow);
}
h1, .hero-title {
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  margin: 0 0 14px;
  text-align: center;
}
.hero-title, .hero-copy h1 {
  background: linear-gradient(120deg, #eef7ff 10%, #00f0ff 45%, #c084ff 75%, #ffb25a 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 10s ease-in-out infinite;
}
@keyframes shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
h2 { font-size: 1.38rem; letter-spacing: -0.03em; margin: 2.4rem 0 0.8rem; }
h3 { font-size: 1.08rem; margin: 1.4rem 0 0.5rem; letter-spacing: -0.02em; }
.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 40rem;
  text-align: center;
}
.hero-stage {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  padding: 18px 0 8px;
}
.hero-copy { text-align: left; }
.hero-copy .kicker, .hero-copy h1, .hero-copy .lead { text-align: left; }
.hero-copy .lead { margin-left: 0; margin-right: 0; max-width: 36rem; }
.hero-copy .cta-row { justify-content: flex-start; margin-top: 4px; }
.avatar-stage {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.avatar-svg {
  position: relative;
  z-index: 1;
  width: 64%;
  height: auto;
  filter: drop-shadow(0 0 28px rgba(0, 240, 255, 0.35));
}
.avatar-caption {
  position: absolute;
  bottom: 2%;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  z-index: 1;
}
.ring {
  fill: none;
  stroke: url(#ring-grad);
  stroke-width: 1.2;
  opacity: 0.7;
  transform-origin: 100px 100px;
  animation: spin 16s linear infinite;
}
.ring.r2 { animation-duration: 22s; animation-direction: reverse; opacity: 0.45; }
.core-glow { animation: pulse-core 3.2s ease-in-out infinite; transform-origin: 100px 100px; }
.eye { fill: #eaffff; filter: url(#soft-glow); }
.eye-blink { animation: blink 5.5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.eye-blink.right { animation-delay: 0.12s; }
.mouth-bars rect {
  fill: #00f0ff;
  transform-origin: center bottom;
  transform-box: fill-box;
  animation: bar-idle 1.6s ease-in-out infinite;
}
.avatar-stage.is-speaking .mouth-bars rect { animation-name: bar-speak; animation-duration: 0.28s; }
.avatar-stage.is-speaking .core-glow { animation-duration: 0.7s; }
.avatar-stage.is-speaking { filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.4)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-core {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes blink {
  0%, 88%, 100% { transform: scaleY(1); }
  92% { transform: scaleY(0.12); }
}
@keyframes bar-idle {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(0.85); }
}
@keyframes bar-speak {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1.25); }
}
.mouth-bars rect:nth-child(2) { animation-delay: 0.1s; }
.mouth-bars rect:nth-child(3) { animation-delay: 0.18s; }
.mouth-bars rect:nth-child(4) { animation-delay: 0.08s; }
.mouth-bars rect:nth-child(5) { animation-delay: 0.22s; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .grid > .card { grid-column: span 2; }
}
.card, .panel, .note, .pending, .ethics, .sources, .step, .callout, .demo-panel, .placeholder-aff {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.2);
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px 18px 18px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  color: inherit;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.25), 0 16px 40px rgba(0, 240, 255, 0.12);
}
.card .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 8px;
}
.card h2, .card h3 { margin: 0 0 8px; font-size: 1.16rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.panel, .note, .pending, .ethics, .sources, .callout, .demo-panel { padding: 18px 20px; margin: 0 0 16px; }
.ethics {
  border-color: rgba(255, 178, 90, 0.35);
  background: linear-gradient(180deg, rgba(34, 24, 15, 0.85), var(--card));
}
.ethics h2 { margin-top: 0; }
.note { color: var(--muted); }
.note strong, .pending strong { color: var(--warn-ink); }
.pending { border-color: #5a4a1c; background: rgba(24, 20, 11, 0.85); }
.callout { border-color: rgba(192, 132, 255, 0.35); background: linear-gradient(180deg, rgba(22, 16, 34, 0.9), var(--card)); }
.callout strong { color: var(--accent-2); }
.placeholder-aff {
  display: grid;
  gap: 10px;
  padding: 16px;
  margin: 18px 0;
}
.placeholder-aff p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.badge {
  background: #5a4a1c;
  color: var(--warn-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
  width: fit-content;
}
button, .btn {
  appearance: none;
  border: 0;
  background: linear-gradient(135deg, #00f0ff, #5ee6ff 40%, #c084ff);
  color: #041018;
  font: inherit;
  font-weight: 800;
  padding: 13px 18px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.3), 0 10px 30px rgba(0, 240, 255, 0.22);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover, button:not(:disabled):hover { transform: translateY(-1px); color: #041018; }
.btn.secondary { background: #1a2440; color: var(--ink); box-shadow: none; }
.btn.ghost, button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
button:disabled, .btn[aria-disabled="true"] { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; background: #1a2440; color: var(--muted); border: 1px solid var(--line); }
.btn-glow { animation: cta-glow 2.4s ease-in-out infinite; }
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.3), 0 10px 30px rgba(0, 240, 255, 0.22); }
  50% { box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.16), 0 14px 40px rgba(192, 132, 255, 0.35); }
}
.crumb { font-size: 0.86rem; color: var(--muted); margin: 0 0 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.article { max-width: 46rem; margin: 0 auto; }
.article h1, .article .lead, .article .kicker { text-align: left; }
.article .lead { margin-left: 0; margin-right: 0; }
.article h1 {
  background: linear-gradient(120deg, #eef7ff, #00f0ff 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.steps { counter-reset: step; display: grid; gap: 14px; margin: 18px 0 28px; }
.step { padding: 18px 20px; position: relative; }
.step h3 { margin-top: 0; display: flex; gap: 10px; align-items: baseline; }
.step h3::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #041018;
  background: var(--accent);
  border-radius: 999px;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-grid;
  place-items: center;
  flex: none;
  font-weight: 800;
  box-shadow: var(--glow);
}
.step p, .step li { color: var(--ink); }
.step li + li { margin-top: 6px; }
.step ul, .article ul, .article ol { padding-left: 1.15rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(0, 240, 255, 0.05);
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; color: var(--muted); font-weight: 650; }
.small { font-size: 0.9rem; color: var(--muted); }
.sources h2 { margin-top: 0; }
.sources ol { margin: 0; padding-left: 1.2rem; }
.sources li { margin: 0 0 8px; }
.home-ethics, .home-prices { margin-top: 52px; }
.home-ethics h2, .section-head { text-align: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.demo-panel { margin: 28px 0 8px; padding: 22px; }
.demo-panel h2 { margin-top: 0; }
.demo-disclaimer {
  color: var(--accent-3);
  background: rgba(255, 178, 90, 0.08);
  border: 1px solid rgba(255, 178, 90, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.92rem;
  margin: 0 0 16px;
}
.demo-panel label { display: block; font-weight: 650; margin: 0 0 6px; }
.demo-panel textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 20, 0.7);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; }
.demo-status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 0.9rem; }
.section-label {
  text-align: center;
  margin: 42px 0 16px;
}
.section-label h2 { margin: 0; }
.section-label p { color: var(--muted); margin: 8px auto 0; max-width: 36rem; }
@media (max-width: 860px) {
  .hero-stage { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy .kicker, .hero-copy h1, .hero-copy .lead { text-align: center; }
  .hero-copy .cta-row { justify-content: center; }
  .avatar-stage { width: min(340px, 92%); }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  header { flex-wrap: wrap; }
  #site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0 4px;
  }
  header.is-open #site-nav { display: flex; }
  .two { grid-template-columns: 1fr; }
  .article h1, .article .lead, .article .kicker { text-align: center; }
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 20px 28px;
  color: var(--muted);
  font-size: 0.88rem;
  background: rgba(5, 8, 20, 0.5);
  backdrop-filter: blur(12px);
}
footer nav { justify-content: center; margin-bottom: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
footer p { max-width: 52rem; margin: 8px auto; text-align: center; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .fx-grid, .fx-scan { animation: none; }
  .hero-title, .hero-copy h1 { animation: none; background-position: 50% 50%; }
}

.avatar-speak {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  z-index: 2;
  min-width: 7.5rem;
  min-height: 44px;
  padding: 10px 20px;
}
.avatar-caption { bottom: 21%; pointer-events: none; }
.demo-actions button, .sample-row .btn, #demo-cta, #demo-speak, #demo-stop {
  min-height: 44px;
  min-width: 8.5rem;
  touch-action: manipulation;
}
.samples { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.samples h3 { margin-top: 0; }
.sample-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.demo-status { color: var(--accent); }
@media (max-width: 860px) {
  .avatar-stage { width: min(360px, 100%); margin-bottom: 8px; }
  .avatar-speak { position: static; transform: none; display: flex; margin: 8px auto 0; }
  .avatar-caption { position: static; margin-top: 6px; }
}
