/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

:root {
  --background: #09090b;
  --foreground: #fafafa;
  --muted: #a1a1aa;
  --muted-foreground: #71717a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --card: rgba(18, 18, 20, 0.82);
  --primary: #f5f5f5;
  --primary-foreground: #0a0a0a;
  --accent: #8b5cf6;
  --accent-mid: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-pink: #f0abfc;
  --accent-rgb: 167, 139, 250;
  --accent-muted: rgba(167, 139, 250, 0.1);
  --violation: #f87171;
  --violation-rgb: 248, 113, 113;
  --review: #fbbf24;
  --pass: #4ade80;
  --inconclusive: #a1a1aa;
  --code-string: #a5d6ff;
  --code-number: #79c0ff;
  --code-comment: #6e7681;
  --code-keyword: #ff7b72;
  --code-key: #7ee787;
  --code-cmd: #d2a8ff;
  --code-op: #f0abfc;
  --radius: 14px;
  --radius-sm: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

::selection {
  color: var(--background);
  background: var(--accent-bright);
}

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

a {
  color: var(--accent-bright);
}

.nowrap {
  white-space: nowrap;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* Body copy on the animated background gets a dark halo so drifting tokens
   never cut through it. */
.hero-description,
.hero-hint,
.section-description,
.agent-points li,
.output-copy p {
  text-shadow:
    0 0 2px var(--background),
    0 0 10px var(--background),
    0 0 22px var(--background);
}

/* Background layers */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 60% 40% at 30% -10%,
      rgba(139, 92, 246, 0.16),
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 35% at 80% -5%,
      rgba(240, 171, 252, 0.08),
      transparent 70%
    ),
    radial-gradient(
      ellipse 120% 90% at 50% 40%,
      transparent 55%,
      rgba(9, 9, 11, 0.85) 100%
    );
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
}

main,
.footer {
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background-color: rgba(9, 9, 11, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(140%);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

.nav.is-scrolled {
  background-color: rgba(9, 9, 11, 0.85);
  border-bottom-color: var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  padding: 1rem 1.5rem;
  margin: 0 auto;
}

.logo {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  text-decoration: none;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--background);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.nav-links a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent-mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover {
  color: var(--foreground);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-github {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  transition:
    transform 0.25s var(--ease-out),
    opacity 0.2s;
}

.nav.is-open .mobile-menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.is-open .mobile-menu-btn span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .mobile-menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.nav.is-open .mobile-menu {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.mobile-menu a:hover {
  color: var(--foreground);
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 8rem 1.5rem 4rem;
}

.hero-content {
  width: 100%;
  max-width: 940px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  background-color: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 100px;
  transition:
    background-color 0.2s,
    border-color 0.2s;
  animation: rise 0.9s var(--ease-out) both;
}

.hero-badge:hover {
  background-color: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.6);
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--accent-mid);
  border-radius: 50%;
}

.pulse-dot::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--accent-mid);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.hero-title {
  text-wrap: balance;
  margin-bottom: 1.5rem;
  font-size: clamp(2.6rem, 7.5vw, 5.25rem);
  font-weight: 800;
  line-height: 1.04;
  color: var(--foreground);
  letter-spacing: -0.045em;
  animation: rise 0.9s 0.08s var(--ease-out) both;
}

.shine {
  color: transparent;
  background: linear-gradient(
    110deg,
    #fafafa 20%,
    var(--accent-bright) 38%,
    var(--accent-pink) 46%,
    var(--accent-mid) 54%,
    #fafafa 72%
  );
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 250% 100%;
  animation: shine 7s linear infinite;
}

/* The lint underline: a red squiggle that draws itself under the word. */
.squiggle {
  position: relative;
}

.squiggle::after {
  position: absolute;
  right: -0.04em;
  bottom: -0.1em;
  left: -0.04em;
  height: 0.17em;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 8' preserveAspectRatio='none'%3E%3Cpath d='M0 4 Q5 0 10 4 T20 4' fill='none' stroke='%23f87171' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 0.3em 100%;
  filter: drop-shadow(0 0 10px rgba(248, 113, 113, 0.7));
  animation:
    squiggle-draw 0.9s 1s var(--ease-out) both,
    squiggle-crawl 1.2s linear infinite;
}

.hero-description {
  max-width: 640px;
  margin: 0 auto 2.25rem;
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--muted);
  animation: rise 0.9s 0.16s var(--ease-out) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3.5rem;
  animation: rise 0.9s 0.24s var(--ease-out) both;
}

.hero-stage {
  perspective: 1400px;
  animation: rise 1.1s 0.32s var(--ease-out) both;
}

.hero-hint {
  max-width: 560px;
  margin: 1.5rem auto 0;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  animation: rise 1.1s 0.5s var(--ease-out) both;
}

/* Buttons */
.btn {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.875rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.3s;
}

.btn-primary {
  color: var(--primary-foreground);
  background-color: var(--primary);
}

.btn-primary:hover {
  background-color: #fff;
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.7),
    0 8px 32px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  color: var(--foreground);
  background-color: rgba(9, 9, 11, 0.6);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background-color: rgba(24, 24, 27, 0.9);
  border-color: var(--muted-foreground);
}

/* Tilt panels */
.tilt {
  position: relative;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out);
}

.tilt-sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--sx, 50%) var(--sy, 0%),
    rgba(255, 255, 255, 0.06),
    transparent 45%
  );
  border-radius: inherit;
  opacity: var(--sheen, 0);
  transition: opacity 0.4s;
}

/* Windows: the hero, the annotated policy, and the full run */
.hero-window,
.anatomy-file,
.output-terminal {
  overflow: hidden;
  text-align: left;
  background-color: rgba(14, 14, 16, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 90px -30px rgba(139, 92, 246, 0.45);
}

.hero-window {
  width: 100%;
  margin: 0 auto;
}

.window-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot:nth-child(1) {
  background-color: #ff5f56;
}

.code-dot:nth-child(2) {
  background-color: #ffbd2e;
}

.code-dot:nth-child(3) {
  background-color: #27ca40;
}

.window-title {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
}

pre {
  margin: 0;
}

pre code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre;
}

.hero-policy {
  padding: 1.1rem 1.25rem;
}

.hero-policy code {
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: opacity 0.3s;
}

.hero-terminal {
  background: rgba(6, 6, 8, 0.9);
  border-top: 1px solid var(--border);
}

.terminal-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-foreground);
  border-bottom: 1px solid rgba(39, 39, 42, 0.6);
}

.terminal-label {
  padding: 0.05rem 0.5rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 100px;
}

.terminal-pre {
  padding: 0.9rem 1.25rem 0.6rem;
}

.terminal-pre code {
  font-size: 0.78rem;
  white-space: pre-wrap;
}

/* Output lines wrap with a hanging indent, so a wrapped reason stays clear
   of the verdict and probability columns. */
.o-line {
  display: block;
  padding-left: 21ch;
  text-indent: -21ch;
}

.o-line.is-new {
  animation: line-in 0.45s var(--ease-out) both;
}

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--accent-mid);
  animation: blink 1s steps(1) infinite;
}

.verdict-meter {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.6rem 1.25rem 0.9rem;
  transition: opacity 0.35s;
}

.verdict-meter.is-pending {
  opacity: 0.25;
}

.meter-bar {
  display: flex;
  flex: 1;
  gap: 3px;
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
}

.meter-seg {
  flex: var(--n) 1 0;
  min-width: 0;
  border-radius: 100px;
  transition: flex-grow 0.8s var(--ease-out);
}

.meter-seg.is-violation {
  background: var(--violation);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.7);
}

.meter-seg.is-review {
  background: var(--review);
}

.meter-seg.is-inconclusive {
  background: var(--inconclusive);
}

.meter-seg.is-pass {
  background: var(--pass);
}

.meter-exit {
  padding: 0.1rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--violation);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 100px;
}

.meter-exit.is-flash {
  animation: exit-flash 0.9s var(--ease-out);
}

/* Syntax colors */
.tk-key {
  color: var(--code-key);
}

.tk-str {
  color: var(--code-string);
}

.tk-cmd {
  color: var(--code-cmd);
}

.tk-flag {
  color: var(--code-number);
}

.tk-op {
  color: var(--code-op);
}

.tk-var {
  color: var(--code-keyword);
}

.tk-punct {
  color: var(--muted-foreground);
}

.tk-comment {
  font-style: italic;
  color: var(--code-comment);
}

.tk-kw {
  color: var(--code-keyword);
}

.tk-num {
  color: var(--code-number);
}

.tk-code {
  color: var(--accent-bright);
}

.tk-rule {
  font-weight: 700;
  color: var(--foreground);
}

.tk-text {
  color: #d4d4d8;
}

.o-prompt {
  color: var(--accent-mid);
}

.o-cmd {
  color: var(--foreground);
}

.v-violation {
  font-weight: 600;
  color: var(--violation);
}

.v-review {
  font-weight: 600;
  color: var(--review);
}

.v-pass {
  font-weight: 600;
  color: var(--pass);
}

.v-inconclusive {
  font-weight: 600;
  color: var(--inconclusive);
}

.o-prob {
  color: var(--foreground);
}

.o-loc {
  color: var(--code-string);
}

.o-policy {
  color: var(--accent-bright);
}

.o-reason,
.o-table {
  color: var(--muted);
}

.o-summary {
  color: var(--foreground);
}

/* Marquee */
.marquee {
  display: grid;
  gap: 0.75rem;
  padding: 2rem 0;
  overflow: hidden;
  background: rgba(9, 9, 11, 0.55);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.marquee-row {
  display: flex;
  width: max-content;
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 0.75rem;
  padding-right: 0.75rem;
  animation: marquee 70s linear infinite;
}

.marquee-reverse .marquee-track {
  animation-duration: 55s;
  animation-direction: reverse;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--code-string);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.marquee-reverse .marquee-track span {
  color: var(--code-cmd);
}

.marquee-track span:hover {
  color: var(--accent-bright);
  border-color: rgba(167, 139, 250, 0.55);
}

/* Sections */
.section {
  padding: 7rem 1.5rem;
}

.section-header {
  max-width: 680px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.section-badge {
  display: inline-block;
  padding: 0.375rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: var(--accent-muted);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 100px;
}

.section-title {
  text-wrap: balance;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted);
}

/* Spotlight cards */
.spotlight {
  position: relative;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  isolation: isolate;
}

.spotlight::before,
.spotlight::after {
  position: absolute;
  inset: -1px;
  z-index: -1;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
}

.spotlight::before {
  padding: 1px;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(196, 181, 253, 1),
    rgba(139, 92, 246, 0.35) 35%,
    transparent 65%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.spotlight::after {
  background: radial-gradient(
    520px circle at var(--mx, 50%) var(--my, 50%),
    rgba(139, 92, 246, 0.12),
    transparent 45%
  );
}

.spotlight-group:hover .spotlight::before,
.spotlight-group:hover .spotlight::after {
  opacity: 1;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 2rem;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.25rem;
  color: var(--accent-bright);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.22),
    rgba(139, 92, 246, 0.04)
  );
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 12px;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-weight: 650;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Anatomy of a policy */
.anatomy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.anatomy-part {
  --part: var(--accent-mid);
  --part-rgb: var(--accent-rgb);

  position: relative;
  padding: 0.35rem 1.25rem;
  border-left: 3px solid transparent;
  transition:
    opacity 0.35s,
    background-color 0.35s,
    border-color 0.35s;
}

.anatomy-part:first-of-type {
  padding-top: 1rem;
}

.anatomy-part:last-of-type {
  padding-bottom: 1rem;
}

.anatomy-part code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

[data-part="select"] {
  --part: #d2a8ff;
  --part-rgb: 210, 168, 255;
}

[data-part="criteria"] {
  --part: #7ee787;
  --part-rgb: 126, 231, 135;
}

[data-part="body"] {
  --part: #a5d6ff;
  --part-rgb: 165, 214, 255;
}

.anatomy-layout.has-active .anatomy-part {
  opacity: 0.35;
}

.anatomy-layout.has-active .anatomy-part.is-active {
  background-color: rgba(var(--part-rgb), 0.07);
  border-left-color: var(--part);
  opacity: 1;
}

.anatomy-notes {
  display: grid;
  gap: 1rem;
  list-style: none;
}

.anatomy-note {
  padding: 1.25rem 1.4rem;
  cursor: default;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.35s,
    box-shadow 0.35s,
    transform 0.35s var(--ease-out);
}

.anatomy-note.is-active {
  border-color: rgba(var(--part-rgb), 0.6);
  box-shadow: 0 0 40px -12px rgba(var(--part-rgb), 0.55);
}

.js .anatomy-note.reveal.is-visible.is-active {
  transform: translateX(-6px);
}

.note-key {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--part);
  background: rgba(var(--part-rgb), 0.1);
  border: 1px solid rgba(var(--part-rgb), 0.3);
  border-radius: 100px;
}

.anatomy-note h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.anatomy-note p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Selector examples */
.selectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.selector-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.selector-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.selector-card h3 {
  font-size: 1.1rem;
  font-weight: 650;
}

.tool-chip {
  padding: 0.1rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--code-cmd);
  white-space: nowrap;
  background: rgba(210, 168, 255, 0.08);
  border: 1px solid rgba(210, 168, 255, 0.25);
  border-radius: 100px;
}

.selector-card > p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.selector-card .code-block {
  flex: 1;
}

.finding {
  padding: 0.65rem 0.9rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  background: linear-gradient(
    90deg,
    rgba(248, 113, 113, 0.1),
    rgba(248, 113, 113, 0.02) 70%
  );
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-left: 3px solid var(--violation);
  border-radius: var(--radius-sm);
}

.finding code {
  display: block;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  white-space: pre-wrap;
  background: none;
}

.code-block {
  position: relative;
  overflow: hidden;
  background-color: rgba(6, 6, 8, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.code-block pre {
  padding: 1rem 1.1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  padding: 0.375rem;
  color: var(--muted);
  cursor: pointer;
  background: rgba(39, 39, 42, 0.9);
  border: none;
  border-radius: 6px;
  opacity: 0;
  transition:
    opacity 0.2s,
    color 0.2s;
}

.code-block:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.copy-btn.is-copied {
  color: var(--pass);
}

/* Pipeline */
.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  padding-top: 1.4rem;
  margin: 0 auto 4rem;
  list-style: none;
}

/* The line the steps hang from, with a packet travelling along it. */
.pipeline::before,
.pipeline::after {
  position: absolute;
  top: 1.4rem;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.pipeline::before {
  right: 10%;
  left: 10%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(167, 139, 250, 0.1),
    rgba(167, 139, 250, 0.6) 50%,
    rgba(167, 139, 250, 0.1)
  );
  transform: translateY(-1px);
}

.pipeline::after {
  left: 10%;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-pink));
  border-radius: 100px;
  box-shadow: 0 0 16px 2px rgba(240, 171, 252, 0.7);
  transform: translate(-50%, -2px);
  animation: packet 3.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.pipe-step {
  padding: 2.1rem 1.25rem 1.4rem;
  text-align: center;
}

.pipe-index {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--background);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
  transform: translate(-50%, -50%);
}

.pipe-step h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.pipe-step p {
  font-size: 0.86rem;
  color: var(--muted);
}

/* Verdict scale */
.scale-card {
  max-width: 1200px;
  padding: 2rem 2.25rem 1.5rem;
  margin: 0 auto 5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scale-head {
  margin-bottom: 1.75rem;
}

.scale-head h3 {
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scale-head p {
  font-size: 0.92rem;
  color: var(--muted);
}

.scale {
  --dot: 14px;
  --step: 16px;

  position: relative;
}

.scale-zones {
  display: flex;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.zone {
  padding: 0 0.5rem;
  white-space: nowrap;
}

.zone b {
  font-weight: 600;
}

.zone.is-pass {
  flex: 50 1 0;
  color: var(--pass);
}

.zone.is-review {
  flex: 15 1 0;
  color: var(--review);
  text-align: center;
}

.zone.is-violation {
  flex: 35 1 0;
  color: var(--violation);
  text-align: right;
}

.scale-track {
  position: relative;
  height: calc(var(--rows, 4) * var(--step) + 18px);
  background:
    linear-gradient(
        90deg,
        rgba(74, 222, 128, 0.14) 0 50%,
        rgba(251, 191, 36, 0.16) 50% 65%,
        rgba(248, 113, 113, 0.16) 65% 100%
      )
      bottom / 100% 6px no-repeat,
    linear-gradient(
      90deg,
      rgba(74, 222, 128, 0.05) 0 50%,
      rgba(251, 191, 36, 0.06) 50% 65%,
      rgba(248, 113, 113, 0.06) 65% 100%
    );
  border-radius: 10px;
  transition: height 0.4s var(--ease-out);
}

.scale-dot {
  position: absolute;
  bottom: calc(12px + var(--row, 0) * var(--step));
  left: calc(var(--p) * 100%);
  width: var(--dot);
  height: var(--dot);
  padding: 0;
  cursor: pointer;
  background: currentColor;
  border: 2px solid rgba(9, 9, 11, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 14px currentColor;
  transform: translateX(-50%) scale(var(--s, 1));
  transition:
    transform 0.25s var(--ease-out),
    bottom 0.4s var(--ease-out);
}

.scale-dot.is-pass {
  color: var(--pass);
}

.scale-dot.is-violation {
  color: var(--violation);
}

.scale-dot:hover,
.scale-dot:focus-visible,
.scale-dot.is-active {
  --s: 1.45;

  z-index: 1;
}

.js .scale-card:not(.is-visible) .scale-dot {
  --s: 0;
}

.js .scale-card.is-visible .scale-dot {
  transition-delay: calc(var(--i, 0) * 45ms + 300ms), 0s;
}

.js .scale-card.is-visible .scale-dot:hover {
  transition-delay: 0s;
}

.scale-axis {
  position: relative;
  height: 1.4rem;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-foreground);
}

.scale-axis span {
  position: absolute;
  left: calc(var(--p) * 100%);
  transform: translateX(-50%);
}

.scale-axis span:first-child {
  transform: none;
}

.scale-axis span:last-child {
  transform: translateX(-100%);
}

.scale-readout {
  min-height: 1.6em;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--foreground);
  text-align: center;
}

/* Output */
.output-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1400px;
}

.output-copy h3 {
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.output-copy > p {
  margin-bottom: 1.25rem;
  color: var(--muted);
}

.exit-table {
  width: 100%;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  border-collapse: collapse;
}

.exit-table th {
  padding: 0.45rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-strong);
}

.exit-table td {
  padding: 0.5rem 0.6rem;
  color: var(--muted);
  vertical-align: top;
  background: rgba(9, 9, 11, 0.6);
  border-bottom: 1px solid var(--border);
}

.exit-table td:first-child {
  width: 4.5rem;
}

.exit-table tr:nth-child(2) code {
  color: var(--violation);
}

.output-note {
  font-size: 0.88rem;
}

.output-terminal pre {
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
}

.output-terminal code {
  font-size: 0.74rem;
  white-space: pre-wrap;
}

/* Evals */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto 1.25rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
}

.stat-value {
  font-size: clamp(2.4rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #fff 30%, var(--accent-bright) 70%, var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  margin: 0.6rem 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card p {
  font-size: 0.88rem;
  color: var(--muted);
}

.evals-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: center;
  max-width: 1200px;
  padding: 2rem 2.25rem;
  margin: 0 auto;
  background:
    radial-gradient(
      ellipse 60% 120% at 0% 50%,
      rgba(139, 92, 246, 0.12),
      transparent 70%
    ),
    var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.corpus-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.corpus-facts b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.corpus-facts span {
  font-size: 0.82rem;
  color: var(--muted);
}

.evals-detail > p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Agents */
.agents-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.agents-copy .section-description {
  margin-bottom: 1.5rem;
}

.agent-points {
  display: grid;
  gap: 0.85rem;
  list-style: none;
}

.agent-points li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.agent-points li b {
  color: var(--foreground);
}

.agent-points li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 0.55rem;
  height: 0.55rem;
  content: "";
  background: var(--accent-mid);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.7);
  transform: rotate(45deg);
}

.agents-loop {
  display: grid;
  gap: 2rem;
  justify-items: center;
}

.loop {
  --radius-loop: 128px;

  position: relative;
  width: 320px;
  height: 320px;
}

.loop-ring {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.loop-track {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
}

.loop-arc {
  fill: none;
  stroke: url("#loop-gradient");
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 200 604;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.8));
  transform-origin: 160px 160px;
  animation: loop-spin 8s linear infinite;
}

.loop-node {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(14, 14, 16, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  transform: translate(-50%, -50%) rotate(var(--a))
    translateY(calc(-1 * var(--radius-loop))) rotate(calc(-1 * var(--a)));
  animation: loop-node 8s linear infinite;
  animation-delay: calc(var(--a) / 90deg * 2s);
}

.loop-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--background);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: radial-gradient(circle at 30% 30%, var(--accent-bright), var(--accent));
  border-radius: 50%;
  box-shadow:
    0 0 0 10px rgba(139, 92, 246, 0.08),
    0 0 60px rgba(139, 92, 246, 0.55);
  transform: translate(-50%, -50%);
}

.agents-loop .code-block {
  width: 100%;
}

.agents-loop .code-block code {
  font-size: 0.76rem;
}

.code-block.terminal code {
  color: var(--pass);
}

/* Steps */
.steps {
  max-width: 860px;
  margin: 0 auto;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}

.step:not(:last-child)::before {
  position: absolute;
  top: 44px;
  bottom: 0;
  left: 19px;
  width: 2px;
  content: "";
  background: linear-gradient(rgba(167, 139, 250, 0.55), var(--border));
}

.step-number {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--background);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content h3 {
  margin: 0.4rem 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 650;
}

.step-content > p {
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* CTA */
.cta {
  padding: 5rem 1.5rem 8rem;
  text-align: center;
}

.cta-content {
  max-width: 720px;
  padding: 3.5rem 2rem;
  margin: 0 auto;
  background:
    radial-gradient(
      ellipse 80% 80% at 50% 0%,
      rgba(139, 92, 246, 0.2),
      transparent 70%
    ),
    rgba(14, 14, 16, 0.85);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.cta h2 {
  text-wrap: balance;
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.cta p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Footer */
.footer {
  padding: 4rem 1.5rem 2rem;
  background: rgba(9, 9, 11, 0.9);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  gap: 3rem;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.footer-logo p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-column h4 {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-column a {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--foreground);
}

.footer-bottom {
  max-width: 1200px;
  padding-top: 2rem;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Scroll reveal (only when JS is available) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease-out) var(--reveal-delay, 0s),
    transform 0.8s var(--ease-out) var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .tilt.reveal.is-visible {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

/* Keyframes */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shine {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -150% 0;
  }
}

@keyframes squiggle-draw {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes squiggle-crawl {
  to {
    background-position-x: 0.3em;
  }
}

@keyframes pulse {
  from {
    opacity: 0.8;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(3);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
    filter: brightness(2.2);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes exit-flash {
  from {
    box-shadow: 0 0 24px rgba(248, 113, 113, 0.9);
  }
  to {
    box-shadow: none;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

@keyframes packet {
  from {
    left: 10%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    left: 90%;
    opacity: 0;
  }
}

@keyframes loop-spin {
  from {
    transform: rotate(-180deg);
  }
  to {
    transform: rotate(180deg);
  }
}

@keyframes loop-node {
  0%,
  22% {
    color: var(--foreground);
    border-color: rgba(167, 139, 250, 0.8);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.6);
  }
  30%,
  100% {
    color: var(--muted);
    border-color: var(--border-strong);
    box-shadow: none;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .nav-links {
    gap: 1.2rem;
  }

  .pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.75rem;
  }

  .pipeline::before,
  .pipeline::after {
    display: none;
  }

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

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anatomy-layout,
  .output-layout,
  .agents-layout,
  .evals-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 7rem 1rem 3rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .hero-policy code,
  .terminal-pre code,
  .anatomy-part code,
  .code-block code {
    font-size: 0.7rem;
  }

  .o-line {
    padding-left: 4ch;
    text-indent: -4ch;
  }

  .hero-hint {
    display: none;
  }

  .section {
    padding: 5rem 1rem;
  }

  .features-grid,
  .pipeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-grid {
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1.25rem 1rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .scale-card,
  .evals-detail {
    padding: 1.5rem 1.25rem;
  }

  .zone b + * {
    display: none;
  }

  .loop {
    --radius-loop: 104px;

    width: 260px;
    height: 260px;
    transform-origin: center;
  }

  .loop-ring {
    transform: scale(0.8125);
  }

  .loop-center {
    width: 88px;
    height: 88px;
  }

  .step {
    gap: 1rem;
  }

  .step:not(:last-child)::before {
    left: 15px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 2.5rem;
  }
}

@media (hover: none) {
  .hero-hint {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

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

  .pipeline::after {
    display: none;
  }

  .marquee-row {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

  .marquee-track {
    flex-wrap: wrap;
    justify-content: center;
  }

  .marquee-track[aria-hidden="true"] {
    display: none;
  }
}
