:root {
  --paper: #FAFAFC;
  --paper-2: #F0F1F7;
  --ink: #121633;
  --slate: #555B76;
  --line: #E1E3ED;
  --signal: #F0364F;

  --panel: #121633;
  --panel-raise: #1A1F47;
  --panel-line: #2A305E;
  --panel-text: #E7E9F6;
  --panel-muted: #9096BA;
  --panel-hit: #FF8496;

  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
code, pre { font-family: var(--mono); font-variant-ligatures: none; }
code { font-size: 0.88em; }

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Logo: the second d is the stutter */
.logo {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--signal); display: inline-block; transform: translate(0.04em, 0.07em); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; font-weight: 500; }
.site-header nav a { text-decoration: none; color: var(--slate); }
.site-header nav a:hover { color: var(--ink); }
.site-header nav .nav-cta {
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
}
.site-header nav .nav-cta:hover { background: var(--ink); color: #fff; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) var(--section); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.042em;
  max-width: 14ch;
}
.lede { margin-top: 24px; font-size: clamp(1.08rem, 1.5vw, 1.2rem); color: var(--slate); max-width: 34em; }
.note { margin-top: 14px; font-size: 0.92rem; color: var(--slate); }

/* Waitlist form */
.waitlist { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 480px; }
.waitlist input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s;
}
.waitlist input[type="email"]::placeholder { color: #9A9FB6; }
.waitlist input[type="email"]:hover { border-color: #C9CCDB; }
.waitlist input[type="email"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.waitlist button {
  flex: 0 0 auto;
  height: 50px;
  padding: 0 22px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.waitlist button:hover { background: #222868; }
.waitlist button:active { transform: translateY(1px); }
.waitlist button:disabled { opacity: .7; cursor: progress; }
.form-msg { flex-basis: 100%; font-size: 0.95rem; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.error { color: #C4162E; }
.waitlist.joined { display: block; }
.waitlist .joined-msg { font-weight: 600; padding: 13px 0; }

/* The run panel */
.run {
  position: relative;
  margin: 0;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 18px;
  padding: 22px clamp(16px, 2.6vw, 28px) 26px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .06) inset,
    0 30px 60px -28px rgba(18, 22, 51, .55),
    0 12px 24px -12px rgba(18, 22, 51, .25);
  font-size: 0.9rem;
}
.run-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--panel-line); }
.run-endpoint { font-family: var(--mono); font-size: 0.86rem; color: var(--panel-text); }
.run-endpoint b { color: var(--panel-muted); font-weight: 600; margin-right: 4px; }
.run-status { font-size: 0.82rem; color: var(--panel-hit); font-weight: 600; white-space: nowrap; }
.run-status.searching { color: var(--panel-muted); font-weight: 500; }

.probes { width: 100%; border-collapse: collapse; margin-top: 6px; font-family: var(--mono); font-size: 0.84rem; }
.probes th { text-align: left; font-family: var(--sans); font-weight: 500; font-size: 0.8rem; color: var(--panel-muted); padding: 10px 10px 6px; }
.probes td { padding: 8px 10px; border-top: 1px solid rgba(255, 255, 255, .05); white-space: nowrap; }
.probes th:first-child, .probes td:first-child { padding-left: 12px; }
.probes td:nth-child(2) { color: var(--panel-muted); }
.probes td:last-child, .probes th:last-child { text-align: right; }
.probes code { font-size: 1em; color: var(--panel-text); }
.probes tr.hit td { background: rgba(240, 54, 79, .14); color: var(--panel-hit); border-top-color: transparent; }
.probes tr.hit code { color: var(--panel-hit); }
.probes tr.hit td:first-child { box-shadow: inset 3px 0 0 var(--signal); border-radius: 6px 0 0 6px; }
.probes tr.hit td:last-child { border-radius: 0 6px 6px 0; }

.finding { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--panel-line); }
.finding-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.finding-body { margin-top: 4px; color: var(--panel-muted); line-height: 1.55; }
.finding-body code { color: var(--panel-text); }
.finding pre {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: var(--panel-raise);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  color: var(--panel-text);
}
.finding pre code { font-size: 1em; }
.finding .k { color: #A9B1FF; }
.finding .f { color: #FFFFFF; font-weight: 600; }
.finding .s { color: #8FE0B8; }

.run-head-end { display: inline-flex; align-items: baseline; gap: 12px; }
.replay {
  font: inherit; font-size: 0.8rem; font-weight: 500;
  color: var(--panel-muted); background: transparent;
  border: 1px solid var(--panel-line); border-radius: 999px;
  padding: 4px 12px; cursor: pointer;
}
.replay:hover { color: var(--panel-text); border-color: var(--panel-muted); }

/* The one orchestrated moment: probes arrive, the last one breaks, the test appears */
.run.animate tbody tr { opacity: 0; transform: translateY(4px); transition: opacity .28s ease, transform .28s ease; }
.run.animate tbody tr.shown { opacity: 1; transform: none; }
.run.animate tr.hit.shown td { animation: hit 0.9s ease-out; }
.run.animate .finding { opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s ease; }
.run.animate.done .finding { opacity: 1; transform: none; }
@keyframes hit {
  0% { background: rgba(240, 54, 79, .55); }
  100% { background: rgba(240, 54, 79, .14); }
}

/* Section heads */
.section-head { display: grid; gap: 16px; max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
.section-head p { color: var(--slate); font-size: 1.1rem; }

/* What it finds */
.finds { padding-block: var(--section); border-top: 1px solid var(--line); }
.findings { width: 100%; border-collapse: collapse; }
.findings thead th { text-align: left; font-size: 0.9rem; font-weight: 500; color: var(--slate); padding: 0 16px 12px 0; border-bottom: 1.5px solid var(--ink); }
.findings tbody th, .findings tbody td { text-align: left; vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.findings tbody th { font-weight: 600; width: 22%; }
.findings tbody td:nth-child(2) { width: 40%; color: var(--slate); }
.findings tbody td:nth-child(2) code { color: var(--ink); background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }
.findings tbody td:last-child { font-weight: 500; }

/* How it works */
.how { padding-block: var(--section); background: var(--paper-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 22px; border-top: 1.5px solid var(--ink); }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 18px;
}
.steps h3 { font-size: 1.3rem; }
.steps p { margin-top: 10px; color: var(--slate); }

/* Safety */
.safety { padding-block: var(--section); }
.safety-grid { display: grid; gap: 32px; }
.safety h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); max-width: 12ch; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.principles li { color: var(--slate); max-width: 36em; padding-left: 22px; position: relative; }
.principles li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.principles strong { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 4px; }

/* Join */
.join { background: var(--ink); color: #fff; padding-block: clamp(64px, 9vw, 112px); }
.join-inner { display: grid; gap: 16px; }
.join h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em; }
.join p { color: #B7BCDA; max-width: 34em; font-size: 1.1rem; }
.join .waitlist { margin-top: 16px; }
.join .waitlist input[type="email"] { border-color: transparent; }
.join .waitlist input[type="email"]:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }
.join .waitlist button { background: #fff; color: var(--ink); }
.join .waitlist button:hover { background: #E3E5F4; }
.join .form-msg.error { color: #FF9AA8; }
.join :focus-visible { outline-color: #fff; }

/* Footer */
.site-footer { padding-block: 36px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--slate); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; }
.footer-inner .logo { color: var(--ink); font-size: 1.1rem; }
.footer-inner a[href^="mailto"] { color: var(--ink); text-underline-offset: 3px; }
.footer-inner .copy { margin-left: auto; }

/* Responsive */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 48px; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; }
  .safety-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
}
@media (max-width: 719px) {
  .site-header nav a:not(.nav-cta) { display: none; }
  .site-header nav .nav-cta { padding: 6px 12px; font-size: 0.9rem; }
  .probes { font-size: 0.78rem; }
  .probes th, .probes td { padding-inline: 6px; }
  .findings thead { display: none; }
  .findings, .findings tbody, .findings tr, .findings th, .findings td { display: block; width: auto !important; }
  .findings tbody tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .findings tbody th, .findings tbody td { padding: 0; border: 0; }
  .findings tbody td { margin-top: 6px; }
  .footer-inner .copy { margin-left: 0; }
}
@media (max-width: 400px) {
  .waitlist button { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
