:root {
  --paper: #f7f4ef;
  --white: #fffdf9;
  --ink: #111014;
  --muted: #6e6871;
  --line: #d9d1d8;
  --accent: #713f78;
  --accent-dark: #542c5b;
  --accent-soft: #f0e6f2;
}

html, body { overflow-x: clip; }

body {
  background:
    radial-gradient(circle at 82% 10%, rgba(132, 79, 141, 0.08), transparent 30rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-header {
  min-height: 82px;
  padding: 0 clamp(22px, 4.5vw, 78px);
  border-bottom-color: rgba(71, 50, 72, 0.12);
  background: rgba(247, 244, 239, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(150%);
}

.brand-wordmark {
  justify-self: start;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.32em;
  text-decoration: none;
}

.brand-wordmark span { color: var(--accent); }

.top-nav a {
  position: relative;
  padding: 12px 0;
  letter-spacing: 0.01em;
  transition: color 180ms ease;
}

.top-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 5px;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--accent);
  transition: right 220ms ease, left 220ms ease;
}

.top-nav a:hover::after,
.top-nav a:focus-visible::after,
.top-nav a[aria-current="page"]::after { right: 0; left: 0; }

.quiet-link {
  border: 0;
  transition: color 180ms ease;
}

.quiet-link::after {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 5px;
  content: "";
  background: currentColor;
  transform-origin: right;
  transition: transform 220ms ease;
}

.quiet-link:hover { color: var(--accent); }
.quiet-link:hover::after { transform: scaleX(0.42); }

.page-main { position: relative; animation: vera-rise 560ms both cubic-bezier(0.2, 0.72, 0.2, 1); }

.page-main::before {
  position: absolute;
  z-index: -1;
  top: 36px;
  right: -220px;
  width: 360px;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: conic-gradient(from 110deg, transparent, rgba(113, 63, 120, 0.22), transparent 45% 76%, rgba(156, 101, 164, 0.12), transparent);
  mask: radial-gradient(circle, transparent 68%, #000 68.4% 69%, transparent 69.4%);
  animation: vera-orbit 30s linear infinite;
}

h1 { color: var(--ink); }
h2 { color: var(--accent-dark); }

.primary-button {
  position: relative;
  min-height: 54px;
  padding: 0 28px;
  overflow: hidden;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(115deg, #542c5b, #7c4784 58%, #95619c);
  box-shadow: 0 12px 34px rgba(91, 49, 98, 0.2);
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.primary-button::after {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 34%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 520ms ease;
}

.primary-button:hover {
  background: linear-gradient(115deg, #542c5b, #7c4784 58%, #95619c);
  box-shadow: 0 16px 44px rgba(91, 49, 98, 0.28);
  transform: translateY(-2px);
}

.primary-button:hover::after { left: 126%; }

.table-wrap,
.comparison-table,
.tag-key { border-radius: 14px; overflow: hidden; }

.demo-transcript .demo-read { border-radius: 18px; box-shadow: 0 18px 54px rgba(64, 34, 68, 0.16); }

.demo-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 30px; }

.demo-stage {
  overflow: hidden;
  border: 1px solid rgba(84, 44, 91, 0.18);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.86);
  box-shadow: 0 24px 80px rgba(64, 34, 68, 0.09);
}

.demo-transcript {
  height: min(58vh, 520px);
  min-height: 430px;
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: rgba(84, 44, 91, 0.24) transparent;
}

.demo-transcript article { margin: 0 0 16px; }
.demo-transcript article:last-child { margin-bottom: 2px; }
.demo-transcript article[data-speaker="human"] {
  margin-left: 12%;
  padding: 11px 13px;
  border-radius: 14px 14px 4px 14px;
  background: #f0ece7;
}

.demo-transcript article[data-speaker="vera"]:not(.demo-read) {
  margin-right: 8%;
  padding: 3px 2px 4px;
}

.demo-row-label {
  min-height: 22px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.demo-transcript .demo-speaker {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.14em;
}

.question-tag,
.demo-transcript .question-tag {
  display: inline-flex;
  width: fit-content;
  min-height: 17px;
  margin: 0;
  padding: 3px 6px;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tag-goal { background: #713f78; }
.tag-discovery { background: #315c88; }
.tag-evidence { background: #2f6b57; }
.tag-belief { background: #4f4c91; }
.tag-constraint { background: #9b5b18; }
.tag-clarification { background: #176b72; }
.tag-contradiction { background: #9a3f52; }

.demo-transcript p {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  line-height: 1.34;
}

.demo-transcript article.is-typing p::after {
  content: "";
  width: 1px;
  height: 0.95em;
  margin-left: 3px;
  display: inline-block;
  background: currentColor;
  vertical-align: -0.08em;
  animation: demo-caret 700ms steps(1, end) infinite;
}

.demo-transcript .demo-read {
  margin-top: 4px;
  padding: 18px;
  border-radius: 15px;
}

.demo-transcript .demo-read p { font-size: 0.98rem; line-height: 1.42; }

.tag-key {
  top: 112px;
  padding: 18px;
  border: 1px solid rgba(84, 44, 91, 0.14);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.7);
}

.tag-key p {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
  font-size: 0.72rem;
  line-height: 1.35;
}
.tag-key p:last-child { margin-bottom: 0; }
.mode-section { transition: transform 220ms ease; }
.mode-section:hover { transform: translateX(4px); }

@keyframes vera-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes demo-caret { 50% { opacity: 0; } }

@keyframes vera-orbit { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .brand-wordmark { font-size: 0.86rem; }
  .page-main::before { right: -250px; opacity: 0.55; }
  .primary-button { min-height: 56px; }
  .demo-page { padding-top: 30px; }
  .demo-page h1 { margin-bottom: 12px; font-size: 2.8rem; }
  .demo-page .page-subhead { margin-bottom: 20px; font-size: 1.15rem; }
  .demo-page > .primary-button { min-height: 46px; padding: 0 20px; font-size: 0.8rem; }
  .demo-layout { margin-top: 22px; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .demo-transcript { height: min(56vh, 500px); min-height: 400px; padding: 16px; }
  .demo-transcript article { margin-bottom: 13px; }
  .demo-transcript article[data-speaker="human"] { padding: 9px 11px; }
  .demo-transcript p { font-size: 0.98rem; line-height: 1.3; }
  .demo-transcript .demo-read { padding: 14px; }
  .demo-transcript .demo-read p { font-size: 0.89rem; }
  .tag-key { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .tag-key p { margin: 0; font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .page-main, .page-main::before { animation: none; }
}
