:root {
  --paper: #0a0f14;
  --paper-2: #111820;
  --paper-3: #18222a;
  --ink: #f6f7f9;
  --ink-2: #c7cdd4;
  --ink-3: #7f8994;
  --rule: rgba(246, 247, 249, 0.14);
  --rule-soft: rgba(246, 247, 249, 0.07);
  --mono: "JetBrains Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --accent: #7dd3fc;
  --accent-deep: #0284c7;
  --accent-glow: rgba(125, 211, 252, 0.28);
  --green: #6ee7b7;
  --amber: #fcd34d;
  --red: #fca5a5;
  --red-deep: #dc2626;
  --line: #1f2937;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  --glow: 0 0 60px rgba(125, 211, 252, 0.25);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); color: var(--ink); font-family: var(--sans); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(125, 211, 252, 0.14), transparent 22rem),
    radial-gradient(circle at 85% 10%, rgba(2, 132, 199, 0.12), transparent 20rem),
    var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, canvas, video { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--paper);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  background: rgba(10, 15, 20, 0.82);
  backdrop-filter: blur(18px);
}
.site-header.compact { background: rgba(10, 15, 20, 0.88); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-height: 44px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--accent);
  font-weight: 800;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.brand strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.brand small {
  display: block;
  color: var(--ink-3);
  font-size: 0.8rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-2);
  padding: 0.4rem 0.2rem;
}
.nav a:hover, .nav a:focus { color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.hero-copy { display: flex; flex-direction: column; gap: 1rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 18ch;
}
.lede {
  max-width: 58ch;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.button:hover, .button:focus {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--paper-3);
}
.button.primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.button.primary:hover, .button.primary:focus {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.button.secondary {
  background: transparent;
  color: var(--accent);
  border-color: rgba(125,211,252,0.4);
}
.artifact-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 0.5rem;
  color: var(--ink-3);
  font-size: 0.85rem;
}
.artifact-rail li { display: inline-flex; gap: 0.35rem; align-items: center; }
.artifact-rail span[aria-hidden="true"] { color: var(--accent); }

.voice-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
  min-height: 240px;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink-3);
}
.dot.red { background: var(--red); }
.dot.amber { background: var(--amber); }
.dot.green { background: var(--green); }

.voice-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.status-line {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
}
.waveform {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 56px;
}
.waveform .bar {
  width: 4px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.75;
  animation: waveform 1.35s ease-in-out infinite;
  transform-origin: center;
}
.waveform .bar:nth-child(1) { animation-delay: 0s; height: 22%; }
.waveform .bar:nth-child(2) { animation-delay: 0.08s; height: 44%; }
.waveform .bar:nth-child(3) { animation-delay: 0.16s; height: 60%; }
.waveform .bar:nth-child(4) { animation-delay: 0.24s; height: 34%; }
.waveform .bar:nth-child(5) { animation-delay: 0.32s; height: 78%; }
.waveform .bar:nth-child(6) { animation-delay: 0.4s; height: 52%; }
.waveform .bar:nth-child(7) { animation-delay: 0.48s; height: 28%; }
.waveform .bar:nth-child(8) { animation-delay: 0.56s; height: 66%; }

@keyframes waveform {
  0%, 100% { transform: scaleY(0.45); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 0.9; }
}

.is-reduced-motion .waveform .bar {
  animation: none;
  opacity: 0.5;
  transform: scaleY(0.6);
}

.proof-caption-bar {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: var(--paper);
}
.caption-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
#caption-text {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink);
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: none; }
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.split-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.split-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin: 0;
}
.split-heading p {
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
  align-self: end;
}

.tier-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.tier-chip {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1rem;
  background: var(--paper-2);
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.tier-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.4rem;
  background: var(--accent);
}
.tier-chip.real .tier-dot { background: var(--green); box-shadow: 0 0 0 2px rgba(110, 231, 183, 0.25); }
.tier-chip.concept .tier-dot { background: var(--amber); box-shadow: 0 0 0 2px rgba(252, 211, 77, 0.25); }
.tier-chip.built .tier-dot { background: #a78bfa; box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.25); }
.tier-chip strong { display: block; font-size: 0.95rem; }
.tier-chip small { color: var(--ink-3); font-size: 0.82rem; line-height: 1.5; display: block; margin-top: 0.15rem; }

.narrative-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.narrative-cell {
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.25rem;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.narrative-cell.real { border-left: 3px solid var(--green); }
.narrative-cell.concept { border-left: 3px solid var(--amber); }
.narrative-cell.built { border-left: 3px solid #a78bfa; }
.narrative-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.narrative-cell h3 { margin: 0; font-size: 1.1rem; }
.narrative-cell .synopsis { color: var(--ink-2); margin: 0; line-height: 1.55; }
.transcript {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.55;
  border-top: 1px dashed var(--rule);
  padding-top: 0.75rem;
  min-height: 3rem;
}
.meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}

.ghost-button {
  align-self: start;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.ghost-button:hover, .ghost-button:focus {
  border-color: var(--accent);
  color: var(--accent);
}
.ghost-button.play.is-active {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.caption-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.caption-card {
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.25rem;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
}
.caption-card.real { border-top: 3px solid var(--green); }
.caption-card.concept { border-top: 3px solid var(--amber); }
.caption-card.built { border-top: 3px solid #a78bfa; }
.caption-text {
  font-size: 1.1rem;
  line-height: 1.55;
  margin: 0;
}
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}
.real-label { background: rgba(110, 231, 183, 0.14); color: var(--green); }
.concept-label { background: rgba(252, 211, 77, 0.14); color: var(--amber); }
.built-label { background: rgba(167, 139, 250, 0.14); color: #a78bfa; }

.guide-body .site-header { background: rgba(10, 15, 20, 0.9); }
.guide-main {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3.5rem);
  max-width: 92ch;
}
.guide-article h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  margin: 0.5rem 0 0.5rem;
}
.guide-article .eyebrow { display: block; margin-bottom: 0.25rem; }
.guide-article .lede { color: var(--ink-2); margin: 0 0 1.5rem; line-height: 1.6; }
.guide-article section {
  margin-bottom: 2.5rem;
}
.guide-article h2 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}
.guide-article p { line-height: 1.6; color: var(--ink-2); }
.guide-article ul { padding-left: 1.2rem; color: var(--ink-2); line-height: 1.7; }
.guide-article code {
  font-family: var(--mono);
  background: var(--paper-3);
  padding: 0.15rem 0.3rem;
  border-radius: 6px;
}
.guide-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.guide-grid > div {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem;
  background: var(--paper-2);
}
.pass-list {
  padding-left: 1.15rem;
  color: var(--ink-2);
  line-height: 1.7;
}
.footer {
  padding: 2rem clamp(1rem, 4vw, 3.5rem);
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 900px) {
  .hero, .split-heading { grid-template-columns: 1fr; }
  .tier-legend, .narrative-list, .caption-grid, .guide-grid {
    grid-template-columns: 1fr;
  }
  .nav { display: none; }
}

@media (max-width: 480px) {
  .hero { padding: 3.25rem 1rem; }
  .hero h1 { font-size: 2rem; }
  .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto; }
}
