/* Rollcage landing page. Dark, cinematic; the brand blue with signal colors for safe,
   heads-up and danger. Tokens first, then layout, then each section in page order. */

:root {
  --bg: #04060b;
  --bg-2: #080c15;
  --bg-3: #0d1220;
  --panel: rgba(14, 19, 32, 0.72);
  --panel-solid: #0e1320;
  --line: rgba(148, 163, 196, 0.13);
  --line-2: rgba(148, 163, 196, 0.22);
  --text: #e9eef8;
  --muted: #8f9ab0;
  --dim: #76819a;
  --blue: #5b8cff;
  --blue-2: #3d6ef0;
  --cyan: #45d4ff;
  --violet: #9b8cff;
  --red: #ff4d63;
  --amber: #ffb547;
  --green: #3ddc97;
  --mark: #5f9be9;
  --radius: 18px;
  --radius-lg: 28px;
  --wrap: 1200px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-blue: 0 0 0 1px rgba(91, 140, 255, 0.35), 0 10px 40px -10px rgba(91, 140, 255, 0.55);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain over everything, very faint. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img,
svg,
canvas {
  display: block;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code,
kbd,
pre,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(91, 140, 255, 0.4);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

h2 {
  font-size: clamp(34px, 5vw, 64px);
}

h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--cyan);
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.lede {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
}

.grad {
  background: linear-gradient(100deg, #ffffff 0%, #cfe0ff 30%, #7aa2ff 62%, #45d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  position: relative;
  padding: clamp(72px, 9vw, 124px) 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head .lede {
  margin-top: 20px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: #f4f7ff;
  color: #060912;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 12px 40px -8px rgba(122, 162, 255, 0.65);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 18px 50px -8px rgba(122, 162, 255, 0.85);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav[data-solid] {
  background: rgba(4, 6, 11, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand .logo {
  width: 132px;
  height: auto;
  --wordmark: #eef2fb;
  --mark-fill: var(--mark);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
}

.kbd-hint:hover {
  color: var(--text);
  border-color: var(--line-2);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.nav-signin {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a,
.nav-signin,
.kbd-hint {
  white-space: nowrap;
}

/* Small laptops: the Search pill goes (Cmd+K still works) and the links sit closer. */
@media (max-width: 1180px) {
  .kbd-hint {
    display: none;
  }

  .nav-inner {
    gap: 16px;
  }

  .nav-links {
    margin-left: 0;
  }

  .nav-links a {
    padding: 8px 10px;
  }
}

.nav-signin:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav[data-open] .menu-btn span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav[data-open] .menu-btn span:nth-child(2) {
  opacity: 0;
}

.nav[data-open] .menu-btn span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu {
  display: none;
}

@media (max-width: 960px) {
  .nav-links,
  .kbd-hint,
  .nav-signin {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  .nav-end .btn {
    display: none;
  }
  .menu {
    position: fixed;
    inset: 72px 0 auto;
    display: grid;
    gap: 4px;
    padding: 16px 16px 24px;
    background: rgba(4, 6, 11, 0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* out of the Tab order once it has faded out */
    transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0s 0.3s;
  }
  .nav[data-open] {
    background: rgba(4, 6, 11, 0.96);
  }
  .nav[data-open] .menu {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s var(--ease), opacity 0.25s;
  }
  .menu a {
    padding: 14px 12px;
    border-radius: 12px;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
  }
  .menu a:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  .menu .btn {
    margin-top: 10px;
  }
  .menu a.btn-primary,
  .menu a.btn-primary:hover {
    background: #f4f7ff;
    color: #060912;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: max(100svh, 760px);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 70% 45%, rgba(61, 110, 240, 0.28), transparent 70%),
    radial-gradient(40% 40% at 20% 20%, rgba(155, 140, 255, 0.14), transparent 70%),
    radial-gradient(30% 35% at 85% 85%, rgba(69, 212, 255, 0.12), transparent 70%);
}

.hero::after {
  /* a perspective grid floor */
  content: "";
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -10%;
  height: 55%;
  z-index: -2;
  background-image:
    linear-gradient(rgba(91, 140, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, 0.16) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 55%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 55%, transparent 95%);
}

.cage {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-copy {
  position: relative;
  max-width: 640px;
}

.js .hero-copy > *,
.js .hud {
  animation: rise 1s var(--ease) both;
}

.js .hero-copy > :nth-child(2) {
  animation-delay: 0.08s;
}

.js .hero-copy > :nth-child(3) {
  animation-delay: 0.18s;
}

.js .hero-copy > :nth-child(4) {
  animation-delay: 0.28s;
}

.js .hero-copy > :nth-child(5) {
  animation-delay: 0.38s;
}

.js .hud {
  animation-delay: 0.5s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 160;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 14px 18px;
  border: 1px solid rgba(255, 181, 71, 0.5);
  border-radius: 14px;
  background: rgba(14, 11, 6, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px -20px rgba(255, 181, 71, 0.6);
  color: #ffe2b5;
  font-size: 15px;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.3s;
  pointer-events: none;
}

.toast[data-on] {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.toast code {
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.6);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.badge b {
  color: var(--text);
  font-weight: 600;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--green);
  animation: ping 2s var(--ease) infinite;
}

@keyframes ping {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(2.2);
    opacity: 0;
  }
}

.hero h1 {
  font-size: clamp(44px, 5.5vw, 82px);
  letter-spacing: -0.045em;
  line-height: 1;
}

@media (max-width: 560px) {
  .wide-only {
    display: none;
  }
}

.hero .lede {
  max-width: 540px;
  margin-top: 26px;
}

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

.hero-try {
  margin: 18px 0 0;
  color: var(--dim);
  font-size: 14px;
}

.hero-try a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(69, 212, 255, 0.4);
  text-underline-offset: 3px;
}

.hud {
  position: relative;
  justify-self: end;
  width: min(100%, 440px);
  margin-top: 260px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 11, 19, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hud-stats {
  display: flex;
  gap: 16px;
}

.hud-stats b {
  color: var(--text);
  font-weight: 600;
}

.hud-stats .caught b {
  color: var(--amber);
}

.hud-feed {
  display: grid;
  height: 182px;
  padding: 8px 0;
  overflow: hidden;
  align-content: end;
  mask-image: linear-gradient(to bottom, transparent, black 40%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%);
}

.hud-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 5px 16px;
  font: 12.5px/1.4 var(--mono);
  color: #c9d3e6;
  animation: hud-in 0.5s var(--ease);
}

.hud-row span:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud-row .ms {
  color: var(--dim);
}

.hud-row.caught {
  color: #ffd9a0;
}

.hud-row.caught .ms {
  color: var(--amber);
}

.hud-row svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hud-row .ok {
  stroke: var(--green);
}

.hud-row .stop {
  stroke: var(--amber);
}

@keyframes hud-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: var(--dim);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--dim), transparent);
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: top;
}

@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 120px 0 90px;
  }
  .hud {
    justify-self: stretch;
    width: 100%;
    margin-top: 0;
  }
  .cage {
    opacity: 0.45;
  }
}

/* ---------- Marquee ---------- */

.marquee {
  position: relative;
  padding: 26px 0;
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 18, 32, 0.6), rgba(4, 6, 11, 0.4));
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 48s linear infinite;
}

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

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  color: #aab4c8;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.marquee-track span::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-2);
}

.marquee-track span.db {
  color: #7fa4ff;
}

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

/* ---------- Incidents ---------- */

.incidents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.incident {
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 320px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 77, 99, 0.06), transparent 50%), var(--panel-solid);
  overflow: hidden;
}

.incident .when {
  color: var(--red);
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.incident .big {
  font-size: clamp(40px, 4.4vw, 58px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #fff;
}

.incident p {
  color: var(--muted);
}

.incident.answer {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(91, 140, 255, 0.25), transparent 60%),
    var(--panel-solid);
  border-color: rgba(91, 140, 255, 0.35);
}

.incident.answer .when {
  color: var(--cyan);
}

@media (max-width: 960px) {
  .incidents {
    grid-template-columns: minmax(0, 1fr);
  }
  .incident {
    min-height: 0;
  }
}

/* ---------- Simulator ---------- */

.sim {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0c1120, #070a12);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}

.sim-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.sim-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.sim-pick > span {
  color: var(--dim);
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sim-pick .seg button {
  height: 32px;
  padding: 0 12px;
  font: 500 12.5px var(--mono);
}

.sim-pick .seg button:disabled {
  opacity: 0.5;
  cursor: default;
}

.dots {
  display: flex;
  gap: 7px;
}

.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2a3142;
}

.sim-title {
  color: var(--muted);
  font: 500 13px/1 var(--mono);
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.switch .track {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #283044;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.35s var(--ease), box-shadow 0.35s;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s var(--ease);
}

.switch[aria-checked="true"] .track {
  background: linear-gradient(90deg, var(--blue-2), var(--cyan));
  box-shadow: 0 0 20px rgba(69, 212, 255, 0.45);
}

.switch[aria-checked="true"] .track::after {
  transform: translateX(24px);
}

.switch .state {
  min-width: 26px;
  color: var(--muted);
  font: 600 12px/1 var(--mono);
}

.switch[aria-checked="true"] .state {
  color: var(--cyan);
}

.sim-body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 520px;
}

.sim-agent {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-right: 1px solid var(--line);
  font-size: 15px;
}

.sim-label {
  color: var(--dim);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.msg {
  max-width: 92%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
  animation: msg-in 0.45s var(--ease) both;
}

.msg.you {
  align-self: flex-end;
  background: var(--blue-2);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg.ai {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  color: #d6deec;
}

.msg.tool {
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #05080f;
  font: 13px/1.5 var(--mono);
  color: #c6d0e3;
}

.msg.tool b {
  color: var(--violet);
  font-weight: 600;
}

.msg.tool.danger {
  border-color: rgba(255, 77, 99, 0.45);
  box-shadow: 0 0 30px -10px rgba(255, 77, 99, 0.6);
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.rc-card {
  border: 1px solid rgba(255, 181, 71, 0.5);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 181, 71, 0.1), rgba(255, 181, 71, 0.03));
  padding: 16px;
  animation: msg-in 0.45s var(--ease) both;
  box-shadow: 0 0 40px -16px rgba(255, 181, 71, 0.7);
}

.rc-card.ok {
  border-color: rgba(61, 220, 151, 0.5);
  background: linear-gradient(180deg, rgba(61, 220, 151, 0.1), rgba(61, 220, 151, 0.03));
  box-shadow: 0 0 40px -16px rgba(61, 220, 151, 0.7);
}

.rc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.rc-head svg {
  width: 20px;
  height: 20px;
}

.rc-card p {
  color: #e6ebf5;
  font-size: 14.5px;
}

.rc-card code {
  color: var(--amber);
}

.pipe {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 12px 0;
}

.pipe span {
  position: relative;
  padding: 7px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  font: 600 11px/1.2 var(--mono);
  text-align: center;
  transition: color 0.3s, background 0.3s;
}

.pipe span.done {
  background: rgba(61, 220, 151, 0.12);
  color: var(--green);
}

.rc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rc-actions button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.rc-actions button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.rc-actions .keep {
  background: #f4f7ff;
  color: #060912;
  border-color: transparent;
}

.sim-db {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.db-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.db-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.db-name small {
  color: var(--muted);
  font-weight: 500;
}

.db-ic {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(61, 220, 151, 0.12);
  color: var(--green);
}

.db-ic svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.db-count {
  font: 600 13px/1 var(--mono);
  color: var(--muted);
}

.db-count b {
  color: var(--text);
  font-size: 15px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font: 13px/1.4 var(--mono);
}

.table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-2);
  color: var(--dim);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: #c9d3e6;
  white-space: nowrap;
}

.table tr {
  transition: opacity 0.5s, transform 0.5s var(--ease), background 0.3s;
}

.table tr.gone {
  opacity: 0;
  transform: translateX(40px);
  background: rgba(255, 77, 99, 0.18);
}

.table tr.hit td {
  background: rgba(255, 77, 99, 0.16);
  color: #ffc2ca;
}

.table tr.back {
  animation: row-back 0.6s var(--ease) both;
}

@keyframes row-back {
  from {
    opacity: 0;
    transform: translateY(-8px);
    background: rgba(61, 220, 151, 0.2);
  }
}

.plan {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(91, 140, 255, 0.15);
  color: #9fbaff;
  font-size: 11px;
}

.plan.free {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.db-void {
  position: absolute;
  inset: 70px 24px 24px;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
}

.sim[data-state="wrecked"] .db-void {
  opacity: 1;
}

.db-void .err {
  color: var(--red);
  font: 600 14px/1.5 var(--mono);
}

.db-void p {
  color: var(--muted);
  font-size: 15px;
}

.sim[data-state="wrecked"] .sim-db {
  background: radial-gradient(80% 60% at 50% 40%, rgba(255, 77, 99, 0.12), transparent 70%);
}

.sim[data-state="wrecked"] .db-ic {
  background: rgba(255, 77, 99, 0.14);
  color: var(--red);
}

.sim[data-state="saved"] .sim-db {
  background: radial-gradient(80% 60% at 50% 40%, rgba(61, 220, 151, 0.1), transparent 70%);
}

.sim-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-6px);
  }
  40%,
  60% {
    transform: translateX(6px);
  }
}

@media (max-width: 900px) {
  .sim-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .sim-agent {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sim-controls {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .table th:nth-child(4),
  .table td:nth-child(4) {
    display: none;
  }
}

/* ---------- How it works (pinned steps) ---------- */

.how {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 6vw, 90px);
}

.how-steps {
  display: grid;
  gap: 8px;
  align-content: start;
}

.how-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  text-align: left;
  color: var(--muted);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.how-step:hover {
  background: rgba(255, 255, 255, 0.025);
}

.how-step[aria-selected="true"] {
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.1), rgba(91, 140, 255, 0.02));
  color: var(--text);
}

.how-step .n {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  font: 600 14px/1 var(--mono);
}

.how-step[aria-selected="true"] .n {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #04060b;
  box-shadow: 0 0 24px rgba(69, 212, 255, 0.45);
}

.how-step b {
  display: block;
  margin-bottom: 4px;
  color: inherit;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.how-step span {
  font-size: 15px;
  line-height: 1.5;
}

.how-stage {
  position: sticky;
  top: 110px;
  align-self: start;
  min-height: 460px;
  display: grid;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(91, 140, 255, 0.16), transparent 70%),
    var(--panel-solid);
  overflow: hidden;
}

.how-slide {
  grid-area: 1 / 1;
  display: grid;
  place-content: center;
  padding: 36px;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}

.how-slide.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.term {
  width: min(100%, 520px);
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #04070d;
  font: 13.5px/1.9 var(--mono);
  color: #c9d3e6;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

.term .dim {
  color: var(--dim);
}

.term .red {
  color: #ff8b99;
}

.term .ok {
  color: var(--green);
}

.checks {
  display: grid;
  gap: 8px;
  width: min(100%, 520px);
}

.check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  font: 13px/1.3 var(--mono);
}

.check span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.check.hot {
  border-color: rgba(255, 181, 71, 0.5);
  background: rgba(255, 181, 71, 0.07);
}

.check .t {
  color: var(--dim);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag.safe {
  background: rgba(61, 220, 151, 0.13);
  color: var(--green);
}

.tag.warn {
  background: rgba(255, 181, 71, 0.14);
  color: var(--amber);
}

.tag.prod {
  background: rgba(255, 77, 99, 0.15);
  color: #ff8b99;
}

.tag.ask {
  background: rgba(155, 140, 255, 0.16);
  color: #c3b9ff;
}

.tag.dev {
  background: rgba(91, 140, 255, 0.14);
  color: #9fbaff;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 560px);
}

.flow div {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px 12px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.flow b {
  font: 600 14px/1.2 var(--mono);
}

.flow small {
  color: var(--muted);
  font-size: 12px;
}

.flow div:last-child {
  border-color: rgba(61, 220, 151, 0.5);
  background: rgba(61, 220, 151, 0.08);
}

.how-slide.on .flow div {
  animation: flow-in 0.6s var(--ease) both;
}

.how-slide.on .flow div:nth-child(2) {
  animation-delay: 0.15s;
}

.how-slide.on .flow div:nth-child(3) {
  animation-delay: 0.3s;
}

.how-slide.on .flow div:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes flow-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 960px) {
  .how {
    grid-template-columns: minmax(0, 1fr);
  }
  .how-stage {
    position: relative;
    top: 0;
    order: -1;
    min-height: 380px;
  }
}

/* ---------- Command X-ray ---------- */

.xray {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
  overflow: hidden;
  min-height: 620px;
}

.xray-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.xray-search {
  position: relative;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.xray-search svg {
  position: absolute;
  left: 30px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.xray-search input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #060911;
  font: 14px var(--mono);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.xray-search input:focus {
  border-color: rgba(91, 140, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.15);
}

.xray-search kbd {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
}

.chips {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, black 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, black 85%, transparent);
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.xray-list {
  flex: 1;
  min-height: 0;
  max-height: 520px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.xray-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font: 12.5px/1.4 var(--mono);
  color: #c4cee0;
}

.xray-item span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.xray-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.xray-item[aria-selected="true"] {
  background: rgba(91, 140, 255, 0.14);
  color: #fff;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.dot.production {
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 77, 99, 0.8);
}

.dot.ask {
  background: var(--violet);
}

.dot.warn,
.dot.destructive {
  background: var(--amber);
}

/* The live check: the typed command, run through the real engine in the browser. */
.xray-item.live {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  margin-bottom: 6px;
  border: 1px dashed rgba(69, 212, 255, 0.35);
  color: #e6f7ff;
}

.xray-item.live span:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.xray-item.live[aria-selected="true"] {
  border-style: solid;
  border-color: rgba(69, 212, 255, 0.55);
  background: linear-gradient(90deg, rgba(69, 212, 255, 0.14), rgba(91, 140, 255, 0.1));
}

.live-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(69, 212, 255, 0.12);
  color: var(--cyan);
  font: 600 11px/1.4 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dot.pending {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--cyan);
  animation: pending 1.1s ease-in-out infinite;
}

@keyframes pending {
  50% {
    opacity: 0.35;
  }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.2px solid rgba(69, 212, 255, 0.25);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot.pending,
  .spinner {
    animation: none;
  }
}

.verdict[data-kind="loading"] .verdict-icon {
  background: rgba(69, 212, 255, 0.1);
  color: var(--cyan);
}

.verdict[data-kind="error"] .verdict-icon {
  background: rgba(148, 163, 196, 0.12);
  color: var(--muted);
}

.said[data-kind="none"] {
  display: none;
}

.xray-foot-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* The sample project's files. */
.project-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
}

.project-dialog[open] {
  display: flex;
  flex-direction: column;
}

.project-dialog::backdrop {
  background: rgba(2, 4, 9, 0.7);
  backdrop-filter: blur(6px);
}

.pd-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 22px 14px;
}

.pd-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.pd-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.pd-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: none;
  color: var(--muted);
}

.pd-close:hover {
  color: var(--text);
}

.pd-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.pd-tabs {
  display: flex;
  gap: 6px;
  padding: 0 22px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pd-tabs [role="tab"] {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 12.5px var(--mono);
}

.pd-tabs [role="tab"][aria-selected="true"] {
  border-color: rgba(69, 212, 255, 0.55);
  background: rgba(69, 212, 255, 0.12);
  color: #e6f7ff;
}

.pd-file {
  flex: 1;
  min-height: 160px;
  margin: 0 22px 22px;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #04070d;
  color: #d9e1f0;
  font: 13px/1.6 var(--mono);
  white-space: pre;
}

.linkbtn:disabled {
  color: var(--dim);
  cursor: default;
}

.xray-empty {
  padding: 30px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.xray-main {
  /* Scrolled to on a phone after a live check: clear of the sticky nav. */
  scroll-margin-top: 84px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  min-width: 0;
}

.xray-cmd {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #04070d;
  font: 14.5px/1.65 var(--mono);
  color: #d9e1f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}

.xray-cmd .ps {
  color: var(--green);
  margin-right: 8px;
}

.xray-cmd .hl {
  border-radius: 4px;
  background: rgba(255, 77, 99, 0.2);
  color: #ffb3bd;
  box-shadow: 0 0 0 1px rgba(255, 77, 99, 0.45);
}

.xray-cmd .k {
  color: #b9a8ff;
}

.xray-cmd .s {
  color: #9fe3c4;
}

.xray-cmd .f {
  color: #8fb6ff;
}

.xray-cmd .v {
  color: #ffd38a;
}

.xray-cmd::after {
  /* the scan line */
  content: "";
  position: absolute;
  inset: 0 auto 0 -30%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(69, 212, 255, 0.25), transparent);
  opacity: 0;
}

.xray-cmd.scan::after {
  animation: scan 0.9s var(--ease);
}

@keyframes scan {
  0% {
    left: -30%;
    opacity: 1;
  }
  100% {
    left: 110%;
    opacity: 0.6;
  }
}

.verdict {
  display: flex;
  align-items: center;
  gap: 14px;
}

.verdict-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.verdict-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verdict b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.verdict small {
  color: var(--muted);
  font-size: 14px;
}

.verdict[data-kind="safe"] .verdict-icon {
  background: rgba(61, 220, 151, 0.13);
  color: var(--green);
}

.verdict[data-kind="production"] .verdict-icon {
  background: rgba(255, 77, 99, 0.14);
  color: var(--red);
}

.verdict[data-kind="ask"] .verdict-icon {
  background: rgba(155, 140, 255, 0.16);
  color: var(--violet);
}

.verdict[data-kind="warn"] .verdict-icon,
.verdict[data-kind="destructive"] .verdict-icon {
  background: rgba(255, 181, 71, 0.14);
  color: var(--amber);
}

.findings {
  display: grid;
  gap: 10px;
}

.finding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 14.5px;
}

.finding .rule {
  color: var(--dim);
  font: 12px/1.6 var(--mono);
  text-decoration: none;
}

.finding a.rule:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.finding .dbs {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

.finding .inner {
  grid-column: 2;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.finding .inner code {
  color: #e6f7ff;
  font: 12.5px/1.5 var(--mono);
}

.said {
  padding: 16px 18px;
  border-left: 3px solid var(--violet);
  border-radius: 0 12px 12px 0;
  background: rgba(155, 140, 255, 0.07);
  font-size: 15px;
  color: #dfe5f2;
}

.said strong {
  color: #fff;
}

.said code {
  color: var(--amber);
}

.said[data-kind="safe"] {
  border-color: var(--green);
  background: rgba(61, 220, 151, 0.06);
}

.said[data-kind="warn"],
.said[data-kind="destructive"] {
  border-color: var(--amber);
  background: rgba(255, 181, 71, 0.06);
}

.said[data-kind="production"] {
  border-color: var(--red);
  background: rgba(255, 77, 99, 0.06);
}

.xray-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}

.linkbtn {
  border: 0;
  background: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
}

.xray-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.xray-stats button {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease);
}

.xray-stats button:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.xray-stats button[aria-pressed="true"] {
  border-color: rgba(91, 140, 255, 0.7);
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.16), var(--panel-solid));
}

.xray-stats b {
  display: block;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.xray-stats span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 960px) {
  .xray {
    grid-template-columns: minmax(0, 1fr);
  }
  .xray-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .xray-list {
    max-height: 280px;
  }
  .xray-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Agents ---------- */

.agents {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.agent {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  text-align: left;
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}

.agent:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}

.agent b {
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.agent small {
  color: var(--muted);
  font-size: 12.5px;
}

.agent[aria-pressed="true"] {
  border-color: rgba(91, 140, 255, 0.7);
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.16), rgba(91, 140, 255, 0.04)), var(--panel-solid);
  box-shadow: var(--glow-blue);
}

.agent .mode {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
}

.agent .mode.block {
  background: var(--amber);
}

.agent-detail {
  position: sticky;
  top: 100px;
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(91, 140, 255, 0.18), transparent 70%),
    var(--panel-solid);
}

.agent-detail h3 {
  font-size: 30px;
}

.agent-detail > .tag {
  justify-self: start;
}

.agent-detail .row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.agent-detail .row > span {
  color: var(--muted);
  font-size: 14px;
}

.agent-detail code {
  word-break: break-all;
  color: #b9cbff;
}

.agent-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.agent-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agent-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
}

.agent-legend i.block {
  background: var(--amber);
}

@media (max-width: 960px) {
  .agents {
    grid-template-columns: minmax(0, 1fr);
  }
  .agent-detail {
    position: relative;
    top: 0;
  }
}

@media (max-width: 560px) {
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agent-detail .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* ---------- Bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  grid-column: span 2;
  min-height: 300px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
  overflow: hidden;
  isolation: isolate;
}

.tile::before {
  /* spotlight that follows the pointer */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(91, 140, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.tile:hover::before {
  opacity: 1;
}

.tile.wide {
  grid-column: span 4;
}

.tile p {
  color: var(--muted);
  font-size: 15.5px;
}

.tile h3 {
  font-size: 22px;
}

.tile .art {
  margin-top: auto;
  padding-top: 10px;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-cloud span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 77, 99, 0.28);
  border-radius: 8px;
  background: rgba(255, 77, 99, 0.06);
  color: #ffb3bd;
  font: 12px/1.3 var(--mono);
}

.envlines {
  padding: 14px 16px;
  border-radius: 12px;
  background: #04070d;
  border: 1px solid var(--line);
  font: 12.5px/1.8 var(--mono);
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}

.envlines .hit {
  color: #ffd38a;
}

.envlines > div {
  overflow-wrap: anywhere;
}

.snaplist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.snaplist li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}

.snaplist code {
  color: var(--green);
}

.snaplist span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.confirm-field span:last-child {
  padding: 10px 12px;
  border: 1px solid rgba(91, 140, 255, 0.5);
  border-radius: 10px;
  background: #04070d;
  color: var(--text);
  font: 14px var(--mono);
}

.confirm-field i {
  display: inline-block;
  width: 2px;
  height: 16px;
  margin-left: 2px;
  vertical-align: -3px;
  background: var(--cyan);
  animation: blink 1s steps(1) infinite;
}

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

.loglist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 13px var(--mono);
}

.loglist li {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 960px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile,
  .tile.wide {
    grid-column: auto;
    min-height: 0;
  }
}

/* ---------- Armor ---------- */

.armor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}

.armor li {
  display: grid;
  gap: 10px;
  padding: 30px;
  background: var(--bg-2);
  list-style: none;
}

.armor svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.armor b {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.armor span {
  color: var(--muted);
  font-size: 15px;
}

ul.armor {
  margin: 0;
  padding: 0;
}

@media (max-width: 960px) {
  .armor {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Why not just... ---------- */

.whynot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wn {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.wn h3 {
  font-size: 21px;
}

.wn p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.wn p > span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wn p > span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.wn-catch > span {
  color: var(--amber);
}

.wn .wn-fix {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.wn-fix > span {
  color: var(--green);
}

.wn code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 196, 0.1);
  color: #dbe6ff;
  font-size: 0.85em;
}

@media (max-width: 760px) {
  .whynot {
    grid-template-columns: minmax(0, 1fr);
  }

  .wn {
    padding: 22px;
  }
}

/* ---------- Speed ---------- */

.speed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.meter {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
}

.meter-num {
  font-size: clamp(64px, 9vw, 120px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.meter-num small {
  font-size: 0.35em;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.meter-cap {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.spark {
  width: 100%;
  height: 120px;
  margin-top: 24px;
}

.meter-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--dim);
  font: 12px var(--mono);
}

@media (max-width: 960px) {
  .speed {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Config builder ---------- */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
  overflow: hidden;
}

.builder-form {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 10px;
}

.field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-pressed="true"] {
  border-color: rgba(91, 140, 255, 0.8);
  background: rgba(91, 140, 255, 0.16);
  color: #fff;
}

.input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #060911;
  font: 14px var(--mono);
  outline: none;
}

.input:focus {
  border-color: rgba(91, 140, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.15);
}

.builder-out {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #04070d;
}

.builder-out .out-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 13px var(--mono);
}

.builder-out pre {
  flex: 1;
  margin: 0;
  padding: 20px;
  overflow: auto;
  font: 13.5px/1.75 var(--mono);
  color: #d9e1f0;
}

/* Try it: a command checked against the config, by the engine in the browser. */
.b-try {
  grid-column: 1 / -1;
  display: grid;
  /* One column that can shrink: a long command in a chip mustn't widen the panel. */
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(69, 212, 255, 0.04), transparent);
}

.b-try-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  font-size: 14px;
}

.b-try-head span {
  color: var(--dim);
  font-size: 12.5px;
}

.b-try-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #060911;
  font: 13.5px var(--mono);
}

.b-try-input > span {
  color: var(--green);
}

.b-try-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--text);
  font: inherit;
}

.b-try-input:has(input:focus-visible) {
  border-color: rgba(91, 140, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.15);
}

.b-try-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.b-try-chips button {
  max-width: 100%;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 12px/1.4 var(--mono);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b-try-chips button:hover {
  color: var(--text);
}

.b-try-chips button[aria-pressed="true"] {
  border-color: rgba(69, 212, 255, 0.55);
  background: rgba(69, 212, 255, 0.1);
  color: #e6f7ff;
}

.b-try-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-height: 28px;
  font-size: 14px;
}

.b-try-what {
  flex: 1 1 220px;
  color: #dfe5f2;
}

.b-try-out .tag {
  flex: none;
}

.b-try-out .tag:not(.safe, .warn, .prod, .ask) {
  background: rgba(148, 163, 196, 0.12);
  color: var(--muted);
}

.b-try-out small {
  color: var(--dim);
  font: 12px var(--mono);
}

.b-try-out .spinner {
  width: 16px;
  height: 16px;
}

.toml-h {
  color: #b9a8ff;
}

.toml-k {
  color: #8fb6ff;
}

.toml-s {
  color: #9fe3c4;
}

.toml-c {
  color: var(--dim);
}

.toml-n {
  color: #ffd38a;
}

.copy {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 600;
}

.copy[data-done] {
  border-color: rgba(61, 220, 151, 0.6);
  color: var(--green);
}

@media (max-width: 960px) {
  .builder {
    grid-template-columns: minmax(0, 1fr);
  }
  .builder-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .b-try {
    padding: 16px 16px 20px;
  }
}

/* ---------- Setup ---------- */

.steps3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps3 li {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
}

.steps3 .num {
  color: var(--cyan);
  font: 600 14px/1 var(--mono);
}

.steps3 p {
  color: var(--muted);
  font-size: 15px;
}

.steps3 pre {
  margin: 6px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #04070d;
  overflow-x: auto;
  font-size: 13px;
  color: #d9e1f0;
}

@media (max-width: 960px) {
  .steps3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Dashboard preview ---------- */

.dash {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-points {
  display: grid;
  gap: 14px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.dash-points b {
  color: var(--text);
}

.screen {
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: #0a0e18;
  box-shadow: 0 60px 120px -50px rgba(61, 110, 240, 0.55);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
  transition: transform 0.8s var(--ease);
}

.screen:hover {
  transform: perspective(1400px) rotateY(-2deg) rotateX(1deg);
}

.screen-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font: 12px var(--mono);
}

.screen-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.screen .card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
}

.screen .card b {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.screen .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.screen .stats span {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 15px;
  font-weight: 700;
}

.screen .stats small {
  display: block;
  color: var(--dim);
  font-size: 11px;
  font-weight: 500;
}

.screen .lane {
  position: relative;
  height: 34px;
  margin-top: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.screen .lane i {
  position: absolute;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.feed-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item small {
  display: block;
  color: var(--dim);
  font-size: 11.5px;
}

.feed-item span:first-child {
  margin-top: 5px;
}

@media (max-width: 960px) {
  .dash {
    grid-template-columns: minmax(0, 1fr);
  }
  .screen {
    transform: none;
  }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  font-size: inherit;
}

.faq-item button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.faq-item button::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.3s var(--ease);
}

.faq-item[data-open] button::after {
  transform: rotate(-135deg) translateY(-3px);
}

.answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.faq-item[data-open] .answer {
  grid-template-rows: 1fr;
}

.answer > div {
  overflow: hidden;
}

.answer p {
  padding-bottom: 22px;
  color: var(--muted);
}

.answer code {
  color: #b9cbff;
}

.answer a {
  color: var(--cyan);
}

@media (max-width: 960px) {
  .faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* ---------- Ending ---------- */

.ending {
  position: relative;
  padding: clamp(70px, 9vw, 120px) clamp(24px, 6vw, 80px);
  border: 1px solid rgba(91, 140, 255, 0.35);
  border-radius: 36px;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(91, 140, 255, 0.35), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(69, 212, 255, 0.18), transparent 70%),
    #070b16;
  text-align: center;
  overflow: hidden;
}

.ending h2 {
  font-size: clamp(42px, 6.4vw, 88px);
}

.ending .lede {
  max-width: 560px;
  margin: 22px auto 0;
}

.waitlist {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 36px auto 0;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(4, 6, 11, 0.7);
  backdrop-filter: blur(10px);
}

.waitlist input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
}

/* The pill is the field: it lights up when the email box has the keyboard. */
.waitlist:has(input:focus-visible) {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(69, 212, 255, 0.25);
}

.waitlist .hp {
  position: absolute;
  left: -9999px;
}

.waitlist-msg {
  min-height: 24px;
  margin-top: 14px;
  font-weight: 600;
}

.waitlist-msg[data-kind="ok"] {
  color: var(--green);
}

.waitlist-msg[data-kind="err"] {
  color: var(--red);
}

/* After signing up: which agents do you use? */
.wl-ask {
  max-width: 620px;
  margin: 8px auto 18px;
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(4, 6, 11, 0.6);
}

.wl-q {
  margin: 0 0 14px;
  font-weight: 600;
  outline: none;
}

.wl-agents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.wl-ask-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.wl-ask-row .btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.wl-fine {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.wl-fine[data-kind="err"] {
  color: var(--red);
}

.wl-thanks {
  margin: 0 0 14px;
  color: var(--muted);
}

.needs {
  color: var(--dim);
  font-size: 14px;
}

.end-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 26px;
  filter: drop-shadow(0 0 24px rgba(91, 140, 255, 0.7));
}

@media (max-width: 560px) {
  .waitlist {
    flex-direction: column;
    border-radius: 22px;
  }
  .waitlist input[type="email"] {
    height: 48px;
  }
}

/* ---------- Footer ---------- */

.foot {
  margin-top: 90px;
  padding: 50px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.foot-cols {
  display: flex;
  gap: 60px;
}

.foot-cols div {
  display: grid;
  gap: 10px;
  align-content: start;
}

.foot-cols h3 {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}

.foot-cols a {
  color: var(--muted);
  text-decoration: none;
}

.foot-cols a:hover {
  color: var(--text);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 40px;
  color: var(--dim);
}

/* ---------- Command palette ---------- */

.palette {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: start center;
  padding: 14vh 16px 16px;
  background: rgba(2, 3, 6, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  /* home.js makes it inert while closed, which keeps it out of the Tab order */
  transition: opacity 0.2s;
}

.palette[data-open] {
  opacity: 1;
  pointer-events: auto;
}

.palette-box {
  width: min(640px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: #0b0f1a;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.25s var(--ease);
}

.palette[data-open] .palette-box {
  transform: none;
}

.palette input {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  outline: none;
  font-size: 17px;
}

.palette-list {
  position: relative;
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}

.palette-group {
  padding: 10px 12px 6px;
  color: var(--dim);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 15px;
}

.palette-item small {
  flex: none;
  white-space: nowrap;
  margin-left: auto;
  color: var(--dim);
  font-size: 12px;
}

.palette-item .mono {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.palette-item[aria-selected="true"] {
  background: rgba(91, 140, 255, 0.16);
}

.palette-foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

/* ---------- Reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
