:root {
  color-scheme: dark;
  --bg: #07110f;
  --bg-2: #0b1714;
  --panel: rgba(16, 31, 27, 0.78);
  --panel-strong: #10211d;
  --panel-soft: rgba(214, 245, 118, 0.06);
  --line: rgba(214, 245, 118, 0.18);
  --line-strong: rgba(214, 245, 118, 0.38);
  --text: #f4f1e8;
  --muted: #a8b8a7;
  --faint: #6d7f72;
  --accent: #d6f576;
  --accent-2: #78e2c8;
  --amber: #f4b860;
  --danger: #ff6b5f;
  --good: #8df0a3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font: "Sora", "Aptos", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  background:
    radial-gradient(circle at 16% 2%, rgba(214, 245, 118, 0.15), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(120, 226, 200, 0.14), transparent 26rem),
    linear-gradient(180deg, #07110f 0%, #091512 42%, #050a09 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244, 241, 232, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 232, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
}

pre {
  overflow-x: auto;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 18px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #07110f;
  font-weight: 800;
}

.skip-link:focus {
  top: 18px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 999px;
  background: rgba(7, 17, 15, 0.78);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  color: #07110f;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: -0.08em;
  box-shadow: 0 0 28px rgba(214, 245, 118, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(244, 241, 232, 0.07);
}

.nav-links .nav-cta {
  color: #07110f;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 52px;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding-top: 72px;
}

.hero h1,
.doc-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3.1rem, 7vw, 6.8rem);
  line-height: 0.93;
  letter-spacing: -0.08em;
}

.hero-sub {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid rgba(244, 241, 232, 0.16);
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font);
}

.button.primary {
  color: #07110f;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 14px 36px rgba(214, 245, 118, 0.18);
}

.button.secondary {
  color: #07110f;
  border-color: var(--accent-2);
  background: var(--accent-2);
}

.button.ghost {
  background: rgba(244, 241, 232, 0.04);
}

.assurance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 34px;
}

.assurance-grid span {
  padding: 13px 14px;
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(244, 241, 232, 0.035);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.flow-board {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 22px;
  border: 1px solid rgba(244, 241, 232, 0.14);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.08), transparent 40%),
    rgba(8, 20, 17, 0.82);
  box-shadow: var(--shadow);
}

.flow-board::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: calc(var(--radius-xl) - 1px);
  background:
    radial-gradient(circle at 50% 47%, rgba(214, 245, 118, 0.18), transparent 17rem),
    radial-gradient(circle at 80% 18%, rgba(120, 226, 200, 0.14), transparent 15rem);
  pointer-events: none;
}

.flow-topline,
.demo-toggle,
.scenario-panel {
  position: relative;
  z-index: 2;
}

.flow-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 241, 232, 0.1);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flow-topline strong {
  color: var(--accent);
  font-weight: 700;
}

.demo-toggle {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  padding: 6px;
  border: 1px solid rgba(244, 241, 232, 0.1);
  border-radius: 999px;
  background: rgba(3, 8, 7, 0.46);
}

.demo-toggle button {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.demo-toggle button.is-active {
  color: #07110f;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(214, 245, 118, 0.16);
}

.scenario-panel {
  display: none;
}

.flow-board[data-demo-mode="normal"] [data-scenario="normal"],
.flow-board[data-demo-mode="kv"] [data-scenario="kv"] {
  display: block;
}

.credential-stage {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  margin-top: 10px;
  border: 1px solid rgba(244, 241, 232, 0.1);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 46%, rgba(214, 245, 118, 0.12), transparent 15rem),
    linear-gradient(145deg, rgba(244, 241, 232, 0.055), transparent 52%),
    rgba(3, 8, 7, 0.54);
}

.unsafe-stage {
  background:
    radial-gradient(circle at 52% 42%, rgba(255, 107, 95, 0.13), transparent 15rem),
    linear-gradient(145deg, rgba(244, 241, 232, 0.045), transparent 52%),
    rgba(3, 8, 7, 0.54);
}

.stage-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stage-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  stroke-dasharray: 10 14;
  stroke-dashoffset: 0;
  opacity: 0.9;
  vector-effect: non-scaling-stroke;
}

.request-path {
  stroke: #a8b8a7;
  filter: drop-shadow(0 0 8px rgba(168, 184, 167, 0.45));
}

.call-path {
  stroke: #d6f576;
  filter: drop-shadow(0 0 12px rgba(214, 245, 118, 0.58));
}

.result-path,
.unsafe-return {
  stroke: #78e2c8;
  filter: drop-shadow(0 0 10px rgba(120, 226, 200, 0.42));
}

.danger-path,
.ghost-path {
  stroke: #ff6b5f;
  filter: drop-shadow(0 0 10px rgba(255, 107, 95, 0.42));
}

.ghost-path {
  opacity: 0.2;
}

.beam {
  position: absolute;
  z-index: 2;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  opacity: 0.95;
}

.beam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  transform: translateX(-100%);
}

.danger-beam {
  background: linear-gradient(90deg, transparent, rgba(255, 107, 95, 0.75), transparent);
  box-shadow: 0 0 18px rgba(255, 107, 95, 0.32);
}

.result-beam,
.safe-result-beam {
  background: linear-gradient(90deg, transparent, rgba(120, 226, 200, 0.78), transparent);
  box-shadow: 0 0 18px rgba(120, 226, 200, 0.3);
}

.request-beam {
  left: 29%;
  top: 177px;
  width: 17%;
  background: linear-gradient(90deg, transparent, rgba(168, 184, 167, 0.7), transparent);
  box-shadow: 0 0 14px rgba(168, 184, 167, 0.24);
}

.call-beam {
  left: 55%;
  top: 177px;
  width: 16%;
  background: linear-gradient(90deg, transparent, rgba(214, 245, 118, 0.9), transparent);
  box-shadow: 0 0 20px rgba(214, 245, 118, 0.38);
}

.safe-result-beam {
  left: 55%;
  top: 302px;
  width: 16%;
}

.ghost-beam {
  left: 30%;
  top: 276px;
  width: 16%;
  background: repeating-linear-gradient(90deg, rgba(255, 107, 95, 0.4) 0 10px, transparent 10px 18px);
  opacity: 0.22;
}

.beam-agent-secret {
  left: 29%;
  top: 142px;
  width: 15%;
}

.beam-secret-process {
  left: 50%;
  top: 178px;
  width: 4px;
  height: 58px;
  background: linear-gradient(180deg, transparent, rgba(255, 107, 95, 0.75), transparent);
}

.beam-process-provider {
  left: 58%;
  top: 304px;
  width: 16%;
}

.beam-provider-result {
  left: 29%;
  top: 322px;
  width: 15%;
}

.stage-node {
  position: absolute;
  z-index: 3;
  display: grid;
  align-content: start;
  width: 126px;
  min-height: 108px;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(244, 241, 232, 0.14);
  border-radius: 24px;
  background: rgba(7, 17, 15, 0.88);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.stage-node span,
.core-shell span,
.sealed-capsule span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.stage-node strong,
.core-shell strong {
  font-size: 0.96rem;
  line-height: 1.16;
}

.stage-node small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.danger-node {
  border-color: rgba(255, 107, 95, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 107, 95, 0.12), transparent 68%),
    rgba(7, 17, 15, 0.9);
}

.stage-agent {
  left: 5%;
  top: 66px;
}

.stage-provider {
  right: 5%;
  top: 66px;
}

.stage-result {
  right: 5%;
  top: 248px;
}

.unsafe-stage .stage-secret {
  left: calc(50% - 63px);
  top: 66px;
}

.unsafe-stage .stage-process {
  left: calc(50% - 63px);
  top: 248px;
}

.unsafe-stage .stage-result {
  left: 5%;
  right: auto;
}

.kv-chamber {
  position: absolute;
  z-index: 3;
  left: calc(50% - 80px);
  top: 64px;
  display: grid;
  place-items: center;
  width: 160px;
  min-height: 282px;
}

.kv-shield {
  position: absolute;
  inset: -24px -30px;
  border: 1px solid rgba(214, 245, 118, 0.34);
  border-radius: 44% 44% 38% 38%;
  background:
    linear-gradient(90deg, rgba(214, 245, 118, 0.08), transparent 32%, transparent 68%, rgba(214, 245, 118, 0.08)),
    radial-gradient(circle at 50% 50%, rgba(214, 245, 118, 0.11), transparent 62%);
  box-shadow:
    inset 0 0 32px rgba(214, 245, 118, 0.13),
    0 0 44px rgba(214, 245, 118, 0.16);
}

.kv-shield::before,
.kv-shield::after {
  content: "";
  position: absolute;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(214, 245, 118, 0.65), transparent);
}

.kv-shield::before {
  left: 24%;
}

.kv-shield::after {
  right: 24%;
}

.core-shell {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 142px;
  min-height: 224px;
  padding: 16px;
  border: 1px solid rgba(214, 245, 118, 0.38);
  border-radius: 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(214, 245, 118, 0.18), transparent 7rem),
    rgba(7, 17, 15, 0.95);
  box-shadow:
    0 0 34px rgba(214, 245, 118, 0.18),
    0 18px 52px rgba(0, 0, 0, 0.34);
}

.core-lock {
  position: relative;
  width: 56px;
  height: 58px;
  margin-top: 2px;
  border: 2px solid rgba(214, 245, 118, 0.9);
  border-radius: 17px;
  background: rgba(214, 245, 118, 0.08);
  box-shadow: 0 0 26px rgba(214, 245, 118, 0.35);
}

.core-lock::before {
  content: "";
  position: absolute;
  left: 11px;
  top: -24px;
  width: 30px;
  height: 32px;
  border: 2px solid rgba(214, 245, 118, 0.9);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.core-lock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -32%);
}

.sealed-capsule {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(214, 245, 118, 0.22);
  border-radius: 15px;
  background: rgba(214, 245, 118, 0.08);
}

.sealed-capsule code {
  color: var(--accent);
  font-size: 0.82rem;
}

.boundary-note {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.danger-note {
  border: 1px solid rgba(255, 107, 95, 0.3);
  background: rgba(255, 107, 95, 0.08);
}

.good-note {
  border: 1px solid rgba(141, 240, 163, 0.28);
  background: rgba(141, 240, 163, 0.08);
}

.narrow {
  width: min(900px, calc(100% - 32px));
}

.intro-line {
  padding-top: 24px;
  padding-bottom: 24px;
}

.intro-line p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 48px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.065em;
}

h3 {
  letter-spacing: -0.035em;
}

.split > div > p,
.section-heading p,
.proof-copy p,
.team-panel p,
.doc-hero p {
  color: var(--muted);
  font-size: 1.04rem;
}

.risk-grid,
.engine-grid,
.boundary-grid,
.mode-grid,
.proof-list,
.feedback-grid {
  display: grid;
  gap: 16px;
}

.risk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.risk-grid article,
.engine-grid article,
.mode-card,
.boundary-card,
.feedback-card,
.toc-card,
.doc-callout {
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(244, 241, 232, 0.045);
}

.risk-grid article,
.engine-grid article,
.feedback-card {
  padding: 22px;
}

.risk-grid span,
.engine-grid span,
.feedback-card span,
.mode-number {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.risk-grid h3,
.engine-grid h3,
.feedback-card h2 {
  margin: 18px 0 8px;
  font-size: 1.15rem;
}

.feedback-card h2 {
  letter-spacing: 0;
  line-height: 1.15;
}

.risk-grid p,
.engine-grid p,
.feedback-card p,
.boundary-card li,
.mode-card p,
.doc-content p,
.doc-content li,
.faq-answer p {
  color: var(--muted);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 34px;
}

.mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-card {
  padding: 28px;
  background: rgba(7, 17, 15, 0.7);
}

.mode-card.preferred {
  background:
    linear-gradient(140deg, rgba(214, 245, 118, 0.1), transparent 52%),
    rgba(7, 17, 15, 0.7);
  border-color: rgba(214, 245, 118, 0.3);
}

.mode-card pre,
.doc-content pre,
.terminal-card {
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 18px;
  background: #030807;
}

.mode-card pre,
.doc-content pre {
  margin: 22px 0 0;
  padding: 18px;
  color: var(--accent-2);
  font-size: 0.86rem;
}

.engine-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boundary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.boundary-card {
  padding: 30px;
}

.boundary-card h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.boundary-card ul {
  margin: 0;
  padding-left: 20px;
}

.boundary-card li + li {
  margin-top: 12px;
}

.boundary-card.good {
  border-color: rgba(141, 240, 163, 0.28);
}

.boundary-card.caution {
  border-color: rgba(244, 184, 96, 0.32);
}

.start-card,
.proof,
.team-panel,
.contact-form {
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(244, 241, 232, 0.07), transparent 38%),
    rgba(8, 20, 17, 0.78);
  box-shadow: var(--shadow);
}

.start-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
}

.terminal-card {
  position: relative;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.1);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.terminal-bar span:nth-child(2) {
  background: var(--amber);
}

.terminal-bar span:nth-child(3) {
  background: var(--good);
}

.terminal-card pre {
  margin: 0;
  padding: 20px;
  color: var(--accent-2);
  font-size: 0.92rem;
}

.copy-button {
  margin: 0 20px 20px;
  padding: 10px 14px;
  border: 1px solid rgba(244, 241, 232, 0.14);
  border-radius: 999px;
  color: var(--text);
  background: rgba(244, 241, 232, 0.06);
  font-family: var(--font);
  font-weight: 800;
  cursor: pointer;
}

.proof {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
}

.proof-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-list a {
  padding: 18px;
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  background: rgba(244, 241, 232, 0.04);
}

.proof-list a:hover,
.feedback-card:hover {
  border-color: rgba(214, 245, 118, 0.42);
  background: rgba(214, 245, 118, 0.07);
}

.team-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 42px;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 64px;
  border-top: 1px solid rgba(244, 241, 232, 0.12);
}

.site-footer p {
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
  justify-content: flex-end;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--text);
}

.doc-page .section {
  width: min(1000px, calc(100% - 32px));
}

.doc-hero {
  padding-top: 120px;
  padding-bottom: 28px;
}

.doc-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
}

.doc-hero p {
  max-width: 760px;
  margin-top: 24px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding-top: 36px;
}

.toc-card {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.toc-card a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.toc-card a:hover {
  color: var(--text);
  background: rgba(244, 241, 232, 0.06);
}

.doc-content {
  display: grid;
  gap: 42px;
}

.doc-content section {
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.1);
}

.doc-content h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 4vw, 2.65rem);
}

.doc-content code,
.faq-answer code {
  color: var(--accent-2);
}

.doc-callout {
  padding: 18px;
  margin: 18px 0;
}

.doc-callout h3 {
  margin: 0 0 6px;
}

.doc-callout p {
  margin: 0;
}

.doc-callout.good {
  border-color: rgba(141, 240, 163, 0.28);
}

.doc-callout.caution {
  border-color: rgba(244, 184, 96, 0.32);
}

.faq-section {
  padding-top: 32px;
}

.faq-list {
  display: grid;
  gap: 12px;
  width: min(900px, 100%);
  margin: 0 auto;
}

.faq-item {
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 22px;
  background: rgba(244, 241, 232, 0.045);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.faq-question::after {
  content: "+";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.4rem;
}

.faq-item.open .faq-question::after {
  content: "-";
}

.faq-answer {
  padding: 0 22px 22px;
}

.faq-answer p {
  margin: 0;
}

.feedback-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 36px;
  padding-bottom: 24px;
}

.feedback-card {
  color: var(--text);
  text-decoration: none;
}

.contact-panel {
  padding-top: 24px;
}

.contact-form {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 30px;
}

.contact-form h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.contact-form h2,
.contact-form p {
  margin: 0;
}

.contact-form p,
.form-note {
  color: var(--muted);
}

.contact-form label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(244, 241, 232, 0.14);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(3, 8, 7, 0.8);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.honey-field {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .stage-path {
    animation: stage-flow 4s linear infinite;
  }

  .beam::after {
    animation: beam-sweep 2.7s ease-in-out infinite;
  }

  .danger-b,
  .call-path,
  .call-beam::after,
  .beam-secret-process::after {
    animation-delay: 0.55s;
  }

  .danger-c,
  .result-path,
  .unsafe-return,
  .safe-result-beam::after,
  .beam-process-provider::after {
    animation-delay: 1.1s;
  }

  .beam-provider-result::after {
    animation-delay: 1.65s;
  }

  .kv-shield {
    animation: shield-breathe 3.6s ease-in-out infinite;
  }

  .core-shell {
    animation: core-breathe 3.6s ease-in-out infinite;
  }
}

@keyframes stage-flow {
  100% {
    stroke-dashoffset: -80;
  }
}

@keyframes beam-sweep {
  0%, 15% {
    opacity: 0;
    transform: translateX(-110%);
  }
  30%, 78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(110%);
  }
}

@keyframes shield-breathe {
  0%, 100% {
    opacity: 0.68;
    transform: scale(0.985);
  }
  50% {
    opacity: 1;
    transform: scale(1.015);
  }
}

@keyframes core-breathe {
  0%, 100% {
    box-shadow:
      0 0 24px rgba(214, 245, 118, 0.13),
      0 18px 52px rgba(0, 0, 0, 0.34);
  }
  50% {
    box-shadow:
      0 0 44px rgba(214, 245, 118, 0.3),
      0 18px 52px rgba(0, 0, 0, 0.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .stage-path,
  .beam::after,
  .kv-shield,
  .core-shell {
    animation: none;
  }
}

@media (max-width: 980px) {
  .hero,
  .split,
  .start-card,
  .proof,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .flow-board {
    min-height: 0;
  }

  .risk-grid,
  .engine-grid,
  .feedback-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-card {
    position: static;
  }
}

@media (max-width: 740px) {
  .site-header {
    align-items: flex-start;
    border-radius: 26px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    padding: 12px;
    border: 1px solid rgba(244, 241, 232, 0.12);
    border-radius: 24px;
    background: rgba(7, 17, 15, 0.96);
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .nav-links {
    display: grid;
  }

  .nav-links a {
    padding: 13px 14px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: 52px;
  }

  .assurance-grid,
  .risk-grid,
  .engine-grid,
  .boundary-grid,
  .mode-grid,
  .proof-list,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .flow-board {
    padding: 16px;
  }

  .flow-topline {
    align-items: flex-start;
    border-radius: 20px;
    flex-direction: column;
  }

  .credential-stage {
    display: grid;
    min-height: 0;
    gap: 12px;
    padding: 14px;
  }

  .stage-lines {
    display: none;
  }

  .beam {
    display: none;
  }

  .stage-node,
  .kv-chamber {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    min-height: auto;
    transform: none;
  }

  .kv-chamber {
    min-height: 260px;
  }

  .kv-shield {
    inset: 4px;
  }

  .core-shell {
    width: min(100%, 220px);
    margin: 0 auto;
  }

  .site-footer {
    display: grid;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}
